📄 upforsubmitadf.asp
字号:
<%
Response.ExpiresAbsolute=now()-1
Response.CacheControl="no-cache"
%>
<%
Dim StartTime,EndTime
StartTime=timer() '创建一个计时器,单位:毫秒,页面开始执行时间
%>
<%server.ScriptTimeout=1800%>
<%
MM_authorizedUsers=""
MM_authFailedURL="../../index.asp"
MM_grantAccess=false
If Session("userssdfgfhtrh") <> "" Then
If (true Or CStr(Session("MM_UserAuthorization"))="") Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
<!--#include file="../shenpi/upload_5xsoft.inc"-->
<!--#include file="../../Connections/oavbsconn.asp" -->
<!--#include file="../../Connections/ifr/ifrasp.asp" -->
<%'on error resume next
Server.ScriptTimeout=900
dim upload,file,formName,formPath,iCount,fileformat
set upload=new upload_5xSoft
fawenupid=upload.form("id")
%>
<%dim beizhu,fasongren,qianfa,tof,shengaoren,wenjianbiaoti,bianhao,nigaoren,jimichengdu,yinfariqi,fenshu,zhusongjiguan,chaosongjiguan,zhutici,daziren,jiaoduiren
formPath=upload.form("filepath")
content=upload.form("content")
fasongren=session("names")
qianfaimg=upload.form("qianfaimg")
shenheimg=upload.form("shenheimg")
if upload.form("tof")<>"" then
tof="是"
else
tof="否"
end if
qianfa=upload.form("签发")
shengaoren=upload.form("审稿人")
wenjianbiaoti=upload.form("文件标题")
bianhao=upload.form("编号")
nigaoren=upload.form("拟稿人")
jimichengdu=upload.form("机密程度")
yinfariqi=upload.form("印发日期")
fenshu=upload.form("共印份数")
zhusongjiguan=upload.form("主送机关")
chaosongjiguan=upload.form("抄送机关")
zhutici=upload.form("主题词")
daziren=upload.form("打字人")
jiaoduiren=upload.form("校对人")
beizhu=upload.form("备注")
%>
<%
Dim s__q
s__q = "1"
If (upload.form("qianfaimg") <> "") Then
s__q = upload.form("qianfaimg")
End If
%>
<%
Dim s1__s
s1__s = "1"
If (upload.form("shenheimg") <> "") Then
s1__s = upload.form("shenheimg")
End If
%>
<%
Dim s
Dim s_numRows
Set s = Server.CreateObject("ADODB.Recordset")
s.ActiveConnection = MM_oavbsconn_STRING
s.Source = "SELECT fawenforimg as p FROM usertertggbng WHERE (usersdsfg56 = '" + Replace(s__q, "'", "''") + "' or names='" + Replace(s__q, "'", "''") + "') ORDER BY usersdsfg56 ASC"
s.CursorType = 0
s.CursorLocation = 2
s.LockType = 1
s.Open()
s_numRows = 0
%>
<%if not s.eof or not s.bof then
dim p
p=s("p")
end if%>
<%
Dim s1
Dim s1_numRows
Set s1 = Server.CreateObject("ADODB.Recordset")
s1.ActiveConnection = MM_oavbsconn_STRING
s1.Source = "SELECT fawenforimg as p FROM usertertggbng WHERE (usersdsfg56 = '" + Replace(s1__s, "'", "''") + "' or names='" + Replace(s1__s, "'", "''") + "') ORDER BY usersdsfg56 ASC"
s1.CursorType = 0
s1.CursorLocation = 2
s1.LockType = 1
s1.Open()
s1_numRows = 0
%>
<%if not s1.eof or not s1.bof then
dim p1
p1=s1("p")
end if%>
<%
s1.Close()
Set s1 = Nothing
%>
<%
s.Close()
Set s = Nothing
%>
<%if upload.form("filepath")<>"" then %>
<%
if right(formPath,1)<>"/" then formPath=formPath&"/"
iCount=0
for each formName in upload.file ''列出所有上传了的文件
set file=upload.file(formName) ''生成一个文件对象
fileformat="."&Mid(file.filename,InStrRev(file.filename,".")+1)
fileformatxz="."&Mid(file.filename,InStrRev(file.filename,".")+1)%>
<!--#include FILE="../gw/ftyepseesrfgtsf.asp"-->
<%
dim flength,fpath,fname
if file.FileSize>0 then
flength=cint(file.FileSize/1024)
fpath=formPath&File.FileName
fname=file.FileName
session("fnames")=fname
Dim datalog__MMColParam '先验证,再上传
datalog__MMColParam = "1"
If (file.FileName <> "") Then
datalog__MMColParam = file.FileName
End If
Dim datalog__vargeter
datalog__vargeter = "1"
If (upload.form("接收部门") <> "") Then
datalog__vargeter = upload.form("接收部门")
End If
Dim datalog
Dim datalog_numRows
Set datalog = Server.CreateObject("ADODB.Recordset")
datalog.ActiveConnection = MM_oavbsconn_STRING
datalog.Source = "SELECT * FROM fawenfiles WHERE 文件名 = '" + Replace(datalog__MMColParam, "'", "''") + "'"
datalog.CursorType = 0
datalog.CursorLocation = 3
datalog.LockType = 3
datalog.Open()
if not datalog.eof then
response.Redirect("../gw/wrong.asp")
end if
on error resume next
file.SaveAs Server.mappath(formPath&file.FileName) ''保存文件
if err.number<>0 then
response.write"<script>alert('"&Session("names")&"很抱歉,您上传的文件"&file.FileName&"含有,.;等非法字符,请去掉该类字符继续上传,谢谢!');location='"&request.ServerVariables("HTTP_REFERER")&"'</script>"
response.end()
end if
iCount=iCount+1
dim total
total=1
dim ks
ks="k"
%>
<%
do while total<=iCount and datalog.eof
datalog.addnew
datalog("邮件编号")=upload.form("id")
total=total+1
datalog("文件名")= fname
datalog("文件路径")=fpath
datalog("上传人帐号")=Session("userssdfgfhtrh")
if flength=0 then
flength=1
end if
datalog("文件大小")=flength&"KB"
datalog.update
datalog_numRows = 0
loop
end if
set file=nothing
next
Set datalog = Nothing
set upload=nothing
Htmend iCount&" 个文件上传结束!"
sub HtmEnd(Msg)
set upload=nothing
end sub
%>
<%
end if
%>
<%
Dim Recordset1__u
Recordset1__u = "1"
If (Session("userssdfgfhtrh") <> "") Then
Recordset1__u = Session("userssdfgfhtrh")
End If
%>
<%
Dim Recordset1__MMColParam1
Recordset1__MMColParam1 = "1"
If ("|"&session("names") <> "") Then
Recordset1__MMColParam1 = "|"&session("names")
End If
%>
<%
Dim Recordset1__d
Recordset1__d = "1"
If (fawenupid <> "") Then
Recordset1__d = fawenupid
End If
%>
<%
dim ip
ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If ip = "" Then ip = Request.ServerVariables("REMOTE_ADDR")
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT * FROM fawen WHERE (添加人帐号 = '" + Replace(Recordset1__u, "'", "''") + "' or 审稿人 like '%" + Replace(Recordset1__MMColParam1, "'", "''") + "%' or 签阅人 like '%" + Replace(Recordset1__MMColParam1, "'", "''") + "%') and fawen.id=" + Replace(Recordset1__d, "'", "''") + " and 开关='是' ORDER BY fawen.id desc"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
if not Recordset1.eof or not Recordset1.bof then
dim p11
p11=Recordset1("接收人")
Recordset1("签发")=qianfa
Recordset1("内容")=content
'Recordset1("审稿人")=shengaoren
Recordset1("文件标题")=wenjianbiaoti
Recordset1("编号")=bianhao
Recordset1("拟稿人")=nigaoren
Recordset1("机密程度")=jimichengdu
Recordset1("印发日期")=yinfariqi
Recordset1("共印份数")=fenshu
Recordset1("主送机关")=zhusongjiguan
Recordset1("抄送机关")=chaosongjiguan
Recordset1("主题词")=zhutici
Recordset1("打字人")=daziren
Recordset1("校对人")=jiaoduiren
Recordset1("添加年份")=year(now())
Recordset1("添加月份")=month(now())
Recordset1("添加日")=day(now())
Recordset1("添加ip")=ip
Recordset1("备注")=beizhu
Recordset1("发送人")=fasongren
Recordset1("最后更新ip")=ip
Recordset1("最后更新日期")=date()
Recordset1("最后更新时间")=now()
Recordset1("最后更新年份")=year(now())
Recordset1("最后更新月份")=month(now())
Recordset1("最后更新日")=day(now())
Recordset1("签名帐号")=qianfaimg
Recordset1("审核帐号")=shenheimg
if qianfaimg<>"" then
Recordset1("导入签发图片")=p
end if
if shenheimg<>"" then
Recordset1("导入审稿图片")=p1
end if
Recordset1.update
Recordset1_numRows = 0
%>
<%
else
end if
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%session("shenpishiyou")=wenjianbiaoti
session("shenqingren")=shengqingren
%>
<script>
{
alert("发文修改成功。");history.go(-2)
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -