📄 infomgr1_a.inc
字号:
' sTemp = sTemp & _
' "<span id=btnMod style=""cursor:hand"" title=""修改制度名称,点击更新按钮""><img border=0 src=""../images/button/update.gif"" style=""vertical-align:bottom""></span>" & _
' " " & _
' "<span id=btnDel style=""cursor:hand"" title=""点击删除按钮删除制度名称""><img border=0 src=""../images/button/delete.gif"" style=""vertical-align:bottom""></span>" & _
' " " & _
' "<span id=btnRes style=""cursor:hand"" title=""重置""><img border=0 src=""../images/button/reset.gif"" style=""vertical-align:bottom""></span>" & _
' " " & _
' "<span id=btnCancel style=""cursor:hand"" title=""取消""><img border=0 src=""../images/button/cancel.gif"" style=""vertical-align:bottom""></span>"
end if
sTemp = sTemp & "</td></tr></table></td>"
'----------------------------------------------------
' draw add table and return
'----------------------------------------------------
TableAdd = _
TableTitle("公文附件信息", 300, "", "") & _
"<table cellspacing=20 cellpadding=0 width=300 align=left border=0>" & _
"<form name=frmInfoMgr method=post action='infomgr1_a.asp'>" & _
"<input type=""hidden"" name=""did"" value=""" & did & """>" & _
"<tr height=60 valign=center>" & _
" <td width=300 align=left colspan=3>" & _
" <BR>附件主题:<input type=text name=newsubject value='" & sAttachSubject & "' maxlength=50>" & _
" <BR>附件页数:<input type=text name=newpages value='" & sAttachSize & "' maxlength=50>" & _
" <input type=hidden name=aid value='" & aid & "'>" & _
" <input type=hidden name=formAction>" & _
" </td>" & _
" </tr>" & _
"<tr height=40 align=center>" & _
sTemp & _
"</tr>" & _
"<tr height=10><td colspan=3 width=300> </td></tr>" & _
"</form>" & _
"</table>"
End Function
'***************************************************************************************************
'***************************************************************************************************
' Name : TableHeader
' Function : Table head for Record Table
' In : No
' Out : No
' Return : Table head of table record
' Comment : No
'
'---------------------------------------------------------------------------------------------------
Function TableHeader()
sFileName = "infomgr1_a.asp"
TableHeader = _
TableTitle("公文附件列表", 300, "", "#0040a0") & _
"<table cellspacing=0 cellpadding=0 width=300 align=center class=tablelist>" & _
"<tr>" & _
"<td class=tdHead align=center width=150> " & TableHeaderField(sFileName, "attach_subject", "公文附件主题", sFormParams, iSort, iSorted) & "</td>" & _
"<td class=tdHead align=center width=150> " & TableHeaderField(sFileName, "attach_size", "附件页数", sFormParams, iSort, iSorted) & "</td>" & _
"</tr>"
End Function
'***************************************************************************************************
'***************************************************************************************************
' 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
'-----------------------------------
' 获取数据库连接
'------------------------------------
' response.write sSQL : response.end
dim crs : set crs = New CRecordset
dim rs : set rs = crs.open(dbLocal,sSQL)
dim sDocSubject, sDocId, sDocSender, sDocSentDate,sDocType,sDocAttach
'--------------------------------------------------
' 如果未到记录尾,将记录定位到你翻到的页面的第一个记录,否则显示空行
'--------------------------------------------------
if Not rs.EOF then
rs.Move (iCurrentPage - 1) * iRecordsPerPage
end if
'--------------------------------------------------
' write the record list table
'--------------------------------------------------
while not rs.EOF and iCounter <= iRecordsPerPage
sDocSubject = crs.GetValue("attach_subject")
sDocId = crs.GetValue("doc_id")
sDocType = crs.GetValue("attach_size")
sDocAttach = crs.GetValue("attach_id")
sTemp = sTemp & "<tr valign=center>" & _
"<td class=tdlist width=150 title='" & sDocSubject & "' style=""cursor:hand"" onclick=""javascript:location.href='../docmgr/infomgr1_a.asp?did=" & sDocId & "&aid="& sDocAttach &"';""><img src=""../images/bg/ar-g.gif"" width=8 height=8> " & ToHtml(Bref(sDocSubject,25)) & " </td>" & _
"<td class=tdlist align=center width=150 title='" & sDocType & "' >" & sDocType & " </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 aid : aid = GetParam("aid")
Dim did : did = GetParam("did")
Dim path
Dim links
'-----------------------------------------------------
' Connect to Database
'-----------------------------------------------------
dim crs : set crs = New CRecordset
dim sSQL : sSQL = "select attach_path from T_Doc_attachment where attach_id=" & ToSQL(aid, "Number")
dim rs : set rs = crs.open(dbLocal,sSQL)
path = crs.GetValue("attach_path")
crs.Close()
'--------------------------------------------------
' Construct the link string
'--------------------------------------------------
If IsEmpty(aid) Then
'------------------------------------------
' hide the Browse and Upload links
'------------------------------------------
links = ""
Else
'------------------------------------------
' show the Browse and Upload links
'------------------------------------------
links = ""
If path <> "" Then
links = links & " " & _
" <img src=""../images/goto.gif"" > <a href='" & path & "' target=_blank>公文附件文件阅读</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='infomgr1.asp?id="& did & "'>公文信息管理</a>" & _
links & _
" </td>" & _
"</tr>" & _
"</table>"
End Function
'***************************************************************************************************
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -