⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 empmain_basesearch_process.asp

📁 好用的管理,代码程序 好用的管理,代码程序
💻 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) = "F_EClerk"  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) = "F_CompanyName" or arysearchFields(i) = "F_Tel"  then
     stroprate  = " like "
     arysearchvalues(i) = " '%"&arysearchvalues(i)&"%' "
	 elseif   arysearchFields(i) = "F_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 F_Id FROM T_Client where " & searchCondition
else
search.Source = "SELECT distinct F_Id FROM T_Client where  F_EClerk='"&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("F_Id") & ","
search.movenext
wend
%>
<%
url = orgUrl & "?IDstring=" &  IDstring
response.Redirect(url)
response.end 
%>
<html>
<head>
<title></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 + -