head.php 12 KB

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