⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 redirect.asp

📁 本oa系统内部短信.手机短信.文件传输.公文收发.邮件服务.共享下载.内部论坛等功能
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<%  
Response.ExpiresAbsolute=now()-1
Response.CacheControl="no-cache"
%>
<%
' *** Restrict Access To Page: Grant or deny access to this page
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" -->
<%

if(request("id") <> "") then Command1__d = request("id")

if(session("names") <> "") then Command1__u = session("names")

%>
<%

if(session("names") <> "") then Command2__u = session("names")

if(request("id") <> "") then Command2__d = request("id")

%>
<%dim id,url,n
id=request("id")
url=request("path")
n=request("name")

%><%
  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 ip
ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR") 
If ip = "" Then ip = Request.ServerVariables("REMOTE_ADDR")
%>
<%
Dim u__MMColParam
u__MMColParam = "1"
If (Request("ID") <> "") Then 
  u__MMColParam = Request("ID")
End If
%>
<%
Dim u
Dim u_numRows
Set u = Server.CreateObject("ADODB.Recordset")
u.ActiveConnection = MM_oavbsconn_STRING
u.Source = "SELECT 上传人帐号  FROM 文件信息  WHERE ID = " + Replace(u__MMColParam, "'", "''") + ""
u.CursorType = 0
u.CursorLocation = 2
u.LockType = 1
u.Open()
u_numRows = 0
%>
<%if not u.eof or not u.bof then
dim u1
u1=u("上传人帐号")
end if%>
<%
u.Close()
Set u = Nothing
%>
<%
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("上传人帐号")=u1
yidu.update
session("fread")="yes"
yidu_numRows = 0
%>
<%
yidu.Close()
Set yidu = Nothing
%>
<%
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_oavbsconn_STRING
Command1.CommandText = "UPDATE 文件信息  SET 阅读次数=阅读次数+1 WHERE id=" + Replace(Command1__d, "'", "''") + " and 接收人姓名='" + Replace(Command1__u, "'", "''") + "' and 接收人是否删除='否' "
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
%>
<%
set Command2 = Server.CreateObject("ADODB.Command")
Command2.ActiveConnection = MM_oavbsconn_STRING
Command2.CommandText = "UPDATE 文件信息   SET 是否阅读='是'  WHERE id=" + Replace(Command2__d, "'", "''") + " and 接收人姓名='" + Replace(Command2__u, "'", "''") + "' and 接收人是否删除='否'"
Command2.CommandType = 1
Command2.CommandTimeout = 0
Command2.Prepared = true
Command2.Execute()
%>
<%
Dim huizhi__MMColParam
huizhi__MMColParam = "1"
If (Request("ID") <> "") Then 
  huizhi__MMColParam = Request("ID")
End If
%>
<%
Dim huizhi__u
huizhi__u = "1"
If (Session("names")  <> "") Then 
  huizhi__u = Session("names") 
End If
%>
<%
Dim huizhi
Dim huizhi_numRows
Set huizhi = Server.CreateObject("ADODB.Recordset")
huizhi.ActiveConnection = MM_oavbsconn_STRING
huizhi.Source = "SELECT 是否回执,是否阅读,回执结果,接收人部门,文件名,接收人姓名,上传人姓名  FROM 文件信息  WHERE ID = " + Replace(huizhi__MMColParam, "'", "''") + " and 接收人姓名='" + Replace(huizhi__u, "'", "''") + "'"
huizhi.CursorType = 0
huizhi.CursorLocation = 2
huizhi.LockType = 3
huizhi.Open()
huizhi_numRows = 0

%>
<%dim juti
juti="阅读"%>
<%if not huizhi.eof or not huizhi.bof then%>
<%if huizhi("回执结果")="无" then %>

<% if huizhi("是否回执")="是" then %>
<%on error resume next
huizhi("回执结果")="成功"
huizhi.update
%>
<!--#include file="../../../../../toall/sms/writeforeadfielsehuizhi.asp" -->


<%end if%>
<%end if%>
<%end if%>
<%
huizhi.Close()
Set huizhi = Nothing
%>
<%response.redirect url%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -