1个回答
展开全部
$pager = array();
$pager['page'] = $page;
$pager['size'] = $size = 5;
$pager['record_count'] = $count;
$pager['page_count'] = $page_count = ($count > 0) ? intval(ceil($count / $size)) : 1;;
$pager['page_first'] = "javascript:gotoBuyPage(1,$goods_id)";
$pager['page_prev'] = $page > 1 ? "javascript:gotoBuyPage(" .($page-1). ",$goods_id)" : 'javascript:;';
$pager['page_next'] = $page < $page_count ? 'javascript:gotoBuyPage(' .($page + 1) . ",$goods_id)" : 'javascript:;';
$pager['page_last'] = $page < $page_count ? 'javascript:gotoBuyPage(' .$page_count. ",$goods_id)" : 'javascript:;';
$smarty->assign('notes', $bought_notes);
$smarty->assign('pager', $pager);
$pager['page'] = $page;
$pager['size'] = $size = 5;
$pager['record_count'] = $count;
$pager['page_count'] = $page_count = ($count > 0) ? intval(ceil($count / $size)) : 1;;
$pager['page_first'] = "javascript:gotoBuyPage(1,$goods_id)";
$pager['page_prev'] = $page > 1 ? "javascript:gotoBuyPage(" .($page-1). ",$goods_id)" : 'javascript:;';
$pager['page_next'] = $page < $page_count ? 'javascript:gotoBuyPage(' .($page + 1) . ",$goods_id)" : 'javascript:;';
$pager['page_last'] = $page < $page_count ? 'javascript:gotoBuyPage(' .$page_count. ",$goods_id)" : 'javascript:;';
$smarty->assign('notes', $bought_notes);
$smarty->assign('pager', $pager);
追问
谢谢啊 我分配了好多变量到页面显示了也出来了,我记得以前用smarty的方法时只分配一个就行了!!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询