📄 content_show.asp
字号:
<%
'************************************************************************************************
' 文件名: showcontent.asp
' Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
' 创建人 : 周秋舫
' 日 期 : 2002-08-16
' 修改历史 :蔡晓燕
' 2002年11月18日 ****** 修改内容:**************************************************
' 功能描述 : 查看或下载维保计划附件的内容,文件内容信息是从数据库获取的
' 版 本 :
'************************************************************************************************
option explicit
'Response.CacheControl = "no-cache"
'Response.AddHeader "Pragma", "no-cache"
'Response.Expires = -1
%>
<!-- #include file="../include/common.inc" -->
<%
'call CheckSecurity()
dim conn
Set conn = DBConnection
dim pAttachId : pAttachId = GetParam("attach_id")
if IsEmpty(pAttachId) then
Response.Clear
Server.Transfer("../include/error.asp")
Response.end
end if
dim sSQL, crs, rs
sSQL = "select attach_name as filename, content_type, content from t_maintain_attachment where attach_id = " & ToSQL(pAttachId, "Number")
set rs = OpenRs(conn, sSQL)
'' 如果找不到查询符合条件的文件,则跳转到出错页面
if rs.eof then
Response.Clear()
Server.Transfer("../include/error.asp")
Response.end
end if
'' 写文件内容
Response.ContentType = GetValue(rs,"content_Type")
Response.BinaryWrite GetValue(rs,"content")
rs.Close()
Disconnect(conn)
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -