updateshenpimyfddafornigaoren.asp

来自「绿叶oa系统办公自动化 2008.工作日志管理,文件管理」· ASP 代码 · 共 432 行 · 第 1/2 页

ASP
432
字号
<%@LANGUAGE="VBSCRIPT"%>
<%'on error resume next
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="../../Connections/oavbsconn.asp" -->
<%
Dim r__MMColParam
r__MMColParam = "1"
If ("|"&session("names")  <> "") Then 
  r__MMColParam = "|"&session("names") 
End If
%>
<%
Dim r__d
r__d = "1"
If (request("id") <> "") Then 
  r__d = request("id")
End If
%>
<%
Dim r__u
r__u = "1"
If (Session("userssdfgfhtrh") <> "") Then 
  r__u = Session("userssdfgfhtrh")
End If
%>
<%
Dim r
Dim r_numRows
Set r = Server.CreateObject("ADODB.Recordset")
r.ActiveConnection = MM_oavbsconn_STRING
r.Source = "SELECT *  FROM shouwen  WHERE (审稿人 like '%" + Replace(r__MMColParam, "'", "''") + "%' or 签阅人 like '%" + Replace(r__MMColParam, "'", "''") + "%' or 添加人帐号='" + Replace(r__u, "'", "''") + "') and shouwen.id=" + Replace(r__d, "'", "''") + "   ORDER BY 最后更新时间 desc,id desc"
r.CursorType = 0
r.CursorLocation = 2
r.LockType = 3
r.Open()
r_numRows = 0
session("shouwenupid")=request("id")
%>
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If ("|"&session("names") <> "") Then 
  Recordset1__MMColParam = "|"&session("names")
End If
%>
<%
Dim Recordset1__d
Recordset1__d = "1"
If (request("id") <> "") Then 
  Recordset1__d = request("id")
End If
%>
<%
Dim Recordset1__u
Recordset1__u = "1"
If (Session("userssdfgfhtrh") <> "") Then 
  Recordset1__u = Session("userssdfgfhtrh")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT shouwenfiles.文件名,文件上传时间,shouwenfiles.上传人姓名,shouwenfiles.上传人部门,shouwenfiles.文件路径,shouwenfiles.id,shouwenfiles.邮件编号  FROM shouwen inner join shouwenfiles on shouwenfiles.邮件编号=shouwen.id  WHERE (审稿人 like '%" + Replace(Recordset1__MMColParam, "'", "''") + "%' or 签阅人 like '%" + Replace(Recordset1__MMColParam, "'", "''") + "%' or 添加人帐号='" + Replace(Recordset1__u, "'", "''") + "') and shouwen.id=" + Replace(Recordset1__d, "'", "''") + "   ORDER BY shouwen.id desc"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim jimi
Dim jimi_numRows
Set jimi = Server.CreateObject("ADODB.Recordset")
jimi.ActiveConnection = MM_oavbsconn_STRING
jimi.Source = "SELECT * FROM 机密程度"
jimi.CursorType = 0
jimi.CursorLocation = 2
jimi.LockType = 1
jimi.Open()
jimi_numRows = 0
%>
<%
Dim Recordset2__u
Recordset2__u = "1"
If (Session("userssdfgfhtrh") <> "") Then 
  Recordset2__u = Session("userssdfgfhtrh")
End If
%>
<%
Dim Recordset2
Dim Recordset2_numRows
Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_oavbsconn_STRING
Recordset2.Source = "SELECT *  FROM xzgwqianmingdata  WHERE useriddsfs='" + Replace(Recordset2__u, "'", "''") + "' and applying='是'"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()
Recordset2_numRows = 0
%>
 <%if not Recordset2.eof or not Recordset2.bof then
 dim p1
 p1=Recordset2.Fields.Item("imgurl").Value
end if%>
		
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<html>
<head>
<style type="text/css">
<!--
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
.style6 {font-size: 12px}
-->
</style>
<script language="JavaScript" src="/toall/gw/swfj.js"></script>
<script language="JavaScript" src="/toall/gw/shouwen.js"></script>
<script language=javascript>


var upfj;
upfj=0;           //上传附件没有错误
//--------------------------------send fujian file------------------------------
function sendfj(fileid){
   var NameUrl="<%=NameUrl%>"               //保存公文文件url路径
	var FjUrl="<%=FjUrl%>"                  //保存附件文件url路径
	var FjDelUrl="<%=FjDelUrl%>"                  //上传失败删除临时文件

	var MaxSize="<%=session("MaxSize")%>"   //限制上传附件文件的大小 
	var fileform = document.submitinput;
	PsoPath=fileform.elements[fileid].value
	//PsoPath=document.submitinput.filefj0.value
	PsoFile=PsoPath                     //定义附件的文件名
	PsoType=""
    while(PsoFile.indexOf("\\")>0)             //获得附件的文件名
    { 
     i = PsoFile.indexOf("\\") 
     PsoFile = PsoFile.substring(i + 1, PsoFile.length); 
    }                                //获得附件的文件名
	 PsoPath=PsoPath.substring(0,PsoPath.lastIndexOf("\\"))   //获得附件的路径
	 PsoType=PsoFile
	 if (PsoType.lastIndexOf(".")>0)              //获得附件的扩展名
     { 
     i = PsoType.lastIndexOf(".") 
     PsoType = PsoType.substring(i + 1, PsoType.length); 
     } 

   result=form.web.upload(FjUrl,PsoFile,PsoPath,MaxSize)  //向服务器上传附件
   //document.submitinput.fujian.value=PsoFile
  if (!result)
  {
  
   result=form.web.sendurl(FjDelUrl,"","");             //删除前面上传的临时文件
   alert("上传附件失败或附件不存在!");
   fileform.elements[fileid].focus();
   upfj=1;
   return false;                             //上传附件失败,返回起草公文页面
   }
   else{
   result=form.web.sendurl(NameUrl,PsoFile,PsoType)
   }
}
//------------------end function-------------------------------------------------------
function checkform() {
upfj=0;

//-------发送附件
var fileform = document.submitinput;              //调用上传附件函数
	for ( var i= 0 ; i <fileform.elements.length ; i ++ ) {				    
		if ( fileform.elements[i].type == "file" && fileform.elements[i].name !="file" ) {
			if (fileform.elements[i].value!="") {
				sendfj(i);
				if(upfj==1) return false;
			}
		}
	}//for
//--------发送附件
document.submitinput.submit()

⌨️ 快捷键说明

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