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,8,1);
  13. $Connector3=substr($ModelName,9,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>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" id="AcMaxChargingCurrentDiv">
  300. <label>AC Max Charging Current</label>
  301. <small class="form-text text-muted-red">amp</small>
  302. <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);">
  303. <input type="hidden" name="AcRatingCurrent" id="AcRatingCurrent" value="<?php echo $AcRatingCurrent;?>">
  304. <small class="form-text text-muted-red"><label id="AcMaxChargingCurrentText" style="display:none;">'0' means unlimit</label></small>
  305. </div>
  306. <div class="form-group" style="display:<?php echo $am111;?>">
  307. <label>Max Charging Duration</label>
  308. <small class="form-text text-muted-red">minutes</small>
  309. <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);">
  310. <small class="form-text text-muted-red"><label id="MaxChargingDurationText" style="display:none;">'0' means unlimit</label></small>
  311. </div>
  312. <div class="form-group" style="display:<?php echo $am001;?>">
  313. <label>AC Phase Loss Policy</label>
  314. <select class="form-control" id="PhaseLossPolicy" name="PhaseLossPolicy">
  315. <option value="0" <?php echo $obj['PhaseLossPolicy']=="0"?"selected":""?>>de-rating</option>
  316. <option value="1" <?php echo $obj['PhaseLossPolicy']=="1"?"selected":""?>>stop charging</option>
  317. </select>
  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. <?php /* LCM UI 相關參數
  360. <div class="form-group" id="isBillingDiv">
  361. <label>
  362. <input type="checkbox" id="isBilling" name="isBilling" <?php echo $obj['isBilling']==1?"checked":"";?> onclick="isBilling_clicked()">
  363. Billing</label>
  364. </div>
  365. <div class="form-group" id="CurrencyDiv">
  366. <label>Currency</label>
  367. <select class="form-control" id="Currency" name="Currency">
  368. <option value="1" <?php echo $obj['Currency']=="1"?"selected":""?>>AED - Emirati Dirham</option>
  369. <option value="2" <?php echo $obj['Currency']=="2"?"selected":""?>>ARS - Argentine Peso</option>
  370. <option value="3" <?php echo $obj['Currency']=="3"?"selected":""?>>AUD - Australian Dollar</option>
  371. <option value="4" <?php echo $obj['Currency']=="4"?"selected":""?>>BGN - Bulgarian Lev</option>
  372. <option value="5" <?php echo $obj['Currency']=="5"?"selected":""?>>BHD - Bahraini Dinar</option>
  373. <option value="6" <?php echo $obj['Currency']=="6"?"selected":""?>>BND - Bruneian Dollar</option>
  374. <option value="7" <?php echo $obj['Currency']=="7"?"selected":""?>>BRL - Brazilian Real</option>
  375. <option value="8" <?php echo $obj['Currency']=="8"?"selected":""?>>BWP - Botswana Pula</option>
  376. <option value="9" <?php echo $obj['Currency']=="9"?"selected":""?>>CAD - Canadian Dollar</option>
  377. <option value="10" <?php echo $obj['Currency']=="10"?"selected":""?>>CHF - Swiss Franc</option>
  378. <option value="11" <?php echo $obj['Currency']=="11"?"selected":""?>>CLP - Chilean Peso</option>
  379. <option value="12" <?php echo $obj['Currency']=="12"?"selected":""?>>CNY - Chinese Yuan Renminbi</option>
  380. <option value="13" <?php echo $obj['Currency']=="13"?"selected":""?>>COP - Colombian Peso</option>
  381. <option value="14" <?php echo $obj['Currency']=="14"?"selected":""?>>CZK - Czech Koruna</option>
  382. <option value="15" <?php echo $obj['Currency']=="15"?"selected":""?>>DKK - Danish Krone</option>
  383. <option value="16" <?php echo $obj['Currency']=="16"?"selected":""?>>EUR - Euro</option>
  384. <option value="17" <?php echo $obj['Currency']=="17"?"selected":""?>>GBP - British Pound</option>
  385. <option value="18" <?php echo $obj['Currency']=="18"?"selected":""?>>HKD - Hong Kong Dollar</option>
  386. <option value="19" <?php echo $obj['Currency']=="19"?"selected":""?>>HRK - Croatian Kuna</option>
  387. <option value="20" <?php echo $obj['Currency']=="20"?"selected":""?>>HUF - Hungarian Forint</option>
  388. <option value="21" <?php echo $obj['Currency']=="21"?"selected":""?>>IDR - Indonesian Rupiah</option>
  389. <option value="22" <?php echo $obj['Currency']=="22"?"selected":""?>>ILS - Israeli Shekel</option>
  390. <option value="23" <?php echo $obj['Currency']=="23"?"selected":""?>>INR - Indian Rupee</option>
  391. <option value="24" <?php echo $obj['Currency']=="24"?"selected":""?>>IRR - Iranian Rial</option>
  392. <option value="25" <?php echo $obj['Currency']=="25"?"selected":""?>>ISK - Icelandic Krona</option>
  393. <option value="26" <?php echo $obj['Currency']=="26"?"selected":""?>>JPY - Japanese Yen</option>
  394. <option value="27" <?php echo $obj['Currency']=="27"?"selected":""?>>KRW - South Korean Won</option>
  395. <option value="28" <?php echo $obj['Currency']=="28"?"selected":""?>>KWD - Kuwaiti Dinar</option>
  396. <option value="29" <?php echo $obj['Currency']=="29"?"selected":""?>>KZT - Kazakhstani Tenge</option>
  397. <option value="30" <?php echo $obj['Currency']=="30"?"selected":""?>>LKR - Sri Lankan Rupee</option>
  398. <option value="31" <?php echo $obj['Currency']=="31"?"selected":""?>>LYD - Libyan Dinar</option>
  399. <option value="32" <?php echo $obj['Currency']=="32"?"selected":""?>>MUR - Mauritian Rupee</option>
  400. <option value="33" <?php echo $obj['Currency']=="33"?"selected":""?>>MXN - Mexican Peso</option>
  401. <option value="34" <?php echo $obj['Currency']=="34"?"selected":""?>>MYR - Malaysian Ringgit</option>
  402. <option value="35" <?php echo $obj['Currency']=="35"?"selected":""?>>NOK - Norwegian Krone</option>
  403. <option value="36" <?php echo $obj['Currency']=="36"?"selected":""?>>NPR - Nepalese Rupee</option>
  404. <option value="37" <?php echo $obj['Currency']=="37"?"selected":""?>>NZD - New Zealand Dollar</option>
  405. <option value="38" <?php echo $obj['Currency']=="38"?"selected":""?>>OMR - Omani Rial</option>
  406. <option value="39" <?php echo $obj['Currency']=="39"?"selected":""?>>PHP - Philippine Peso</option>
  407. <option value="40" <?php echo $obj['Currency']=="40"?"selected":""?>>PKR - Pakistani Rupee</option>
  408. <option value="41" <?php echo $obj['Currency']=="41"?"selected":""?>>PLN - Polish Zloty</option>
  409. <option value="42" <?php echo $obj['Currency']=="42"?"selected":""?>>QAR - Qatari Riyal</option>
  410. <option value="43" <?php echo $obj['Currency']=="43"?"selected":""?>>RON - Romanian New Leu</option>
  411. <option value="44" <?php echo $obj['Currency']=="44"?"selected":""?>>RUB - Russian Ruble</option>
  412. <option value="45" <?php echo $obj['Currency']=="45"?"selected":""?>>SAR - Saudi Arabian Riyal</option>
  413. <option value="46" <?php echo $obj['Currency']=="46"?"selected":""?>>SEK - Swedish Krona</option>
  414. <option value="47" <?php echo $obj['Currency']=="47"?"selected":""?>>SGD - Singapore Dollar</option>
  415. <option value="48" <?php echo $obj['Currency']=="48"?"selected":""?>>THB - Thai Baht</option>
  416. <option value="49" <?php echo $obj['Currency']=="49"?"selected":""?>>TRY - Turkish Lira</option>
  417. <option value="50" <?php echo $obj['Currency']=="50"?"selected":""?>>TTD - Trinidadian Dollar</option>
  418. <option value="51" <?php echo $obj['Currency']=="51"?"selected":""?>>TWD - Taiwan New Dollar</option>
  419. <option value="52" <?php echo $obj['Currency']=="52"?"selected":""?>>USD - US Dollar</option>
  420. <option value="53" <?php echo $obj['Currency']=="53"?"selected":""?>>VEF - Venezuelan Bolivar</option>
  421. <option value="54" <?php echo $obj['Currency']=="54"?"selected":""?>>ZAR - South African Rand</option>
  422. </select>
  423. </div>
  424. <div class="form-group" id="FeeDiv">
  425. <div class="form-group">
  426. <label>Fee 00:00~00:59</label>
  427. <input type="text" name="Fee0" id="Fee0" class="form-control" value="<?php echo round($obj['Fee'][0],2);?>">
  428. </div>
  429. <div class="form-group">
  430. <label>Fee 01:00~01:59</label>
  431. <input type="text" name="Fee0" id="Fee1" class="form-control" value="<?php echo round($obj['Fee'][1],2);?>">
  432. </div>
  433. <div class="form-group">
  434. <label>Fee 02:00~02:59</label>
  435. <input type="text" name="Fee2" id="Fee2" class="form-control" value="<?php echo round($obj['Fee'][2],2);?>">
  436. </div>
  437. <div class="form-group">
  438. <label>Fee 03:00~03:59</label>
  439. <input type="text" name="Fee3" id="Fee3" class="form-control" value="<?php echo round($obj['Fee'][3],2);?>">
  440. </div>
  441. <div class="form-group">
  442. <label>Fee 04:00~04:59</label>
  443. <input type="text" name="Fee4" id="Fee4" class="form-control" value="<?php echo round($obj['Fee'][4],2);?>">
  444. </div>
  445. <div class="form-group">
  446. <label>Fee 05:00~05:59</label>
  447. <input type="text" name="Fee5" id="Fee5" class="form-control" value="<?php echo round($obj['Fee'][5],2);?>">
  448. </div>
  449. <div class="form-group">
  450. <label>Fee 06:00~06:59</label>
  451. <input type="text" name="Fee6" id="Fee6" class="form-control" value="<?php echo round($obj['Fee'][6],2);?>">
  452. </div>
  453. <div class="form-group">
  454. <label>Fee 07:00~07:59</label>
  455. <input type="text" name="Fee7" id="Fee7" class="form-control" value="<?php echo round($obj['Fee'][7],2);?>">
  456. </div>
  457. <div class="form-group">
  458. <label>Fee 08:00~08:59</label>
  459. <input type="text" name="Fee8" id="Fee8" class="form-control" value="<?php echo round($obj['Fee'][8],2);?>">
  460. </div>
  461. <div class="form-group">
  462. <label>Fee 09:00~09:59</label>
  463. <input type="text" name="Fee9" id="Fee9" class="form-control" value="<?php echo round($obj['Fee'][9],2);?>">
  464. </div>
  465. <div class="form-group">
  466. <label>Fee 10:00~10:59</label>
  467. <input type="text" name="Fee10" id="Fee10" class="form-control" value="<?php echo round($obj['Fee'][10],2);?>">
  468. </div>
  469. <div class="form-group">
  470. <label>Fee 11:00~11:59</label>
  471. <input type="text" name="Fee11" id="Fee11" class="form-control" value="<?php echo round($obj['Fee'][11],2);?>">
  472. </div>
  473. <div class="form-group">
  474. <label>Fee 12:00~12:59</label>
  475. <input type="text" name="Fee12" id="Fee12" class="form-control" value="<?php echo round($obj['Fee'][12],2);?>">
  476. </div>
  477. <div class="form-group">
  478. <label>Fee 13:00~13:59</label>
  479. <input type="text" name="Fee13" id="Fee13" class="form-control" value="<?php echo round($obj['Fee'][13],2);?>">
  480. </div>
  481. <div class="form-group">
  482. <label>Fee 14:00~14:59</label>
  483. <input type="text" name="Fee14" id="Fee14" class="form-control" value="<?php echo round($obj['Fee'][14],2);?>">
  484. </div>
  485. <div class="form-group">
  486. <label>Fee 15:00~15:59</label>
  487. <input type="text" name="Fee15" id="Fee15" class="form-control" value="<?php echo round($obj['Fee'][15],2);?>">
  488. </div>
  489. <div class="form-group">
  490. <label>Fee 16:00~16:59</label>
  491. <input type="text" name="Fee16" id="Fee16" class="form-control" value="<?php echo round($obj['Fee'][16],2);?>">
  492. </div>
  493. <div class="form-group">
  494. <label>Fee 17:00~17:59</label>
  495. <input type="text" name="Fee17" id="Fee17" class="form-control" value="<?php echo round($obj['Fee'][17],2);?>">
  496. </div>
  497. <div class="form-group">
  498. <label>Fee 18:00~18:59</label>
  499. <input type="text" name="Fee18" id="Fee18" class="form-control" value="<?php echo round($obj['Fee'][18],2);?>">
  500. </div>
  501. <div class="form-group">
  502. <label>Fee 19:00~19:59</label>
  503. <input type="text" name="Fee19" id="Fee19" class="form-control" value="<?php echo round($obj['Fee'][19],2);?>">
  504. </div>
  505. <div class="form-group">
  506. <label>Fee 20:00~20:59</label>
  507. <input type="text" name="Fee20" id="Fee20" class="form-control" value="<?php echo round($obj['Fee'][20],2);?>">
  508. </div>
  509. <div class="form-group">
  510. <label>Fee 21:00~21:59</label>
  511. <input type="text" name="Fee21" id="Fee21" class="form-control" value="<?php echo round($obj['Fee'][21],2);?>">
  512. </div>
  513. <div class="form-group">
  514. <label>Fee 22:00~22:59</label>
  515. <input type="text" name="Fee22" id="Fee22" class="form-control" value="<?php echo round($obj['Fee'][22],2);?>">
  516. </div>
  517. <div class="form-group">
  518. <label>Fee 23:00~23:59</label>
  519. <input type="text" name="Fee23" id="Fee23" class="form-control" value="<?php echo round($obj['Fee'][23],2);?>">
  520. </div>
  521. </div>*/?>
  522. <?php /* <div class="form-group" style="display:<?php echo $am111;?>">
  523. <label>CcsAuthentication</label>
  524. <select class="form-control" id="CcsAuthentication" name="CcsAuthentication">
  525. <option value="0" <?php echo $obj['CcsAuthentication']==0?"selected":""?>>EIM</option>
  526. <option value="1" <?php echo $obj['CcsAuthentication']==1?"selected":""?>>EIM&PnC mixed</option>
  527. </select>
  528. </div>
  529. <div class="form-group" style="display:<?php echo $am111;?>">
  530. <label>AcCcsChargingModel</label>
  531. <select class="form-control" id="AcCcsChargingModel" name="AcCcsChargingModel">
  532. <option value="0" <?php echo $obj['AcCcsChargingModel']==0?"selected":""?>>BC (PWM) only</option>
  533. <option value="1" <?php echo $obj['AcCcsChargingModel']==0?"selected":""?>>BC&PLC mixed</option>
  534. </select>
  535. </div>*/?>
  536. </section>
  537. </article>
  538. <?php if($obj['ChargingInfo1']){ $idx++;?>
  539. <!--Charging Information-->
  540. <article class="envor-sorting-item css">
  541. <header><?php echo $connectorType1." ".$lang->showWord("charging_information")."(connector".$idx.")"; ?><i class="fa fa-plus"></i></header>
  542. <section>
  543. <div class="form-group" style="display:<?php echo $am111;?>">
  544. <label>User Id</label>
  545. <input type="text" readonly class="form-control" value="<?php echo $obj['ChargingInfo1']['StartUserId'];?>">
  546. <input type="hidden" name="UserId1" id="UserId1" value="<?php echo $obj['ChargingInfo1']['StartUserId'];?>">
  547. </div>
  548. <div class="form-group" style="display:<?php echo $am111;?>">
  549. <label>Start Date Time</label>
  550. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['StartDateTime'];?>">
  551. <input type="hidden" name="StartDateTime1" id="StartDateTime1" value="<?php echo $obj['ChargingInfo1']['StartDateTime'];?>">
  552. </div>
  553. <div class="form-group" style="display:<?php echo $am111;?>">
  554. <label>Stop Date Time</label>
  555. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['StopDateTime'];?>">
  556. <input type="hidden" name="StopDateTime1" id="StopDateTime1" value="<?php echo $obj['ChargingInfo1']['StopDateTime'];?>">
  557. </div>
  558. <?php /* <div class="form-group" style="display:<?php echo $am111;?>">
  559. <label>StartMethod</label>
  560. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['StartMethod'];?>">
  561. <input type="hidden" name="StartMethod1" id="StartMethod1" value="<?php echo $obj['ChargingInfo1']['StartMethod'];?>">
  562. </div>*/?>
  563. <div class="form-group" style="display:<?php echo $am111;?>">
  564. <label>System Status</label>
  565. <input type="text" readonly class="form-control" placeholder="<?php echo $SystemStatus1;?>">
  566. <input type="hidden" name="SystemStatus1" id="SystemStatus1" value="<?php echo $obj['ChargingInfo1']['SystemStatus'];?>">
  567. </div>
  568. <div class="form-group" style="display:<?php echo $am111;?>">
  569. <label>Connector Temperature</label>
  570. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['ConnectorTemp'];?> ℃">
  571. <input type="hidden" name="ConnectorTemp1" id="ConnectorTemp1" value="<?php echo $obj['ChargingInfo1']['ConnectorTemp'];?>">
  572. </div>
  573. <div class="form-group" style="display:<?php echo $am001;?>">
  574. <label>Present Charging Voltage</label>
  575. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargingVoltage'];?> volt">
  576. <input type="hidden" name="PresentChargingVoltage1" id="PresentChargingVoltage1" value="<?php echo $obj['ChargingInfo1']['PresentChargingVoltage'];?>">
  577. </div>
  578. <div class="form-group" style="display:<?php echo $am111;?>">
  579. <label>Present Charging Current</label>
  580. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargingCurrent'];?> amp">
  581. <input type="hidden" name="PresentChargingCurrent1" id="PresentChargingCurrent1" value="<?php echo $obj['ChargingInfo1']['PresentChargingCurrent'];?>">
  582. </div>
  583. <div class="form-group" style="display:<?php echo $am111;?>">
  584. <label>Present Charging Power</label>
  585. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargingPower'];?> kW">
  586. <input type="hidden" name="PresentChargingPower1" id="PresentChargingPower1" value="<?php echo $obj['ChargingInfo1']['PresentChargingPower'];?>">
  587. </div>
  588. <div class="form-group" style="display:<?php echo $am111;?>">
  589. <label>Present Charging Energy</label>
  590. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargedEnergy'];?> kWh">
  591. <input type="hidden" name="PresentChargedEnergy1" id="PresentChargedEnergy1" value="<?php echo $obj['ChargingInfo1']['PresentChargedEnergy'];?>">
  592. </div>
  593. <div class="form-group" style="display:<?php echo $am111;?>">
  594. <label>Present Charging Duration</label>
  595. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargedDuration'];?> seconds">
  596. <input type="hidden" name="PresentChargedDuration1" id="PresentChargedDuration1" value="<?php echo $obj['ChargingInfo1']['PresentChargedDuration'];?>">
  597. </div>
  598. <div class="form-group" style="display:<?php echo $am001;?>">
  599. <label>Remain Charging Time</label>
  600. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['RemainChargingDuration'];?> seconds">
  601. <input type="hidden" name="RemainChargingDuration1" id="RemainChargingDuration1" value="<?php echo $obj['ChargingInfo1']['RemainChargingDuration'];?>">
  602. </div>
  603. <div class="form-group" style="display:<?php echo $am001;?>">
  604. <label>EV Battery Max Voltage</label>
  605. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['EvBatteryMaxVoltage'];?> volt">
  606. <input type="hidden" name="EvBatteryMaxVoltage1" id="EvBatteryMaxVoltage1" value="<?php echo $obj['ChargingInfo1']['EvBatteryMaxVoltage'];?>">
  607. </div>
  608. <div class="form-group" style="display:<?php echo $am001;?>">
  609. <label>EV Battery Target Voltage</label>
  610. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['EvBatterytargetVoltage'];?> volt">
  611. <input type="hidden" name="EvBatterytargetVoltage1" id="EvBatterytargetVoltage1" value="<?php echo $obj['ChargingInfo1']['EvBatterytargetVoltage'];?>">
  612. </div>
  613. <div class="form-group" style="display:<?php echo $am001;?>">
  614. <label>EV Battery Soc</label>
  615. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['EvBatterySoc'];?>">
  616. <input type="hidden" name="EvBatterySoc1" id="EvBatterySoc1" value="<?php echo $obj['ChargingInfo1']['EvBatterySoc'];?>">
  617. </div>
  618. </section>
  619. </article>
  620. <?php }?>
  621. <?php if($obj['ChargingInfo2']){ $idx++;?>
  622. <!--Charging Information-->
  623. <article class="envor-sorting-item css">
  624. <header><?php echo $connectorType2." ".$lang->showWord("charging_information")."(connector".$idx.")"; ?><i class="fa fa-plus"></i></header>
  625. <section>
  626. <div class="form-group" style="display:<?php echo $am111;?>">
  627. <label>User Id</label>
  628. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['StartUserId'];?>">
  629. <input type="hidden" name="UserId2" id="UserId2" value="<?php echo $obj['ChargingInfo2']['StartUserId'];?>">
  630. </div>
  631. <div class="form-group" style="display:<?php echo $am111;?>">
  632. <label>Start Date Time</label>
  633. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['StartDateTime'];?>">
  634. <input type="hidden" name="StartDateTime2" id="StartDateTime2" value="<?php echo $obj['ChargingInfo2']['StartDateTime'];?>">
  635. </div>
  636. <div class="form-group" style="display:<?php echo $am111;?>">
  637. <label>Stop Date Time</label>
  638. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['StopDateTime'];?>">
  639. <input type="hidden" name="StopDateTime2" id="StopDateTime2" value="<?php echo $obj['ChargingInfo2']['StopDateTime'];?>">
  640. </div>
  641. <?php /* <div class="form-group" style="display:<?php echo $am111;?>">
  642. <label>StartMethod</label>
  643. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['StartMethod'];?>">
  644. <input type="hidden" name="StartMethod2" id="StartMethod2" value="<?php echo $obj['ChargingInfo2']['StartMethod'];?>">
  645. </div>*/?>
  646. <div class="form-group" style="display:<?php echo $am111;?>">
  647. <label>System Status</label>
  648. <input type="text" readonly class="form-control" placeholder="<?php echo $SystemStatus2;?>">
  649. <input type="hidden" name="SystemStatus2" id="SystemStatus2" value="<?php echo $obj['ChargingInfo2']['SystemStatus'];?>">
  650. </div>
  651. <div class="form-group" style="display:<?php echo $am111;?>">
  652. <label>Connector Temperature</label>
  653. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['ConnectorTemp'];?> ℃">
  654. <input type="hidden" name="ConnectorTemp2" id="ConnectorTemp2" value="<?php echo $obj['ChargingInfo2']['ConnectorTemp'];?>">
  655. </div>
  656. <div class="form-group" style="display:<?php echo $am001;?>">
  657. <label>Present Charging Voltage</label>
  658. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargingVoltage'];?> volt">
  659. <input type="hidden" name="PresentChargingVoltage2" id="PresentChargingVoltage2" value="<?php echo $obj['ChargingInfo2']['PresentChargingVoltage'];?>">
  660. </div>
  661. <div class="form-group" style="display:<?php echo $am111;?>">
  662. <label>Present Charging Current</label>
  663. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargingCurrent'];?> amp">
  664. <input type="hidden" name="PresentChargingCurrent2" id="PresentChargingCurrent2" value="<?php echo $obj['ChargingInfo2']['PresentChargingCurrent'];?>">
  665. </div>
  666. <div class="form-group" style="display:<?php echo $am111;?>">
  667. <label>Present Charging Power</label>
  668. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargingPower'];?> kW">
  669. <input type="hidden" name="PresentChargingPower2" id="PresentChargingPower2" value="<?php echo $obj['ChargingInfo2']['PresentChargingPower'];?>">
  670. </div>
  671. <div class="form-group" style="display:<?php echo $am111;?>">
  672. <label>Present Charging Energy</label>
  673. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargedEnergy'];?> kWh">
  674. <input type="hidden" name="PresentChargedEnergy2" id="PresentChargedEnergy2" value="<?php echo $obj['ChargingInfo2']['PresentChargedEnergy'];?>">
  675. </div>
  676. <div class="form-group" style="display:<?php echo $am111;?>">
  677. <label>Present Charging Duration</label>
  678. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargedDuration'];?> seconds">
  679. <input type="hidden" name="PresentChargedDuration2" id="PresentChargedDuration2" value="<?php echo $obj['ChargingInfo2']['PresentChargedDuration'];?>">
  680. </div>
  681. <div class="form-group" style="display:<?php echo $am001;?>">
  682. <label>Remain Charging Time</label>
  683. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['RemainChargingDuration'];?> seconds">
  684. <input type="hidden" name="RemainChargingDuration2" id="RemainChargingDuration2" value="<?php echo $obj['ChargingInfo2']['RemainChargingDuration'];?>">
  685. </div>
  686. <div class="form-group" style="display:<?php echo $am001;?>">
  687. <label>EV Battery Max Voltage</label>
  688. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['EvBatteryMaxVoltage'];?> volt">
  689. <input type="hidden" name="EvBatteryMaxVoltage2" id="EvBatteryMaxVoltage2" value="<?php echo $obj['ChargingInfo2']['EvBatteryMaxVoltage'];?>">
  690. </div>
  691. <div class="form-group" style="display:<?php echo $am001;?>">
  692. <label>EV Battery Target Voltage</label>
  693. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['EvBatterytargetVoltage'];?> volt">
  694. <input type="hidden" name="EvBatterytargetVoltage2" id="EvBatterytargetVoltage2" value="<?php echo $obj['ChargingInfo2']['EvBatterytargetVoltage'];?>">
  695. </div>
  696. <div class="form-group" style="display:<?php echo $am001;?>">
  697. <label>EV Battery Soc</label>
  698. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['EvBatterySoc'];?>">
  699. <input type="hidden" name="EvBatterySoc2" id="EvBatterySoc2" value="<?php echo $obj['ChargingInfo2']['EvBatterySoc'];?>">
  700. </div>
  701. </section>
  702. </article>
  703. <?php }?>
  704. <?php if($obj['ChargingInfo3']){ $idx++;?>
  705. <!--Charging Information-->
  706. <article class="envor-sorting-item css">
  707. <header><?php echo $connectorType3." ".$lang->showWord("charging_information")."(connector".$idx.")"; ?><i class="fa fa-plus"></i></header>
  708. <section>
  709. <div class="form-group" style="display:<?php echo $am111;?>">
  710. <label>User Id</label>
  711. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['StartUserId'];?>">
  712. <input type="hidden" name="UserId3" id="UserId3" value="<?php echo $obj['ChargingInfo3']['StartUserId'];?>">
  713. </div>
  714. <div class="form-group" style="display:<?php echo $am111;?>">
  715. <label>Start Date Time</label>
  716. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['StartDateTime'];?>">
  717. <input type="hidden" name="StartDateTime3" id="StartDateTime3" value="<?php echo $obj['ChargingInfo3']['StartDateTime'];?>">
  718. </div>
  719. <div class="form-group" style="display:<?php echo $am111;?>">
  720. <label>Stop Date Time</label>
  721. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['StopDateTime'];?>">
  722. <input type="hidden" name="StopDateTime3" id="StopDateTime3" value="<?php echo $obj['ChargingInfo3']['StopDateTime'];?>">
  723. </div>
  724. <?php /* <div class="form-group" style="display:<?php echo $am111;?>">
  725. <label>StartMethod</label>
  726. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['StartMethod'];?>">
  727. <input type="hidden" name="StartMethod3" id="StartMethod3" value="<?php echo $obj['ChargingInfo3']['StartMethod'];?>">
  728. </div>*/?>
  729. <div class="form-group" style="display:<?php echo $am111;?>">
  730. <label>System Status</label>
  731. <input type="text" readonly class="form-control" placeholder="<?php echo $SystemStatus3;?>">
  732. <input type="hidden" name="SystemStatus3" id="SystemStatus3" value="<?php echo $obj['ChargingInfo3']['SystemStatus'];?>">
  733. </div>
  734. <div class="form-group" style="display:<?php echo $am111;?>">
  735. <label>Connector Temperature</label>
  736. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['ConnectorTemp'];?> ℃">
  737. <input type="hidden" name="ConnectorTemp3" id="ConnectorTemp3" value="<?php echo $obj['ChargingInfo3']['ConnectorTemp'];?>">
  738. </div>
  739. <div class="form-group" style="display:<?php echo $am001;?>">
  740. <label>Present Charging Voltage</label>
  741. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargingVoltage'];?> volt">
  742. <input type="hidden" name="PresentChargingVoltage3" id="PresentChargingVoltage3" value="<?php echo $obj['ChargingInfo3']['PresentChargingVoltage'];?>">
  743. </div>
  744. <div class="form-group" style="display:<?php echo $am111;?>">
  745. <label>Present Charging Current</label>
  746. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargingCurrent'];?> amp">
  747. <input type="hidden" name="PresentChargingCurrent3" id="PresentChargingCurrent3" value="<?php echo $obj['ChargingInfo3']['PresentChargingCurrent'];?>">
  748. </div>
  749. <div class="form-group" style="display:<?php echo $am111;?>">
  750. <label>Present Charging Power</label>
  751. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargingPower'];?> kW">
  752. <input type="hidden" name="PresentChargingPower3" id="PresentChargingPower3" value="<?php echo $obj['ChargingInfo3']['PresentChargingPower'];?>">
  753. </div>
  754. <div class="form-group" style="display:<?php echo $am111;?>">
  755. <label>Present Charging Energy</label>
  756. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargedEnergy'];?> kWh">
  757. <input type="hidden" name="PresentChargedEnergy3" id="PresentChargedEnergy3" value="<?php echo $obj['ChargingInfo3']['PresentChargedEnergy'];?>">
  758. </div>
  759. <div class="form-group" style="display:<?php echo $am111;?>">
  760. <label>Present Charging Duration</label>
  761. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargedDuration'];?> seconds">
  762. <input type="hidden" name="PresentChargedDuration3" id="PresentChargedDuration3" value="<?php echo $obj['ChargingInfo3']['PresentChargedDuration'];?>">
  763. </div>
  764. <div class="form-group" style="display:<?php echo $am001;?>">
  765. <label>Remain Charging Time</label>
  766. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['RemainChargingDuration'];?> seconds">
  767. <input type="hidden" name="RemainChargingDuration3" id="RemainChargingDuration3" value="<?php echo $obj['ChargingInfo3']['RemainChargingDuration'];?>">
  768. </div>
  769. <div class="form-group" style="display:<?php echo $am001;?>">
  770. <label>EV Battery Max Voltage</label>
  771. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['EvBatteryMaxVoltage'];?> volt">
  772. <input type="hidden" name="EvBatteryMaxVoltage3" id="EvBatteryMaxVoltage3" value="<?php echo $obj['ChargingInfo3']['EvBatteryMaxVoltage'];?>">
  773. </div>
  774. <div class="form-group" style="display:<?php echo $am001;?>">
  775. <label>EV Battery Target Voltage</label>
  776. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['EvBatterytargetVoltage'];?> volt">
  777. <input type="hidden" name="EvBatterytargetVoltage3" id="EvBatterytargetVoltage3" value="<?php echo $obj['ChargingInfo3']['EvBatterytargetVoltage'];?>">
  778. </div>
  779. <div class="form-group" style="display:<?php echo $am001;?>">
  780. <label>EV Battery Soc</label>
  781. <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['EvBatterySoc'];?>">
  782. <input type="hidden" name="EvBatterySoc3" id="EvBatterySoc3" value="<?php echo $obj['ChargingInfo3']['EvBatterySoc'];?>">
  783. </div>
  784. </section>
  785. </article>
  786. <?php }?>
  787. <article class="envor-sorting-item css">
  788. <div align="center"><button id="save"><?php echo $lang->showWord("set")?></button></div>
  789. </article>
  790. </div>
  791. </div>
  792. </div>
  793. </div>
  794. </div>
  795. </section>
  796. </div>
  797. <?php
  798. include 'foot.php';
  799. ?>
  800. <script type="text/JavaScript">
  801. $(document).ready(function(){
  802. if(document.getElementById("MaxChargingEnergy").value=="0" || document.getElementById("MaxChargingEnergy").value==""){
  803. document.getElementById("MaxChargingEnergyText").style.display="block";
  804. }
  805. if(document.getElementById("MaxChargingPower").value=="0" || document.getElementById("MaxChargingPower").value==""){
  806. document.getElementById("MaxChargingPowerText").style.display="block";
  807. }
  808. if(document.getElementById("MaxChargingCurrent").value=="0" || document.getElementById("MaxChargingCurrent").value==""){
  809. document.getElementById("MaxChargingCurrentText").style.display="block";
  810. }
  811. if(document.getElementById("MaxChargingDuration").value=="0" || document.getElementById("MaxChargingDuration").value==""){
  812. document.getElementById("MaxChargingDurationText").style.display="block";
  813. }
  814. if(document.getElementById("ModelName").value.substr(8,1) != "0"){
  815. document.getElementById("AcMaxChargingCurrentDiv").style.display="block";
  816. if(document.getElementById("AcMaxChargingCurrent").value=="0" || document.getElementById("AcMaxChargingCurrent").value==""){
  817. document.getElementById("AcMaxChargingCurrentText").style.display="block";
  818. }
  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("MaxChargingCurrent").focus();
  1000. return false;
  1001. }
  1002. if(AcMaxChargingCurrent < 0)
  1003. {
  1004. alert("Ac Max Charging Current must >= 0!");
  1005. document.getElementById("MaxChargingCurrent").focus();
  1006. return false;
  1007. }
  1008. if(RatingPower!="" && RatingPower!=0){
  1009. if(MaxChargingPower > 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(MaxChargingCurrent > 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(AcMaxChargingCurrent > AcRatingCurrent)
  1048. {
  1049. alert("Ac Max Charging Current must be less than Ac Rating Current("+RatingCurrent+")!");
  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>