12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <?php
-
- header('Content-Type: application/json; charset=UTF-8');
-
-
-
- if ($_SERVER['REQUEST_METHOD'] == "GET") {
- create();
- } else if ($_SERVER['REQUEST_METHOD'] == "POST") {
- create();
- }
-
- function create() {
- $json['ModelName'] = $_POST['ModelName'];
- $json['SerialNumber'] = $_POST["SerialNumber"];
- $json['SystemId'] = $_POST["SystemId"];
- $json['SystemDateTime'] = $_POST['SystemDateTime'];
- $json['AcPhaseCount'] = $_POST['AcPhaseCount'];
- $json['SystemStatus'] = $_POST['SystemStatus'];
- $json['FactoryConfiguration'] = $_POST['FactoryConfiguration'];
- $json['AuthorisationMode'] = $_POST['AuthorisationMode'];
- $json['DefaultLanguage'] = chr($_POST['DefaultLanguage']);
- $json['InputVoltageR'] = $_POST['InputVoltageR'];
- $json['InputVoltageS'] = $_POST['InputVoltageS'];
- $json['InputVoltageT'] = $_POST['InputVoltageT'];
- $json['SystemFanRotaSpeed'] = $_POST['SystemFanRotaSpeed'];
- $json['PsuFanRotaSpeed'] = $_POST['PsuFanRotaSpeed'];
- $json['RfidCardNumEndian'] = $_POST['RfidCardNumEndian'];
-
-
-
-
-
-
-
- ob_start();
-
-
-
-
-
-
-
-
-
-
-
-
- shell_exec('sync;sync;sync');
-
- chdir("/root");
- $str_json=json_encode($json);
- exec("'./WebService' '1' '".$str_json."'",$output,$return_var);
- ob_end_clean();
- print_r($output);
-
- }
- ?>
|