www.gusucode.com > 星云DJ舞曲 4.5a源码程序 > admin/admin_vipmana.asp
<!--#include file="conn.asp"--> <!--#include file="checkadmin.inc"--> <% 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"> <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" id="AutoNumber2"> <tr class="topbg"><td colspan="6"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="border" id="AutoNumber3"> <tr class="topbg"> <td height="22" align="center"><strong>VIP 服 务 管 理</strong></td> </tr> </table> </td></tr> <tr class="tdbg"> <td width="5%" align="center">序号</td> <td width="58%" align="center">标题</td> <td width="25%" align="center">添加时间</td> <td width="6%" align="center">修改</td> <td width="6%" align="center">删除</td> </tr> <div align=center> <% set rs=server.createobject("adodb.recordset") sql="select * from vipfuwu order by ID desc" rs.open sql,conn,1,1 if rs.eof and rs.bof then response.write "<p align='center'>还未添加任何VIP服务</p>" else MaxPerPage=20 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_vipmana.asp" showContent showpage totalput,MaxPerPage,"admin_vipmana.asp" else if (currentPage-1)*MaxPerPage<totalPut then rs.move (currentPage-1)*MaxPerPage dim bookmark bookmark=rs.bookmark showpage totalput,MaxPerPage,"admin_vipmana.asp" showContent showpage totalput,MaxPerPage,"admin_vipmana.asp" else currentPage=1 showpage totalput,MaxPerPage,"admin_vipmana.asp" showContent showpage totalput,MaxPerPage,"admin_vipmana.asp" end if end if rs.close end if sub showContent dim i i=0 do while not rs.eof %></div> <tr class="tdbg"> <td width="5%" align="center"><%=rs("id")%> </td> <td width="58%" align="center"><%=rs("title")%> </td> <td width="25%" align="center"><%=rs("adddate")%> </td> <td width="6%" align="center"> <a href="admin_vipfuwumodify.asp?id=<%=rs("id")%>&act=edit">修改</a></td> <td width="6%" align="center"> <a href="admin_vipfuwusave.asp?id=<%=rs("id")%>&act=del">删除</a></td> </tr> <% i=i+1 if i>=MaxPerPage then exit do rs.movenext loop %> <tr class="tdbg"> <td height="22" colspan="7" align="center" class="title"> <input onclick="javascript:window.open('admin_vipfuwuadd.asp','_self','')" type="button" value="添加新服务" name="button"> </td> </tr> </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%>"> <center>共<b><%=totalnumber%></b>项服务 <%if CurrentPage<2 then%> 首页 上一页 <%else%>  <a href="<%=filename%>?page=1">首页</a> <a href="<%=filename%>?page=<%=CurrentPage-1%>">上一页</a> <% end if if n-currentpage<1 then %> 下一页 末页 <%else%> <a href="<%=filename%>?page=<%=CurrentPage+1%>">下一页</a> <a href="<%=filename%>?page=<%=n%>">末页</a> <%end if%> 页次:<strong><%=CurrentPage%>/<%=n%></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 %> </body> </html>