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

📄 doc_l.inc

📁 物业管理和办公自动化系统
💻 INC
字号:
<%
Function TableSearch()
	'' 任务分类,0为所有任务,1为普通任务,2为会议相关的任务,3为审批相关的任务
	'' 任务完成状况,0全部,1所有已完成任务,2所有未完成任务,3所有正常的未完成任务,4所有过时的未完成任务
	'' 开始日期的日历
	'' 结束日期的日历
	TableSearch = "<table cellspacing=1 cellpadding=3 width=600 align=center border=0 style=""table-layout:fixed"">" 
	TableSearch = TableSearch &	"<tr>" 
	TableSearch = TableSearch &	"	<td width=190></td>"
	TableSearch = TableSearch &	"	<td width=190></td>"
	TableSearch = TableSearch &	"	<td width=""*""></td></tr>"
	TableSearch = TableSearch &	"<form name=""frmSearchDoc"" method=post action=""doc_l.asp"">"
	TableSearch = TableSearch &	"<tr bgcolor=black><td style=""color:white;font-weight:600"" colspan=3 align=center>设 置 公 文 查 询 条 件</td></tr>" & vbLF 
	TableSearch = TableSearch &	"<tr>" 
	TableSearch = TableSearch &	"	<td>" & DrawCal("开始日期", pDay1, "day1", "dateimg1") & "	</td>"
	TableSearch = TableSearch &	"	<td>" & DrawCal("结束日期", pDay2, "day2", "dateimg2") & "  </td>"
	TableSearch = TableSearch &	"	<td>公文类型:<select name=""doc_type_id"" style=""width:86px"">"
	TableSearch = TableSearch &	"			<option value=""0"">所有</option>"
	TableSearch = TableSearch &	"			<option value=""1"">收文</option>"
	TableSearch = TableSearch &	"			<option value=""2"">发文</option>"
	TableSearch = TableSearch &	"		</select>"
	TableSearch = TableSearch &	"		<script language=""javascript"">document.all.doc_type_id.selectedIndex=" & pDocTypeId & "</script>"
	TableSearch = TableSearch &	"	</td></tr>"
	TableSearch = TableSearch &	"<tr>"
	TableSearch = TableSearch &	"	<td>公文主题:<input type=""text"" name=""doc_subject"" value=""" & pDocSubject & """ size=13></td>"
	TableSearch = TableSearch &	"	<td>关 键 字:<input type=""text"" name=""doc_keyword"" value=""" & pDocKeyword & """ size=13></td>"
	TableSearch = TableSearch &	"	<td>抄送抄报:<input type=""text"" name=""report_send_person"" value=""" & pReportSendPerson & """ size=13>&nbsp;<span id=btnSearch style=""cursor:hand"" title=""选择开始日期和结束日期,点击查询按钮进行查询"" onclick=""javascript:frmSearchDoc.submit();""><img border=0 src=""../images/search.gif"" style=""vertical-align:middle"">查询</span></td></tr>"
	TableSearch = TableSearch &	"<tr height=2><td colspan=3 width=600></td></tr>"
	TableSearch = TableSearch &	"</form>"
	TableSearch = TableSearch &	"</table>"
End Function

Function TableHeader()
	TableHeader = _
		"<table cellspacing=1 cellpadding=3 width=""100%"" align=center style=""table-layout:fixed;"" bgcolor=silver>" & vbLF & _
		"<tr style=""display:none"">" & vbLF & _
		"	<td width=70 nowrap>印发日期</td>" & vbLF & _
		"	<td width=""*"" nowrap>公文主题</td>" & vbLF & _
		"	<td width=100 nowrap>公文字号</td>" & vbLF & _
		"	<td width=50 nowrap>公文类型</td>" & vbLF & _
		"	<!--td width=70 nowrap>紧急程度</td>" & vbLF & _
		"	<td width=70 nowrap>秘密等级</td-->" & vbLF & _
		"</tr>" & vbLF & _
		"<tr height=20 bgcolor=""navy"" style=""color:white;font-weight:600;"">" & _
		"	<td colspan=""" & iCols & """ align=center>公 文 信 息 查 询 结 果</td></tr>" & vbLF & _
		"<tr height=20 bgcolor=""#dddddd"">" & vbLF & _
		"	<td nowrap align=center>" & TableHeaderField(sFileName, "doc_sent_date", "印发日期", sFormParams, iSort, iSorted) & "</td>" & vbLF & _
		"	<td nowrap align=center>" & TableHeaderField(sFileName, "doc_subject", "公文主题", sFormParams, iSort, iSorted) & "</td>" & vbLF & _
		"	<td nowrap align=center>" & TableHeaderField(sFileName, "doc_number", "公文字号", sFormParams, iSort, iSorted) & "</td>" & vbLF & _
		"	<td nowrap align=center>" & TableHeaderField(sFileName, "type_desc", "类型", sFormParams, iSort, iSorted) & "</td>" & vbLF & _
		"	<!--td nowrap align=center>" & TableHeaderField(sFileName, "doc_urge_level", "紧急程度", sFormParams, iSort, iSorted) & "</td>" & vbLF & _
		"	<td nowrap align=center>" & TableHeaderField(sFileName, "doc_secret_level", "秘密等级", sFormParams, iSort, iSorted) & "</td-->" & vbLF & _
		"</tr>" & vbLF
End Function


Function TableRecords(sSQL, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams)
'	response.write sSQL: response.end
	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 iDocId, sDocType, sDocUrgentLevel, sDocSecretLevel
	dim sDocSubject, sDocNumber, sDocSentDate, sFileType
	dim iDocTypeId, sDocTypeImg

	' 如果未到记录尾,将记录定位到你翻到的页面的第一个记录,否则显示空行
	''response.write "当前为第" & GetParam("Page") & "页,每页" & iRecordsPerPage & "," & (iCurrentPage - 1) * iRecordsPerPage & "<br>"
	if Not rs.EOF then	
		rs.Move (iCurrentPage - 1) * iRecordsPerPage
	end if

	while not rs.EOF and iCounter <= iRecordsPerPage
		iDocId			= crs.GetValue("doc_id")
		iDocTypeId	= crs.GetValue("doc_type_id")
		sDocType		= crs.GetValue("type_desc")
		sDocUrgentLevel = crs.GetValue("urgent_desc")
		sDocSecretLevel = crs.GetValue("secret_desc")

		sDocSubject		= crs.GetValue("doc_subject")
		sDocNumber		= crs.GetValue("doc_number")
		sDocSentDate	= crs.GetValue("doc_sent_date")
		sFileType			= crs.GetValue("filetype")

		'' 如果有后缀名,则将其后缀去掉,只剩文件名前缀,作为公文主题
		if InstrRev(sDocSubject, ".") > 0 then sDocSubject = Left(sDocSubject, InstrRev(sDocSubject, ".") -1 )

		if CStr(iDocTypeId) = "1" then
			sDocTypeImg = "<img border=0 src=""images/recv.gif"">"
		elseif CStr(iDocTypeId) = "2" then
			sDocTypeImg = "<img border=0 src=""images/send.gif"">"
		end if
		
		''sFileType = TransFileType(sFileType)

		sDocSentDate = FormatDT(sDocSentDate, "yyyy-mm-dd")

		sTemp = sTemp & "<tr bgcolor=white>" & vbLF & _
				"	<td nowrap title=""" & sDocSentDate & """ align=center>" & sDocSentDate & "</td>" & vbLF & _
				"	<td nowrap align=left title=""" & sDocSubject & """>&nbsp;<a style=""cursor:hand;color:blue;font-family:MS Sans Serif"" onclick=""window.open('doc_p.asp?doc_id=" & iDocId & "&');""><img src=""../images/bg/ar-g.gif"" width=8 height=8>&nbsp;" & sDocSubject & "</a>&nbsp;</td>" & vbLF & _
				"	<td nowrap>" & sDocNumber & "</td>" & vbLF & _
				"	<td nowrap align=center title=""" & sDocType & """>" & sDocTypeImg & "</td>" & vbLF & _
				"	<!--td nowrap align=center>" & sDocUrgentLevel & "</td>" & vbLF & _
				"	<td nowrap align=center>" & sDocSecretLevel & "</td-->" & vbLF & _
				"</tr>" & vbLF
		iCounter = iCounter + 1
		rs.movenext
	wend
	crs.Close()

	' 填补空白行
	sTemp = sTemp & WhiteRows(iCols, iCounter, iRecordsPerPage)

	' 首页、前页、后页、尾页等分页信息
	sTemp = sTemp & "<tr bgcolor=white><td class=tdlist colspan=" & iCols & " align=right>" & _
				Paginate(sFileName, sFormParams, sSortParams, iCurrentPage, iTotalPages) & _
				"&nbsp;</td></tr>"
	TableRecords = sTemp
End Function

Function TableTailer
	TableTailer = "</table>"
End Function

Function TableLink()
	TableLink = _
		"<table width=600 cellspacing=0 cellpadding=0 border=0 align=center>" & vbLF & _
		"<tr height=10>" & vbLF & _ 
		"	<td width=600><img src=""../images/bg/line.gif"" width=600 height=3></td>" & vbLF & _
		"</tr>" & vbLF & _
		"<tr height=20>" & vbLF & _
		"	<td width=600>&nbsp;" & vbLF & _
				"<img src=""../images/goto.gif"">&nbsp;<a href=""doc_a.asp"">公文登记</a></td>" & vbLF & _
		"</tr>" & vbLF & _
		"</table>" & vbLF
End Function
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -