예제 #1
0
 function show($is_rewrite)
 {
     global $_G, $allurl;
     $cateid = intval($_G['sr_tid']);
     $act = $cateid < 1 ? ' class="cateon"' : '';
     $this->_category_list[0] = array('class' => $act, 'name' => !empty($this->_allcategorytitle) ? $this->_allcategorytitle : srlang('all'), 'url' => $allurl);
     $this->_location = srlang('all');
     if (!is_array($_G['cache']['sanree_brand_category'])) {
         sanreeupdatecache('category');
     }
     $this->_subcategory = sanreeloadcache('subcategory');
     $this->_category = sanreeloadcache('category');
     $this->_navigation = '';
     foreach ($this->_subcategory as $value) {
         $value['url'] = getcateurl(array('tid' => $value['cateid']));
         if ($value['cateid'] == $cateid) {
             $this->_navigation = "<em>&raquo;</em>{$value['name']}";
             $this->_location = $value[name];
         }
         $this->_category_list[$value['cateid']] = array('class' => $value['class'], 'name' => $value['name'], 'url' => $value['url']);
     }
     if ($cateid > 0) {
         $this->_curcatedata = $this->_subcategory[$cateid];
         $this->_pid = intval($this->_category[$cateid]['pcateid']);
         if ($this->_pid == 0) {
             $this->_pid = $cateid;
             $purl = getcateurl(array('tid' => $this->_pid));
             $this->_subdata = array('class' => ' class="cateon"', 'name' => srlang('notlimited'), 'url' => $purl);
         } else {
             $purl = getcateurl(array('tid' => $this->_pid));
             $this->_navigation .= '<em>&raquo;</em><a href="' . $purl . '">' . $this->_category[$this->_pid][name] . '</a>';
             $this->_subdata = array('class' => '', 'name' => srlang('notlimited'), 'url' => $purl);
         }
         $this->_category_list[$this->_pid]['class'] = ' class="cateon"';
         foreach ($this->_subcategory[$this->_pid]['subcategories'] as $value) {
             $count = C::t('#sanree_brand#sanree_brand_businesses')->count_by_cateid($value['cateid']);
             $value['url'] = getcateurl(array('tid' => $value[cateid]));
             if ($value['cateid'] == $cateid) {
                 $value['class'] = ' class="cateon"';
                 $this->_navigation .= '<em>&raquo;</em>' . $value[name];
                 $this->_location = $value[name];
             }
             $this->_subcategory_list[$value['cateid']] = array('count' => $count, 'class' => $value['class'], 'name' => $value[name], 'url' => $value['url']);
         }
     }
 }
예제 #2
0
 function getsetting()
 {
     global $_G;
     @(require_once DISCUZ_ROOT . './source/plugin/sanree_brand/function/function_core.php');
     define('APPC', DISCUZ_ROOT . './source/plugin/sanree_brand/condition/');
     $modfile = APPC . 'index.php';
     require_once $modfile;
     $category_list = array();
     $category = sanreeloadcache('usercate');
     $category_list[] = array('0', lang('plugin/sanree_brand', 'allcate'));
     foreach ($category as $value) {
         $category_list[] = array($value[cateid], $value[name]);
     }
     $group_list = array();
     $group_list[] = array('0', lang('plugin/sanree_brand', 'kong'));
     foreach (C::t('#sanree_brand#sanree_brand_group')->fetch_all_group() as $value) {
         $group_list[] = array($value[groupid], $value[groupname]);
     }
     $settings = array('cateid' => array('title' => lang('plugin/sanree_brand', 'blockclass_catename'), 'type' => 'select', 'default' => 0, 'value' => $category_list), 'groupid' => array('title' => lang('plugin/sanree_brand', 'blockclass_groupname'), 'type' => 'select', 'default' => 0, 'value' => $group_list), 'showfilter' => array('title' => lang('plugin/sanree_brand', 'blockclass_showfilter'), 'type' => 'mradio', 'default' => 0, 'value' => array(array('0', lang('plugin/sanree_brand', 'blockclass_zuixin')), array('1', lang('plugin/sanree_brand', 'blockclass_zhiding')), array('2', lang('plugin/sanree_brand', 'blockclass_tuijian')))), 'orderby' => array('title' => lang('plugin/sanree_brand', 'blockclass_ordertitle'), 'type' => 'mradio', 'default' => 0, 'value' => array(array('0', lang('plugin/sanree_brand', 'blockclass_bid')), array('1', lang('plugin/sanree_brand', 'blockclass_showid')), array('2', lang('plugin/sanree_brand', 'blockclass_dateline')), array('3', lang('plugin/sanree_brand', 'blockclass_views')))), 'ordersc' => array('title' => lang('plugin/sanree_brand', 'blockclass_ordersctitle'), 'type' => 'mradio', 'default' => 0, 'value' => array(array('0', lang('plugin/sanree_brand', 'blockclass_orderscdown')), array('1', lang('plugin/sanree_brand', 'blockclass_orderscup')))), 'start' => array('title' => lang('plugin/sanree_brand', 'blockclass_starttitle'), 'type' => 'text', 'default' => 0));
     return $settings;
 }
예제 #3
0
    } else {
        $slideid = 1;
    }
}
$slidelistarr = sanreeloadcache('slidelist');
$slide = DB::fetch_first("SELECT * FROM " . DB::table('sanree_brand_slide') . ' where id=3');
if (!$slide) {
    $slidelistarr[3] = array(array('pic' => 'source/plugin/sanree_brand/tpl/bird/images/banner.jpg', 'url' => 'http://dx.sanree.com/', 'color' => '#EEEDE9'), array('pic' => 'source/plugin/sanree_brand/tpl/bird/images/testbanner.jpg', 'url' => 'http://dx.sanree.com/', 'color' => '#FFE8EB'));
} else {
    for ($j = 1; $j < 6; $j++) {
        if (!$slide['pic' . $j]) {
            continue;
        }
        $slides = array('pic' => $_G['setting']['attachurl'] . 'common/' . $slide['pic' . $j], 'url' => $slide['movie' . $j], 'color' => $slide['movie' . $j . $j]);
        $slidelistarr[3][] = $slides;
    }
}
$slidelist = $slidelistarr[$slideid];
$newbrandlist = sanreeloadcache('newbrandlist');
$hotbrandlist = sanreeloadcache('hotbrandlist');
if (intval($_G['cache']['plugin']['sanree_brand_help']['isopen']) == 1) {
    $helpcate = sanreeloadcache('help');
}
$picload = $isslideload == 1 ? 'file' : 'src';
$friendly_link = C::t('#sanree_brand#sanree_brand_friendly_link')->fetch_all();
$themestyle = 'hello';
$stheme = array('christmas', 'newyear', 'springfestival');
if (in_array($frontpagestyle, $stheme)) {
    $themestyle = $frontpagestyle;
}
include templateEx($plugin['identifier'] . ':' . $template . '/' . $themestyle);
예제 #4
0
 function getmenu($brandresult, $active)
 {
     global $_G, $template, $bodycss, $ishideheader, $allurl;
     $group = C::t('#sanree_brand#sanree_brand_group')->get_by_groupid($brandresult['groupid']);
     global $myhomeurl, $referer, $addgroup;
     $tmpconfig = $_G['cache']['plugin']['sanree_brand'];
     $allowsyngroup = intval($tmpconfig['allowsyngroup']);
     $isshowordinary = intval($tmpconfig['isshowordinary']);
     !defined('sr_brand_JS') && define('sr_brand_JS', sr_brand_TPL . '/' . $tmpconfig['template'] . '/js');
     !defined('SANREE_BRAND_TEMPLATE') && define('SANREE_BRAND_TEMPLATE', sr_brand_TPL . '/' . $tmpconfig['template']);
     $allurl = gethomeurl();
     $myhomeurl = !empty($brandresult['brandno']) ? getbrandnourl($brandresult['brandno']) : getmyburl_by_bid($brandresult['bid']);
     $referer = urlencode($myhomeurl);
     if (!isset($_G['cache']['sanree_brand_topmenu']) || !is_array($_G['cache']['sanree_brand_topmenu'])) {
         sanreeupdatecache('menu');
     }
     $menu = sanreeloadcache('topmenu');
     $headermenulist = array();
     $headermenulist['index'] = array('url' => getburl($brandresult), 'title' => srlang('brandindex'), 'class' => ' class="normal"');
     $brandresult['allowalbum'] == 1 && ($headermenulist['myalbum'] = array('url' => getalbumurl($brandresult['bid']), 'title' => srlang('myalbum'), 'class' => ' class="normal"'));
     $allowsyngroup == 1 && intval($group['allowsyngroup']) == 1 && $brandresult['syngrouptid'] && ($headermenulist['dzgroup'] = array('url' => 'forum.php?mod=group&amp;fid=' . $brandresult['syngrouptid'], 'title' => srlang('dzgroup'), 'class' => ' class="normal"'));
     hookscript('sanreebrandusermenu', 'global', 'funcs', array('bid' => $brandresult['bid']), 'sanreebrandusermenu');
     if ($_G['sanree_brand_menus']) {
         foreach ($_G['sanree_brand_menus'] as $row) {
             $row['url'] = str_replace('{tid}', $brandresult['tid'], $row['url']);
             $row['url'] = str_replace('{bid}', $brandresult['bid'], $row['url']);
             $row['url'] = str_replace('{pid}', $brandresult['pid'], $row['url']);
             $headermenulist[$row['name']] = $row;
         }
     }
     $isshowordinary == 1 && ($headermenulist['ordinary'] = array('url' => 'forum.php?mod=viewthread&amp;tid=' . $brandresult['tid'], 'title' => srlang('ordinary'), 'class' => ' class="normal"'));
     foreach ($menu as $row) {
         $row['url'] = str_replace('{tid}', $brandresult['tid'], $row['url']);
         $row['url'] = str_replace('{bid}', $brandresult['bid'], $row['url']);
         $row['url'] = str_replace('{pid}', $brandresult['pid'], $row['url']);
         $headermenulist['menu' . $row[id]] = $row;
     }
     $headermenulist[$active] && ($headermenulist[$active]['class'] = ' class="active"');
     $headermenulists = $headermenulist;
     $headermenulist = array();
     $menuorder = C::t('#sanree_brand#sanree_brand_menu_order')->fetch_all();
     asort($menuorder);
     foreach ($menuorder as $key => $row) {
         if ($headermenulists[$key]) {
             $headermenulist[$key] = $headermenulists[$key];
         }
     }
     if (intval($_G['uid']) === intval($brandresult['uid'])) {
         define('IN_BRAND_USER', TRUE);
         hookscript('sanreebrandmanagemenu', 'global', 'funcs', array('bid' => $brandresult['bid']), 'sanreebrandmanagemenu');
         $managemenulist = array();
         $_G['sanree_brand_managemenus'][] = array('displayorder' => 9999, 'window' => 0, 'name' => '', 'title' => '', 'url' => '', 'class' => '', 'image' => 'source/plugin/sanree_brand/tpl/good/images/add.png');
         if ($_G['sanree_brand_managemenus']) {
             foreach ($_G['sanree_brand_managemenus'] as $row) {
                 $row['url'] = str_replace('{tid}', $brandresult['tid'], $row['url']);
                 $row['url'] = str_replace('{bid}', $brandresult['bid'], $row['url']);
                 $row['url'] = str_replace('{pid}', $brandresult['pid'], $row['url']);
                 $managemenulist[] = $row;
             }
             $ncount = count($managemenulist);
             $mod = $ncount % 10;
             $mt = intval($ncount / 10);
             $oneh = 100;
             if ($mt == 0) {
                 $ih = $oneh;
             } else {
                 if ($mod == 0) {
                     $ih = $mt * $oneh;
                 } else {
                     $ih = ($mt + 1) * $oneh;
                 }
             }
             $ih += 10;
             $managemenulist = $this->array_sort($managemenulist, 'displayorder');
         }
     }
     $allowtemplate = intval($group['allowtemplate']);
     if ($allowtemplate == 1) {
         $templateconfig = unserialize($brandresult['templateconfig']);
         $bodystyle = $templateconfig['bodystyle'];
         $bodycss = '';
         if ($bodystyle) {
             if (intval($bodystyle['isuse']) == 1) {
                 $bodycss = "body {\r\n";
                 if ($bodystyle['notbackimg'] == 1) {
                     if (!empty($bodystyle['backgroundimage'])) {
                         $bodycss .= "background-image:url('" . $_G['setting']['attachurl'] . 'category/' . "{$bodystyle['backgroundimage']}');\r\n";
                     }
                 } else {
                     $bodycss .= "background:none;\r\n";
                 }
                 if (!empty($bodystyle['backgroundrepeat'])) {
                     $bodycss .= "background-repeat:{$bodystyle['backgroundrepeat']};\r\n";
                 }
                 if (!empty($bodystyle['backgroundcolor'])) {
                     $bodycss .= "background-color:{$bodystyle['backgroundcolor']};\r\n";
                 }
                 if (!empty($bodystyle['backgroundattachment'])) {
                     $bodycss .= "background-attachment:{$bodystyle['backgroundattachment']};\r\n";
                 }
                 if (!empty($bodystyle['backgroundpositionx']) && !empty($bodystyle['backgroundpositiony'])) {
                     $bodycss .= "background-position:{$bodystyle['backgroundpositionx']} {$bodystyle['backgroundpositiony']};\r\n";
                 }
                 $bodycss .= "}";
                 $ishideheader = intval($bodystyle['ishideheader']);
             }
         }
         if ($ishideheader == 1) {
             $appVer = $_G['setting']['version'];
             include templateEx($this->_identifier . ':' . $template . '/header_one_' . $appVer);
         }
     } else {
         $ishideheader = 0;
     }
     include templateEx($this->_identifier . ':' . $template . '/header');
     $this->_brand_header = $brand_header;
     $this->_brand_header_one = $brand_header_one;
 }
예제 #5
0
<?php

/**
 *      [Sanree] (C)2001-2099 Sanree Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: sanree_brand_userbar.php sanree $
 */
if (!defined('IN_DISCUZ')) {
    exit('2014042523s4K4QUOUT9||5057||1411992002');
}
$bid = intval($_G['sr_bid']);
$brandresult = C::t('#sanree_brand#sanree_brand_businesses')->getbusinesses_by_bid($bid);
chkbrandend($brandresult);
$bf_menu_list = array();
$menu = sanreeloadcache('footmenu');
foreach ($menu as $row) {
    $row['url'] = str_replace('{tid}', $brandresult['tid'], $row['url']);
    $row['url'] = str_replace('{bid}', $brandresult['bid'], $row['url']);
    $row['url'] = str_replace('{pid}', $brandresult['pid'], $row['url']);
    $bf_menu_list[] = $row;
}
$tid = $brandresult['tid'];
$forum_thread = C::t('#sanree_brand#forum_thread')->fetch($tid);
$brandresult['favtimes'] = intval($forum_thread['favtimes']);
$brandresult['sharetimes'] = $forum_thread['sharetimes'];
include templateEx($plugin['identifier'] . ':' . $template . "/" . $mod);
예제 #6
0
     $menustr = $langs['addbusi'];
     $result['status'] = 1;
     $result['displayorder'] = 0;
     $result['isshow'] = 1;
     $result['user'] = C::t('#sanree_brand#xcommon_member')->fetch_all_username_by_uid($_G['uid']);
     $result['recommendationindex'] = sprintf("%.1f", $defaultzhishu);
     $result['groupid'] = $defaultconfig['groupid'];
     $result['allowalbum'] = $defaultconfig['allowalbum'];
     $result['allowfastpost'] = $defaultconfig['allowfastpost'];
     $result = array_merge($result, $defaultconfig['module']);
     $templateconfig = array();
     $templateconfig['bodystyle'] = $defaultconfig['bodystyle'];
     $result['brandtaglist'] = '';
 }
 $cateselect = "<option value=\"0\" selected>" . $langs['pselect'] . "</option>\n";
 $category = sanreeloadcache('admincate');
 $cates = array();
 foreach ($category as $group) {
     if ($group[cateid] == $result[cateid]) {
         $cateselect .= "<option value=\"{$group['cateid']}\" selected>{$group['name']}</option>\n";
     } else {
         $cateselect .= "<option value=\"{$group['cateid']}\">{$group['name']}</option>\n";
     }
 }
 $groupselect = "<option value=\"0\" selected>" . $langs['pselect'] . "</option>\n";
 $category = C::t('#sanree_brand#sanree_brand_group')->fetch_all_group();
 $cate = array();
 foreach ($category as $data) {
     $cate[] = array('cateid' => $data[groupid], 'name' => $data[groupname]);
 }
 foreach ($cate as $group) {
예제 #7
0
            showmessage(srlang('okmessage'), $url_forward, array(), $extra);
        }
    } else {
        C::t('#sanree_brand#sanree_brand_businesses')->update($bid, $setarr);
        if ($result['status'] == 1) {
            fixthread($bid);
            syngroup($bid);
            deletecachebrandpic($bid);
        }
        sanreeupdatecache('hotbrandlist');
        sanreeupdatecache('recommendlist');
        showmessage(srlang('editmessage'), $url_forward, array(), $extra);
    }
} else {
    $category_list = array();
    $category = sanreeloadcache('usercate');
    foreach ($category as $value) {
        $category_list[] = $value;
    }
    $navtitle = srlang('dengjititle');
    $addteltitle = $config['djtitle'] ? $config['djtitle'] : srlang('teladd');
    if ($isselfdistrict == 1) {
        $districthtml = brand_setting('birthcity', $result);
    } else {
        include_once libfile('function/profile');
        $districthtml = profile_setting('birthcity', $result);
    }
    $discounthtml = brand_discountsetting($result['discount']);
    $pubtip_price = srlang('pubtip_price');
    $pubtip_price = str_replace(array('{regprice}', '{creditunitname}'), array($regprice, $creditunitname), $pubtip_price);
    $pubtip_shen = srlang('pubtip_shen');
예제 #8
0
 function get_menu_head($brandresult, $active)
 {
     global $_G, $template, $bodycss, $ishideheader, $allurl, $myhomeurl, $referer, $addgroup, $ismultiple;
     $bid = $brandresult['bid'];
     $tid = $brandresult['tid'];
     $group = C::t('#sanree_brand#sanree_brand_group')->get_by_groupid($brandresult['groupid']);
     $tmpconfig = $_G['cache']['plugin']['sanree_brand'];
     $allowsyngroup = intval($tmpconfig['allowsyngroup']);
     $isshowordinary = intval($tmpconfig['isshowordinary']);
     !defined('sr_brand_JS') && define('sr_brand_JS', sr_brand_TPL . '/' . $tmpconfig['template'] . '/js');
     !defined('SANREE_BRAND_TEMPLATE') && define('SANREE_BRAND_TEMPLATE', sr_brand_TPL . '/' . $tmpconfig['template']);
     $allurl = gethomeurl();
     $myhomeurl = !empty($brandresult['brandno']) ? getbrandnourl($brandresult['brandno']) : getmyburl_by_bid($brandresult['bid']);
     $referer = urlencode($myhomeurl);
     if (!isset($_G['cache']['sanree_brand_topmenu']) || !is_array($_G['cache']['sanree_brand_topmenu'])) {
         sanreeupdatecache('menu');
     }
     $menu = sanreeloadcache('topmenu');
     $headermenulist = array();
     $headermenulist['index'] = array('url' => getburl($brandresult), 'title' => srlang('frontpage'), 'class' => ' class="normal"');
     $headermenulist['detail'] = array('url' => getdetailurl($brandresult), 'title' => srlang('bird_item_detail'), 'class' => ' class="normal"');
     $brandresult['allowalbum'] == 1 && ($headermenulist['myalbum'] = array('url' => getalbumurl($brandresult['bid']), 'title' => srlang('myalbum'), 'class' => ' class="normal"'));
     $allowsyngroup == 1 && intval($group['allowsyngroup']) == 1 && $brandresult['syngrouptid'] && ($headermenulist['dzgroup'] = array('url' => 'forum.php?mod=group&amp;fid=' . $brandresult['syngrouptid'], 'title' => srlang('dzgroup'), 'class' => ' class="normal"'));
     hookscript('sanreebrandusermenu', 'global', 'funcs', array('bid' => $brandresult['bid']), 'sanreebrandusermenu');
     if ($_G['sanree_brand_menus']) {
         foreach ($_G['sanree_brand_menus'] as $row) {
             $row['url'] = str_replace('{tid}', $brandresult['tid'], $row['url']);
             $row['url'] = str_replace('{bid}', $brandresult['bid'], $row['url']);
             $row['url'] = str_replace('{pid}', $brandresult['pid'], $row['url']);
             $headermenulist[$row['name']] = $row;
         }
     }
     $isshowordinary == 1 && ($headermenulist['ordinary'] = array('url' => 'forum.php?mod=viewthread&amp;tid=' . $brandresult['tid'], 'title' => srlang('ordinary'), 'class' => ' class="normal"'));
     foreach ($menu as $row) {
         $row['url'] = str_replace('{tid}', $brandresult['tid'], $row['url']);
         $row['url'] = str_replace('{bid}', $brandresult['bid'], $row['url']);
         $row['url'] = str_replace('{pid}', $brandresult['pid'], $row['url']);
         $headermenulist['menu' . $row[id]] = $row;
     }
     $headermenulist[$active] && ($headermenulist[$active]['class'] = ' class="current"');
     $headermenulists = $headermenulist;
     $headermenulist = array();
     $menuorder = C::t('#sanree_brand#sanree_brand_menu_order')->fetch_all();
     asort($menuorder);
     foreach ($menuorder as $key => $row) {
         if ($headermenulists[$key]) {
             $headermenulist[$key] = $headermenulists[$key];
         }
         if (!$row) {
             $headermenulist['detail'] = $headermenulists['detail'];
         }
     }
     if (intval($_G['uid']) === intval($brandresult['uid'])) {
         define('IN_BRAND_USER', TRUE);
         hookscript('sanreebrandmanagemenu', 'global', 'funcs', array('bid' => $brandresult['bid']), 'sanreebrandmanagemenu');
         $managemenulist = array();
         $_G['sanree_brand_managemenus'][] = array('displayorder' => 9999, 'window' => 0, 'name' => '', 'title' => '', 'url' => '', 'class' => '', 'image' => 'source/plugin/sanree_brand/tpl/good/images/add.png');
         if ($_G['sanree_brand_managemenus']) {
             foreach ($_G['sanree_brand_managemenus'] as $row) {
                 $row['url'] = str_replace('{tid}', $brandresult['tid'], $row['url']);
                 $row['url'] = str_replace('{bid}', $brandresult['bid'], $row['url']);
                 $row['url'] = str_replace('{pid}', $brandresult['pid'], $row['url']);
                 $managemenulist[] = $row;
             }
             $ncount = count($managemenulist);
             $mod = $ncount % 10;
             $mt = intval($ncount / 10);
             $oneh = 100;
             if ($mt == 0) {
                 $ih = $oneh;
             } else {
                 if ($mod == 0) {
                     $ih = $mt * $oneh;
                 } else {
                     $ih = ($mt + 1) * $oneh;
                 }
             }
             $ih += 10;
         }
     }
     $allowtemplate = intval($group['allowtemplate']);
     if ($allowtemplate == 1) {
         $templateconfig = unserialize($brandresult['templateconfig']);
         $bodystyle = $templateconfig['bodystyle'];
         $bodycss = '';
         if ($bodystyle) {
             if (intval($bodystyle['isuse']) == 1) {
                 $bodycss = "body {\r\n";
                 if ($bodystyle['notbackimg'] == 1) {
                     if (!empty($bodystyle['backgroundimage'])) {
                         $bodycss .= "background-image:url('" . $_G['setting']['attachurl'] . 'category/' . "{$bodystyle['backgroundimage']}');\r\n";
                     }
                 } else {
                     $bodycss .= "background:none;\r\n";
                 }
                 if (!empty($bodystyle['backgroundrepeat'])) {
                     $bodycss .= "background-repeat:{$bodystyle['backgroundrepeat']};\r\n";
                 }
                 if (!empty($bodystyle['backgroundcolor'])) {
                     $bodycss .= "background-color:{$bodystyle['backgroundcolor']};\r\n";
                 }
                 if (!empty($bodystyle['backgroundattachment'])) {
                     $bodycss .= "background-attachment:{$bodystyle['backgroundattachment']};\r\n";
                 }
                 if (!empty($bodystyle['backgroundpositionx']) && !empty($bodystyle['backgroundpositiony'])) {
                     $bodycss .= "background-position:{$bodystyle['backgroundpositionx']} {$bodystyle['backgroundpositiony']};\r\n";
                 }
                 $bodycss .= "}";
                 $ishideheader = intval($bodystyle['ishideheader']);
             }
         }
         if ($ishideheader == 1) {
             $appVer = $_G['setting']['version'];
             include templateEx($this->_identifier . ':' . $template . '/header_one_' . $appVer);
             $GLOBALS['brand_header_one'] = $brand_header_one;
         }
     } else {
         $ishideheader = 0;
     }
     $slideid = 3;
     $slidelistarr = sanreeloadcache('slidelist');
     if (!$brandresult['newbanner']) {
         $slidelistarr[3] = array(array('pic' => 'source/plugin/sanree_brand/tpl/bird/images/c_banner.jpg', 'url' => 'http://dx.sanree.com/'), array('pic' => 'source/plugin/sanree_brand/tpl/bird/images/c_banner_01.jpg', 'url' => 'http://dx.sanree.com/'), array('pic' => 'source/plugin/sanree_brand/tpl/bird/images/c_banner_02.jpg', 'url' => 'http://dx.sanree.com/'), array('pic' => 'source/plugin/sanree_brand/tpl/bird/images/c_banner_05.jpg', 'url' => 'http://dx.sanree.com/'), array('pic' => 'source/plugin/sanree_brand/tpl/bird/images/c_banner_06.jpg', 'url' => 'http://dx.sanree.com/'));
     } else {
         $brandresult['newbanner'] = explode(',', $brandresult['newbanner']);
         $slidelistarr[3] = $brandresult['newbanner'];
     }
     $slidelist = $slidelistarr[$slideid];
     $slide_prefix = $_G['setting']['attachurl'] . 'category/';
     $mtfopen = $_G['cache']['plugin']['sanree_mcertification']['isopen'];
     if ($mtfopen) {
         $mcertification = C::t('#sanree_mcertification#sanree_mcertification')->gettype_by_bid(intval($bid));
         $mtf = 'source/plugin/sanree_mcertification/tpl/default/mcertification/brandimg/bignone.png';
         if ($mcertification) {
             $mtf = $mcertification['type'] ? 'source/plugin/sanree_mcertification/tpl/default/mcertification/brandimg/bigpersonal.png' : 'source/plugin/sanree_mcertification/tpl/default/mcertification/brandimg/bigcompany.png';
         }
     }
     $attention = $_G['cache']['plugin']['sanree_attention']['isopen'];
     if ($attention) {
         $addbtn = 'source/plugin/sanree_attention/tpl/default/img/addbtn.png';
         $delbtn = 'source/plugin/sanree_attention/tpl/default/img/delbtn.png';
         $uids = C::t('#sanree_attention#sanree_attention')->getuid_by_bid(intval($bid));
         $atnbtn = $addbtn;
         $flag = 0;
         $atnurl = 'plugin.php?id=sanree_attention&mod=addattention&bid=' . intval($bid);
         if ($uids) {
             foreach ($uids as $uid) {
                 if ($uid['uid'] == $_G['uid']) {
                     $atnbtn = $delbtn;
                     $flag = 1;
                     $atnurl = 'plugin.php?id=sanree_attention&mod=delattention&bid=' . intval($bid);
                     $deltip = attention_modlang('confirmationdel');
                     break;
                 }
             }
         }
     }
     $assistcount = C::t('#sanree_brand#sanree_brand_assist')->count_by_where(' && bid =' . intval($bid));
     $assistuids = C::t('#sanree_brand#sanree_brand_assist')->getuid_by_bid(intval($bid));
     if ($assistuids) {
         foreach ($assistuids as $uid) {
             if ($uid['uid'] == $_G['uid']) {
                 $assistflag = 1;
                 break;
             }
         }
     }
     if (!$brandresult['satisfaction']) {
         $voter = C::t('#sanree_brand#sanree_brand_voter')->getvotetotal_by_tid($tid);
         $brandresult['satisfaction'] = intval($voter[3]);
     }
     if ($ismultiple == 1 && $brandresult['allowmultiple'] == 1) {
         $tempresult = C::t('#sanree_brand#sanree_brand_businesses')->getbusinesses_by_bid($bid);
         $tellist = explode(',', $tempresult['tel']);
     } else {
         $brandresult['tel'] = getfirsticq($brandresult['tel']);
     }
     include templateEx($this->_identifier . ':' . $this->_template . '/srhead');
     $GLOBALS['srhead'] = $srhead;
 }