本文整理汇总了PHP中comment::get_page_sum方法的典型用法代码示例。如果您正苦于以下问题:PHP comment::get_page_sum方法的具体用法?PHP comment::get_page_sum怎么用?PHP comment::get_page_sum使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类comment
的用法示例。
在下文中一共展示了comment::get_page_sum方法的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);
}
}