예제 #1
0
    }
    $orderby = 't.istop desc,t.displayorder, t.dateline desc';
    $where = array('c.status=1', 't.isrecommend=1', 't.status=1');
    $re_couponlist = array();
    foreach (C::t('#sanree_brand#sanree_brand_coupon')->fetch_all_by_searchc($where, $orderby, 0, 5) as $value) {
        $value['url'] = coupon_getburl($value);
        $value['pic'] = coupon_getforumimg($value['homeaid'], 0, 180, 135, 'fixwr');
        $priceunit = $coupon_config['selectpriceunitshow'][$value['priceunit']];
        $re_couponlist[] = array('pic' => $value['pic'], 'url' => $value['url'], 'name' => $value['name'], 'gid' => $value['gid'], 'sminprice' => $priceunit . $value['minprice']);
    }
    $orderby = 't.dateline desc';
    $where = array('c.status=1', 't.status=1');
    $new_couponlist = array();
    foreach (C::t('#sanree_brand#sanree_brand_coupon')->fetch_all_by_searchc($where, $orderby, 0, 6) as $value) {
        $value['url'] = coupon_getburl($value);
        $value['pic'] = coupon_getforumimg($value['homeaid'], 0, 80, 60);
        $priceunit = $coupon_config['selectpriceunitshow'][$value['priceunit']];
        $enddate = $value['enddate'] ? coupon_modlang('enddatestr') . dgmdate($value['enddate'], 'd') : '';
        $new_couponlist[] = array('enddate' => $enddate, 'pic' => $value['pic'], 'url' => $value['url'], 'name' => $value['name'], 'gid' => $value['gid'], 'sprice' => $priceunit . $value['price'], 'sminprice' => $priceunit . $value['minprice']);
    }
    $tabHead['coupon'] = empty($tabHead['goods']) && empty($tabHead['news']) ? ' class="c_active"' : '';
    $tabBody['coupon'] = empty($tabBody['goods']) && empty($tabBody['news']) ? ' c_current' : '';
    if ($new_couponlist) {
        $installmode[] = '"coupon"';
    }
}
$installmodestr = implode(',', $installmode);
if ($config['isbird']) {
    $slideid = 3;
} else {
    if ($hellobigslide == 1) {
예제 #2
0
 $page = isset($_G['sr_page']) ? intval($_G['sr_page']) : 1;
 $page = max(1, intval($page));
 $start = ($page - 1) * $perpage;
 $start = max(0, $start);
 $where = array();
 $where[] = 't.bid=' . $bid;
 $where[] = 'c.status=1';
 $where[] = 't.status=1';
 $where[] = 't.isshow=1';
 $coupon_config = $_G['cache']['plugin']['sanree_brand_coupon'];
 if ($coupon_config['isopen']) {
     $count = C::t('#sanree_brand_coupon#sanree_brand_coupon')->count_by_wherec($where);
     if ($count > 0) {
         $couponlist = array();
         foreach (C::t('#sanree_brand_coupon#sanree_brand_coupon')->fetch_all_by_searchc($where, 'displayorder,bid desc', ($page - 1) * $perpage, $perpage) as $key => $coupon) {
             $coupon['pic'] = intval($coupon['homeaid']) > 0 ? coupon_getforumimg($coupon['homeaid'], 130, 130) : 'static/image/common/nophoto.gif';
             $coupon['url'] = coupon_getburl($coupon);
             $couponlist[$key] = $coupon;
         }
         $murl = coupon_getusermodeurl(array('bid' => $bid));
         $multi_coupon = multi($count, $perpage, $page, $murl);
     }
 }
 $goods_config = $_G['cache']['plugin']['sanree_brand_goods'];
 if ($goods_config['isopen']) {
     $count = C::t('#sanree_brand_goods#sanree_brand_goods')->count_by_wherec($where);
     if ($count > 0) {
         $goodslist = array();
         foreach (C::t('#sanree_brand_goods#sanree_brand_goods')->fetch_all_by_searchc($where, 'displayorder,bid desc', ($page - 1) * $perpage, $perpage) as $key => $goods) {
             $goods['pic'] = goods_getforumimg($goods['homeaid'], 1, 130, 130, 'fixnone');
             $goods['url'] = goods_getburl($goods);