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

📄 showattachs.asp

📁 功能齐全的oa系统
💻 ASP
字号:
<%
Function ShowAttachs(ObjDB,Attachs)
	Dim ObjRS,StrSQL
	Dim AttachIDs
	Dim StrTmp
	If IsNull(Attachs) Then Attachs = ""
	If Attachs = "" Then
		ShowAttachs = "<无附件>"
		Exit Function
	End If
	AttachIDs = "'" & Replace(Attachs,",","','") & "'"

	StrSQL = "Select * From t_OA_Attach Where KeyPath In (" & AttachIDs & ")"

	Set ObjRS = ObjDB.Execute(StrSQL)
	
	StrTmp = "<select name=ALLATTACHS>"
	While Not ObjRS.Eof
		StrTmp = StrTmp & "<option value=" & ObjRS("KeyPath") & ">" & ObjRS("FileName") & "</option>"
		
		ObjRS.MoveNext
	Wend
	

	StrTmp = StrTmp & "</select>"
	
	StrTmp = StrTmp & "<input value='查 &nbsp;&nbsp;&nbsp;看' type=button onclick=" & Chr(34) & "window.open('" & Application("RootPath") & "Hrms/TrainAttach/View.asp?ID='+ALLATTACHS.value)" & Chr(34) & ">"
	
	ShowAttachs = StrTmp
End Function

Function ShowAttachsH(ObjDB,Attachs)
	Dim ObjRS,StrSQL
	Dim AttachIDs
	Dim StrTmp
	If IsNull(Attachs) Then Attachs = ""
	If Attachs = "" Then
		ShowAttachsH= "<无附件>"
		Exit Function
	End If
	AttachIDs = "'" & Replace(Attachs,",","','") & "'"

	StrSQL = "Select * From t_Hrms_Attach Where KeyPath In (" & AttachIDs & ")"

	Set ObjRS = ObjDB.Execute(StrSQL)
	
	StrTmp = "<select class=SelectWidth name=ALLATTACHS>"
	While Not ObjRS.Eof
		StrTmp = StrTmp & "<option value=" & ObjRS("KeyPath") & ">" & ObjRS("FileName") & "</option>"
		
		ObjRS.MoveNext
	Wend
	

	StrTmp = StrTmp & "</select>"
	
	StrTmp = StrTmp & "<input class=button value='查 &nbsp;&nbsp;&nbsp;看' type=button onclick=" & Chr(34) & "window.open('" & Application("RootPath") & "Hrms/Attach/View.asp?ID='+ALLATTACHS.value)" & Chr(34) & ">"
	
	ShowAttachsH= StrTmp
End Function
%>

⌨️ 快捷键说明

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