function get_qunfas_fromsae($id) { global $log, $singlepane_view; global $app_strings; global $adb; global $current_user; $log->debug("Entering get_qunfas(" . $id . ") method ..."); require_once 'Sms/SmsLib.php'; $query = "select phone from ec_account where accountid={$id} "; $row = $adb->getFirstLine($query); $phone = $row['phone']; if ($phone == "") { return ""; } $list_result = getUserSmsLogs($current_user->id, $phone); $num_rows = count($list_result); $header = array(); $header[] = "#"; $header[] = "接收人"; $header[] = "接收人手机"; $header[] = "短信内容"; $header[] = "发送结果"; $header[] = "发送时间"; if ($num_rows > 0 && is_array($list_result)) { $row_i = 1; foreach ($list_result as $row) { $entries = array(); $entries[] = $row_i; $entries[] = $row->receiver; $entries[] = $row->receiver_phone; $entries[] = msubstr1($row->sendmsg, 0, 30); $entries[] = $row->result; $entries[] = $row->sendtime; $entries_list[] = $entries; $row_i++; } } if ($num_rows > 0) { $return_data = array('header' => $header, 'entries' => $entries_list); $log->debug("Exiting get_maillists method ..."); return $return_data; } }
function getQunfasInfo($accountid) { global $log; global $adb; global $current_user; $log->debug("Entering getQunfasInfo method ..."); if ($accountid != '') { require_once 'Sms/SmsLib.php'; $query = "select phone from ec_account where accountid={$accountid} "; $row = $adb->getFirstLine($query); $phone = $row['phone']; $arr = getUserSmsLogs($current_user->id, $phone); } $log->debug("Exiting getQunfasInfo method ..."); return $arr; }