Exemplo n.º 1
0
     /* 取得当前页 */
     $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());
     // 分类树
Exemplo n.º 2
0
    /* 模板赋值 */
    $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) {
Exemplo n.º 3
0
     $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());