head.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
  3. <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
  4. <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
  5. <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
  6. <?php
  7. ini_set('error_reporting', E_ERROR | E_WARNING | E_PARSE);
  8. if(file_exists("/Storage/settings")){
  9. exec("cp /Storage/settings settings");
  10. }
  11. $json = json_decode(file_get_contents("settings"), true);
  12. include 'valid.php';
  13. $valid = new Valid;
  14. //=======================================
  15. // Auth
  16. //=======================================
  17. if(!$valid->validUser($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']))
  18. {
  19. header('WWW-Authenticate: Basic realm="My Realm"');
  20. header('HTTP/1.0 401 Unauthorized');
  21. echo 'Text to send if user hits Cancel button';
  22. exit;
  23. }
  24. include 'lang.php';
  25. $selected1="";
  26. $selected2="";
  27. $selected3="";
  28. $display2="block";
  29. $title="";
  30. $lang = new Lang;
  31. $lang->getLang();
  32. //chdir("/home/phihong/Module_WebService");
  33. chdir("/root");
  34. exec("'./WebService' 'query'",$output,$return_var);
  35. $model=json_decode(trim($output[0]))->{'ModelName'};
  36. if(substr($model,0,1)=="A"){
  37. if(substr($model,10,1)=="E" || substr($model,10,1)=="W" || substr($model,10,1)=="T" || substr($model,10,1)=="U"){
  38. $ModelName='AC Net';
  39. $selected1=' selected';
  40. $title="title";
  41. }
  42. else if(substr($model,10,1)=="0" || substr($model,10,1)=="R" || substr($model,10,1)=="B"){
  43. $ModelName='AC Eco';
  44. $selected2=' selected';
  45. $title="title";
  46. }
  47. }
  48. else if(substr($model,0,1)=="D"){
  49. $ModelName='DC';
  50. $selected3=' selected';
  51. $title="title_dc";
  52. }
  53. // switch($_SERVER['QUERY_STRING']){
  54. // case 'ModelName=1':
  55. // $ModelName='AC Net';
  56. // $selected1=' selected';
  57. // break;
  58. // case 'ModelName=2':
  59. // $ModelName='AC Eco';
  60. // $selected2=' selected';
  61. // break;
  62. // case 'ModelName=3':
  63. // $ModelName='DC';
  64. // $selected3=' selected';
  65. // break;
  66. // default:
  67. // $ModelName='DC';
  68. // $selected3=' selected';
  69. // break;
  70. // }
  71. //$ModelName='AC Net';
  72. //$ModelName='AC Eco';
  73. // $ModelName='DC';
  74. switch ($ModelName){
  75. case 'AC Net':
  76. $am111='block';
  77. $am101='block';
  78. $am001='none';
  79. break;
  80. case 'AC Eco':
  81. $am111='block';
  82. $am101='none';
  83. $am001='none';
  84. break;
  85. case 'DC':
  86. $am111='block';
  87. $am101='block';
  88. $am001='block';
  89. break;
  90. }
  91. if(strstr($_SERVER['PHP_SELF'],"network") || strstr($_SERVER['PHP_SELF'],"backend")){
  92. $display2="none";
  93. }
  94. ?>
  95. <head>
  96. <meta charset="utf-8">
  97. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  98. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  99. <meta name="description" content="EV System Configuration">
  100. <link rel="shortcut icon" href="favicon.ico">
  101. <title>EV System Configuration</title>
  102. <!--
  103. * Google Fonts
  104. //-->
  105. <link href='//fonts.googleapis.com/css?family=Raleway:400,100,200,300,500,600,700,800' rel='stylesheet' type='text/css'>
  106. <link href='//fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css'>
  107. <!-- Bootstrap core CSS -->
  108. <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
  109. <!-- Custom CSS -->
  110. <link href="css/animate.css" rel="stylesheet" type="text/css">
  111. <link href="css/jquery.mCustomScrollbar.css" rel="stylesheet" type="text/css">
  112. <link href="css/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
  113. <link rel="stylesheet" href="css/colorbox-skins/4/colorbox.css" type="text/css">
  114. <link href="css/main.css" rel="stylesheet" type="text/css">
  115. <link href="css/header/h3.css" rel="stylesheet" type="text/css">
  116. <link href="css/responsive.css" rel="stylesheet" type="text/css">
  117. <link href="css/color1.css" rel="stylesheet" type="text/css" id="envor-site-color">
  118. <link href="css/rivathemes.css" rel="stylesheet" type="text/css">
  119. <!-- LayerSlider styles -->
  120. <link rel="stylesheet" href="css/layerslider/css/layerslider.css" type="text/css">
  121. <!-- the main fileinput plugin css -->
  122. <link href="css/fileinput.min.css" rel="stylesheet" type="text/css">
  123. <link href="css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
  124. <!-- Just for debugging purposes. Don't actually copy this line! -->
  125. <!--[if lt IE 9]><script src="js/vendor/ie8-responsive-file-warning.js"></script><![endif]-->
  126. <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
  127. <!--[if lt IE 9]>
  128. <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  129. <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  130. <![endif]-->
  131. <link rel="stylesheet" href="css/font-awesome.min.css">
  132. <link href="css/prettify-1.0.css" rel="stylesheet">
  133. <link rel="stylesheet" type="text/css" href="css/bootstrap-datetimepicker.css" />
  134. <!-- <script src="js/jquery-1.8.3.min.js"></script>
  135. <script src="js/moment.js"></script>
  136. <script src="js/bootstrap.min.js"></script>
  137. <script src="js/bootstrap-datetimepicker.min.js"></script>
  138. <!-- <script src="js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>-->
  139. <!-- <script src="js/twitterFetcher_v10_min.js"></script>-->
  140. <script>
  141. function changeModel(e){
  142. location.href="<?php echo $_SERVER['PHP_SELF']!=""?$_SERVER['PHP_SELF']:"set_system.php"?>?ModelName="+e.value;
  143. }
  144. </script>
  145. </head>
  146. <body>
  147. <!--[if lt IE 7]>
  148. <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>
  149. <![endif]-->
  150. <!--
  151. Scroll to the top
  152. //-->
  153. <div id="to-the-top"><i class="fa fa-chevron-up"></i></div>
  154. <!--
  155. Envor mobile menu start
  156. //-->
  157. <i class="glyphicon glyphicon-align-justify" id="envor-mobile-menu-btn"></i>
  158. <div class="envor-mobile-menu" id="envor-mobile-menu">
  159. <h3 style="color: #fff;">menu</h3>
  160. <nav>
  161. <ul>
  162. <li<?php echo ($tag_header=='set'?' class="active"':''); ?>>
  163. <a href="#" accesskey="1" title="Set"><?php echo $lang->showWord("set"); ?></a>
  164. <ul>
  165. <li>
  166. <a href="set_system.php<?php echo $_SERVER['QUERY_STRING']!=""?'?'.$_SERVER['QUERY_STRING']:""?>"><?php echo $lang->showWord("system"); ?></a>
  167. </li>
  168. <li>
  169. <a href="set_charging.php<?php echo $_SERVER['QUERY_STRING']!=""?'?'.$_SERVER['QUERY_STRING']:""?>"><?php echo $lang->showWord("charging"); ?></a>
  170. </li>
  171. <li>
  172. <a href="set_network.php<?php echo $_SERVER['QUERY_STRING']!=""?'?'.$_SERVER['QUERY_STRING']:""?>" style="display:<?php echo $am101;?>"><?php echo $lang->showWord("network"); ?></a>
  173. </li>
  174. <li>
  175. <a href="set_backend.php<?php echo $_SERVER['QUERY_STRING']!=""?'?'.$_SERVER['QUERY_STRING']:""?>" style="display:<?php echo $am101;?>"><?php echo $lang->showWord("backend"); ?></a>
  176. </li>
  177. </ul>
  178. </li>
  179. <li<?php echo ($tag_header=='upgrade'?' class="active"':''); ?>>
  180. <a href="#" accesskey="2" title="Upgrade"><?php echo $lang->showWord("upgrade"); ?></a>
  181. <ul>
  182. <li>
  183. <a href="upgrade_iso.php"><?php echo "Image"; ?></a>
  184. </li>
  185. </ul>
  186. </li>
  187. <li<?php echo ($tag_header=='other'?' class="active"':''); ?>>
  188. <a href="#" accesskey="3" title="Other"><?php echo $lang->showWord("other"); ?></a>
  189. <ul>
  190. <?php /* <li>
  191. <a href="set_contact.php"><?php echo $lang->showWord("contact_info"); ?></a>
  192. </li>*/?>
  193. <li>
  194. <a href="log_download.php"><?php echo $lang->showWord("log_download"); ?></a>
  195. </li>
  196. <li>
  197. <a href="set_passwd.php"><?php echo $lang->showWord("passwd"); ?></a>
  198. </li>
  199. </ul>
  200. </li>
  201. <li<?php echo ($tag_header=='language'?' class="active"':''); ?>>
  202. <a href="#" accesskey="4" title="Language"><?php echo $lang->showWord("language"); ?></a>
  203. <ul>
  204. <li>
  205. <a href="switch_lang.php?lang=ENG">English</a>
  206. </li>
  207. <li>
  208. <a href="switch_lang.php?lang=TW">繁體中文</a>
  209. </li>
  210. <li>
  211. <a href="switch_lang.php?lang=CN">简体中文</a>
  212. </li>
  213. </ul>
  214. </li>
  215. </ul>
  216. </nav>
  217. </div>
  218. <header class="envor-header envor-header-3">
  219. <!--
  220. Header Bg start
  221. //-->
  222. <div class="envor-header-bg">
  223. <div class="container">
  224. <div class="row">
  225. <div class="col-lg-12">
  226. <div class="envor-relative">
  227. <!--
  228. Site Logo start
  229. //-->
  230. <a href="index.php">
  231. <div class="envor-logo">
  232. <h2><?php echo $lang->showWord("vender_name"); ?></h2>
  233. <!-- <img src="img/logo.png" alt="PHIHONG">-->
  234. <!--
  235. Site Logo end
  236. //-->
  237. </div>
  238. </a>
  239. </div>
  240. </div>
  241. </div>
  242. </div>
  243. <!--
  244. Header Bg end
  245. //-->
  246. </div>
  247. <!--
  248. Site Menu start
  249. //-->
  250. <div class="envor-desktop-menu-bg" id="envor-header-menu">
  251. <div class="container">
  252. <div class="row">
  253. <div class="col-lg-12">
  254. <!--
  255. Desktop Menu start
  256. //-->
  257. <nav>
  258. <ul>
  259. <li <?php echo ($tag_header=='set'?'class="active"':''); ?> >
  260. <a href="#" accesskey="1" title="Set"><?php echo $lang->showWord("set"); ?></a>
  261. <ul>
  262. <li>
  263. <a href="set_system.php<?php echo $_SERVER['QUERY_STRING']!=""?'?'.$_SERVER['QUERY_STRING']:""?>"><?php echo $lang->showWord("system"); ?></a>
  264. </li>
  265. <li>
  266. <a href="set_charging.php<?php echo $_SERVER['QUERY_STRING']!=""?'?'.$_SERVER['QUERY_STRING']:""?>"><?php echo $lang->showWord("charging"); ?></a>
  267. </li>
  268. <li>
  269. <a href="set_network.php<?php echo $_SERVER['QUERY_STRING']!=""?'?'.$_SERVER['QUERY_STRING']:""?>" style="display:<?php echo $am101;?>"><?php echo $lang->showWord("network"); ?></a>
  270. </li>
  271. <li>
  272. <a href="set_backend.php<?php echo $_SERVER['QUERY_STRING']!=""?'?'.$_SERVER['QUERY_STRING']:""?>" style="display:<?php echo $am101;?>"><?php echo $lang->showWord("backend"); ?></a>
  273. </li>
  274. </ul>
  275. </li>
  276. <li<?php echo ($tag_header=='upgrade'?' class="active"':''); ?>>
  277. <a href="#" accesskey="2" title="Upgrade"><?php echo $lang->showWord("upgrade"); ?></a>
  278. <ul>
  279. <li>
  280. <a href="upgrade_iso.php"><?php echo "Image"; ?></a>
  281. </li>
  282. </ul>
  283. </li>
  284. <li<?php echo ($tag_header=='other'?' class="active"':''); ?>>
  285. <a href="#" accesskey="3" title="Other"><?php echo $lang->showWord("other"); ?></a>
  286. <ul>
  287. <?php /* <li>
  288. <a href="set_contact.php"><?php echo $lang->showWord("contact_info"); ?></a>
  289. </li>*/?>
  290. <li>
  291. <a href="log_download.php"><?php echo $lang->showWord("log_download"); ?></a>
  292. </li>
  293. <li>
  294. <a href="set_passwd.php"><?php echo $lang->showWord("passwd"); ?></a>
  295. </li>
  296. </ul>
  297. </li>
  298. <li<?php echo ($tag_header=='language'?' class="active"':''); ?>>
  299. <a href="#" accesskey="4" title="Language"><?php echo $lang->showWord("language"); ?></a>
  300. <ul>
  301. <li>
  302. <a href="switch_lang.php?lang=ENG">English</a>
  303. </li>
  304. <li>
  305. <a href="switch_lang.php?lang=TW">繁體中文</a>
  306. </li>
  307. <li>
  308. <a href="switch_lang.php?lang=CN">简体中文</a>
  309. </li>
  310. </ul>
  311. </li>
  312. </ul>
  313. <!--
  314. Desktop Menu end
  315. //-->
  316. </nav>
  317. </div>
  318. </div>
  319. </div>
  320. <!--
  321. Site Menu end
  322. //-->
  323. </div></div></div></div></div>
  324. <!--
  325. Envor header end
  326. //-->
  327. </header>