📄 option.php
字号:
<?php
include_once( "inc/auth.php" );
$sql = "SELECT * FROM mobile_sms";
$rs = exequery( $connection, $sql );
$row = mysql_fetch_array( $rs );
$sp = $row['SP'];
$ps1 = $row['PS1'];
$ps2 = $row['PS2'];
$sql = "SELECT * FROM mobile_sms_option";
$rs = exequery( $connection, $sql );
$row = mysql_fetch_array( $rs );
$mso_serverip = $row['MSO_SERVERIP'];
$mso_port = $row['MSO_PORT'];
$mso_mb_allow = $row['MSO_MB_ALLOW'];
$mso_out_allow = $row['MSO_OUT_ALLOW'];
$mso_public_phone = $row['MSO_PUBIC_PHONE'];
$docroot = get_cfg_var( "doc_root" );
$iwebsmsinc = $docroot."\\iWebSMS2000\\iSMSServer2000.ini";
$handle = fopen( $iwebsmsinc, "r" );
$smsinc = fread( $handle, filesize( $iwebsmsinc ) );
fclose( $handle );
if ( preg_match( "/SERVICE=(\\w+)/", $smsinc, $macths ) )
{
$strservice = $macths[0];
$mso_service = str_replace( "SERVICE=", "", trim( $strservice ) );
}
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</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n\r\n</head>\r\n\r\n\r\n<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"0\">\r\n <tr class=\"tablehead1\">\r\n <td ><img src=\"/images/menu/sms.gif\" align=\"absmiddle\">手机短信设置\r\n </td>\r\n </tr>\r\n <tr class=\"tablehead2\"><td>\r\n <img id=\"subm";
echo "itimg\" src=\"/images/button/submit.gif\" title=\"确定\" border=\"0\" onClick=\"document.form1.submit();\" style=\"cursor:hand\">\r\n </td>\r\n </tr>\r\n</table>\r\n<br>\r\n";
$mobileSms = @new com( "Dbstep.SMSClient2000" );
if ( !$mobileSms )
{
message( "", "SMSClient2000组件尚未安装" );
echo "<script>\r\n\t\t document.getElementById('submitimg').style.display='none';\r\n\t\t </script>";
exit( );
}
$Rtn = $mobileSms->opensms( $mso_serverip, $mso_port );
if ( !$Rtn )
{
message( "", "请检查短信服务器是否启动,或手机短信设置错误!" );
}
$Rtn = $mobileSms->closesms( );
echo " <table border=\"0\" width=\"100%\" cellpadding=\"5\" cellspacing=\"1\">\r\n <form action=\"do.php\" method=\"post\" name=\"form1\" onSubmit=\"return CheckForm();\">\r\n\r\n <tr>\r\n <td nowrap class=\"TableLine2\" width=\"20%\">短信服务器IP:</td>\r\n <td class=\"TableLine1\"><input name=\"mso_serverip\" type=\"text\" size=\"20\" value=";
echo $mso_serverip;
echo "></td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableLine2\">短信服务器端口:</td>\r\n <td class=\"TableLine1\"><input name=\"mso_port\" type=\"text\" size=\"8\" maxlength=\"8\" value=\"";
echo $mso_port;
echo "\" readonly style=\"background-color:#CCCCCC\"></td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableLine2\">公费手机号码:</td>\r\n <td class=\"TableLine1\"><input name=\"mso_public_phone\" type=\"text\" size=\"15\" value=";
echo $mso_public_phone;
echo "></td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableLine2\">本地短信中心:</td>\r\n <td class=\"TableLine1\"><input name=\"mso_service\" type=\"text\" size=\"15\" value=\"";
echo $mso_service;
echo "\"></td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableLine2\">允许系统发送手机短信:</td>\r\n <td class=\"TableLine1\"><input name=\"mso_mb_allow\" type=\"checkbox\" value=\"1\" ";
if ( $mso_mb_allow == 1 )
{
echo "checked";
}
echo ">\r\n <input type=\"hidden\" name=\"f\" value=\"save\"></td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableLine2\">允许手机短信外发:</td>\r\n <td class=\"TableLine1\"><input name=\"mso_out_allow\" type=\"checkbox\" value=\"1\" ";
if ( $mso_out_allow == 1 )
{
echo "checked";
}
echo "> </tr>\r\n </form>\r\n</table>\r\n\r\n<br>\r\n <table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\">\r\n <tr class=\"Tableline1\">\r\n <td>";
echo "<s";
echo "trong>短信服务器IP:</strong>指安装手机短信Modem和手机短信程序的计算机IP地址。</td>\r\n </tr>\r\n <tr class=\"Tableline1\">\r\n <td>";
echo "<s";
echo "trong>公费手机号码:</strong>指手机短信Modem中插入的SIM卡号。</td>\r\n </tr>\r\n <tr class=\"Tableline1\">\r\n <td>";
echo "<s";
echo "trong>允许系统发送手机短信:</strong>表示是否开通系统的手机短信功能。</td>\r\n </tr>\r\n <tr class=\"Tableline1\">\r\n <td>";
echo "<s";
echo "trong>允许手机短信外发:</strong>表示【手机短信】菜单下的【发送短信】功能,允许输入任意手机号码接收系统发送的手机短信。</td>\r\n </tr>\r\n </table>\r\n</body>\r\n</html>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -