{php}
if($GLOBALS['lang'] == 'zh'){
$sql = "SELECT cat_id,cat_name,parent_id FROM ".$GLOBALS['eces']->table('category_zh')." WHERE FirmID = '". $GLOBALS['FrimID']."' AND parent_id = '0' ORDER BY `sort_order` ASC ";
}elseif($GLOBALS['lang'] == 'tw'){
$sql = "SELECT cat_id,cat_name,parent_id FROM ".$GLOBALS['eces']->table('category_tw')." WHERE FirmID = '". $GLOBALS['FrimID']."' AND parent_id = '0' ORDER BY `sort_order` ASC ";
}else{
$sql = "SELECT cat_id,cat_name,parent_id FROM ".$GLOBALS['eces']->table('category_en')." WHERE FirmID = '". $GLOBALS['FrimID']."' AND parent_id = '0' ORDER BY `sort_order` ASC ";
}
$RS = $GLOBALS['dbes']->getAll($sql);
foreach($RS as $v){
if($v[cat_id] == $_GET['bc'] ){ $styel_pro1 = 'style="display: block;"'; }
$contenall .= '
';
if($GLOBALS['lang'] == 'zh'){
$sql1 = "SELECT cat_id,cat_name,parent_id FROM ".$GLOBALS['eces']->table('category_zh')." WHERE FirmID = '". $GLOBALS['FrimID']."' AND parent_id = '".$v[cat_id]."' ORDER BY `sort_order` ASC ";
}elseif($GLOBALS['lang'] == 'tw'){
$sql1 = "SELECT cat_id,cat_name,parent_id FROM ".$GLOBALS['eces']->table('category_tw')." WHERE FirmID = '". $GLOBALS['FrimID']."' AND parent_id = '".$v[cat_id]."' ORDER BY `sort_order` ASC ";
}else{
$sql1 = "SELECT cat_id,cat_name,parent_id FROM ".$GLOBALS['eces']->table('category_en')." WHERE FirmID = '". $GLOBALS['FrimID']."' AND parent_id = '".$v[cat_id]."' ORDER BY `sort_order` ASC ";
}
$TS = $GLOBALS['dbes']->getAll($sql1);
$tontstl = '
';
unset($styel_pro1);
foreach($TS as $t){
if($t[cat_id] == $_GET['ac']){ $styel_pro2 = 'style="color:#fff; background: #001994;"'; }
$tontstl .= '- '.$t[cat_name].'
';
unset($styel_pro2);
}
$tontstl .= '
';
$contenall .= $tontstl;
}
echo $contenall;
{/php}