📄 addnew.asp
字号:
<%option explicit%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
Response.Expires = -1
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "Cache-Control","no-cache,must-revalidate"
%>
<!--#include virtual="include/DataEnvi.asp"-->
<!--#include virtual="include/String.asp"-->
<!--#include virtual="include/Page.asp"-->
<%
Dim ObjDB,ObjRS,StrSQL
Dim IntIDs
Dim StrExistAttach
Dim StrAttachNames
Set ObjDB = Server.CreateObject("ADODB.Connection")
OpenDBH ObjDB
IntIDs = Request.QueryString("IDs")
IntIDs = Replace(IntIDs,",","','")
IntIDs = "'" & IntIDs & "'"
If IntIDs = "" Then IntIDs = "0"
StrSQL = "Select * From t_Hrms_Attach where KeyPath In (" & IntIDs & ")"
Set ObjRS = objDB.Execute(StrSQL)
Do while Not objRS.EOF
strExistAttach = strExistAttach & "<tr class=Ltr><td>" & VbCrlf
strExistAttach = strExistAttach & "<a target=_blank href='Files/" & ObjRS.Fields("BasePath") & "/" & ObjRS.Fields("KeyPath") & "/" & ObjRS.Fields("FileName") & "' target=_blank>" & objRS.Fields("FileName") & "</a></td><td>" & VbCrlf
strExistAttach = strExistAttach & objRS.Fields("FileSize") & "<B>Bit</B></td><td>" & VbCrlf
strExistAttach = strExistAttach & "<A href=delAttach.asp?IDs=" & Request.QueryString("IDs") & "&BasePath=" & Request.QueryString("BasePath") & "&DelIDs=" & objRS.Fields("KeyPath") & ">删除</A>" & VbCrlf
strExistAttach = strExistAttach & "</td></tr>" & VbCrlf
StrAttachNames = StrAttachNames & ObjRS("FileName") & " "
objRS.MoveNext()
Loop
%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="<%=Application("RootPath")%>Templet/Main.css">
<script language=javascript>
function ReturnAttachs(a,b){
var k = new Array()
k[0] = b
k[1] = a
top.window.returnValue = k
top.window.close()
}
</script>
</head>
<body leftmargin="0" topmargin="0">
<table cellspacing=1 cellpadding=3 width=100%>
<form name=thisForm method="POST" action="AddAttachDo.asp" enctype="multipart/form-data">
<input type=hidden name=BasePath value="<%=Request.QueryString("BasePath")%>">
<input type=hidden name=IDs value="<%=Request.QueryString("IDs")%>">
<tr class=LHtr>
<td colspan=3><B>新增附件</B></td>
</tr>
<tr class=Ltr>
<td>请选择附件:</td>
<td><input type=file size=20 name="source" style="font-size=12px"></td>
<td><input type=submit value="粘 贴"></td>
</tr>
</form>
</table>
<table class=Ltable cellspacing=1 cellpadding=3 width=100%>
<tr class=LHtr>
<td colspan=3><B>已有附件</B></td>
</tr>
<tr class=LStr>
<td width=50%>附件名称</td>
<td width=30%>附件大小</td>
<td width=20%>操作</td>
</tr>
<%=strExistAttach %>
</table>
<p align=center>
<form action=>
<input type=button value="完 成" onclick="javascript:ReturnAttachs('<%=Request.QueryString("IDs")%>','<%=StrAttachNames%>')">
</p>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -