set_charging.php 58 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176
  1. <?php
  2. ini_set('error_reporting', E_ALL | E_STRICT);
  3. $tag_header = 'set';
  4. include 'head.php';
  5. $obj = json_decode(trim($output[1]),true);//var_dump($obj);
  6. $system = json_decode(trim($output[0]),true);//var_dump($obj);
  7. $RatingCurrent = $system['RatingCurrent'];
  8. $AcRatingCurrent = $system['AcRatingCurrent'];
  9. $ModelName = $system['ModelName'];
  10. $RatingPower = substr($ModelName,4,2)*pow(10,-1+substr($ModelName,6,1));
  11. $Connector1=substr($ModelName,7,1);
  12. $Connector2=substr($ModelName,9,1);
  13. $Connector3=substr($ModelName,8,1);
  14. $connectorType1=ConnectorType($Connector1);
  15. $connectorType2=ConnectorType($Connector2);
  16. $connectorType3=ConnectorType($Connector3);
  17. $idx=0;
  18. if($obj['ChargingInfo1']){
  19. switch ($obj['ChargingInfo1']['SystemStatus']){
  20. case 0:
  21. $SystemStatus1='booting';
  22. break;
  23. case 1:
  24. $SystemStatus1='idle';
  25. break;
  26. case 2:
  27. $SystemStatus1='authorizing';
  28. break;
  29. case 3:
  30. $SystemStatus1='reassign check';
  31. break;
  32. case 4:
  33. $SystemStatus1='reassign';
  34. break;
  35. case 5:
  36. $SystemStatus1='preparing';
  37. break;
  38. case 6:
  39. $SystemStatus1='preparing for EV';
  40. break;
  41. case 7:
  42. $SystemStatus1='preparing for evse';
  43. break;
  44. case 8:
  45. $SystemStatus1='charging';
  46. break;
  47. case 9:
  48. $SystemStatus1='terminating';
  49. break;
  50. case 10:
  51. $SystemStatus1='complete';
  52. break;
  53. case 11:
  54. $SystemStatus1='alarm';
  55. break;
  56. case 12:
  57. $SystemStatus1='fault';
  58. break;
  59. case 13:
  60. $SystemStatus1='reservation';
  61. break;
  62. case 14:
  63. $SystemStatus1='booking';
  64. break;
  65. case 15:
  66. $SystemStatus1='maintain';
  67. break;
  68. case 16:
  69. $SystemStatus1='debug';
  70. break;
  71. case 17:
  72. $SystemStatus1='precharge step 0';
  73. break;
  74. case 18:
  75. $SystemStatus1='precharge step 1';
  76. break;
  77. case 19:
  78. $SystemStatus1='update';
  79. break;
  80. default:
  81. $SystemStatus1='unknown';
  82. break;
  83. }
  84. }
  85. if($obj['ChargingInfo2']){
  86. switch ($obj['ChargingInfo2']['SystemStatus']){
  87. case 0:
  88. $SystemStatus2='booting';
  89. break;
  90. case 1:
  91. $SystemStatus2='idle';
  92. break;
  93. case 2:
  94. $SystemStatus2='authorizing';
  95. break;
  96. case 3:
  97. $SystemStatus2='reassign check';
  98. break;
  99. case 4:
  100. $SystemStatus2='reassign';
  101. break;
  102. case 5:
  103. $SystemStatus2='preparing';
  104. break;
  105. case 6:
  106. $SystemStatus2='preparing for EV';
  107. break;
  108. case 7:
  109. $SystemStatus2='preparing for evse';
  110. break;
  111. case 8:
  112. $SystemStatus2='charging';
  113. break;
  114. case 9:
  115. $SystemStatus2='terminating';
  116. break;
  117. case 10:
  118. $SystemStatus2='complete';
  119. break;
  120. case 11:
  121. $SystemStatus2='alarm';
  122. break;
  123. case 12:
  124. $SystemStatus2='fault';
  125. break;
  126. case 13:
  127. $SystemStatus2='reservation';
  128. break;
  129. case 14:
  130. $SystemStatus2='booking';
  131. break;
  132. case 15:
  133. $SystemStatus2='maintain';
  134. break;
  135. case 16:
  136. $SystemStatus2='debug';
  137. break;
  138. case 17:
  139. $SystemStatus2='precharge step 0';
  140. break;
  141. case 18:
  142. $SystemStatus2='precharge step 1';
  143. break;
  144. case 19:
  145. $SystemStatus2='update';
  146. break;
  147. default:
  148. $SystemStatus2='unknown';
  149. break;
  150. }
  151. }
  152. if($obj['ChargingInfo3']){
  153. switch ($obj['ChargingInfo3']['SystemStatus']){
  154. case 0:
  155. $SystemStatus3='booting';
  156. break;
  157. case 1:
  158. $SystemStatus3='idle';
  159. break;
  160. case 2:
  161. $SystemStatus3='authorizing';
  162. break;
  163. case 3:
  164. $SystemStatus3='reassign check';
  165. break;
  166. case 4:
  167. $SystemStatus3='reassign';
  168. break;
  169. case 5:
  170. $SystemStatus3='preparing';
  171. break;
  172. case 6:
  173. $SystemStatus3='preparing for EV';
  174. break;
  175. case 7:
  176. $SystemStatus3='preparing for evse';
  177. break;
  178. case 8:
  179. $SystemStatus3='charging';
  180. break;
  181. case 9:
  182. $SystemStatus3='terminating';
  183. break;
  184. case 10:
  185. $SystemStatus3='complete';
  186. break;
  187. case 11:
  188. $SystemStatus3='alarm';
  189. break;
  190. case 12:
  191. $SystemStatus3='fault';
  192. break;
  193. case 13:
  194. $SystemStatus3='reservation';
  195. break;
  196. case 14:
  197. $SystemStatus3='booking';
  198. break;
  199. case 15:
  200. $SystemStatus3='maintain';
  201. break;
  202. case 16:
  203. $SystemStatus3='debug';
  204. break;
  205. case 17:
  206. $SystemStatus3='precharge step 0';
  207. break;
  208. case 18:
  209. $SystemStatus3='precharge step 1';
  210. break;
  211. case 19:
  212. $SystemStatus3='update';
  213. break;
  214. default:
  215. $SystemStatus3='unknown';
  216. break;
  217. }
  218. }
  219. function ConnectorType($connector){
  220. $result="";
  221. if($connector == "0"){
  222. $result= "";
  223. }
  224. else if($connector == "U" || $connector == "E"){
  225. $result= "CCS";
  226. }
  227. else if($connector == "G" || $connector == "D"){
  228. $result= "GB";
  229. }
  230. else if($connector == "J"){
  231. $result= "CHAdeMO";
  232. }
  233. else if($connector == "1" || $connector == "2" || $connector == "3" || $connector == "4" || $connector == "5" || $connector == "6"){
  234. $result= "AC";
  235. }
  236. else{
  237. $result= "";
  238. }
  239. return $result;
  240. }
  241. ?>
  242. <style>
  243. img {
  244. display: block;
  245. margin-left: auto;
  246. margin-right: auto;
  247. }
  248. </style>
  249. <div class="envor-content">
  250. <!--
  251. Page Title start
  252. //-->
  253. <section class="envor-page-title-1" data-stellar-background-ratio="0.5">
  254. <div class="container">
  255. <div class="row">
  256. <div class="col-lg-9 col-md-9 col-sm-9">
  257. <h1><?php echo $lang->showWord("charging"); ?></h1>
  258. </div>
  259. </div>
  260. </div>
  261. <!--
  262. Page Title end
  263. //-->
  264. </section>
  265. <!--
  266. Main Content start
  267. //-->
  268. <a id="loadinghref"><div id="loading" style="display:none;"><input type="hidden" name="ModelName" id="ModelName" value="<?php echo $ModelName;?>"><img src="img/giphy.gif"/></div></a>
  269. <section class="envor-section">
  270. <div class="container">
  271. <div class="row">
  272. <div class="col-lg-12">
  273. <div class="envor-sorting" id="faq-sorting">
  274. <div class="envor-toggle">
  275. <!--Charging relevant parameters-->
  276. <article class="envor-sorting-item css">
  277. <header><?php echo $lang->showWord("charging_relevant_parameters"); ?><i class="fa fa-plus"></i></header>
  278. <section>
  279. <div class="form-group" style="display:<?php echo $am111;?>">
  280. <label id="MaxChargingEnergyLbl">Max Charging Energy</label>
  281. <small class="form-text text-muted-red">kWh</small>
  282. <input type="text" name="MaxChargingEnergy" id="MaxChargingEnergy" class="form-control" value="<?php echo $obj['MaxChargingEnergy'];?>" placeholder="<?php echo ($obj['MaxChargingEnergy']==0||$obj['MaxChargingEnergy']=="")?"'0' means unlimit":"";?>" title="'0' means unlimit">
  283. <small class="form-text text-muted-red"><label id="MaxChargingEnergyText" style="display:none;">'0' means unlimit</label></small>
  284. </div>
  285. <div class="form-group" style="display:<?php echo $am001;?>">
  286. <label id="MaxChargingPowerLbl">Max Charging Power</label>
  287. <small class="form-text text-muted-red">kW</small>
  288. <input type="text" name="MaxChargingPower" id="MaxChargingPower" class="form-control" value="<?php echo $obj['MaxChargingPower'];?>" placeholder="<?php echo ($obj['MaxChargingPower']==0||$obj['MaxChargingPower']=="")?"'0' means unlimit":"";?>" title="'0' means unlimit">
  289. <input type="hidden" name="RatingPower" id="RatingPower" value="<?php echo $RatingPower;?>">
  290. <small class="form-text text-muted-red"><label id="MaxChargingPowerText" style="display:none;">'0' means unlimit</label></small>
  291. </div>
  292. <div class="form-group" style="display:<?php echo $am111;?>">
  293. <label id="MaxChargingCurrentLbl">Max Charging Current</label>
  294. <small class="form-text text-muted-red">amp</small>
  295. <input type="text" name="MaxChargingCurrent" id="MaxChargingCurrent" class="form-control" value="<?php echo $obj['MaxChargingCurrent'];?>" placeholder="<?php echo ($obj['MaxChargingCurrent']==0||$obj['MaxChargingCurrent']=="")?"'0' means unlimit":"";?>" title="'0' means unlimit">
  296. <input type="hidden" name="RatingCurrent" id="RatingCurrent" value="<?php echo $RatingCurrent;?>">
  297. <small class="form-text text-muted-red"><label id="MaxChargingCurrentText" style="display:none;">'0' means unlimit</label></small>
  298. </div>
  299. <div class="form-group" style="display:<?php echo $am111;?>">
  300. <label id="MaxChargingDurationLbl">Max Charging Duration</label>
  301. <small class="form-text text-muted-red">minutes</small>
  302. <input type="text" name="MaxChargingDuration" id="MaxChargingDuration" class="form-control" value="<?php echo $obj['MaxChargingDuration'];?>" placeholder="<?php echo ($obj['MaxChargingDuration']==0||$obj['MaxChargingDuration']=="")?"'0' means unlimit":"";?>" title="'0' means unlimit">
  303. <small class="form-text text-muted-red"><label id="MaxChargingDurationText" style="display:none;">'0' means unlimit</label></small>
  304. </div>
  305. <div class="form-group" id="AcMaxChargingCurrentDiv">
  306. <label>AC Max Charging Current</label>
  307. <small class="form-text text-muted-red">amp</small>
  308. <input type="text" name="AcMaxChargingCurrent" id="AcMaxChargingCurrent" class="form-control" value="<?php echo $obj['AcMaxChargingCurrent'];?>" placeholder="<?php echo ($obj['AcMaxChargingCurrent']==0||$obj['AcMaxChargingCurrent']=="")?"'0' means unlimit":"";?>" title="'0' means unlimit">
  309. <input type="hidden" name="AcRatingCurrent" id="AcRatingCurrent" value="<?php echo $AcRatingCurrent;?>">
  310. <small class="form-text text-muted-red"><label id="AcMaxChargingCurrentText" style="display:none;">'0' means unlimit</label></small>
  311. </div>
  312. <div class="form-group" style="display:<?php echo $am111;?>">
  313. <label>Local White Card0</label>
  314. <input type="text" name="LocalWhiteCard0" id="LocalWhiteCard0" class="form-control" value="<?php echo $obj['LocalWhiteCard'][0];?>">
  315. </div>
  316. <div class="form-group" style="display:<?php echo $am111;?>">
  317. <label>Local White Card1</label>
  318. <input type="text" name="LocalWhiteCard1" id="LocalWhiteCard1" class="form-control" value="<?php echo $obj['LocalWhiteCard'][1];?>">
  319. </div>
  320. <div class="form-group" style="display:<?php echo $am111;?>">
  321. <label>Local White Card2</label>
  322. <input type="text" name="LocalWhiteCard2" id="LocalWhiteCard2" class="form-control" value="<?php echo $obj['LocalWhiteCard'][2];?>">
  323. </div>
  324. <div class="form-group" style="display:<?php echo $am111;?>">
  325. <label>Local White Card3</label>
  326. <input type="text" name="LocalWhiteCard3" id="LocalWhiteCard3" class="form-control" value="<?php echo $obj['LocalWhiteCard'][3];?>">
  327. </div>
  328. <div class="form-group" style="display:<?php echo $am111;?>">
  329. <label>Local White Card4</label>
  330. <input type="text" name="LocalWhiteCard4" id="LocalWhiteCard4" class="form-control" value="<?php echo $obj['LocalWhiteCard'][4];?>">
  331. </div>
  332. <div class="form-group" style="display:<?php echo $am111;?>">
  333. <label>Local White Card5</label>
  334. <input type="text" name="LocalWhiteCard5" id="LocalWhiteCard5" class="form-control" value="<?php echo $obj['LocalWhiteCard'][5];?>">
  335. </div>
  336. <div class="form-group" style="display:<?php echo $am111;?>">
  337. <label>Local White Card6</label>
  338. <input type="text" name="LocalWhiteCard6" id="LocalWhiteCard6" class="form-control" value="<?php echo $obj['LocalWhiteCard'][6];?>">
  339. </div>
  340. <div class="form-group" style="display:<?php echo $am111;?>">
  341. <label>Local White Card7</label>
  342. <input type="text" name="LocalWhiteCard7" id="LocalWhiteCard7" class="form-control" value="<?php echo $obj['LocalWhiteCard'][7];?>">
  343. </div>
  344. <div class="form-group" style="display:<?php echo $am111;?>">
  345. <label>Local White Card8</label>
  346. <input type="text" name="LocalWhiteCard8" id="LocalWhiteCard8" class="form-control" value="<?php echo $obj['LocalWhiteCard'][8];?>">
  347. </div>
  348. <div class="form-group" style="display:<?php echo $am111;?>">
  349. <label>Local White Card9</label>
  350. <input type="text" name="LocalWhiteCard9" id="LocalWhiteCard9" class="form-control" value="<?php echo $obj['LocalWhiteCard'][9];?>">
  351. </div>
  352. <div class="form-group" id="isBillingDiv">
  353. <label>
  354. <input type="checkbox" id="isBilling" name="isBilling" <?php echo $obj['isBilling']==1?"checked":"";?> onclick="isBilling_clicked()">
  355. Billing</label>
  356. </div>
  357. <div class="form-group" id="CurrencyDiv">
  358. <label>Currency</label>
  359. <select class="form-control" id="Currency" name="Currency">
  360. <option value="0" <?php echo $obj['Currency']=="0"?"selected":""?>>AED - Emirati Dirham</option>
  361. <option value="1" <?php echo $obj['Currency']=="1"?"selected":""?>>ARS - Argentine Peso</option>
  362. <option value="2" <?php echo $obj['Currency']=="2"?"selected":""?>>AUD - Australian Dollar</option>
  363. <option value="3" <?php echo $obj['Currency']=="3"?"selected":""?>>BGN - Bulgarian Lev</option>
  364. <option value="4" <?php echo $obj['Currency']=="4"?"selected":""?>>BHD - Bahraini Dinar</option>
  365. <option value="5" <?php echo $obj['Currency']=="5"?"selected":""?>>BND - Bruneian Dollar</option>
  366. <option value="6" <?php echo $obj['Currency']=="6"?"selected":""?>>BRL - Brazilian Real</option>
  367. <option value="7" <?php echo $obj['Currency']=="7"?"selected":""?>>BWP - Botswana Pula</option>
  368. <option value="8" <?php echo $obj['Currency']=="8"?"selected":""?>>CAD - Canadian Dollar</option>
  369. <option value="9" <?php echo $obj['Currency']=="9"?"selected":""?>>CHF - Swiss Franc</option>
  370. <option value="10" <?php echo $obj['Currency']=="10"?"selected":""?>>CLP - Chilean Peso</option>
  371. <option value="11" <?php echo $obj['Currency']=="11"?"selected":""?>>CNY - Chinese Yuan Renminbi</option>
  372. <option value="12" <?php echo $obj['Currency']=="12"?"selected":""?>>COP - Colombian Peso</option>
  373. <option value="13" <?php echo $obj['Currency']=="13"?"selected":""?>>CZK - Czech Koruna</option>
  374. <option value="14" <?php echo $obj['Currency']=="14"?"selected":""?>>DKK - Danish Krone</option>
  375. <option value="15" <?php echo $obj['Currency']=="15"?"selected":""?>>EUR - Euro</option>
  376. <option value="16" <?php echo $obj['Currency']=="16"?"selected":""?>>GBP - British Pound</option>
  377. <option value="17" <?php echo $obj['Currency']=="17"?"selected":""?>>HKD - Hong Kong Dollar</option>
  378. <option value="18" <?php echo $obj['Currency']=="18"?"selected":""?>>HRK - Croatian Kuna</option>
  379. <option value="19" <?php echo $obj['Currency']=="19"?"selected":""?>>HUF - Hungarian Forint</option>
  380. <option value="20" <?php echo $obj['Currency']=="20"?"selected":""?>>IDR - Indonesian Rupiah</option>
  381. <option value="21" <?php echo $obj['Currency']=="21"?"selected":""?>>ILS - Israeli Shekel</option>
  382. <option value="22" <?php echo $obj['Currency']=="22"?"selected":""?>>INR - Indian Rupee</option>
  383. <option value="23" <?php echo $obj['Currency']=="23"?"selected":""?>>IRR - Iranian Rial</option>
  384. <option value="24" <?php echo $obj['Currency']=="24"?"selected":""?>>ISK - Icelandic Krona</option>
  385. <option value="25" <?php echo $obj['Currency']=="25"?"selected":""?>>JPY - Japanese Yen</option>
  386. <option value="26" <?php echo $obj['Currency']=="26"?"selected":""?>>KRW - South Korean Won</option>
  387. <option value="27" <?php echo $obj['Currency']=="27"?"selected":""?>>KWD - Kuwaiti Dinar</option>
  388. <option value="28" <?php echo $obj['Currency']=="28"?"selected":""?>>KZT - Kazakhstani Tenge</option>
  389. <option value="29" <?php echo $obj['Currency']=="29"?"selected":""?>>LKR - Sri Lankan Rupee</option>
  390. <option value="30" <?php echo $obj['Currency']=="30"?"selected":""?>>LYD - Libyan Dinar</option>
  391. <option value="31" <?php echo $obj['Currency']=="31"?"selected":""?>>MUR - Mauritian Rupee</option>
  392. <option value="32" <?php echo $obj['Currency']=="32"?"selected":""?>>MXN - Mexican Peso</option>
  393. <option value="33" <?php echo $obj['Currency']=="33"?"selected":""?>>MYR - Malaysian Ringgit</option>
  394. <option value="34" <?php echo $obj['Currency']=="34"?"selected":""?>>NOK - Norwegian Krone</option>
  395. <option value="35" <?php echo $obj['Currency']=="35"?"selected":""?>>NPR - Nepalese Rupee</option>
  396. <option value="36" <?php echo $obj['Currency']=="36"?"selected":""?>>NZD - New Zealand Dollar</option>
  397. <option value="37" <?php echo $obj['Currency']=="37"?"selected":""?>>OMR - Omani Rial</option>
  398. <option value="38" <?php echo $obj['Currency']=="38"?"selected":""?>>PHP - Philippine Peso</option>
  399. <option value="39" <?php echo $obj['Currency']=="39"?"selected":""?>>PKR - Pakistani Rupee</option>
  400. <option value="40" <?php echo $obj['Currency']=="40"?"selected":""?>>PLN - Polish Zloty</option>
  401. <option value="41" <?php echo $obj['Currency']=="41"?"selected":""?>>QAR - Qatari Riyal</option>
  402. <option value="42" <?php echo $obj['Currency']=="42"?"selected":""?>>RON - Romanian New Leu</option>
  403. <option value="43" <?php echo $obj['Currency']=="43"?"selected":""?>>RUB - Russian Ruble</option>
  404. <option value="44" <?php echo $obj['Currency']=="44"?"selected":""?>>SAR - Saudi Arabian Riyal</option>
  405. <option value="45" <?php echo $obj['Currency']=="45"?"selected":""?>>SEK - Swedish Krona</option>
  406. <option value="46" <?php echo $obj['Currency']=="46"?"selected":""?>>SGD - Singapore Dollar</option>
  407. <option value="47" <?php echo $obj['Currency']=="47"?"selected":""?>>THB - Thai Baht</option>
  408. <option value="48" <?php echo $obj['Currency']=="48"?"selected":""?>>TRY - Turkish Lira</option>
  409. <option value="49" <?php echo $obj['Currency']=="49"?"selected":""?>>TTD - Trinidadian Dollar</option>
  410. <option value="50" <?php echo $obj['Currency']=="50"?"selected":""?>>TWD - Taiwan New Dollar</option>
  411. <option value="51" <?php echo $obj['Currency']=="51"?"selected":""?>>USD - US Dollar</option>
  412. <option value="52" <?php echo $obj['Currency']=="52"?"selected":""?>>VEF - Venezuelan Bolivar</option>
  413. <option value="53" <?php echo $obj['Currency']=="53"?"selected":""?>>ZAR - South African Rand</option>
  414. </select>
  415. </div>
  416. <div class="form-group" id="FeeDiv">
  417. <div class="form-group">
  418. <label>Fee 00:00~00:59</label>
  419. <input type="text" name="Fee0" id="Fee0" class="form-control" value="<?php echo round($obj['Fee'][0],2);?>">
  420. </div>
  421. <div class="form-group">
  422. <label>Fee 01:00~01:59</label>
  423. <input type="text" name="Fee0" id="Fee1" class="form-control" value="<?php echo round($obj['Fee'][1],2);?>">
  424. </div>
  425. <div class="form-group">
  426. <label>Fee 02:00~02:59</label>
  427. <input type="text" name="Fee2" id="Fee2" class="form-control" value="<?php echo round($obj['Fee'][2],2);?>">
  428. </div>
  429. <div class="form-group">
  430. <label>Fee 03:00~03:59</label>
  431. <input type="text" name="Fee3" id="Fee3" class="form-control" value="<?php echo round($obj['Fee'][3],2);?>">
  432. </div>
  433. <div class="form-group">
  434. <label>Fee 04:00~04:59</label>
  435. <input type="text" name="Fee4" id="Fee4" class="form-control" value="<?php echo round($obj['Fee'][4],2);?>">
  436. </div>
  437. <div class="form-group">
  438. <label>Fee 05:00~05:59</label>
  439. <input type="text" name="Fee5" id="Fee5" class="form-control" value="<?php echo round($obj['Fee'][5],2);?>">
  440. </div>
  441. <div class="form-group">
  442. <label>Fee 06:00~06:59</label>
  443. <input type="text" name="Fee6" id="Fee6" class="form-control" value="<?php echo round($obj['Fee'][6],2);?>">
  444. </div>
  445. <div class="form-group">
  446. <label>Fee 07:00~07:59</label>
  447. <input type="text" name="Fee7" id="Fee7" class="form-control" value="<?php echo round($obj['Fee'][7],2);?>">
  448. </div>
  449. <div class="form-group">
  450. <label>Fee 08:00~08:59</label>
  451. <input type="text" name="Fee8" id="Fee8" class="form-control" value="<?php echo round($obj['Fee'][8],2);?>">
  452. </div>
  453. <div class="form-group">
  454. <label>Fee 09:00~09:59</label>
  455. <input type="text" name="Fee9" id="Fee9" class="form-control" value="<?php echo round($obj['Fee'][9],2);?>">
  456. </div>
  457. <div class="form-group">
  458. <label>Fee 10:00~10:59</label>
  459. <input type="text" name="Fee10" id="Fee10" class="form-control" value="<?php echo round($obj['Fee'][10],2);?>">
  460. </div>
  461. <div class="form-group">
  462. <label>Fee 11:00~11:59</label>
  463. <input type="text" name="Fee11" id="Fee11" class="form-control" value="<?php echo round($obj['Fee'][11],2);?>">
  464. </div>
  465. <div class="form-group">
  466. <label>Fee 12:00~12:59</label>
  467. <input type="text" name="Fee12" id="Fee12" class="form-control" value="<?php echo round($obj['Fee'][12],2);?>">
  468. </div>
  469. <div class="form-group">
  470. <label>Fee 13:00~13:59</label>
  471. <input type="text" name="Fee13" id="Fee13" class="form-control" value="<?php echo round($obj['Fee'][13],2);?>">
  472. </div>
  473. <div class="form-group">
  474. <label>Fee 14:00~14:59</label>
  475. <input type="text" name="Fee14" id="Fee14" class="form-control" value="<?php echo round($obj['Fee'][14],2);?>">
  476. </div>
  477. <div class="form-group">
  478. <label>Fee 15:00~15:59</label>
  479. <input type="text" name="Fee15" id="Fee15" class="form-control" value="<?php echo round($obj['Fee'][15],2);?>">
  480. </div>
  481. <div class="form-group">
  482. <label>Fee 16:00~16:59</label>
  483. <input type="text" name="Fee16" id="Fee16" class="form-control" value="<?php echo round($obj['Fee'][16],2);?>">
  484. </div>
  485. <div class="form-group">
  486. <label>Fee 17:00~17:59</label>
  487. <input type="text" name="Fee17" id="Fee17" class="form-control" value="<?php echo round($obj['Fee'][17],2);?>">
  488. </div>
  489. <div class="form-group">
  490. <label>Fee 18:00~18:59</label>
  491. <input type="text" name="Fee18" id="Fee18" class="form-control" value="<?php echo round($obj['Fee'][18],2);?>">
  492. </div>
  493. <div class="form-group">
  494. <label>Fee 19:00~19:59</label>
  495. <input type="text" name="Fee19" id="Fee19" class="form-control" value="<?php echo round($obj['Fee'][19],2);?>">
  496. </div>
  497. <div class="form-group">
  498. <label>Fee 20:00~20:59</label>
  499. <input type="text" name="Fee20" id="Fee20" class="form-control" value="<?php echo round($obj['Fee'][20],2);?>">
  500. </div>
  501. <div class="form-group">
  502. <label>Fee 21:00~21:59</label>
  503. <input type="text" name="Fee21" id="Fee21" class="form-control" value="<?php echo round($obj['Fee'][21],2);?>">
  504. </div>
  505. <div class="form-group">
  506. <label>Fee 22:00~22:59</label>
  507. <input type="text" name="Fee22" id="Fee22" class="form-control" value="<?php echo round($obj['Fee'][22],2);?>">
  508. </div>
  509. <div class="form-group">
  510. <label>Fee 23:00~23:59</label>
  511. <input type="text" name="Fee23" id="Fee23" class="form-control" value="<?php echo round($obj['Fee'][23],2);?>">
  512. </div>
  513. </div>
  514. <?php /* <div class="form-group" style="display:<?php echo $am111;?>">
  515. <label>CcsAuthentication</label>
  516. <select class="form-control" id="CcsAuthentication" name="CcsAuthentication">
  517. <option value="0" <?php echo $obj['CcsAuthentication']==0?"selected":""?>>EIM</option>
  518. <option value="1" <?php echo $obj['CcsAuthentication']==1?"selected":""?>>EIM&PnC mixed</option>
  519. </select>
  520. </div>
  521. <div class="form-group" style="display:<?php echo $am111;?>">
  522. <label>AcCcsChargingModel</label>
  523. <select class="form-control" id="AcCcsChargingModel" name="AcCcsChargingModel">
  524. <option value="0" <?php echo $obj['AcCcsChargingModel']==0?"selected":""?>>BC (PWM) only</option>
  525. <option value="1" <?php echo $obj['AcCcsChargingModel']==0?"selected":""?>>BC&PLC mixed</option>
  526. </select>
  527. </div>*/?>
  528. </section>
  529. </article>
  530. <?php if($obj['ChargingInfo1']){ $idx++;?>
  531. <!--Charging Information-->
  532. <article class="envor-sorting-item css">
  533. <header><?php echo "connector".$idx." ".$lang->showWord("charging_information")."(".$connectorType1.")"; ?><i class="fa fa-plus"></i></header>
  534. <section>
  535. <div class="form-group" style="display:<?php echo $am111;?>">
  536. <label>User Id</label>
  537. <input type="text" readonly class="form-control" value="<?php echo $obj['ChargingInfo1']['StartUserId'];?>">
  538. <input type="hidden" name="UserId1" id="UserId1" value="<?php echo $obj['ChargingInfo1']['StartUserId'];?>">
  539. </div>
  540. <div class="form-group" style="display:<?php echo $am111;?>">
  541. <label>Start Date Time</label>
  542. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['StartDateTime'];?>">
  543. <input type="hidden" name="StartDateTime1" id="StartDateTime1" value="<?php echo $obj['ChargingInfo1']['StartDateTime'];?>">
  544. </div>
  545. <div class="form-group" style="display:<?php echo $am111;?>">
  546. <label>Stop Date Time</label>
  547. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['StopDateTime'];?>">
  548. <input type="hidden" name="StopDateTime1" id="StopDateTime1" value="<?php echo $obj['ChargingInfo1']['StopDateTime'];?>">
  549. </div>
  550. <?php /* <div class="form-group" style="display:<?php echo $am111;?>">
  551. <label>StartMethod</label>
  552. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['StartMethod'];?>">
  553. <input type="hidden" name="StartMethod1" id="StartMethod1" value="<?php echo $obj['ChargingInfo1']['StartMethod'];?>">
  554. </div>*/?>
  555. <div class="form-group" style="display:<?php echo $am111;?>">
  556. <label>System Status</label>
  557. <input type="text" readonly class="form-control" placeholder="<?php echo $SystemStatus1;?>">
  558. <input type="hidden" name="SystemStatus1" id="SystemStatus1" value="<?php echo $obj['ChargingInfo1']['SystemStatus'];?>">
  559. </div>
  560. <div class="form-group" style="display:<?php echo $am111;?>">
  561. <label>Connector Temperature</label>
  562. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['ConnectorTemp'];?> ℃">
  563. <input type="hidden" name="ConnectorTemp1" id="ConnectorTemp1" value="<?php echo $obj['ChargingInfo1']['ConnectorTemp'];?>">
  564. </div>
  565. <div class="form-group" style="display:<?php echo $am001;?>">
  566. <label>Present Charging Voltage</label>
  567. <input type="text" readonly class="form-control" placeholder="<?php echo round($obj['ChargingInfo1']['PresentChargingVoltage'],2);?> volt">
  568. <input type="hidden" name="PresentChargingVoltage1" id="PresentChargingVoltage1" value="<?php echo $obj['ChargingInfo1']['PresentChargingVoltage'];?>">
  569. </div>
  570. <div class="form-group" style="display:<?php echo $am111;?>">
  571. <label>Present Charging Current</label>
  572. <input type="text" readonly class="form-control" placeholder="<?php echo round($obj['ChargingInfo1']['PresentChargingCurrent'],2);?> amp">
  573. <input type="hidden" name="PresentChargingCurrent1" id="PresentChargingCurrent1" value="<?php echo $obj['ChargingInfo1']['PresentChargingCurrent'];?>">
  574. </div>
  575. <div class="form-group" style="display:<?php echo $am111;?>">
  576. <label>Present Charging Power</label>
  577. <input type="text" readonly class="form-control" placeholder="<?php echo round($obj['ChargingInfo1']['PresentChargingPower'],2);?> kW">
  578. <input type="hidden" name="PresentChargingPower1" id="PresentChargingPower1" value="<?php echo $obj['ChargingInfo1']['PresentChargingPower'];?>">
  579. </div>
  580. <div class="form-group" style="display:<?php echo $am111;?>">
  581. <label>Present Charging Energy</label>
  582. <input type="text" readonly class="form-control" placeholder="<?php echo round($obj['ChargingInfo1']['PresentChargedEnergy'],2);?> kWh">
  583. <input type="hidden" name="PresentChargedEnergy1" id="PresentChargedEnergy1" value="<?php echo $obj['ChargingInfo1']['PresentChargedEnergy'];?>">
  584. </div>
  585. <div class="form-group" style="display:<?php echo $am111;?>">
  586. <label>Present Charging Duration</label>
  587. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargedDuration'];?> seconds">
  588. <input type="hidden" name="PresentChargedDuration1" id="PresentChargedDuration1" value="<?php echo $obj['ChargingInfo1']['PresentChargedDuration'];?>">
  589. </div>
  590. <div class="form-group" style="display:<?php echo $am001;?>">
  591. <label>Remain Charging Time</label>
  592. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['RemainChargingDuration'];?> seconds">
  593. <input type="hidden" name="RemainChargingDuration1" id="RemainChargingDuration1" value="<?php echo $obj['ChargingInfo1']['RemainChargingDuration'];?>">
  594. </div>
  595. <div class="form-group" style="display:<?php echo $am001;?>">
  596. <label>EV Battery Max Voltage</label>
  597. <input type="text" readonly class="form-control" placeholder="<?php echo round($obj['ChargingInfo1']['EvBatteryMaxVoltage'],2);?> volt">
  598. <input type="hidden" name="EvBatteryMaxVoltage1" id="EvBatteryMaxVoltage1" value="<?php echo $obj['ChargingInfo1']['EvBatteryMaxVoltage'];?>">
  599. </div>
  600. <div class="form-group" style="display:<?php echo $am001;?>">
  601. <label>EV Battery Target Voltage</label>
  602. <input type="text" readonly class="form-control" placeholder="<?php echo round($obj['ChargingInfo1']['EvBatterytargetVoltage'],2);?> volt">
  603. <input type="hidden" name="EvBatterytargetVoltage1" id="EvBatterytargetVoltage1" value="<?php echo $obj['ChargingInfo1']['EvBatterytargetVoltage'];?>">
  604. </div>
  605. <div class="form-group" style="display:<?php echo $am001;?>">
  606. <label>EV Battery Soc</label>
  607. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['EvBatterySoc'];?>">
  608. <input type="hidden" name="EvBatterySoc1" id="EvBatterySoc1" value="<?php echo $obj['ChargingInfo1']['EvBatterySoc'];?>">
  609. </div>
  610. </section>
  611. </article>
  612. <?php }?>
  613. <?php if($obj['ChargingInfo2']){ $idx++;?>
  614. <!--Charging Information-->
  615. <article class="envor-sorting-item css">
  616. <header><?php echo "connector".$idx." ".$lang->showWord("charging_information")."(".$connectorType2.")"; ?><i class="fa fa-plus"></i></header>
  617. <section>
  618. <div class="form-group" style="display:<?php echo $am111;?>">
  619. <label>User Id</label>
  620. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['StartUserId'];?>">
  621. <input type="hidden" name="UserId2" id="UserId2" value="<?php echo $obj['ChargingInfo2']['StartUserId'];?>">
  622. </div>
  623. <div class="form-group" style="display:<?php echo $am111;?>">
  624. <label>Start Date Time</label>
  625. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['StartDateTime'];?>">
  626. <input type="hidden" name="StartDateTime2" id="StartDateTime2" value="<?php echo $obj['ChargingInfo2']['StartDateTime'];?>">
  627. </div>
  628. <div class="form-group" style="display:<?php echo $am111;?>">
  629. <label>Stop Date Time</label>
  630. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['StopDateTime'];?>">
  631. <input type="hidden" name="StopDateTime2" id="StopDateTime2" value="<?php echo $obj['ChargingInfo2']['StopDateTime'];?>">
  632. </div>
  633. <?php /* <div class="form-group" style="display:<?php echo $am111;?>">
  634. <label>StartMethod</label>
  635. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['StartMethod'];?>">
  636. <input type="hidden" name="StartMethod2" id="StartMethod2" value="<?php echo $obj['ChargingInfo2']['StartMethod'];?>">
  637. </div>*/?>
  638. <div class="form-group" style="display:<?php echo $am111;?>">
  639. <label>System Status</label>
  640. <input type="text" readonly class="form-control" placeholder="<?php echo $SystemStatus2;?>">
  641. <input type="hidden" name="SystemStatus2" id="SystemStatus2" value="<?php echo $obj['ChargingInfo2']['SystemStatus'];?>">
  642. </div>
  643. <div class="form-group" style="display:<?php echo $am111;?>">
  644. <label>Connector Temperature</label>
  645. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['ConnectorTemp'];?> ℃">
  646. <input type="hidden" name="ConnectorTemp2" id="ConnectorTemp2" value="<?php echo $obj['ChargingInfo2']['ConnectorTemp'];?>">
  647. </div>
  648. <div class="form-group" style="display:<?php echo $am001;?>">
  649. <label>Present Charging Voltage</label>
  650. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargingVoltage'];?> volt">
  651. <input type="hidden" name="PresentChargingVoltage2" id="PresentChargingVoltage2" value="<?php echo $obj['ChargingInfo2']['PresentChargingVoltage'];?>">
  652. </div>
  653. <div class="form-group" style="display:<?php echo $am111;?>">
  654. <label>Present Charging Current</label>
  655. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargingCurrent'];?> amp">
  656. <input type="hidden" name="PresentChargingCurrent2" id="PresentChargingCurrent2" value="<?php echo $obj['ChargingInfo2']['PresentChargingCurrent'];?>">
  657. </div>
  658. <div class="form-group" style="display:<?php echo $am111;?>">
  659. <label>Present Charging Power</label>
  660. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargingPower'];?> kW">
  661. <input type="hidden" name="PresentChargingPower2" id="PresentChargingPower2" value="<?php echo $obj['ChargingInfo2']['PresentChargingPower'];?>">
  662. </div>
  663. <div class="form-group" style="display:<?php echo $am111;?>">
  664. <label>Present Charging Energy</label>
  665. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargedEnergy'];?> kWh">
  666. <input type="hidden" name="PresentChargedEnergy2" id="PresentChargedEnergy2" value="<?php echo $obj['ChargingInfo2']['PresentChargedEnergy'];?>">
  667. </div>
  668. <div class="form-group" style="display:<?php echo $am111;?>">
  669. <label>Present Charging Duration</label>
  670. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargedDuration'];?> seconds">
  671. <input type="hidden" name="PresentChargedDuration2" id="PresentChargedDuration2" value="<?php echo $obj['ChargingInfo2']['PresentChargedDuration'];?>">
  672. </div>
  673. <div class="form-group" style="display:<?php echo $am001;?>">
  674. <label>Remain Charging Time</label>
  675. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['RemainChargingDuration'];?> seconds">
  676. <input type="hidden" name="RemainChargingDuration2" id="RemainChargingDuration2" value="<?php echo $obj['ChargingInfo2']['RemainChargingDuration'];?>">
  677. </div>
  678. <div class="form-group" style="display:<?php echo $am001;?>">
  679. <label>EV Battery Max Voltage</label>
  680. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['EvBatteryMaxVoltage'];?> volt">
  681. <input type="hidden" name="EvBatteryMaxVoltage2" id="EvBatteryMaxVoltage2" value="<?php echo $obj['ChargingInfo2']['EvBatteryMaxVoltage'];?>">
  682. </div>
  683. <div class="form-group" style="display:<?php echo $am001;?>">
  684. <label>EV Battery Target Voltage</label>
  685. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['EvBatterytargetVoltage'];?> volt">
  686. <input type="hidden" name="EvBatterytargetVoltage2" id="EvBatterytargetVoltage2" value="<?php echo $obj['ChargingInfo2']['EvBatterytargetVoltage'];?>">
  687. </div>
  688. <div class="form-group" style="display:<?php echo $am001;?>">
  689. <label>EV Battery Soc</label>
  690. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['EvBatterySoc'];?>">
  691. <input type="hidden" name="EvBatterySoc2" id="EvBatterySoc2" value="<?php echo $obj['ChargingInfo2']['EvBatterySoc'];?>">
  692. </div>
  693. </section>
  694. </article>
  695. <?php }?>
  696. <?php if($obj['ChargingInfo3']){ $idx++;?>
  697. <!--Charging Information-->
  698. <article class="envor-sorting-item css">
  699. <header><?php echo "connector".$idx." ".$lang->showWord("charging_information")."(".$connectorType3.")"; ?><i class="fa fa-plus"></i></header>
  700. <section>
  701. <div class="form-group" style="display:<?php echo $am111;?>">
  702. <label>User Id</label>
  703. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['StartUserId'];?>">
  704. <input type="hidden" name="UserId3" id="UserId3" value="<?php echo $obj['ChargingInfo3']['StartUserId'];?>">
  705. </div>
  706. <div class="form-group" style="display:<?php echo $am111;?>">
  707. <label>Start Date Time</label>
  708. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['StartDateTime'];?>">
  709. <input type="hidden" name="StartDateTime3" id="StartDateTime3" value="<?php echo $obj['ChargingInfo3']['StartDateTime'];?>">
  710. </div>
  711. <div class="form-group" style="display:<?php echo $am111;?>">
  712. <label>Stop Date Time</label>
  713. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['StopDateTime'];?>">
  714. <input type="hidden" name="StopDateTime3" id="StopDateTime3" value="<?php echo $obj['ChargingInfo3']['StopDateTime'];?>">
  715. </div>
  716. <?php /* <div class="form-group" style="display:<?php echo $am111;?>">
  717. <label>StartMethod</label>
  718. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['StartMethod'];?>">
  719. <input type="hidden" name="StartMethod3" id="StartMethod3" value="<?php echo $obj['ChargingInfo3']['StartMethod'];?>">
  720. </div>*/?>
  721. <div class="form-group" style="display:<?php echo $am111;?>">
  722. <label>System Status</label>
  723. <input type="text" readonly class="form-control" placeholder="<?php echo $SystemStatus3;?>">
  724. <input type="hidden" name="SystemStatus3" id="SystemStatus3" value="<?php echo $obj['ChargingInfo3']['SystemStatus'];?>">
  725. </div>
  726. <div class="form-group" style="display:<?php echo $am111;?>">
  727. <label>Connector Temperature</label>
  728. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['ConnectorTemp'];?> ℃">
  729. <input type="hidden" name="ConnectorTemp3" id="ConnectorTemp3" value="<?php echo $obj['ChargingInfo3']['ConnectorTemp'];?>">
  730. </div>
  731. <div class="form-group" style="display:<?php echo $am001;?>">
  732. <label>Present Charging Voltage</label>
  733. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargingVoltage'];?> volt">
  734. <input type="hidden" name="PresentChargingVoltage3" id="PresentChargingVoltage3" value="<?php echo $obj['ChargingInfo3']['PresentChargingVoltage'];?>">
  735. </div>
  736. <div class="form-group" style="display:<?php echo $am111;?>">
  737. <label>Present Charging Current</label>
  738. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargingCurrent'];?> amp">
  739. <input type="hidden" name="PresentChargingCurrent3" id="PresentChargingCurrent3" value="<?php echo $obj['ChargingInfo3']['PresentChargingCurrent'];?>">
  740. </div>
  741. <div class="form-group" style="display:<?php echo $am111;?>">
  742. <label>Present Charging Power</label>
  743. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargingPower'];?> kW">
  744. <input type="hidden" name="PresentChargingPower3" id="PresentChargingPower3" value="<?php echo $obj['ChargingInfo3']['PresentChargingPower'];?>">
  745. </div>
  746. <div class="form-group" style="display:<?php echo $am111;?>">
  747. <label>Present Charging Energy</label>
  748. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargedEnergy'];?> kWh">
  749. <input type="hidden" name="PresentChargedEnergy3" id="PresentChargedEnergy3" value="<?php echo $obj['ChargingInfo3']['PresentChargedEnergy'];?>">
  750. </div>
  751. <div class="form-group" style="display:<?php echo $am111;?>">
  752. <label>Present Charging Duration</label>
  753. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargedDuration'];?> seconds">
  754. <input type="hidden" name="PresentChargedDuration3" id="PresentChargedDuration3" value="<?php echo $obj['ChargingInfo3']['PresentChargedDuration'];?>">
  755. </div>
  756. <div class="form-group" style="display:<?php echo $am001;?>">
  757. <label>Remain Charging Time</label>
  758. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['RemainChargingDuration'];?> seconds">
  759. <input type="hidden" name="RemainChargingDuration3" id="RemainChargingDuration3" value="<?php echo $obj['ChargingInfo3']['RemainChargingDuration'];?>">
  760. </div>
  761. <div class="form-group" style="display:<?php echo $am001;?>">
  762. <label>EV Battery Max Voltage</label>
  763. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['EvBatteryMaxVoltage'];?> volt">
  764. <input type="hidden" name="EvBatteryMaxVoltage3" id="EvBatteryMaxVoltage3" value="<?php echo $obj['ChargingInfo3']['EvBatteryMaxVoltage'];?>">
  765. </div>
  766. <div class="form-group" style="display:<?php echo $am001;?>">
  767. <label>EV Battery Target Voltage</label>
  768. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['EvBatterytargetVoltage'];?> volt">
  769. <input type="hidden" name="EvBatterytargetVoltage3" id="EvBatterytargetVoltage3" value="<?php echo $obj['ChargingInfo3']['EvBatterytargetVoltage'];?>">
  770. </div>
  771. <div class="form-group" style="display:<?php echo $am001;?>">
  772. <label>EV Battery Soc</label>
  773. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['EvBatterySoc'];?>">
  774. <input type="hidden" name="EvBatterySoc3" id="EvBatterySoc3" value="<?php echo $obj['ChargingInfo3']['EvBatterySoc'];?>">
  775. </div>
  776. </section>
  777. </article>
  778. <?php }?>
  779. <article class="envor-sorting-item css">
  780. <div align="center"><button id="save"><?php echo $lang->showWord("set")?></button></div>
  781. </article>
  782. </div>
  783. </div>
  784. </div>
  785. </div>
  786. </div>
  787. </section>
  788. </div>
  789. <?php
  790. include 'foot.php';
  791. ?>
  792. <script type="text/JavaScript">
  793. $(document).ready(function(){
  794. if(document.getElementById("MaxChargingEnergy").value=="0" || document.getElementById("MaxChargingEnergy").value==""){
  795. document.getElementById("MaxChargingEnergyText").style.display="block";
  796. }
  797. if(document.getElementById("MaxChargingPower").value=="0" || document.getElementById("MaxChargingPower").value==""){
  798. document.getElementById("MaxChargingPowerText").style.display="block";
  799. }
  800. if(document.getElementById("MaxChargingCurrent").value=="0" || document.getElementById("MaxChargingCurrent").value==""){
  801. document.getElementById("MaxChargingCurrentText").style.display="block";
  802. }
  803. if(document.getElementById("MaxChargingDuration").value=="0" || document.getElementById("MaxChargingDuration").value==""){
  804. document.getElementById("MaxChargingDurationText").style.display="block";
  805. }
  806. if(document.getElementById("ModelName").value.substr(8,1) != "0"){
  807. document.getElementById("AcMaxChargingCurrentDiv").style.display="block";
  808. if(document.getElementById("AcMaxChargingCurrent").value=="0" || document.getElementById("AcMaxChargingCurrent").value==""){
  809. document.getElementById("AcMaxChargingCurrentText").style.display="block";
  810. }
  811. document.getElementById("MaxChargingEnergyLbl").innerHTML="DC MaxCharging Energy";
  812. document.getElementById("MaxChargingPowerLbl").innerHTML="DC MaxCharging Power";
  813. document.getElementById("MaxChargingCurrentLbl").innerHTML="DC MaxCharging Current";
  814. document.getElementById("MaxChargingDurationLbl").innerHTML="DC MaxCharging Duration";
  815. }
  816. else{
  817. document.getElementById("AcMaxChargingCurrentDiv").style.display="none";
  818. }
  819. isBilling_clicked();
  820. document.getElementById("MaxChargingEnergy").addEventListener("change", function() {
  821. if(document.getElementById(this.id).value == "0" || document.getElementById(this.id).value == ""){
  822. document.getElementById(this.id+"Text").style.display="block";
  823. }
  824. else{
  825. document.getElementById(this.id+"Text").style.display="none";
  826. }
  827. });
  828. document.getElementById("MaxChargingPower").addEventListener("change", function() {
  829. if(document.getElementById(this.id).value == "0" || document.getElementById(this.id).value == ""){
  830. document.getElementById(this.id+"Text").style.display="block";
  831. }
  832. else{
  833. document.getElementById(this.id+"Text").style.display="none";
  834. }
  835. });
  836. document.getElementById("MaxChargingCurrent").addEventListener("change", function() {
  837. if(document.getElementById(this.id).value == "0" || document.getElementById(this.id).value == ""){
  838. document.getElementById(this.id+"Text").style.display="block";
  839. }
  840. else{
  841. document.getElementById(this.id+"Text").style.display="none";
  842. }
  843. });
  844. document.getElementById("MaxChargingDuration").addEventListener("change", function() {
  845. if(document.getElementById(this.id).value == "0" || document.getElementById(this.id).value == ""){
  846. document.getElementById(this.id+"Text").style.display="block";
  847. }
  848. else{
  849. document.getElementById(this.id+"Text").style.display="none";
  850. }
  851. });
  852. document.getElementById("AcMaxChargingCurrent").addEventListener("change", function() {
  853. if(document.getElementById(this.id).value == "0" || document.getElementById(this.id).value == ""){
  854. document.getElementById(this.id+"Text").style.display="block";
  855. }
  856. else{
  857. document.getElementById(this.id+"Text").style.display="none";
  858. }
  859. });
  860. });
  861. document.getElementById("save").onclick = function() {
  862. if(formCheck())
  863. {
  864. window.location="#loadinghref";
  865. document.getElementById("loading").style.display="block";
  866. // 發送 Ajax 查詢請求並處理
  867. var request = new XMLHttpRequest();
  868. request.open("POST", "set_charging_action.php");
  869. // POST 參數須使用 send() 發送
  870. var data = "MaxChargingEnergy=" + document.getElementById("MaxChargingEnergy").value +
  871. "&MaxChargingPower=" + document.getElementById("MaxChargingPower").value +
  872. "&MaxChargingCurrent=" + document.getElementById("MaxChargingCurrent").value+
  873. "&AcMaxChargingCurrent=" + document.getElementById("AcMaxChargingCurrent").value+
  874. "&MaxChargingDuration=" + document.getElementById("MaxChargingDuration").value+
  875. "&LocalWhiteCard0=" + document.getElementById("LocalWhiteCard0").value+
  876. "&LocalWhiteCard1=" + document.getElementById("LocalWhiteCard1").value+
  877. "&LocalWhiteCard2=" + document.getElementById("LocalWhiteCard2").value+
  878. "&LocalWhiteCard3=" + document.getElementById("LocalWhiteCard3").value+
  879. "&LocalWhiteCard4=" + document.getElementById("LocalWhiteCard4").value+
  880. "&LocalWhiteCard5=" + document.getElementById("LocalWhiteCard5").value+
  881. "&LocalWhiteCard6=" + document.getElementById("LocalWhiteCard6").value+
  882. "&LocalWhiteCard7=" + document.getElementById("LocalWhiteCard7").value+
  883. "&LocalWhiteCard8=" + document.getElementById("LocalWhiteCard8").value+
  884. "&LocalWhiteCard9=" + document.getElementById("LocalWhiteCard9").value+
  885. "&isBilling=" + (document.getElementById("isBilling").checked?1:0)+
  886. "&Currency=" + document.getElementById("Currency").value+
  887. "&Fee0=" + document.getElementById("Fee0").value+
  888. "&Fee1=" + document.getElementById("Fee1").value+
  889. "&Fee2=" + document.getElementById("Fee2").value+
  890. "&Fee3=" + document.getElementById("Fee3").value+
  891. "&Fee4=" + document.getElementById("Fee4").value+
  892. "&Fee5=" + document.getElementById("Fee5").value+
  893. "&Fee6=" + document.getElementById("Fee6").value+
  894. "&Fee7=" + document.getElementById("Fee7").value+
  895. "&Fee8=" + document.getElementById("Fee8").value+
  896. "&Fee9=" + document.getElementById("Fee9").value+
  897. "&Fee10=" + document.getElementById("Fee10").value+
  898. "&Fee11=" + document.getElementById("Fee11").value+
  899. "&Fee12=" + document.getElementById("Fee12").value+
  900. "&Fee13=" + document.getElementById("Fee13").value+
  901. "&Fee14=" + document.getElementById("Fee14").value+
  902. "&Fee15=" + document.getElementById("Fee15").value+
  903. "&Fee16=" + document.getElementById("Fee16").value+
  904. "&Fee17=" + document.getElementById("Fee17").value+
  905. "&Fee18=" + document.getElementById("Fee18").value+
  906. "&Fee19=" + document.getElementById("Fee19").value+
  907. "&Fee20=" + document.getElementById("Fee20").value+
  908. "&Fee21=" + document.getElementById("Fee21").value+
  909. "&Fee22=" + document.getElementById("Fee22").value+
  910. "&Fee23=" + document.getElementById("Fee23").value;
  911. // POST 請求必須設置表頭在 open() 下面,send() 上面
  912. request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  913. request.send(data);
  914. request.onreadystatechange = function() {
  915. // 伺服器請求完成
  916. if (request.readyState == 4) {
  917. document.getElementById("loading").style.display="none";
  918. // 伺服器回應成功
  919. if (request.status == 200 && JSON.parse(request.responseText).result=="Success") {
  920. alert("<?php echo $lang->showWord("done")?>");
  921. location.href="set_charging.php";
  922. } else {
  923. alert(JSON.parse(request.responseText).message);
  924. }
  925. request = null;
  926. }
  927. }
  928. }
  929. }
  930. function formCheck()
  931. {
  932. var LocalWhiteCard0 = document.getElementById("LocalWhiteCard0").value;
  933. var LocalWhiteCard1 = document.getElementById("LocalWhiteCard1").value;
  934. var LocalWhiteCard2 = document.getElementById("LocalWhiteCard2").value;
  935. var LocalWhiteCard3 = document.getElementById("LocalWhiteCard3").value;
  936. var LocalWhiteCard4 = document.getElementById("LocalWhiteCard4").value;
  937. var LocalWhiteCard5 = document.getElementById("LocalWhiteCard5").value;
  938. var LocalWhiteCard6 = document.getElementById("LocalWhiteCard6").value;
  939. var LocalWhiteCard7 = document.getElementById("LocalWhiteCard7").value;
  940. var LocalWhiteCard8 = document.getElementById("LocalWhiteCard8").value;
  941. var LocalWhiteCard9 = document.getElementById("LocalWhiteCard9").value;
  942. var RatingCurrent = document.getElementById("RatingCurrent").value;
  943. var RatingPower = document.getElementById("RatingPower").value;
  944. var MaxChargingEnergy = document.getElementById("MaxChargingEnergy").value;
  945. var MaxChargingPower = document.getElementById("MaxChargingPower").value;
  946. var MaxChargingCurrent = document.getElementById("MaxChargingCurrent").value;
  947. var AcMaxChargingCurrent = document.getElementById("AcMaxChargingCurrent").value;
  948. var MaxChargingDuration = document.getElementById("MaxChargingDuration").value;
  949. if(LocalWhiteCard0 != ""){
  950. if(LocalWhiteCard0.length>32){
  951. alert("Local White Card0 must be less than 32 bytes!");
  952. document.getElementById("LocalWhiteCard0").focus();
  953. return false;
  954. }
  955. }
  956. if(LocalWhiteCard1 != ""){
  957. if(LocalWhiteCard1.length>32){
  958. alert("Local White Card1 must be less than 32 bytes!");
  959. document.getElementById("LocalWhiteCard1").focus();
  960. return false;
  961. }
  962. }
  963. if(LocalWhiteCard2 != ""){
  964. if(LocalWhiteCard2.length>32){
  965. alert("Local White Card2 must be less than 32 bytes!");
  966. document.getElementById("LocalWhiteCard2").focus();
  967. return false;
  968. }
  969. }
  970. if(LocalWhiteCard3 != ""){
  971. if(LocalWhiteCard3.length>32){
  972. alert("Local White Card3 must be less than 32 bytes!");
  973. document.getElementById("LocalWhiteCard3").focus();
  974. return false;
  975. }
  976. }
  977. if(LocalWhiteCard4 != ""){
  978. if(LocalWhiteCard4.length>32){
  979. alert("Local White Card4 must be less than 32 bytes!");
  980. document.getElementById("LocalWhiteCard4").focus();
  981. return false;
  982. }
  983. }
  984. if(LocalWhiteCard5 != ""){
  985. if(LocalWhiteCard5.length>32){
  986. alert("Local White Card5 must be less than 32 bytes!");
  987. document.getElementById("LocalWhiteCard5").focus();
  988. return false;
  989. }
  990. }
  991. if(LocalWhiteCard6 != ""){
  992. if(LocalWhiteCard6.length>32){
  993. alert("Local White Card6 must be less than 32 bytes!");
  994. document.getElementById("LocalWhiteCard6").focus();
  995. return false;
  996. }
  997. }
  998. if(LocalWhiteCard7 != ""){
  999. if(LocalWhiteCard7.length>32){
  1000. alert("Local White Card7 must be less than 32 bytes!");
  1001. document.getElementById("LocalWhiteCard7").focus();
  1002. return false;
  1003. }
  1004. }
  1005. if(LocalWhiteCard8 != ""){
  1006. if(LocalWhiteCard8.length>32){
  1007. alert("Local White Card8 must be less than 32 bytes!");
  1008. document.getElementById("LocalWhiteCard8").focus();
  1009. return false;
  1010. }
  1011. }
  1012. if(LocalWhiteCard9 != ""){
  1013. if(LocalWhiteCard9.length>32){
  1014. alert("Local White Card9 must be less than 32 bytes!");
  1015. document.getElementById("LocalWhiteCard9").focus();
  1016. return false;
  1017. }
  1018. }
  1019. if(MaxChargingEnergy =="")
  1020. {
  1021. alert("Fill Max Charging Energy !");
  1022. document.getElementById("MaxChargingEnergy").focus();
  1023. return false;
  1024. }
  1025. if(MaxChargingEnergy >65535)
  1026. {
  1027. alert("Max Charging Energy must <= 65535!");
  1028. document.getElementById("MaxChargingEnergy").focus();
  1029. return false;
  1030. }
  1031. if(MaxChargingEnergy < 0)
  1032. {
  1033. alert("Max Charging Energy must >= 0!");
  1034. document.getElementById("MaxChargingEnergy").focus();
  1035. return false;
  1036. }
  1037. if(MaxChargingPower =="")
  1038. {
  1039. alert("Fill Max Charging Power !");
  1040. document.getElementById("MaxChargingPower").focus();
  1041. return false;
  1042. }
  1043. if(RatingPower!="" && RatingPower!=0){
  1044. if(parseFloat(MaxChargingPower) > parseFloat(RatingPower))
  1045. {
  1046. alert("Max Charging Power must be less than RatingPower("+RatingPower+")!");
  1047. document.getElementById("MaxChargingPower").focus();
  1048. return false;
  1049. }
  1050. }
  1051. else{
  1052. if(MaxChargingPower >65535)
  1053. {
  1054. alert("Max Charging Power must <= 65535!");
  1055. document.getElementById("MaxChargingPower").focus();
  1056. return false;
  1057. }
  1058. }
  1059. if(MaxChargingCurrent =="")
  1060. {
  1061. alert("Fill Max Charging Current !");
  1062. document.getElementById("MaxChargingCurrent").focus();
  1063. return false;
  1064. }
  1065. if(RatingCurrent!="" && RatingCurrent!=0){
  1066. if(parseFloat(MaxChargingCurrent) > parseFloat(RatingCurrent))
  1067. {
  1068. alert("Max Charging Current must be less than RatingCurrent("+RatingCurrent+")!");
  1069. document.getElementById("MaxChargingCurrent").focus();
  1070. return false;
  1071. }
  1072. }
  1073. else{
  1074. if(MaxChargingCurrent >65535)
  1075. {
  1076. alert("Max Charging Current must <= 65535!");
  1077. document.getElementById("MaxChargingCurrent").focus();
  1078. return false;
  1079. }
  1080. }
  1081. if(document.getElementById("ModelName").value.substr(8,1)!= "0" && AcMaxChargingCurrent =="")
  1082. {
  1083. alert("Fill AC Max Charging Current !");
  1084. document.getElementById("AcMaxChargingCurrent").focus();
  1085. return false;
  1086. }
  1087. if(AcRatingCurrent!="" && AcRatingCurrent!=0){
  1088. if(parseFloat(AcMaxChargingCurrent) > parseFloat(AcRatingCurrent))
  1089. {
  1090. alert("Ac Max Charging Current must be less than Ac Rating Current("+AcRatingCurrent+")!");
  1091. document.getElementById("AcMaxChargingCurrent").focus();
  1092. return false;
  1093. }
  1094. }
  1095. else{
  1096. if(AcMaxChargingCurrent >65535)
  1097. {
  1098. alert("Ac Max Charging Current must <= 65535!");
  1099. document.getElementById("AcMaxChargingCurrent").focus();
  1100. return false;
  1101. }
  1102. if(AcMaxChargingCurrent < 0)
  1103. {
  1104. alert("Ac Max Charging Current must >= 0!");
  1105. document.getElementById("AcMaxChargingCurrent").focus();
  1106. return false;
  1107. }
  1108. }
  1109. if(MaxChargingCurrent =="")
  1110. {
  1111. alert("Fill Max Charging Current !");
  1112. document.getElementById("MaxChargingCurrent").focus();
  1113. return false;
  1114. }
  1115. if(MaxChargingCurrent < 0)
  1116. {
  1117. alert("MaxChargingCurrent must >= 0!");
  1118. document.getElementById("MaxChargingCurrent").focus();
  1119. return false;
  1120. }
  1121. if(MaxChargingDuration >65535)
  1122. {
  1123. alert("MaxChargingDuration must <= 65535!");
  1124. document.getElementById("MaxChargingDuration").focus();
  1125. return false;
  1126. }
  1127. if(MaxChargingDuration =="")
  1128. {
  1129. alert("Fill Max Charging Duration !");
  1130. document.getElementById("MaxChargingDuration").focus();
  1131. return false;
  1132. }
  1133. if(MaxChargingDuration < 0)
  1134. {
  1135. alert("MaxChargingDuration must >= 0!");
  1136. document.getElementById("MaxChargingDuration").focus();
  1137. return false;
  1138. }
  1139. return true;
  1140. }
  1141. function isBilling_clicked(){
  1142. if(document.getElementById("isBilling").checked){
  1143. document.getElementById("CurrencyDiv").style.display="block";
  1144. document.getElementById("FeeDiv").style.display="block";
  1145. }
  1146. else{
  1147. document.getElementById("CurrencyDiv").style.display="none";
  1148. document.getElementById("FeeDiv").style.display="none";
  1149. }
  1150. }
  1151. function isNumberKey(evt)
  1152. {
  1153. var charCode = (evt.which) ? evt.which : event.keyCode
  1154. if (charCode > 31 && (charCode < 48 || charCode > 57) && (charCode != 46))
  1155. return false;
  1156. return true;
  1157. }
  1158. </script>
  1159. </html>