123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
- <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
- <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
- <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
- <?php
- ini_set('error_reporting', E_ERROR | E_WARNING | E_PARSE);
- if(file_exists("/Storage/settings")){
- exec("cp /Storage/settings settings");
- }
- $json = json_decode(file_get_contents("settings"), true);
- include 'valid.php';
- $valid = new Valid;
- //=======================================
- // Auth
- //=======================================
- if(!$valid->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 '<script>alert("Something went wrong on machine");</script>';
- echo "Something went wrong on machine";
- exit;
- }
- if(trim($output[0])=="InitShareMemory Error"){
- echo '<script>alert("InitShareMemory Error");</script>';
- 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";
- }
- ?>
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="description" content="EV System Configuration">
- <link rel="shortcut icon" href="favicon.ico">
- <title>EV System Configuration</title>
- <!--
- * Google Fonts
- //-->
- <link href='css/googleRaleway.css' rel='stylesheet' type='text/css'>
- <link href='css/googleLato.css' rel='stylesheet' type='text/css'>
- <!-- Bootstrap core CSS -->
- <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
- <!-- Custom CSS -->
- <link href="css/animate.css" rel="stylesheet" type="text/css">
- <link href="css/jquery.mCustomScrollbar.css" rel="stylesheet" type="text/css">
- <link href="css/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
- <link rel="stylesheet" href="css/colorbox-skins/1/colorbox.css" type="text/css">
- <link href="css/main.css" rel="stylesheet" type="text/css">
-
- <link href="css/header/h3.css" rel="stylesheet" type="text/css">
- <link href="css/responsive.css" rel="stylesheet" type="text/css">
- <link href="css/color1.css" rel="stylesheet" type="text/css" id="envor-site-color">
- <link href="css/rivathemes.css" rel="stylesheet" type="text/css">
- <link href="css/jquery.fancybox.min.css" rel="stylesheet" type="text/css">
- <!-- LayerSlider styles -->
- <link rel="stylesheet" href="css/layerslider/css/layerslider.css" type="text/css">
- <!-- the main fileinput plugin css -->
- <link href="css/fileinput.min.css" rel="stylesheet" type="text/css">
- <link href="css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
- <!-- Just for debugging purposes. Don't actually copy this line! -->
- <!--[if lt IE 9]><script src="js/vendor/ie8-responsive-file-warning.js"></script><![endif]-->
- <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
- <!--[if lt IE 9]>
- <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
- <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
- <![endif]-->
- <?php /* <link rel="stylesheet" href="css/font-awesome.min.css">*/?>
- <link href="css/prettify-1.0.css" rel="stylesheet">
- <link rel="stylesheet" type="text/css" href="css/bootstrap-datetimepicker.css" />
- <!-- <script src="js/jquery-1.8.3.min.js"></script>
- <script src="js/moment.js"></script>
- <script src="js/bootstrap.min.js"></script>
- <script src="js/bootstrap-datetimepicker.min.js"></script>
- <!-- <script src="js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>-->
- <!-- <script src="js/twitterFetcher_v10_min.js"></script>-->
- <script>
- function changeModel(e){
- location.href="<?php echo $_SERVER['PHP_SELF']!=""?$_SERVER['PHP_SELF']:"set_system.php"?>?ModelName="+e.value;
- }
- </script>
- </head>
- <body>
-
- <!--[if lt IE 7]>
- <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
- <![endif]-->
- <!--
- Scroll to the top
- //-->
- <div id="to-the-top"><i class="fa fa-chevron-up"></i></div>
- <!--
-
- Envor mobile menu start
- //-->
- <i class="glyphicon glyphicon-align-justify" id="envor-mobile-menu-btn"></i>
- <div class="envor-mobile-menu" id="envor-mobile-menu">
- <h3 style="color: #fff;">menu</h3>
- <nav>
- <ul>
- <li<?php echo ($tag_header=='set'?' class="active"':''); ?>>
- <a href="#" accesskey="1" title="Set"><?php echo $lang->showWord("set"); ?></a>
- <ul>
- <li>
- <a href="set_system.php<?php echo $_SERVER['QUERY_STRING']!=""?'?'.$_SERVER['QUERY_STRING']:""?>"><?php echo $lang->showWord("system"); ?></a>
- </li>
- <li>
- <a href="set_charging.php<?php echo $_SERVER['QUERY_STRING']!=""?'?'.$_SERVER['QUERY_STRING']:""?>"><?php echo $lang->showWord("charging"); ?></a>
- </li>
- <li>
- <a href="set_network.php<?php echo $_SERVER['QUERY_STRING']!=""?'?'.$_SERVER['QUERY_STRING']:""?>" style="display:<?php echo $am101;?>"><?php echo $lang->showWord("network"); ?></a>
- </li>
- <li>
- <a href="set_backend.php<?php echo $_SERVER['QUERY_STRING']!=""?'?'.$_SERVER['QUERY_STRING']:""?>" style="display:<?php echo $am101;?>"><?php echo $lang->showWord("backend"); ?></a>
- </li>
- </ul>
- </li>
- <li<?php echo ($tag_header=='upgrade'?' class="active"':''); ?>>
- <a href="upgrade_iso.php" accesskey="2" title="Upgrade"><?php echo $lang->showWord("upgrade"); ?></a>
- </li>
- <li<?php echo ($tag_header=='other'?' class="active"':''); ?>>
- <a href="#" accesskey="3" title="Other"><?php echo $lang->showWord("other"); ?></a>
- <ul>
- <?php /* <li>
- <a href="set_contact.php"><?php echo $lang->showWord("contact_info"); ?></a>
- </li>*/?>
- <li>
- <a href="log_download.php"><?php echo $lang->showWord("log_download"); ?></a>
- </li>
- <li>
- <a href="set_passwd.php"><?php echo $lang->showWord("passwd"); ?></a>
- </li>
- <li>
- <a href="set_restart.php"><?php echo $lang->showWord("restart"); ?></a>
- </li>
- </ul>
- </li>
- <li<?php echo ($tag_header=='language'?' class="active"':''); ?>>
- <a href="#" accesskey="4" title="Language"><?php echo $lang->showWord("language"); ?></a>
- <ul>
- <li>
- <a href="switch_lang.php?lang=ENG">English</a>
- </li>
- <li>
- <a href="switch_lang.php?lang=TW">繁體中文</a>
- </li>
- <li>
- <a href="switch_lang.php?lang=CN">简体中文</a>
- </li>
- </ul>
- </li>
-
- </ul>
- </nav>
- </div>
- <header class="envor-header envor-header-3">
- <!--
- Header Bg start
- //-->
- <div class="envor-header-bg">
- <div class="container">
- <div class="row">
- <div class="col-lg-12">
- <div class="envor-relative">
- <!--
- Site Logo start
- //-->
- <a href="index.php">
- <div class="envor-logo">
- <?php /* <h2><?php echo $lang->showWord("vender_name"); ?></h2>*/?>
- <h2>EV Quick Charger</h2>
- <!-- <img src="img/logo.png" alt="PHIHONG">-->
- <!--
- Site Logo end
- //-->
- </div>
- </a>
-
- </div>
- </div>
- </div>
- </div>
- <!--
- Header Bg end
- //-->
- </div>
- <!--
- Site Menu start
- //-->
- <div class="envor-desktop-menu-bg" id="envor-header-menu">
- <div class="container">
- <div class="row">
- <div class="col-lg-12">
- <!--
- Desktop Menu start
- //-->
- <nav>
- <ul>
- <li <?php echo ($tag_header=='set'?'class="active"':''); ?> >
- <a href="#" accesskey="1" title="Set"><?php echo $lang->showWord("set"); ?></a>
- <ul>
- <li>
- <a href="set_system.php<?php echo $_SERVER['QUERY_STRING']!=""?'?'.$_SERVER['QUERY_STRING']:""?>"><?php echo $lang->showWord("system"); ?></a>
- </li>
- <li>
- <a href="set_charging.php<?php echo $_SERVER['QUERY_STRING']!=""?'?'.$_SERVER['QUERY_STRING']:""?>"><?php echo $lang->showWord("charging"); ?></a>
- </li>
- <li>
- <a href="set_network.php<?php echo $_SERVER['QUERY_STRING']!=""?'?'.$_SERVER['QUERY_STRING']:""?>" style="display:<?php echo $am101;?>"><?php echo $lang->showWord("network"); ?></a>
- </li>
- <li>
- <a href="set_backend.php<?php echo $_SERVER['QUERY_STRING']!=""?'?'.$_SERVER['QUERY_STRING']:""?>" style="display:<?php echo $am101;?>"><?php echo $lang->showWord("backend"); ?></a>
- </li>
- </ul>
- </li>
- <li<?php echo ($tag_header=='upgrade'?' class="active"':''); ?>>
- <a href="upgrade_iso.php" accesskey="2" title="Upgrade"><?php echo $lang->showWord("upgrade"); ?></a>
- <?php /* <a href="#" accesskey="2" title="Upgrade"><?php echo $lang->showWord("upgrade"); ?></a>
- <ul>
- <li>
- <a href="upgrade_iso.php"><?php echo "Image"; ?></a>
- </li>
- </ul> */?>
- </li>
- <li<?php echo ($tag_header=='other'?' class="active"':''); ?>>
- <a href="#" accesskey="3" title="Other"><?php echo $lang->showWord("other"); ?></a>
- <ul>
- <?php /* <li>
- <a href="set_contact.php"><?php echo $lang->showWord("contact_info"); ?></a>
- </li>*/?>
- <li>
- <a href="log_download.php"><?php echo $lang->showWord("log_download"); ?></a>
- </li>
- <li>
- <a href="set_passwd.php"><?php echo $lang->showWord("passwd"); ?></a>
- </li>
- <li>
- <a href="set_restart.php"><?php echo $lang->showWord("restart"); ?></a>
- </li>
- </ul>
- </li>
- <li<?php echo ($tag_header=='language'?' class="active"':''); ?>>
- <a href="#" accesskey="4" title="Language"><?php echo $lang->showWord("language"); ?></a>
- <ul>
- <li>
- <a href="switch_lang.php?lang=ENG">English</a>
- </li>
- <li>
- <a href="switch_lang.php?lang=TW">繁體中文</a>
- </li>
- <li>
- <a href="switch_lang.php?lang=CN">简体中文</a>
- </li>
- <li>
- <a href="switch_lang.php?lang=JP">日本語</a>
- </li>
- </ul>
- </li>
- </ul>
- <!--
- Desktop Menu end
- //-->
- </nav>
- </div>
- </div>
- </div>
- <!--
- Site Menu end
- //-->
- </div></div></div></div></div>
- <!--
- Envor header end
- //-->
- </header>
|