📄 songspeciallist.asp
字号:
<!--#include file="admin.asp"-->
<!--#include file="conn1.asp"-->
<!--#include file="char.inc"-->
<!-- #include file="../Inc/Head.asp" -->
<%
maxperpage=10
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
set rs=createobject("adodb.recordset")
sql="select * from SongSpecial order by Special_Id desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "暂时没有收集"
else
PageUrl="songspeciallist.asp"
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
showContent
showpage totalput,MaxPerPage,PageUrl
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,PageUrl
else
currentPage=1
showContent
showpage totalput,MaxPerPage,PageUrl
end if
end if
end if
rs.close
sub showContent
Response.Write "<br><table width=""60%"" border=""0"" cellspacing=""1"" cellpadding=""3"" bgcolor=""#F0f0f0"" align=""center"">"
Admin_i=0
do while not rs.eof
Admin_i=Admin_i+1
Response.Write "<tr bgcolor=""#FFFFFF"" align=""center"">"&_
"<td align=""left""><li><a href=songlist.asp?Special_Id="&rs("Special_Id")&">"&rs("Special_Name")&"</a></td>"&_
"<td><a href=songadd.asp?Special_ID="&rs("Special_ID")&"&Class_ID="&rs("Class_ID")&"&Nclass_ID="&rs("Nclass_ID")&">录入单曲</a></td>"&_
"<td><a href=songSpecialedit.asp?Special_Id="&rs("Special_Id")&"&Class_Nclass="&rs("Class_Id")&","&rs("Nclass_Id")&">编辑</a></td>"&_
"<td><a href=""javascript:newin('200', '150', 'songspecialsave.asp?Special_id="&rs("Special_Id")&"&action=del', 'del')"">删除</a></td>"&_
"</tr>"
if Admin_i>=maxperpage then exit do
rs.movenext
loop
Response.Write " </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
response.write "<div align=""center""><form method=Post action="&filename&">"&_
"<font size=""2"">共找到<b>"&totalnumber&"</b>项记录"
if CurrentPage<2 then
response.write " 首页 上一页 "
else
response.write " <a href="&filename&"?page=1>首页</a> <a href="&filename&"?page="&CurrentPage-1&">上一页</a> "
end if
if n-currentpage<1 then
response.write "下一页 末页 "
else
response.write "<a href="&filename&"?page="&CurrentPage+1&">下一页</a> "&_
"<a href="&filename&"?page="&n&">末页</a>"
end if
response.write " 页次:<strong>"&CurrentPage&"/"&n&"</strong>页 转到:<select name='page' size='1' onchange='javascript:submit()'>"
for i = 1 to n
response.write "<option value="&i
if cint(CurrentPage)=cint(i) then response.write " selected "
response.write ">第"&i&"页</option>"
next
response.write "</select></font></form></div>"
end function
%>
</td>
</tr>
</table>
<!-- #include file="../Inc/Foot.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -