List.asp
资源名称:NetPhone.rar [点击查看]
上传用户:xxtaishan
上传日期:2022-01-02
资源大小:4063k
文件大小:7k
源码类别:
IP电话/视频会议
开发平台:
ASP/ASPX
- <!--#include file="../../inc/conn.asp"-->
- <!--#include file="../../inc/func.asp"-->
- <html>
- <head>
- <title>信息列表</title>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <LINK REL="stylesheet" HREF="../images/style.css" TYPE="text/css"> <style type="text/css">
- <!--
- .style1 {
- color: #FFFFFF;
- font-weight: bold;
- }
- -->
- </style>
- </head>
- <body bgcolor="#FFFFFF" text="#000000">
- <%
- Dim query
- Dim classid
- Dim nclassid
- classid=request("classid")
- nclassid=request("nclassid")
- Dim sql
- sql=" where 1=1 "
- Dim key
- key = request("key")
- if key<>"" then
- sql=sql&" and title like '%"&key&"%' "
- query=query&"key="&key&"&"
- end if
- sql=" select * from info3 "&sql&" order by id desc "
- Dim rs
- Set rs=Server.CreateObject("ADODB.RecordSet")
- rs.open sql,conn,1,1
- Dim page,i
- if request("page")="" then
- page=1
- else
- page=clng(request("page"))
- end if
- i=0
- rs.pagesize=15
- if page<1 then page=1
- if page>rs.pagecount then page=rs.pagecount
- if rs.pagecount>0 then rs.absolutepage=page
- %>
- <form name="form1" method="post"><table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td>信息列表:
- <%if classid<>"" then response.write classname(classid)%>
- <%if nclassid<>"" then response.write " - "&nclassname(nclassid)%>
- </td>
- </tr>
- </table>
- <table width="100%" border="1" cellspacing="0" cellpadding="2" align="center" bordercolordark="#ffffff" bordercolorlight="#000000">
- <tr bgcolor="#23458B">
- <td width="32" height="25"> </td>
- <td width="183" height="25">
- <div align="center"><span class="style1">标题</span></div> </td>
- <td width="288"><div align="center"><span class="style1">地址</span></div></td>
- <td width="164"><div align="center"><span class="style1">电话</span></div></td>
- <td width="142" height="25">
- <div align="center"><span class="style1">添加日期</span></div> </td>
- <td width="148" height="25">
- <div align="center"><span class="style1">管理操作</span></div> </td>
- </tr>
- <%
- if rs.eof then
- response.write "<tr><td colspan='6'><font color='red'>系统中还没有录入相关任何信息!</font></td></tr>"
- else
- Do while not rs.eof and i<rs.pagesize
- if i mod 2<>0 then
- bgc="#d8e4f1"
- else
- bgc="#ffffff"
- end if
- %>
- <tr bgcolor=<%=bgc%> onMouseOut=this.style.backgroundColor='<%=bgc%>' onMouseOver=this.style.backgroundColor='#F1FBEC'>
- <td width="32" height="25">
- <div align="center">
- <input type="checkbox" id="checkbox" value="<%=rs("id")%>" name="checkbox" onClick="chkclick();">
- </div> </td>
- <td width="183" height="25"><a href="List_Edit.asp?checkbox=<%=rs("id")%>"><%=replace(rs("title"),key,"<font color=red>"&key&"</font>")%></a></td>
- <td width="288" height="25"><%=rs("title2")%></td>
- <td width="164" height="25"><%=rs("title4")%></td>
- <td width="142" height="25">
- <div align="center"><%=rs("postdate")%></div> </td>
- <td width="148" height="25">
- <div align="center"><a href="List_Edit.asp?checkbox=<%=rs("id")%>">修改</a>
- | <a href="List_add1.asp?checkbox=<%=rs("id")%>">消费</a></div> </td>
- </tr>
- <%
- rs.MoveNext
- i=i+1
- Loop
- end if
- %>
- </table>
- <table width="100%" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr> <td width="23%"> <input type=checkbox name='chkall' onClick='chooseall(document.form1.checkbox,this);'>
- 全选 <input type=checkbox name='chkl' onClick='choosefalse(document.form1.checkbox,this);'>
- 反选 </td><td width="77%"> <div align="right"> 共 <%=rs.recordcount%> 条 页 次 <%=page%>/<%=rs.pagecount%> <a href="?<%=query%>page=1">首页</a>
- <%if rs.pagecount>1 then
- if page=1 then%>
- | 上页 | <a href="?<%=query%>page=<%=(page+1)%>"> 下页</a>
- <%else
- if page=rs.pagecount then%>
- <a href="?<%=query%>page=<%=(page-1)%>">上页</a> | 下页
- <%else%>
- | <a href="?<%=query%>page=<%=(page-1)%>">上页</a> | <a href="?<%=query%>page=<%=(page+1)%>"> 下页</a>
- <%end if%>
- <%end if%>
- <%end if%>
- | <a href="?<%=query%>page=<%=rs.pagecount%>"> 尾页</a> 第
- <select name="sel_page" onChange="javascript:location=this.options[this.selectedIndex].value;">
- <%
- for i = 1 to rs.PageCount
- if i = page then%>
- <option value="?<%=query%>page=<%=i%>" selected><%=i%></option>
- <%else%>
- <option value="?<%=query%>page=<%=i%>"><%=i%></option>
- <%
- end if
- next
- %>
- </select>
- 页</div></td></tr> </table></form>
- <%
- set rs=conn.execute("select * from nclass")
- %>
- <script language = "JavaScript">
- var onecount;
- onecount=0;
- subcat = new Array();
- <%
- dim count
- count=0
- do while not rs.eof
- if count=0 then
- %>
- subcat[0] = new Array("--请选择类别--","<%= trim(rs("classid"))%>","");
- <%
- count = count + 1
- end if
- %>
- subcat[<%=count%>] = new Array("<%= trim(rs("nclassname"))%>","<%= trim(rs("classid"))%>","<%= trim(rs("id"))%>");
- <%
- count = count + 1
- rs.movenext
- loop
- rs.close
- %>
- onecount=<%=count%>;
- function changelocation(locationid)
- {
- document.form2.nclassid.length = 0;
- var locationid=locationid;
- var i;
- for (i=0;i < onecount; i++)
- {
- if (subcat[i][1] == locationid)
- {
- document.form2.nclassid.options[document.form2.nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
- }
- }
- }
- </script>
- <table width="100%" border="0" cellspacing="0" cellpadding="1">
- <tr> <td WIDTH="35%"> <input type="button" value="刷新" onClick="history.go(0);" name="button2">
- <INPUT TYPE="button" NAME="Submit" VALUE="全部" onClick="location.href='?';">
- <input name="add" type="button" id="add" onClick="record_add();" value="添加">
- <input type="button" value="修改" onClick="record_edit();" name="edit" disabled>
- <input type="button" value="删除" onClick="record_del();" name="del" disabled>
- </td>
- <form name="form2" method="post" action="?"><td WIDTH="65%">
- <input type="text" name="key">
- <input type="submit" name="Submit2" value="查询">
- <script>
- function frmchk2()
- {
- if(form2.classid.value=='')
- {
- alert('系统提示:请先选择大类!');
- return false;
- }
- }
- function DelGood(x)
- {
- if(confirm('确认删除选择的记录?'))
- {
- window.location.href = "List_Del.asp?operation=del&checkbox=" + x;
- }
- }
- </script>
-
- </td>
- </form>
- </tr>
- </table>
- <script src="List_Use.js"></script>
- </body>
- </html>
- <%
- call COCLS
- %>