special_list.asp
上传用户:qyswxdl
上传日期:2013-06-01
资源大小:1373k
文件大小:3k
源码类别:

家庭/个人应用

开发平台:

ASP/ASPX

  1. <!--#include file="articleconn.asp"-->
  2. <!--#include file="security.asp"-->
  3. <!--#include file="../checkpost.asp"-->
  4. <!--#include file="inc/function.asp"-->
  5. <%if session("flag")>1 then
  6.     response.write "<script>alert('您的操作权限不够!');history.back();</script>"
  7.     response.end
  8. end if
  9. %>
  10. <%'分页
  11. set rs=server.createobject("adodb.recordset")
  12. sql="select * from special"
  13. rs.open sql,conn,1,1
  14.   page=Request("page")
  15.   if page=0 then
  16.      page=1
  17.   end if
  18.   RecordCount = 0 
  19.   do while not rs.Eof
  20.     RecordCount = RecordCount +1
  21.     rs.MoveNext 
  22.   loop
  23.   if not RecordCount=0 then
  24.      rs.MoveFirst
  25.   end if
  26.   pageCount=RecordCount/10
  27.   pageCount=int(pageCount)
  28.   if (RecordCount mod 10)>0 then
  29.      PageCount=PageCount +1
  30.   end if 
  31. rs.close
  32. set rs=nothing
  33.   %>
  34. <html>
  35. <head>
  36. <title>修改/删除专辑</title>
  37. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  38. <link rel="stylesheet" type="text/css" href="inc/Admin_STYLE.css">
  39. </head>
  40. <body bgcolor="#FFFFFF" text="#000000">
  41. <div align="center"> 
  42.   <p>&nbsp; </p>
  43.   <center>
  44.         
  45.     <table width="95%" border="0" cellpadding="2" cellspacing="1" class="border">
  46.       <tr> 
  47.         <td width="250" class="tdbg" style="letter-spacing: 1">共有专辑<font color="#FF0000"><%=RecordCount%></font>个,目前<font color="#ff0000"><%=page%>/<%=pageCount%></font>页</td>
  48.         <td width="50" align="center" class="tdbg" style="letter-spacing: 1"> 
  49.           <%if page=1 then
  50.             %>
  51.           首页 
  52.           <%else%>
  53.           <a href="special_list.asp">首页</a> 
  54.         <%end if%>        </td>
  55.         <td width="75" align="center" class="tdbg" style="letter-spacing: 1"> 
  56.           <%if page=1 then
  57.             %>
  58.           上一页 
  59.           <%else%>
  60.           <a href="special_list.asp?page=<%=page-1%>">上一页</a> 
  61.         <%end if%>        </td>
  62.         <td width="75" align="center" class="tdbg" style="letter-spacing: 1"> 
  63.           <%if pagecount-page=0 then
  64.             %>
  65.           下一页 
  66.           <%else%>
  67.           <a href="special_list.asp?page=<%=page+1%>">下一页</a> 
  68.         <%end if%>        </td>
  69. <td width="50" align="center" class="tdbg"> 
  70.           <%if pagecount-page=0 then%>
  71.           尾页 
  72.           <%else%>
  73.           <a href="special_list.asp?page=<%=pagecount%>">尾页</a> 
  74.         <%end if%>        </td>
  75.       </tr>
  76.     </table>
  77.   </center>
  78.       <%
  79.  set rs=server.createobject("adodb.recordset")
  80.  sql="select * from special order by id desc"
  81.  rs.open sql,conn,1,1
  82.  if rs.eof and rs.bof then
  83.   response.redirect "error1.asp?err_on=5"
  84.  else
  85.       %>
  86.   <table width="95%" border="0" cellpadding="2" cellspacing="1" class="border">
  87. <%do while pos<(page-1)*10                                 
  88. pos=pos+1                                 
  89. rs.moveNext                                 
  90. loop%>                                 
  91. <%x=0%>                                
  92. <%do while x<10 and not rs.eof%>
  93.     <tr class="tdbg"> 
  94.       <td width="50"><div align="center"><%=rs("id")%></div></td>
  95.       <td width="350"><%=rs("special")%></td>
  96.       <td width="50"><a href=special_edit.asp?id=<%=rs("id")%>><div align="center">修改</div></a></td>
  97.       <td width="50"><a href=special_del.asp?id=<%=rs("id")%>><div align="center">删除</div></a></td>
  98.     </tr>
  99. <% 
  100. x=x+1                                
  101. rs.movenext                                
  102. loop
  103. rs.close
  104. set rs=nothing
  105. end if
  106. conn.close
  107. set conn=nothing
  108. %>
  109.   </table>
  110.   <p>&nbsp;</p>
  111. </div>
  112. </body>
  113. </html>