📄 index.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/reg_check.php" );
if ( $OA_REG_ON != 2 )
{
exit( );
}
is_registered( );
if ( !$IS_REGISTERED_MYOA )
{
echo "<body class='bodycolor' topmargin='5'>";
message( "提示", "软件尚未注册,不能使用此项功能!" );
exit( );
}
if ( $CONENT != "" )
{
$CONENT = urldecode( $CONENT );
}
$SMS_ROLE = 1;
echo "\r\n<html>\r\n<head>\r\n<title>公费手机短信</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n\r\n";
echo "<s";
echo "cript Language=\"JavaScript\">\r\nfunction CheckForm()\r\n{\r\n if(document.form1.TO_ID.value==\"\"";
if ( $SMS_ROLE == 1 )
{
echo " && document.form1.TO_ID1.value==\"\"";
}
echo ")\r\n { alert(\"请添加收信人!\");\r\n return (false);\r\n }\r\n\r\n if(document.form1.CONTENT.value==\"\")\r\n { alert(\"短信内容不能为空!\");\r\n return (false);\r\n }\r\n\r\n return (true);\r\n}\r\n\r\nfunction clear_user()\r\n{\r\n document.form1.TO_NAME.value=\"\";\r\n document.form1.TO_ID.value=\"\";\r\n}\r\n\r\nfunction LoadWindow()\r\n{\r\n URL=\"/module/user_select\";\r\n loc_x=document.body.scrollLeft+event.clientX-ev";
echo "ent.offsetX-100;\r\n loc_y=document.body.scrollTop+event.clientY-event.offsetY+210;\r\n window.showModalDialog(URL,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:265px;dialogTop:\"+loc_y+\"px;dialogLeft:\"+loc_x+\"px\");\r\n}\r\n\r\nfunction CheckSend()\r\n{\r\n if(event.keyCode==10)\r\n {\r\n if(CheckForm())\r\n document.form1.submit();\r\n }\r\n}\r\n\r\n var cap_max=70;\r\n\r\n f";
echo "unction getLeftChars(varField)\r\n {\r\n var i = 0;\r\n var counter = 0;\r\n var cap = cap_max;\r\n var leftchars = cap - varField.value.length;\r\n\r\n return (leftchars);\r\n }\r\n\r\n function onCharsChange(varField)\r\n {\r\n var leftChars = getLeftChars(varField);\r\n if ( leftChars >= 0)\r\n {\r\n \tdocument.form1.charsmonitor1.value=cap_max-leftChars;\r\n \tdocument.form1.charsmonitor2.value=leftC";
echo "hars;\r\n \treturn true;\r\n }\r\n else\r\n {\r\n \tdocument.form1.charsmonitor1.value=cap_max;\r\n \tdocument.form1.charsmonitor2.value=\"0\";\r\n \twindow.alert(\"短信内容超过字数限制!\");\r\n \tvar len = document.form1.CONTENT.value.length + leftChars;\r\n \tdocument.form1.CONTENT.value = document.form1.CONTENT.value.substring(0, len);\r\n \tleftChars = getLeftChars(document.form1.CONTENT);\r\n ";
echo "\tif ( leftChars >= 0)\r\n \t{\r\n \t document.form1.charsmonitor1.value=cap_max-leftChars;\r\n \t document.form1.charsmonitor2.value=leftChars;\r\n\t}\r\n return false;\r\n }\r\n }\r\n\r\n";
$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 "\r\nfunction LoadDo()\r\n{\r\n";
if ( $CONTENT == "" )
{
echo " SignName();\r\n";
}
else
{
echo " onCharsChange(document.form1.CONTENT);\r\n document.form1.CONTENT.focus();\r\n";
}
echo "}\r\n\r\nfunction SignName()\r\n{\r\n document.form1.CONTENT.value+=\"";
echo $USER_NAME;
echo ":\";\r\n onCharsChange(document.form1.CONTENT);\r\n document.form1.CONTENT.focus();\r\n}\r\nfunction ClearContent()\r\n{\r\n document.form1.CONTENT.value=\"\";\r\n onCharsChange(document.form1.CONTENT);\r\n document.form1.CONTENT.focus();\r\n}\r\n\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\" onload=\"LoadDo();\">\r\n\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n <tr>\r\n ";
echo "<td class=\"Big\"><img src=\"/images/menu/mobile_sms.gif\" WIDTH=\"19\" HEIGHT=\"17\">";
echo "<s";
echo "pan class=\"big3\"> 写手机短信</span>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<hr width=\"95%\" height=\"1\" align=\"left\" class=\"big1\">\r\n\r\n\r\n <table border=\"0\" width=\"500\" cellpadding=\"3\" cellspacing=\"1\" align=\"center\" bgcolor=\"#000000\" class=\"small\">\r\n <form action=\"submit.php\" method=\"post\" name=\"form1\" onsubmit=\"return CheckForm();\">\r\n <tr>\r\n <td nowrap class=\"TableData\">收信人[内部员工]:</td>\r\n <td no";
echo "wrap class=\"TableData\">\r\n <input type=\"hidden\" name=\"TO_ID\" value=\"";
echo $TO_ID;
echo "\">\r\n <textarea cols=30 name=TO_NAME rows=3 class=\"BigStatic\" wrap=\"yes\" readonly>";
echo $TO_NAME;
echo "</textarea>\r\n <input type=\"button\" value=\"添 加\" class=\"SmallButton\" onClick=\"LoadWindow()\" title=\"添加收信人\" name=\"button\">\r\n <input type=\"button\" value=\"清 空\" class=\"SmallButton\" onClick=\"clear_user()\" title=\"清空收信人\" name=\"button\">\r\n </td>\r\n </tr>\r\n\r\n";
if ( $SMS_ROLE == 1 )
{
echo " <tr>\r\n <td nowrap class=\"TableData\">收信人[指定号码]:</td>\r\n <td class=\"TableData\">\r\n 号码之间请用逗号分隔\r\n <textarea cols=50 name=TO_ID1 rows=3 class=\"BigInput\" wrap=\"yes\">";
echo $TO_ID1;
echo "</textarea>\r\n </td>\r\n </tr>\r\n";
}
echo " <tr>\r\n <td nowrap class=\"TableData\"> 短信内容:</td>\r\n <td class=\"TableData\">\r\n 已输入 <input class=\"SmallStatic\" type=text name=charsmonitor1 size=3 readonly=true> 字符,剩余 <input class=\"SmallStatic\" type=text name=charsmonitor2 size=3 readonly=true> 字符,最多70个字符<br>\r\n <br>\r\n <textarea cols=30 name=\"CONTENT\" rows=5 class=\"BigInput\" wrap=\"on\" onpaste=\"return onCha";
echo "rsChange(this);\" onKeyUp=\"return onCharsChange(this);\" onkeypress=\"CheckSend()\">";
echo $CONTENT;
echo "</textarea>\r\n <br>按Ctrl+回车键发送消息\r\n </td>\r\n </tr>\r\n <tr align=\"center\" class=\"TableControl\">\r\n <td colspan=\"2\" nowrap>\r\n <input type=\"submit\" value=\"发送\" class=\"BigButton\"> \r\n <input type=\"button\" value=\"签名\" class=\"BigButton\" onclick=\"SignName()\"> \r\n <input type=\"button\" value=\"清空内容\" class=\"BigButton\" onc";
echo "lick=\"ClearContent()\">\r\n </td>\r\n </tr>\r\n </table>\r\n</form>\r\n\r\n</body>\r\n</html>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -