本文整理汇总了PHP中paging::simple方法的典型用法代码示例。如果您正苦于以下问题:PHP paging::simple方法的具体用法?PHP paging::simple怎么用?PHP paging::simple使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类paging
的用法示例。
在下文中一共展示了paging::simple方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
}
}
$hook->redirect($refresh);
} else {
$hook->redirect($refresh);
}
} else {
$tpl->setfile(array('body' => 'member.tpl'));
$cond = " active=0";
$cat = $oClass->view($cond);
$total = $cat->num_rows();
$orderby = "timestamp DESC";
$start = LIMIT * intval($_GET['page']);
$url = './?mod=' . $system->module . '&parentid=' . intval($_GET['parentid']) . '&type=' . intval($_GET['type']);
$dp = new paging($url, $total, LIMIT);
$request['divpage'] = $dp->simple();
$cat = $oClass->view($cond, $start, LIMIT, $orderby);
while ($rs = $cat->fetch()) {
//$rs['delete'] = $rs['is_admin']?'':'style="display: inline;"';
$rs['checked'] = $rs['active'] ? 'checked' : '';
$rs['avatar'] = $rs['avatar'] ? '<a href="' . _UPLOAD . $rs['avatar'] . '" class="divbox"><img src="' . _UPLOAD . $rs['avatar'] . '" width="30" height="30" /></a>' : '';
$tpl->assign($rs, 'user');
}
$breadcrumb->reset();
$menu = explode('.', $_SESSION['cms_menu']);
$breadcrumb->assign("", $MenuName[$menu[0]]);
$level = $MenuLink[$menu[0]][$menu[1]];
$breadcrumb->assign($level['link'], $level['name']);
}
$request['breadcrumb'] = $breadcrumb->parse();
$tpl->assign($request);
示例2: intval
*/
$limit = 30;
$start = $limit * intval($request['page']);
$featuredon = $request['id'];
if ($pro['featuredon']) {
$tmp = explode(',', $pro['featuredon']);
$tmp[] = $request['id'];
$featuredon = implode(',', $tmp);
}
$cond = " c.catid = " . $request['catid'] . " AND c.id NOT IN(" . $featuredon . ")";
$result = $oClass->view($request['type'], $request['catid'], NULL, $cond);
$total = $result->num_rows();
$result = $oClass->view($request['type'], $request['catid'], NULL, $cond, $start, $limit);
while ($rs = $result->fetch()) {
$rs = $hook->format($rs);
$tpl->assign($rs, 'product');
}
$dP = new paging($_SERVER['QUERY_STRING'], $total, $limit);
$request['divpage'] = $dP->simple(5);
$featuredon = 0;
if ($pro['featuredon']) {
$tmp = explode(',', $pro['featuredon']);
$featuredon = implode(',', $tmp);
}
$result = $oClass->view($request['type'], -1, NULL, " c.id IN(" . $featuredon . ")");
while ($rs = $result->fetch()) {
$rs = $hook->format($rs);
$tpl->assign($rs, 'current');
}
$request['breadcrumb'] = $breadcrumb->parse();
$tpl->assign($request);