validUser($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'])) { header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0 401 Unauthorized'); echo 'Text to send if user hits Cancel button'; exit; } include 'lang.php'; $display2="block"; $lang = new Lang; $lang->getLang(); $acgun=array('1','2','3','4','5','6','7','8'); //chdir("/home/phihong/Module_WebService"); chdir("/root"); exec("'./WebService' 'query'",$output,$return_var); if(count($output)==0){ echo ''; echo "Something went wrong on machine"; exit; } if(trim($output[0])=="InitShareMemory Error"){ echo ''; echo "InitShareMemory Error"; exit; } $model=json_decode(trim($output[0]))->{'ModelName'}; if(substr($model,0,1)=="A"){ if(substr($model,10,1)=="E" || substr($model,10,1)=="W" || substr($model,10,1)=="T" || substr($model,10,1)=="U" || substr($model,10,1)=="D" || substr($model,10,1)=="A" || substr($model,10,1)=="F"){ $ModelName='AC Net'; } else if(substr($model,10,1)=="0" || substr($model,10,1)=="R" || substr($model,10,1)=="B"){ $ModelName='AC Eco'; } } else if(substr($model,0,1)=="D"){ if(in_array(substr($model,7,1),$acgun)||in_array(substr($model,8,1),$acgun)||in_array(substr($model,9,1),$acgun)){ $ModelName='DC_AC'; }else{ $ModelName='DC'; } } if(substr($model,10,1)=="E" || substr($model,10,1)=="U"){ $showEthernet="block"; $showWifi="none"; $showTelcom="none"; } if(substr($model,10,1)=="W"){ $showEthernet="block"; $showWifi="block"; $showTelcom="none"; } if(substr($model,10,1)=="T"){ $showEthernet="block"; $showWifi="none"; $showTelcom="block"; } if(substr($model,10,1)=="D" || substr($model,10,1)=="A"){ $showEthernet="block"; $showWifi="block"; $showTelcom="block"; } if(substr($model,10,1)=="F"){ $showEthernet="none"; $showWifi="block"; $showTelcom="none"; } //$ModelName='AC Net'; //$ModelName='AC Eco'; // $ModelName='DC'; switch ($ModelName){ case 'AC Net': $am111='block'; $am101='block'; $am100='block'; $am001='none'; break; case 'AC Eco': $am111='block'; $am101='none'; $am100='block'; $am001='none'; break; case 'DC': $am111='block'; $am101='block'; $am100='none'; $am001='block'; break; case 'DC_AC': $am111='block'; $am101='block'; $am100='block'; $am001='block'; break; default: $am111='block'; $am101='block'; $am100='block'; $am001='block'; break; } if(substr($model,4,3)=="122"){ $am120='none'; } else{ $am120='none'; } if(strstr($_SERVER['PHP_SELF'],"network") || strstr($_SERVER['PHP_SELF'],"backend")){ $display2="none"; } ?> EV System Configuration */?>

menu