📄 searchmgr.inc.bak
字号:
sTemp = sTemp & "<tr><td class=tdlist colspan=" & iCols & " align=right>" & _
Paginate(sFileName, sFormParams, sSortParams, iCurrentPage, iTotalPages) & _
" </td></tr>"
'------------------------------------------------
' return
'------------------------------------------------
TableRecords = sTemp
End Function
'***************************************************************************************************
' "<td class=tdlist width=100 title='" & sRuleDept & "' style=""cursor:hand"" >" & ToHtml(Bref(sRuleDept,25)) & " </td>" & _
'***************************************************************************************************
' Name : TableDetail
' Function : Table Show the Search records detail
' In : No
' Out : No
' Return : Table of record detail
' Comment : No
'
'---------------------------------------------------------------------------------------------------
Function TableDetail()
'-----------------------------------------------------
' declares
'-----------------------------------------------------
Dim sTemp : sTemp = "" ' 临时字符串变量
Dim j ' 临时循环变量
'-----------------------------------------------------
' Get Parameters
'-----------------------------------------------------
Dim id : id = GetParam("id")
If IsEmpty(id) Then
Exit Function
End If
'-----------------------------------------------------
' Connect to Database
'-----------------------------------------------------
Dim crs : set crs = New CRecordset
Dim sql : sql = "select * from t_rule_info where sn=" & ToSQL(id,"Number")
Dim rs : set rs = crs.open(dbLocal,sql)
Dim sRuleName,sRuleSN,sRuleStart,sRuleEnd,sRuleSet,sRuleDept,sRuleType
'-----------------------------------------------------
' show detail infomations
'-----------------------------------------------------
If Not rs.EOF Then
sRuleName = crs.GetValue("name")
sRuleSN = crs.GetValue("sn")
sRuleStart = crs.GetValue("starttime")
sRuleEnd = crs.GetValue("endtime")
sRuleSet = crs.GetValue("settime")
sRuleDept = crs.GetValue("dept")
sRuleType = crs.GetValue("type")
sTemp = sTemp & TableTitle("系统制度详细信息", 600, "", "") & _
"<table cellspacing=0 cellpadding=0 width=600 align=center >" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>制度名称</td><td class=tdlist width=500 title='" & sRuleName & "'> " & ToHtml(sRuleName) & " </td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>制定部门</td><td class=tdlist width=100 title='" & sRuleDept & "'>" & ToHtml(sRuleDept) & " </td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>制度类别</td><td class=tdlist width=100 title='" & sRuleType & "'> " & ToHtml(sRuleType) & " </td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>有效起始时间</td><td class=tdlist width=90 title='" & sRuleStart & "' >" & sRuleStart & " </td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>有效结束时间</td><td class=tdlist width=90 title='" & sRuleEnd & "' >" & sRuleEnd & " </td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>制定时间</td><td class=tdlist width=90 title='" & sRuleSet & "' >" & sRuleSet & " </td>" & _
"</tr>"
End If
sTemp = sTemp & "</table>"
crs.Close()
'--------------------------------
' return
'--------------------------------
TableDetail = sTemp
End Function
'***************************************************************************************************
'***************************************************************************************************
' Name : TableLink
' Function : Table Show the Search records detail
' In : No
' Out : No
' Return : Table of record detail
' Comment : No
'
'---------------------------------------------------------------------------------------------------
Function TableLink()
'-------------------------------------------------
' Declares
'-------------------------------------------------
Dim id : id = GetParam("id")
Dim path
Dim links
'--------------------------------------------------
' Connect to database
'--------------------------------------------------
dim crs : set crs = New CRecordset
dim sSQL : sSQL = "select path from T_Rule_Info where sn=" & ToSQL(id, "Number")
dim rs : set rs = crs.open(dbLocal,sSQL)
path = crs.GetValue("path")
crs.Close()
'--------------------------------------------------
' Construct the link string
'--------------------------------------------------
If IsEmpty(id) Then
'------------------------------------------
' hide the Browse and Upload links
'------------------------------------------
links = ""
Else
'------------------------------------------
' show the Browse and Upload links
'------------------------------------------
If path <> "" Then
links = links & " " & _
" <img src=""../images/goto.gif"" > <a href='" & path & "'>制度文件阅读</a>"
End If
End If
'--------------------------------------------------
' Return the table of links
'--------------------------------------------------
TableLink = _
"<table width=400 cellspacing=0 cellpadding=0 border=0 align=left>" & _
"<tr height=10>" & _
" <td width=600><img src=""../images/bg/line.gif"" width=400 height=3></td>" & _
"</tr>" & _
"<tr height=20 align=left>" & _
" <td width=400 align=left> " & _
" <img src=""../images/goto.gif"" > <a href=""typemgr.asp"">制度类别管理</a>" & _
" " & _
" <img src=""../images/goto.gif"" > <a href=""infomgr.asp"">制度信息管理</a>" & _
links & _
" </td>" & _
"</tr>" & _
"</table>"
End Function
'***************************************************************************************************
'***************************************************************************************************
' Name : TableSearch
' Function : Form Table of Search
' In : No
' Out : No
' Return : Table of Search entries
' Comment : No
'
'---------------------------------------------------------------------------------------------------
Function TableSearch()
'-------------------------------------------------
' Declares
'-------------------------------------------------
Dim settime,starttime,endtime
Dim ruledept
Dim rulename
Dim ruletype
'--------------------------------------------------
' Initialize
'--------------------------------------------------
settime=Date
endtime=Date
starttime = GetParam("time1")
endtime = GetParam("time2")
ruledept = GetParam("ruledept")
rulename = GetParam("rulename")
ruletype = GetParam("ruletype")
If starttime = "" Then
starttime=Date
End If
If endtime = "" Then
endtime = Date
End If
'--------------------------------------------------
' Construct the search form table and return
'--------------------------------------------------
TableSearch = _
TableTitle("制度查询", 600, "", "") & _
"<table cellspacing=0 cellpadding=0 width=600 align=center border=0>" & _
"<form name=""frmSearch"" method=post action=""searchmgr.asp"">" & _
"<tr height=30>" & _
" <td width=250>制度名称:<input type=text name='rulename' value='"& rulename &"'>" & "</td>" & _
" <td width=200>" & DrawCal("有效起始日期", starttime, "time1", "dateimg11") & " </td>" & _
" <td width=150> </td>" & _
"</tr>" & _
"<tr height=30>" & _
" <td width=200>制定部门:<input type=text name='ruledept' value='"& ruledept &"'>" & "</td>" & _
" <td width=200>" & DrawCal("有效结束日期", endtime, "time2", "dateimg12") & "</td>" & _
" <td width=150> </td>" & _
"</tr> " & _
"<tr height=20>" & _
" <td width=250>制度类别:<select name=""ruletype"" style=""width:86px"">" & _
" <option value=""*"" selected>全部</option>" & _
SelectOptions(dbLocal,"t_rule_types","type","type",""& ruletype &"","") & _
" </select>" & _
" </td>" & _
" <td width=200> " & _
" </td>" & _
" <td width=150><span id=btnSearch style=""cursor:hand"" title=""设置查询条件,然后点击查询按钮进行查询""><img border=0 src=""../images/search.gif"" style=""vertical-align:middle"">查询</span></td></tr>" & _
"<tr height=10><td colspan=3 width=600> </td></tr>" & _
"</form>" & _
"</table>"
End Function
'***************************************************************************************************
'***************************************************************************************************
' Name : InfoSearch
' Function : Deal with the search form post
' In : No
' Out : No
' Return : where clause of sql statement
' Comment : No
'
'---------------------------------------------------------------------------------------------------
Function InfoSearch()
'-------------------------------------------------
' Declares
'-------------------------------------------------
Dim settime,starttime,endtime,ruledept
Dim rulename
Dim ruletype
Dim sWh
'--------------------------------------------------
' Get Parameters
'--------------------------------------------------
' settime = GetParam("time3")
starttime = GetParam("time1")
endtime = GetParam("time2")
ruledept = GetParam("ruledept")
rulename = GetParam("rulename")
ruletype = GetParam("ruletype")
'--------------------------------------------------
' Set Default Values
'--------------------------------------------------
' If IsEmpty(settime) Then
' settime = Date
' End If
If IsEmpty(starttime) Then
starttime = Date
End If
If IsEmpty(endtime) Then
endtime = Date
End If
' If IsEmpty(name) Then
' name = "*"
' End If
'--------------------------------------------------
' Construct the sWhere statement
'--------------------------------------------------
sWh = " WHERE starttime >= " & ToSQL(starttime,"Text") & " and endtime <= " & ToSQL(endtime,"Text")
'--------------------------------------------------
' Search rulename
'--------------------------------------------------
If Not IsEmpty(rulename) Then
sWh = sWh & " and name LIKE '%"& rulename &"%'"
End If
'--------------------------------------------------
' Search ruledept
'--------------------------------------------------
If Not IsEmpty(ruledept) Then
sWh = sWh & " and dept LIKE '%" & ruledept & "%'"
End If
'--------------------------------------------------
' Search ruletype
'--------------------------------------------------
If ruletype <> "*" Then
sWh = sWh & " and type = '"& ruletype &"'"
End If
'--------------------------------------------------
' Returns
'--------------------------------------------------
InfoSearch = sWh
End Function
'**************************************************************************************************
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -