Exemplo n.º 1
0
         $subcategory = C::t('#sanree_brand#sanree_brand_category')->getcategory_by_pcateid($group[cateid]);
         foreach ($subcategory as $subgroup) {
             $subcount = C::t('#sanree_brand#sanree_brand_businesses')->count_by_cateid($subgroup['cateid']);
             $subststr = $subgroup['keywords'] && $subgroup['description'] ? $langs['yes'] : '';
             $substatusstr = $subgroup[status] == 1 ? ' checked="checked"' : '';
             showtablerow('', array('class="td25"', 'class="td26"', 'class="td25"'), array($subgroup[displayorder], "<div class=\"board\">{$subgroup['name']} {$subststr}</div>", $langs['yes'], $subcount, '<a href="###" onclick="location.href=\'' . ADMINSCRIPT . '?action=plugins&operation=config&act=card&identifier=sanree_brand&pmod=admincp&cateid=' . $subgroup[cateid] . '\'">' . cplang('view') . '</a>'));
         }
     }
     showtablefooter();
 } elseif ($view == 'dis') {
     showtableheader('', 'nobottom');
     showtablerow('', array(), array('<ul class="tab1">' . '<li><a href="' . ADMINSCRIPT . '?action=plugins&operation=config&act=card&view=cate&identifier=sanree_brand&pmod=admincp"><span>' . $langs['viewbycate'] . '</span></a></li>' . '<li class="current"><a href="' . ADMINSCRIPT . '?action=plugins&operation=config&act=card&view=dis&identifier=sanree_brand&pmod=admincp"><span>' . $langs['viewbydis'] . '</span></a></li>' . '</ul>'));
     showtablefooter();
     $upid = intval($_G['sr_upid']);
     if ($isselfdistrict == 1) {
         getdistrictidname($upid, $catename, '', ADMINSCRIPT . '?action=plugins&operation=config&act=district&identifier=sanree_brand&pmod=admincp&upid={id}');
         showtableheader('<a href="' . ADMINSCRIPT . '?action=plugins&operation=config&act=district&identifier=sanree_brand&pmod=admincp">' . $langs['district'] . '</a> > ' . $catename, 'nobottom');
         showsubtitle(array('ID', 'order', 'name', 'enable', $langs['cardcount'], 'operation'));
         $perpage = 100;
         $orderby = $srchadd = $searchtext = $srchuid = '';
         $searchtext = "and upid={$upid}";
         $orderby = 'displayorder';
         $count = C::t('#sanree_brand#sanree_brand_district')->count_by_where($searchtext);
         if ($upid) {
             $extra .= "&upid=" . $upid;
         }
         $multipage = multi($count, $perpage, $page, ADMINSCRIPT . "?action=plugins&operation=config&act={$act}&identifier=sanree_brand&pmod=admincp{$extra}");
         $datalist = C::t('#sanree_brand#sanree_brand_district')->fetch_all_by_search($searchtext, $orderby, ($page - 1) * $perpage, $perpage);
         foreach ($datalist as $row) {
             $count = C::t('#sanree_brand#sanree_brand_businesses')->count_by_dis($row['name']);
             $enabledstr = $row[enabled] == 1 ? ' checked="checked"' : '';
Exemplo n.º 2
0
function getdistrict($id)
{
    $catename = '';
    $backrow = array();
    getdistrictidname($id, $catename, '', '', $backrow);
    $returnarr = array();
    foreach ($backrow as $key => $row) {
        $returnarr[$key] = $row['name'];
    }
    return $returnarr;
}