www.gusucode.com > 星云DJ舞曲 4.5a源码程序 > admin/admin_songmana.asp
<%CheckAdmin1%> <!--#include file="const.asp"--> <% if request("page")<>"" then currentPage=cint(request("page")) else currentPage=1 end if %> <html> <head> <title>迪吧后台管理系统</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link href="Admin_Style.css" rel="stylesheet" type="text/css"> </head> <body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0"> <% set rs=server.createobject("adodb.recordset") if mysearch="" then mysearch=" where " if request("classid")<>"" then mysearch=mysearch & "and classid="&request("classid")&" " if request("IsGood")<>"" then mysearch=mysearch & "and IsGood=true " if request("bfqlb")<>"" then mysearch=mysearch & "and bfqlb=true " if request("musicname")<>"" then mysearch=mysearch & "and musicname like '%"&request("musicname")&"%' " mysearch=replace(mysearch,"where and","where") if trim(mysearch)="where" then mysearch="" sql="select * from Musiclist "&mysearch&" order by id desc" rs.open sql,conn,1,1 if rs.eof and rs.bof then response.write "<p align='center'>此栏目暂时没有收集任何歌曲</p>" showList else MaxPerPage=MaxMusicList totalPut=rs.recordcount if currentpage<1 then currentpage=1 if (currentpage-1)*MaxPerPage>totalput then if (totalPut mod MaxPerPage)=0 then currentpage= totalPut \ MaxPerPage else currentpage= totalPut \ MaxPerPage + 1 end if end if if currentPage=1 then showpage totalput,MaxPerPage,"admin_songmana.asp" showContent showpage totalput,MaxPerPage,"admin_songmana.asp" showList else if (currentPage-1)*MaxPerPage<totalPut then rs.move (currentPage-1)*MaxPerPage dim bookmark bookmark=rs.bookmark showpage totalput,MaxPerPage,"admin_songmana.asp" showContent showpage totalput,MaxPerPage,"admin_songmana.asp" showList else currentPage=1 showpage totalput,MaxPerPage,"admin_songmana.asp" showContent showpage totalput,MaxPerPage,"admin_songmana.asp" showList end if end if rs.close end if sub showContent dim i i=0 %> <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" id="AutoNumber2"> <tr class="topbg"> <td height="22" colspan="6" align="center"><strong>舞曲管理</strong></td> </tr> </table> <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" id="AutoNumber3"> <form method="get" action="admin_songmana.asp"> <tr class="title"> <td height="22" colspan="6" align="center"> <div align="center"> <center> <table border="0" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse"> <tr> <% '-----------------目录列表----------------------- set Trs=server.createobject("adodb.recordset") Tsql="select Classid,Class from Class" Trs.open Tsql,conn,1,1 if not Trs.eof then %> <tr> <td><a href="admin_songmana.asp"><font color=#0000ff>全部舞曲</font></a> | <a href="admin_SongMana.asp?bfqlb=true"><font color=#0000ff>播放列表</font></a> | <a href="admin_SongMana.asp?IsGood=true"><font color=#0000ff>推荐音乐</font></a> | <% do while not Trs.eof%> <a href="admin_SongMana.asp?Classid=<%=Trs("Classid")%>"><%=Trs("Class")%></a> <% Trs.movenext loop %> </td> </tr> <% end if Trs.close %> </td> </table> </center> </div> </td></tr> <tr class="tdbg"> <td width="100%" colspan=6 align=center><input type=text name=musicname value=<%=request("musicname")%>> <input type=submit name=search value=搜索舞曲></td> </tr> <tr class="tdbg"> <td width="55%" height=22 align=center>舞曲名字</td> <td width="8%" height=22 align=center>HTML</td> <td width="8%" height=22 align=center><a href="admin_SongMana.asp?IsGood=true">推荐</a></td> <td width="13%" height=22 align=center><a href="admin_SongMana.asp?bfqlb=true">播放列表</a></td> <td width="8%" height=22 align=center>修改</td> <td width="8%" height=22 align=center>删除</td> </tr> <%do while not rs.eof%> <tr class="tdbg"> <td width="55%"><a href="admin_larm.asp?id=<%=rs("id")%>" target="admin_vvvdj"><%=(i+1)%>/<font color="#FF0000"><%=rs("ID")%></font>.<%=rs("MusicName")%><BR><%=(i+1)%>/<%=rs("ID")%>.<font color="#FF0000"><%=rs("ListenUrl")%></font></a> (<font color="#FF0000">点击:<%=rs("hits")%>次</font>) <a href="/d/Drm.asp?id=<%=rs("id")%>" target="down">下载</a></td> <td width="8%" align=center><a href="play_all_1.asp?id=<%=rs("id")%>"><font color=#0000ff>生成</font></a></td> <td width="8%" align=center><a href="admin_SongSave.asp?act=SetIsGood&id=<%=rs("id")%>&classid=<%=classid%>&page=<%=CurrentPage%>"><%if rs("IsGood")=true then%><font color=red>撤销</font><%else%><font color=#0000ff>推荐</font><%end if%></a></td> <td width="13%" align=center><a href="admin_SongSave.asp?act=bfqlb&id=<%=rs("id")%>&classid=<%=classid%>&page=<%=CurrentPage%>"><%if rs("bfqlb")=true then%><font color=red>退出</font><%else%><font color=#0000ff>加入</font><%end if%></a></td> <td width="8%" align=center><a href="admin_SongModify.asp?id=<%=rs("id")%>&AskClassid=<%=classid%>&page=<%=CurrentPage%>"><font color=#0000ff>修改</font></a></td> <td width="8%" align=center><a href="admin_SongDel.asp?act=del&id=<%=rs("id")%>&classid=<%=classid%>&page=<%=CurrentPage%>"><font color=#0000ff>删除</font></a></td> </tr> <% i=i+1 if i>=MaxPerPage then exit do rs.movenext loop %> <tr class="title"> <td height="22" colspan="6" align="center"> <div align="center"> <center> <table border="0" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse"> <tr> <% '-----------------目录列表----------------------- set Trs=server.createobject("adodb.recordset") Tsql="select Classid,Class from Class" Trs.open Tsql,conn,1,1 if not Trs.eof then %> <tr> <td> <% do while not Trs.eof%> <a href="admin_SongMana.asp?Classid=<%=Trs("Classid")%>"><%=Trs("Class")%></a> <% Trs.movenext loop %> </td> </tr> <% end if Trs.close %> </td> </table> </center> </div> </td></tr> </table><br> </center> </div> <% end sub function showpage(totalnumber,maxperpage,filename) dim n if totalnumber mod maxperpage=0 then n= totalnumber \ maxperpage else n= totalnumber \ maxperpage+1 end if %> <form class=zt00 method=Post action="<%=filename%>?classid=<%=request("classid")%>"> <center>共<font color="<%=AlertFColor%>"><b><%=totalnumber%></b></font>首歌曲 <%if CurrentPage<2 then%> 首页 上一页 <%else%>  <a href="<%=filename%>?page=1&classid=<%=request("classid")%>">首页</a> <a href="<%=filename%>?page=<%=CurrentPage-1%>&classid=<%=request("classid")%>">上一页</a> <% end if if n-currentpage<1 then %> 下一页 末页 <%else%> <a href="<%=filename%>?page=<%=CurrentPage+1%>&classid=<%=request("classid")%>">下一页</a> <a href="<%=filename%>?page=<%=n%>&classid=<%=request("classid")%>">末页</a> <%end if%> 页次:<strong><font color="<%=AlertFColor%>"><%=CurrentPage%>/<%=n%></font></strong>页 转到: <select name="page" size="1" onChange="javascript:window.location.href=this.options[this.selectedIndex].value"> <%for i = 1 to n%> <option value="<%=filename%>?Classid=<%=request("Classid")%>&page=<%=i%>" <%if cint(CurrentPage)=cint(i) then%> selected <%end if%>>第<%=i%>页</option> <%next%> </select> </form> <% end function %> <% sub showList %> <% end sub %> </td> </tr> </table> </center> </div> </td> </tr> </table> </td> </tr> </table> </center> </div> <% set Trs=nothing set rs=nothing conn.close set conn=nothing %> </body> </html>