本文整理汇总了PHP中auction_list函数的典型用法代码示例。如果您正苦于以下问题:PHP auction_list函数的具体用法?PHP auction_list怎么用?PHP auction_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了auction_list函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
/* 取得当前页 */
$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));
}
/* 如果没有缓存,生成缓存 */
if (!$smarty->is_cached('auction_list.dwt', $cache_id)) {
if ($count > 0) {
/* 取得当前页的拍卖活动 */
$auction_list = auction_list($size, $page);
$smarty->assign('auction_list', $auction_list);
/* 设置分页链接 */
$pager = get_pager('auction.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());
// 分类树
示例2: array
/* 模板赋值 */
$smarty->assign('full_page', 1);
$smarty->assign('ur_here', $_LANG['auction_list']);
$smarty->assign('action_link', array('href' => 'auction.php?act=add', 'text' => $_LANG['add_auction']));
$list = auction_list();
$smarty->assign('auction_list', $list['item']);
$smarty->assign('filter', $list['filter']);
$smarty->assign('record_count', $list['record_count']);
$smarty->assign('page_count', $list['page_count']);
$sort_flag = sort_flag($list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
/* 显示商品列表页面 */
assign_query_info();
$smarty->display('auction_list.htm');
} elseif ($_REQUEST['act'] == 'query') {
$list = auction_list();
$smarty->assign('auction_list', $list['item']);
$smarty->assign('filter', $list['filter']);
$smarty->assign('record_count', $list['record_count']);
$smarty->assign('page_count', $list['page_count']);
$sort_flag = sort_flag($list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
make_json_result($smarty->fetch('auction_list.htm'), '', array('filter' => $list['filter'], 'page_count' => $list['page_count']));
} elseif ($_REQUEST['act'] == 'remove') {
check_authz_json('auction');
$id = intval($_GET['id']);
$auction = auction_info($id);
if (empty($auction)) {
make_json_error($_LANG['auction_not_exist']);
}
if ($auction['bid_user_count'] > 0) {
示例3: isset
$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));
}
/* 如果没有缓存,生成缓存 */
if (!$smarty->is_cached('auction_list.dwt', $cache_id)) {
if ($count > 0) {
/* 取得当前页的拍卖活动 */
$auction_list = auction_list($size, $page);
$auction_list_hot = auction_list($size, $page, "act_count");
$smarty->assign('auction_list', $auction_list);
$smarty->assign('auction_list_hot', $auction_list_hot);
/* 设置分页链接 */
$pager = get_pager('auction.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());