{php}
$sql3 = "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 ";
$QS = $GLOBALS['dbes']->getAll($sql3);
if(!empty($QS)){
foreach($QS as $t){
$prods .= "
$t[cat_name]";
}
}
if($GLOBALS['lang'] == 'zh'){
$sql = "SELECT * FROM ".$GLOBALS['eces']->table('firms_nav')." WHERE FirmID = '". $GLOBALS['FrimID']."' AND pid='0' and soder!='0' order by `soder` asc ";
}elseif($GLOBALS['lang'] == 'tw'){
$sql = "SELECT * FROM ".$GLOBALS['eces']->table('firms_nav_tw')." WHERE FirmID = '". $GLOBALS['FrimID']."' AND pid='0' and soder!='0' order by `soder` asc ";
}else{
$sql = "SELECT * FROM ".$GLOBALS['eces']->table('firms_nav_en')." WHERE FirmID = '". $GLOBALS['FrimID']."' AND pid='0' and soder!='0' order by `soder` asc ";
}
$RS = $GLOBALS['dbes']->getAll($sql);
foreach($RS as $v){
$sql2 = "SELECT * FROM ".$GLOBALS['eces']->table('firms_nav')." WHERE FirmID = '". $GLOBALS['FrimID']."' AND pid = '".$v[id]."' AND soder != '0' order by `soder` asc";
$ts = $GLOBALS['dbes']->getAll($sql2);
if(empty($ts)){
if($v[action] == 'other.php' || $v[action] == 'othertw.php' || $v[action] == 'otheren.php' ){
$list_nav .= "
";
}elseif($v[action] == 'productcart.php' || $v[action] == 'ordercheck.php'){
$list_nav .= "";
}elseif($v[action] == 'productshow.php'){
$list_nav .= "
";
if(!empty($prods)){
$list_nav .= "
";
}
$list_nav .= "";
}else{
$list_nav .= "
";
}
}else{
$surl = substr($v['action'],0,-4);
if($v[action] == 'other.php' || $v[action] == 'othertw.php' || $v[action] == 'otheren.php' ){
$list_nav .= "
";
}else{
$list_nav .= "";
}
foreach($ts as $y ){
$list_nav .= "- $y[name]
";
}
$list_nav .= "
";
}
}
echo $list_nav;
{/php}