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

📄 admin_songmana.asp

📁 疯狂DJ联盟-v2.0 1.修改了V1.0的几个错误. 2.首页生成HTM 大大加快了访问速度 3.歌曲播放页面全部调用HTM播放器.减轻了服务器的负担. 4.增加了站内统计,全部访问次数
💻 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="top1.asp"-->
<br><br>
<table border="0" width="750" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" height="124" align="center">
  <tr>
    <td valign=top width=5 background="images/line_bg02.gif" height="115"><img border="0" src="补间.gif" width="7" height="7"></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 where IsGood=false 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)%>.<font color="#FFFFFF"><%=rs("MusicName")%></font></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%>
            <font color="#FFFFFF">未审核</font> 
            <%else%>
            <font color="#FFFFFF">审核通过</font> 
            <%end if%>
            </a></td> 
          <td width="9%" align=center><a href="admin_SongModify.asp?id=<%=rs("id")%>&AskClassid=<%=classid%>&page=<%=CurrentPage%>"><font color="#FFFFFF">修改</font></a></td> 
          <td width="9%" align=center><a href="admin_SongDel.asp?id=<%=rs("id")%>&classid=<%=classid%>&page=<%=CurrentPage%>"><font color="#FFFFFF">删除</font></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%>">
        共<font color="<%=AlertFColor%>"><b><%=totalnumber%></b></font>首歌曲 
        <%if CurrentPage<2 then%>
        &nbsp;首页 上一页&nbsp; 
        <%else%>
        &nbsp<a href="<%=filename%>?page=1&classid=<%=classid%>"><font color="#FFFFFF">首页</font></a>&nbsp; 
        <a href="<%=filename%>?page=<%=CurrentPage-1%>&classid=<%=classid%>"><font color="#FFFFFF">上一页</font></a>&nbsp; 
        <%
end if
if n-currentpage<1 then
%>
        下一页 末页 
        <%else%>
        <a href="<%=filename%>?page=<%=CurrentPage+1%>&classid=<%=classid%>"><font color="#FFFFFF">下一页</font></a> 
        <a href="<%=filename%>?page=<%=n%>&classid=<%=classid%>"><font color="#FFFFFF">末页</font></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")%>"><font color="#FFFFFF"><%=Trs("Class")%></font></a>
<%
	Trs.movenext
	loop
%>  </td>
        </tr>
<%
end if
Trs.close
%>

    </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>

<br><br>
<%
set Trs=nothing
set rs=nothing
conn.close
set conn=nothing
%>
</body></html>

⌨️ 快捷键说明

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