Exemplo n.º 1
0
     $sms->getSmsKeys();
     $sense = implode("|", $sms->sense);
     $sql = "update " . $ecs->table("sms_server") . " set sense='" . addslashes($sense) . "' where sms_server_id=" . $sms->sms_server_id;
     //mysql_like_quote
     $db->query($sql);
     $smarty->assign('sense', $sense);
     $smarty->assign('info', "更新成功!");
     assign_query_info();
     $smarty->display('sms_sense_info.htm');
     exit;
 case 'statistics':
     $smarty->assign('ur_here', "短信统计");
     $statics = array();
     $sms = new sms();
     $statics = array('total' => $sms->total, 'used' => $sms->used);
     $inf = $sms->getBalance();
     $statics["remainder"] = empty($inf[1]) ? 0 : intval($inf[1]);
     $schools = get_school_list();
     foreach ($schools as $s) {
         $statics['school'][$s['code']]['name'] = $s['name'];
         $num = $db->getOne("select sum(num) from " . $s['code'] . "_school.ht_sms ");
         $statics['school'][$s['code']]['num'] = $num ? $num : 0;
     }
     $smarty->assign('statics', $statics);
     assign_query_info();
     $smarty->display('sms_statics_info.htm');
     exit;
 case 'record':
     $smarty->assign('ur_here', "短信发送记录");
     $schools = get_school_list();
     $smarty->assign('schools', $schools);