📄 doc_upload.asp
字号:
<%
'************************************************************************************************
' 文件名: doc_upload.asp
' Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
' 创建人 : 周秋舫
' 日 期 : 2002-08-15
' 修改历史 :蔡晓燕
' 2002年11月19日 ****** 修改内容:**************************************************
' 功能描述 : 用于维保计划附件重传,附件登记,并上载附件文件到数据库
' 版 本 :
'************************************************************************************************
option explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
%>
<!-- #include file="../include/common.inc" -->
<%
'' 检查已经登录并在线
call CheckSecurity()
if hasright(ID_EQUIPMENT) < RIGHT_WRITE then
Response.Write _
"<script language=""javascript"">" & vbLF & _
" alert(""对不起,您没有删除维保附件的权限(您的角色没有设备更新的权限)!"");" & vbLF & _
"</script>" & vbLF
%>
<script language="javascript">
// 重新load公文属性修改页面
if (typeof(window.opener) != 'undefined')
window.opener.location.reload();
// 公文上传页面被关闭
window.close();
</script>
<%
Response.end
end if
'' 检查输入参数,如果附件标识为空,则报错
dim pAttachId : pAttachId = GetParam("attach_id")
if IsEmpty(pAttachId) then
Response.Clear
Server.Transfer("../include/error.asp")
Response.end
end if
dim conn
Set conn = DBConnection
dim sPageTitle
dim sSQL, crs, rs, sFileName, sFileLink
if Not IsEmpty(pAttachId) then '' 重传附件
sPageTitle = "维 保 附 件 上 传"
sSQL = "select attach_name as filename from t_maintain_attachment where attach_id = " & ToSQL(pAttachId, "Number")
end if
set rs = OpenRs(conn, sSQL)
if rs.EOF then
rs.Close()
set rs = nothing
Disconnect(conn)
Response.Clear
Server.Transfer("../include/error.asp")
Response.end
else
sFileName = GetValue(rs,"filename")
rs.close()
set rs = nothing
Disconnect(conn)
end if
if Not IsEmpty(pAttachId) then
sFileLink = "<a style=""color:blue"" target=_blank href=""content_show.asp?attach_id=" & pAttachId & "&"" title=""点击可以阅读文件内容"">" & sFileName & "</a>"
end if
%>
<html>
<head>
<title>上海信息大楼 Shanghai Information Tower</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../include/common.css" type="text/css">
<style type="text/css">
input {color:blue}
</style>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="images/bg.gif">
<br>
<%
'********************************************************************************************************
' 主体从这里开始
'-------------------------------------------------------------------------------------------------------------------------------------------------
%>
<form name="FormUploadDoc" method="post" enctype="multipart/form-data" action="doc_upload_action.asp">
<input type="hidden" name="attach_id" value="<%=pAttachId%>">
<table width=480 align=center border=0 cellspacing=1 cellpadding=3 bgcolor="#e0e0e0" style="table-layout:fixed;border:1px solid navy">
<tr bgcolor=navy style="color:white;font-weight:600"><td align=center><%=sPageTitle%></td></tr>
<tr bgcolor=white>
<td> 原来文件为:<%=sFileLink%></td>
<tr bgcolor=white>
<td> 上传文件为:<input type="file" name="content" size=50></td></tr>
<tr bgcolor=white height=30>
<td align=center>
<input type="image" name="Enter" src="../images/button/submit.gif" style="border-width:0">
<img border=0 width=20 height=0>
<img border=0 src="../images/button/cancel.gif" onclick="javascript:window.close();"></td></tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -