?? 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 + -