{php}
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){
$ico_img = explode('.',$v[action]);
if($v[action] == 'other.php' || $v[action] == 'othertw.php' || $v[action] == 'otheren.php' ){
$list_nav .= "
{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){
$contenall .= '