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

📄 view_attach.asp

📁 功能齐全的oa系统
💻 ASP
字号:
<% option explicit%>
<!-- #include virtual="include/DataEnvi.asp" -->
<!-- #include file="GetGifURL.asp" -->
<%
Dim ObjDB,ObjRS,StrSQL,StrSQL1
Dim IntComMsgID,StrAttachs


IntComMsgID = Request.QueryString ("ID")

Set ObjDB=Server.CreateObject ("ADODB.Connection")
OpenDB ObjDB

StrSQL = "Select Attachs From t_OA_Work_Commessage where ID=" & IntComMsgID

Set ObjRS = ObjDB.Execute(StrSQL)
StrAttachs = ObjRS("Attachs")

If StrAttachs<>"" Then

	StrAttachs = Replace(StrAttachs,",","','")
	StrAttachs = "'" & StrAttachs & "'"

	StrSQL1 = "Select * From t_OA_Attach where keypath In (" & StrAttachs & ") Order By ID"
	Set ObjRS = ObjDB.Execute(StrSQL1)

End If

%>


<style>
td         { font-size:12px }
textarea         { font-size:12px }
</style>

<table   cellspacing=1 cellpadding=3 width=100%>
<%
	If StrAttachs<>"" Then
%>
<%

	Dim i,j
	i = 0
	While Not ObjRS.Eof
		i = i + 1
		If (i mod 8)=1 Then Response.Write "<tr>"
%>
<%
	Dim StrFileName,PicName
	StrFileName = ObjRS("FileName")

%>

<td align=center width=12% style="line-height: 150%;cursor:hand" onclick="window.open('<%=Application("RootPath")%>OA/Attach/View.asp?ID=<%=ObjRS("KeyPath")%>')">
<img src="<%=Application("RootPath")%>Images/OA/Attach/Icon/<%=GetGifURL(StrFileName)%>"><br><%=StrFileName%></td>
<%
		ObjRS.MoveNext
	If (i mod 8)=0 Then Response.Write "</tr>" & vbcrlf
	Wend
	
	If (i Mod 8) <> 0 Then
		For j = 1 To 8- (i Mod 8)
			Response.Write "<td width='12%'></td>" & vbcrlf
		Next
		Response.Write "</tr>" & vbcrlf	
	End If
	
	
	
%>

<%
Else Response.write "<td align=center>没有附件</td>"

End If

%>
</table>
</body>
</html>

⌨️ 快捷键说明

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