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

📄 index.php

📁 极限网络智能办公系统 Office Automation V3.0官方100%源代码.
💻 PHP
字号:
<?
include_once("inc/auth.php");
include_once("inc/reg_check.php");
if($OA_REG_ON!=2)
   exit;

if($CONENT!="")
   $CONENT=urldecode($CONENT);

//-- 允许外发 --
$query = "select * from SMS2_PRIV";
$cursor=exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor))
   $OUT_PRIV=$ROW["OUT_PRIV"];

if(find_id($OUT_PRIV,$LOGIN_USER_ID))
   $SMS_ROLE=1;
?>

<html>
<head>
<title>公费手机短信</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<script Language="JavaScript">
function CheckForm()
{
   if(document.form1.TO_ID.value==""<?if($SMS_ROLE==1){?> && document.form1.TO_ID1.value==""<?}?>)
   { alert("请添加收信人!");
     return (false);
   }

   if(document.form1.CONTENT.value=="")
   { alert("短信内容不能为空!");
     return (false);
   }

   return (true);
}

function notice()
{
   msg="注意:\n\n所发送的手机短信将在本系统中进行记录,\n请勿发送与工作无关的涉及个人隐私的信息,\n请提醒接收方:其直接回复的信息也可能导致隐私泄露。";
   alert(msg);	
}

function clear_user()
{
  document.form1.TO_NAME.value="";
  document.form1.TO_ID.value="";
}

function LoadWindow()
{
  URL="/module/user_select";
  loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;
  loc_y=document.body.scrollTop+event.clientY-event.offsetY+210;
  window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:350px;dialogHeight:350px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}

function CheckSend()
{
  if(event.keyCode==10)
  {
    if(CheckForm())
       document.form1.submit();
  }
}

 var cap_max=140;

 function getLeftChars(varField)
 {
    var i = 0;
    var counter = 0;
    var cap = cap_max;
    var leftchars = cap - varField.value.length;

    return (leftchars);
 }

 function onCharsChange(varField)
 {
     var leftChars = getLeftChars(varField);
     if ( leftChars >= 0)
     {
 	document.form1.charsmonitor1.value=cap_max-leftChars;
 	document.form1.charsmonitor2.value=leftChars;
 	return true;
     }
     else
     {
     	document.form1.charsmonitor1.value=cap_max;
     	document.form1.charsmonitor2.value="0";
     	window.alert("短信内容超过字数限制!");
     	var len = document.form1.CONTENT.value.length + leftChars;
 	document.form1.CONTENT.value = document.form1.CONTENT.value.substring(0, len);
 	leftChars = getLeftChars(document.form1.CONTENT);
     	if ( leftChars >= 0)
     	{
 	    document.form1.charsmonitor1.value=cap_max-leftChars;
 	    document.form1.charsmonitor2.value=leftChars;
	}
        return false;
     }
 }

<?
 $query = "SELECT * from USER where USER_ID='$LOGIN_USER_ID'";
 $cursor= exequery($connection,$query);
 if($ROW=mysql_fetch_array($cursor))
    $USER_NAME=$ROW["USER_NAME"];
?>

function LoadDo()
{
<?
if($CONTENT=="")
{
?>
  SignName();
<?
}
else
{
?>
  onCharsChange(document.form1.CONTENT);
  document.form1.CONTENT.focus();
<?
}
?>
}

function SignName()
{
  document.form1.CONTENT.value+="<?=$USER_NAME?>:";
  onCharsChange(document.form1.CONTENT);
  document.form1.CONTENT.focus();
}
function ClearContent()
{
  document.form1.CONTENT.value="";
  onCharsChange(document.form1.CONTENT);
  document.form1.CONTENT.focus();
}

</script>
</head>

<body class="bodycolor" topmargin="5" onload="LoadDo();">

<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="/images/menu/mobile_sms.gif" WIDTH="22" HEIGHT="20" align="absmiddle"><span class="big3"> 发送手机短信<?if($SMS_ROLE!=1)echo "(无外发权限)";?></span>
    </td>
  </tr>
</table>

<br>

 <table border="0" width="500" cellpadding="3" cellspacing="1" align="center" bgcolor="#000000" class="small">
  <form action="submit.php"  method="post" name="form1" onsubmit="return CheckForm();">
    <tr>
      <td nowrap class="TableData">收信人[内部用户]:</td>
      <td nowrap class="TableData">
        <input type="hidden" name="TO_ID" value="<?=$TO_ID?>">
        <textarea cols=30 name=TO_NAME rows=3 class="BigStatic" wrap="yes" readonly><?=$TO_NAME?></textarea>
        &nbsp;<input type="button" value="添 加" class="SmallButton" onClick="LoadWindow()" title="添加收信人" name="button">
        &nbsp;<input type="button" value="清 空" class="SmallButton" onClick="clear_user()" title="清空收信人" name="button">
      </td>
    </tr>

<?
 if($SMS_ROLE==1)
 {
?>
    <tr>
      <td nowrap class="TableData">收信人[外部号码]:</td>
      <td class="TableData">
        号码之间请用逗号分隔或每行一条
        <textarea cols=50 name=TO_ID1 rows=3 class="BigInput" wrap="yes"><?=$TO_ID1?></textarea>
      </td>
    </tr>
<?
 }
?>
    <tr>
      <td nowrap class="TableData"> 短信内容:</td>
      <td class="TableData">
        已输入 <input class="SmallStatic" type=text name=charsmonitor1 size=3 readonly=true> 字符,剩余 <input class="SmallStatic" type=text name=charsmonitor2 size=3 readonly=true> 字符,每条70字,超出部份转第2条<br>
        <br>
        <textarea cols=30 name="CONTENT" rows=5 class="BigInput" wrap="on" onpaste="return onCharsChange(this);" onKeyUp="return onCharsChange(this);" onkeypress="CheckSend()"><?=$CONTENT?></textarea>
        <br>按Ctrl+回车键发送消息 &nbsp;<a href="javascript:notice();">隐私警示</a>
      </td>
    </tr>
    <tr align="center" class="TableControl">
      <td colspan="2" nowrap>
        <input type="submit" value="发送" class="BigButton">&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="button" value="签名" class="BigButton" onclick="SignName()">&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="button" value="清空内容" class="BigButton" onclick="ClearContent()">
      </td>
    </tr>
  </table>
</form>

</body>
</html>

⌨️ 快捷键说明

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