本文整理汇总了PHP中get_pager函数的典型用法代码示例。如果您正苦于以下问题:PHP get_pager函数的具体用法?PHP get_pager怎么用?PHP get_pager使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_pager函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_street_stores
function get_street_stores($cate_id = 0, $page = 1, $size = 15)
{
if ($cate_id) {
$sql = "select id from " . $GLOBALS['ecs']->table('store_category') . " where id='{$cate_id}'";
$cate_id = $GLOBALS['db']->getOne($sql);
if ($cate_id) {
$where = " and sh.street_cate='{$cate_id}' ";
}
}
/* 获得符合条件的店铺总数 */
$sql = "select count(sh.id) from " . $GLOBALS['ecs']->table('seller_shopinfo') . " as sh left join " . $GLOBALS['ecs']->table('store_category') . " as c on sh.street_cate=c.id left join " . $GLOBALS['ecs']->table('street_tags') . " as st on sh.street_tags=st.id where sh.status=1 and sh.apply=1 and sh.is_street=1 and c.is_show=1 " . $where;
$count = $GLOBALS['db']->getOne($sql);
$max_page = $count > 0 ? ceil($count / $size) : 1;
if ($page > $max_page) {
$page = $max_page;
}
$sql = "select sh.id,sh.shop_name,sh.street_logo,sh.street_spjpg,sh.shop_title,st.tag_name from " . $GLOBALS['ecs']->table('seller_shopinfo') . " as sh left join " . $GLOBALS['ecs']->table('store_category') . " as c on sh.street_cate=c.id left join " . $GLOBALS['ecs']->table('street_tags') . " as st on sh.street_tags=st.id where sh.status=1 and sh.apply=1 and sh.is_street=1 and c.is_show=1 " . $where . " order by sh.street_order desc";
$res = $GLOBALS['db']->SelectLimit($sql, $size, ($page - 1) * $size);
$arr = array();
while ($row = $GLOBALS['db']->FetchRow($res)) {
$arr[$row['id']]['id'] = $row['id'];
$arr[$row['id']]['shop_name'] = $row['shop_name'];
$arr[$row['id']]['street_logo'] = str_replace('../', './', $row['street_logo']);
$arr[$row['id']]['street_spjpg'] = str_replace('../', './', $row['street_spjpg']);
$arr[$row['id']]['shop_title'] = $row['shop_title'];
$arr[$row['id']]['tag_name'] = $row['tag_name'];
}
$pager['search'] = array('cat' => $cate_id);
$pager = get_pager('store_street.php', $pager['search'], $count, $page, $size);
$street_stores = array('pager' => $pager, 'result' => $arr);
return $street_stores;
}
示例2: action_list
function action_list()
{
$smarty = $GLOBALS['smarty'];
/* 取得预售活动总数 */
$count = pre_sale_count();
if ($count > 0) {
/* 取得每页记录数 */
$size = isset($_CFG['page_size']) && intval($_CFG['page_size']) > 0 ? intval($_CFG['page_size']) : 12;
/* 计算总页数 */
$page_count = ceil($count / $size);
/* 取得当前页 */
$page = isset($_REQUEST['page']) && intval($_REQUEST['page']) > 0 ? intval($_REQUEST['page']) : 1;
$page = $page > $page_count ? $page_count : $page;
/* 缓存id:语言 - 每页记录数 - 当前页 */
$cache_id = $_CFG['lang'] . '-' . $size . '-' . $page;
$cache_id = sprintf('%X', crc32($cache_id));
} else {
/* 缓存id:语言 */
$cache_id = $_CFG['lang'];
$cache_id = sprintf('%X', crc32($cache_id));
}
assign_template();
/* 如果没有缓存,生成缓存 */
if (!$smarty->is_cached('pre_sale_list.dwt', $cache_id) || true) {
if ($count > 0) {
/* 取得当前页的预售活动 */
$ps_list = pre_sale_list($size, $page);
$smarty->assign('ps_list', $ps_list);
/* 设置分页链接 */
$pager = get_pager('pre_sale.php', array('act' => 'list'), $count, $page, $size);
$smarty->assign('pager', $pager);
}
/* 模板赋值 */
$smarty->assign('cfg', $_CFG);
assign_template();
$position = assign_ur_here();
$smarty->assign('page_title', $position['title']);
// 页面标题
$smarty->assign('ur_here', $position['ur_here']);
// 当前位置
$smarty->assign('categories', get_categories_tree());
// 分类树
$smarty->assign('helps', get_shop_help());
// 网店帮助
$smarty->assign('top_goods', get_top10());
// 销售排行
$smarty->assign('promotion_info', get_promotion_info());
$smarty->assign('feed_url', $_CFG['rewrite'] == 1 ? "feed-typepre_sale.xml" : 'feed.php?type=pre_sale');
// RSS
// URL
assign_dynamic('pre_sale_list');
}
/* 显示模板 */
$smarty->display('pre_sale_list.dwt', $cache_id);
}
示例3: myinvite
function myinvite($page = NULL)
{
check_login();
$page = intval($page) < 1 ? 1 : intval($page);
$limit = $this->config->item('per_page');
$start = ($page - 1) * $limit;
$page_all = ceil($this->invite->get_user_invite_num() / $limit);
$base = '/invite/myinvite';
$data['list'] = $this->invite->get_user_invite($start, $limit);
$data['pager'] = get_pager($page, $page_all, $base);
$this->view('myinvite', $data);
}
示例4: index
function index($page = NULL)
{
check_admin();
$data = array();
$limit = 10;
$page = intval($page) > 0 ? $page : 1;
$start = ($page - 1) * $limit;
$data['froms'] = $this->form->get_forms($start, $limit);
$page_all = ceil(get_count() / $limit);
$data['pager'] = get_pager($page, $page_all, '/design');
$this->view('index', $data);
}
示例5: index
function index()
{
//$data = array();
$data['ci_top_title'] = '微件列表';
$args = func_get_args();
if (isset($args[2])) {
$search = strip_tags(trim($args[2]));
$search = urldecode($search);
} else {
$search = strip_tags(trim(v('search')));
}
$data['search'] = $search;
$type = intval(v('type'));
if ($args) {
$mid = intval($args[0]);
}
if (!isset($mid) || $mid == '') {
$mid = $type;
}
//
if ($mid == '0') {
$where = " AND `name` LIKE '%" . $search . "%' ";
//$data['name'] = '全部范围';
} elseif ($mid > '0') {
$where = " AND `mid` = '" . intval($mid) . "' AND `name` LIKE '%" . $search . "%'";
$name = lazy_get_var("SELECT `name` FROM `u2_plugs` WHERE 1 AND `id` = '" . intval($mid) . "'");
if (!$name) {
info_page('错误的组件ID');
}
} else {
info_page('错误的组件ID');
}
$data['mid'] = $mid;
$data['plugs_name'] = lazy_get_data("SELECT * FROM `u2_plugs`");
$data['page'] = $page = !isset($args[1]) || intval($args[1]) < 1 ? 1 : intval($args[1]);
$limit = 5;
$start = ($page - 1) * $limit;
$item = lazy_get_data("SELECT sql_calc_found_rows * FROM `u2_plugs_widget` WHERE 1 {$where} ORDER BY `id` DESC LIMIT {$start},{$limit}");
$all = get_count();
$data['item'] = $item;
//$type = urlencode( $type );
$base = '/plugs/index/' . $mid;
$page_all = ceil($all / $limit);
$text = urlencode($search);
$data['pager'] = get_pager($page, $page_all, $base, $text);
$data['is_admin'] = is_admin() ? true : false;
$domain = _sess('domain');
if ($domain != '') {
$data['domain'] = $domain;
}
$this->view('list', $data);
}
示例6: action_my_comment
function action_my_comment()
{
$user = $GLOBALS['user'];
$_CFG = $GLOBALS['_CFG'];
$_LANG = $GLOBALS['_LANG'];
$smarty = $GLOBALS['smarty'];
$db = $GLOBALS['db'];
$ecs = $GLOBALS['ecs'];
$user_id = $_SESSION['user_id'];
$min_time = gmtime() - 86400 * $_CFG['comment_youxiaoqi'];
$page = isset($_REQUEST['page']) ? intval($_REQUEST['page']) : 1;
$count = $db->getOne("SELECT COUNT(*) FROM " . $ecs->table('order_goods') . " AS og \r\n\t\t\t\t\t\t LEFT JOIN " . $ecs->table('order_info') . " AS o ON og.order_id=o.order_id\r\n\t\t\t\t\t\t WHERE o.user_id = '{$user_id}' AND o.shipping_time_end > 0 AND og.is_back = 0");
$size = 20;
$page_count = $count > 0 ? intval(ceil($count / $size)) : 1;
// 代码添加$o_id,if判断
$o_id = $_REQUEST['order_id'];
if ($o_id) {
$sql = "SELECT og.*, o.add_time, o.shipping_time_end, o.order_id, g.goods_thumb, s.shaidan_id, s.pay_points AS shaidan_points, s.status AS shaidan_status,\r\n\t\t\tc.status AS comment_status,g.supplier_id,ifnull(ssc.value,'网站自营') AS shopname\r\n\t\t\tFROM " . $ecs->table('order_goods') . " AS og\r\n\t\t\tLEFT JOIN " . $ecs->table('order_info') . " AS o ON og.order_id=o.order_id\r\n\t\t\tLEFT JOIN " . $ecs->table('goods') . " AS g ON og.goods_id=g.goods_id\r\n\t\t\tLEFT JOIN " . $ecs->table('shaidan') . " AS s ON og.rec_id=s.rec_id\r\n\t\t\tLEFT JOIN " . $ecs->table('comment') . " AS c ON og.rec_id=c.rec_id\r\n\t\t\tLEFT JOIN " . $ecs->table('supplier_shop_config') . " AS ssc ON ssc.supplier_id=g.supplier_id AND ssc.code='shop_name'\r\n\t\t\tWHERE o.user_id = '{$user_id}' AND og.order_id = '{$o_id}' AND o.shipping_time_end > 0 AND og.is_back = 0 ORDER BY o.add_time DESC";
} else {
$sql = "SELECT og.*, o.add_time, o.shipping_time_end, o.order_id, g.goods_thumb, s.shaidan_id, s.pay_points AS \tshaidan_points, s.status AS shaidan_status, \r\n\t\t\tc.status AS comment_status,g.supplier_id,ifnull(ssc.value,'网站自营') AS shopname \r\n\t\t\tFROM " . $ecs->table('order_goods') . " AS og \r\n\t\t\tLEFT JOIN " . $ecs->table('order_info') . " AS o ON og.order_id=o.order_id\r\n\t\t\tLEFT JOIN " . $ecs->table('goods') . " AS g ON og.goods_id=g.goods_id\r\n\t\t\tLEFT JOIN " . $ecs->table('shaidan') . " AS s ON og.rec_id=s.rec_id\r\n\t\t\tLEFT JOIN " . $ecs->table('comment') . " AS c ON og.rec_id=c.rec_id\r\n\t\t\tLEFT JOIN " . $ecs->table('supplier_shop_config') . " AS ssc ON ssc.supplier_id=g.supplier_id AND ssc.code='shop_name'\r\n\t\t\tWHERE o.user_id = '{$user_id}' AND o.shipping_time_end > 0 AND c.content > 0 AND og.is_back = 0 ORDER BY o.add_time DESC";
}
$res = $db->selectLimit($sql, $size, ($page - 1) * $size);
$points_list = array();
while ($row = $db->fetchRow($res)) {
$row['thumb'] = get_image_path($row['goods_id'], $row['goods_thumb'], true);
$row['url'] = build_uri('goods', array('gid' => $row['goods_id']), $row['goods_name']);
$row['add_time_str'] = local_date("Y-m-d", $row['add_time']);
$row['goods_tags'] = $db->getAll("SELECT * FROM " . $ecs->table('goods_tag') . " WHERE goods_id = '{$row['goods_id']}'");
$item_list[] = $row;
}
// 代码增加 for 循环
for ($i = 1; $i < count($item_list); $i++) {
$item_list[$i]['o_id'] = $item_list[$i]['order_id'];
unset($item_list[$i]['order_id']);
}
$smarty->assign('item_list', $item_list);
// 统计信息
$num['x'] = $db->getOne("SELECT COUNT(*) AS num FROM " . $ecs->table('order_goods') . " AS og \r\n\t\t\t\t\t\t\tLEFT JOIN " . $ecs->table('order_info') . " AS o ON og.order_id=o.order_id\r\n\t\t\t\t\t\t\tWHERE o.user_id = '{$user_id}' AND og.is_back = 0 AND og.comment_state = 0 AND o.shipping_time_end > {$min_time}");
$num['y'] = $db->getOne("SELECT COUNT(*) AS num FROM " . $ecs->table('order_goods') . " AS og \r\n\t\t\t\t\t\t\tLEFT JOIN " . $ecs->table('order_info') . " AS o ON og.order_id=o.order_id\r\n\t\t\t\t\t\t\tWHERE o.user_id = '{$user_id}' AND og.is_back = 0 AND og.shaidan_state = 0 AND o.shipping_time_end > {$min_time}");
$smarty->assign('num', $num);
$pager = get_pager('user.php', array('act' => $action), $count, $page, $size);
$smarty->assign('min_time', $min_time);
$smarty->assign('pager', $pager);
$smarty->display('user_my_comment.dwt');
}
示例7: urlencode
$smarty->assign('min_price', $min_price);
$smarty->assign('max_price', $max_price);
$smarty->assign('outstock', $_REQUEST['outstock']);
/* 分页 */
$url_format = "search.php?category={$category}&keywords=" . urlencode(stripslashes($_REQUEST['keywords'])) . "&brand=" . $_REQUEST['brand'] . "&action=" . $action . "&goods_type=" . $_REQUEST['goods_type'] . "&sc_ds=" . $_REQUEST['sc_ds'];
if (!empty($intromode)) {
$url_format .= "&intro=" . $intromode;
}
if (isset($_REQUEST['pickout'])) {
$url_format .= '&pickout=1';
}
$url_format .= "&min_price=" . $_REQUEST['min_price'] . "&max_price=" . $_REQUEST['max_price'] . "&sort={$sort}";
$url_format .= "{$attr_url}&order={$order}&page=";
$pager['search'] = array('keywords' => stripslashes(urlencode($_REQUEST['keywords'])), 'category' => $category, 'brand' => $_REQUEST['brand'], 'sort' => $sort, 'order' => $order, 'min_price' => $_REQUEST['min_price'], 'max_price' => $_REQUEST['max_price'], 'action' => $action, 'intro' => empty($intromode) ? '' : trim($intromode), 'goods_type' => $_REQUEST['goods_type'], 'sc_ds' => $_REQUEST['sc_ds'], 'outstock' => $_REQUEST['outstock']);
$pager['search'] = array_merge($pager['search'], $attr_arg);
$pager = get_pager('search.php', $pager['search'], $count, $page, $size);
$pager['display'] = $display;
$smarty->assign('url_format', $url_format);
$smarty->assign('pager', $pager);
assign_template();
assign_dynamic('search');
$position = assign_ur_here(0, $ur_here . ($_REQUEST['keywords'] ? '_' . $_REQUEST['keywords'] : ''));
$smarty->assign('page_title', $position['title']);
// 页面标题
$smarty->assign('ur_here', $position['ur_here']);
// 当前位置
$smarty->assign('intromode', $intromode);
$smarty->assign('categories', get_categories_tree());
// 分类树
$smarty->assign('helps', get_shop_help());
// 网店帮助
示例8: CONCAT
$where = " WHERE w.enabled = 1 AND CONCAT(',', w.rank_ids, ',') LIKE '" . '%,' . $_SESSION['user_rank'] . ',%' . "'";
/* 取得批发商品总数 */
$sql = "SELECT COUNT(*) FROM " . $ecs->table('wholesale') . " AS w " . $where;
$count = $db->getOne($sql);
if ($count > 0) {
/* 取得每页记录数 */
$size = isset($_CFG['page_size']) && intval($_CFG['page_size']) > 0 ? intval($_CFG['page_size']) : 10;
/* 计算总页数 */
$page_count = ceil($count / $size);
/* 取得当前页 */
$page = isset($_REQUEST['page']) && intval($_REQUEST['page']) > 0 ? intval($_REQUEST['page']) : 1;
$page = $page > $page_count ? $page_count : $page;
/* 取得当前页的批发商品 */
$wholesale_list = wholesale_list($size, $page, $where);
$smarty->assign('wholesale_list', $wholesale_list);
$pager = get_pager('wholesale.php', array('act' => 'list'), $count, $page, $size);
$smarty->assign('pager', $pager);
/* 批发商品购物车 */
$smarty->assign('cart_goods', isset($_SESSION['wholesale_goods']) ? $_SESSION['wholesale_goods'] : array());
}
/* 模板赋值 */
assign_template();
$position = assign_ur_here();
$smarty->assign('page_title', $position['title']);
// 页面标题
$smarty->assign('ur_here', $position['ur_here']);
// 当前位置
$smarty->assign('categories', get_categories_tree());
// 分类树
$smarty->assign('helps', get_shop_help());
// 网店帮助
示例9: get_categories_tree
$smarty->assign('categories', get_categories_tree());
// 分类树
$smarty->assign('top_goods', get_top10());
// 销售排行
$smarty->assign('cat_list', cat_list(0, 0, true, 2, false));
$smarty->assign('brand_list', get_brand_list());
$smarty->assign('promotion_info', get_promotion_info());
$smarty->assign('enabled_mes_captcha', intval($_CFG['captcha']) & CAPTCHA_MESSAGE);
$sql = "SELECT COUNT(*) FROM " . $GLOBALS['ecs']->table('comment') . " WHERE STATUS =1 AND comment_type =0 ";
$record_count = $db->getOne($sql);
$sql = "SELECT COUNT(*) FROM " . $GLOBALS['ecs']->table('feedback') . " WHERE `msg_area`='1' AND `msg_status` = '1' ";
$record_count += $db->getOne($sql);
/* 获取留言的数量 */
$page = isset($_REQUEST['page']) ? intval($_REQUEST['page']) : 1;
$pagesize = get_library_number('message_list', 'message_board');
$pager = get_pager('message.php', array(), $record_count, $page, $pagesize);
$msg_lists = get_msg_list($pagesize, $pager['start']);
assign_dynamic('message_board');
$smarty->assign('rand', mt_rand());
$smarty->assign('msg_lists', $msg_lists);
$smarty->assign('pager', $pager);
$smarty->display('message_board.dwt');
}
/**
* 获取留言的详细信息
*
* @param integer $num
* @param integer $start
*
* @return array
*/
示例10: dirname
include_once dirname(__FILE__) . '/function.php';
$data = array();
$tab_type = 'items';
$data['ci_top_title'] = '物品';
$data['tab_type'] = $tab_type;
$data['tab_array'] = $tab_array;
$page = array_shift($args);
$page = intval($page) < 1 ? 1 : intval($page);
$limit = '48';
$start = ($page - 1) * $limit;
$uid = format_uid();
$items = lazy_get_data("select sql_calc_found_rows * from `global_user_items` where `uid` = '{$uid}' and `count` > 0 LIMIT {$start} , {$limit} ");
$all = get_count();
$base = '/app/native/ihome/items';
$page_all = ceil($all / $limit);
$data['pager'] = get_pager($page, $page_all, $base);
$data['list'] = array();
if ($items) {
foreach ($items as $v) {
$iid[] = $v['iid'];
$count[$v['iid']] = $v['count'];
}
$items_info = lazy_get_data("select * from `global_items` where `id` IN(" . join(',', $iid) . ") ");
if ($items_info) {
foreach ($items_info as $v) {
$v['count'] = $count[$v['id']];
$data['list'][] = $v;
}
}
}
$data['baggage_count'] = count($data['list']);
示例11: get_widget_pager
function get_widget_pager($wid, $page, $page_all, $extra = NULL)
{
$pid = _Page('pid');
$base = 'JavaScript:ajax_widget_page( ' . intval($wid) . ' , ' . intval(_Page('cid')) . ' , ' . intval(_Page('pid')) . ', \'';
$extra = $extra . "')";
return get_pager($page, $page_all, $base, $extra);
}
示例12: goodsByBrandId
public function goodsByBrandId ()
{
$list = array();
if (!empty($_REQUEST['id']))
{
$id = trim($_REQUEST['id']);
$page = !empty($_REQUEST['page']) ? intval(trim($_REQUEST['page'])) : 1;
$page_size = !empty($_REQUEST['page_size']) ? intval(trim($_REQUEST['page_size'])) : 10;
$orderStr = !empty($_REQUEST['orderStr']) ? trim($_REQUEST['orderStr']) : "shop_price";
$orderVal = !empty($_REQUEST['orderVal']) ? trim($_REQUEST['orderVal']) : "0";
//正序 倒叙排列
if ($orderVal == "0")
{
$order = "asc";
} else if ($orderVal == "1")
{
$order = "desc";
}
$sql_count = "SELECT count(*) FROM " . $GLOBALS['ecs']->table('goods') . " where brand_id = " . $id ;
$record_count = $GLOBALS['db']->getOne($sql_count);
$page_count = ($record_count > 0) ? intval(ceil($record_count / $page_size)) : 1;
if($record_count>0)
{
$sql = "SELECT goods_id,goods_name,promote_start_date,promote_end_date,promote_price,market_price,shop_price,goods_brief,goods_thumb,is_best,is_hot,is_new FROM " . $GLOBALS['ecs']->table('goods') . " as g where g.is_on_sale = 1 AND g.is_alone_sale = 1 AND g.is_delete = 0 and g.brand_id = " . $id . " order by " . $orderStr . " $order ";
$res = $GLOBALS['db']->selectLimit($sql, $page_size, ($page - 1) * $page_size);
$index = 0;
while($row =$GLOBALS['db']->fetchRow($res))
{
/* 促销时间倒计时 */
$time = gmtime();
if ($time >= $row['promote_start_date'] && $time <= $row['promote_end_date'])
{
$row['gmt_end_time'] = $row['promote_end_date'];
}
else
{
$row['gmt_end_time'] = 0;
}
$arr[$index] = $row;
$arr[$index]['format_market_price'] = price_format($row['market_price']);
$arr[$index]['format_shop_price'] = price_format($row['shop_price']);
$arr[$index]['format_promote_price'] = price_format($row['promote_price']);
$index++;
}
$pager = get_pager('goods_list.php', array('act' => "goodsByBrandId"), $record_count, $page, $page_size);
if(!empty($arr))
{
$list['goods'] = $arr;
$list['pager'] = $pager;
}
}
}
jsonExit($list);
}
示例13: isset
//$integral_records = get_all_integral_records($user_id);
//$smarty->assign('integral_records',$integral_records);
$ctl = isset($_REQUEST['ctl']) ? $_REQUEST['ctl'] : '0';
$smarty->assign('ctl', $ctl);
$integralCondition = array();
$integralCondition[] = array($user_id, ' 1 ', ' is_frozen=0 ');
$integralCondition[] = array($user_id, 'type = 0', ' is_frozen=0 ');
$integralCondition[] = array($user_id, 'type = 1', ' is_frozen=0 ');
$integralCondition[] = array($user_id, 'type = 5', ' is_frozen=0 ');
$integralCondition[] = array($user_id, ' 1 ', ' is_frozen=1 ');
$integral_records_list = array();
$all_pages = array();
for ($i = 0; $i < 5; $i++) {
$page = isset($_REQUEST["page{$i}"]) ? intval($_REQUEST["page{$i}"]) : 0;
$record_count = get_integral_records_count($integralCondition[$i][0], $integralCondition[$i][1], $integralCondition[$i][2]);
$all_pages[$i] = get_pager('user.php', array('act' => $action), $record_count, $page, 10, "page{$i}=", "&ctl={$i}", '#tab');
$integral_records_list[$i] = get_integral_records($integralCondition[$i][0], $integralCondition[$i][1], $integralCondition[$i][2], $all_pages[$i]['size'], $all_pages[$i]['start']);
}
$smarty->assign('integral_records_list', $integral_records_list);
$smarty->assign('all_pages', $all_pages);
$smarty->assign('frozen_integral', get_frozen_integral($user_id));
$smarty->display('user_clips.dwt');
} elseif ($action == 'user_complain') {
$order_id = $_REQUEST['order_id'];
$type = $_REQUEST['type'];
$content = $_REQUEST['content'];
$captcha = $_REQUEST['captcha'];
$now = gmtime();
include_once 'includes/cls_captcha.php';
$validator = new captcha($_SESSION['captcha_word']);
if (!$validator->check_word($_POST['captcha'])) {
示例14: get_pager
?>
</div>
</div>
<?php
}
?>
</div>
<?php
}
} else {
echo "<div class=\"project-preview\">Ничего не найдено</div>";
}
?>
</div>
<?php
print get_pager($pages, $page, "?p=list&fld={$folder}&page=");
?>
<script><?php
if ($pages <= $page || !$prj_count) {
?>
function dprj(){}<?php
} else {
?>
var prjc=<?php
echo $prj_count;
?>
;function dprj(){if(!(--prjc))window.location.href='?p=list&fld=<?php
echo $folder;
?>
&page=<?php
echo $page;
示例15: search
function search($page = NULL, $searchtext = NULL)
{
$searchtext = urldecode($searchtext);
$page = intval($page) < 1 ? 1 : intval($page);
$start = intval(c('user_per_page')) * ($page - 1);
$data['users'] = $this->user->get_users($start, $searchtext);
$all = get_count();
$page_all = ceil($all / intval(c('user_per_page')));
$url_base = '/user/search';
$data['action'] = 'search';
$data['searchtext'] = $searchtext;
$data['pager'] = get_pager($page, $page_all, $url_base, $searchtext);
$this->view('ulist', $data);
}