xw_bh.asp
上传用户:xxtaishan
上传日期:2022-01-02
资源大小:4063k
文件大小:3k
源码类别:

IP电话/视频会议

开发平台:

ASP/ASPX

  1. <%
  2. if request("id")="" then
  3. %>
  4. <link href="css/css.css" rel="stylesheet" type="text/css" />
  5. <table width="500" height="249"  border="0" align="center" cellpadding="0" cellspacing="0">
  6.   <%
  7. Dim sql
  8. sql=" select * from info where wz='a'  order by id desc "
  9. Dim rs
  10. Set rs=Server.CreateObject("ADODB.RecordSet")
  11. rs.open sql,conn,1,1
  12. Dim page,i
  13. if request("page")="" then
  14. page=1
  15. else
  16. page=clng(request("page"))
  17. end if
  18. i=0
  19. rs.pagesize=10
  20. if page<1 then page=1
  21. if page>rs.pagecount then page=rs.pagecount 
  22. if rs.pagecount>0 then rs.absolutepage=page
  23. %>
  24.   <tr>
  25.     <td width="446" valign="top"></p>
  26.         <table width="500"  border="0" align="center" cellpadding="0" cellspacing="0">
  27.           <%
  28. if rs.eof then
  29. response.write "<tr><td colspan='2'><font color='red'>系统中还没有录入任何信息!</font></td></tr>"
  30. else
  31. Do while not rs.eof and i<rs.pagesize
  32. %>
  33.           <tr class="font8">
  34.             <td width="56" height="30"><div align="center" class="blue">·</div></td>
  35.             <td width="425" height="15"><div align="left"><a href="?id=<%=rs("id")%>" target="_blank"  class="main3"><%=left(rs("title"),25)%></a></div></td>
  36.             <td width="108" class="style1eng"><%=rs("postdate")%></td>
  37.           </tr>
  38.           <tr>
  39.             <td height="1" colspan="3" background="images/x1.gif"></td>
  40.           </tr>
  41.           <%
  42. rs.MoveNext
  43. i=i+1
  44. Loop
  45. end if
  46. %>
  47.       </table>
  48.       <br />
  49.         <table width="86%" height="33"  border="0" align="center" cellpadding="0" cellspacing="0" class="style1">
  50.           <tr>
  51.             <td><span  class="font8">共 <%=rs.recordcount%> 条  <%=page%>/<%=rs.pagecount%> 页 <a href="?PAGE=1"  class="main2">首 页</a>
  52.                   <%if rs.pagecount>1 then 
  53.      if page=1 then%>
  54.               | 上一页 | <a href="?PAGE=<%=(page+1)%>"  class="main3">下一页</a>
  55.               <%else
  56.       if page=rs.pagecount then%>
  57.               <a href="?PAGE=<%=(page-1)%>"  class="main1">上一页</a> | 下一页
  58.               <%else%>
  59.               | <a href="?PAGE=<%=(page-1)%>"  class="main3">上一页</a> | <a href="?PAGE=<%=(page+1)%>"  class="main3"> 下一页</a>
  60.               <%end if%>
  61.               <%end if%>
  62.               <%end if%>
  63.               | <a href="?PAGE=<%=rs.pagecount%>"  class="main2"> 尾 页</a> 第</span>
  64.                 <select name="sel_page" onchange="javascript:location=this.options[this.selectedIndex].value;">
  65.                   <%
  66.        for i = 1 to rs.PageCount
  67.        if i = page then%>
  68.                   <option value="?PAGE=<%=i%>" selected="selected"><%=i%></option>
  69.                   <%else%>
  70.                   <option value="?PAGE=<%=i%>"><%=i%></option>
  71.                   <%
  72.           end if
  73.         next
  74.         %>
  75.                 </select>              页</td>
  76.           </tr>
  77.       </table></td>
  78.   </tr>
  79. </table>
  80. <%
  81. else
  82. %>
  83. <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" class="style1">
  84.   <%
  85. sqlcp="select * from info where id="&request("ID")
  86. Set rscp=Server.CreateObject("ADODB.RecordSet")
  87. rscp.open sqlcp,conn,1,1
  88. %>
  89.   <tr>
  90.     <td><div align="center">
  91.       <p><strong><%=rscp("title")%></strong><br />
  92.           <%=rscp("postdate")%>
  93.       <div align="left"><%=rscp("content")%></div>
  94.     </div></td>
  95.   </tr>
  96.   <%
  97. rscp.close
  98. set rscp=nothing
  99. %>
  100. </table>
  101. <%end if%>