<?php
/*********************************************************      
 文件说明:         
    功能说明:OMC界面左侧主菜单


    调用关系:调用:header.inc  
             被调用:实现各个功能模块的页面        
    变量说明:
			$OmcTypeNo		在config.inc中定义;
			$myPrivilege	从用户的session中取出

 作者:     
      
修改注释:      
NO.1      
姓名:            
时间:      
修改说明:      
*********************************************************/ 
require("../../inc/header.inc");

$DEBUG=0;
$pubDb = 'OMC_PUB';
$OmcTypeNo = (isset($thisOmcType)?$thisOmcType:0);
$level_1 = $_REQUEST['level_1'];

$level_1 = ($level_1 > 0 ?$level_1 :1);
//$myPrivilege = $user_info["permission"];
$myPrivilege = 9;
$max_layer=5;
if($selectedLanguage == 'eng'){
    $menuName	= "name_2";
    $menuRemark	= "remark_2";
}else{
    $menuName	= "name_1";
    $menuRemark	= "remark_1";
}

//menuTypeNo level_1 level_2 level_3 level_4 level_5 name_1 name_2 link_1 link_2 privilege remark_1 remark_2 
$menuSql = "SELECT $menuName,httpLink,$menuRemark 
			FROM sysMenuConf 
			WHERE menuTypeNo = '$OmcTypeNo' AND privilege <= '$myPrivilege' AND privilege >= '0'
			AND level_1='$level_1'
			ORDER BY level_1,level_2,level_3,level_4,level_5
			LIMIT 0,1
			";
if($DEBUG) echo "<br>menuSql = $menuSql";
$menuResult = mysqli_query($pubConn,$menuSql);
echo mysqli_error($pubConn);
$menuRowsNum = mysqli_num_rows($menuResult);
$menuRow=mysqli_fetch_array($menuResult);
if($DEBUG) echo "<br>menuName=$menuRow[$menuName]";
if($DEBUG) echo "<br>httpLink=$menuRow[httpLink]";
if($DEBUG) echo "<br>menuRemark=$menuRow[$menuRemark]";
$httpLink=$menuRow['httpLink'];
if($DEBUG) exit();
if(strlen($httpLink) > 5){
	echo " <meta http-equiv=\"refresh\" content=\"0; url=$httpLink\"> ";
}else{
	echo "Error httpLink";
}
?>
</html>