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

📄 zhuanfaupfileintodatalog.asp

📁 java原碼精致 look after all then good
💻 ASP
字号:
<!--#include file="../../../../../Connections/gongyobngwenjianxitongvbs.asp" -->
<!--#include file="../../../../../Connections/oavbsconn.asp" -->
<%
' *** 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
%>
<%if session("loginstatus")<>"islogined" then
response.Redirect("../../../index.asp")
end if%>
<% if request("bumen")="请选择部门" then %>
<script language="javascript">
{
alert("请选择部门");history.go(-1)
}
</script>
<%response.end
end if%>

<% if request("City")="" then %>
<script language="javascript">
{
alert("请选择接收人");history.go(-1)
}
</script>
<%response.end
end if%>

<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../../../../css/link.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>
<body>
<img src="../../../../../toall/jfoanet/img/978.gif" width="27" height="24">&#25991;&#20214;转发成功...
<hr size=1  color="#5AAE18" noshadow width=700 align=left>
<p><br>
  <br>
  <%
Server.ScriptTimeout=900
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (request.form("City") <> "") Then 
  Recordset1__MMColParam = request.form("City")
End If
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT *  FROM usertertggbng  WHERE names = '" + Replace(Recordset1__MMColParam, "'", "''") + "'"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
if request.form("City")="对所有人群发" then 
formPath="/dataandfiles/files/qunfafiles"
jieshounames="对所有人群发"
jieshoubumen="对所有人群发"
thepathfname=formPath&"/"&request("fname")
 Dim objFSO
  Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
If not objFSO.FileExists(Server.MapPath(p1)) Then
objFSO.CreateFolder(Server.MapPath(p1))   
   End If
  Set objFSO = Nothing      '释放 FileSystemObject 对象实例内存空间
end if

if request.form("City")<>"对所有人群发" then 
formPath=Recordset1("pathaccess")
jieshounames=Recordset1("names")
jieshoubumen=Recordset1("部门")
thepathfname="../../"&Recordset1("getrealpath")&"/"&request("fname")
 Dim objFSO1
  Set objFSO1= Server.CreateObject("Scripting.FileSystemObject")
  If  objFSO1.FolderExists(Server.MapPath(formPath))   Then   
Else   
objFSO1.CreateFolder(Server.MapPath(formPath))
Set objFSO1 = Nothing      '释放 FileSystemObject 对象实例内存空间
response.write"<script>alert('"&upload.form("City")&"个人目录不存在,服务器已经自动为其建立。')</script>'"
End   If   
end if
%>
 <%
Set myfileobject=server.createobject("scripting.filesystemobject")
If not myfileobject.FileExists(Server.MapPath(request.form("fpath"))) Then%>
<script language="javascript">
{
alert("文件不存在,转发失败!");history.go(-2)
}
</script>
<%response.End()
end if%>
<%
dim ks
ks="k"
Dim datalog__MMColParam
datalog__MMColParam = "1"
If (request.form("fname")  <> "") Then 
  datalog__MMColParam = request.form("fname")
End If
Dim datalog__vargeter
datalog__vargeter = "1"
If (request.form("City") <> "") Then 
  datalog__vargeter = request.form("City")
End If
Dim datalogdel
datalogdel = "是"
If (request.form("MM_EmptyValue") <> "") Then 
  datalogdel= request.form("MM_EmptyValue")
End If

Dim datalog
Dim datalog_numRows
Set datalog = Server.CreateObject("ADODB.Recordset")
datalog.ActiveConnection = MM_gongyobngwenjianxitongvbs_STRING
datalog.Source = "SELECT *  FROM 文件信息  WHERE 文件名= '" + Replace(datalog__MMColParam, "'", "''") + "' and 接收人姓名='" + Replace(datalog__vargeter, "'", "''") + "' and 接收人是否删除='否'"
datalog.CursorType = 0
datalog.CursorLocation = 3
datalog.LockType = 3
datalog.Open()
if not datalog.eof then 
response.Redirect("zhuanwrong.asp")
response.end()
else
datalog.addnew
total=total+1
datalog("文件名")= request("fname")
datalog("文件路径")=thepathfname
datalog("上传人帐号")=Session("userssdfgfhtrh")
datalog("接收人姓名")=jieshounames
datalog("上传人姓名")=Session("names")
datalog("上传人部门")=Session("bumen")
datalog("接收人部门")=jieshoubumen
flength=request("daxiao")
datalog("文件大小")=request("daxiao")
datalog.update
 end if
 %>
 

 

<%
set afile=myfileobject.getfile(Server.MapPath(request.form("fpath")))
afile.copy Server.MapPath(thepathfname) 
set myfileobject= nothing
%>
<table width="594" height="109" border="0" cellpadding="6" cellspacing="0">
  <tr>
    <td>转发文件 <span class="style1">&quot;<%=request("fname")%>&quot;</span> 给 <span class="style1"><%=jieshoubumen%>--<%=jieshounames%></span>OK! <img src="../../../mrgreen.gif" width="50" height="50"></td>
  </tr>
  <tr>
    <td><div align="center"><a href="javascript:history.go(-2)">返回</a> </div></td>
  </tr>
</table>
<p>
</body>
</html>
<%
datalog.Close()
Set datalog = Nothing
%>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>

⌨️ 快捷键说明

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