⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_songmana.asp

📁 青岛dj站程序,带后台管理 名字和密码都是:admin
💻 ASP
字号:
<!--#include file="function.asp"-->
<%CheckAdmin1%>
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->

<%
if request("page")<>"" then
	currentPage=cint(request("page"))
else
	currentPage=1
end if

if request("classid")<>"" then
	classid=request("classid")
else
	classid=""
end if
%>
<!--#include file="top.asp"-->
<div align="center">
  <center>
<table border="0" width="750" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" height="124">
  <tr>
    <td valign=top width=5 background="images/line_bg02.gif" height="115"></td>
    <td valign=top width=175 height="115">
    <!--#include file="admin_left.asp"-->
    </td>
    <td valign=top width=5 background="images/line_bg02.gif" height="115"> </td>
    <td valign=top width="551" height="115">
    <%
set rs=server.createobject("adodb.recordset")
if classid<>"" then
	sql="select * from MusicList where classid="+cstr(classid)+" order by id desc" 
else
	sql="select * from MusicList order by id desc"
end if
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 border="1" width="100%" cellspacing="0" cellpadding="0" class="TableLine" style="border-collapse: collapse" bordercolor="#4883AE">
        <tr>
          <td width="46%" height=22 align=center>歌曲名字</td>
          <td width="9%" height=22 align=center>推荐</td>
          <td width="9%" height=22 align=center>修改</td>
          <td width="9%" height=22 align=center>删除</td>
        </tr>
<%do while not rs.eof%>
        <tr>
          <td width="46%"><%=(i+1)%>.<a href="javascript:open_window('song.asp?id=<%=rs("id")%>','Listen','width=250,height=100')"><%=rs("MusicName")%></a></td>

          <td width="9%" align=center><a href="admin_SongSave.asp?act=SetIsGood&id=<%=rs("id")%>&classid=<%=classid%>&page=<%=CurrentPage%>"><%if rs("IsGood")=true then%>撤销<%else%>推荐<%end if%></a></td> 
          <td width="9%" align=center><a href="admin_SongModify.asp?id=<%=rs("id")%>&AskClassid=<%=classid%>&page=<%=CurrentPage%>">修改</a></td> 
          <td width="9%" align=center><a href="admin_SongDel.asp?id=<%=rs("id")%>&classid=<%=classid%>&page=<%=CurrentPage%>">删除</a></td> 
        </tr>
<%
	i=i+1
	if i>=MaxPerPage then exit do
	rs.movenext
	loop
%>
      </table>
<%
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 method=Post action="<%=filename%>?classid=<%=classid%>">
  <center>共<font color="<%=AlertFColor%>"><b><%=totalnumber%></b></font>首歌曲
<%if CurrentPage<2 then%>
  &nbsp;首页 上一页&nbsp;
<%else%>
  &nbsp<a href="<%=filename%>?page=1&classid=<%=classid%>">首页</a>&nbsp;
  <a href="<%=filename%>?page=<%=CurrentPage-1%>&classid=<%=classid%>">上一页</a>&nbsp;
<%
end if
if n-currentpage<1 then
%>
  下一页 末页
<%else%>
  <a href="<%=filename%>?page=<%=CurrentPage+1%>&classid=<%=classid%>">下一页</a>
  <a href="<%=filename%>?page=<%=n%>&classid=<%=classid%>">末页</a>
<%end if%>
  &nbsp;页次:<strong><font color="<%=AlertFColor%>"><%=CurrentPage%>/<%=n%></font></strong>页
  转到:<select name="page" size="1" onchange="javascript:submit()">
<%for i = 1 to n%>           
  <option value="<%=i%>" <%if cint(CurrentPage)=cint(i) then%> selected <%end if%>>第<%=i%>页</option>   
<%next%>   
  </select>        
</form>        

<% 
end function
%>
<%
sub showList
%>
      <table border="1" width="100%" cellspacing="0" cellpadding="0" class="TableLine" style="border-collapse: collapse" bordercolor="#4883AE">
        <tr>
          <td colspan=2 width="100%" height=22 align=center>
          栏目列表</td>
        <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 width=10%>栏目:</td>
          <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>
<%
end sub
%>

</td>
    <td valign=top width="5" background="images/line_bg02.gif" height="115"> </td>
  </tr>
  <tr>
    <td valign=top width=750 colspan="5" background="images/line_bg01.gif" height="9">
    <img border="0" src="补间.gif" width="7" height="7"></td>
    </tr>
</table>
  </center>
</div>
    </td>
  </tr>
</table>
</div>
<%
set Trs=nothing
set rs=nothing
conn.close
set conn=nothing
%></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -