📄 admin_smusicmana.asp
字号:
<!--#include file="function.asp"-->
<%call CheckAdmin2%>
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<%
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
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">
<tr>
<td valign=top width="5" background="images/line_bg02.gif"></td>
<td valign=top width="162"><!--#include file="admin_left.asp"--></td>
<td valign=top width="5" background="images/line_bg02.gif"> </td>
<td align=center valign=top width="567">
<%
sql="select * from SendMusic order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>暂时没有点歌</p>"
else
MaxPerPage=15
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_SMusicMana.asp"
showContent
showpage totalput,MaxPerPage,"admin_SMusicMana.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,"admin_SMusicMana.asp"
showContent
showpage totalput,MaxPerPage,"admin_SMusicMana.asp"
else
currentPage=1
showpage totalput,MaxPerPage,"admin_SMusicMana.asp"
showContent
showpage totalput,MaxPerPage,"admin_SMusicMana.asp"
end if
end if
end if
rs.close
set rs=nothing
sub showContent
dim i
i=0
%>
<table border="1" width="100%" cellspacing="0" cellpadding="0">
<tr height=22 align=center>
<td width="5%" class=TFColor>序号</td>
<td width="10%" class=TFColor>点歌人</td>
<td width="10%" class=TFColor>点歌给</td>
<td width="20%" class=TFColor>歌名</td>
<td width="25%" class=TFColor>祝福</td>
<td width="15%" class=TFColor>时间</td>
<td width="10%" class=TFColor>IP地址</td>
<td width="5%" class=TFColor>删除</td>
</tr>
<%do while not rs.eof
i=i+1
%>
<tr height=20>
<td width="5%" align=center><%=rs("id")%> </td>
<td width="10%" align=center><%=rs("FromUser")%> </td>
<td width="10%" align=center><%=rs("ForUser")%> </td>
<td width="20%" align=center><%=rs("MusicName")%> </td>
<td width="25%"><%=rs("Words")%> </td>
<td width="15%" align=center><%=rs("dateandtime")%> </td>
<td width="10%" align=center><%=rs("IP")%> </td>
<td width="5%" align=center><a href="admin_SMusicDel.asp?id=<%=rs("id")%>&page=<%=CurrentPage%>">删除</a></td>
</tr>
<%
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>共<b><%=totalnumber%></b></font>项点歌
<%if CurrentPage<2 then%>
首页 上一页
<%else%>
 <a href="<%=filename%>?page=1&classid=<%=classid%>">首页</a>
<a href="<%=filename%>?page=<%=CurrentPage-1%>&classid=<%=classid%>">上一页</a>
<%
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%>
页次:<strong><%=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
%>
<table border="1" width="50%" cellspacing="0" cellpadding="0" class="TableLine">
<tr>
<td width="100%" height="20" align=center class=TFColor><b>删除过期点歌数据</b></td>
</tr>
<form method="POST" action="admin_smusicdel.asp?action=deldate&page=<%=CurrentPage%>" id=form1 name=form1>
<tr>
<td width="30%" align=center>间隔天数:<input type="text" name="selectdate" size="20"></td>
</tr>
<tr>
<td align=center>
<input type="submit" value=" 确定 " name="cmdok">
<input type="reset" value=" 清 除 " name="cmdcancel">
</td>
</tr>
</form>
<tr>
<td width="30%" height="30" align=center><a href="admin_smusicdel.asp?action=delweek&page=<%=CurrentPage%>">删除一周前的点歌数据</a></td>
</tr>
<tr>
<td width="30%" height="30" align=center><a href="admin_smusicdel.asp?action=delmonth&page=<%=CurrentPage%>">删除一个月前的点歌数据</a></td>
</tr>
</table>
</td>
<td align=center valign=top width="5" background="images/line_bg02.gif">
</td>
</tr>
<tr>
<td valign=top width="750" colspan="5" background="images/line_bg01.gif">
<img border="0" src="images/line_bg01.gif"></td>
</tr>
</table>
</center>
</div>
<BR>
</div>
<p></p>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -