本文整理汇总了PHP中sms::get_send_history方法的典型用法代码示例。如果您正苦于以下问题:PHP sms::get_send_history方法的具体用法?PHP sms::get_send_history怎么用?PHP sms::get_send_history使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sms
的用法示例。
在下文中一共展示了sms::get_send_history方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
/* 获得发送记录,如果客户端支持XSLT,则直接发送XML格式的文本到客户端;
否则在服务器端把XML转换成XHTML后发送到客户端。
*/
case 'get_send_history':
$start_date = isset($_POST['start_date']) ? $_POST['start_date'] : '';
$end_date = isset($_POST['end_date']) ? $_POST['end_date'] : '';
$page_size = isset($_POST['page_size']) ? $_POST['page_size'] : 20;
$page = isset($_POST['page']) ? $_POST['page'] : 1;
$is_xslt_supported = isset($_POST['is_xslt_supported']) ? $_POST['is_xslt_supported'] : 'no';
if ($is_xslt_supported === 'yes') {
$xml = $sms->get_send_history_by_xml($start_date, $end_date, $page_size, $page);
header('Content-Type: application/xml; charset=utf-8');
//TODO:判断错误信息,链上XSLT
echo $xml;
} else {
$result = $sms->get_send_history($start_date, $end_date, $page_size, $page);
if ($result !== false) {
$smarty->assign('sms_send_history', $result);
$smarty->assign('ur_here', $_LANG['05_sms_send_history']);
/* 分页信息 */
$turn_page = array('total_records' => $result['count'], 'total_pages' => intval(ceil($result['count'] / $page_size)), 'page' => $page, 'page_size' => $page_size);
$smarty->assign('turn_page', $turn_page);
$smarty->assign('start_date', $start_date);
$smarty->assign('end_date', $end_date);
assign_query_info();
$smarty->display('sms_send_history.htm');
} else {
$link[] = array('text' => $_LANG['back_send_history'], 'href' => 'sms.php?act=display_send_history_ui');
@($error_detail = $_LANG['server_errors'][$sms->errors['server_errors']['error_no']] . $_LANG['api_errors']['get_history'][$sms->errors['api_errors']['error_no']]);
sys_msg($_LANG['history_query_error'] . $error_detail, 1, $link);
}