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

📄 doc_p.inc

📁 物业管理和办公自动化系统
💻 INC
字号:
<%
Sub GetDocInfor()
		dim sSQL, oCn, cn, crs, rs
		sSQL = "select t1.doc_id, t1.doc_type_id, t1.doc_urge_level, t1.doc_secret_level, t2.type_desc, t3.urgent_desc, t4.secret_desc" & _
				", t1.doc_subject, t1.doc_number, t1.doc_keyword, t1.doc_report_person, t1.doc_send_person, t1.doc_sender, t1.doc_sent_date" & _
				", t1.doc_reg_person, t1.doc_reg_date" & _
				", t1.content, t1.contenttype, t1.filetype, t1.filesize" & _
				" from T_document t1" & _
				" left join t_doc_type t2 on t2.type_id = t1.doc_type_id" & _
				" left join t_doc_urgent t3 on t3.urgent_level = t1.doc_urge_level" & _
				" left join t_doc_secret t4 on t4.secret_level = t1.doc_secret_level" & _
				" where t1.doc_id = " & ToSQL(pDocId, "Number")
		set crs = New CRecordset
		set rs = crs.Open(dbLocal, sSQL)
		if rs.EOF then
			crs.Close()
			Response.Clear
			Server.Transfer("../common/error.asp")
			Response.end
		end if
		iDocTypeId = crs.GetValue("doc_type_id")
		iDocUrgentLevel = crs.GetValue("doc_urge_level")
		iDocSecretLevel = crs.GetValue("doc_secret_level")
		sDocTypeDesc = crs.GetValue("type_desc")
		sDocUrgentDesc = crs.GetValue("urgent_desc")
		sDocSecretDesc = crs.GetValue("secret_desc")
		sDocSubject = crs.GetValue("doc_subject")
		sDocNumber = crs.GetValue("doc_number")
		sDocKeyword = crs.GetValue("doc_keyword")
		sDocReportPerson = crs.GetValue("doc_report_person")
		sDocSendPerson = crs.GetValue("doc_send_person")
		sDocSender = crs.GetValue("doc_sender")
		sDocSentDate = crs.GetValue("doc_sent_date")
		sDocRegPerson = crs.GetValue("doc_reg_person")
		sDocRegDate = crs.GetValue("doc_reg_date")

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

Function DocAttachInfor()
		dim sSQL, crs, rs, sTemp, iCount, sCount
		dim iAttachId, sAttachDocSubject
		sSQL = "select * from t_doc_attachment where doc_id = " & ToSQL(pDocId, "Number")
		set crs = New CRecordset
		set rs = crs.Open(dbLocal, sSQL)
		if rs.eof then
			crs.Close()
			DocAttachInfor = "<span style=""color:gray"">(无)</span>"
			exit function
		end if
		iCount = 0
		sCount = Array("零", "一", "二", "三", "四", "五")

		while not rs.eof
			iCount = iCount + 1
			iAttachId = crs.GetValue("attach_id")
			sAttachDocSubject = crs.GetValue("attach_subject")
			'' 如果有后缀名,则将其后缀去掉,只剩文件名前缀,作为公文主题
			if InstrRev(sAttachDocSubject, ".") > 0 then sAttachDocSubject = Left(sAttachDocSubject, InstrRev(sAttachDocSubject, ".") -1 )
			sTemp = sTemp & _
					"<tr bgcolor=white>" & _
					"	<td style=""color:gray"">附件" & sCount(iCount) & ":</td>" & _
					"	<td><a target=_blank href=""content_show.asp?attach_id=" & iAttachId & "&"" style=""color:blue""><img border=0 src=""../images/bg/ar-g.gif"" width=8 height=8>" & sAttachDocSubject & "</a></td>" & _
					"	<td><a target=_blank href=""content_show.asp?attach_id=" & iAttachId & "&"" style=""color:blue""><img border=0 src=""images/content.gif"" title=""阅读公文附件"">阅读</a></td>" & _
					"	<td><a target=_blank href=""content_down.asp?attach_id=" & iAttachId & "&"" style=""color:blue""><img border=0 src=""images/download.gif"" title=""下载公文附件"">下载</a></td>" & _
					"	<td id=""upload_doc_attachment""><a target=_blank onclick=""javascript:window.open('doc_upload.asp?attach_id=" & iAttachId & "&','','width=490,height=140,top=200,left=200');"" style=""color:blue;cursor:hand""><img border=0 src=""images/upload.gif"" title=""重新上传公文附件"">重新上传</a></td></tr>"
			rs.movenext
		wend
		DocAttachInfor =  "<table cellspacing=0 cellpadding=2 border=0 bgcolor=silver>" & sTemp & "</table>"
End Function
%>

⌨️ 快捷键说明

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