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

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 info3 "&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="32" height="25">&nbsp; </td>
  58.       <td width="183" height="25"> 
  59.         <div align="center"><span class="style1">标题</span></div>      </td>
  60.       <td width="288"><div align="center"><span class="style1">地址</span></div></td>
  61.       <td width="164"><div align="center"><span class="style1">电话</span></div></td>
  62.       <td width="142" height="25"> 
  63.         <div align="center"><span class="style1">添加日期</span></div>      </td>
  64.       <td width="148" height="25"> 
  65.         <div align="center"><span class="style1">管理操作</span></div>      </td>
  66.     </tr>
  67.     <%
  68. if rs.eof then
  69. response.write "<tr><td colspan='6'><font color='red'>系统中还没有录入相关任何信息!</font></td></tr>"
  70. else
  71. Do while not rs.eof and i<rs.pagesize
  72. if i mod 2<>0 then
  73. bgc="#d8e4f1"
  74. else
  75. bgc="#ffffff"
  76. end if
  77. %>
  78.     <tr bgcolor=<%=bgc%> onMouseOut=this.style.backgroundColor='<%=bgc%>' onMouseOver=this.style.backgroundColor='#F1FBEC'> 
  79.       <td width="32" height="25"> 
  80.         <div align="center"> 
  81.           <input type="checkbox" id="checkbox" value="<%=rs("id")%>" name="checkbox" onClick="chkclick();">
  82.         </div>      </td>
  83.       <td width="183" height="25"><a href="List_Edit.asp?checkbox=<%=rs("id")%>"><%=replace(rs("title"),key,"<font color=red>"&key&"</font>")%></a></td>
  84.       <td width="288" height="25"><%=rs("title2")%></td>
  85.       <td width="164" height="25"><%=rs("title4")%></td>
  86.       <td width="142" height="25"> 
  87.         <div align="center"><%=rs("postdate")%></div>      </td>
  88.       <td width="148" height="25"> 
  89.         <div align="center"><a href="List_Edit.asp?checkbox=<%=rs("id")%>">修改</a> 
  90.           |  <a href="List_add1.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 name="add" type="button" id="add" onClick="record_add();" value="添加">
  173.   <input type="button" value="修改" onClick="record_edit();" name="edit" disabled>
  174.   <input type="button" value="删除" onClick="record_del();" name="del" disabled>
  175.       </td>
  176.   <form name="form2" method="post" action="?"><td WIDTH="65%">
  177.       <input type="text" name="key">
  178.         <input type="submit" name="Submit2" value="查询">
  179. <script>
  180. function frmchk2()
  181. {
  182. if(form2.classid.value=='')
  183. {
  184. alert('系统提示:请先选择大类!');
  185. return false;
  186. }
  187. }
  188. function DelGood(x)
  189. {
  190. if(confirm('确认删除选择的记录?'))
  191. {
  192. window.location.href = "List_Del.asp?operation=del&checkbox=" + x;
  193. }
  194. }
  195. </script>
  196. &nbsp;
  197. </td>
  198.   </form>
  199. </tr> 
  200. </table>
  201. <script src="List_Use.js"></script> 
  202. </body>
  203. </html>
  204. <%
  205. call COCLS
  206. %>