예제 #1
0
파일: brand.php 프로젝트: netroby/ecshop
    $smarty->assign('show_marketprice', $_CFG['show_marketprice']);
    $smarty->assign('brand_cat_list', brand_related_cat($brand_id));
    // 相关分类
    $smarty->assign('feed_url', $_CFG['rewrite'] == 1 ? "feed-b{$brand_id}.xml" : 'feed.php?brand=' . $brand_id);
    /* 调查 */
    $vote = get_vote();
    if (!empty($vote)) {
        $smarty->assign('vote_id', $vote['id']);
        $smarty->assign('vote', $vote['content']);
    }
    $smarty->assign('best_goods', brand_recommend_goods('best', $brand_id, $cate));
    $smarty->assign('promotion_goods', brand_recommend_goods('promote', $brand_id, $cate));
    $smarty->assign('brand', $brand_info);
    $smarty->assign('promotion_info', get_promotion_info());
    $count = goods_count_by_brand($brand_id, $cate);
    $goodslist = brand_get_goods($brand_id, $cate, $size, $page, $sort, $order);
    if ($display == 'grid') {
        if (count($goodslist) % 2 != 0) {
            $goodslist[] = array();
        }
    }
    $smarty->assign('goods_list', $goodslist);
    $smarty->assign('script_name', 'brand');
    assign_pager('brand', $cate, $count, $size, $sort, $order, $page, '', $brand_id, 0, 0, $display);
    // 分页
    assign_dynamic('brand');
    // 动态内容
}
$smarty->display('brand.dwt', $cache_id);
/*------------------------------------------------------ */
//-- PRIVATE FUNCTION
예제 #2
0
 $smarty->assign('show_marketprice', $_CFG['show_marketprice']);
 $smarty->assign('brand_cat_list', brand_related_cat($brand_id));
 // 相关分类
 $smarty->assign('feed_url', $_CFG['rewrite'] == 1 ? "feed-b{$brand_id}.xml" : 'feed.php?brand=' . $brand_id);
 /* 调查 */
 $vote = get_vote();
 if (!empty($vote)) {
     $smarty->assign('vote_id', $vote['id']);
     $smarty->assign('vote', $vote['content']);
 }
 $smarty->assign('best_goods', brand_recommend_goods('best', $brand_id, $cate));
 $smarty->assign('promotion_goods', brand_recommend_goods('promote', $brand_id, $cate));
 $smarty->assign('brand', $brand_info);
 $smarty->assign('promotion_info', get_promotion_info());
 $count = goods_count_by_brand($brand_id, $cate);
 $goodslist = brand_get_goods($brand_id, $cate, $size, $page, 'goods_sn', $order);
 if ($display == 'grid') {
     if (count($goodslist) % 2 != 0) {
         $goodslist[] = array();
     }
 }
 $smarty->assign('script_name', 'brand');
 $brandsn = array();
 foreach ($goodslist as $key => $value) {
     $goodslist[$key]['brandsn'] = $brand_info['brand_name'] . $value['sn'];
 }
 unset($goodslist[7]);
 unset($goodslist[35]);
 // print_r($goodslist);
 //print_r($brandsn);
 // $smarty->assign('goods_list',      $goodslist);