index.php
来自「通达OA2007SE源代码 非常好的」· PHP 代码 · 共 254 行
PHP
254 行
<?
include_once 'inc/auth.php';
include_once 'inc/reg_check.php';
if (($OA_REG_ON != 2008))
{
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;
}
echo '
<html>
<head>
<title>公费手机短信</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
';
echo '<s';
echo 'cript Language="JavaScript">
function CheckForm()
{
if(document.form1.TO_ID.value==""';
if (($SMS_ROLE == 1))
{
echo ' && document.form1.TO_ID1.value==""';
}
echo ')
{ alert("请添加收信人!");
return (false);
}
if(document.form1.CONTENT.value=="")
{ alert("短信内容不能为空!");
return (false);
}
return (true);
}
function notice()
{
msg="注意:\\n\\n所发送的手机短信将在本系统中进行记录,\\n请勿发送与工作无关的涉及个人隐私的信息,\\n请提醒接收方:其直接回复的信息也可能导致隐私泄露。";
alert(msg);
}
function ';
echo '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:400px;dialogHeight:350p';
echo 'x;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 onCharsChan';
echo 'ge(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("短信内容超过字数限制!");
va';
echo 'r 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'];
}
echo '
function LoadDo()
{
';
if (($CONTENT == ''))
{
echo ' SignName();
';
}
else
{
echo ' onCharsChange(document.form1.CONTENT);
document.form1.CONTENT.focus();
';
}
echo '}
function SignName()
{
document.form1.CONTENT.value+="';
echo $USER_NAME;
echo ':";
onCharsChange(document.form1.CONTENT);
document.form1.CONTENT.focus();
}
function ClearContent()
{
document.form1.CONTENT.value="";
onCharsChange(document.form1.CONTENT);
document.form1.CONTENT.focus();
}
function LoadWindow3()
{
URL="/module/addr_select?FIELD=MOBIL_NO&TO_ID=TO_ID1";
loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;
loc_y=document.bo';
echo 'dy.scrollTop+event.clientY-event.offsetY+170;
//window.open(URL,"read_notify","height=400,width=550,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left=150,resizable=yes");
window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:450px;dialogHeight:350px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
function td_calendar(fieldnam';
echo 'e)
{
myleft=document.body.scrollLeft+event.clientX-event.offsetX-80;
mytop=document.body.scrollTop+event.clientY-event.offsetY+140;
window.showModalDialog("/inc/calendar.php?FIELDNAME="+fieldname,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:215px;dialogTop:"+mytop+"px;dialogLeft:"+myleft+"px");
change_remind();
}
function td_clock(fieldna';
echo 'me)
{
myleft=document.body.scrollLeft+event.clientX-event.offsetX-80;
mytop=document.body.scrollTop+event.clientY-event.offsetY+140;
window.showModalDialog("/inc/clock.php?FIELDNAME="+fieldname,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:120px;dialogTop:"+mytop+"px;dialogLeft:"+myleft+"px");
}
</script>
</head>
<body class="bodycolor" topm';
echo 'argin="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">';
echo '<s';
echo 'pan class="big3"> 发送手机短信';
if (($SMS_ROLE != 1))
{
echo '(无外发权限)';
}
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="';
echo $TO_ID;
echo '">
<textarea cols=40 name=TO_NAME rows=3 class="BigStatic" wrap="yes" readonly>';
echo $TO_NAME;
echo '</textarea>
<input type="button" value="添 加" class="SmallButton" onClick="LoadWindow()" title="添加收信人" name="button">
<input type="button" value="清 空" class="SmallButton" onClick="clear_user()" title="清空收信人" name="button">
</td>
</tr>
';
if (($SMS_ROLE == 1))
{
echo ' <tr>
<td nowrap class="TableData">收信人[外部号码]:</td>
<td class="TableData">
号码之间请用逗号分隔或每行一条
<textarea cols=40 name=TO_ID1 rows=3 class="BigInput" wrap="yes">';
echo $TO_ID1;
echo '</textarea>
<input type="button" value="添 加" class="SmallButton" onClick="LoadWindow3()" title="从通讯簿添加收信人" name="button">
</td>
</tr>
';
}
echo ' <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=';
echo '"return onCharsChange(this);" onKeyUp="return onCharsChange(this);" onkeypress="CheckSend()">';
echo $CONTENT;
echo '</textarea>
<br>按Ctrl+回车键发送消息 <a href="javascript:notice();">隐私警示</a>
</td>
</tr>
<tr>
<td nowrap class="TableData"> 发送时间:</td>
<td class="TableData">
<input type="text" name="SEND_TIME" size="19" maxlength="19" class="BigInput" value="';
echo date ('Y-m-d H:i:s', time ());
echo '">
<img src="/images/menu/calendar.gif" border="0" style="cursor:hand" onclick="td_calendar(\'form1.SEND_TIME\');">
<img src="/images/menu/clock.gif" border="0" style="cursor:hand" onclick="td_clock(\'form1.SEND_TIME\');">
</td>
</tr>
<tr align="center" class="TableControl">
<td colspan="2" nowrap>
<input type="submit" value="发送" class="BigButton"> &n';
echo 'bsp;
<input type="button" value="签名" class="BigButton" onclick="SignName()">
<input type="button" value="清空内容" class="BigButton" onclick="ClearContent()">
</td>
</tr>
</table>
</form>
</body>
</html>';
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?