Пример #1
0
                    $flag = 'fail';
                    break;
                case -4:
                    $msg = '手机号格式不对';
                    $flag = 'fail';
                    break;
                case -6:
                    $msg = '定时发送时间不是有效的时间格式';
                    $flag = 'fail';
                    break;
                default:
                    $msg = '系统错误';
                    $flag = 'fail';
                    break;
            }
        }
        //将要返回的提示信息
        $arrs[$jsonIndex]['flag'] = $flag;
        $arrs[$jsonIndex]['tomobile'] = $toMobile;
        $arrs[$jsonIndex]['msg'] = $msg;
        $jsonIndex++;
        $sms = array('uid' => $MsgFromId, 'username' => $MsgFrom, 'tomobile' => M_encode($toMobile, $aeskeyMobile), 'mssage' => $Message, 'sendtime' => strtotime($sendTime), 'addtime' => time(), 'status' => $SendResult, 'num' => $num);
        //入库
        inserttable('apisms', $sms, 0);
    }
}
//返回json信息
$result = json_encode($arrs);
$result = preg_replace("#\\\\u([0-9a-f]{4})#ie", "iconv('UCS-2BE', 'UTF-8', pack('H4', '\\1'))", $result);
echo $result;
exit;
Пример #2
0
     $where .= " and isdept = {$isdept}";
 }
 if ($mobile != "0") {
     $tmobile = M_encode($mobile, $aeskeyMobile);
     $where .= " and mobile = '{$tmobile}'";
 }
 if ($submit == '修改') {
     $pid = trim($_GET['pid']);
     $dept_uid = $_GET['dept_uid'] ? trim($_GET['dept_uid']) : '';
     $department = $_GET['department'] ? trim($_GET['department']) : '';
     $up_uid = $_GET['up_uid'] ? trim($_GET['up_uid']) : '';
     $official = $_GET['official'] ? trim($_GET['official']) : '';
     $isdept = $_GET['isdept'] ? trim($_GET['isdept']) : '0';
     $mobile = $_GET['mobile'] ? trim($_GET['mobile']) : '0';
     //加密手机号
     $mobile = M_encode($mobile, $aeskeyMobile);
     $powerlevel = array('dept_uid' => $dept_uid, 'department' => $department, 'up_uid' => $up_uid, 'official' => $official, 'isdept' => $isdept, 'mobile' => $mobile);
     updatetable('powerlevel', $powerlevel, array('pid' => $pid));
     //更新缓存中的powerlevel.php文件
     updatePowerlevelFile();
     header("Location:admincp.php?ac=complain&type=setting");
     exit;
 }
 if ($op == 'edit') {
     $pid = $_GET['pid'] ? trim($_GET['pid']) : '0';
     $dept_uid = $_GET['dept_uid'] ? trim($_GET['dept_uid']) : '';
     $department = $_GET['department'] ? trim($_GET['department']) : '';
     $up_uid = $_GET['up_uid'] ? trim($_GET['up_uid']) : '';
     $official = $_GET['official'] ? trim($_GET['official']) : '';
     $isdept = $_GET['isdept'] ? trim($_GET['isdept']) : '0';
     $mobile = $_GET['mobile'] ? trim($_GET['mobile']) : '0';
Пример #3
0
 //"UPDATE bind SET token1 = $token1 WHERE uid=$cur_uid";
 $setarr = array('token1' => $token1);
 updatetable('bind', $setarr, array('uid' => $cur_uid));
 $my_ssoname = $cur_uid;
 //生成key:20位用户名,通过AES128密钥A加密得到64位16进制大写字母表
 $l = strlen($my_ssoname);
 if ($l < 20) {
     for ($i = 0; $i < 20 - $l; $i++) {
         $my_ssoname = ' ' . $my_ssoname;
     }
 } else {
     $my_ssoname = substr($my_ssoname, 0, 20);
 }
 $sso_name = "<@" . $my_ssoname . "@>";
 $key = M_encode($sso_name, aeskeyA);
 $ctoken = M_encode($token1, aeskeyB);
 $g_t_url = "http://" . BTURL . "buaasso.aspx?m=create&key=" . $key . "&token=" . $ctoken;
 $rc_i = 0;
 $rc_s = 0;
 while ($rc_i < 5) {
     if ($fp = fopen($g_t_url, "r")) {
         $rc_s = 1;
         break;
     }
     $rc_i = $rc_i + 1;
 }
 if ($rc_s == 0) {
     echo "连接失败";
     exit;
 }
 $c_token = fread($fp, 1000);
Пример #4
0
<?php

include_once '../common.php';
include_once S_ROOT . './source/function_cp.php';
include_once S_ROOT . './buaasso.php';
//将加密后的身份证号存入baseprofile表中的identifierhash字段
$queryid = $_SGLOBAL['db']->query("SELECT userid, identifier_not_use FROM " . tname('baseprofile') . " WHERE collegeid='10101006'");
echo "SELECT userid, identifier_not_use FROM " . tname('baseprofile') . " WHERE collegeid='10101006'";
// (identifier_not_use is not null and identifier_not_use!='') and identifier is null");
$valueid = $_SGLOBAL['db']->fetch_array($queryid);
while ($valueid = $_SGLOBAL['db']->fetch_array($queryid)) {
    echo $valueid['userid'] . " 111 ";
    if (empty($valueid['identifier_not_use'])) {
        continue;
    } else {
        $idhash = M_encode($valueid['identifier_not_use'], aeskeyA);
        $insertinfo = array('identifier' => $idhash);
        updatetable('baseprofile', $insertinfo, array('userid' => $valueid['userid']));
    }
}
echo '---baseprofile OK----<br />';
exit;