Эх сурвалжийг харах

2020-00-00 / ct_chen

Actions:
1. Webservice web page UI tuning
2. parameters about electricity 10 times value tuning

Files:
1. EVSE/rootfs/var/www/*
2. EVSE/Modularization/WebService.c
ct_chen 5 жил өмнө
parent
commit
7a4281c0e4

+ 100 - 100
EVSE/Modularization/WebService.c

@@ -447,9 +447,9 @@ int main(int argc, char *argv[]) {
 			if( json_object_object_get_ex(jobj, "LocalWhiteCard9", &val_obj) ) {
 				LocalWhiteCard9 = (char*)json_object_get_string(val_obj);
 			}
-			ShmSysConfigAndInfo->SysConfig.MaxChargingEnergy = MaxChargingEnergy;
-			ShmSysConfigAndInfo->SysConfig.MaxChargingPower = MaxChargingPower;
-			ShmSysConfigAndInfo->SysConfig.MaxChargingCurrent = MaxChargingCurrent;
+			ShmSysConfigAndInfo->SysConfig.MaxChargingEnergy = MaxChargingEnergy*10;
+			ShmSysConfigAndInfo->SysConfig.MaxChargingPower = MaxChargingPower*10;
+			ShmSysConfigAndInfo->SysConfig.MaxChargingCurrent = MaxChargingCurrent*10;
 			ShmSysConfigAndInfo->SysConfig.MaxChargingDuration = MaxChargingDuration;
 			ShmSysConfigAndInfo->SysConfig.PhaseLossPolicy = PhaseLossPolicy;
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[0],LocalWhiteCard0);
@@ -608,7 +608,7 @@ int main(int argc, char *argv[]) {
 
 			ShmSysConfigAndInfo->SysConfig.BackendConnTimeout = BackendConnTimeout;
 			ShmSysConfigAndInfo->SysConfig.OfflinePolicy = OfflinePolicy;
-			ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeEnergy = OfflineMaxChargeEnergy;
+			ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeEnergy = OfflineMaxChargeEnergy*10;
 			ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeDuration = OfflineMaxChargeDuration;
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.OcppServerURL,OcppServerURL);
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.ChargeBoxId,ChargeBoxId);
@@ -774,7 +774,7 @@ int main(int argc, char *argv[]) {
 			struct tm *pst = localtime(&tt); //§âtime_tÃþ«¬Âà´«¬°struct tmÃþ«¬
 			year = pst->tm_year + 1900;
 			month = pst->tm_mon + 1;
-			sprintf(cmd,"cp /mnt/%04d-%02d.zip /var/www/log.zip",year,month);
+			sprintf(cmd,"cp /mnt/*%04d-%02d.zip /var/www/log.zip",year,month);
 			if(system("exec /root/logPackTools 'log'")==0){
 				system(cmd);
 			}
@@ -973,18 +973,18 @@ int main(int argc, char *argv[]) {
 		FactoryConfiguration = json_object_new_int(ShmSysConfigAndInfo->SysInfo.FactoryConfiguration);
 		AuthorisationMode = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AuthorisationMode);
 		DefaultLanguage = json_object_new_int(ShmSysConfigAndInfo->SysConfig.DefaultLanguage);
-		InputVoltageR = json_object_new_double(ShmSysConfigAndInfo->SysInfo.InputVoltageR);
-		InputVoltageS = json_object_new_double(ShmSysConfigAndInfo->SysInfo.InputVoltageS);
-		InputVoltageT = json_object_new_double(ShmSysConfigAndInfo->SysInfo.InputVoltageT);
+		InputVoltageR = json_object_new_double(ShmSysConfigAndInfo->SysInfo.InputVoltageR/10);
+		InputVoltageS = json_object_new_double(ShmSysConfigAndInfo->SysInfo.InputVoltageS/10);
+		InputVoltageT = json_object_new_double(ShmSysConfigAndInfo->SysInfo.InputVoltageT/10);
 		SystemFanRotaSpeed = json_object_new_int(ShmSysConfigAndInfo->SysInfo.SystemFanRotaSpeed);
 		PsuFanRotaSpeed = json_object_new_int(ShmSysConfigAndInfo->SysInfo.PsuFanRotaSpeed);
 		RfidCardNumEndian = json_object_new_int(ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian);
 		PsuAcInputType = json_object_new_int(ShmSysConfigAndInfo->SysConfig.PsuAcInputType);
-		RatingCurrent = json_object_new_int(ShmSysConfigAndInfo->SysConfig.RatingCurrent);
-		AuxPower5V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower5V);
-		AuxPower12V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower12V);
-		AuxPower24V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower24V);
-		AuxPower48V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower48V);
+		RatingCurrent = json_object_new_int(ShmSysConfigAndInfo->SysConfig.RatingCurrent/10);
+		AuxPower5V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower5V/10);
+		AuxPower12V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower12V/10);
+		AuxPower24V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower24V/10);
+		AuxPower48V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower48V/10);
 		CsuHwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CsuHwRev);
 		CsuBootLoadFwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CsuBootLoadFwRev);
 		CsuKernelFwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CsuKernelFwRev);
@@ -1020,9 +1020,9 @@ int main(int argc, char *argv[]) {
 		ChargingInfo1=json_object_new_object();
 		ChargingInfo2=json_object_new_object();
 		ChargingInfo3=json_object_new_object();
-		MaxChargingEnergy = json_object_new_int(ShmSysConfigAndInfo->SysConfig.MaxChargingEnergy);
-		MaxChargingPower = json_object_new_int(ShmSysConfigAndInfo->SysConfig.MaxChargingPower);
-		MaxChargingCurrent = json_object_new_int(ShmSysConfigAndInfo->SysConfig.MaxChargingCurrent);
+		MaxChargingEnergy = json_object_new_int(ShmSysConfigAndInfo->SysConfig.MaxChargingEnergy/10);
+		MaxChargingPower = json_object_new_int(ShmSysConfigAndInfo->SysConfig.MaxChargingPower/10);
+		MaxChargingCurrent = json_object_new_int(ShmSysConfigAndInfo->SysConfig.MaxChargingCurrent/10);
 		MaxChargingDuration = json_object_new_int(ShmSysConfigAndInfo->SysConfig.MaxChargingDuration);
 		PhaseLossPolicy = json_object_new_int(ShmSysConfigAndInfo->SysConfig.PhaseLossPolicy);
 		LocalWhiteCard[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[0]);
@@ -1038,20 +1038,20 @@ int main(int argc, char *argv[]) {
 		//UserId = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.UserId);
 		if(connectorType1 != 0){
 			if(connectorType1 == 1){//CCS
-				PresentChargingVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingVoltage);
-				PresentChargingCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingCurrent);
-				PresentChargingPower[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingPower);
-				PresentChargedEnergy[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargedEnergy);
+				PresentChargingVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingVoltage/10);
+				PresentChargingCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingCurrent/10);
+				PresentChargingPower[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingPower/10);
+				PresentChargedEnergy[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargedEnergy/10);
 				PresentChargedDuration[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargedDuration);
 				RemainChargingDuration[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].RemainChargingDuration);
-				EvBatteryMaxVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatteryMaxVoltage);
-				EvBatterytargetVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetVoltage);
+				EvBatteryMaxVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatteryMaxVoltage/10);
+				EvBatterytargetVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetVoltage/10);
 				EvBatterySoc[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterySoc);
 				SystemStatus[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].SystemStatus);
 				Index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Index);
 				Type[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Type);
 				type_index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].type_index);
-				EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetCurrent);
+				EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetCurrent/10);
 //				CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].CardNumber);
 				StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartUserId);
 				StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartDateTime);
@@ -1061,20 +1061,20 @@ int main(int argc, char *argv[]) {
 				CcsGunQty++;
 			}
 			else if(connectorType1 == 2){//GB
-				PresentChargingVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargingVoltage);
-				PresentChargingCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargingCurrent);
-				PresentChargingPower[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargingPower);
-				PresentChargedEnergy[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargedEnergy);
+				PresentChargingVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargingVoltage/10);
+				PresentChargingCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargingCurrent/10);
+				PresentChargingPower[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargingPower/10);
+				PresentChargedEnergy[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargedEnergy/10);
 				PresentChargedDuration[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargedDuration);
 				RemainChargingDuration[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].RemainChargingDuration);
-				EvBatteryMaxVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatteryMaxVoltage);
-				EvBatterytargetVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetVoltage);
+				EvBatteryMaxVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatteryMaxVoltage/10);
+				EvBatterytargetVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetVoltage/10);
 				EvBatterySoc[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterySoc);
 				SystemStatus[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].SystemStatus);
 				Index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Index);
 				Type[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Type);
 				type_index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].type_index);
-				EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetCurrent);
+				EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetCurrent/10);
 //				CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].CardNumber);
 				StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartUserId);
 				StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartDateTime);
@@ -1084,20 +1084,20 @@ int main(int argc, char *argv[]) {
 				GbGunQty++;
 			}
 			else if(connectorType1 == 3){//CHAdeMO
-				PresentChargingVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargingVoltage);
-				PresentChargingCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargingCurrent);
-				PresentChargingPower[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargingPower);
-				PresentChargedEnergy[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargedEnergy);
+				PresentChargingVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargingVoltage/10);
+				PresentChargingCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargingCurrent/10);
+				PresentChargingPower[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargingPower/10);
+				PresentChargedEnergy[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargedEnergy/10);
 				PresentChargedDuration[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargedDuration);
 				RemainChargingDuration[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].RemainChargingDuration);
-				EvBatteryMaxVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatteryMaxVoltage);
-				EvBatterytargetVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetVoltage);
+				EvBatteryMaxVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatteryMaxVoltage/10);
+				EvBatterytargetVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetVoltage/10);
 				EvBatterySoc[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterySoc);
 				SystemStatus[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].SystemStatus);
 				Index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Index);
 				Type[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Type);
 				type_index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].type_index);
-				EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetCurrent);
+				EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetCurrent/10);
 //				CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].CardNumber);
 				StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartUserId);
 				StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartDateTime);
@@ -1107,20 +1107,20 @@ int main(int argc, char *argv[]) {
 				CHAdeMOGunQty++;
 			}
 			else if(connectorType1 == 4){//AC
-				PresentChargingVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingVoltage);
-				PresentChargingCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingCurrent);
-				PresentChargingPower[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingPower);
-				PresentChargedEnergy[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargedEnergy);
+				PresentChargingVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingVoltage/10);
+				PresentChargingCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingCurrent/10);
+				PresentChargingPower[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingPower/10);
+				PresentChargedEnergy[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargedEnergy/10);
 				PresentChargedDuration[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargedDuration);
 				RemainChargingDuration[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].RemainChargingDuration);
 				EvBatteryMaxVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatteryMaxVoltage);
-				EvBatterytargetVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetVoltage);
+				EvBatterytargetVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetVoltage/10);
 				EvBatterySoc[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterySoc);
 				SystemStatus[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].SystemStatus);
 				Index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Index);
 				Type[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type);
 				type_index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index);
-				EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetCurrent);
+				EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetCurrent/10);
 //				CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].CardNumber);
 				StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartUserId);
 				StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartDateTime);
@@ -1132,20 +1132,20 @@ int main(int argc, char *argv[]) {
 		}
 		if(connectorType2 != 0){
 			if(connectorType2 == 1){//CCS
-				PresentChargingVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingVoltage);
-				PresentChargingCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingCurrent);
-				PresentChargingPower[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingPower);
-				PresentChargedEnergy[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargedEnergy);
+				PresentChargingVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingVoltage/10);
+				PresentChargingCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingCurrent/10);
+				PresentChargingPower[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingPower/10);
+				PresentChargedEnergy[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargedEnergy/10);
 				PresentChargedDuration[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargedDuration);
 				RemainChargingDuration[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].RemainChargingDuration);
-				EvBatteryMaxVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatteryMaxVoltage);
-				EvBatterytargetVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetVoltage);
+				EvBatteryMaxVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatteryMaxVoltage/10);
+				EvBatterytargetVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetVoltage/10);
 				EvBatterySoc[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterySoc);
 				SystemStatus[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].SystemStatus);
 				Index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Index);
 				Type[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Type);
 				type_index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].type_index);
-				EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetCurrent);
+				EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetCurrent/10);
 //				CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].CardNumber);
 				StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartUserId);
 				StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartDateTime);
@@ -1155,20 +1155,20 @@ int main(int argc, char *argv[]) {
 				CcsGunQty++;
 			}
 			else if(connectorType2 == 2){//GB
-				PresentChargingVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargingVoltage);
-				PresentChargingCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargingCurrent);
-				PresentChargingPower[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargingPower);
-				PresentChargedEnergy[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargedEnergy);
+				PresentChargingVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargingVoltage/10);
+				PresentChargingCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargingCurrent/10);
+				PresentChargingPower[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargingPower/10);
+				PresentChargedEnergy[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargedEnergy/10);
 				PresentChargedDuration[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargedDuration);
 				RemainChargingDuration[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].RemainChargingDuration);
-				EvBatteryMaxVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatteryMaxVoltage);
-				EvBatterytargetVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetVoltage);
+				EvBatteryMaxVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatteryMaxVoltage/10);
+				EvBatterytargetVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetVoltage/10);
 				EvBatterySoc[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterySoc);
 				SystemStatus[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].SystemStatus);
 				Index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Index);
 				Type[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Type);
 				type_index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].type_index);
-				EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetCurrent);
+				EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetCurrent/10);
 //				CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].CardNumber);
 				StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartUserId);
 				StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartDateTime);
@@ -1178,20 +1178,20 @@ int main(int argc, char *argv[]) {
 				GbGunQty++;
 			}
 			else if(connectorType2 == 3){//CHAdeMO
-				PresentChargingVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargingVoltage);
-				PresentChargingCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargingCurrent);
-				PresentChargingPower[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargingPower);
-				PresentChargedEnergy[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargedEnergy);
+				PresentChargingVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargingVoltage/10);
+				PresentChargingCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargingCurrent/10);
+				PresentChargingPower[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargingPower/10);
+				PresentChargedEnergy[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargedEnergy/10);
 				PresentChargedDuration[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargedDuration);
 				RemainChargingDuration[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].RemainChargingDuration);
-				EvBatteryMaxVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatteryMaxVoltage);
-				EvBatterytargetVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetVoltage);
+				EvBatteryMaxVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatteryMaxVoltage/10);
+				EvBatterytargetVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetVoltage/10);
 				EvBatterySoc[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterySoc);
 				SystemStatus[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].SystemStatus);
 				Index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Index);
 				Type[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Type);
 				type_index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].type_index);
-				EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetCurrent);
+				EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetCurrent/10);
 //				CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].CardNumber);
 				StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartUserId);
 				StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartDateTime);
@@ -1201,20 +1201,20 @@ int main(int argc, char *argv[]) {
 				CHAdeMOGunQty++;
 			}
 			else if(connectorType2 == 4){//AC
-				PresentChargingVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingVoltage);
-				PresentChargingCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingCurrent);
-				PresentChargingPower[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingPower);
-				PresentChargedEnergy[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargedEnergy);
+				PresentChargingVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingVoltage/10);
+				PresentChargingCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingCurrent/10);
+				PresentChargingPower[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingPower/10);
+				PresentChargedEnergy[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargedEnergy/10);
 				PresentChargedDuration[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargedDuration);
 				RemainChargingDuration[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].RemainChargingDuration);
-				EvBatteryMaxVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatteryMaxVoltage);
-				EvBatterytargetVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetVoltage);
+				EvBatteryMaxVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatteryMaxVoltage/10);
+				EvBatterytargetVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetVoltage/10);
 				EvBatterySoc[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterySoc);
 				SystemStatus[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].SystemStatus);
 				Index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Index);
 				Type[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type);
 				type_index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index);
-				EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetCurrent);
+				EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetCurrent/10);
 //				CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].CardNumber);
 				StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartUserId);
 				StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartDateTime);
@@ -1226,20 +1226,20 @@ int main(int argc, char *argv[]) {
 		}
 		if(connectorType3 != 0){
 			if(connectorType3 == 1){//CCS
-				PresentChargingVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingVoltage);
-				PresentChargingCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingCurrent);
-				PresentChargingPower[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingPower);
-				PresentChargedEnergy[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargedEnergy);
+				PresentChargingVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingVoltage/10);
+				PresentChargingCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingCurrent/10);
+				PresentChargingPower[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingPower/10);
+				PresentChargedEnergy[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargedEnergy/10);
 				PresentChargedDuration[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargedDuration);
 				RemainChargingDuration[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].RemainChargingDuration);
-				EvBatteryMaxVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatteryMaxVoltage);
-				EvBatterytargetVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetVoltage);
+				EvBatteryMaxVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatteryMaxVoltage/10);
+				EvBatterytargetVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetVoltage/10);
 				EvBatterySoc[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterySoc);
 				SystemStatus[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].SystemStatus);
 				Index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Index);
 				Type[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Type);
 				type_index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].type_index);
-				EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetCurrent);
+				EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetCurrent/10);
 //				CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].CardNumber);
 				StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartUserId);
 				StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartDateTime);
@@ -1249,20 +1249,20 @@ int main(int argc, char *argv[]) {
 				CcsGunQty++;
 			}
 			else if(connectorType3 == 2){//GB
-				PresentChargingVoltage[2]= json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargingVoltage);
-				PresentChargingCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargingCurrent);
-				PresentChargingPower[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargingPower);
-				PresentChargedEnergy[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargedEnergy);
+				PresentChargingVoltage[2]= json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargingVoltage/10);
+				PresentChargingCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargingCurrent/10);
+				PresentChargingPower[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargingPower/10);
+				PresentChargedEnergy[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargedEnergy/10);
 				PresentChargedDuration[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PresentChargedDuration);
 				RemainChargingDuration[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].RemainChargingDuration);
-				EvBatteryMaxVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatteryMaxVoltage);
-				EvBatterytargetVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetVoltage);
+				EvBatteryMaxVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatteryMaxVoltage/10);
+				EvBatterytargetVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetVoltage/10);
 				EvBatterySoc[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterySoc);
 				SystemStatus[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].SystemStatus);
 				Index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Index);
 				Type[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Type);
 				type_index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].type_index);
-				EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetCurrent);
+				EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetCurrent/10);
 //				CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].CardNumber);
 				StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartUserId);
 				StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartDateTime);
@@ -1272,20 +1272,20 @@ int main(int argc, char *argv[]) {
 				GbGunQty++;
 			}
 			else if(connectorType3 == 3){//CHAdeMO
-				PresentChargingVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargingVoltage);
-				PresentChargingCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargingCurrent);
-				PresentChargingPower[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargingPower);
-				PresentChargedEnergy[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargedEnergy);
+				PresentChargingVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargingVoltage/10);
+				PresentChargingCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargingCurrent/10);
+				PresentChargingPower[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargingPower/10);
+				PresentChargedEnergy[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargedEnergy/10);
 				PresentChargedDuration[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PresentChargedDuration);
 				RemainChargingDuration[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].RemainChargingDuration);
-				EvBatteryMaxVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatteryMaxVoltage);
-				EvBatterytargetVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetVoltage);
+				EvBatteryMaxVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatteryMaxVoltage/10);
+				EvBatterytargetVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetVoltage/10);
 				EvBatterySoc[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterySoc);
 				SystemStatus[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].SystemStatus);
 				Index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Index);
 				Type[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Type);
 				type_index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].type_index);
-				EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetCurrent);
+				EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetCurrent/10);
 //				CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].CardNumber);
 				StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartUserId);
 				StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartDateTime);
@@ -1295,20 +1295,20 @@ int main(int argc, char *argv[]) {
 				CHAdeMOGunQty++;
 			}
 			else if(connectorType3 == 4){//AC
-				PresentChargingVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingVoltage);
-				PresentChargingCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingCurrent);
-				PresentChargingPower[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingPower);
-				PresentChargedEnergy[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargedEnergy);
+				PresentChargingVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingVoltage/10);
+				PresentChargingCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingCurrent/10);
+				PresentChargingPower[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingPower/10);
+				PresentChargedEnergy[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargedEnergy/10);
 				PresentChargedDuration[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargedDuration);
 				RemainChargingDuration[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].RemainChargingDuration);
-				EvBatteryMaxVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatteryMaxVoltage);
-				EvBatterytargetVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetVoltage);
+				EvBatteryMaxVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatteryMaxVoltage/10);
+				EvBatterytargetVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetVoltage/10);
 				EvBatterySoc[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterySoc);
 				SystemStatus[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].SystemStatus);
 				Index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Index);
 				Type[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type);
 				type_index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index);
-				EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetCurrent);
+				EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetCurrent/10);
 //				CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].CardNumber);
 				StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartUserId);
 				StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartDateTime);
@@ -1357,7 +1357,7 @@ int main(int argc, char *argv[]) {
 		//backend
 		BackendConnTimeout = json_object_new_int(ShmSysConfigAndInfo->SysConfig.BackendConnTimeout);
 		OfflinePolicy = json_object_new_int(ShmSysConfigAndInfo->SysConfig.OfflinePolicy);
-		OfflineMaxChargeEnergy = json_object_new_int(ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeEnergy);
+		OfflineMaxChargeEnergy = json_object_new_int(ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeEnergy/10);
 		OfflineMaxChargeDuration = json_object_new_int(ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeDuration);
 		OcppConnStatus = json_object_new_int(ShmSysConfigAndInfo->SysInfo.OcppConnStatus);
 		OcppServerURL = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.OcppServerURL);

+ 7 - 5
EVSE/rootfs/var/www/head.php

@@ -270,7 +270,8 @@
                 //-->
                 <a href="index.php">
                 <div class="envor-logo">
-				<h2><?php echo $lang->showWord("vender_name"); ?></h2>
+<?php /*				<h2><?php echo $lang->showWord("vender_name"); ?></h2>*/?>
+				<h2>EV Quick Charger</h2>
                 <!--  <img src="img/logo.png" alt="PHIHONG">-->
                 <!--
 
@@ -326,12 +327,13 @@
 						</ul> 
                     </li>
 					<li<?php echo ($tag_header=='upgrade'?' class="active"':''); ?>>
-						<a href="#" accesskey="2" title="Upgrade"><?php echo $lang->showWord("upgrade"); ?></a>
+						<a href="upgrade_iso.php" accesskey="2" title="Upgrade"><?php echo $lang->showWord("upgrade"); ?></a>
+<?php /*						<a href="#" accesskey="2" title="Upgrade"><?php echo $lang->showWord("upgrade"); ?></a>
 						<ul>	
 							<li>
 							  <a href="upgrade_iso.php"><?php echo "Image"; ?></a>
 							</li>
-						</ul> 
+						</ul> */?>
                     </li>
 					<li<?php echo ($tag_header=='other'?' class="active"':''); ?>>
                       <a href="#" accesskey="3" title="Other"><?php echo $lang->showWord("other"); ?></a>
@@ -345,9 +347,9 @@
 						<li>
 						  <a href="set_passwd.php"><?php echo $lang->showWord("passwd"); ?></a>
 						</li>
-						<li>
+<?php /*						<li>
 						  <a href="set_restart.php"><?php echo $lang->showWord("restart"); ?></a>
-						</li>
+						</li>*/?>
                       </ul>
                     </li>
 					<li<?php echo ($tag_header=='language'?' class="active"':''); ?>>

BIN
EVSE/rootfs/var/www/lang.db


+ 10 - 9
EVSE/rootfs/var/www/set_backend.php

@@ -40,7 +40,7 @@ img {
 		<!--
 		Main Content start
 		//-->
-		<div id="loading" style="display:none;"><img src="img/giphy.gif"/></div>
+		<a id="loadinghref"><div id="loading" style="display:none;"><img src="img/giphy.gif"/></div></a>
 		<section class="envor-section">
 			<div class="container">
 				<div class="row">
@@ -52,12 +52,12 @@ img {
 									<header><?php echo $lang->showWord("common_information"); ?><i class="fa fa-plus"></i></header>
 									<section>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>BackendConnTimeout</label>
+											<label>Backend Connection Timeout</label>
 											<input type="text" name="BackendConnTimeout" id="BackendConnTimeout" class="form-control" value="<?php echo $obj->{'BackendConnTimeout'};?>">
 											<small class="form-text text-muted-red">seconds</small>
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>OfflinePolicy</label>
+											<label>Offline Policy</label>
 											<select class="form-control" id="OfflinePolicy" name="OfflinePolicy">
 												<option value="0" <?php echo $obj->{'OfflinePolicy'}=="0"?"selected":""?>>local list</option>
 												<option value="1" <?php echo $obj->{'OfflinePolicy'}=="1"?"selected":""?>>Phihong RFID tag</option>
@@ -66,12 +66,12 @@ img {
 											</select>
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>OfflineMaxChargeEnergy</label>
+											<label>Offline Max Charge Energy</label>
 											<small class="form-text text-muted-red">kWh</small>
 											<input type="text" name="OfflineMaxChargeEnergy" id="OfflineMaxChargeEnergy" class="form-control" value="<?php echo $obj->{'OfflineMaxChargeEnergy'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>OfflineMaxChargeDuration</label>
+											<label>Offline Max Charge Duration</label>
 											<small class="form-text text-muted-red">minutes</small>
 											<input type="text" name="OfflineMaxChargeDuration" id="OfflineMaxChargeDuration" class="form-control" value="<?php echo $obj->{'OfflineMaxChargeDuration'};?>">
 										</div>
@@ -82,20 +82,20 @@ img {
 									<header><?php echo $lang->showWord("OCPP_backend"); ?><i class="fa fa-plus"></i></header>
 									<section>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>OcppConnStatus</label>
+											<label>Ocpp Connection Status</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $OcppConnStatus;?>">
 											<input type="hidden" name="OcppConnStatus" id="OcppConnStatus" value="<?php echo $obj->{'OcppConnStatus'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>OcppServerURL</label>
+											<label>Central System URL</label>
 											<input type="text" name="OcppServerURL" id="OcppServerURL" class="form-control" value="<?php echo $obj->{'OcppServerURL'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>ChargeBoxId</label>
+											<label>Charge Box Id</label>
 											<input type="text" name="ChargeBoxId" id="ChargeBoxId" class="form-control" value="<?php echo $obj->{'ChargeBoxId'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>chargePointVendor</label>
+											<label>Charge Point Vendor</label>
 											<input type="text" name="chargePointVendor" id="chargePointVendor" class="form-control" value="<?php echo $obj->{'chargePointVendor'};?>">
 										</div>
 									</section>
@@ -120,6 +120,7 @@ img {
 	document.getElementById("save").onclick = function() {
 		if(formCheck())
 		{
+			window.location="#loadinghref";
 			document.getElementById("loading").style.display="block";
 			// 發送 Ajax 查詢請求並處理
 			var request = new XMLHttpRequest();

+ 162 - 72
EVSE/rootfs/var/www/set_charging.php

@@ -7,7 +7,12 @@
 	$RatingCurrent = $system['RatingCurrent'];
 	$ModelName = $system['ModelName'];
 	$RatingPower = substr($ModelName,4,2)*pow(10,-1+substr($ModelName,6,1));
-	$ChargingInfo3=$obj['ChargingInfo3'];//var_dump($ChargingInfo3);
+	$Connector1=substr($ModelName,7,1);
+	$Connector2=substr($ModelName,8,1);
+	$Connector3=substr($ModelName,9,1);
+	$connectorType1=ConnectorType($Connector1);
+	$connectorType2=ConnectorType($Connector2);
+	$connectorType3=ConnectorType($Connector3);
 	$idx=0;
 	if($obj['ChargingInfo1']){
 		switch ($obj['ChargingInfo1']['SystemStatus']){
@@ -210,6 +215,30 @@
 				break;
 		}
 	}
+	
+	function ConnectorType($connector){
+		$result="";
+		if($connector == "0"){
+			$result= "";
+		}
+		else if($connector == "U" || $connector == "E"){
+			$result= "CCS";
+		}
+		else if($connector == "G" || $connector == "D"){
+			$result= "GB";
+		}
+		else if($connector == "J"){
+			$result= "CHAdeMO";
+		}
+		else if($connector == "1" || $connector == "2" || $connector == "3" || $connector == "4" || $connector == "5" || $connector == "6"){
+			$result= "AC";
+		}
+		else{
+			$result= "";
+		}
+		return $result;
+	}
+
 ?>
 <style>
 img {
@@ -237,84 +266,84 @@ img {
 		<!--
 		Main Content start
 		//-->
-		<div id="loading" style="display:none;"><img src="img/giphy.gif"/></div>
+		<a id="loadinghref"><div id="loading" style="display:none;"><img src="img/giphy.gif"/></div></a>
 		<section class="envor-section">
 			<div class="container">
 				<div class="row">
 					<div class="col-lg-12">         
 						<div class="envor-sorting" id="faq-sorting">
-							<div class="envor-toggle">                
+							<div class="envor-toggle">
 								<!--Charging relevant parameters-->
 								<article class="envor-sorting-item css">
 									<header><?php echo $lang->showWord("charging_relevant_parameters"); ?><i class="fa fa-plus"></i></header>
 									<section>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>MaxChargingEnergy</label>
+											<label>Max Charging Energy</label>
 											<small class="form-text text-muted-red">kWh</small>
-											<input type="text" name="MaxChargingEnergy" id="MaxChargingEnergy" class="form-control" value="<?php echo $obj['MaxChargingEnergy'];?>">
+											<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":"";?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>MaxChargingPower</label>
+											<label>Max Charging Power</label>
 											<small class="form-text text-muted-red">kW</small>
-											<input type="text" name="MaxChargingPower" id="MaxChargingPower" class="form-control" value="<?php echo $obj['MaxChargingPower'];?>">
+											<input type="text" name="MaxChargingPower" id="MaxChargingPower" class="form-control" value="<?php echo $obj['MaxChargingPower'];?>" placeholder="<?php echo ($obj['MaxChargingEnergy']==0||$obj['MaxChargingEnergy']=="")?"'0' means unlimit":"";?>">
 											<input type="hidden" name="RatingPower" id="RatingPower" value="<?php echo $RatingPower;?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>MaxChargingCurrent</label>
+											<label>Max Charging Current</label>
 											<small class="form-text text-muted-red">amp</small>
-											<input type="text" name="MaxChargingCurrent" id="MaxChargingCurrent" class="form-control" value="<?php echo $obj['MaxChargingCurrent'];?>">
+											<input type="text" name="MaxChargingCurrent" id="MaxChargingCurrent" class="form-control" value="<?php echo $obj['MaxChargingCurrent'];?>" placeholder="<?php echo ($obj['MaxChargingEnergy']==0||$obj['MaxChargingEnergy']=="")?"'0' means unlimit":"";?>">
 											<input type="hidden" name="RatingCurrent" id="RatingCurrent" value="<?php echo $RatingCurrent;?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>MaxChargingDuration</label>
+											<label>Max Charging Duration</label>
 											<small class="form-text text-muted-red">minutes</small>
-											<input type="text" name="MaxChargingDuration" id="MaxChargingDuration" class="form-control" value="<?php echo $obj['MaxChargingDuration'];?>">
+											<input type="text" name="MaxChargingDuration" id="MaxChargingDuration" class="form-control" value="<?php echo $obj['MaxChargingDuration'];?>" placeholder="<?php echo ($obj['MaxChargingEnergy']==0||$obj['MaxChargingEnergy']=="")?"'0' means unlimit":"";?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>PhaseLossPolicy</label>
+											<label>AC Phase Loss Policy</label>
 											<select class="form-control" id="PhaseLossPolicy" name="PhaseLossPolicy">
-												<option value="0" <?php echo $obj['PhaseLossPolicy']=="0"?"selected":""?>>charging</option>
+												<option value="0" <?php echo $obj['PhaseLossPolicy']=="0"?"selected":""?>>de-rating</option>
 												<option value="1" <?php echo $obj['PhaseLossPolicy']=="1"?"selected":""?>>stop charging</option>
 											</select>
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>LocalWhiteCard0</label>
+											<label>Local White Card0</label>
 											<input type="text" name="LocalWhiteCard0" id="LocalWhiteCard0" class="form-control" value="<?php echo $obj['LocalWhiteCard'][0];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>LocalWhiteCard1</label>
+											<label>Local White Card1</label>
 											<input type="text" name="LocalWhiteCard1" id="LocalWhiteCard1" class="form-control" value="<?php echo $obj['LocalWhiteCard'][1];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>LocalWhiteCard2</label>
+											<label>Local White Card2</label>
 											<input type="text" name="LocalWhiteCard2" id="LocalWhiteCard2" class="form-control" value="<?php echo $obj['LocalWhiteCard'][2];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>LocalWhiteCard3</label>
+											<label>Local White Card3</label>
 											<input type="text" name="LocalWhiteCard3" id="LocalWhiteCard3" class="form-control" value="<?php echo $obj['LocalWhiteCard'][3];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>LocalWhiteCard4</label>
+											<label>Local White Card4</label>
 											<input type="text" name="LocalWhiteCard4" id="LocalWhiteCard4" class="form-control" value="<?php echo $obj['LocalWhiteCard'][4];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>LocalWhiteCard5</label>
+											<label>Local White Card5</label>
 											<input type="text" name="LocalWhiteCard5" id="LocalWhiteCard5" class="form-control" value="<?php echo $obj['LocalWhiteCard'][5];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>LocalWhiteCard6</label>
+											<label>Local White Card6</label>
 											<input type="text" name="LocalWhiteCard6" id="LocalWhiteCard6" class="form-control" value="<?php echo $obj['LocalWhiteCard'][6];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>LocalWhiteCard7</label>
+											<label>Local White Card7</label>
 											<input type="text" name="LocalWhiteCard7" id="LocalWhiteCard7" class="form-control" value="<?php echo $obj['LocalWhiteCard'][7];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>LocalWhiteCard8</label>
+											<label>Local White Card8</label>
 											<input type="text" name="LocalWhiteCard8" id="LocalWhiteCard8" class="form-control" value="<?php echo $obj['LocalWhiteCard'][8];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>LocalWhiteCard9</label>
+											<label>Local White Card9</label>
 											<input type="text" name="LocalWhiteCard9" id="LocalWhiteCard9" class="form-control" value="<?php echo $obj['LocalWhiteCard'][9];?>">
 										</div>
 <?php /*										<div class="form-group" style="display:<?php echo $am111;?>">
@@ -336,7 +365,7 @@ img {
 <?php if($obj['ChargingInfo1']){ $idx++;?>
 								<!--Charging Information-->
 								<article class="envor-sorting-item css">
-									<header><?php echo $lang->showWord("charging_information").$idx; ?><i class="fa fa-plus"></i></header>
+									<header><?php echo $connectorType1." ".$lang->showWord("charging_information").$idx; ?><i class="fa fa-plus"></i></header>
 									<section>
 										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>User Id</label>
@@ -344,72 +373,72 @@ img {
 											<input type="hidden" name="UserId1" id="UserId1" value="<?php echo $obj['ChargingInfo1']['StartUserId'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>StartDateTime</label>
+											<label>Start Date Time</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['StartDateTime'];?>">
 											<input type="hidden" name="StartDateTime1" id="StartDateTime1" value="<?php echo $obj['ChargingInfo1']['StartDateTime'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>StopDateTime</label>
+											<label>Stop Date Time</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['StopDateTime'];?>">
 											<input type="hidden" name="StopDateTime1" id="StopDateTime1" value="<?php echo $obj['ChargingInfo1']['StopDateTime'];?>">
 										</div>
-										<div class="form-group" style="display:<?php echo $am111;?>">
+<?php /*										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>StartMethod</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['StartMethod'];?>">
 											<input type="hidden" name="StartMethod1" id="StartMethod1" value="<?php echo $obj['ChargingInfo1']['StartMethod'];?>">
-										</div>
+										</div>*/?>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>SystemStatus</label>
+											<label>System Status</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $SystemStatus1;?>">
 											<input type="hidden" name="SystemStatus1" id="SystemStatus1" value="<?php echo $obj['ChargingInfo1']['SystemStatus'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>ConnectorTemp</label>
+											<label>Connector Temperature</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['ConnectorTemp'];?> ℃">
 											<input type="hidden" name="ConnectorTemp1" id="ConnectorTemp1" value="<?php echo $obj['ChargingInfo1']['ConnectorTemp'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>PresentChargingVoltage</label>
+											<label>Present Charging Voltage</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargingVoltage'];?> volt">
 											<input type="hidden" name="PresentChargingVoltage1" id="PresentChargingVoltage1" value="<?php echo $obj['ChargingInfo1']['PresentChargingVoltage'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>PresentChargingCurrent</label>
+											<label>Present Charging Current</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargingCurrent'];?> amp">
 											<input type="hidden" name="PresentChargingCurrent1" id="PresentChargingCurrent1" value="<?php echo $obj['ChargingInfo1']['PresentChargingCurrent'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>PresentChargingPower</label>
+											<label>Present Charging Power</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargingPower'];?> kW">
 											<input type="hidden" name="PresentChargingPower1" id="PresentChargingPower1" value="<?php echo $obj['ChargingInfo1']['PresentChargingPower'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>PresentChargedEnergy</label>
+											<label>Present Charged Energy</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargedEnergy'];?> kWh">
 											<input type="hidden" name="PresentChargedEnergy1" id="PresentChargedEnergy1" value="<?php echo $obj['ChargingInfo1']['PresentChargedEnergy'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>PresentChargedDuration</label>
+											<label>Present Charged Duration</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargedDuration'];?> seconds">
 											<input type="hidden" name="PresentChargedDuration1" id="PresentChargedDuration1" value="<?php echo $obj['ChargingInfo1']['PresentChargedDuration'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>RemainChargingDuration</label>
+											<label>Remain Charging Time</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['RemainChargingDuration'];?> seconds">
 											<input type="hidden" name="RemainChargingDuration1" id="RemainChargingDuration1" value="<?php echo $obj['ChargingInfo1']['RemainChargingDuration'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>EvBatteryMaxVoltage</label>
+											<label>Ev Battery Max Voltage</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['EvBatteryMaxVoltage'];?> volt">
 											<input type="hidden" name="EvBatteryMaxVoltage1" id="EvBatteryMaxVoltage1" value="<?php echo $obj['ChargingInfo1']['EvBatteryMaxVoltage'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>EvBatterytargetVoltage</label>
+											<label>Ev Battery Target Voltage</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['EvBatterytargetVoltage'];?> volt">
 											<input type="hidden" name="EvBatterytargetVoltage1" id="EvBatterytargetVoltage1" value="<?php echo $obj['ChargingInfo1']['EvBatterytargetVoltage'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>EvBatterySoc</label>
+											<label>Ev Battery Soc</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['EvBatterySoc'];?>">
 											<input type="hidden" name="EvBatterySoc1" id="EvBatterySoc1" value="<?php echo $obj['ChargingInfo1']['EvBatterySoc'];?>">
 										</div>
@@ -419,7 +448,7 @@ img {
 <?php if($obj['ChargingInfo2']){ $idx++;?>
 								<!--Charging Information-->
 								<article class="envor-sorting-item css">
-									<header><?php echo $lang->showWord("charging_information").$idx; ?><i class="fa fa-plus"></i></header>
+									<header><?php echo $connectorType2." ".$lang->showWord("charging_information").$idx; ?><i class="fa fa-plus"></i></header>
 									<section>
 										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>User Id</label>
@@ -427,72 +456,72 @@ img {
 											<input type="hidden" name="UserId2" id="UserId2" value="<?php echo $obj['ChargingInfo2']['StartUserId'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>StartDateTime</label>
+											<label>Start Date Time</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['StartDateTime'];?>">
 											<input type="hidden" name="StartDateTime2" id="StartDateTime2" value="<?php echo $obj['ChargingInfo2']['StartDateTime'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>StopDateTime</label>
+											<label>Stop Date Time</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['StopDateTime'];?>">
 											<input type="hidden" name="StopDateTime2" id="StopDateTime2" value="<?php echo $obj['ChargingInfo2']['StopDateTime'];?>">
 										</div>
-										<div class="form-group" style="display:<?php echo $am111;?>">
+<?php /*										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>StartMethod</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['StartMethod'];?>">
 											<input type="hidden" name="StartMethod2" id="StartMethod2" value="<?php echo $obj['ChargingInfo2']['StartMethod'];?>">
-										</div>
+										</div>*/?>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>SystemStatus</label>
+											<label>System Status</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $SystemStatus2;?>">
 											<input type="hidden" name="SystemStatus2" id="SystemStatus2" value="<?php echo $obj['ChargingInfo2']['SystemStatus'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>ConnectorTemp</label>
+											<label>Connector Temperature</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['ConnectorTemp'];?> ℃">
 											<input type="hidden" name="ConnectorTemp2" id="ConnectorTemp2" value="<?php echo $obj['ChargingInfo2']['ConnectorTemp'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>PresentChargingVoltage</label>
+											<label>Present Charging Voltage</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargingVoltage'];?> volt">
 											<input type="hidden" name="PresentChargingVoltage2" id="PresentChargingVoltage2" value="<?php echo $obj['ChargingInfo2']['PresentChargingVoltage'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>PresentChargingCurrent</label>
+											<label>Present Charging Current</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargingCurrent'];?> amp">
 											<input type="hidden" name="PresentChargingCurrent2" id="PresentChargingCurrent2" value="<?php echo $obj['ChargingInfo2']['PresentChargingCurrent'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>PresentChargingPower</label>
+											<label>Present Charging Power</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargingPower'];?> kW">
 											<input type="hidden" name="PresentChargingPower2" id="PresentChargingPower2" value="<?php echo $obj['ChargingInfo2']['PresentChargingPower'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>PresentChargedEnergy</label>
+											<label>Present Charged Energy</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargedEnergy'];?> kWh">
 											<input type="hidden" name="PresentChargedEnergy2" id="PresentChargedEnergy2" value="<?php echo $obj['ChargingInfo2']['PresentChargedEnergy'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>PresentChargedDuration</label>
+											<label>Present Charged Duration</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['PresentChargedDuration'];?> seconds">
 											<input type="hidden" name="PresentChargedDuration2" id="PresentChargedDuration2" value="<?php echo $obj['ChargingInfo2']['PresentChargedDuration'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>RemainChargingDuration</label>
+											<label>Remain Charging Time</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['RemainChargingDuration'];?> seconds">
 											<input type="hidden" name="RemainChargingDuration2" id="RemainChargingDuration2" value="<?php echo $obj['ChargingInfo2']['RemainChargingDuration'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>EvBatteryMaxVoltage</label>
+											<label>Ev Battery Max Voltage</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['EvBatteryMaxVoltage'];?> volt">
 											<input type="hidden" name="EvBatteryMaxVoltage2" id="EvBatteryMaxVoltage2" value="<?php echo $obj['ChargingInfo2']['EvBatteryMaxVoltage'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>EvBatterytargetVoltage</label>
+											<label>Ev Battery Target Voltage</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['EvBatterytargetVoltage'];?> volt">
 											<input type="hidden" name="EvBatterytargetVoltage2" id="EvBatterytargetVoltage2" value="<?php echo $obj['ChargingInfo2']['EvBatterytargetVoltage'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>EvBatterySoc</label>
+											<label>Ev Battery Soc</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['EvBatterySoc'];?>">
 											<input type="hidden" name="EvBatterySoc2" id="EvBatterySoc2" value="<?php echo $obj['ChargingInfo2']['EvBatterySoc'];?>">
 										</div>
@@ -502,7 +531,7 @@ img {
 <?php if($obj['ChargingInfo3']){ $idx++;?>
 								<!--Charging Information-->
 								<article class="envor-sorting-item css">
-									<header><?php echo $lang->showWord("charging_information").$idx; ?><i class="fa fa-plus"></i></header>
+									<header><?php echo $connectorType3." ".$lang->showWord("charging_information").$idx; ?><i class="fa fa-plus"></i></header>
 									<section>
 										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>User Id</label>
@@ -510,72 +539,72 @@ img {
 											<input type="hidden" name="UserId3" id="UserId3" value="<?php echo $obj['ChargingInfo3']['StartUserId'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>StartDateTime</label>
+											<label>Start Date Time</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['StartDateTime'];?>">
 											<input type="hidden" name="StartDateTime3" id="StartDateTime3" value="<?php echo $obj['ChargingInfo3']['StartDateTime'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>StopDateTime</label>
+											<label>Stop Date Time</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['StopDateTime'];?>">
 											<input type="hidden" name="StopDateTime3" id="StopDateTime3" value="<?php echo $obj['ChargingInfo3']['StopDateTime'];?>">
 										</div>
-										<div class="form-group" style="display:<?php echo $am111;?>">
+<?php /*										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>StartMethod</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['StartMethod'];?>">
 											<input type="hidden" name="StartMethod3" id="StartMethod3" value="<?php echo $obj['ChargingInfo3']['StartMethod'];?>">
-										</div>
+										</div>*/?>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>SystemStatus</label>
+											<label>System Status</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $SystemStatus3;?>">
 											<input type="hidden" name="SystemStatus3" id="SystemStatus3" value="<?php echo $obj['ChargingInfo3']['SystemStatus'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>ConnectorTemp</label>
+											<label>Connector Temperature</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['ConnectorTemp'];?> ℃">
 											<input type="hidden" name="ConnectorTemp3" id="ConnectorTemp3" value="<?php echo $obj['ChargingInfo3']['ConnectorTemp'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>PresentChargingVoltage</label>
+											<label>Present Charging Voltage</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargingVoltage'];?> volt">
 											<input type="hidden" name="PresentChargingVoltage3" id="PresentChargingVoltage3" value="<?php echo $obj['ChargingInfo3']['PresentChargingVoltage'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>PresentChargingCurrent</label>
+											<label>Present Charging Current</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargingCurrent'];?> amp">
 											<input type="hidden" name="PresentChargingCurrent3" id="PresentChargingCurrent3" value="<?php echo $obj['ChargingInfo3']['PresentChargingCurrent'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>PresentChargingPower</label>
+											<label>Present Charging Power</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargingPower'];?> kW">
 											<input type="hidden" name="PresentChargingPower3" id="PresentChargingPower3" value="<?php echo $obj['ChargingInfo3']['PresentChargingPower'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>PresentChargedEnergy</label>
+											<label>Present Charged Energy</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargedEnergy'];?> kWh">
 											<input type="hidden" name="PresentChargedEnergy3" id="PresentChargedEnergy3" value="<?php echo $obj['ChargingInfo3']['PresentChargedEnergy'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>PresentChargedDuration</label>
+											<label>Present Charged Duration</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['PresentChargedDuration'];?> seconds">
 											<input type="hidden" name="PresentChargedDuration3" id="PresentChargedDuration3" value="<?php echo $obj['ChargingInfo3']['PresentChargedDuration'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>RemainChargingDuration</label>
+											<label>Remain Charging Time</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['RemainChargingDuration'];?> seconds">
 											<input type="hidden" name="RemainChargingDuration3" id="RemainChargingDuration3" value="<?php echo $obj['ChargingInfo3']['RemainChargingDuration'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>EvBatteryMaxVoltage</label>
+											<label>Ev Battery Max Voltage</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['EvBatteryMaxVoltage'];?> volt">
 											<input type="hidden" name="EvBatteryMaxVoltage3" id="EvBatteryMaxVoltage3" value="<?php echo $obj['ChargingInfo3']['EvBatteryMaxVoltage'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>EvBatterytargetVoltage</label>
+											<label>Ev Battery Target Voltage</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['EvBatterytargetVoltage'];?> volt">
 											<input type="hidden" name="EvBatterytargetVoltage3" id="EvBatterytargetVoltage3" value="<?php echo $obj['ChargingInfo3']['EvBatterytargetVoltage'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>EvBatterySoc</label>
+											<label>Ev Battery Soc</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['EvBatterySoc'];?>">
 											<input type="hidden" name="EvBatterySoc3" id="EvBatterySoc3" value="<?php echo $obj['ChargingInfo3']['EvBatterySoc'];?>">
 										</div>
@@ -602,6 +631,7 @@ img {
 	document.getElementById("save").onclick = function() {
 		if(formCheck())
 		{
+			window.location="#loadinghref";
 			document.getElementById("loading").style.display="block";
 			// 發送 Ajax 查詢請求並處理
 			var request = new XMLHttpRequest();
@@ -648,13 +678,73 @@ img {
 	
 	function formCheck()
 	{
+		var LocalWhiteCard0 = document.getElementById("LocalWhiteCard0").value;
+		var LocalWhiteCard1 = document.getElementById("LocalWhiteCard1").value;
+		var LocalWhiteCard2 = document.getElementById("LocalWhiteCard2").value;
+		var LocalWhiteCard3 = document.getElementById("LocalWhiteCard3").value;
+		var LocalWhiteCard4 = document.getElementById("LocalWhiteCard4").value;
+		var LocalWhiteCard5 = document.getElementById("LocalWhiteCard5").value;
+		var LocalWhiteCard6 = document.getElementById("LocalWhiteCard6").value;
+		var LocalWhiteCard7 = document.getElementById("LocalWhiteCard7").value;
+		var LocalWhiteCard8 = document.getElementById("LocalWhiteCard8").value;
+		var LocalWhiteCard9 = document.getElementById("LocalWhiteCard9").value;
 		var RatingCurrent = document.getElementById("RatingCurrent").value;
 		var RatingPower = document.getElementById("RatingPower").value;
 		var MaxChargingEnergy = document.getElementById("MaxChargingEnergy").value;
 		var MaxChargingPower = document.getElementById("MaxChargingPower").value;
 		var MaxChargingCurrent = document.getElementById("MaxChargingCurrent").value;
 		var MaxChargingDuration = document.getElementById("MaxChargingDuration").value;
-		 
+		
+		if(LocalWhiteCard0 != ""){
+			if(LocalWhiteCard0.length>32){
+				alert("Local White Card0 must be less than 32 bytes!");
+			}
+		}
+		if(LocalWhiteCard1 != ""){
+			if(LocalWhiteCard1.length>32){
+				alert("Local White Card1 must be less than 32 bytes!");
+			}
+		}
+		if(LocalWhiteCard2 != ""){
+			if(LocalWhiteCard2.length>32){
+				alert("Local White Card2 must be less than 32 bytes!");
+			}
+		}
+		if(LocalWhiteCard3 != ""){
+			if(LocalWhiteCard3.length>32){
+				alert("Local White Card3 must be less than 32 bytes!");
+			}
+		}
+		if(LocalWhiteCard4 != ""){
+			if(LocalWhiteCard4.length>32){
+				alert("Local White Card4 must be less than 32 bytes!");
+			}
+		}
+		if(LocalWhiteCard5 != ""){
+			if(LocalWhiteCard5.length>32){
+				alert("Local White Card5 must be less than 32 bytes!");
+			}
+		}
+		if(LocalWhiteCard6 != ""){
+			if(LocalWhiteCard6.length>32){
+				alert("Local White Card6 must be less than 32 bytes!");
+			}
+		}
+		if(LocalWhiteCard7 != ""){
+			if(LocalWhiteCard7.length>32){
+				alert("Local White Card7 must be less than 32 bytes!");
+			}
+		}
+		if(LocalWhiteCard8 != ""){
+			if(LocalWhiteCard8.length>32){
+				alert("Local White Card8 must be less than 32 bytes!");
+			}
+		}
+		if(LocalWhiteCard9 != ""){
+			if(LocalWhiteCard9.length>32){
+				alert("Local White Card9 must be less than 32 bytes!");
+			}
+		}
 		if(MaxChargingEnergy >65535)
 		{
 			alert("MaxChargingEnergy must <= 65535!");

+ 21 - 0
EVSE/rootfs/var/www/set_charging_action.php

@@ -12,6 +12,16 @@
 
 	// 新建員工
 	function create() {
+		checkLength("LocalWhiteCard0");
+		checkLength("LocalWhiteCard1");
+		checkLength("LocalWhiteCard2");
+		checkLength("LocalWhiteCard3");
+		checkLength("LocalWhiteCard4");
+		checkLength("LocalWhiteCard5");
+		checkLength("LocalWhiteCard6");
+		checkLength("LocalWhiteCard7");
+		checkLength("LocalWhiteCard8");
+		checkLength("LocalWhiteCard9");
 		checkMaxValue("MaxChargingEnergy");
 		checkMaxValue("MaxChargingPower");
 		checkMaxValue("MaxChargingCurrent");
@@ -99,4 +109,15 @@
 		}
 	}
 
+	function checkLength($id){
+		if($_POST[$id] != ""){
+			if(strlen($_POST[$id])>32){
+					$jsone['result'] = "Fail";
+					$jsone['message'] = "You have entered a wrong value on " . $id . ", it should be less than 32 bytes";
+					echo json_encode($jsone);
+					exit;
+			}
+		}
+	}
+
 ?>

+ 39 - 38
EVSE/rootfs/var/www/set_network.php

@@ -93,7 +93,7 @@ img {
 		<!--
 		Main Content start
 		//-->
-		<div id="loading" style="display:none;"><img src="img/giphy.gif"/></div>
+		<a id="loadinghref"><div id="loading" style="display:none;"><img src="img/giphy.gif"/></div></a>
 		<section class="envor-section">
 			<div class="container">
 				<div class="row">
@@ -105,14 +105,14 @@ img {
 									<header><?php echo $lang->showWord("network_status"); ?><i class="fa fa-plus"></i></header>
 									<section>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>InternetConn</label>
+											<label>Internet Connection Status</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $InternetConn;?>">
 											<input type="hidden" name="InternetConn" id="InternetConn" value="<?php echo $obj->{'InternetConn'};?>">
 										</div>
-										<div class="form-group" style="display:<?php echo $am101;?>">
+<?php /*										<div class="form-group" style="display:<?php echo $am101;?>">
 											<label>FtpServer</label>
 											<input type="text" name="FtpServer" id="FtpServer" class="form-control" value="<?php echo $obj->{'FtpServer'};?>">
-										</div>
+										</div>*/?>
 									</section>
 								</article>
 								<!--Ethernet Interface0-->
@@ -120,32 +120,32 @@ img {
 									<header><?php echo $lang->showWord("ethernet_interface"); ?><i class="fa fa-plus"></i></header>
 									<section>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>Eth0DhcpClient</label>
+											<label>Dhcp Client</label>
 											<select class="form-control" id="Eth0DhcpClient" name="Eth0DhcpClient">
 												<option value="0" <?php echo $obj->{'Eth0DhcpClient'}=="0"?"selected":""?>>enable</option>
 												<option value="1" <?php echo $obj->{'Eth0DhcpClient'}=="1"?"selected":""?>>disable</option>
 											</select>
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>Eth0MacAddress</label>
+											<label>Mac Address</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'Eth0MacAddress'};?>">
 											<input type="hidden" name="Eth0MacAddress" id="Eth0MacAddress" value="<?php echo $obj->{'Eth0MacAddress'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>Eth0IpAddress</label>
+											<label>Ip Address</label>
 											<input type="text" name="Eth0IpAddress" id="Eth0IpAddress" class="form-control" value="<?php echo $obj->{'Eth0IpAddress'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>Eth0SubmaskAddress</label>
+											<label>Submask Address</label>
 											<input type="text" name="Eth0SubmaskAddress" id="Eth0SubmaskAddress" class="form-control" value="<?php echo $obj->{'Eth0SubmaskAddress'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>Eth0GatewayAddress</label>
+											<label>Gateway Address</label>
 											<input type="text" name="Eth0GatewayAddress" id="Eth0GatewayAddress" class="form-control" value="<?php echo $obj->{'Eth0GatewayAddress'};?>">
 										</div>
 									</section>
 								</article>
-								<!--Ethernet Interface1-->
+<?php /*								<!--Ethernet Interface1-->
 								<article class="envor-sorting-item css">
 									<header><?php echo $lang->showWord("ethernet_interface"); ?><i class="fa fa-plus"></i></header>
 									<section>
@@ -174,66 +174,66 @@ img {
 											<input type="text" name="Eth1GatewayAddress" id="Eth1GatewayAddress" class="form-control" value="<?php echo $obj->{'Eth1GatewayAddress'};?>">
 										</div>
 									</section>
-								</article>
+								</article>*/?>
 								<!--WiFi Module-->
 								<article class="envor-sorting-item css">
 									<header><?php echo $lang->showWord("WiFi_module"); ?><i class="fa fa-plus"></i></header>
 									<section>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>WifiMode</label>
+											<label>Mode</label>
 											<select class="form-control" id="WifiMode" name="WifiMode">
 												<option value="0" <?php echo $obj->{'WifiMode'}=="0"?"selected":""?>>disable</option>
-												<option value="1" <?php echo $obj->{'WifiMode'}=="1"?"selected":""?>>Infrastructure client</option>
-												<option value="2" <?php echo $obj->{'WifiMode'}=="2"?"selected":""?>>Infrastructure server</option>
-												<option value="3" <?php echo $obj->{'WifiMode'}=="3"?"selected":""?>>Ad-Hoc</option>
+												<option value="1" <?php echo $obj->{'WifiMode'}=="1"?"selected":""?>>station</option>
+<?php /*												<option value="2" <?php echo $obj->{'WifiMode'}=="2"?"selected":""?>>Acess Point</option>
+												<option value="3" <?php echo $obj->{'WifiMode'}=="3"?"selected":""?>>Ad-Hoc</option>*/?>
 											</select>
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>WifiSsid</label>
+											<label>SSID</label>
 											<input type="text" name="WifiSsid" id="WifiSsid" class="form-control" value="<?php echo $obj->{'WifiSsid'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>WifiPassword</label>
+											<label>Password</label>
 											<input type="text" name="WifiPassword" id="WifiPassword" class="form-control" value="<?php echo $obj->{'WifiPassword'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>WifiRssi</label>
+											<label>RSSI</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'WifiRssi'};?> dBm">
 											<input type="hidden" name="WifiRssi" id="WifiRssi" value="<?php echo $obj->{'WifiRssi'};?>">
 										</div>
-										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>WifiDhcpServer</label>
+<?php /*										<div class="form-group" style="display:<?php echo $am101;?>">
+											<label>Dhcp Server</label>
 											<select class="form-control" id="WifiDhcpServer" name="WifiDhcpServer">
 												<option value="0" <?php echo $obj->{'WifiDhcpServer'}=="0"?"selected":""?>>enable</option>
 												<option value="1" <?php echo $obj->{'WifiDhcpServer'}=="1"?"selected":""?>>disable</option>
 											</select>
-										</div>
+										</div>*/?>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>WifiDhcpClient</label>
+											<label>Dhcp Client</label>
 											<select class="form-control" id="WifiDhcpClient" name="WifiDhcpClient">
 												<option value="0" <?php echo $obj->{'WifiDhcpClient'}=="0"?"selected":""?>>enable</option>
 												<option value="1" <?php echo $obj->{'WifiDhcpClient'}=="1"?"selected":""?>>disable</option>
 											</select>
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>WifiMacAddress</label>
+											<label>Mac Address</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'WifiMacAddress'};?>">
 											<input type="hidden" name="WifiMacAddress" id="WifiMacAddress" value="<?php echo $obj->{'WifiMacAddress'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>WifiIpAddress</label>
+											<label>Ip Address</label>
 											<input type="text" name="WifiIpAddress" id="WifiIpAddress" class="form-control" value="<?php echo $obj->{'WifiIpAddress'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>WifiSubmaskAddress</label>
+											<label>Submask Address</label>
 											<input type="text" name="WifiSubmaskAddress" id="WifiSubmaskAddress" class="form-control" value="<?php echo $obj->{'WifiSubmaskAddress'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>WifiGatewayAddress</label>
+											<label>Gateway Address</label>
 											<input type="text" name="WifiGatewayAddress" id="WifiGatewayAddress" class="form-control" value="<?php echo $obj->{'WifiGatewayAddress'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>WifiNetworkConn</label>
+											<label>Network Connection Status</label>
 											<input type="text" readonly class="form-control" value="<?php echo $WifiNetworkConn;?>">
 											<input type="hidden" name="WifiNetworkConn" id="WifiNetworkConn" value="<?php echo $obj->{'WifiNetworkConn'};?>">
 										</div>
@@ -244,53 +244,53 @@ img {
 									<header><?php echo $lang->showWord("3G/4G_module"); ?><i class="fa fa-plus"></i></header>
 									<section>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>TelcomApn</label>
+											<label>APN</label>
 											<input type="text" name="TelcomApn" id="TelcomApn" class="form-control" value="<?php echo $obj->{'TelcomApn'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>TelcomRssi</label>
+											<label>RSSI</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'TelcomRssi'};?> dBm">
 											<input type="hidden" name="TelcomRssi" id="TelcomRssi" value="<?php echo $obj->{'TelcomRssi'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>TelcomChapPapId</label>
+											<label>Chap Pap Id</label>
 											<input type="text" name="TelcomChapPapId" id="TelcomChapPapId" class="form-control" value="<?php echo $obj->{'TelcomChapPapId'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>TelcomChapPapPwd</label>
+											<label>Chap Pap Pwd</label>
 											<input type="text" name="TelcomChapPapPwd" id="TelcomChapPapPwd" class="form-control" value="<?php echo $obj->{'TelcomChapPapPwd'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>TelcomModemImei</label>
+											<label>Modem IMEI</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'TelcomModemImei'};?>">
 											<input type="hidden" name="TelcomModemImei" id="TelcomModemImei" value="<?php echo $obj->{'TelcomModemImei'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>TelcomSimImsi</label>
+											<label>Sim IMSI</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'TelcomSimImsi'};?>">
 											<input type="hidden" name="TelcomSimImsi" id="TelcomSimImsi" value="<?php echo $obj->{'TelcomSimImsi'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>TelcomSimIccid</label>
+											<label>Sim Iccid</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'TelcomSimIccid'};?>">
 											<input type="hidden" name="TelcomSimIccid" id="TelcomSimIccid" value="<?php echo $obj->{'TelcomSimIccid'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>TelcomSimStatus</label>
+											<label>Sim Status</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $TelcomSimStatus;?>">
 											<input type="hidden" name="TelcomSimStatus" id="TelcomSimStatus" value="<?php echo $obj->{'TelcomSimStatus'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>TelcomModemMode</label>
+											<label>Modem Mode</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $TelcomModemMode;?>">
 											<input type="hidden" name="TelcomModemMode" id="TelcomModemMode" value="<?php echo $obj->{'TelcomModemMode'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>TelcomIpAddress</label>
+											<label>Ip Address</label>
 											<input type="text" name="TelcomIpAddress" id="TelcomIpAddress" class="form-control" value="<?php echo $obj->{'TelcomIpAddress'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am101;?>">
-											<label>TelcomNetworkConn</label>
+											<label>Network Connection Status</label>
 											<input type="text" readonly class="form-control" value="<?php echo $TelcomNetworkConn;?>">
 											<input type="hidden" name="TelcomNetworkConn" id="TelcomNetworkConn" value="<?php echo $obj->{'TelcomNetworkConn'};?>">
 										</div>
@@ -342,6 +342,7 @@ img {
 	document.getElementById("save").onclick = function() {
 		if(formCheck())
 		{
+			window.location="#loadinghref";
 			document.getElementById("loading").style.display="block";
 			// 發送 Ajax 查詢請求並處理
 			var request = new XMLHttpRequest();

+ 76 - 62
EVSE/rootfs/var/www/set_system.php

@@ -42,7 +42,7 @@ img {
 		<!--
 		Main Content start
 		//-->
-		<div id="loading" style="display:none;"><img src="img/giphy.gif"/></div>
+		<a id="loadinghref"><div id="loading" style="display:none;"><img src="img/giphy.gif"/></div></a>
 		<section class="envor-section">
 			<div class="container">
 				<div class="row">
@@ -69,7 +69,7 @@ img {
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>System DateTime</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo date('Y-m-d H:i:s');?>"><br>
+											<input type="text" readonly class="form-control" placeholder="<?php echo date('Y-m-d H:i:s');?>" id="SystemDateTime"><br>
 											<div class='input-group date' id='datetimepicker1'>
 												<input type='text' class="form-control" name="SystemDateTime" id='SystemDateTime' />
 												<span class="input-group-addon">
@@ -85,25 +85,28 @@ img {
 												<option value="3" <?php echo $obj->{'AcPhaseCount'}=="3"?"selected":""?>>Three phase</option>
 											</select>
 										</div>*/?>
-										<div class="form-group" style="display:<?php echo $am111;?>">
+<?php /*										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>AcPhaseCount</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $AcPhaseCount;?>">
-										</div>
+										</div>*/?>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>Factory Configuration</label>
-											<select class="form-control" id="FactoryConfiguration" name="FactoryConfiguration">
+											<label>
+											<input type="checkbox" id="FactoryConfiguration" name="FactoryConfiguration" checked="<?php echo $obj->{'FactoryConfiguration'}=="1"?"checked":"";?>">
+											Factory Default Configuration</label>
+<?php /*											<select class="form-control" id="FactoryConfiguration" name="FactoryConfiguration">
 												<option value="0" <?php echo $obj->{'FactoryConfiguration'}=="0"?"selected":""?>>Normal</option>
 												<option value="1" <?php echo $obj->{'FactoryConfiguration'}=="1"?"selected":""?>>Trigger</option>
-											</select>
+											</select>*/?>
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>Authorisation Mode</label>
-											<select type="text" class="form-control" id="AuthorisationMode" name="AuthorisationMode">
+											<select type="text" class="form-control" id="AuthorisationMode" name="AuthorisationMode" onchange="AuthorisationMode_changed(this.id);">
 												<option value="0" <?php echo $obj->{'AuthorisationMode'}=="0"?"selected":""?>>OCPP backend</option>
 												<option value="1" <?php echo $obj->{'AuthorisationMode'}=="1"?"selected":""?>>free mode</option>
 											</select>
+											<label id="AuthorisationModeText" style="display:none;">You should set parameter about OCPP after this setting</label>
 										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
+<?php /*										<div class="form-group" style="display:<?php echo $am001;?>">
 											<label>Default Language</label>
 											<select class="form-control" id="DefaultLanguage" name="DefaultLanguage">
 												<option value="0" <?php echo $obj->{'DefaultLanguage'}=="0"?"selected":""?>>English</option>
@@ -121,54 +124,54 @@ img {
 												<option value="12" <?php echo $obj->{'DefaultLanguage'}=="12"?"selected":""?>>Pусский</option>
 												<option value="13" <?php echo $obj->{'DefaultLanguage'}=="13"?"selected":""?>> ไทย</option>
 											</select>
-										</div>
+										</div>*/?>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>InputVoltageR</label>
+											<label>Input Voltage R</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'InputVoltageR'};?> volt">
 											<input type="hidden" name="InputVoltageR" id="InputVoltageR" value="<?php echo $obj->{'InputVoltageR'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>InputVoltageS</label>
+											<label>Input Voltage S</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'InputVoltageS'};?> volt">
 											<input type="hidden" name="InputVoltageS" id="InputVoltageS" value="<?php echo $obj->{'InputVoltageS'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>InputVoltageT</label>
+											<label>Input Voltage T</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'InputVoltageT'};?> volt">
 											<input type="hidden" name="InputVoltageT" id="InputVoltageT" value="<?php echo $obj->{'InputVoltageT'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>SystemFanRotaSpeed</label>
+											<label>System Fan Speed</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'SystemFanRotaSpeed'};?> RPM">
 											<input type="hidden" name="SystemFanRotaSpeed" id="SystemFanRotaSpeed" value="<?php echo $obj->{'SystemFanRotaSpeed'};?>">
 										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
+<?php /*										<div class="form-group" style="display:<?php echo $am001;?>">
 											<label>PsuFanRotaSpeed</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'PsuFanRotaSpeed'};?> RPM">
 											<input type="hidden" name="PsuFanRotaSpeed" id="PsuFanRotaSpeed" value="<?php echo $obj->{'PsuFanRotaSpeed'};?>">
-										</div>
+										</div>*/?>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>RfidCardNumEndian</label>
+											<label>Rfid Card Num Endian</label>
 											<select class="form-control" id="RfidCardNumEndian" name="RfidCardNumEndian">
 												<option value="0" <?php echo $obj->{'RfidCardNumEndian'}=="0"?"selected":""?>>little endian</option>
 												<option value="1" <?php echo $obj->{'RfidCardNumEndian'}=="1"?"selected":""?>>big endian</option>
 											</select>
 										</div>
 										<div class="form-group" style="display:<?php echo $am120;?>">
-											<label>PsuAcInputType</label>
+											<label>Psu Ac Input Type</label>
 											<select class="form-control" id="PsuAcInputType" name="PsuAcInputType">
 												<option value="0" <?php echo $obj->{'PsuAcInputType'}=="0"?"selected":""?>>220~230 +/- 15%</option>
 												<option value="1" <?php echo $obj->{'PsuAcInputType'}=="1"?"selected":""?>>277 +10%/-15%</option>
 											</select>
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>RatingCurrent</label>
+											<label>Rating Current</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'RatingCurrent'};?> amp">
 											<input type="hidden" name="RatingCurrent" id="RatingCurrent" value="<?php echo $obj->{'RatingCurrent'};?>">
 										</div>
 									</section>
 								</article>
-								<!--Aux. power Information-->
+<?php /*								<!--Aux. power Information-->
 								<article class="envor-sorting-item css" style="display:<?php echo $am001;?>">
 									<header><?php echo $lang->showWord("aux_power_information"); ?><i class="fa fa-plus"></i></header>
 									<section>
@@ -193,37 +196,37 @@ img {
 											<input type="hidden" name="AuxPower48V" id="AuxPower48V" value="<?php echo $obj->{'AuxPower48V'};?>">
 										</div>
 									</section>
-								</article>
+								</article>*/?>
 								<!--Version Information-->
 								<article class="envor-sorting-item css">
 									<header><?php echo $lang->showWord("version_information"); ?><i class="fa fa-plus"></i></header>
 									<section>
-										<div class="form-group" style="display:<?php echo $am111;?>">
+<?php /*										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>CsuHwRev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'CsuHwRev'};?>">
 											<input type="hidden" name="CsuHwRev" id="CsuHwRev" value="<?php echo $obj->{'CsuHwRev'};?>">
-										</div>
+										</div>*/?>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>CsuBootLoadFwRev</label>
+											<label>Csu Boot Load Fw Rev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'CsuBootLoadFwRev'};?>">
 											<input type="hidden" name="CsuBootLoadFwRev" id="CsuBootLoadFwRev" value="<?php echo $obj->{'CsuBootLoadFwRev'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>CsuKernelFwRev</label>
+											<label>Csu Kernel Fw Rev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'CsuKernelFwRev'};?>">
 											<input type="hidden" name="CsuKernelFwRev" id="CsuKernelFwRev" value="<?php echo $obj->{'CsuKernelFwRev'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>CsuRootFsFwRev</label>
+											<label>Csu Root Fs Fw Rev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'CsuRootFsFwRev'};?>">
 											<input type="hidden" name="CsuRootFsFwRev" id="CsuRootFsFwRev" value="<?php echo $obj->{'CsuRootFsFwRev'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>CsuPrimFwRev</label>
+											<label>Csu Prim Fw Rev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'CsuPrimFwRev'};?>">
 											<input type="hidden" name="CsuPrimFwRev" id="CsuPrimFwRev" value="<?php echo $obj->{'CsuPrimFwRev'};?>">
 										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
+<?php /*										<div class="form-group" style="display:<?php echo $am001;?>">
 											<label>LcmHwRev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'LcmHwRev'};?>">
 											<input type="hidden" name="LcmHwRev" id="LcmHwRev" value="<?php echo $obj->{'LcmHwRev'};?>">
@@ -237,18 +240,18 @@ img {
 											<label>PsuHwRev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'PsuHwRev'};?>">
 											<input type="hidden" name="PsuHwRev" id="PsuHwRev" value="<?php echo $obj->{'PsuHwRev'};?>">
-										</div>
+										</div>*/?>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>PsuPrimFwRev</label>
+											<label>Psu Prim Fw Rev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'PsuPrimFwRev'};?>">
 											<input type="hidden" name="PsuPrimFwRev" id="PsuPrimFwRev" value="<?php echo $obj->{'PsuPrimFwRev'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>PsuSecFwRev</label>
+											<label>Psu Sec Fw Rev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'PsuSecFwRev'};?>">
 											<input type="hidden" name="PsuSecFwRev" id="PsuSecFwRev" value="<?php echo $obj->{'PsuSecFwRev'};?>">
 										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
+<?php /*										<div class="form-group" style="display:<?php echo $am001;?>">
 											<label>AuxPwrHwRev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'AuxPwrHwRev'};?>">
 											<input type="hidden" name="AuxPwrHwRev" id="AuxPwrHwRev" value="<?php echo $obj->{'AuxPwrHwRev'};?>">
@@ -262,50 +265,50 @@ img {
 											<label>FanModuleHwRev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'FanModuleHwRev'};?>">
 											<input type="hidden" name="FanModuleHwRev" id="FanModuleHwRev" value="<?php echo $obj->{'FanModuleHwRev'};?>">
-										</div>
+										</div>*/?>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>FanModuleFwRev</label>
+											<label>Fan Module Fw Rev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'FanModuleFwRev'};?>">
 											<input type="hidden" name="FanModuleFwRev" id="FanModuleFwRev" value="<?php echo $obj->{'FanModuleFwRev'};?>">
 										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
+<?php /*										<div class="form-group" style="display:<?php echo $am001;?>">
 											<label>RelayModuleHwRev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'RelayModuleHwRev'};?>">
 											<input type="hidden" name="RelayModuleHwRev" id="RelayModuleHwRev" value="<?php echo $obj->{'RelayModuleHwRev'};?>">
-										</div>
+										</div>*/?>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>RelayModuleFwRev</label>
+											<label>Relay Module Fw Rev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'RelayModuleFwRev'};?>">
 											<input type="hidden" name="RelayModuleFwRev" id="RelayModuleFwRev" value="<?php echo $obj->{'RelayModuleFwRev'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>TelcomModemFwRev</label>
+											<label>Telcom Modem Fw Rev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'TelcomModemFwRev'};?>">
 											<input type="hidden" name="TelcomModemFwRev" id="TelcomModemFwRev" value="<?php echo $obj->{'TelcomModemFwRev'};?>">
 										</div>
 									</section>
 								</article>
 								<!--Temperature Information-->
-								<article class="envor-sorting-item css">
+<?php /*								<article class="envor-sorting-item css">
 									<header><?php echo $lang->showWord("temperature_information"); ?><i class="fa fa-plus"></i></header>
 									<section>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>SystemAmbientTemp</label>
+											<label>System Ambient Temperature</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'SystemAmbientTemp'};?> ℃">
 											<input type="hidden" name="SystemAmbientTemp" id="SystemAmbientTemp" value="<?php echo $obj->{'SystemAmbientTemp'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>SystemCriticalTemp</label>
+											<label>System Critical Temperature</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'SystemCriticalTemp'};?> ℃">
 											<input type="hidden" name="SystemCriticalTemp" id="SystemCriticalTemp" value="<?php echo $obj->{'SystemCriticalTemp'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>CcsConnectorTemp</label>
+											<label>Ccs Connector Temperature</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'CcsConnectorTemp'};?> ℃">
 											<input type="hidden" name="CcsConnectorTemp" id="CcsConnectorTemp" value="<?php echo $obj->{'CcsConnectorTemp'};?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>PsuAmbientTemp</label>
+											<label>Psu Ambient Temperature</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'PsuAmbientTemp'};?> ℃">
 											<input type="hidden" name="PsuAmbientTemp" id="PsuAmbientTemp" value="<?php echo $obj->{'PsuAmbientTemp'};?>">
 										</div>
@@ -316,7 +319,7 @@ img {
 									<header><?php echo $lang->showWord("connector_plug-in_information"); ?><i class="fa fa-plus"></i></header>
 									<section>
 										<div class="form-group" style="display:<?php echo $am100;?>">
-											<label>AcPlugInTimes</label>
+											<label>Ac PlugIn Times</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'AcPlugInTimes'};?>">
 											<input type="hidden" name="AcPlugInTimes" id="AcPlugInTimes" value="<?php echo $obj->{'AcPlugInTimes'};?>">
 										</div>
@@ -341,7 +344,7 @@ img {
 											<input type="hidden" name="ChademoPlugInTimes" id="ChademoPlugInTimes" value="<?php echo $obj->{'ChademoPlugInTimes'};?>">
 										</div>
 									</section>
-								</article>
+								</article>*/?>
 								<article class="envor-sorting-item css">
 									<div align="center"><button id="save"><?php echo $lang->showWord("set")?></button></div>
 								</article>
@@ -362,12 +365,18 @@ img {
         $("#datetimepicker1").datetimepicker({
 			format:"YYYY-MM-DD HH:mm:ss"
 		});
+//		var t = new Date(document.getElementById("SystemDateTime").placeholder);
+//		var t_s = t.getTime();
+//		t.setTime(t_s + 1000 );//設定新時間比舊時間多一分鐘
+	//	alert(t);
+		setInterval(function(){var t = new Date(document.getElementById("SystemDateTime").placeholder);var t_s = t.getTime();t.setTime(t_s + 1000 );document.getElementById("SystemDateTime").placeholder= t.Format("yyyy-MM-dd hh:mm:ss");}, 1000);
 		
     });
 
 	document.getElementById("save").onclick = function() {
 		if(formCheck())
 		{
+			window.location="#loadinghref";
 			document.getElementById("loading").style.display="block";
 			// 發送 Ajax 查詢請求並處理
 			var request = new XMLHttpRequest();
@@ -426,6 +435,28 @@ img {
 		return result;
 	}
 
+	function AuthorisationMode_changed(id){
+		if(document.getElementById(x).value == "0"){
+			document.getElementById(AuthorisationModeText).style.display="block";
+		}
+	}
+
+	Date.prototype.Format = function (fmt) { //author: meizz 
+		var o = {
+			"M+": this.getMonth() + 1, //月份 
+			"d+": this.getDate(), //日 
+			"h+": this.getHours(), //小时 
+			"m+": this.getMinutes(), //分 
+			"s+": this.getSeconds(), //秒 
+			"q+": Math.floor((this.getMonth() + 3) / 3), //季度 
+			"S": this.getMilliseconds() //毫秒 
+		};
+		if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
+		for (var k in o)
+		if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
+		return fmt;
+	}
+
 	function isNumberKey(evt)
 	{
 		var charCode = (evt.which) ? evt.which : event.keyCode
@@ -435,23 +466,6 @@ img {
 		
 		return true;
 	}
-	function isExistDate(dateStr) { // yyyy/mm/dd
-		var dateObj = dateStr.split('/');
-
-		//列出12個月,每月最大日期限制
-		var limitInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
-
-		var theYear = parseInt(dateObj[0]);
-		var theMonth = parseInt(dateObj[1]);
-		var theDay = parseInt(dateObj[2]);
-		var isLeap = new Date(theYear, 1, 29).getDate() === 29; // 是否為閏年?
-
-		if(isLeap) { // 若為閏年,最大日期限制改為 29
-			limitInMonth[1] = 29;
-		}
 
-		// 比對該日是否超過每個月份最大日期限制
-		return theDay <= limitInMonth[theMonth - 1]
-	}	
 </script>		
 

+ 41 - 36
EVSE/rootfs/var/www/upgrade_iso.php

@@ -2,49 +2,53 @@
 	$tag_header = 'upgrade';
 	include 'head.php';
 ?>
-    <div class="envor-content">
-      <!--
-      Page Title start
-      //-->
-      <section class="envor-page-title-1" data-stellar-background-ratio="0.5">
-        <div class="container">
-          <div class="row">
-            <div class="col-lg-9 col-md-9 col-sm-9">
-              <h1><?php echo $lang->showWord("upgrade"); ?></h1>
-            </div>
-          </div>
-        </div>
-      <!--
-      Page Title end
-      //-->
-      </section>
-      <!--
-        Main Content start
-      //-->
-      <section class="envor-section">
-        <div class="container">
-          <div class="row">
-            <div class="col-lg-12">
-                <h2>Image <?php echo $lang->showWord("upgrade");?></h2>
-				<div class="file-loading"> 
-					<input name="file_iso" id="file_iso" type="file" class="file" data-show-preview="false" data-show-upload="false" <?php //data-allowed-file-extensions='["iso"]' ?>>
+	<div class="envor-content">
+		<!--
+		Page Title start
+		//-->
+		<section class="envor-page-title-1" data-stellar-background-ratio="0.5">
+			<div class="container">
+				<div class="row">
+					<div class="col-lg-9 col-md-9 col-sm-9">
+						<h1><?php echo $lang->showWord("upgrade"); ?></h1>
+					</div>
 				</div>
+			</div>
+		<!--
+		Page Title end
+		//-->
+		</section>
+		<!--
+		Main Content start
+		//-->
+		<a id="loadinghref"><div id="loading" style="display:none;"><img src="img/giphy.gif"/></div></a>
+		<section class="envor-section">
+			<div class="container">
+				<div class="row">
+					<div class="col-lg-12">
+						<h2>Image <?php echo $lang->showWord("upgrade");?></h2>
+						<div class="file-loading"> 
+							<input name="file_iso" id="file_iso" type="file" class="file" data-show-preview="false" data-show-upload="false" <?php //data-allowed-file-extensions='["iso"]' ?>>
+						</div>
 
-				<input type="submit" class="btn btn-primary" id="upload_iso"></button>
-				<input type="reset" class="btn btn-outline-secondary"></button>
-		     </div>
+<?php /*				<input type="submit" class="btn btn-primary" id="upload_iso"></button>
+				<input type="reset" class="btn btn-outline-secondary"></button>*/?>
+								<article class="envor-sorting-item css">
+									<div align="center"><button id="save"><?php echo $lang->showWord("set")?></button></div>
+								</article>
+					</div>
 		
-            <div class="col-lg-12">
-                <h2><?php echo $lang->showWord("upgrade_status");?></h2>
+					<div class="col-lg-12">
+						<h2><?php echo $lang->showWord("upgrade_status");?></h2>
 <!--                <textarea id="description" rows="2" class="form-control" placeholder=""></textarea>-->
-				<p id="createResult"></p>
-            </div>
-          </div>
-        </div>
+						<p id="createResult"></p>
+					</div>
+				</div>
+			</div>
       <!--
       Main Content start
       //-->
-      </section>
+		</section>
 	</div>
 
 <?php 
@@ -56,6 +60,7 @@
 	document.getElementById("upload_iso").onclick = function() {
 		if(formCheck("iso"))
 		{
+			window.location="#loadinghref";
 			var fileInput = document.getElementById('file_iso');
 			
 			// 發送 Ajax 查詢請求並處理