www.gusucode.com > 要听音乐网完美修正版 1.0源码程序 > admin/Admin_musiclist.asp

    <!--#include file="../inc/const.asp"-->
<!--#include file="inc/char.asp"-->
<html>
<head>
<title><%=site_info(0)%>-后台管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css.css" type=text/css rel=stylesheet>
</head>
<body text=#000000 leftmargin=0 topmargin=0 marginheight="0" marginwidth="0" bgcolor="#E5E5E5">
<br>
<%
If Not CheckAdmin(ScriptName) Then
    strMsg="<Li>您没有管理本页面的权限。"
    Call Msg()
End If
Dim Specialid,keyword
Specialid=request.QueryString("specialid")
keyword=request.form("keyword")
PageSize=CInt(site_info(9))

	Page=Request.QueryString("Page")
	If isInt(Page)=False Then 
		Page=1
	Else
		Page=CInt(Page)
		If Page<1 Then Page=1
	End If	
	Set Rs=Server.CreateObject("ADODB.RecordSet")
	    If Specialid<>"" Then
		SQL="SELECT * FROM "& TableClass &" WHERE Specialid="&Specialid&" order by id desc"
        ElseIf keyword<>"" Then
		SQL="SELECT * FROM "& TableClass &""
		Else
		SQL="SELECT * FROM "& TableClass &" ORDER BY ID DESC"
		End If
	Rs.CursorLocation=3
	Rs.Open SQL,Conn,1
	if keyword<>"" then
       rs.filter = "MusicName like '%"& keyword &"%'"
    end if
%>
<body>
<script language=javascript>
function CheckAll(form1)  {
  for (var i=0;i<form1.elements.length;i++)    {
    var e = form1.elements[i];
    if (e.name != 'chkall')       e.checked = form1.chkall.checked; 
   }
  }
</script>
<form name="myform" method="post" action="Admin_Batch.Asp">
  <table width="95%" border=0 align="center" cellpadding=2 cellspacing=1 class="border-all">
    <tbody>
      <tr> 
        <th colspan="7">歌曲列表</th>
      </tr>
      <tr class="TopTitle"> 
        <td width="7%">管理</td>
        <td width="50%">&nbsp;名称</td>
        <td width="20%">所属歌手</td>
        <td width="6%">推荐</td>
        <td width="6%">修改</td>
		<td width="6%">删除</td>
        <td width="6%">生成</td>
      </tr>
	  <%
    Dim Css
  	If Not (Rs.Bof And Rs.Eof) Then
			MusicCount=Rs.RecordCount
			Rs.MoveFirst
			If Page > 1 Then Rs.Move(Page-1) * CLng(PageSize)
		If MusicCount Mod CInt(PageSize)=0 Then
			PageCount= MusicCount \ CInt(PageSize)
		Else
			PageCount= MusicCount \ CInt(PageSize)+1
		End If
		If Page > PageCount Then Page = PageCount
		arrResult=Rs.GetRows(PageSize)
		Rs.Close
		Set Rs=Nothing
  	    For i=0 To UBound(arrResult,2)
  			ID=arrResult(0,i)			 
  			If I Mod 2=0 Then 
				Css="Table_row_1"
  			Else
                Css="Table_row_2"
  			End If
%>
      <tr class="<%=Css%>"> 
        <td align=center><input name="ID" type="checkbox" id="ID" value="<%=id%>"></td>
        <td>&nbsp;<%Response.Write ""&CutStr(arrResult(2,i),37)&""%>&nbsp;
          <%if arrResult(7,i)>100 then Response.Write " <img src=../images/hot.gif alt='点击"&arrResult(7,i)&"' align=absmiddle>"%>
          <%if arrResult(9,i)=1 then Response.Write " <img src=../images/isbest.gif alt=推荐精华 align=absmiddle>"%>
          &nbsp;&nbsp;</td>
        <td align="center">
		<%	
		strClass=arrResult(3,i)
		Response.Write "<font style='color:#006699' title='"&strClass&"'>"&CutStr(strClass,25)&"</font>"
		%></td>
        <td align=center><%if arrResult(9,i)=1 then Response.Write "<a href=Admin_musiclist_1.asp?Action=SetNoGood&ID="&id&"><font color=green>撤消</font></a>" else Response.Write "<a href=Admin_musiclist_1.asp?Action=SetIsGood&ID="&id&">推荐</a>" end if%></td>
        <td align=center> 
          <a href="Admin_musiclist_1.asp?Action=edit&ID=<%=ID%>">修改</a></td>
		<TD align=middle><a href="Admin_musiclist_1.asp?Action=del&ID=<%=ID%>">删除</a></TD>
        <TD align=middle><a href="make_playlist.asp?im286=<%=ID%>">生成</a></TD>
      </tr>
      </tr>
      <%
  	      Next
	Else%>
      <tr> 
        <td height="25" colspan="5" align="center"><font color="#006699"><b>尚未添加</b></font></td>
      </tr>
      <%	End If%>
      <tr> 
        <td height="30" colspan="7" class="table_row_1"> 
          <%
    Response.Write (ShowPage(PageCount,MusicCount,Page,PageSize,"?"))
%>
        </td>
      </tr>
      <tr> 
        <td height="35" colspan="5" class="table_row_2"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr> 
              <td>
                <input type="checkbox" name="chkall" value="on" onClick="CheckAll(this.form)">
                全选/取消 
                <input name="action" type="radio" value="BatchDel">
                批量删除
				<input name="action" type="radio" value="BatchGood">
                批量推荐
				<input name="action" type="radio" value="BatchHits">
                批量点击
				<input type="text" name="hits" size="5" class="editbox" value="100">
                <input name="Submit" type="submit" class="button" id="Submit" value="执行" onClick="{if(confirm('您确定执行的操作吗?')){return true;}return false;}"> 
              </td>
            </tr>
          </table></td>
      </tr>
    </tbody>
  </table>
</form>
<iframe width=0 height=0 src="" id="hiddenframe"></iframe>
</body>
</html>
<%
DataClose()
%>