?? empmain_basesearch_process.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/EmpMain.asp" -->
<!--#include file="EmpMain_CheckRight.asp"-->
<%
dim arysearchFields
dim arysearchvalues
arysearchFields = split(request.form("searchFields"),",")
arysearchvalues = split(request.form("searchValues"),",")
orgUrl = "empmain_list_search.asp"
SearchLogic=" and "
searchCondition = ""
isadmin=""
for i = 1 to Ubound(arysearchFields)
if arysearchFields(i) = "錄入人" then
if fncheckupart(1)=true or fncheckupart(2)=true or fncheckupart(3)=true then
arysearchvalues(i)=arysearchvalues(i)
isadmin=false
else
arysearchvalues(i)=session("name")
isadmin=true
end if
end if
if arysearchFields(i) = "公司名稱" or arysearchFields(i) = "手 機" then
stroprate = " like "
arysearchvalues(i) = " '%"&arysearchvalues(i)&"%' "
elseif arysearchFields(i) = "redate" then
stroprate = " >= "
arysearchvalues(i) = " #"&arysearchvalues(i)&"# "
else
stroprate = " = "
arysearchvalues(i) = "'" & arysearchvalues(i) & "'"
end if
if not i = Ubound(arysearchFields) then
searchCondition = searchCondition & arysearchFields(i) & stroprate & arysearchvalues(i)&SearchLogic
else
searchCondition = searchCondition & arysearchFields(i) & stroprate &arysearchvalues(i)
end if
next
%>
<%
Dim search
Dim search_numRows
Set search = Server.CreateObject("ADODB.Recordset")
search.ActiveConnection = MM_EmpMain_STRING
if isadmin=false then
search.Source = "SELECT distinct ID FROM kufu where " & searchCondition
else
search.Source = "SELECT distinct ID FROM kufu where 錄入人='"&session("name")&"' and " & searchCondition
end if
search.CursorType = 0
search.CursorLocation = 2
search.LockType = 1
search.Open()
search_numRows = 0
IDstring = ""
while not search.eof
IDstring = IDstring & search("ID") & ","
search.movenext
wend
%>
<%
url = orgUrl & "?IDstring=" & IDstring
response.Redirect(url)
response.end
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
</body>
</html>
<%
search.Close()
Set search = Nothing
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -