浏览代码

2020-10-14 / ct_chen

Actions:
1. Webservice fix issue about parameter not null

Files:
1. as list
ct_chen 4 年之前
父节点
当前提交
e2469f71db

+ 7 - 7
EVSE/rootfs/var/www/set_backend_action.php

@@ -24,25 +24,25 @@
 		checkValue("OfflinePolicy");
 		checkLength("ChargeBoxId",25);
 		checkLength("chargePointVendor",20);
-		if($_POST['BackendConnTimeout'] != ""){
+		if(isset($_POST['BackendConnTimeout'])){
 			$json['BackendConnTimeout']			= (int)$_POST['BackendConnTimeout'];
 		}
-		if($_POST['OfflinePolicy'] != ""){
+		if(isset($_POST['OfflinePolicy'])){
 			$json['OfflinePolicy']				= (int)$_POST['OfflinePolicy'];
 		}
-		if($_POST['OfflineMaxChargeEnergy'] != ""){
+		if(isset($_POST['OfflineMaxChargeEnergy'])){
 			$json['OfflineMaxChargeEnergy']		= (int)$_POST['OfflineMaxChargeEnergy'];
 		}
-		if($_POST['OfflineMaxChargeDuration'] != ""){
+		if(isset($_POST['OfflineMaxChargeDuration'])){
 			$json['OfflineMaxChargeDuration']	= (int)$_POST['OfflineMaxChargeDuration'];
 		}
-		if($_POST['OcppServerURL'] != ""){
+		if(isset($_POST['OcppServerURL'])){
 			$json['OcppServerURL']				= $_POST['OcppServerURL'];
 		}
-		if($_POST['ChargeBoxId'] != ""){
+		if(isset($_POST['ChargeBoxId'])){
 			$json['ChargeBoxId']				= $_POST['ChargeBoxId'];
 		}
-		if($_POST['chargePointVendor'] != ""){
+		if(isset($_POST['chargePointVendor'])){
 			$json['chargePointVendor']				= $_POST['chargePointVendor'];
 		}
 //		ob_start();

+ 41 - 41
EVSE/rootfs/var/www/set_charging_action.php

@@ -27,127 +27,127 @@
 		checkMaxValue("MaxChargingCurrent");
 		checkMaxValue("AcMaxChargingCurrent");
 		checkMaxValue("MaxChargingDuration");
-		if($_POST['MaxChargingEnergy'] != ""){
+		if(isset($_POST['MaxChargingEnergy'])){
 			$json['MaxChargingEnergy']			= (int)$_POST['MaxChargingEnergy'];
 		}
-		if($_POST['MaxChargingPower'] != ""){
+		if(isset($_POST['MaxChargingPower'])){
 			$json['MaxChargingPower'] 			= (int)$_POST['MaxChargingPower'];
 		}
-		if($_POST['MaxChargingCurrent'] != ""){
+		if(isset($_POST['MaxChargingCurrent'])){
 			$json['MaxChargingCurrent']			= (int)$_POST['MaxChargingCurrent'];
 		}
-		if($_POST['AcMaxChargingCurrent'] != ""){
+		if(isset($_POST['AcMaxChargingCurrent'])){
 			$json['AcMaxChargingCurrent']		= (int)$_POST['AcMaxChargingCurrent'];
 		}
-		if($_POST['MaxChargingDuration'] != ""){
+		if(isset($_POST['MaxChargingDuration'])){
 			$json['MaxChargingDuration'] 		= (int)$_POST['MaxChargingDuration'];
 		}
-		if($_POST['LocalWhiteCard0'] != ""){
+		if(isset($_POST['LocalWhiteCard0'])){
 			$json['LocalWhiteCard0']			= isset($_POST['LocalWhiteCard0'])?$_POST['LocalWhiteCard0']:"";
 		}
-		if($_POST['LocalWhiteCard1'] != ""){
+		if(isset($_POST['LocalWhiteCard1'])){
 			$json['LocalWhiteCard1']	 		= isset($_POST['LocalWhiteCard1'])?$_POST['LocalWhiteCard1']:"";
 		}
-		if($_POST['LocalWhiteCard2'] != ""){
+		if(isset($_POST['LocalWhiteCard2'])){
 			$json['LocalWhiteCard2']			= isset($_POST['LocalWhiteCard2'])?$_POST['LocalWhiteCard2']:"";
 		}
-		if($_POST['LocalWhiteCard3'] != ""){
+		if(isset($_POST['LocalWhiteCard3'])){
 			$json['LocalWhiteCard3']			= isset($_POST['LocalWhiteCard3'])?$_POST['LocalWhiteCard3']:"";
 		}
-		if($_POST['LocalWhiteCard4'] != ""){
+		if(isset($_POST['LocalWhiteCard4'])){
 			$json['LocalWhiteCard4']			= isset($_POST['LocalWhiteCard4'])?$_POST['LocalWhiteCard4']:"";
 		}
-		if($_POST['LocalWhiteCard5'] != ""){
+		if(isset($_POST['LocalWhiteCard5'])){
 			$json['LocalWhiteCard5']			= isset($_POST['LocalWhiteCard5'])?$_POST['LocalWhiteCard5']:"";
 		}
-		if($_POST['LocalWhiteCard6'] != ""){
+		if(isset($_POST['LocalWhiteCard6'])){
 			$json['LocalWhiteCard6']			= isset($_POST['LocalWhiteCard6'])?$_POST['LocalWhiteCard6']:"";
 		}
-		if($_POST['LocalWhiteCard7'] != ""){
+		if(isset($_POST['LocalWhiteCard7'])){
 			$json['LocalWhiteCard7']			= isset($_POST['LocalWhiteCard7'])?$_POST['LocalWhiteCard7']:"";
 		}
-		if($_POST['LocalWhiteCard8'] != ""){
+		if(isset($_POST['LocalWhiteCard8'])){
 			$json['LocalWhiteCard8']			= isset($_POST['LocalWhiteCard8'])?$_POST['LocalWhiteCard8']:"";
 		}
-		if($_POST['LocalWhiteCard9'] != ""){
+		if(isset($_POST['LocalWhiteCard9'])){
 			$json['LocalWhiteCard9']			= isset($_POST['LocalWhiteCard9'])?$_POST['LocalWhiteCard9']:"";
 		}
-		if($_POST['isBilling'] != ""){
+		if(isset($_POST['isBilling'])){
 			$json['isBilling']					= (int)$_POST['isBilling'];
 		}
-		if($_POST['Currency'] != ""){
+		if(isset($_POST['Currency'])){
 			$json['Currency']					= (int)$_POST['Currency'];
 		}
-		if($_POST['Fee0'] != ""){
+		if(isset($_POST['Fee0'])){
 			$json['Fee0']						= isset($_POST['Fee0'])?round($_POST['Fee0'], 2):"";
 		}
-		if($_POST['Fee1'] != ""){
+		if(isset($_POST['Fee1'])){
 			$json['Fee1']						= isset($_POST['Fee1'])?round($_POST['Fee1'], 2):"";
 		}
-		if($_POST['Fee2'] != ""){
+		if(isset($_POST['Fee2'])){
 			$json['Fee2']						= isset($_POST['Fee2'])?round($_POST['Fee2'], 2):"";
 		}
-		if($_POST['Fee3'] != ""){
+		if(isset($_POST['Fee3'])){
 			$json['Fee3']						= isset($_POST['Fee3'])?round($_POST['Fee3'], 2):"";
 		}
-		if($_POST['Fee4'] != ""){
+		if(isset($_POST['Fee4'])){
 			$json['Fee4']						= isset($_POST['Fee4'])?round($_POST['Fee4'], 2):"";
 		}
-		if($_POST['Fee5'] != ""){
+		if(isset($_POST['Fee5'])){
 			$json['Fee5']						= isset($_POST['Fee5'])?round($_POST['Fee5'], 2):"";
 		}
-		if($_POST['Fee6'] != ""){
+		if(isset($_POST['Fee6'])){
 			$json['Fee6']						= isset($_POST['Fee6'])?round($_POST['Fee6'], 2):"";
 		}
-		if($_POST['Fee7'] != ""){
+		if(isset($_POST['Fee7'])){
 			$json['Fee7']						= isset($_POST['Fee7'])?round($_POST['Fee7'], 2):"";
 		}
-		if($_POST['Fee8'] != ""){
+		if(isset($_POST['Fee8'])){
 			$json['Fee8']						= isset($_POST['Fee8'])?round($_POST['Fee8'], 2):"";
 		}
-		if($_POST['Fee9'] != ""){
+		if(isset($_POST['Fee9'])){
 			$json['Fee9']						= isset($_POST['Fee9'])?round($_POST['Fee9'], 2):"";
 		}
-		if($_POST['Fee10'] != ""){
+		if(isset($_POST['Fee10'])){
 			$json['Fee10']						= isset($_POST['Fee10'])?round($_POST['Fee10'], 2):"";
 		}
-		if($_POST['Fee11'] != ""){
+		if(isset($_POST['Fee11'])){
 			$json['Fee11']						= isset($_POST['Fee11'])?round($_POST['Fee11'], 2):"";
 		}
-		if($_POST['Fee12'] != ""){
+		if(isset($_POST['Fee12'])){
 			$json['Fee12']						= isset($_POST['Fee12'])?round($_POST['Fee12'], 2):"";
 		}
-		if($_POST['Fee13'] != ""){
+		if(isset($_POST['Fee13'])){
 			$json['Fee13']						= isset($_POST['Fee13'])?round($_POST['Fee13'], 2):"";
 		}
-		if($_POST['Fee14'] != ""){
+		if(isset($_POST['Fee14'])){
 			$json['Fee14']						= isset($_POST['Fee14'])?round($_POST['Fee14'], 2):"";
 		}
-		if($_POST['Fee15'] != ""){
+		if(isset($_POST['Fee15'])){
 			$json['Fee15']						= isset($_POST['Fee15'])?round($_POST['Fee15'], 2):"";
 		}
-		if($_POST['Fee16'] != ""){
+		if(isset($_POST['Fee16'])){
 			$json['Fee16']						= isset($_POST['Fee16'])?round($_POST['Fee16'], 2):"";
 		}
-		if($_POST['Fee17'] != ""){
+		if(isset($_POST['Fee17'])){
 			$json['Fee17']						= isset($_POST['Fee17'])?round($_POST['Fee17'], 2):"";
 		}
-		if($_POST['Fee18'] != ""){
+		if(isset($_POST['Fee18'])){
 			$json['Fee18']						= isset($_POST['Fee18'])?round($_POST['Fee18'], 2):"";
 		}
-		if($_POST['Fee19'] != ""){
+		if(isset($_POST['Fee19'])){
 			$json['Fee19']						= isset($_POST['Fee19'])?round($_POST['Fee19'], 2):"";
 		}
-		if($_POST['Fee20'] != ""){
+		if(isset($_POST['Fee20'])){
 			$json['Fee20']						= isset($_POST['Fee20'])?round($_POST['Fee20'], 2):"";
 		}
-		if($_POST['Fee21'] != ""){
+		if(isset($_POST['Fee21'])){
 			$json['Fee21']						= isset($_POST['Fee21'])?round($_POST['Fee21'], 2):"";
 		}
-		if($_POST['Fee22'] != ""){
+		if(isset($_POST['Fee22'])){
 			$json['Fee22']						= isset($_POST['Fee22'])?round($_POST['Fee22'], 2):"";
 		}
-		if($_POST['Fee23'] != ""){
+		if(isset($_POST['Fee23'])){
 			$json['Fee23']						= isset($_POST['Fee23'])?round($_POST['Fee23'], 2):"";
 		}
 		

+ 18 - 18
EVSE/rootfs/var/www/set_network_action.php

@@ -25,55 +25,55 @@
 		checkValue("WifiDhcpClient");
 		checkValue("TelcomEnabled");
 		WifiMode_changed();
-		if($_POST['Eth0DhcpClient'] != ""){
+		if(isset($_POST['Eth0DhcpClient'])){
 			$json['Eth0DhcpClient']			= $_POST['Eth0DhcpClient'];
 		}
-		if($_POST['Eth0IpAddress'] != ""){
+		if(isset($_POST['Eth0IpAddress'])){
 			$json['Eth0IpAddress']			= $_POST['Eth0IpAddress'];
 		}
-		if($_POST['Eth0SubmaskAddress'] != ""){
+		if(isset($_POST['Eth0SubmaskAddress'])){
 			$json['Eth0SubmaskAddress']		= $_POST['Eth0SubmaskAddress'];
 		}
-		if($_POST['Eth0GatewayAddress'] != ""){
+		if(isset($_POST['Eth0GatewayAddress'])){
 			$json['Eth0GatewayAddress']		= $_POST['Eth0GatewayAddress'];
 		}
-		if($_POST['WifiMode'] != ""){
+		if(isset($_POST['WifiMode'])){
 			$json['WifiMode']				= $_POST['WifiMode'];
 		}
-		if($_POST['WifiSsid'] != ""){
+		if(isset($_POST['WifiSsid'])){
 			$json['WifiSsid']				= $_POST['WifiSsid'];
 		}
-//		if($_POST['WifiPassword'] != ""){
+		if(isset($_POST['WifiPassword'])){
 			$json['WifiPassword']			= $_POST['WifiPassword'];
-//		}
-		if($_POST['WifiDhcpServer'] != ""){
+		}
+		if(isset($_POST['WifiDhcpServer'])){
 			$json['WifiDhcpServer']			= $_POST['WifiDhcpServer'];
 		}
-		if($_POST['WifiDhcpClient'] != ""){
+		if(isset($_POST['WifiDhcpClient'])){
 			$json['WifiDhcpClient']			= $_POST['WifiDhcpClient'];
 		}
-		if($_POST['WifiIpAddress'] != ""){
+		if(isset($_POST['WifiIpAddress'])){
 			$json['WifiIpAddress']			= $_POST['WifiIpAddress'];
 		}
-		if($_POST['WifiSubmaskAddress'] != ""){
+		if(isset($_POST['WifiSubmaskAddress'])){
 			$json['WifiSubmaskAddress']		= $_POST['WifiSubmaskAddress'];
 		}
-		if($_POST['WifiGatewayAddress'] != ""){
+		if(isset($_POST['WifiGatewayAddress'])){
 			$json['WifiGatewayAddress']		= $_POST['WifiGatewayAddress'];
 		}
-		if($_POST['TelcomApn'] != ""){
+		if(isset($_POST['TelcomApn'])){
 			$json['TelcomApn']				= $_POST['TelcomApn'];
 		}
-		if($_POST['TelcomChapPapId'] != ""){
+		if(isset($_POST['TelcomChapPapId'])){
 			$json['TelcomChapPapId']		= $_POST['TelcomChapPapId'];
 		}
-		if($_POST['TelcomChapPapPwd'] != ""){
+		if(isset($_POST['TelcomChapPapPwd'])){
 			$json['TelcomChapPapPwd']		= $_POST['TelcomChapPapPwd'];
 		}
-		if($_POST['TelcomIpAddress'] != ""){
+		if(isset($_POST['TelcomIpAddress'])){
 			$json['TelcomIpAddress']		= $_POST['TelcomIpAddress'];
 		}
-		if($_POST['TelcomEnabled'] != ""){
+		if(isset($_POST['TelcomEnabled'])){
 			$json['TelcomEnabled']			= $_POST['TelcomEnabled'];
 		}
 

+ 2 - 2
EVSE/rootfs/var/www/set_system.php

@@ -466,10 +466,10 @@ img {
 		DDQRCodeMadeMode_changed(<?php echo $idx2; ?>);
 <?php }} else { ?>
 		if(document.getElementById("ModelName").value.substr(8,1) != "0"){
-			document.getElementById("AcRatingCurrentDiv").style.display="block";
+//			document.getElementById("AcRatingCurrentDiv").style.display="block";
 		}
 		else{
-			document.getElementById("AcRatingCurrentDiv").style.display="none";
+//			document.getElementById("AcRatingCurrentDiv").style.display="none";
 		}
 		isQRCode_clicked();
 		AuthorisationMode_changed();

+ 64 - 63
EVSE/rootfs/var/www/set_system_action.php

@@ -31,194 +31,195 @@
 		checkValue("Intensity",1);
 		checkValue("RfidCardNumEndian",1);
 		checkValue("PsuAcInputType",1);
+
 //		$json = json_decode(file_get_contents("system.txt"), true);
-		if($_POST['SystemId'] != ""){
+		if(isset($_POST['SystemId'])){
 			$json['SystemId']				= $_POST["SystemId"];
 		}
-		if($_POST['SystemDateTime'] != ""){
+		if(isset($_POST['SystemDateTime'])){
 			$json['SystemDateTime']			= $_POST['SystemDateTime'];
 		}
-		if($_POST['PhaseLossPolicy'] != ""){
+		if(isset($_POST['PhaseLossPolicy'])){
 			$json['PhaseLossPolicy']		= (int)$_POST['PhaseLossPolicy'];
 		}
-		if($_POST['FactoryConfiguration'] != ""){
+		if(isset($_POST['FactoryConfiguration'])){
 			$json['FactoryConfiguration']	= $_POST['FactoryConfiguration'];
 		}
-		if($_POST['AuthorisationMode'] != ""){
+		if(isset($_POST['AuthorisationMode'])){
 			$json['AuthorisationMode']		= (int)$_POST['AuthorisationMode'];
 		}
-		if($_POST['isAPP'] != ""){
+		if(isset($_POST['isAPP'])){
 			$json['isAPP']					= (int)$_POST['isAPP'];
 		}
-		if($_POST['isQRCode'] != ""){
+		if(isset($_POST['isQRCode'])){
 			$json['isQRCode']			 	= (int)$_POST['isQRCode'];
 		}
-		if($_POST['isRFID'] != ""){
+		if(isset($_POST['isRFID'])){
 			$json['isRFID']					= (int)$_POST['isRFID'];
 		}
-		if($_POST['QRCodeMadeMode'] != ""){
+		if(isset($_POST['QRCodeMadeMode'])){
 			$json['QRCodeMadeMode']			= (int)$_POST['QRCodeMadeMode'];
 		}
-		if($_POST['QRCodeContent'] != ""){
+		if(isset($_POST['QRCodeContent'])){
 			$json['QRCodeContent']			= $_POST['QRCodeContent'];
 		}
-		if($_POST['Intensity'] != ""){
+		if(isset($_POST['Intensity'])){
 			$json['Intensity']				= (int)$_POST['Intensity'];
 		}
-		if($_POST['RfidCardNumEndian'] != ""){
+		if(isset($_POST['RfidCardNumEndian'])){
 			$json['RfidCardNumEndian']		= $_POST['RfidCardNumEndian'];
 		}
-		if($_POST['PsuAcInputType'] != ""){
+		if(isset($_POST['PsuAcInputType'])){
 			$json['PsuAcInputType']			= $_POST['PsuAcInputType'];
 		}
-		if($_POST['DDSystemId1'] != ""){
+		if(isset($_POST['DDSystemId1'])){
 			$json['DDSystemId1']				= $_POST["DDSystemId1"];
 		}
-		if($_POST['DDFactoryConfiguration1'] != ""){
+		if(isset($_POST['DDFactoryConfiguration1'])){
 			$json['DDFactoryConfiguration1']	= $_POST['DDFactoryConfiguration1'];
 		}
-		if($_POST['DDAuthorisationMode1'] != ""){
+		if(isset($_POST['DDAuthorisationMode1'])){
 			$json['DDAuthorisationMode1']		= (int)$_POST['AuthorisationMode1'];
 		}
-		if($_POST['DDisAPP1'] != ""){
+		if(isset($_POST['DDisAPP1'])){
 			$json['DDisAPP1']					= (int)$_POST['DDisAPP1'];
 		}
-		if($_POST['DDisQRCode1'] != ""){
+		if(isset($_POST['DDisQRCode1'])){
 			$json['DDisQRCode1']			 	= (int)$_POST['DDisQRCode1'];
 		}
-		if($_POST['DDisRFID1'] != ""){
+		if(isset($_POST['DDisRFID1'])){
 			$json['DDisRFID1']					= (int)$_POST['DDisRFID1'];
 		}
-		if($_POST['DDQRCodeMadeMode1'] != ""){
+		if(isset($_POST['DDQRCodeMadeMode1'])){
 			$json['DDQRCodeMadeMode1']			= (int)$_POST['DDQRCodeMadeMode1'];
 		}
-		if($_POST['DDQRCodeContent1'] != ""){
+		if(isset($_POST['DDQRCodeContent1'])){
 			$json['DDQRCodeContent1']			= $_POST['DDQRCodeContent1'];
 		}
-		if($_POST['DDIntensity1'] != ""){
+		if(isset($_POST['DDIntensity1'])){
 			$json['DDIntensity1']				= (int)$_POST['DDIntensity1'];
 		}
-		if($_POST['DDRfidCardNumEndian1'] != ""){
+		if(isset($_POST['DDRfidCardNumEndian1'])){
 			$json['DDRfidCardNumEndian1']		= $_POST['DDRfidCardNumEndian1'];
 		}
-		if($_POST['DDSystemId2'] != ""){
+		if(isset($_POST['DDSystemId2'])){
 			$json['DDSystemId2']				= $_POST["DDSystemId2"];
 		}
-		if($_POST['DDFactoryConfiguration2'] != ""){
+		if(isset($_POST['DDFactoryConfiguration2'])){
 			$json['DDFactoryConfiguration2']	= $_POST['DDFactoryConfiguration2'];
 		}
-		if($_POST['DDAuthorisationMode2'] != ""){
+		if(isset($_POST['DDAuthorisationMode2'])){
 			$json['DDAuthorisationMode2']		= (int)$_POST['AuthorisationMode2'];
 		}
-		if($_POST['DDisAPP2'] != ""){
+		if(isset($_POST['DDisAPP2'])){
 			$json['DDisAPP2']					= (int)$_POST['DDisAPP2'];
 		}
-		if($_POST['DDisQRCode2'] != ""){
+		if(isset($_POST['DDisQRCode2'])){
 			$json['DDisQRCode2']			 	= (int)$_POST['DDisQRCode2'];
 		}
-		if($_POST['DDisRFID2'] != ""){
+		if(isset($_POST['DDisRFID2'])){
 			$json['DDisRFID2']					= (int)$_POST['DDisRFID2'];
 		}
-		if($_POST['DDQRCodeMadeMode2'] != ""){
+		if(isset($_POST['DDQRCodeMadeMode2'])){
 			$json['DDQRCodeMadeMode2']			= (int)$_POST['DDQRCodeMadeMode2'];
 		}
-		if($_POST['DDQRCodeContent2'] != ""){
+		if(isset($_POST['DDQRCodeContent2'])){
 			$json['DDQRCodeContent2']			= $_POST['DDQRCodeContent2'];
 		}
-		if($_POST['DDIntensity2'] != ""){
+		if(isset($_POST['DDIntensity2'])){
 			$json['DDIntensity2']				= (int)$_POST['DDIntensity2'];
 		}
-		if($_POST['DDRfidCardNumEndian2'] != ""){
+		if(isset($_POST['DDRfidCardNumEndian2'])){
 			$json['DDRfidCardNumEndian2']		= $_POST['DDRfidCardNumEndian2'];
 		}
-		if($_POST['DDSystemId2'] != ""){
+		if(isset($_POST['DDSystemId2'])){
 			$json['DDSystemId2']				= $_POST["DDSystemId2"];
 		}
-		if($_POST['DDFactoryConfiguration2'] != ""){
+		if(isset($_POST['DDFactoryConfiguration2'])){
 			$json['DDFactoryConfiguration2']	= $_POST['DDFactoryConfiguration2'];
 		}
-		if($_POST['DDAuthorisationMode2'] != ""){
+		if(isset($_POST['DDAuthorisationMode2'])){
 			$json['DDAuthorisationMode2']		= (int)$_POST['AuthorisationMode2'];
 		}
-		if($_POST['DDisAPP2'] != ""){
+		if(isset($_POST['DDisAPP2'])){
 			$json['DDisAPP2']					= (int)$_POST['DDisAPP2'];
 		}
-		if($_POST['DDisQRCode2'] != ""){
+		if(isset($_POST['DDisQRCode2'])){
 			$json['DDisQRCode2']			 	= (int)$_POST['DDisQRCode2'];
 		}
-		if($_POST['DDisRFID2'] != ""){
+		if(isset($_POST['DDisRFID2'])){
 			$json['DDisRFID2']					= (int)$_POST['DDisRFID2'];
 		}
-		if($_POST['DDQRCodeMadeMode2'] != ""){
+		if(isset($_POST['DDQRCodeMadeMode2'])){
 			$json['DDQRCodeMadeMode2']			= (int)$_POST['DDQRCodeMadeMode2'];
 		}
-		if($_POST['DDQRCodeContent2'] != ""){
+		if(isset($_POST['DDQRCodeContent2'])){
 			$json['DDQRCodeContent2']			= $_POST['DDQRCodeContent2'];
 		}
-		if($_POST['DDIntensity2'] != ""){
+		if(isset($_POST['DDIntensity2'])){
 			$json['DDIntensity2']				= (int)$_POST['DDIntensity2'];
 		}
-		if($_POST['DDRfidCardNumEndian2'] != ""){
+		if(isset($_POST['DDRfidCardNumEndian2'])){
 			$json['DDRfidCardNumEndian2']		= $_POST['DDRfidCardNumEndian2'];
 		}
-		if($_POST['DDSystemId3'] != ""){
+		if(isset($_POST['DDSystemId3'])){
 			$json['DDSystemId3']				= $_POST["DDSystemId3"];
 		}
-		if($_POST['DDFactoryConfiguration3'] != ""){
+		if(isset($_POST['DDFactoryConfiguration3'])){
 			$json['DDFactoryConfiguration3']	= $_POST['DDFactoryConfiguration3'];
 		}
-		if($_POST['DDAuthorisationMode3'] != ""){
+		if(isset($_POST['DDAuthorisationMode3'])){
 			$json['DDAuthorisationMode3']		= (int)$_POST['AuthorisationMode3'];
 		}
-		if($_POST['DDisAPP3'] != ""){
+		if(isset($_POST['DDisAPP3'])){
 			$json['DDisAPP3']					= (int)$_POST['DDisAPP3'];
 		}
-		if($_POST['DDisQRCode3'] != ""){
+		if(isset($_POST['DDisQRCode3'])){
 			$json['DDisQRCode3']			 	= (int)$_POST['DDisQRCode3'];
 		}
-		if($_POST['DDisRFID3'] != ""){
+		if(isset($_POST['DDisRFID3'])){
 			$json['DDisRFID3']					= (int)$_POST['DDisRFID3'];
 		}
-		if($_POST['DDQRCodeMadeMode3'] != ""){
+		if(isset($_POST['DDQRCodeMadeMode3'])){
 			$json['DDQRCodeMadeMode3']			= (int)$_POST['DDQRCodeMadeMode3'];
 		}
-		if($_POST['DDQRCodeContent3'] != ""){
+		if(isset($_POST['DDQRCodeContent3'])){
 			$json['DDQRCodeContent3']			= $_POST['DDQRCodeContent3'];
 		}
-		if($_POST['DDIntensity3'] != ""){
+		if(isset($_POST['DDIntensity3'])){
 			$json['DDIntensity3']				= (int)$_POST['DDIntensity3'];
 		}
-		if($_POST['DDRfidCardNumEndian3'] != ""){
+		if(isset($_POST['DDRfidCardNumEndian3'])){
 			$json['DDRfidCardNumEndian3']		= $_POST['DDRfidCardNumEndian3'];
 		}
-		if($_POST['DDSystemId4'] != ""){
+		if(isset($_POST['DDSystemId4'])){
 			$json['DDSystemId4']				= $_POST["DDSystemId4"];
 		}
-		if($_POST['DDFactoryConfiguration4'] != ""){
+		if(isset($_POST['DDFactoryConfiguration4'])){
 			$json['DDFactoryConfiguration4']	= $_POST['DDFactoryConfiguration4'];
 		}
-		if($_POST['DDAuthorisationMode4'] != ""){
+		if(isset($_POST['DDAuthorisationMode4'])){
 			$json['DDAuthorisationMode4']		= (int)$_POST['AuthorisationMode4'];
 		}
-		if($_POST['DDisAPP4'] != ""){
+		if(isset($_POST['DDisAPP4'])){
 			$json['DDisAPP4']					= (int)$_POST['DDisAPP4'];
 		}
-		if($_POST['DDisQRCode4'] != ""){
+		if(isset($_POST['DDisQRCode4'])){
 			$json['DDisQRCode4']			 	= (int)$_POST['DDisQRCode4'];
 		}
-		if($_POST['DDisRFID4'] != ""){
+		if(isset($_POST['DDisRFID4'])){
 			$json['DDisRFID4']					= (int)$_POST['DDisRFID4'];
 		}
-		if($_POST['DDQRCodeMadeMode4'] != ""){
+		if(isset($_POST['DDQRCodeMadeMode4'])){
 			$json['DDQRCodeMadeMode4']			= (int)$_POST['DDQRCodeMadeMode4'];
 		}
-		if($_POST['DDQRCodeContent4'] != ""){
+		if(isset($_POST['DDQRCodeContent4'])){
 			$json['DDQRCodeContent4']			= $_POST['DDQRCodeContent4'];
 		}
-		if($_POST['DDIntensity4'] != ""){
+		if(isset($_POST['DDIntensity4'])){
 			$json['DDIntensity4']				= (int)$_POST['DDIntensity4'];
 		}
-		if($_POST['DDRfidCardNumEndian4'] != ""){
+		if(isset($_POST['DDRfidCardNumEndian4'])){
 			$json['DDRfidCardNumEndian4']		= $_POST['DDRfidCardNumEndian4'];
 		}