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

IP电话/视频会议

开发平台:

ASP/ASPX

  1. <!--#include file="../../inc/conn.asp"-->
  2. <!--#include file="../../inc/func.asp"-->
  3. <html>
  4. <head>
  5. <title>信息列表</title>
  6. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  7. <LINK REL="stylesheet" HREF="../images/style.css" TYPE="text/css"> <style type="text/css">
  8. <!--
  9. .style1 {
  10. color: #FFFFFF;
  11. font-weight: bold;
  12. }
  13. -->
  14. </style>
  15. </head>
  16. <body bgcolor="#FFFFFF" text="#000000">
  17. <%
  18. Dim query
  19. Dim classid
  20. Dim nclassid
  21. classid=request("classid")
  22. nclassid=request("nclassid")
  23. Dim sql
  24. sql=" where 1=1 "
  25. Dim key
  26. key = request("key")
  27. if key<>"" then
  28. sql=sql&" and title like '%"&key&"%' "
  29. query=query&"key="&key&"&"
  30. end if
  31. sql=" select * from gslr "&sql&" order by id desc "
  32. Dim rs
  33. Set rs=Server.CreateObject("ADODB.RecordSet")
  34. rs.open sql,conn,1,1
  35. Dim page,i
  36. if request("page")="" then
  37. page=1
  38. else
  39. page=clng(request("page"))
  40. end if
  41. i=0
  42. rs.pagesize=15
  43. if page<1 then page=1
  44. if page>rs.pagecount then page=rs.pagecount 
  45. if rs.pagecount>0 then rs.absolutepage=page
  46. %> 
  47. <form name="form1" method="post"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
  48.   <tr>
  49.       <td>信息列表: 
  50.         <%if classid<>"" then response.write classname(classid)%>
  51.         <%if nclassid<>"" then response.write " - "&nclassname(nclassid)%>
  52.       </td>
  53.   </tr>
  54. </table>
  55.   <table width="100%" border="1" cellspacing="0" cellpadding="2" align="center" bordercolordark="#ffffff" bordercolorlight="#000000">
  56.     <tr bgcolor="#23458B"> 
  57.       <td width="20" height="25">&nbsp; </td>
  58.       <td width="48"><div align="center"><span class="style1">ID</span></div></td>
  59.       <td width="346" height="25"> 
  60.       <div align="center"><span class="style1">标题</span></div>      </td>
  61.       <td width="178" height="25"> 
  62.       <div align="center"><span class="style1">修改日期</span></div>      </td>
  63.       <td width="163" height="25"> 
  64.       <div align="center"><span class="style1">管理操作</span></div>      </td>
  65.     </tr>
  66.     <%
  67. if rs.eof then
  68. response.write "<tr><td colspan='6'><font color='red'>系统中还没有录入相关任何信息!</font></td></tr>"
  69. else
  70. Do while not rs.eof and i<rs.pagesize
  71. if i mod 2<>0 then
  72. bgc="#d8e4f1"
  73. else
  74. bgc="#ffffff"
  75. end if
  76. %>
  77.     <tr bgcolor=<%=bgc%> > 
  78.       <td width="20" height="25"> 
  79.         <div align="center"> 
  80.           <input type="checkbox" id="checkbox" value="<%=rs("id")%>" name="checkbox" onClick="chkclick();">
  81.       </div>      </td>
  82.       <td width="48" height="25"><div align="center"><%=rs("id")%></div></td>
  83.       <td width="346" height="25"><a href="List_Edit.asp?checkbox=<%=rs("id")%>"><%=replace(rs("title"),key,"<font color=red>"&key&"</font>")%></a> 
  84.         <%IF RS("pic")<>"" THEN%>
  85.         <img src="../images/img.gif" align="absmiddle"> 
  86.       <%END IF%>      </td>
  87.       <td width="178" height="25"> 
  88.       <div align="center"><%=rs("postdate")%></div>      </td>
  89.       <td width="163" height="25"> 
  90.         <div align="center"><a href="List_Edit.asp?checkbox=<%=rs("id")%>">修改</a><a href="List_del.asp?checkbox=<%=rs("id")%>">.</a></div></td>
  91.     </tr>
  92.     <%
  93. rs.MoveNext
  94. i=i+1
  95. Loop
  96. end if
  97. %>
  98.   </table>
  99.     <table width="100%" height="30" border="0" align="center" cellpadding="0" cellspacing="0"> 
  100. <tr> <td width="23%"> <input type=checkbox name='chkall' onClick='chooseall(document.form1.checkbox,this);'> 
  101. 全选 <input type=checkbox name='chkl' onClick='choosefalse(document.form1.checkbox,this);'> 
  102. 反选 </td><td width="77%"> <div align="right"> 共 <%=rs.recordcount%> 条 页 次 <%=page%>/<%=rs.pagecount%> <a href="?<%=query%>page=1">首页</a>
  103.     <%if rs.pagecount>1 then 
  104.      if page=1 then%>
  105. | 上页 | <a href="?<%=query%>page=<%=(page+1)%>"> 下页</a>
  106. <%else
  107.       if page=rs.pagecount then%>
  108. <a href="?<%=query%>page=<%=(page-1)%>">上页</a> | 下页
  109. <%else%>
  110. | <a href="?<%=query%>page=<%=(page-1)%>">上页</a> | <a href="?<%=query%>page=<%=(page+1)%>"> 下页</a>
  111. <%end if%>
  112. <%end if%>
  113. <%end if%>
  114. | <a href="?<%=query%>page=<%=rs.pagecount%>"> 尾页</a> 第
  115. <select name="sel_page" onChange="javascript:location=this.options[this.selectedIndex].value;">
  116.   <%
  117.        for i = 1 to rs.PageCount
  118.        if i = page then%>
  119.   <option value="?<%=query%>page=<%=i%>" selected><%=i%></option>
  120.   <%else%>
  121.   <option value="?<%=query%>page=<%=i%>"><%=i%></option>
  122.   <%
  123.           end if
  124.         next
  125.         %>
  126. </select>
  127. 页</div></td></tr> </table></form>
  128. <%
  129. set rs=conn.execute("select * from nclass")
  130. %>
  131. <script language = "JavaScript">
  132. var onecount;
  133. onecount=0;
  134. subcat = new Array();
  135. <%
  136. dim count
  137. count=0
  138. do while not rs.eof 
  139. if count=0 then
  140. %>
  141. subcat[0] = new Array("--请选择类别--","<%= trim(rs("classid"))%>","");
  142. <%
  143. count = count + 1
  144. end if
  145. %>
  146. subcat[<%=count%>] = new Array("<%= trim(rs("nclassname"))%>","<%= trim(rs("classid"))%>","<%= trim(rs("id"))%>");
  147. <%
  148. count = count + 1
  149. rs.movenext
  150. loop
  151. rs.close
  152. %>
  153. onecount=<%=count%>;
  154. function changelocation(locationid)
  155.     {
  156.     document.form2.nclassid.length = 0; 
  157.     var locationid=locationid;
  158.     var i;
  159.     for (i=0;i < onecount; i++)
  160.         {
  161.             if (subcat[i][1] == locationid)
  162.             { 
  163.                 document.form2.nclassid.options[document.form2.nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
  164.             }        
  165.         }
  166.         
  167.     } 
  168. </script>
  169. <table width="100%" border="0" cellspacing="0" cellpadding="1"> 
  170. <tr> <td WIDTH="35%"> <input type="button" value="刷新" onClick="history.go(0);" name="button2">
  171.       <INPUT TYPE="button" NAME="Submit" VALUE="全部" onClick="location.href='?';">
  172.       <input type="button" value="修改" onClick="record_edit();" name="edit" disabled></td>
  173. </tr> 
  174. </table>
  175. <script src="List_Use.js"></script> 
  176. </body>
  177. </html>
  178. <%
  179. call COCLS
  180. %>