doshenpideatilvbgfforprint.asp

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

ASP
447
字号
<%@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" -->
<%
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
Dim r_numRows

Set r = Server.CreateObject("ADODB.Recordset")
r.ActiveConnection = MM_oavbsconn_STRING
r.Source = "SELECT *  FROM fawen  WHERE 接收人 like '%" + Replace(r__MMColParam, "'", "''") + "%' and fawen.id=" + Replace(r__d, "'", "''") + "  ORDER BY fawen.id desc"
r.CursorType = 0
r.CursorLocation = 2
r.LockType = 3
r.Open()


r_numRows = 0
%>
<%if not r.bof or not r.eof then

r("点击")=r("点击")+1
r.update
dim b
b=r("备注")

%>
<%
Dim Recordset11__MMColParam
Recordset11__MMColParam = "1"
If ("|"&session("names")    <> "") Then 
  Recordset11__MMColParam = "|"&session("names")   
End If
%>
<%
Dim Recordset11__d
Recordset11__d = "1"
If (request("id") <> "") Then 
  Recordset11__d = request("id")
End If
%>
<%
Dim Recordset11
Dim Recordset11_numRows

Set Recordset11 = Server.CreateObject("ADODB.Recordset")
Recordset11.ActiveConnection = MM_oavbsconn_STRING
Recordset11.Source = "SELECT fawenfiles.文件名,fawenfiles.文件路径,fawenfiles.id,fawenfiles.邮件编号  FROM fawen inner join fawenfiles on fawenfiles.邮件编号=fawen.id  WHERE 接收人 like '%" + Replace(Recordset11__MMColParam, "'", "''") + "%' and fawen.id=" + Replace(Recordset11__d, "'", "''") + "  ORDER BY fawen.id desc"
Recordset11.CursorType = 0
Recordset11.CursorLocation = 2
Recordset11.LockType = 1
Recordset11.Open()

Recordset11_numRows = 0
%>
<%
Dim Recordset3__u
Recordset3__u = "1"
If (Session("userssdfgfhtrh") <> "") Then 
  Recordset3__u = Session("userssdfgfhtrh")
End If
%>
<%
Dim Recordset3__d
Recordset3__d = "1"
If (request("id") <> "") Then 
  Recordset3__d = request("id")
End If
%>
<%
Dim Recordset3
Dim Recordset3_numRows

Set Recordset3 = Server.CreateObject("ADODB.Recordset")
Recordset3.ActiveConnection = MM_oavbsconn_STRING
Recordset3.Source = "SELECT id  FROM fawenyijian  WHERE 审批人帐号='" + Replace(Recordset3__u, "'", "''") + "' and 审批id=" + Replace(Recordset3__d, "'", "''") + "  ORDER BY ID DESC"
Recordset3.CursorType = 0
Recordset3.CursorLocation = 2
Recordset3.LockType = 1
Recordset3.Open()

Recordset3_numRows = 0
%>
<%
Dim Recordset2__d
Recordset2__d = "1"
If (request("id") <> "") Then 
  Recordset2__d = request("id")
End If
%>
<%
Dim Recordset2
Dim Recordset2_numRows

Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_oavbsconn_STRING
Recordset2.Source = "SELECT *  FROM fawenyijian  WHERE 审批ID=" + Replace(Recordset2__d, "'", "''") + "  ORDER BY 最后更新时间 desc ,ID DESC"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()

Recordset2_numRows = 0
%>
<%
Dim Recordset21__u
Recordset21__u = "1"
If (Session("userssdfgfhtrh") <> "") Then 
  Recordset21__u = Session("userssdfgfhtrh")
End If
%>
<%
Dim Recordset21
Dim Recordset21_numRows
Set Recordset21 = Server.CreateObject("ADODB.Recordset")
Recordset21.ActiveConnection = MM_oavbsconn_STRING
Recordset21.Source = "SELECT *  FROM xzgwqianmingdata  WHERE useriddsfs='" + Replace(Recordset21__u, "'", "''") + "' and applying='是'"
Recordset21.CursorType = 0
Recordset21.CursorLocation = 2
Recordset21.LockType = 1
Recordset21.Open()
Recordset21_numRows = 0
%>
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request("id") <> "") Then 
  Recordset1__MMColParam = Request("id")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT *  FROM fawenshenimg  WHERE 发文id = '" + Replace(Recordset1__MMColParam, "'", "''") + "'"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
Recordset11_numRows = Recordset11_numRows + Repeat1__numRows
%>
<%
Dim Repeat3__numRows
Dim Repeat3__index

Repeat3__numRows = -1
Repeat3__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat3__numRows
%>
<%
Dim Repeat2__numRows
Dim Repeat2__index

Repeat2__numRows = -1
Repeat2__index = 0
Recordset2_numRows = Recordset2_numRows + Repeat2__numRows
%>
<%
function HTMLEncode(fString)
	fString = replace(fString, ">", "&gt;")
	fString = replace(fString, "<", "&lt;")
	fString = Replace(fString, CHR(13), "")
	fString = replace(fString,chr(32),"&nbsp;")
	fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
	fString = Replace(fString, CHR(10), "<BR>")
	HTMLEncode = fString
end function
%>
<style type="text/css">
<!--
.style36 {font-size: 13px;
	color: #FFFFFF;
	font-weight: bold;
}
.style5 {color: #FFFFFF}
-->
</style>
<link href="../../css/link1.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style12 {font-size: 12px}
.style2 {font-size: 13px}
.style39 {color: #FF0000}
.style38 {color: #FFFFFF;
	font-size: 14px;
	font-weight: bold;
}
-->
</style>
<script>
<!--
function dis(){
document.form1.submit.value='正在发送'
document.form1.submit.disabled=true;
return true;
}
function check() {
if (document.form1.yijian.value=="") {
window.alert ("请您输入审批意见 !")
document.form1.yijian.focus()
return false
}if (document.form1.yijian.value.length>65535) {
window.alert ("审批意见字符超出数据库极限,系统最多接受65535个字符 !")
document.form1.yijian.focus()
return false
}
return true
}
//-->
</SCRIPT>

<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="6" height="20"><img src="/img/bbs/leftlin1red.gif" width="6" height="20"></td>
    <td width="936" height="20" bgcolor="#FF3333"><div align="center" class="style38"><span class="style5"><span class="style13 style5 style6"><span class="style36">办 理 发 文 审 批 </span></span></span></div></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><form action="upforsubmitadf.asp" method="post" enctype="multipart/form-data" name="submitinput" id="submitinput">
        <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#FF0000">
          <tr bgcolor="#FFFFFF">
            <td width="10%"><div align="right">文件标题:</div></td>
            <td width="42%"><%=(r.Fields.Item("文件标题").Value)%>  </td>
            <td width="48%"> 编号:<%=(r.Fields.Item("编号").Value)%>   拟稿人:<%=(r.Fields.Item("拟稿人").Value)%>   </td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td><div align="right">机密程度: </div></td>
            <td><%=(r.Fields.Item("机密程度").Value)%>       印发日期:<%=(r.Fields.Item("印发日期").Value)%>         </td>
            <td> 共印份数:<%=(r.Fields.Item("共印份数").Value)%> 份</td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td><div align="right">主送机关:</div></td>
            <td><%=(r.Fields.Item("主送机关").Value)%></td>
            <td>抄送机关: <%=(r.Fields.Item("主送机关").Value)%></td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td><div align="right">主题词:</div></td>
            <td><%=(r.Fields.Item("主题词").Value)%></td>
            <td>&nbsp;</td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td><div align="right">打字人:</div></td>
            <td><%=(r.Fields.Item("打字人").Value)%></td>
            <td>校对人: <%=(r.Fields.Item("校对人").Value)%> </td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td><div align="right">发文内容:</div></td>
            <td colspan="2" valign="baseline">              <%=(r.Fields.Item("内容").Value)%></td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td><div align="right">签阅意见:</div></td>
            <td colspan="2" valign="baseline"><% 
While ((Repeat2__numRows <> 0) AND (NOT Recordset2.EOF)) 
%>
      <% If Not Recordset2.EOF Or Not Recordset2.BOF Then %>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr><%session("shenpiid")=r("id")%>
          <td style="word-break:break-all;Width:fixed">&nbsp;
            <hr width="95%" size="1" color="#5AAE18" height="1">
          &nbsp;审批意见:<%=HTMLEncode(Recordset2.Fields.Item("审批意见").Value)%><br>
                                                          审批人:<a href="#" title="审批人:<%=Recordset2("审批人姓名")%>&nbsp;&nbsp;部门:<%=Recordset2("审批人部门")%>"><%=(Recordset2.Fields.Item("审批人姓名").Value)%></a><br>
                                                           
        <%if Recordset2("最后更新日期")="2006-10-1" then %><%=(Recordset2.Fields.Item("审批时间").Value)%><%else%>
        <span class="style39">更新:<%=(Recordset2.Fields.Item("最后更新时间").Value)%></span>
        <%end if%></td>
        </tr>
      </table>
      <% End If ' end Not Recordset2.EOF Or NOT Recordset2.BOF %>
      <% 
  Repeat2__index=Repeat2__index+1
  Repeat2__numRows=Repeat2__numRows-1
  Recordset2.MoveNext()
Wend
%></td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td><div align="right">备 注:</div></td>
            <td colspan="2"><%=(r.Fields.Item("备注").Value)%></td>
          </tr>
          <% If Not Recordset11.EOF Or Not Recordset11.BOF Then %>
          <tr bgcolor="#FFFFFF">
            <td><div align="right">附件:</div></td>
            <td colspan="2"><table width="357" border="0" cellspacing="0" cellpadding="0">
                <% 
While ((Repeat1__numRows <> 0) AND (NOT Recordset11.EOF)) 
%>
                <tr>
                  <%p=Recordset11.Fields.Item("文件路径").Value%>
                  <td width="255">&nbsp;<a href="redirect.asp?id=<%=(Recordset11.Fields.Item("id").Value)%>&gwid=<%=(Recordset11.Fields.Item("邮件编号").Value)%>&fpath=<%=p%>" target="_blank"><%=(Recordset11.Fields.Item("文件名").Value)%></a>  <a href="downfile.asp?id=<%=(Recordset11.Fields.Item("id").Value)%>&gwid=<%=(Recordset11.Fields.Item("邮件编号").Value)%>" >下载</a><br/></td>
                </tr>
                <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  Recordset11.MoveNext()
Wend
%>
            </table></td>
          </tr>
          <% End If ' end Not Recordset111.EOF Or NOT Recordset111.BOF %>
          <tr bgcolor="#FFFFFF">
            <td><div align="right">签 发:</div></td>
            <td valign="top" bgcolor="#FFFFFF"><%=(r.Fields.Item("签发").Value)%></td>
            <td valign="top" bgcolor="#FFFFFF">审稿人:  </td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td><div align="right">签发人:</div></td>
            <td valign="top" bgcolor="#FFFFFF"><%dim qianfaimg
			qianfaimg=r("导入签发图片")
			if qianfaimg<>"" then%>
                <a href="<%=qianfaimg%>" target="_blank"><img src="<%=qianfaimg%>" width="150" height="80" border="0"></a>
                <%else%>
                无签名
                <%end if%>
            </td>
            <td valign="middle" bgcolor="#FFFFFF"><table width="275" border="0" cellpadding="0" cellspacing="0">
              <% 
While ((Repeat3__numRows <> 0) AND (NOT Recordset1.EOF)) 
%>
              <tr>
                  <td width="50">审稿人:</td>
                  <td width="197">       <p>
                      <%dim shengaoimg
			shengaoimg=Recordset1("审稿图片路径")%>
                        <a href="<%=shengaoimg%>" target="_blank"><img src="<%=shengaoimg%>" width="150" height="80" border="0"></a>
                       <%=Recordset1("姓名")%>
                  
                        <br>
                  </p>
                  </td>
                  <td width="28">&nbsp;</td>
              </tr>
              <% 
  Repeat3__index=Repeat3__index+1
  Repeat3__numRows=Repeat3__numRows-1
  Recordset1.MoveNext()
Wend
%>

            </table>
                            <% If Recordset1.EOF And Recordset1.BOF Then %>
无签名
<% End If ' end Recordset1.EOF And Recordset1.BOF %>
</td>
          </tr>
         
</table>
    </form></td>
  </tr>
</table>
<table width="334" border="0" cellspacing="0" cellpadding="0">
  <% 
While ((Repeat1__numRows <> 0) AND (NOT Recordset11.EOF)) 
%>
  <tr>
    <td width="301">&nbsp;<a href="redirect.asp?id=<%=(Recordset11.Fields.Item("id").Value)%>&gwid=<%=(Recordset11.Fields.Item("邮件编号").Value)%>&fpath=<%=(Recordset11.Fields.Item("文件路径").Value)%>" target="_blank"><%=(Recordset11.Fields.Item("文件名").Value)%></a>  <br/></td>
    <td width="33"><a href="downfile.asp?id=<%=(Recordset11.Fields.Item("id").Value)%>&gwid=<%=(Recordset11.Fields.Item("邮件编号").Value)%>" >下载</a></td>
  </tr>
  <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  Recordset11.MoveNext()
Wend
%>
</table>
<p>&nbsp;</p>
<p align="center"><a href="getshenlist.asp?id=<%=(r.Fields.Item("id").Value)%>">返回</a> <span class="style2"><a href="javascript:window.print()">我要打印</a></span></p>


<%
r.Close()
Set r = Nothing
%>
<%
Recordset11.Close()
Set Recordset11 = Nothing
%>
<%
Recordset3.Close()
Set Recordset3 = Nothing
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>
<%
Recordset21.Close()
Set Recordset21 = Nothing
%>
<%else%>
<script>
{alert("数据不存在.");history.go(-1)
}
</script>
<%end if%>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>

⌨️ 快捷键说明

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