toguidang.asp
来自「绿叶oa系统办公自动化 2008.工作日志管理,文件管理」· ASP 代码 · 共 390 行
ASP
390 行
<%
Response.ExpiresAbsolute=now()-1
Response.CacheControl="no-cache"
%>
<%
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" -->
<%function DbCombox1()
Dim r1
Dim r1_numRows
Set r1 = Server.CreateObject("ADODB.Recordset")
r1.ActiveConnection = MM_oavbsconn_STRING
r1.Source = "SELECT * FROM 归档类别 WHERE 开关='是' ORDER BY 排序 asc"
r1.CursorType = 0
r1.CursorLocation = 2
r1.LockType = 1
r1.Open()
while not r1.eof
msg = msg & "<option value=""" &r1("归档名称") & """>" & r1("归档名称") & "</option>"
r1.movenext
wend
r1.close
set r1 = nothing
DbCombox1 = msg
End function
r1_numRows = 0
%>
<%
Dim r11__d
r11__d = "1"
If (request("id") <> "") Then
r11__d = request("id")
End If
%>
<%
Dim r11__u
r11__u = "1"
If (Session("userssdfgfhtrh") <> "") Then
r11__u = Session("userssdfgfhtrh")
End If
%>
<%
Dim r11
Dim r11_numRows
Set r11 = Server.CreateObject("ADODB.Recordset")
r11.ActiveConnection = MM_oavbsconn_STRING
r11.Source = "SELECT shouwenfiles.文件名,shouwenfiles.文件路径,shouwenfiles.id,shouwenfiles.邮件编号,文件上传时间,上传人姓名,上传人部门 FROM shouwen inner join shouwenfiles on shouwenfiles.邮件编号=shouwen.id WHERE 添加人帐号 ='" + Replace(r11__u, "'", "''") + "' and 拟稿人删除<>'是' and shouwen.id=" + Replace(r11__d, "'", "''") + " ORDER BY shouwen.id desc"
r11.CursorType = 0
r11.CursorLocation = 2
r11.LockType = 1
r11.Open()
r11_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
r11_numRows = r11_numRows + Repeat1__numRows
%>
<%
function DbCombox()
Dim Recordset3
Dim Recordset3_numRows
Set Recordset3 = Server.CreateObject("ADODB.Recordset")
Recordset3.ActiveConnection = MM_oavbsconn_STRING
Recordset3.Source = "SELECT 部门 FROM sms部门表 WHERE 开关='开' and 部门<>'对所有人群发' ORDER BY 排序 asc"
Recordset3.CursorType = 0
Recordset3.CursorLocation = 2
Recordset3.LockType = 1
Recordset3.Open()
while not Recordset3.eof
msg = msg & "<option value=""" &Recordset3("部门") & """>" & Recordset3("部门") & "</option>"
Recordset3.movenext
wend
Recordset3.close
set Recordset3 = nothing
DbCombox = msg
End function
Recordset3_numRows = 0
%>
<%
Dim bumen
Dim bumen_numRows
Set bumen = Server.CreateObject("ADODB.Recordset")
bumen.ActiveConnection = MM_oavbsconn_STRING
bumen.Source = "SELECT 部门 FROM sms部门表 WHERE 开关='开' and 部门<>'对所有人群发' ORDER BY 排序 asc"
bumen.CursorType = 0
bumen.CursorLocation = 2
bumen.LockType = 1
bumen.Open()
bumen_numRows = 0
%>
<%
Dim Repeat111__numRows
Dim Repeat111__index
Repeat111__numRows = -1
Repeat111__index = 0
bumen_numRows = bumen_numRows + Repeat111__numRows
%>
<script language ="javascript" >
Citys = new Array();
<%
Dim shi
Dim shi_numRows
Set shi = Server.CreateObject("ADODB.Recordset")
shi.ActiveConnection = MM_oavbsconn_STRING
shi.Source = "SELECT names,部门 FROM usertertggbng where idzhuangtai='开通' ORDER BY 排序 ASC"
i = 0
shi.CursorType = 0
shi.CursorLocation = 2
shi.LockType = 1
shi.Open()
while not shi.eof
shi_numRows = 0
%>
Citys[<%=i%>] =new Array("<%=shi("部门")%>","<%=shi("names")%>");
<%
i = i + 1
shi.movenext
wend
shi.close
set shi = nothing
%>
function changeselect(selvalue){
var selvalue = selvalue;
var i;
document.form1.City.length = 0 ;
document.form1.City.options[document.form1.City.length] = new Option("请选择对象","");
for (i = 0 ;i <Citys.length;i++){
if(Citys[i][0]==selvalue){
document.form1.City.options[document.form1.City .length] = new Option(Citys[i][1],Citys[i][1]);
}
}
}
</script>
<script language=JavaScript>
function ds(sstr)
{
var dstr="";
for (i=0;i<sstr.length;i++)
{ if (sstr.charAt(i)!=' ') dstr+=sstr.charAt(i);
}
return dstr;
}
function oninput()
{
var rid,title;
rid=ds(document.form1.vattend.value);
title=ds(document.form1.vtitle.value);
//显示日期
document.form1.vtime.value ="";
document.form1.vtime.value +=document.form1.fYear.value + "-"
document.form1.vtime.value +=document.form1.fMonth.value + "-"
document.form1.vtime.value +=document.form1.fDay.value + " "
document.form1.vtime.value +=document.form1.fHour.value + ":"
document.form1.vtime.value +=document.form1.fMinute.value + ""
//对用户是否输入信息进行判断
if((rid=="")||(title==""))
rphtml('vtitle','vplace','vaim','vattendother','vattend','vcompere','vspeaker');
document.form1.submit();
}
function add_users(to)
{
var return_value;
return_value=showModalDialog("../../../toall/gw/userdeptlist.asp?muilt=yes&to=" + to,null,"dialogWidth:25;dialogHeight:16;dialogTop:250;dialogLeft:260;status:no;scrollbars:no;help:no");
if((typeof(return_value)=="undefined") ||(return_value=="*") || (return_value==""))
return;
else
var str1="";
var str2="";
tmpstr=return_value.split("*");
str1=tmpstr[0];
str2=tmpstr[1];
document.form1.all(str2).value=str1 ;
}
</script>
<html>
<head>
<style type="text/css">
<!--
.style5 {color: #FFFFFF}
-->
</style>
<link href="../../css/link.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style41 {color: #999999}
-->
</style>
<script language=javascript>
function dis(){
document.form1.submit1.value='归档..'
document.form1.submit1.disabled=true;
return true;
}
function check() {
if (document.form1.接收部门.value=="null") {
alert("请选择归档类别!")
document.form1.接收部门.focus()
return false;
}
//-------发送附件
return true;
}
</script></SCRIPT>
<script language=VBScript>
function tof_Click()
if document.all("tof").checked Then
document.all("his").style.display="inline"
Else
document.all("his").style.display="none"
End IF
end function
</script>
<script>
function SummaryFromText(){
if (iEditorType==0)
{
var Summary = content1.getHTML();
}
else{
var Summary = a1.content.value;
}
Summary=Summary.substring(1,250)
Summary=cleanHtml(Summary);
a1.summary.value=Summary;
}
</SCRIPT>
<script>
function change(obj,i) {
he=parseInt(obj.style.height);
if (he>=80&&he<=400)
obj.style.height=he+i+'px';
else
obj.style.height='80px';
}
</script>
<script Language="JavaScript">
function form_check()
{
if(document.form1.接收人.value.length<1)
{
window.alert("请选择发送目标");
document.form1.City.focus();
return (false);
}
}
function addsendtouser()
{
var sendtouserstr,sendtouserstr1;
sendtouserstr='|'+document.form1.userdept.value+':'+document.form1.City.value;
sendtouserstr1='|'+document.form1.userdept.value+':所有人';
if (document.form1.sendto.value.indexOf(sendtouserstr)==-1)
{
if (document.form1.City.value=="所有人")
{ document.form1.sendto.value=document.form1.sendto.value+'|'+document.form1.userdept.value+':'+document.form1.City.value;
document.form1.sendto.value=document.form1.sendto.value;
}
else if (document.form1.City.value!="所有人" && document.form1.sendto.value.indexOf(sendtouserstr1)==-1)
{
document.form1.sendto.value=document.form1.sendto.value+'|'+document.form1.City.value;
document.form1.sendto.value=document.form1.sendto.value;
}
else
{
alert("该发送目标已包含在所有人中!");
}
}
else
{
alert("该发送目标已经存在!");
}
}
</script>
<div align="center">
<table width="74%" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="6" height="20"><img src="/img/bbs/leftlin1red.gif" width="6" height="21"></td>
<td width="936" height="20" bgcolor="#FF3333"><div align="center" class="style5"><strong>收 文 归 档</strong></div></td>
</tr>
</table>
<table width="74%" border="0" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr>
<td bgcolor="#FFFFFF"><form name="form1" method="post" action="guidangpost.asp" onSubmit="return dis()">
<table width="99%" height="142" border="0" cellpadding="3" cellspacing="1">
<tr>
<td width="87" height="30"><div align="right">归档类别:
</div></td>
<td width="621"><select name="接收部门" id="接收部门">
<option value="null" selected>选择类别</option>
<%=DbCombox1()%>
<option value="其它">其它</option>
</select></td>
</tr>
<tr>
<td height="21">
<div align="right">事由:<strong>
<input name="id" type="hidden" id="id" value="<%=request("id")%>">
</strong></div></td>
<td height="21"><strong><%=request("bt")%></strong></td>
</tr>
<% If Not r11.EOF Or Not r11.BOF Then %>
<tr>
<td height="21" colspan="2"><table width="99%" height="21" border="0" cellpadding="0" cellspacing="0">
<%
While ((Repeat1__numRows <> 0) AND (NOT r11.EOF))
%>
<tr>
<%p=r11.Fields.Item("文件路径").Value%>
<td width="532"> <a href="redirect.asp?id=<%=(r11.Fields.Item("id").Value)%>&gwid=<%=(r11.Fields.Item("邮件编号").Value)%>&fpath=<%=p%>" target="_blank"><%=(r11.Fields.Item("文件名").Value)%></a> <span class="style41"><%=(r11.Fields.Item("文件上传时间").Value)%> <%=(r11.Fields.Item("上传人姓名").Value)%>(<%=(r11.Fields.Item("上传人部门").Value)%>)</span><br/></td>
<td width="180"><a href="downfile.asp?id=<%=(r11.Fields.Item("id").Value)%>&gwid=<%=(r11.Fields.Item("邮件编号").Value)%>" >下载</a> <a href="shoucang.asp?id=<%=(r11.Fields.Item("id").Value)%>&gwid=<%=(r11.Fields.Item("邮件编号").Value)%>&fpath=<%=p%>">收藏</a> <a href="zhuanfa.asp?id=<%=(r11.Fields.Item("id").Value)%>">转发</a></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
r11.MoveNext()
Wend
%>
</table></td>
</tr>
<% End If ' end Not r11.EOF Or NOT r11.BOF %>
<tr>
<td height="21" colspan="2"><div id=his style=display:none ><table width="392" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"> 备注:</td>
<td><div align="left">
<textarea name="fuyan" cols="44" rows="5" id="fuyan"></textarea>
</td>
</tr>
</table></div>
</br>
<input name="submit1" type=submit id="submit1" style="FONT-SIZE: 12px; HEIGHT: 27px" onClick='return check();' value= " 归 档 " nClick='return check();'>
<input name="按钮" type=button style="FONT-SIZE: 12px; HEIGHT: 27px" onClick="javascript:history.go(-1)" value= " 取 消 " >
<input name=tof type=checkbox onClick=tof_Click() >
备注
</table>
</form></td>
</tr>
</table>
<%
r11.Close()
Set r11 = Nothing
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?