chengyue.asp

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

ASP
281
字号

<%  
Response.ExpiresAbsolute=now()-1
Response.CacheControl="no-cache"
%>
<!--#include file="../../Connections/oavbsconn.asp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "开通"
If (Request("MM_EmptyValue") <> "") Then 
  Recordset1__MMColParam = Request("MM_EmptyValue")
End If
%>
<!--#include file="../../Connections/ifr/ifrasp.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
%>

<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT names,部门  FROM usertertggbng  WHERE idzhuangtai = '" + Replace(Recordset1__MMColParam, "'", "''") + "' and names<>'对所有人群发'  ORDER BY 排序 asc"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
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
%>
<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> 

<html>
<head>

<script language="JavaScript">
<!--
function dis(){
document.form1.submit.value=' 发送..'
document.form1.submit.disabled=true;
return true;
}
function check() {
if (document.form1.userdept.value=="请选择部门") {
window.alert ("请选择部门!")

return false
}

if (document.form1.sendto.value=="") {
window.alert ("请您添加接收人!")
document.form1.sendto.focus()
return false
}
   if (form1.City.value=="对所有人群发"){

   
     if(!confirm('您确定要群发消息吗,服务器通信将迅疾处理?'))
 {
return false
} 
else 
document.form1.submit
}
}

//-->
</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>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<style type="text/css">
<!--
.style2 {color: #FF0000}
.style5 {color: 12; font-size: 12px; }
.style36 {
	font-size: 13px;
	color: #FFFFFF;
	font-weight: bold;
}
.style37 {font-size: 12px}
.style38 {	color: #FFFFFF;
	font-size: 14px;
	font-weight: bold;
}
-->
</style>
</head>

<body>
<div align="center">
  <table width="760" 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="style36">发 文 向 上 会 签</span></div></td>
    </tr>
  </table>
  <table width="760" border="0" cellpadding="0" cellspacing="1" bgcolor="#FF0000">
    <tr>
      <td bgcolor="#FFFFFF"><table width="99%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="785"><form action="../sms/writepost2forfawenzhuanban.asp" method="post" name="form1" onSubmit="return dis()">
              <table width="99%" border="0" cellpadding="3" cellspacing="0" bgcolor="#AFDBFF">
                <tr bgcolor="#FFFFFF">
                  <td height="12"></td>
                  <td height="12"></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td width="80"><div align="left" class="style5">选择审稿人:</div></td>
                  <td width="651"><div align="left">
                      <select name="userdept" onchange ="changeselect(document.form1.userdept.options[document.form1.userdept.selectedIndex].value)">
                        <option value="请选择部门" selected>请选择部门</option>
                        <%=DbCombox()%>
                      </select>
                      <select name="City" id="City">
                        <option value="请选择对象" selected>请选择对象</option>
                      </select>
                      <input type="button" value="增加" onClick="addsendtouser()">
                      </div></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td><span class="style5">接收人:</span></td>
                  <td><textarea name="sendto" cols="80" readonly="true" id="sendto"></textarea>
                      <input type="button" name="Submit" value="清除" onClick="document.form1.sendto.value=''"></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td>&nbsp;</td>
                  <td><input name="many" type="checkbox" id="many" value="是">
                    <span class="style37">如果递交给多人,让每个人都知道</span></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td height="12" colspan="2">      注:该会签接收人顺序,将决定本发文实际会签顺序。</td>
                  </tr>
                <tr bgcolor="#FFFFFF"><%on error resume next%>
                  <td><input name="信息属性" type="hidden" id="信息属性" value="短消息">
                      <input name="发送人帐号" type="hidden" id="发送人帐号" value="<%= Session("userssdfgfhtrh") %>">
                      <input name="发送人姓名" type="hidden" id="发送人姓名" value="<%= Session("names") %>">
                      <input name="datas" type="hidden" id="datas" value="<%=date%>">
                      <input name="content" type="hidden" id="content" value="你好,有待签发文!">
                      <input name="标题" type="hidden" id="标题" value="发文:<%=session("shenpishiyou")%> (<%=session("shenqingren")%>,<%=now()%>)">
                     <%session("spidup")=request("id")%>
                      <input name="sptype" type="hidden" id="sptype" value="发文"></td>
                  <td>                    
                      
                      <input name="submit" type=submit id="submit" style="FONT-SIZE: 12px; HEIGHT: 27px"  onClick='return check();'  value=" 递 交 ">
                      
                       
                      <input name="按钮" type=button style="FONT-SIZE: 12px; HEIGHT: 27px"   onClick="javascript:history.go(-1)" value= " 取 消 " >
                </tr>
              </table>
          </form></td>
        </tr>
      </table></td>
    </tr>
  </table>
</div>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>

⌨️ 快捷键说明

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