List.asp
资源名称:NetPhone.rar [点击查看]
上传用户:xxtaishan
上传日期:2022-01-02
资源大小:4063k
文件大小:8k
源码类别:
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
- if classid<>"" then
- sql=sql&" and classid="&classid&" "
- query=query&"classid="&classid&"&"
- end if
- if nclassid<>"" then
- sql=sql&" and nclassid="&nclassid&" "
- query=query&"nclassid="&nclassid&"&"
- end if
- sql=" select * from product1 "&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="20" height="25"> </td>
- <td width="61"><div align="center"><span class="style1">产品序号</span></div></td>
- <td width="197" height="25">
- <div align="center"><span class="style1">产品名称</span></div> </td>
- <td width="130" height="25">
- <div align="center"><font color="#FFFFFF"><b><font color="#FFFFFF">大类</font></b></font></div> </td>
- <td width="115" height="25">
- <div align="center"><b><font color="#FFFFFF"><b>小类</b></font></b></div> </td>
- <td width="113" height="25">
- <div align="center"><span class="style1">添加日期</span></div> </td>
- <td width="107" 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="20" height="25">
- <div align="center">
- <input type="checkbox" id="checkbox" value="<%=rs("id")%>" name="checkbox" onClick="chkclick();">
- </div> </td>
- <td width="61" height="25"><div align="center"><b><%=rs("id")%></b></div></td>
- <td width="197" height="25"><a href="List_Edit.asp?checkbox=<%=rs("id")%>"><%=replace(rs("title"),key,"<font color=red>"&key&"</font>")%></a>
- <%IF RS("pic")<>"" THEN%>
- <img src="../images/img.gif" align="absmiddle">
- <%END IF%> </td>
- <td width="130" height="25">
- <div align="center"> <b><%=classname(rs("classid"))%></b> </div> </td>
- <td width="115" height="25">
- <div align="center"><%=nclassname(rs("nclassid"))%> </div> </td>
- <td width="113" height="25">
- <div align="center"><%=rs("postdate")%></div> </td>
- <td width="107" height="25">
- <div align="center"><a href="List_Edit.asp?checkbox=<%=rs("id")%>">修改</a>
- | <a href="#" onClick="DelGood('<%=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%"><%
- set rs=conn.execute("select * from class")
- if not rs.eof then
- %>
- 一类:
- <select style="width:120px;" name="classid" onChange="changelocation(document.form2.classid.options[document.form2.classid.selectedIndex].value)">
- <option value="">--请选择类别--</option>
- <option value="<%=trim(rs("id"))%>"><%=trim(rs("classname"))%></option>
- <%
- dim selclass
- selclass=rs("id")
- rs.movenext
- %>
- <%do while not rs.eof%>
- <option value="<%=rs("id")%>"><%=rs("classname")%></option>
- <%rs.movenext
- loop
- rs.close
- %>
- </select>
- 二类:
- <select style="width:120px;" name="nclassid">
- <%
- sql="select * from nclass where classid="&selclass
- set rs=conn.execute(sql)
- if not(rs.eof and rs.bof) then
- %>
- <option value="">--请选择类别--</option>
- <%
- do while not rs.eof%>
- <option value="<%=rs("id")%>"><%=rs("nclassname")%></option>
- <% rs.movenext
- loop
- end if
- rs.close
- %>
- </select>
- <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>
- <%end if%>
-
- </td>
- </form>
- </tr>
- </table>
- <script src="List_Use.js"></script>
- </body>
- </html>
- <%
- call COCLS
- %>