📄 pcfilter.asp
字号:
<%
Option Explicit
Response.Buffer = True
Response.Expires = 0
%>
<!--#include file="pcdb.asp"-->
<%
Dim filetablelist ' list file name
Dim filetableedit ' edit file name
Dim filetablefilter ' filter file name
Dim tablename ' current table name
Dim RS ' Recordset object
Dim strSQL ' SQL query string
Dim action ' Form Action
dim txtFilter ' Filter
filetablelist="pc.asp" '当前列表文件名
filetableedit="pcedit.asp" '当前编辑文件名
filetablefilter="pcfilter.asp" '当前过滤文件名
tablename="pc" '当前的数据表的名称
' 设定当前表名 , tablename变量是当前的数据表的名称
if Request.QueryString("table")<>"" then
tablename=Request.QueryString("table")
else
if IsEmpty(tablename) then
tablename="pc"
end if
end if
if Request.QueryString("title")<>null or Request.QueryString("title")<>"" then
session("title")=Request.QueryString("title")
end if
if request.form("filter") = "start" then
txtFilter=""
if Request.Form("编号") <> "" then txtFilter = txtFilter + " 编号 like '%" + Request.Form("编号") + "%' and"
if Request.Form("部门") <> "" then txtFilter = txtFilter + " 部门 like '%" + Request.Form("部门") + "%' and"
if Request.Form("使用人") <> "" then txtFilter = txtFilter + " 使用人 like '%" + Request.Form("使用人") + "%' and"
if Request.Form("CPU") <> "" then txtFilter = txtFilter + " CPU like '%" + Request.Form("CPU") + "%' and"
if Request.Form("显示器") <> "" then txtFilter = txtFilter + " 显示器 like '%" + Request.Form("显示器") + "%' and"
if Request.Form("硬盘") <> "" then txtFilter = txtFilter + " 硬盘 like '%" + Request.Form("硬盘") + "%' and"
if Request.Form("光驱") <> "" then txtFilter = txtFilter + " 光驱 like '%" + Request.Form("光驱") + "%' and"
if Request.Form("主板") <> "" then txtFilter = txtFilter + " 主板 like '%" + Request.Form("主板") + "%' and"
if Request.Form("内存") <> "" then txtFilter = txtFilter + " 内存 like '%" + Request.Form("内存") + "%' and"
if Request.Form("声卡") <> "" then txtFilter = txtFilter + " 声卡 like '%" + Request.Form("声卡") + "%' and"
if Request.Form("音箱") <> "" then txtFilter = txtFilter + " 音箱 like '%" + Request.Form("音箱") + "%' and"
if Request.Form("网卡") <> "" then txtFilter = txtFilter + " 网卡 like '%" + Request.Form("网卡") + "%' and"
if Request.Form("锁号") <> "" then txtFilter = txtFilter + " 锁号 like '%" + Request.Form("锁号") + "%' and"
if Request.Form("其他设备") <> "" then txtFilter = txtFilter + " 其他设备 like '%" + Request.Form("其他设备") + "%' and"
if Request.Form("实价") <> "" then txtFilter = txtFilter + " 实价 like '%" + Request.Form("实价") + "%' and"
if Request.Form("采购时间") <> "" then txtFilter = txtFilter + " 采购时间 like '%" + Request.Form("采购时间") + "%' and"
if Request.Form("供应商") <> "" then txtFilter = txtFilter + " 供应商 like '%" + Request.Form("供应商") + "%' and"
if Request.Form("保修期") <> "" then txtFilter = txtFilter + " 保修期 like '%" + Request.Form("保修期") + "%' and"
if Request.Form("录入时间") <> "" then txtFilter = txtFilter + " 录入时间 like '%" + Request.Form("录入时间") + "%' and"
if Request.Form("设备状态") <> "" then txtFilter = txtFilter + " 设备状态 like '%" + Request.Form("设备状态") + "%' and"
if Request.Form("IP地址") <> "" then txtFilter = txtFilter + " IP地址 like '%" + Request.Form("IP地址") + "%' and"
if Request.Form("备注") <> "" then txtFilter = txtFilter + " 备注 like '%" + Request.Form("备注") + "%' and"
if (right(trim(txtFilter),3)="and") then txtFilter= left(trim(txtFilter),len(trim(txtFilter))-3)
Session ("namefilter") = txtFilter
response.redirect filetablelist&"?table="&tablename&"&row="&(Session("row")+1)
else
%>
<html>
<head>
<title>查询条件录入 </title>
</head>
<BODY bgcolor="White" text="#000000" style="margin-left:3px;margin-top: 3px" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" link="#0072E3" vlink="#0072E3" >
<!--#include file="pctop.asp"-->
<!-- 页头信息开始 -->
<form name="frmFilter" method="post" action="<% =filetablefilter%>?table=<% =tablename%>">
<input type="hidden" name="action">
<table bgcolor="#FFFFFD" style="color:#42428F" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr style="font-size:9pt">
<td><a
href="javascript:document.frmFilter.submit();">提交</a>│<a
href="javascript:document.frmFilter.reset();">取消</a>│<a
href="javascript:history.go(-1);">返回</a>│
</td>
</tr>
</table>
<!-- 页头信息结束 -->
<input type="hidden" name="filter" value="start"><BR>
<table CELLSPACING="0" CELLPADDING="2" BORDER="0">
<tr style="font-size:9pt"><td>编号</td><td colspan=4><input name='编号' type=text></td></tr>
<tr style="font-size:9pt"><td>部门</td><td colspan=4><input name='部门' type=text></td></tr>
<tr style="font-size:9pt"><td>使用人</td><td colspan=4><input name='使用人' type=text></td></tr>
<tr style="font-size:9pt"><td>CPU</td><td colspan=4><input name='CPU' type=text></td></tr>
<tr style="font-size:9pt"><td>显示器</td><td colspan=4><input name='显示器' type=text></td></tr>
<tr style="font-size:9pt"><td>硬盘</td><td colspan=4><input name='硬盘' type=text></td></tr>
<tr style="font-size:9pt"><td>光驱</td><td colspan=4><input name='光驱' type=text></td></tr>
<tr style="font-size:9pt"><td>主板</td><td colspan=4><input name='主板' type=text></td></tr>
<tr style="font-size:9pt"><td>内存</td><td colspan=4><input name='内存' type=text></td></tr>
<tr style="font-size:9pt"><td>声卡</td><td colspan=4><input name='声卡' type=text></td></tr>
<tr style="font-size:9pt"><td>音箱</td><td colspan=4><input name='音箱' type=text></td></tr>
<tr style="font-size:9pt"><td>网卡</td><td colspan=4><input name='网卡' type=text></td></tr>
<tr style="font-size:9pt"><td>锁号</td><td colspan=4><input name='锁号' type=text></td></tr>
<tr style="font-size:9pt"><td>其他设备</td><td colspan=4><input name='其他设备' type=text></td></tr>
<tr style="font-size:9pt"><td>实价</td><td colspan=4><input name='实价' type=text></td></tr>
<tr style="font-size:9pt"><td>采购时间</td><td colspan=4><input name='采购时间' type=text></td></tr>
<tr style="font-size:9pt"><td>供应商</td><td colspan=4><input name='供应商' type=text></td></tr>
<tr style="font-size:9pt"><td>保修期</td><td colspan=4><input name='保修期' type=text></td></tr>
<tr style="font-size:9pt"><td>录入时间</td><td colspan=4><input name='录入时间' type=text></td></tr>
<tr style="font-size:9pt"><td>设备状态</td><td colspan=4><input name='设备状态' type=text></td></tr>
<tr style="font-size:9pt"><td>IP地址</td><td colspan=4><input name='IP地址' type=text></td></tr>
<tr style="font-size:9pt"><td>备注</td><td colspan=4><input name='备注' type=text></td></tr>
</table>
</form>
</body>
</html>
<%
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -