📄 redirect.asp
字号:
<%
Dim StartTime,EndTime
StartTime=timer()
%>
<%
Response.ExpiresAbsolute=now()-1
Response.CacheControl="no-cache"
%>
<%
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="../../../../../Connections/oavbsconn.asp" -->
<%
Dim files__u
files__u = "1"
If (Session("userssdfgfhtrh") <> "") Then
files__u = Session("userssdfgfhtrh")
End If
%>
<%
Dim files__many
files__many = "1"
If ("|"&Session("names")&"|" <> "") Then
files__many = "|"&Session("names")&"|"
End If
%>
<%
Dim files__MMColParam,c,id,n,ip
c=request("c")
ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If ip = "" Then ip = Request.ServerVariables("REMOTE_ADDR")
id=request("id")
n=request("name")
%>
<%
files__MMColParam = "1"
If (Session("names") <> "") Then
files__MMColParam = Session("names")
End If
%>
<%
Dim files__d
files__d = "1"
If (request("id") <> "") Then
files__d = request("id")
End If
%>
<%
Dim files__bumen
files__bumen = "1"
If (session("bumen")&"," <> "") Then
files__bumen = session("bumen")&","
End If
%>
<%
dim s_filename
Dim files
Dim files_numRows
dim varfnames'下载部分使用
Set files = Server.CreateObject("ADODB.Recordset")
files.ActiveConnection = MM_oavbsconn_STRING
files.Source = "SELECT * FROM 文件信息 WHERE ((接收人姓名 = '" + Replace(files__MMColParam, "'", "''") + "' and manygeterdel not like '%" + Replace(files__many, "'", "''") + "%') or (manygeter like '%" + Replace(files__many, "'", "''") + "%'and manygeterdel not like '%" + Replace(files__many, "'", "''") + "%') or (manygeter like '%" + Replace(files__bumen, "'", "''") + "%'and manygeterdel not like '%" + Replace(files__many, "'", "''") + "%') or (manygeter='对所有人群发' and manygeterdel not like '%" + Replace(files__many, "'", "''") + "%') or ( 接收人姓名='对所有人群发' and manygeterdel not like '%" + Replace(files__many, "'", "''") + "%') or (上传人帐号='" + Replace(files__u, "'", "''") + "')) and id=" + Replace(files__d, "'", "''") + " ORDER BY ID DESC"
files.CursorType = 0
files.CursorLocation = 2
files.LockType = 3
files.Open()
%>
<%if not files.eof or not files.bof then
dim url,n1,bm,fn
bm=files("上传人部门")
n1=files("上传人姓名")
url=files("文件路径")
readers=files("reader")
fn=files("文件名")
if files("manygeter")="1" then
files("是否阅读")="是"
end if
if readers="无" then
files("reader")="|"&session("names")&"|"
else
if instr(readers,"|"&session("names")&"|")=0 then
files("reader")=readers&session("names")&"|"
end if
end if
files("阅读次数")=files("阅读次数")+1
files.update
%>
<%if files("回执结果")="无" then %>
<% if files("是否回执")="是" then %>
<%'on error resume next
files("回执结果")="成功"
files.update
%>
<%
Dim r1__MMColPar1am
r1__MMColPar1am = "1"
If (id <> "") Then
r1__MMColPar1am = id
End If
%>
<%
Dim r1
Dim r1_numRows
Set r1 = Server.CreateObject("ADODB.Recordset")
r1.ActiveConnection = MM_oavbsconn_STRING
r1.Source = "SELECT 上传人部门 FROM 文件信息 WHERE ID = " + Replace(r1__MMColPar1am, "'", "''") + ""
r1.CursorType = 0
r1.CursorLocation = 3
r1.LockType = 1
r1.Open()
r1_numRows = 0
%>
<%
Dim Recor1dset22__d
Recor1dset22__d = "1"
If (id <> "") Then
Recor1dset22__d = id
End If
%>
<%
Dim Recor1dset22
Dim Recor1dset22_numRows
Set Recor1dset22 = Server.CreateObject("ADODB.Recordset")
Recor1dset22.ActiveConnection = MM_oavbsconn_STRING
Recor1dset22.Source = "SELECT 标题,内容,接收人姓名,sms接收部门,文件名,发送人姓名,文件编号,发送人帐号,入库日期,信息属性,sms发送人level,发送人部门,sms是否为群发,回执 FROM infoall where 文件编号=" + Replace(Recor1dset22__d, "'", "''") + ""
Recor1dset22.CursorType = 0
Recor1dset22.CursorLocation = 3
Recor1dset22.LockType = 3
Recor1dset22.Open()
Recor1dset22.addnew
Recor1dset22("标题")=session("names")&":"&fn&"文件收到"
Recor1dset22("内容")="你好!你发送给"&files("manygeter")&"--"& files("manygeter")&":"&fn&"的文件收到,谢谢!"
Recor1dset22("接收人姓名")=n1
Recor1dset22("发送人姓名")=session("names")
Recor1dset22("发送人帐号")=Session("userssdfgfhtrh")
Recor1dset22("入库日期")=date()
Recor1dset22("信息属性")="短消息"
Recor1dset22("sms发送人level")=Session("levels")
Recor1dset22("发送人部门")=session("bumen")
Recor1dset22("sms是否为群发")="否"
Recor1dset22("sms接收部门")=r1("上传人部门")
Recor1dset22("回执")="文件"
Recor1dset22("文件名")=fn
Recor1dset22("文件编号")=id
Recor1dset22.update
Recor1dset22_numRows = 0
%>
<%
Recor1dset22.Close()
Set Recor1dset22 = Nothing
%>
<%
r1.Close()
Set r1 = Nothing
%>
<%end if%>
<%end if%>
<%
files.Close()
Set files = Nothing
else
files.Close()
Set files = Nothing
%>
<script>
{
alert("文件记录不存在。");history.go(-1)
}
</script>
<%response.end()
end if%>
<%
if(request("id") <> "") then Command1__d = request("id")
if(session("names") <> "") then Command1__u = session("names")
%>
<%
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
If not objFSO.FileExists(Server.MapPath(url)) Then%>
<%
response.write"<script>alert('"&Session("names")&"很抱歉,您要的 "&n&" 文件在服务器上未找到!')</script>"
%>
<script>
{
window.close()
}
</script>
<%
response.end()
End If%>
<%
Dim yidu
Dim yidu_numRows
Set yidu = Server.CreateObject("ADODB.Recordset")
yidu.ActiveConnection = MM_oavbsconn_STRING
yidu.Source = "SELECT 文件ID,阅读人帐号,阅读人姓名,上传人帐号, 阅读人部门, 阅读IP, 阅读时间, 阅读日期 FROM 文件阅读明细wtrhy6wtrgvr467htyhgt"
yidu.CursorType = 0
yidu.CursorLocation = 3
yidu.LockType = 3
yidu.Open()
yidu.addnew
yidu("文件ID")=id
yidu("阅读人帐号")=session("userssdfgfhtrh")
yidu("阅读人姓名")=session("names")
yidu("阅读人部门")=session("bumen")
yidu("阅读ip")=ip
yidu("阅读时间")=now()
yidu("阅读日期")=date()
yidu("上传人帐号")=c
yidu.update
yidu_numRows = 0
%>
<%
yidu.Close()
Set yidu = Nothing
%>
<%EndTime=timer()
fts=EndTime-StartTime
'response.write fts
%>
<%
response.redirect url%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -