Ejemplo n.º 1
0
 function show($is_rewrite)
 {
     global $_G;
     $did = intval($_G['sr_did']);
     $act = $cateid < 1 ? ' class="cateon"' : '';
     $this->_category_list = array();
     $this->_navigation = srlang('region');
     $region = array('', 'birthprovince', 'birthcity', 'birthdist', 'birthcommunity');
     $this->search = array();
     for ($i = 1; $i < 5; $i++) {
         if ($this->_locationdata["{$i}"]) {
             $this->_search[$region[$i]] = $this->_locationdata[$i]['name'];
             $this->_navigation .= "<em>-</em>" . $this->_locationdata[$i]['name'];
             $this->_category_list[$i] = array();
             foreach (C::t('#sanree_brand#common_district')->fetch_all_by_upid($this->_locationdata[$i]['upid']) as $key => $value) {
                 if ($value['id'] == $did || $value['id'] == $this->_locationdata[$i]['id']) {
                     $value['class'] = ' class="cateon"';
                 }
                 $value['url'] = getcateurl(array('did' => $value['id']));
                 $this->_category_list[$i]['data'][$key] = array('class' => $value['class'], 'name' => $value['name'], 'url' => $value['url']);
             }
             $this->_category_list[$i]['allname'] = srlang('notlimited');
             $this->_category_list[$i]['pidurl'] = getcateurl(array('did' => $this->_locationdata[$i]['upid']));
             $this->_category_list[$i]['pidclass'] = ' class="districtl' . $i . '"';
             $this->_category_list[$i]['class'] = ' dshow' . $i;
             $this->_category_list[$i]['id'] = $i;
         }
     }
     foreach (C::t('#sanree_brand#common_district')->fetch_all_by_toupid($did) as $key => $value) {
         $value['url'] = getcateurl(array('did' => $value['id']));
         $this->_category_list[5]['data'][$key] = array('class' => $value['class'], 'name' => $value['name'], 'url' => $value['url']);
     }
     if ($this->_category_list[5]) {
         $this->_category_list[5]['allname'] = srlang('notlimited');
         $this->_category_list[5]['pidurl'] = getcateurl(array('did' => $did));
         $this->_category_list[5]['pidclass'] = ' class="cateon"';
         $this->_category_list[5]['class'] = ' dshow' . ($this->_nowrow['level'] + 1);
         $this->_category_list[5]['id'] = $this->_nowrow['level'] + 1;
     }
 }
Ejemplo n.º 2
0
        $voter = C::t('#sanree_brand#sanree_brand_voter')->getvotetotal_by_tid(intval($value['tid']));
        $voter[2] = $voter[2] == 0 ? 1 : $voter[2];
        $v1 = round($voter[1] / $voter[2], 1);
        list($vn1, $vn2) = explode('.', $v1);
        $value['cateurl'] = getcateurl(array('tid' => $value['cateid']), TRUE);
        $mtf = $_G['cache']['plugin']['sanree_mcertification']['isopen'];
        if ($mtf) {
            $mcertification = C::t('#sanree_mcertification#sanree_mcertification')->gettype_by_bid(intval($value['bid']));
            $mgif = 'source/plugin/sanree_mcertification/tpl/default/mcertification/brandimg/none.png';
            if ($mcertification) {
                $mgif = $mcertification['type'] ? 'source/plugin/sanree_mcertification/tpl/default/mcertification/brandimg/personal.png' : 'source/plugin/sanree_mcertification/tpl/default/mcertification/brandimg/company.png';
            }
        }
        $fbusinesses_list[] = array('weixin' => $value['weixin'], 'wximg' => $value['weixinimg'], 'wxplublic' => $value['weixinpublic'], 'wxppic' => $value['weixinpublicpic'], 'bid' => $value['bid'], 'mtype' => $mcertification, 'isrecommend' => $value['isrecommend'], 'istop' => $value['istop'], 'mcertification' => $mgif, 'catename' => $value['catename'], 'cateurl' => $value['cateurl'], 'name' => $value['name'], 'poster' => $issmallpic == 1 && !$config['isbird'] ? brand_getlogo($value['bid'], 0, $logow, $logoh, 'fixnone') : newtheme($value['poster']), 'addtime' => dgmdate($value['addtime']), 'tel114url' => $value['tel114url'], 'turl' => getburl($value), 'qq' => $value['qq'], 'msn' => $value['msn'], 'wangwang' => $value['wangwang'], 'icq' => $value['icq'], 'address' => empty($value['address']) ? srlang('zanwustr') : $value['address'], 'groupsmallicons' => getgroupsmallicons($value['groupid']), 'tel' => $value['tel'], 'sdiscount' => $value['discount'], 'pbid' => intval($value['pbid']), 'iscard' => intval($value['iscard']), 'discount' => $config['selectdiscountshow'][$value['discount']], 'recommendarr' => explode('.', $value['recommendationindex']), 'voter' => intval($vn1), 'voter2' => intval($vn2), 'satisfaction' => $voter[3], 'recommendationindex' => $value['recommendationindex'], 'class' => ' class="' . $value['class'] . '" ', 'forum_thread' => array('views' => $value['tviews']));
    }
    $murl = $is_rewrite ? getcateurl(array('tid' => $cateid, 'listmode' => $listmode)) . '?t' . $extra : getcateurl(array('tid' => $cateid, 'listmode' => $listmode)) . $extra;
    $multi = sanree_brand_multi($count, $perpage, $page, $murl);
}
$recommendlist = sanreeloadcache('recommendlist');
$tabHead['goods'] = $tabHead['news'] = $tabHead['coupon'] = '';
$tabBody['goods'] = $tabBody['news'] = $tabBody['coupon'] = '';
$installmode = array();
$goods_config = $_G['cache']['plugin']['sanree_brand_goods'];
if ($goods_config['isopen']) {
    $modfile = DISCUZ_ROOT . './source/plugin/sanree_brand_goods/function/function_module.php';
    @(require_once $modfile);
    $modurl_goods = goods_getmodeurl();
    $selectpriceunit = $goods_config['selectpriceunit'];
    $marr = explode("\r\n", $selectpriceunit);
    foreach ($marr as $row) {
        list($key, $val) = explode("=", $row);
Ejemplo n.º 3
0
 function getsubcategory_bird($category_list)
 {
     global $_G;
     $cateid = intval($_G['sr_tid']);
     $subcategory_list = array();
     foreach ($category_list as $key => $value) {
         if (!$key) {
             $subcategory_list[] = $value;
             continue;
         }
         $subcategory = C::t('#sanree_brand#sanree_brand_category')->getcategory_by_pcateid(intval($key));
         $sub_lsit = array();
         $subcate_list = array('class' => $cateid == $key ? ' class="cateon"' : '', 'name' => srlang('notlimited'), 'url' => getcateurl(array('tid' => $key)));
         $sub_lsit[] = $subcate_list;
         foreach ($subcategory as $subcate) {
             $subcate_list = array('class' => $cateid == $subcate['cateid'] ? ' class="cateon"' : '', 'name' => $subcate['name'], 'url' => getcateurl(array('tid' => $subcate['cateid'])));
             $sub_lsit[] = $subcate_list;
         }
         $subcategory_list[] = $sub_lsit;
     }
     return $subcategory_list;
 }