set_charging.php 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127
  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>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" onchange="MaxValue_changed(document.getElementById('MaxChargingEnergy').id,document.getElementById('MaxChargingEnergyText').id);">
  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>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" onchange="MaxValue_changed(document.getElementById('MaxChargingPower').id,document.getElementById('MaxChargingPowerText').id);">
  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" onchange="MaxValue_changed(document.getElementById('MaxChargingCurrent').id,document.getElementById('MaxChargingCurrentText').id);">
  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>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" onchange="MaxValue_changed(document.getElementById('MaxChargingDuration').id,document.getElementById('MaxChargingDurationText').id);">
  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" style="display:<?php echo $am001;?>">
  306. <label>AC Phase Loss Policy</label>
  307. <select class="form-control" id="PhaseLossPolicy" name="PhaseLossPolicy">
  308. <option value="0" <?php echo $obj['PhaseLossPolicy']=="0"?"selected":""?>>de-rating</option>
  309. <option value="1" <?php echo $obj['PhaseLossPolicy']=="1"?"selected":""?>>stop charging</option>
  310. </select>
  311. </div>
  312. <div class="form-group" id="AcMaxChargingCurrentDiv">
  313. <label>AC Max Charging Current</label>
  314. <small class="form-text text-muted-red">amp</small>
  315. <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" onchange="MaxValue_changed(document.getElementById('AcMaxChargingCurrent').id,document.getElementById('AcMaxChargingCurrentText').id);">
  316. <input type="hidden" name="AcRatingCurrent" id="AcRatingCurrent" value="<?php echo $AcRatingCurrent;?>">
  317. <small class="form-text text-muted-red"><label id="AcMaxChargingCurrentText" style="display:none;">'0' means unlimit</label></small>
  318. </div>
  319. <div class="form-group" style="display:<?php echo $am111;?>">
  320. <label>Local White Card0</label>
  321. <input type="text" name="LocalWhiteCard0" id="LocalWhiteCard0" class="form-control" value="<?php echo $obj['LocalWhiteCard'][0];?>">
  322. </div>
  323. <div class="form-group" style="display:<?php echo $am111;?>">
  324. <label>Local White Card1</label>
  325. <input type="text" name="LocalWhiteCard1" id="LocalWhiteCard1" class="form-control" value="<?php echo $obj['LocalWhiteCard'][1];?>">
  326. </div>
  327. <div class="form-group" style="display:<?php echo $am111;?>">
  328. <label>Local White Card2</label>
  329. <input type="text" name="LocalWhiteCard2" id="LocalWhiteCard2" class="form-control" value="<?php echo $obj['LocalWhiteCard'][2];?>">
  330. </div>
  331. <div class="form-group" style="display:<?php echo $am111;?>">
  332. <label>Local White Card3</label>
  333. <input type="text" name="LocalWhiteCard3" id="LocalWhiteCard3" class="form-control" value="<?php echo $obj['LocalWhiteCard'][3];?>">
  334. </div>
  335. <div class="form-group" style="display:<?php echo $am111;?>">
  336. <label>Local White Card4</label>
  337. <input type="text" name="LocalWhiteCard4" id="LocalWhiteCard4" class="form-control" value="<?php echo $obj['LocalWhiteCard'][4];?>">
  338. </div>
  339. <div class="form-group" style="display:<?php echo $am111;?>">
  340. <label>Local White Card5</label>
  341. <input type="text" name="LocalWhiteCard5" id="LocalWhiteCard5" class="form-control" value="<?php echo $obj['LocalWhiteCard'][5];?>">
  342. </div>
  343. <div class="form-group" style="display:<?php echo $am111;?>">
  344. <label>Local White Card6</label>
  345. <input type="text" name="LocalWhiteCard6" id="LocalWhiteCard6" class="form-control" value="<?php echo $obj['LocalWhiteCard'][6];?>">
  346. </div>
  347. <div class="form-group" style="display:<?php echo $am111;?>">
  348. <label>Local White Card7</label>
  349. <input type="text" name="LocalWhiteCard7" id="LocalWhiteCard7" class="form-control" value="<?php echo $obj['LocalWhiteCard'][7];?>">
  350. </div>
  351. <div class="form-group" style="display:<?php echo $am111;?>">
  352. <label>Local White Card8</label>
  353. <input type="text" name="LocalWhiteCard8" id="LocalWhiteCard8" class="form-control" value="<?php echo $obj['LocalWhiteCard'][8];?>">
  354. </div>
  355. <div class="form-group" style="display:<?php echo $am111;?>">
  356. <label>Local White Card9</label>
  357. <input type="text" name="LocalWhiteCard9" id="LocalWhiteCard9" class="form-control" value="<?php echo $obj['LocalWhiteCard'][9];?>">
  358. </div>
  359. <div class="form-group" id="isBillingDiv">
  360. <label>
  361. <input type="checkbox" id="isBilling" name="isBilling" <?php echo $obj['isBilling']==1?"checked":"";?> onclick="isBilling_clicked()">
  362. Billing</label>
  363. </div>
  364. <div class="form-group" id="CurrencyDiv">
  365. <label>Currency</label>
  366. <select class="form-control" id="Currency" name="Currency">
  367. <option value="0" <?php echo $obj['Currency']=="0"?"selected":""?>>AED - Emirati Dirham</option>
  368. <option value="1" <?php echo $obj['Currency']=="1"?"selected":""?>>ARS - Argentine Peso</option>
  369. <option value="2" <?php echo $obj['Currency']=="2"?"selected":""?>>AUD - Australian Dollar</option>
  370. <option value="3" <?php echo $obj['Currency']=="3"?"selected":""?>>BGN - Bulgarian Lev</option>
  371. <option value="4" <?php echo $obj['Currency']=="4"?"selected":""?>>BHD - Bahraini Dinar</option>
  372. <option value="5" <?php echo $obj['Currency']=="5"?"selected":""?>>BND - Bruneian Dollar</option>
  373. <option value="6" <?php echo $obj['Currency']=="6"?"selected":""?>>BRL - Brazilian Real</option>
  374. <option value="7" <?php echo $obj['Currency']=="7"?"selected":""?>>BWP - Botswana Pula</option>
  375. <option value="8" <?php echo $obj['Currency']=="8"?"selected":""?>>CAD - Canadian Dollar</option>
  376. <option value="9" <?php echo $obj['Currency']=="9"?"selected":""?>>CHF - Swiss Franc</option>
  377. <option value="10" <?php echo $obj['Currency']=="10"?"selected":""?>>CLP - Chilean Peso</option>
  378. <option value="11" <?php echo $obj['Currency']=="11"?"selected":""?>>CNY - Chinese Yuan Renminbi</option>
  379. <option value="12" <?php echo $obj['Currency']=="12"?"selected":""?>>COP - Colombian Peso</option>
  380. <option value="13" <?php echo $obj['Currency']=="13"?"selected":""?>>CZK - Czech Koruna</option>
  381. <option value="14" <?php echo $obj['Currency']=="14"?"selected":""?>>DKK - Danish Krone</option>
  382. <option value="15" <?php echo $obj['Currency']=="15"?"selected":""?>>EUR - Euro</option>
  383. <option value="16" <?php echo $obj['Currency']=="16"?"selected":""?>>GBP - British Pound</option>
  384. <option value="17" <?php echo $obj['Currency']=="17"?"selected":""?>>HKD - Hong Kong Dollar</option>
  385. <option value="18" <?php echo $obj['Currency']=="18"?"selected":""?>>HRK - Croatian Kuna</option>
  386. <option value="19" <?php echo $obj['Currency']=="19"?"selected":""?>>HUF - Hungarian Forint</option>
  387. <option value="20" <?php echo $obj['Currency']=="20"?"selected":""?>>IDR - Indonesian Rupiah</option>
  388. <option value="21" <?php echo $obj['Currency']=="21"?"selected":""?>>ILS - Israeli Shekel</option>
  389. <option value="22" <?php echo $obj['Currency']=="22"?"selected":""?>>INR - Indian Rupee</option>
  390. <option value="23" <?php echo $obj['Currency']=="23"?"selected":""?>>IRR - Iranian Rial</option>
  391. <option value="24" <?php echo $obj['Currency']=="24"?"selected":""?>>ISK - Icelandic Krona</option>
  392. <option value="25" <?php echo $obj['Currency']=="25"?"selected":""?>>JPY - Japanese Yen</option>
  393. <option value="26" <?php echo $obj['Currency']=="26"?"selected":""?>>KRW - South Korean Won</option>
  394. <option value="27" <?php echo $obj['Currency']=="27"?"selected":""?>>KWD - Kuwaiti Dinar</option>
  395. <option value="28" <?php echo $obj['Currency']=="28"?"selected":""?>>KZT - Kazakhstani Tenge</option>
  396. <option value="29" <?php echo $obj['Currency']=="29"?"selected":""?>>LKR - Sri Lankan Rupee</option>
  397. <option value="30" <?php echo $obj['Currency']=="30"?"selected":""?>>LYD - Libyan Dinar</option>
  398. <option value="31" <?php echo $obj['Currency']=="31"?"selected":""?>>MUR - Mauritian Rupee</option>
  399. <option value="32" <?php echo $obj['Currency']=="32"?"selected":""?>>MXN - Mexican Peso</option>
  400. <option value="33" <?php echo $obj['Currency']=="33"?"selected":""?>>MYR - Malaysian Ringgit</option>
  401. <option value="34" <?php echo $obj['Currency']=="34"?"selected":""?>>NOK - Norwegian Krone</option>
  402. <option value="35" <?php echo $obj['Currency']=="35"?"selected":""?>>NPR - Nepalese Rupee</option>
  403. <option value="36" <?php echo $obj['Currency']=="36"?"selected":""?>>NZD - New Zealand Dollar</option>
  404. <option value="37" <?php echo $obj['Currency']=="37"?"selected":""?>>OMR - Omani Rial</option>
  405. <option value="38" <?php echo $obj['Currency']=="38"?"selected":""?>>PHP - Philippine Peso</option>
  406. <option value="39" <?php echo $obj['Currency']=="39"?"selected":""?>>PKR - Pakistani Rupee</option>
  407. <option value="40" <?php echo $obj['Currency']=="40"?"selected":""?>>PLN - Polish Zloty</option>
  408. <option value="41" <?php echo $obj['Currency']=="41"?"selected":""?>>QAR - Qatari Riyal</option>
  409. <option value="42" <?php echo $obj['Currency']=="42"?"selected":""?>>RON - Romanian New Leu</option>
  410. <option value="43" <?php echo $obj['Currency']=="43"?"selected":""?>>RUB - Russian Ruble</option>
  411. <option value="44" <?php echo $obj['Currency']=="44"?"selected":""?>>SAR - Saudi Arabian Riyal</option>
  412. <option value="45" <?php echo $obj['Currency']=="45"?"selected":""?>>SEK - Swedish Krona</option>
  413. <option value="46" <?php echo $obj['Currency']=="46"?"selected":""?>>SGD - Singapore Dollar</option>
  414. <option value="47" <?php echo $obj['Currency']=="47"?"selected":""?>>THB - Thai Baht</option>
  415. <option value="48" <?php echo $obj['Currency']=="48"?"selected":""?>>TRY - Turkish Lira</option>
  416. <option value="49" <?php echo $obj['Currency']=="49"?"selected":""?>>TTD - Trinidadian Dollar</option>
  417. <option value="50" <?php echo $obj['Currency']=="50"?"selected":""?>>TWD - Taiwan New Dollar</option>
  418. <option value="51" <?php echo $obj['Currency']=="51"?"selected":""?>>USD - US Dollar</option>
  419. <option value="52" <?php echo $obj['Currency']=="52"?"selected":""?>>VEF - Venezuelan Bolivar</option>
  420. <option value="53" <?php echo $obj['Currency']=="53"?"selected":""?>>ZAR - South African Rand</option>
  421. </select>
  422. </div>
  423. <div class="form-group" id="FeeDiv">
  424. <div class="form-group">
  425. <label>Fee 00:00~00:59</label>
  426. <input type="text" name="Fee0" id="Fee0" class="form-control" value="<?php echo round($obj['Fee'][0],2);?>">
  427. </div>
  428. <div class="form-group">
  429. <label>Fee 01:00~01:59</label>
  430. <input type="text" name="Fee0" id="Fee1" class="form-control" value="<?php echo round($obj['Fee'][1],2);?>">
  431. </div>
  432. <div class="form-group">
  433. <label>Fee 02:00~02:59</label>
  434. <input type="text" name="Fee2" id="Fee2" class="form-control" value="<?php echo round($obj['Fee'][2],2);?>">
  435. </div>
  436. <div class="form-group">
  437. <label>Fee 03:00~03:59</label>
  438. <input type="text" name="Fee3" id="Fee3" class="form-control" value="<?php echo round($obj['Fee'][3],2);?>">
  439. </div>
  440. <div class="form-group">
  441. <label>Fee 04:00~04:59</label>
  442. <input type="text" name="Fee4" id="Fee4" class="form-control" value="<?php echo round($obj['Fee'][4],2);?>">
  443. </div>
  444. <div class="form-group">
  445. <label>Fee 05:00~05:59</label>
  446. <input type="text" name="Fee5" id="Fee5" class="form-control" value="<?php echo round($obj['Fee'][5],2);?>">
  447. </div>
  448. <div class="form-group">
  449. <label>Fee 06:00~06:59</label>
  450. <input type="text" name="Fee6" id="Fee6" class="form-control" value="<?php echo round($obj['Fee'][6],2);?>">
  451. </div>
  452. <div class="form-group">
  453. <label>Fee 07:00~07:59</label>
  454. <input type="text" name="Fee7" id="Fee7" class="form-control" value="<?php echo round($obj['Fee'][7],2);?>">
  455. </div>
  456. <div class="form-group">
  457. <label>Fee 08:00~08:59</label>
  458. <input type="text" name="Fee8" id="Fee8" class="form-control" value="<?php echo round($obj['Fee'][8],2);?>">
  459. </div>
  460. <div class="form-group">
  461. <label>Fee 09:00~09:59</label>
  462. <input type="text" name="Fee9" id="Fee9" class="form-control" value="<?php echo round($obj['Fee'][9],2);?>">
  463. </div>
  464. <div class="form-group">
  465. <label>Fee 10:00~10:59</label>
  466. <input type="text" name="Fee10" id="Fee10" class="form-control" value="<?php echo round($obj['Fee'][10],2);?>">
  467. </div>
  468. <div class="form-group">
  469. <label>Fee 11:00~11:59</label>
  470. <input type="text" name="Fee11" id="Fee11" class="form-control" value="<?php echo round($obj['Fee'][11],2);?>">
  471. </div>
  472. <div class="form-group">
  473. <label>Fee 12:00~12:59</label>
  474. <input type="text" name="Fee12" id="Fee12" class="form-control" value="<?php echo round($obj['Fee'][12],2);?>">
  475. </div>
  476. <div class="form-group">
  477. <label>Fee 13:00~13:59</label>
  478. <input type="text" name="Fee13" id="Fee13" class="form-control" value="<?php echo round($obj['Fee'][13],2);?>">
  479. </div>
  480. <div class="form-group">
  481. <label>Fee 14:00~14:59</label>
  482. <input type="text" name="Fee14" id="Fee14" class="form-control" value="<?php echo round($obj['Fee'][14],2);?>">
  483. </div>
  484. <div class="form-group">
  485. <label>Fee 15:00~15:59</label>
  486. <input type="text" name="Fee15" id="Fee15" class="form-control" value="<?php echo round($obj['Fee'][15],2);?>">
  487. </div>
  488. <div class="form-group">
  489. <label>Fee 16:00~16:59</label>
  490. <input type="text" name="Fee16" id="Fee16" class="form-control" value="<?php echo round($obj['Fee'][16],2);?>">
  491. </div>
  492. <div class="form-group">
  493. <label>Fee 17:00~17:59</label>
  494. <input type="text" name="Fee17" id="Fee17" class="form-control" value="<?php echo round($obj['Fee'][17],2);?>">
  495. </div>
  496. <div class="form-group">
  497. <label>Fee 18:00~18:59</label>
  498. <input type="text" name="Fee18" id="Fee18" class="form-control" value="<?php echo round($obj['Fee'][18],2);?>">
  499. </div>
  500. <div class="form-group">
  501. <label>Fee 19:00~19:59</label>
  502. <input type="text" name="Fee19" id="Fee19" class="form-control" value="<?php echo round($obj['Fee'][19],2);?>">
  503. </div>
  504. <div class="form-group">
  505. <label>Fee 20:00~20:59</label>
  506. <input type="text" name="Fee20" id="Fee20" class="form-control" value="<?php echo round($obj['Fee'][20],2);?>">
  507. </div>
  508. <div class="form-group">
  509. <label>Fee 21:00~21:59</label>
  510. <input type="text" name="Fee21" id="Fee21" class="form-control" value="<?php echo round($obj['Fee'][21],2);?>">
  511. </div>
  512. <div class="form-group">
  513. <label>Fee 22:00~22:59</label>
  514. <input type="text" name="Fee22" id="Fee22" class="form-control" value="<?php echo round($obj['Fee'][22],2);?>">
  515. </div>
  516. <div class="form-group">
  517. <label>Fee 23:00~23:59</label>
  518. <input type="text" name="Fee23" id="Fee23" class="form-control" value="<?php echo round($obj['Fee'][23],2);?>">
  519. </div>
  520. </div>
  521. <?php /* <div class="form-group" style="display:<?php echo $am111;?>">
  522. <label>CcsAuthentication</label>
  523. <select class="form-control" id="CcsAuthentication" name="CcsAuthentication">
  524. <option value="0" <?php echo $obj['CcsAuthentication']==0?"selected":""?>>EIM</option>
  525. <option value="1" <?php echo $obj['CcsAuthentication']==1?"selected":""?>>EIM&PnC mixed</option>
  526. </select>
  527. </div>
  528. <div class="form-group" style="display:<?php echo $am111;?>">
  529. <label>AcCcsChargingModel</label>
  530. <select class="form-control" id="AcCcsChargingModel" name="AcCcsChargingModel">
  531. <option value="0" <?php echo $obj['AcCcsChargingModel']==0?"selected":""?>>BC (PWM) only</option>
  532. <option value="1" <?php echo $obj['AcCcsChargingModel']==0?"selected":""?>>BC&PLC mixed</option>
  533. </select>
  534. </div>*/?>
  535. </section>
  536. </article>
  537. <?php if($obj['ChargingInfo1']){ $idx++;?>
  538. <!--Charging Information-->
  539. <article class="envor-sorting-item css">
  540. <header><?php echo "connector".$idx." ".$lang->showWord("charging_information")."(".$connectorType1.")"; ?><i class="fa fa-plus"></i></header>
  541. <section>
  542. <div class="form-group" style="display:<?php echo $am111;?>">
  543. <label>User Id</label>
  544. <input type="text" readonly class="form-control" value="<?php echo $obj['ChargingInfo1']['StartUserId'];?>">
  545. <input type="hidden" name="UserId1" id="UserId1" value="<?php echo $obj['ChargingInfo1']['StartUserId'];?>">
  546. </div>
  547. <div class="form-group" style="display:<?php echo $am111;?>">
  548. <label>Start Date Time</label>
  549. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['StartDateTime'];?>">
  550. <input type="hidden" name="StartDateTime1" id="StartDateTime1" value="<?php echo $obj['ChargingInfo1']['StartDateTime'];?>">
  551. </div>
  552. <div class="form-group" style="display:<?php echo $am111;?>">
  553. <label>Stop Date Time</label>
  554. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['StopDateTime'];?>">
  555. <input type="hidden" name="StopDateTime1" id="StopDateTime1" value="<?php echo $obj['ChargingInfo1']['StopDateTime'];?>">
  556. </div>
  557. <?php /* <div class="form-group" style="display:<?php echo $am111;?>">
  558. <label>StartMethod</label>
  559. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['StartMethod'];?>">
  560. <input type="hidden" name="StartMethod1" id="StartMethod1" value="<?php echo $obj['ChargingInfo1']['StartMethod'];?>">
  561. </div>*/?>
  562. <div class="form-group" style="display:<?php echo $am111;?>">
  563. <label>System Status</label>
  564. <input type="text" readonly class="form-control" placeholder="<?php echo $SystemStatus1;?>">
  565. <input type="hidden" name="SystemStatus1" id="SystemStatus1" value="<?php echo $obj['ChargingInfo1']['SystemStatus'];?>">
  566. </div>
  567. <div class="form-group" style="display:<?php echo $am111;?>">
  568. <label>Connector Temperature</label>
  569. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['ConnectorTemp'];?> ℃">
  570. <input type="hidden" name="ConnectorTemp1" id="ConnectorTemp1" value="<?php echo $obj['ChargingInfo1']['ConnectorTemp'];?>">
  571. </div>
  572. <div class="form-group" style="display:<?php echo $am001;?>">
  573. <label>Present Charging Voltage</label>
  574. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargingVoltage'];?> volt">
  575. <input type="hidden" name="PresentChargingVoltage1" id="PresentChargingVoltage1" value="<?php echo $obj['ChargingInfo1']['PresentChargingVoltage'];?>">
  576. </div>
  577. <div class="form-group" style="display:<?php echo $am111;?>">
  578. <label>Present Charging Current</label>
  579. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargingCurrent'];?> amp">
  580. <input type="hidden" name="PresentChargingCurrent1" id="PresentChargingCurrent1" value="<?php echo $obj['ChargingInfo1']['PresentChargingCurrent'];?>">
  581. </div>
  582. <div class="form-group" style="display:<?php echo $am111;?>">
  583. <label>Present Charging Power</label>
  584. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargingPower'];?> kW">
  585. <input type="hidden" name="PresentChargingPower1" id="PresentChargingPower1" value="<?php echo $obj['ChargingInfo1']['PresentChargingPower'];?>">
  586. </div>
  587. <div class="form-group" style="display:<?php echo $am111;?>">
  588. <label>Present Charging Energy</label>
  589. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargedEnergy'];?> kWh">
  590. <input type="hidden" name="PresentChargedEnergy1" id="PresentChargedEnergy1" value="<?php echo $obj['ChargingInfo1']['PresentChargedEnergy'];?>">
  591. </div>
  592. <div class="form-group" style="display:<?php echo $am111;?>">
  593. <label>Present Charging Duration</label>
  594. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargedDuration'];?> seconds">
  595. <input type="hidden" name="PresentChargedDuration1" id="PresentChargedDuration1" value="<?php echo $obj['ChargingInfo1']['PresentChargedDuration'];?>">
  596. </div>
  597. <div class="form-group" style="display:<?php echo $am001;?>">
  598. <label>Remain Charging Time</label>
  599. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['RemainChargingDuration'];?> seconds">
  600. <input type="hidden" name="RemainChargingDuration1" id="RemainChargingDuration1" value="<?php echo $obj['ChargingInfo1']['RemainChargingDuration'];?>">
  601. </div>
  602. <div class="form-group" style="display:<?php echo $am001;?>">
  603. <label>EV Battery Max Voltage</label>
  604. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['EvBatteryMaxVoltage'];?> volt">
  605. <input type="hidden" name="EvBatteryMaxVoltage1" id="EvBatteryMaxVoltage1" value="<?php echo $obj['ChargingInfo1']['EvBatteryMaxVoltage'];?>">
  606. </div>
  607. <div class="form-group" style="display:<?php echo $am001;?>">
  608. <label>EV Battery Target Voltage</label>
  609. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['EvBatterytargetVoltage'];?> volt">
  610. <input type="hidden" name="EvBatterytargetVoltage1" id="EvBatterytargetVoltage1" value="<?php echo $obj['ChargingInfo1']['EvBatterytargetVoltage'];?>">
  611. </div>
  612. <div class="form-group" style="display:<?php echo $am001;?>">
  613. <label>EV Battery Soc</label>
  614. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['EvBatterySoc'];?>">
  615. <input type="hidden" name="EvBatterySoc1" id="EvBatterySoc1" value="<?php echo $obj['ChargingInfo1']['EvBatterySoc'];?>">
  616. </div>
  617. </section>
  618. </article>
  619. <?php }?>
  620. <?php if($obj['ChargingInfo2']){ $idx++;?>
  621. <!--Charging Information-->
  622. <article class="envor-sorting-item css">
  623. <header><?php echo "connector".$idx." ".$lang->showWord("charging_information")."(".$connectorType2.")"; ?><i class="fa fa-plus"></i></header>
  624. <section>
  625. <div class="form-group" style="display:<?php echo $am111;?>">
  626. <label>User Id</label>
  627. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['StartUserId'];?>">
  628. <input type="hidden" name="UserId2" id="UserId2" value="<?php echo $obj['ChargingInfo2']['StartUserId'];?>">
  629. </div>
  630. <div class="form-group" style="display:<?php echo $am111;?>">
  631. <label>Start Date Time</label>
  632. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['StartDateTime'];?>">
  633. <input type="hidden" name="StartDateTime2" id="StartDateTime2" value="<?php echo $obj['ChargingInfo2']['StartDateTime'];?>">
  634. </div>
  635. <div class="form-group" style="display:<?php echo $am111;?>">
  636. <label>Stop Date Time</label>
  637. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['StopDateTime'];?>">
  638. <input type="hidden" name="StopDateTime2" id="StopDateTime2" value="<?php echo $obj['ChargingInfo2']['StopDateTime'];?>">
  639. </div>
  640. <?php /* <div class="form-group" style="display:<?php echo $am111;?>">
  641. <label>StartMethod</label>
  642. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['StartMethod'];?>">
  643. <input type="hidden" name="StartMethod2" id="StartMethod2" value="<?php echo $obj['ChargingInfo2']['StartMethod'];?>">
  644. </div>*/?>
  645. <div class="form-group" style="display:<?php echo $am111;?>">
  646. <label>System Status</label>
  647. <input type="text" readonly class="form-control" placeholder="<?php echo $SystemStatus2;?>">
  648. <input type="hidden" name="SystemStatus2" id="SystemStatus2" value="<?php echo $obj['ChargingInfo2']['SystemStatus'];?>">
  649. </div>
  650. <div class="form-group" style="display:<?php echo $am111;?>">
  651. <label>Connector Temperature</label>
  652. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['ConnectorTemp'];?> ℃">
  653. <input type="hidden" name="ConnectorTemp2" id="ConnectorTemp2" value="<?php echo $obj['ChargingInfo2']['ConnectorTemp'];?>">
  654. </div>
  655. <div class="form-group" style="display:<?php echo $am001;?>">
  656. <label>Present Charging Voltage</label>
  657. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargingVoltage'];?> volt">
  658. <input type="hidden" name="PresentChargingVoltage2" id="PresentChargingVoltage2" value="<?php echo $obj['ChargingInfo2']['PresentChargingVoltage'];?>">
  659. </div>
  660. <div class="form-group" style="display:<?php echo $am111;?>">
  661. <label>Present Charging Current</label>
  662. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargingCurrent'];?> amp">
  663. <input type="hidden" name="PresentChargingCurrent2" id="PresentChargingCurrent2" value="<?php echo $obj['ChargingInfo2']['PresentChargingCurrent'];?>">
  664. </div>
  665. <div class="form-group" style="display:<?php echo $am111;?>">
  666. <label>Present Charging Power</label>
  667. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargingPower'];?> kW">
  668. <input type="hidden" name="PresentChargingPower2" id="PresentChargingPower2" value="<?php echo $obj['ChargingInfo2']['PresentChargingPower'];?>">
  669. </div>
  670. <div class="form-group" style="display:<?php echo $am111;?>">
  671. <label>Present Charging Energy</label>
  672. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargedEnergy'];?> kWh">
  673. <input type="hidden" name="PresentChargedEnergy2" id="PresentChargedEnergy2" value="<?php echo $obj['ChargingInfo2']['PresentChargedEnergy'];?>">
  674. </div>
  675. <div class="form-group" style="display:<?php echo $am111;?>">
  676. <label>Present Charging Duration</label>
  677. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargedDuration'];?> seconds">
  678. <input type="hidden" name="PresentChargedDuration2" id="PresentChargedDuration2" value="<?php echo $obj['ChargingInfo2']['PresentChargedDuration'];?>">
  679. </div>
  680. <div class="form-group" style="display:<?php echo $am001;?>">
  681. <label>Remain Charging Time</label>
  682. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['RemainChargingDuration'];?> seconds">
  683. <input type="hidden" name="RemainChargingDuration2" id="RemainChargingDuration2" value="<?php echo $obj['ChargingInfo2']['RemainChargingDuration'];?>">
  684. </div>
  685. <div class="form-group" style="display:<?php echo $am001;?>">
  686. <label>EV Battery Max Voltage</label>
  687. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['EvBatteryMaxVoltage'];?> volt">
  688. <input type="hidden" name="EvBatteryMaxVoltage2" id="EvBatteryMaxVoltage2" value="<?php echo $obj['ChargingInfo2']['EvBatteryMaxVoltage'];?>">
  689. </div>
  690. <div class="form-group" style="display:<?php echo $am001;?>">
  691. <label>EV Battery Target Voltage</label>
  692. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['EvBatterytargetVoltage'];?> volt">
  693. <input type="hidden" name="EvBatterytargetVoltage2" id="EvBatterytargetVoltage2" value="<?php echo $obj['ChargingInfo2']['EvBatterytargetVoltage'];?>">
  694. </div>
  695. <div class="form-group" style="display:<?php echo $am001;?>">
  696. <label>EV Battery Soc</label>
  697. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['EvBatterySoc'];?>">
  698. <input type="hidden" name="EvBatterySoc2" id="EvBatterySoc2" value="<?php echo $obj['ChargingInfo2']['EvBatterySoc'];?>">
  699. </div>
  700. </section>
  701. </article>
  702. <?php }?>
  703. <?php if($obj['ChargingInfo3']){ $idx++;?>
  704. <!--Charging Information-->
  705. <article class="envor-sorting-item css">
  706. <header><?php echo "connector".$idx." ".$lang->showWord("charging_information")."(".$connectorType3.")"; ?><i class="fa fa-plus"></i></header>
  707. <section>
  708. <div class="form-group" style="display:<?php echo $am111;?>">
  709. <label>User Id</label>
  710. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['StartUserId'];?>">
  711. <input type="hidden" name="UserId3" id="UserId3" value="<?php echo $obj['ChargingInfo3']['StartUserId'];?>">
  712. </div>
  713. <div class="form-group" style="display:<?php echo $am111;?>">
  714. <label>Start Date Time</label>
  715. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['StartDateTime'];?>">
  716. <input type="hidden" name="StartDateTime3" id="StartDateTime3" value="<?php echo $obj['ChargingInfo3']['StartDateTime'];?>">
  717. </div>
  718. <div class="form-group" style="display:<?php echo $am111;?>">
  719. <label>Stop Date Time</label>
  720. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['StopDateTime'];?>">
  721. <input type="hidden" name="StopDateTime3" id="StopDateTime3" value="<?php echo $obj['ChargingInfo3']['StopDateTime'];?>">
  722. </div>
  723. <?php /* <div class="form-group" style="display:<?php echo $am111;?>">
  724. <label>StartMethod</label>
  725. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['StartMethod'];?>">
  726. <input type="hidden" name="StartMethod3" id="StartMethod3" value="<?php echo $obj['ChargingInfo3']['StartMethod'];?>">
  727. </div>*/?>
  728. <div class="form-group" style="display:<?php echo $am111;?>">
  729. <label>System Status</label>
  730. <input type="text" readonly class="form-control" placeholder="<?php echo $SystemStatus3;?>">
  731. <input type="hidden" name="SystemStatus3" id="SystemStatus3" value="<?php echo $obj['ChargingInfo3']['SystemStatus'];?>">
  732. </div>
  733. <div class="form-group" style="display:<?php echo $am111;?>">
  734. <label>Connector Temperature</label>
  735. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['ConnectorTemp'];?> ℃">
  736. <input type="hidden" name="ConnectorTemp3" id="ConnectorTemp3" value="<?php echo $obj['ChargingInfo3']['ConnectorTemp'];?>">
  737. </div>
  738. <div class="form-group" style="display:<?php echo $am001;?>">
  739. <label>Present Charging Voltage</label>
  740. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargingVoltage'];?> volt">
  741. <input type="hidden" name="PresentChargingVoltage3" id="PresentChargingVoltage3" value="<?php echo $obj['ChargingInfo3']['PresentChargingVoltage'];?>">
  742. </div>
  743. <div class="form-group" style="display:<?php echo $am111;?>">
  744. <label>Present Charging Current</label>
  745. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargingCurrent'];?> amp">
  746. <input type="hidden" name="PresentChargingCurrent3" id="PresentChargingCurrent3" value="<?php echo $obj['ChargingInfo3']['PresentChargingCurrent'];?>">
  747. </div>
  748. <div class="form-group" style="display:<?php echo $am111;?>">
  749. <label>Present Charging Power</label>
  750. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargingPower'];?> kW">
  751. <input type="hidden" name="PresentChargingPower3" id="PresentChargingPower3" value="<?php echo $obj['ChargingInfo3']['PresentChargingPower'];?>">
  752. </div>
  753. <div class="form-group" style="display:<?php echo $am111;?>">
  754. <label>Present Charging Energy</label>
  755. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargedEnergy'];?> kWh">
  756. <input type="hidden" name="PresentChargedEnergy3" id="PresentChargedEnergy3" value="<?php echo $obj['ChargingInfo3']['PresentChargedEnergy'];?>">
  757. </div>
  758. <div class="form-group" style="display:<?php echo $am111;?>">
  759. <label>Present Charging Duration</label>
  760. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargedDuration'];?> seconds">
  761. <input type="hidden" name="PresentChargedDuration3" id="PresentChargedDuration3" value="<?php echo $obj['ChargingInfo3']['PresentChargedDuration'];?>">
  762. </div>
  763. <div class="form-group" style="display:<?php echo $am001;?>">
  764. <label>Remain Charging Time</label>
  765. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['RemainChargingDuration'];?> seconds">
  766. <input type="hidden" name="RemainChargingDuration3" id="RemainChargingDuration3" value="<?php echo $obj['ChargingInfo3']['RemainChargingDuration'];?>">
  767. </div>
  768. <div class="form-group" style="display:<?php echo $am001;?>">
  769. <label>EV Battery Max Voltage</label>
  770. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['EvBatteryMaxVoltage'];?> volt">
  771. <input type="hidden" name="EvBatteryMaxVoltage3" id="EvBatteryMaxVoltage3" value="<?php echo $obj['ChargingInfo3']['EvBatteryMaxVoltage'];?>">
  772. </div>
  773. <div class="form-group" style="display:<?php echo $am001;?>">
  774. <label>EV Battery Target Voltage</label>
  775. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['EvBatterytargetVoltage'];?> volt">
  776. <input type="hidden" name="EvBatterytargetVoltage3" id="EvBatterytargetVoltage3" value="<?php echo $obj['ChargingInfo3']['EvBatterytargetVoltage'];?>">
  777. </div>
  778. <div class="form-group" style="display:<?php echo $am001;?>">
  779. <label>EV Battery Soc</label>
  780. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['EvBatterySoc'];?>">
  781. <input type="hidden" name="EvBatterySoc3" id="EvBatterySoc3" value="<?php echo $obj['ChargingInfo3']['EvBatterySoc'];?>">
  782. </div>
  783. </section>
  784. </article>
  785. <?php }?>
  786. <article class="envor-sorting-item css">
  787. <div align="center"><button id="save"><?php echo $lang->showWord("set")?></button></div>
  788. </article>
  789. </div>
  790. </div>
  791. </div>
  792. </div>
  793. </div>
  794. </section>
  795. </div>
  796. <?php
  797. include 'foot.php';
  798. ?>
  799. <script type="text/JavaScript">
  800. $(document).ready(function(){
  801. if(document.getElementById("MaxChargingEnergy").value=="0" || document.getElementById("MaxChargingEnergy").value==""){
  802. document.getElementById("MaxChargingEnergyText").style.display="block";
  803. }
  804. if(document.getElementById("MaxChargingPower").value=="0" || document.getElementById("MaxChargingPower").value==""){
  805. document.getElementById("MaxChargingPowerText").style.display="block";
  806. }
  807. if(document.getElementById("MaxChargingCurrent").value=="0" || document.getElementById("MaxChargingCurrent").value==""){
  808. document.getElementById("MaxChargingCurrentText").style.display="block";
  809. }
  810. if(document.getElementById("MaxChargingDuration").value=="0" || document.getElementById("MaxChargingDuration").value==""){
  811. document.getElementById("MaxChargingDurationText").style.display="block";
  812. }
  813. if(document.getElementById("ModelName").value.substr(8,1) != "0"){
  814. document.getElementById("AcMaxChargingCurrentDiv").style.display="block";
  815. if(document.getElementById("AcMaxChargingCurrent").value=="0" || document.getElementById("AcMaxChargingCurrent").value==""){
  816. document.getElementById("AcMaxChargingCurrentText").style.display="block";
  817. }
  818. document.getElementById("MaxChargingCurrentLbl").innerHTML="DC MaxCharging Current";
  819. }
  820. else{
  821. document.getElementById("AcMaxChargingCurrentDiv").style.display="none";
  822. }
  823. isBilling_clicked();
  824. });
  825. document.getElementById("save").onclick = function() {
  826. if(formCheck())
  827. {
  828. window.location="#loadinghref";
  829. document.getElementById("loading").style.display="block";
  830. // 發送 Ajax 查詢請求並處理
  831. var request = new XMLHttpRequest();
  832. request.open("POST", "set_charging_action.php");
  833. // POST 參數須使用 send() 發送
  834. var data = "MaxChargingEnergy=" + document.getElementById("MaxChargingEnergy").value +
  835. "&MaxChargingPower=" + document.getElementById("MaxChargingPower").value +
  836. "&MaxChargingCurrent=" + document.getElementById("MaxChargingCurrent").value+
  837. "&AcMaxChargingCurrent=" + document.getElementById("AcMaxChargingCurrent").value+
  838. "&MaxChargingDuration=" + document.getElementById("MaxChargingDuration").value+
  839. "&PhaseLossPolicy=" + document.getElementById("PhaseLossPolicy").value+
  840. "&LocalWhiteCard0=" + document.getElementById("LocalWhiteCard0").value+
  841. "&LocalWhiteCard1=" + document.getElementById("LocalWhiteCard1").value+
  842. "&LocalWhiteCard2=" + document.getElementById("LocalWhiteCard2").value+
  843. "&LocalWhiteCard3=" + document.getElementById("LocalWhiteCard3").value+
  844. "&LocalWhiteCard4=" + document.getElementById("LocalWhiteCard4").value+
  845. "&LocalWhiteCard5=" + document.getElementById("LocalWhiteCard5").value+
  846. "&LocalWhiteCard6=" + document.getElementById("LocalWhiteCard6").value+
  847. "&LocalWhiteCard7=" + document.getElementById("LocalWhiteCard7").value+
  848. "&LocalWhiteCard8=" + document.getElementById("LocalWhiteCard8").value+
  849. "&LocalWhiteCard9=" + document.getElementById("LocalWhiteCard9").value+
  850. "&isBilling=" + (document.getElementById("isBilling").checked?1:0)+
  851. "&Currency=" + document.getElementById("Currency").value+
  852. "&Fee0=" + document.getElementById("Fee0").value+
  853. "&Fee1=" + document.getElementById("Fee1").value+
  854. "&Fee2=" + document.getElementById("Fee2").value+
  855. "&Fee3=" + document.getElementById("Fee3").value+
  856. "&Fee4=" + document.getElementById("Fee4").value+
  857. "&Fee5=" + document.getElementById("Fee5").value+
  858. "&Fee6=" + document.getElementById("Fee6").value+
  859. "&Fee7=" + document.getElementById("Fee7").value+
  860. "&Fee8=" + document.getElementById("Fee8").value+
  861. "&Fee9=" + document.getElementById("Fee9").value+
  862. "&Fee10=" + document.getElementById("Fee10").value+
  863. "&Fee11=" + document.getElementById("Fee11").value+
  864. "&Fee12=" + document.getElementById("Fee12").value+
  865. "&Fee13=" + document.getElementById("Fee13").value+
  866. "&Fee14=" + document.getElementById("Fee14").value+
  867. "&Fee15=" + document.getElementById("Fee15").value+
  868. "&Fee16=" + document.getElementById("Fee16").value+
  869. "&Fee17=" + document.getElementById("Fee17").value+
  870. "&Fee18=" + document.getElementById("Fee18").value+
  871. "&Fee19=" + document.getElementById("Fee19").value+
  872. "&Fee20=" + document.getElementById("Fee20").value+
  873. "&Fee21=" + document.getElementById("Fee21").value+
  874. "&Fee22=" + document.getElementById("Fee22").value+
  875. "&Fee23=" + document.getElementById("Fee23").value;
  876. // POST 請求必須設置表頭在 open() 下面,send() 上面
  877. request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  878. request.send(data);
  879. request.onreadystatechange = function() {
  880. // 伺服器請求完成
  881. if (request.readyState == 4) {
  882. document.getElementById("loading").style.display="none";
  883. // 伺服器回應成功
  884. if (request.status == 200 && JSON.parse(request.responseText).result=="Success") {
  885. alert("<?php echo $lang->showWord("done")?>");
  886. location.href="set_charging.php";
  887. } else {
  888. alert(JSON.parse(request.responseText).message);
  889. }
  890. request = null;
  891. }
  892. }
  893. }
  894. }
  895. function formCheck()
  896. {
  897. var LocalWhiteCard0 = document.getElementById("LocalWhiteCard0").value;
  898. var LocalWhiteCard1 = document.getElementById("LocalWhiteCard1").value;
  899. var LocalWhiteCard2 = document.getElementById("LocalWhiteCard2").value;
  900. var LocalWhiteCard3 = document.getElementById("LocalWhiteCard3").value;
  901. var LocalWhiteCard4 = document.getElementById("LocalWhiteCard4").value;
  902. var LocalWhiteCard5 = document.getElementById("LocalWhiteCard5").value;
  903. var LocalWhiteCard6 = document.getElementById("LocalWhiteCard6").value;
  904. var LocalWhiteCard7 = document.getElementById("LocalWhiteCard7").value;
  905. var LocalWhiteCard8 = document.getElementById("LocalWhiteCard8").value;
  906. var LocalWhiteCard9 = document.getElementById("LocalWhiteCard9").value;
  907. var RatingCurrent = document.getElementById("RatingCurrent").value;
  908. var RatingPower = document.getElementById("RatingPower").value;
  909. var MaxChargingEnergy = document.getElementById("MaxChargingEnergy").value;
  910. var MaxChargingPower = document.getElementById("MaxChargingPower").value;
  911. var MaxChargingCurrent = document.getElementById("MaxChargingCurrent").value;
  912. var AcMaxChargingCurrent = document.getElementById("AcMaxChargingCurrent").value;
  913. var MaxChargingDuration = document.getElementById("MaxChargingDuration").value;
  914. if(LocalWhiteCard0 != ""){
  915. if(LocalWhiteCard0.length>32){
  916. alert("Local White Card0 must be less than 32 bytes!");
  917. document.getElementById("LocalWhiteCard0").focus();
  918. return false;
  919. }
  920. }
  921. if(LocalWhiteCard1 != ""){
  922. if(LocalWhiteCard1.length>32){
  923. alert("Local White Card1 must be less than 32 bytes!");
  924. document.getElementById("LocalWhiteCard1").focus();
  925. return false;
  926. }
  927. }
  928. if(LocalWhiteCard2 != ""){
  929. if(LocalWhiteCard2.length>32){
  930. alert("Local White Card2 must be less than 32 bytes!");
  931. document.getElementById("LocalWhiteCard2").focus();
  932. return false;
  933. }
  934. }
  935. if(LocalWhiteCard3 != ""){
  936. if(LocalWhiteCard3.length>32){
  937. alert("Local White Card3 must be less than 32 bytes!");
  938. document.getElementById("LocalWhiteCard3").focus();
  939. return false;
  940. }
  941. }
  942. if(LocalWhiteCard4 != ""){
  943. if(LocalWhiteCard4.length>32){
  944. alert("Local White Card4 must be less than 32 bytes!");
  945. document.getElementById("LocalWhiteCard4").focus();
  946. return false;
  947. }
  948. }
  949. if(LocalWhiteCard5 != ""){
  950. if(LocalWhiteCard5.length>32){
  951. alert("Local White Card5 must be less than 32 bytes!");
  952. document.getElementById("LocalWhiteCard5").focus();
  953. return false;
  954. }
  955. }
  956. if(LocalWhiteCard6 != ""){
  957. if(LocalWhiteCard6.length>32){
  958. alert("Local White Card6 must be less than 32 bytes!");
  959. document.getElementById("LocalWhiteCard6").focus();
  960. return false;
  961. }
  962. }
  963. if(LocalWhiteCard7 != ""){
  964. if(LocalWhiteCard7.length>32){
  965. alert("Local White Card7 must be less than 32 bytes!");
  966. document.getElementById("LocalWhiteCard7").focus();
  967. return false;
  968. }
  969. }
  970. if(LocalWhiteCard8 != ""){
  971. if(LocalWhiteCard8.length>32){
  972. alert("Local White Card8 must be less than 32 bytes!");
  973. document.getElementById("LocalWhiteCard8").focus();
  974. return false;
  975. }
  976. }
  977. if(LocalWhiteCard9 != ""){
  978. if(LocalWhiteCard9.length>32){
  979. alert("Local White Card9 must be less than 32 bytes!");
  980. document.getElementById("LocalWhiteCard9").focus();
  981. return false;
  982. }
  983. }
  984. if(MaxChargingEnergy >65535)
  985. {
  986. alert("Max Charging Energy must <= 65535!");
  987. document.getElementById("MaxChargingEnergy").focus();
  988. return false;
  989. }
  990. if(MaxChargingEnergy < 0)
  991. {
  992. alert("Max Charging Energy must >= 0!");
  993. document.getElementById("MaxChargingEnergy").focus();
  994. return false;
  995. }
  996. if(AcMaxChargingCurrent >65535)
  997. {
  998. alert("Ac Max Charging Current must <= 65535!");
  999. document.getElementById("AcMaxChargingCurrent").focus();
  1000. return false;
  1001. }
  1002. if(AcMaxChargingCurrent < 0)
  1003. {
  1004. alert("Ac Max Charging Current must >= 0!");
  1005. document.getElementById("AcMaxChargingCurrent").focus();
  1006. return false;
  1007. }
  1008. if(RatingPower!="" && RatingPower!=0){
  1009. if(parseFloat(MaxChargingPower) > parseFloat(RatingPower))
  1010. {
  1011. alert("Max Charging Power must be less than RatingPower("+RatingPower+")!");
  1012. document.getElementById("MaxChargingPower").focus();
  1013. return false;
  1014. }
  1015. }
  1016. else{
  1017. if(MaxChargingPower >65535)
  1018. {
  1019. alert("Max Charging Power must <= 65535!");
  1020. document.getElementById("MaxChargingPower").focus();
  1021. return false;
  1022. }
  1023. }
  1024. if(MaxChargingPower < 0)
  1025. {
  1026. alert("Max Charging Power must >= 0!");
  1027. document.getElementById("MaxChargingPower").focus();
  1028. return false;
  1029. }
  1030. if(RatingCurrent!="" && RatingCurrent!=0){
  1031. if(parseFloat(MaxChargingCurrent) > parseFloat(RatingCurrent))
  1032. {
  1033. alert("Max Charging Current must be less than RatingCurrent("+RatingCurrent+")!");
  1034. document.getElementById("MaxChargingCurrent").focus();
  1035. return false;
  1036. }
  1037. }
  1038. else{
  1039. if(MaxChargingCurrent >65535)
  1040. {
  1041. alert("Max Charging Current must <= 65535!");
  1042. document.getElementById("MaxChargingCurrent").focus();
  1043. return false;
  1044. }
  1045. }
  1046. if(AcRatingCurrent!="" && AcRatingCurrent!=0){
  1047. if(parseFloat(AcMaxChargingCurrent) > parseFloat(AcRatingCurrent))
  1048. {
  1049. alert("Ac Max Charging Current must be less than Ac Rating Current("+AcRatingCurrent+")!");
  1050. document.getElementById("AcMaxChargingCurrent").focus();
  1051. return false;
  1052. }
  1053. }
  1054. else{
  1055. if(AcMaxChargingCurrent >65535)
  1056. {
  1057. alert("Ac Max Charging Current must <= 65535!");
  1058. document.getElementById("AcMaxChargingCurrent").focus();
  1059. return false;
  1060. }
  1061. }
  1062. if(MaxChargingCurrent < 0)
  1063. {
  1064. alert("MaxChargingCurrent must >= 0!");
  1065. document.getElementById("MaxChargingCurrent").focus();
  1066. return false;
  1067. }
  1068. if(MaxChargingDuration >65535)
  1069. {
  1070. alert("MaxChargingDuration must <= 65535!");
  1071. document.getElementById("MaxChargingDuration").focus();
  1072. return false;
  1073. }
  1074. if(MaxChargingDuration < 0)
  1075. {
  1076. alert("MaxChargingDuration must >= 0!");
  1077. document.getElementById("MaxChargingDuration").focus();
  1078. return false;
  1079. }
  1080. return true;
  1081. }
  1082. function MaxValue_changed(id,id2){
  1083. if(document.getElementById(id).value == "0" || document.getElementById(id).value == ""){
  1084. document.getElementById(id2).style.display="block";
  1085. }
  1086. else{
  1087. document.getElementById(id2).style.display="none";
  1088. }
  1089. }
  1090. function isBilling_clicked(){
  1091. if(document.getElementById("isBilling").checked){
  1092. document.getElementById("CurrencyDiv").style.display="block";
  1093. document.getElementById("FeeDiv").style.display="block";
  1094. }
  1095. else{
  1096. document.getElementById("CurrencyDiv").style.display="none";
  1097. document.getElementById("FeeDiv").style.display="none";
  1098. }
  1099. }
  1100. function isNumberKey(evt)
  1101. {
  1102. var charCode = (evt.which) ? evt.which : event.keyCode
  1103. if (charCode > 31 && (charCode < 48 || charCode > 57) && (charCode != 46))
  1104. return false;
  1105. return true;
  1106. }
  1107. </script>
  1108. </html>