📄 transfer_documents.asp
字号:
<!--#include file="../config.asp"-->
<!--#include file="../inc/check_login.asp"-->
<!--#include file="../inc/functions.asp"-->
<%
Application_ID = 2000200 '本功能编号,含义请查看编码表
if not CheckAuth(Session("Employee_ID"),Application_ID) then '验证权限
Server.Transfer "../err/un_authorized.htm"
response.end
end if
%>
<!--**************身份验证部分****************-->
<%
'response.end
str = Request.ServerVariables("QUERY_STRING")
aryQueryStr = split(str,"&",-1,1)
c = UBound(aryQueryStr,1)
aryProject_ID = split(aryQueryStr(c - 1),"=",-1,1)
Project_ID = aryProject_ID(1) '项目编号
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
conn.open connstr
'on error resume next
'逐个拷贝到项目文档
for i = 0 to c - 2
ary = split(aryQueryStr(i),"=",-1,1)
'取得源文档编号
Source_Document_ID = ary(1)
'拷贝文档内容
sql = "sp_Document_Copy_Customer_Documents_To_Project_Documents " & Source_Document_ID & "," & Project_ID & "," & Session("Employee_ID")
set rs = conn.execute(sql)
Document_Type = rs("Document_Type") '新文档附件
New_Document_ID = rs("Document_ID") '新文档编号
'如果有附件拷贝附件
if len(trim(Document_Type)) > 1 then
Source_File = Server.mappath("../upload_documents/attch_" & Source_Document_ID & "." & Document_Type)
New_File = Server.mappath("../upload_documents/attch_" & New_Document_ID & "." & Document_Type)
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile Source_File,New_File
set fso = nothing
end if
next
set rs = nothing
conn.close
set conn = nothing
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>
成功添加项目文档!
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -