⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sendsms.asp

📁 很好的OA办公系统
💻 ASP
字号:
<%response.expires=0%>
<!--#include file="asp/sqlstr.asp"-->
<!--#include file="asp/opendb.asp"-->
<!--#include file="asp/checked.asp"-->
<!--#include file="asp/keepformat.asp"-->
<!--#include file="asp/bgsub.asp"-->
<%
oabusyname=request.cookies("oabusyname")
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" then 
	response.write("<script language=""javascript"">")
	response.write("alert(""你已经过期了,请重新登录!"");")
	response.write("</script>")
	response.end
end if
%>
<html>
<head>
<title>发送短消息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/css.css" type="text/css">
<script language="javascript">
function checkform()
{
	if (form1.code.value=="")
		{
			alert("接收者手机号码不能为空!");
			form1.code.focus();
			return (false);
		}
	else
	{
		var checkOK="0123456789,";
		var checkStr=form1.code.value;
		var allValid = true;
		for (i = 0;  i < checkStr.length;  i++)
		{
			ch = checkStr.charAt(i);
			for (j = 0;  j < checkOK.length;  j++)
			if (ch == checkOK.charAt(j))
				break;
			if (j == checkOK.length)
			{
			allValid = false;
			break;
			}
		}	
		if (!allValid)
		{
			alert("手机号码只是数字,输入多个手机号请用“,”隔开!");
			form1.code.focus();
			return (false);
		}
	}
	if (form1.smstext.value.length>70)
	{
		alert("短信息最多只能输入70个汉字!");
		form1.smstext.focus();
		return (false);
	}
	return (true);
}
</script>
</head>
<body leftmargin="0" topmargin="0">
<%
 
%>
<center>
<table align="center">
<tr>
<td>
<b>发送手机短信息</b>
<td>
</tr>
</table>
</center>
<%
 
companycode=""
set fs=createobject("scripting.filesystemobject")
set fp=fs.opentextfile(server.mappath("db/companyname.asp"),,true)
if not fp.AtEndOfStream then
	companycode=trim(fp.readline)
end if
if companycode="" then
	response.write("<center>")
	response.write("<font color=""#ee0000"" size=""+1"">部门名称为空,请设置好部门名称!</font>")
	response.write("</center>")
	response.end
else
%>
<form name="form1" method="post" action="sms/inceptmessage.asp" onsubmit="return checkform();">
  <table width="520" border="0" cellspacing="1" align="center" cellpadding="5">
    <tr> 
      <td colspan="2" bgcolor="#EEEEEE" height="40"> 
        <p align="left" class="unnamed1"><font color="#FF0000">*</font><font color="#666666">接手者手机为多个手机号码时请用半角逗号“,”隔开,最多可同时发送5个手机号码,其他号码将被舍去!<br>
          </font><font color="#FF0000">*</font><font color="#666666">短信息内容最多不超过70个中文字!</font></p>
      </td>
    </tr>
    <tr> 
      <td width="22%" bgcolor="#F5F5F5" height="30">接收者手机:</td>
      <td width="78%" bgcolor="#FFFFFF" height="30"> 
        <input type="text" name="code" size="51">
		<input type="hidden" name="companycode" value="<%=companycode%>"><!--部门代码-->
		<input type="hidden" name="usercode" value="<%=oabusyname%>"><!--用户名--> 
      </td>
    </tr>
    <tr> 
      <td width="22%" bgcolor="#F5F5F5" valign="top">短信息内容:</td>
      <td width="78%" bgcolor="#FFFFFF" height="30"> 
        <textarea name="smstext" cols="50" rows="6"></textarea>
      </td>
    </tr>
    <tr bgcolor="#EEEEEE"> 
      <td colspan="2"> 
        <div align="center"> 
          <input type="submit" name="Submit" value=" 发 送 ">
          <font color="#EEEEEE">-- </font> 
          <input type="reset" name="Submit2" value=" 重 来 ">
        </div>
      </td>
    </tr>
  </table>
</form>
<%
end if
 
%>
</body>
</html>


⌨️ 快捷键说明

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