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

家庭/个人应用

开发平台:

ASP/ASPX

  1. <!--#include file="articleconn.asp"-->
  2. <!--#include file="security.asp"-->
  3. <!--#include file="../checkpost.asp"-->
  4. <%if session("flag")>1 then
  5.     response.write "<script>alert('您的操作权限不够!');history.back();</script>"
  6.     response.end
  7. end if
  8. %>
  9. <html>
  10. <head>
  11. <meta http-equiv="Content-Language" content="zh-cn">
  12. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  13. <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
  14. <meta name="ProgId" content="FrontPage.Editor.Document">
  15. <link rel="stylesheet" href="inc/Admin_STYLE.CSS" type="text/css">
  16. <title></title>
  17. <style type="text/css">
  18. <!--
  19. .样式1 {color: #FFFFFF}
  20. -->
  21. </style>
  22. </head>
  23. <script language="javascript">
  24. function popwin2(id,path)
  25. { window.open("openarticle.asp?id="+id+"&ppath="+path,"","height=500,width=600,resizable=yes,scrollbars=yes,status=yes,toolbar=yes,menubar=yes,location=yes");
  26. }
  27. </script>
  28. <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  29. <!--#include file="top1.asp"-->
  30. <br>
  31. <div align="center"> 
  32.  <%  if request("name23")="" then
  33.  sql="select articleid,title,dateandtime,review from learning where reviewcount<>0 order by dateandtime desc" 
  34.  else 
  35.   sql="select articleid,title,dateandtime,review from learning where title like  '%"&request("name23")&"%' order by dateandtime desc" 
  36.   end if
  37. Set rs= Server.CreateObject("ADODB.Recordset") 
  38. rs.open sql,conn,1,1 
  39.   if rs.eof and rs.bof then 
  40.        response.write "<p align='center'><br><br>还 没 有 任 何 文 章!</p>" 
  41.    else 
  42.   totalPut=rs.recordcount 
  43.       totalPut=rs.recordcount 
  44.       if currentpage<1 then 
  45.           currentpage=1 
  46.       end if 
  47.       if (currentpage-1)*MaxPerPage>totalput then 
  48.    if (totalPut mod MaxPerPage)=0 then 
  49.      currentpage= totalPut  MaxPerPage 
  50.    else 
  51.       currentpage= totalPut  MaxPerPage + 1 
  52.    end if 
  53.  
  54.       end if 
  55.        if currentPage=1 then 
  56.            showpage totalput,MaxPerPage,"managebbs01.asp" 
  57.             showContent 
  58.             showpage totalput,MaxPerPage,"managebbs01.asp" 
  59.        else 
  60.           if (currentPage-1)*MaxPerPage<totalPut then 
  61.             rs.move  (currentPage-1)*MaxPerPage 
  62.             dim bookmark 
  63.             bookmark=rs.bookmark 
  64.            showpage totalput,MaxPerPage,"managebbs01.asp" 
  65.             showContent 
  66.              showpage totalput,MaxPerPage,"managebbs01.asp" 
  67.         else 
  68.         currentPage=1 
  69.            showpage totalput,MaxPerPage,"managebbs01.asp" 
  70.            showContent 
  71.            showpage totalput,MaxPerPage,"managebbs01.asp" 
  72.       end if 
  73.    end if 
  74.    end if  
  75.  
  76.    sub showContent 
  77.        dim i 
  78.    i=0 
  79.  
  80.   %>
  81.   <table width="100%" border="0" cellspacing="0" cellpadding="0">
  82.     <form method="POST" action="managebbs01.asp">
  83.     <tr>
  84.       <td><div align="center"><b>按电影名查询</b>
  85.           <input type="text" name="name23" size="20">
  86.           <input name="submit" type="submit" value="查询">
  87.           &nbsp;&nbsp;<a href="managebbs.asp"><b>显示所有电影</b></a>  </div></td>
  88.     </tr>
  89.   </table>
  90. </div>
  91. <center>
  92.   <center>
  93.   </center>
  94.   <table border="0" cellspacing="1" width="100%" class="border" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="2" height="47" style="border-collapse: collapse" bordercolor="#111111">
  95.     <tr bgcolor="#429AEF">
  96.       <td width="136" height="20"><div align="center" class="样式1"><strong>ID号</strong></div></td>
  97.       <td height="20"><div align="center" class="样式1"><strong>电影名称</strong></div></td>
  98.       <td height="20"><div align="center" class="样式1"><strong>修改</strong></div></td>
  99.       <td width="261" height="20"><div align="center" class="样式1"><strong>删除</strong></div></td>
  100.     </tr>
  101.    <%do while not rs.eof%>
  102.     <tr> 
  103.       <td height="12" class="tdbg"> <div align="center"><%=rs("articleid")%></div></td>
  104.       <td width="416" height="12" class="tdbg">·<a href="../re.asp?id=<%=rs("articleid")%>" target="_blank"><%=rs("title")%> 相关评论</a></td>
  105.       <td width="173" height="12" class="tdbg"><div align="center"><a target="_blank" href="editbbs.asp?id=<%=rs("articleid")%>">修改</a></div></td>
  106.       <td height="12" class="tdbg"> <p align="center">  
  107.           </a><a href="deletebbs.asp?articleid=<%=rs("articleid")%>"><font color="#000000">删除</font></a></td>
  108.     </tr>
  109.  <% i=i+1 
  110.       if i>=20 then exit do 
  111.       rs.movenext 
  112.    loop 
  113.   %>
  114.   </table>
  115.   <%
  116. end sub 
  117. function showpage(totalnumber,maxperpage,filename)
  118. dim n
  119. if totalnumber mod maxperpage=0 then
  120. n= totalnumber  maxperpage
  121. else
  122. n= totalnumber  maxperpage+1
  123. end if
  124. %>
  125.   <table border="0" bgcolor="#FFFFFF" cellspacing="0" height="25" width="100%">
  126.     <form method=Post action="<%=filename%>?typeid=<%=typeid%>">
  127.       <tr>
  128.         <td>
  129.           <center>
  130.             共有<font color="#ff0000"><b><%=totalnumber%></b></font>部&nbsp;&nbsp;&nbsp;当前:第<strong><font color="#ff0000"><%=CurrentPage%></font></strong>页/共<strong><font color="#ff0000"><%=n%></font></strong>页
  131.           </center>
  132.         <td><div>
  133.             <%if CurrentPage<2 then%>
  134.             <font color='888888'>首页&nbsp;上一页</font>&nbsp;&nbsp;&nbsp;
  135.             <%else%>
  136.             <a class=left href="<%=filename%>?typeid=<%=typeid%>&page=1&">首页</a>&nbsp; <a class=left href="<%=filename%>?typeid=<%=typeid%>&page=<%=CurrentPage-1%>">上一页</a>&nbsp;&nbsp;&nbsp;
  137.             <%
  138. end if
  139. if n-currentpage<1 then
  140. %>
  141.             <font color='888888'>下一页&nbsp;尾页</font>&nbsp;&nbsp;&nbsp;
  142.             <%else%>
  143.             <a class=left href="<%=filename%>?typeid=<%=typeid%>&page=<%=(CurrentPage+1)%>">下一页</a>&nbsp; <a class=left href="<%=filename%>?typeid=<%=typeid%>&page=<%=n%>">尾页</a>&nbsp;
  144.             <%end if%>
  145.           </div>
  146.         <td align="center">&nbsp;</td>
  147.       </tr>
  148.     </form>
  149. <% 
  150. end function
  151. %>
  152. <%
  153. sub gotopage
  154. end sub
  155. %>
  156.   </table>
  157. </center>
  158. <%rs.close          
  159.    set rs=nothing   
  160.    conn.close 
  161.    set conn=nothing %>
  162. </body>
  163. </html>