📄 infomgr.inc_old
字号:
' In : No
' Out : No
' Return : Table head of table record
' Comment : No
'
'---------------------------------------------------------------------------------------------------
Function TableHeader()
sFileName = "infomgr.asp"
TableHeader = _
TableTitle("系统现有的制度列表", 300, "", "#0040a0") & _
"<table cellspacing=0 cellpadding=0 width=300 align=center class=tablelist>" & _
"<tr>" & _
"<td class=tdHead align=center width=180> " & TableHeaderField(sFileName, "name", "制 度 名 称", sFormParams, iSort, iSorted) & "</td>" & _
"<td class=tdHead align=center width=120> " & TableHeaderField(sFileName, "starttime", "有效起始日期", sFormParams, iSort, iSorted) & "</td>" & _
"</tr>"
End Function
'***************************************************************************************************
'=======
' "<td class=tdHead align=center width=100> " & TableHeaderField(sFileName, "doc_subject", "公文主题", sFormParams, iSort, iSorted) & "</td>" & _
' "<td class=tdHead align=center width=100> " & TableHeaderField(sFileName, "doc_sender", "发送者", sFormParams, iSort, iSorted) & "</td>" & _
' "<td class=tdHead align=center width=100> " & TableHeaderField(sFileName, "doc_sent_date", "发送日期", sFormParams, iSort, iSorted) & "</td>" & _
'>>>>>>> 1.3
'***************************************************************************************************
' Name : TableRecords
' Function : Table List the Records
' In : 9 parameters
' sSQL --- sql statement
' iCols --- columns
' iRecordsPerPage --- records per page
' iTotalRecords --- total records
' iCurrentPage --- current page
' iTotalPages --- total pages
' sFileName --- file name
' sFormParams --- form parameters
' sSortParam --- sort parameters
' Out : No
' Return : Table head of table record
' Comment : No
'
'---------------------------------------------------------------------------------------------------
Function TableRecords(sSQL, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams)
'-------------------------------------------------------------
' declares
'-------------------------------------------------------------
Dim sTemp : sTemp = "" ' 临时字符串变量
Dim j ' 临时循环变量
'------------------------------------
' 分页所需的变量定义
'------------------------------------
Dim iCounter : iCounter = 1
Dim iPrevPage, iNextPage
'-----------------------------------
' 获取数据库连接
'------------------------------------
dim crs : set crs = New CRecordset
dim rs : set rs = crs.open(dbLocal,sSQL)
dim sRuleName,sRuleSN,sRuleStart
'--------------------------------------------------
' 如果未到记录尾,将记录定位到你翻到的页面的第一个记录,否则显示空行
'--------------------------------------------------
if Not rs.EOF then
rs.Move (iCurrentPage - 1) * iRecordsPerPage
end if
'--------------------------------------------------
' write the record list table
'--------------------------------------------------
while not rs.EOF and iCounter <= iRecordsPerPage
sRuleName = crs.GetValue("name")
sRuleSN = crs.GetValue("sn")
sRuleStart = crs.GetValue("starttime")
sTemp = sTemp & "<tr valign=center>" & _
"<td class=tdlist width=180 title='" & sRuleName & "' style=""cursor:hand"" onclick=""javascript:location.href='../rulemgr/infomgr.asp?id=" & sRuleSN & "';""><img src=""../images/bg/ar-g.gif"" width=8 height=8> " & ToHtml(Bref(sRuleName,25)) & " </td>" & _
"<td class=tdlist width=120 title='" & sRuleStart & "' >" & sRuleStart & " </td>" & _
"</tr>"
iCounter = iCounter + 1
rs.movenext
wend
crs.Close()
'--------------------------------------------------
' 填补空白行
'--------------------------------------------------
sTemp = sTemp & WhiteRows(iCols, iCounter, iRecordsPerPage)
'--------------------------------------------------
' 首页、前页、后页、尾页等分页信息
'--------------------------------------------------
sTemp = sTemp & "<tr><td class=tdlist colspan=" & iCols & " align=right>" & _
Paginate(sFileName, sFormParams, sSortParams, iCurrentPage, iTotalPages) & _
" </td></tr>"
'--------------------------------------------------
' Returns
'--------------------------------------------------
TableRecords = 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 and get parameter
'-----------------------------------------------------
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("doc_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
'------------------------------------------
links = _
" " & _
" <img src=""../images/goto.gif"" > <a href='filemgr.asp?id=" & id & "'>制度文件上载</a>"
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=600 cellspacing=0 cellpadding=0 border=0 align=left>" & _
"<tr height=10>" & _
" <td width=600><img src=""../images/bg/line.gif"" width=600 height=3></td>" & _
"</tr>" & _
"<tr height=20 align=left>" & _
" <td width=600 align=left> " & _
" <img src=""../images/goto.gif"" > <a href=""typemgr.asp"">制度类别管理</a>" & _
" " & _
" <img src=""../images/goto.gif"" > <a href=""searchmgr.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
'--------------------------------------------------
' Initialize
'--------------------------------------------------
settime=Date
starttime=Date
endtime=Date
'--------------------------------------------------
' 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=""infomgr.asp"">" & _
"<tr height=30>" & _
" <td width=250>制度名称:<input type=text name='rulename' value=''>" & "</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=''>" & "</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","","") & _
" </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 ruletype = '"& ruletype &"'"
End If
'--------------------------------------------------
' Returns
'--------------------------------------------------
InfoSearch = sWh
End Function
'**************************************************************************************************
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -