📄 writesms2.asp
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/oavbsconn.asp" -->
<!--#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 * FROM usertertggbng 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部门表 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 * FROM usertertggbng 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 check() {
if (document.form1.userdept.value=="请选择部门") {
window.alert ("请选择部门!")
return false
}
if ((form1.City.value=="请选择对象")||(form1.City.value=="")) {
window.alert ("请选择接收对象!")
return false
}
if (document.form1.sendto.value=="") {
window.alert ("请您添加接收人!")
document.form1.sendto.focus()
return false
}
if (document.form1.标题.value=="") {
window.alert ("请您输入标题!")
document.form1.标题.focus()
return false
}
if (form1.City.value=="对所有人群发"){
if(!confirm('您确定要群发消息吗,服务器通信将耗时60秒?'))
{
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; }
-->
</style>
</head>
<body>
<div align="center">
<table width="814" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../../ifrmae/img/jpg/766.gif" width="814" height="16"></td>
</tr>
</table>
<table width="814" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><form action="writepost2.asp" method="post" name="form1" onsubmit="return check()">
<table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#AFDBFF">
<tr bgcolor="#FFFFFF">
<td width="81"><div align="left" class="style5">选择接收人:</div></td>
<td width="722"> <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><input name="sendto" type="text" id="sendto" value="" size="80" readonly="true">
<input type="button" name="Submit" value="清除" onClick="document.form1.sendto.value=''"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="left" class="style5">标题:</div></td>
<td><input name="标题" type="text" id="标题" size="30"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><p align="center"><img src="/toall/gw/img/gif/pic4.gif" width="43" height="50"><br>
</p>
</td>
<td><input name="content" type="hidden" id="content">
<iframe ID="content" src="/toall/htmledit/ewebeditor.asp?id=content&style=standard" frameborder="0" scrolling="no" width="550" HEIGHT="350"> </iframe> </td>
</tr>
<tr bgcolor="#FFFFFF">
<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%>"></td>
<td><input type="submit" name="Submit" value="发 送">
<input type="reset" name="Submit" value="清 空">
<input type="button" name="Submit" value="取 消" onclick="javascript:history.go(-1)"></td>
</tr>
</table>
</form></td>
</tr>
</table>
<p> </p>
</div>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<iframe width=0 height=0 frameborder=0 scrolling=auto src=filesupadmin/getmaxid.asp></iframe>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -