📄 searchmgr.inc
字号:
sAttachPath = sAttachSubject & "(附件文件还未上传)<br>"
Else
sAttachPath= "<img src='../images/bg/ar-g.gif' ><a href='" & sAttachPath & "' target=_blank>"&sAttachSubject&"</a><br>"
End If
sl= sl & sAttachPath
rs.movenext
wend
' response.write("sl=" & sl)
If sl = "" Then
sl = "(暂无附件)"
End If
If sDocPath = "" Then
sDocPath = "(公文文件还未上传)"
Else
sDocPath= "<img src='../images/bg/ar-g.gif' ><a href='" & sDocPath & "' target=_blank>"&sDocSubject&"</a>"
End If
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='" & sDocType & "'> " & ToHtml(sDocType) & " </td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>公文主题</td><td class=tdlist width=500 title='" & sDocSubject & "'>" & ToHtml(sDocSubject) & " </td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>公文字号</td><td class=tdlist width=500 title='" & sDocNumber & "'> " & ToHtml(sDocNumber) & " </td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>紧急程度</td><td class=tdlist width=500 title='" & sDocUrgent & "' >" & sDocUrgent & " </td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>秘密程度</td><td class=tdlist width=500 title='" & sDocSecret & "' >" & sDocSecret & " </td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>公文页数</td><td class=tdlist width=500 title='" & sDocPages & "' >" & sDocPages & " </td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>关 键 字</td><td class=tdlist width=500 title='" & sDocKeywords & "' >" & sDocKeywords & " </td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>抄报人员</td><td class=tdlist width=500 title='" & sDocReports & "' >" & sDocReports & " </td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>抄送人员</td><td class=tdlist width=500 title='" & sDocSends & "' >" & sDocSends & " </td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>发文单位</td><td class=tdlist width=500 title='" & sDocSender & "' >" & sDocSender & " </td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>印发日期</td><td class=tdlist width=500 title='" & sDocSentDate & "' >" & sDocSentDate & " </td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>登 记 人</td><td class=tdlist width=500 title='" & sDocRegman & "' >" & sDocRegman & " </td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>登记日期</td><td class=tdlist width=500 title='" & sDocRegDate & "' >" & sDocRegDate & " </td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>公文内容</td><td class=tdlist width=500 >"&sDocPath&"</td>" & _
"<tr valign=center>" & _
"<td width=100 class=tdHead>附件内容</td><td class=tdlist width=500 >"& sl &"</td>" & _
"</tr>"
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
links = ""
'--------------------------------------------------
' 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=""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 doctime1,doctime2
Dim sDocSubject, sDocKeywords, sDocSender,sDocType,sDocUrgent,sDocSecret,sDocDate1,sDocDate2
'--------------------------------------------------
' Initialize
'--------------------------------------------------
settime=Date
starttime=Date
endtime=Date
doctime1=Date
doctime2=Date
sDocSubject = GetParam("docsubject")
sDocKeywords = GetParam("dockeywords")
sDocSender = GetParam("docsender")
sDocUrgent = GetParam("docurgent")
sDocType = GetParam("doctype")
sDocSecret = GetParam("docsecret")
sDocDate1 = GetParam("time31")
sDocDate2 = GetParam("time32")
If sDocDate1 = "" Then
sDocDate1 = Date
End If
If sDocDate2 = "" Then
sDocDate2 = Date
End If
'--------------------------------------------------
' Construct the search form table and return
'--------------------------------------------------
TableSearch = _
TableTitle("公文查询", 600, "", "") & _
"<table cellspacing=3 cellpadding=3 width=570 align=center border=0>" & _
"<form name=""frmSearch"" method=post action=""searchmgr.asp"">" & _
"<tr height=30>" & _
" <td width=200>公文主题:<input type=text name='docsubject' value='"& sDocSubject &"'>" & "</td>" & _
" <td width=150>紧急程度:<select name=""docurgent"" style=""width:86px"">" & _
" <option value='*'>全部</option>" & _
SelectOptions(dbLocal,"t_doc_urgent","urgent_level","urgent_desc",""&sDocUrgent&"","") & _
" </select>" & _
" <td width=220>" & DrawCal("印发日期始于", sDocDate1, "time31", "dateimg31") & "</td>" & _
" </td>" & _
"</tr>" & _
"<tr height=30>" & _
" <td width=200>关 键 字:<input type=text name='dockeywords' value='"&sDocKeywords&"'>" & "</td>" & _
" <td width=150>秘密等级:<select name=""docsecret"" style=""width:86px"">" & _
" <option value='*'>全部</option>" & _
SelectOptions(dbLocal,"t_doc_secret","secret_level","secret_desc",""&sDocSecret&"","") & _
" </select>" & _
" </td>" & _
" <td width=220>" & DrawCal("印发日期止于", sDocDate2, "time32", "dateimg32") & "</td>" & _
"</tr> " & _
"<tr height=20>" & _
" <td width=200>公文单位:<input type=text name='docsender' value='"&sDocSender&"'>" & "</td>" & _
" <td width=150>公文类别:<select name=""doctype"" style=""width:86px"">" & _
" <option value='*'>全部</option>" & _
SelectOptions(dbLocal,"t_doc_type","type_id","type_desc",""&sDocType&"","") & _
" </select>" & _
" </td>" & _
" <td width=220 align=right><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
Dim sDocSubject, sDocKeywords, sDocSender,sDocType,sDocUrgent,sDocSecret,sDocDate1,sDocDate2
'--------------------------------------------------
' Get Parameters
'--------------------------------------------------
' settime = GetParam("time3")
starttime = GetParam("time1")
endtime = GetParam("time2")
ruledept = GetParam("ruledept")
rulename = GetParam("rulename")
ruletype = GetParam("ruletype")
sDocSubject = GetParam("docsubject")
sDocKeywords = GetParam("dockeywords")
sDocSender = GetParam("docsender")
sDocUrgent = GetParam("docurgent")
sDocType = GetParam("doctype")
sDocSecret = GetParam("docsecret")
sDocDate1 = GetParam("time31")
sDocDate2 = GetParam("time32")
'--------------------------------------------------
' Set Default Values
'--------------------------------------------------
'--------------------------------------------------
' Construct the sWhere statement
' search doc_sent_date
'--------------------------------------------------
' sWh = " WHERE doc_sent_date >= " & ToSQL(sDocDate1,"Text") & " and doc_sent_date <= " & ToSQL(sDocDate2,"Text")
sWh = " and doc_sent_date >= " & ToSQL(sDocDate1,"Text") & " and doc_sent_date <= " & ToSQL(sDocDate2,"Text")
'--------------------------------------------------
' Search doc_subject,doc_keywords,doc_sender
'--------------------------------------------------
If Not IsEmpty(sDocSubject) Then
sWh = sWh & " and doc_subject LIKE '%"& sDocSubject &"%'"
End If
If Not IsEmpty(sDocKeywords) Then
sWh = sWh & " and doc_keyword LIKE '%"& sDocKeywords &"%'"
End If
If Not IsEmpty(sDocSender) Then
sWh = sWh & " and doc_sender LIKE '%"& sDocSender &"%'"
End If
'--------------------------------------------------
' Search type/urgent/secret
'--------------------------------------------------
If sDocType <> "*" Then
sWh = sWh & " and doc_type_id = "& sDocType &""
End If
If sDocUrgent <> "*" Then
sWh = sWh & " and doc_urge_level = "& sDocUrgent &""
End If
If sDocSecret <> "*" Then
sWh = sWh & " and doc_secret_level = "& sDocSecret &""
End If
'--------------------------------------------------
' Returns
'--------------------------------------------------
InfoSearch = sWh
' Response.write sWh
' Response.end
End Function
'**************************************************************************************************
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -