$vote = get_vote(); if (!empty($vote)) { $smarty->assign('vote_id', $vote['id']); $smarty->assign('vote', $vote['content']); } $ext = ''; //商品查询条件扩展 //$smarty->assign('best_goods', get_exchange_recommend_goods('best', $children, $integral_min, $integral_max)); //$smarty->assign('new_goods', get_exchange_recommend_goods('new', $children, $integral_min, $integral_max)); $smarty->assign('hot_goods', get_exchange_recommend_goods('hot', $children, $integral_min, $integral_max)); $count = get_exchange_goods_count($children, $integral_min, $integral_max); $max_page = $count > 0 ? ceil($count / $size) : 1; if ($page > $max_page) { $page = $max_page; } $goodslist = exchange_get_goods($children, $integral_min, $integral_max, $ext, $size, $page, $sort, $order); if ($display == 'grid') { if (count($goodslist) % 2 != 0) { $goodslist[] = array(); } } $smarty->assign('goods_list', $goodslist); $smarty->assign('category', $cat_id); $smarty->assign('integral_max', $integral_max); $smarty->assign('integral_min', $integral_min); assign_pager('exchange', $cat_id, $count, $size, $sort, $order, $page, '', '', $integral_min, $integral_max, $display); // 分页 assign_dynamic('exchange_list'); // 动态内容 } $smarty->assign('feed_url', $_CFG['rewrite'] == 1 ? "feed-typeexchange.xml" : 'feed.php?type=exchange');
} $ext = ''; //商品查询条件扩展 $smarty->assign('best_goods', get_exchange_recommend_goods('best', $children, $integral_min, $integral_max)); // 获取超值兑换 chen 08 30 $smarty->assign('new_goods', get_exchange_recommend_goods('new', $children, $integral_min, $integral_max)); // 获取精品上新 chen 08 30 $count = get_exchange_goods_count($children, $integral_min, $integral_max); $max_page = $count > 0 ? ceil($count / $size) : 1; if ($page > $max_page) { $page = $max_page; } $now = gmtime(); $started = " {$now} > eg.begin_time "; $not_started = " {$now} < eg.begin_time "; $goods_trailer = exchange_get_goods($children, $integral_min, $integral_max, $ext, $size, $page, $sort, $order, $not_started); // 获取未开始的积分兑换 chen 08 30 $in_week = gmtime() - 3600 * 24 * 7; $in_month = gmtime() - 3600 * 24 * 30; $weekly_rank = get_goods_rank(" oi.pay_time > {$in_week}"); $monthly_rank = get_goods_rank(" oi.pay_time > {$in_month}"); if ($display == 'grid') { if (count($goodslist) % 2 != 0) { $goodslist[] = array(); } } /* 积分商城广告 */ $ad_integral = $db->getRow('SELECT ad_code, ad_link FROM ' . $ecs->table("ad") . ' WHERE position_id = 2 '); $smarty->assign('ad_integral', $ad_integral); $smarty->assign('goods_trailer', $goods_trailer); $smarty->assign('weekly_rank', $weekly_rank);