$note = cplang("note_complain_buchu3", array($complain_url, date('Y-m-d H:i', $nexttime))); notification_complain_add($UserArray['dept_uid'], 'complain', $note); $note = cplang('note_complain_chuzhang2', array($complain_url, date('Y-m-d H:i', $nexttime))); notification_complain_add($UpUserArray['dept_uid'], 'complain', $note); $note = cplang('note_complain_fuxiaozhang1', array($complain_url, date('Y-m-d H:i', $nexttime), $result['atdepartment'])); notification_complain_add($UpUserArray2['dept_uid'], 'complain', $note); $note = cplang('note_complain_xiaozhang', array($complain_url, date('Y-m-d H:i', $nexttime), $result['atdepartment'])); notification_complain_add($UpUserArray3['dept_uid'], 'complain', $note); $log->debug("complain doid {$result['doid']} send message xiaozhang"); } } var_dump($needSend); //以上处理投诉的逐级汇报////////////////////// //发送上次发送未成功的短信 sendDelayMsg(); sendMobileMsg(); //写入记录文件,以便查看定时任务是否正常执行 $fp = fopen("data/log/checkcomplain.log", "a+"); fwrite($fp, date("Y-m-d H:i:s") . "\t\t检测完毕!\n"); fclose($fp); echo '任务执行完毕~!<br />'; function sendDelayMsg() { //发送上次发送未成功的短信 global $_SGLOBAL; $MsgQuery = $_SGLOBAL['db']->query("SELECT * FROM " . tname('mobilemsg') . " WHERE issend=0 AND atuname='system'"); while ($MsgArray = $_SGLOBAL['db']->fetch_array($MsgQuery)) { $content = $MsgArray['content']; $aeskeyMobile = getAESKey('Mobile'); $mobile = M_decode($MsgArray['tomobile'], $aeskeyMobile); echo $mobile;
public function getcode() { $mobile = getRequest('mobile'); //检测手机号码格式 if (!checkMobile($mobile)) { die('手机号码格式不正确!'); } $code = D('Code')->getCode($mobile); if (empty($code)) { die('您的操作太频繁了,请稍后再试!'); } else { $msg = "您的验证码是:" . $code; $ret = sendMobileMsg($mobile, $msg); } }