本文整理匯總了PHP中comment::set_page_size方法的典型用法代碼示例。如果您正苦於以下問題:PHP comment::set_page_size方法的具體用法?PHP comment::set_page_size怎麽用?PHP comment::set_page_size使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類comment
的用法示例。
在下文中一共展示了comment::set_page_size方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: module_comment_sheet
function module_comment_sheet()
{
global $global, $smarty;
$obj = new comment();
$obj->set_page_size(10);
$obj->set_page_num($global['page']);
$sheet = $obj->get_sheet();
set_link($obj->get_page_sum());
for ($i = 0; $i < count($sheet); $i++) {
$sheet[$i]['channel'] = '';
$sheet[$i]['title'] = '';
$obj = new channel();
$list = $obj->get_list();
for ($j = 0; $j < count($list); $j++) {
if ($list[$j]['cha_id'] == $sheet[$i]['com_channel_id']) {
$sheet[$i]['channel'] = $list[$j]['cha_code'];
$original = $list[$j]['cha_code'];
if ($list[$j]['cha_original'] != 0) {
for ($k = 0; $k < count($list); $k++) {
if ($list[$j]['cha_original'] == $list[$k]['cha_id']) {
$original = $list[$k]['cha_code'];
}
}
}
if ($original == 'goods') {
$table = 'goods';
} else {
$table = 'article';
}
$sheet[$i]['title'] = get_data($table, $sheet[$i]['com_page_id'], substr($table, 0, 3) . '_title');
}
}
}
$smarty->assign('comment', $sheet);
}
示例2: module_comment
function module_comment()
{
global $global, $smarty;
if ($global['id']) {
$obj = new comment();
$obj->set_where('com_channel_id = ' . get_id('channel', 'cha_code', $global['channel']));
$obj->set_where('com_page_id = ' . $global['id']);
$obj->set_page_size(5);
$obj->set_page_num($global['page']);
$sheet = $obj->get_sheet();
set_link($obj->get_page_sum());
$smarty->assign('comment', $sheet);
}
}