');
- } else {
- echo ('
');
- }
- echo ('
');
- echo (number_format($P3, 1, ".", ","));
- echo (" mbar");
- echo ('
');
-
- $command = $ini_array['DocumentRoot']."/PumpStationControl --web getSwitchStatus";
- exec ($command, $valSS, $return);
- if (is_array($valSS)) {
- $SS = $valSS[0];
- } else {
- $SS = $valSS;
- }
- list($valS0, $valS1, $valS2, $valS3, $valS4) = explode(";", $SS);
-
- $S0 = intval($valS0);
- $S1 = intval($valS1);
- $S2 = intval($valS2);
- $S3 = intval($valS3);
- $S4 = intval($valS4);
-
- # $command = $ini_array['DocumentRoot']."/PumpStationControl --web getSwitchState 0";
- # exec ($command, $valS0, $return);
- # if (is_array($valS0)) {
- # $S0 = boolval($valS0[0]);
- # } else {
- # $S0 = boolval($valS0);
- # }
- if ($S0 == 0 ) {
- echo ('
');
- } else if ($S0 == 1 ) {
- echo ('
');
- }
- echo ('
');
- if ($S0 == 0 ) {
- echo ("closed");
- } else if ($S0 == 1 ) {
- echo ("open");
- } else {
- echo ("XXX");
- }
- echo ("
");
-
- # $command = $ini_array['DocumentRoot']."/PumpStationControl --web getSwitchState 1";
- # exec ($command, $valS1, $return);
- # if (is_array($valS1)) {
- # $S1 = boolval($valS1[0]);
- # } else {
- # $S1 = boolval($valS1);
- # }
- if ($S1 == 0 ) {
- echo ('
');
- } else if ($S1 == 1 ) {
- echo ('
');
- }
- echo ('
');
- if ($S1 == 0 ) {
- echo ("closed");
- } else if ($S1 == 1 ) {
- echo ("open");
- } else {
- echo ("XXX");
- }
- echo ("
");
+= 200.0 || $P1 < 0.0) {
+ echo ('
');
+} else if ($P1 < 150.0) {
+ echo ('
');
+} else {
+ echo ('
');
+}
+echo ('
');
+if ($P1 >= 10.0) {
+ printf ( "%.0f", $P1);
+} else if ($P1 >= 0.1) {
+ printf ( "%.1f", $P1);
+} else {
+ printf ( "%.2E", $P1);
+}
+echo (" mbar");
+echo ('
');
+
+// $command = $ini_array['DocumentRoot']."/PumpStationControl --web getPressure 2";
+// exec ($command, $valP2, $return);
+// if (is_array($valP2)) {
+// $P2 = floatval($valP2[0]);
+// } else {
+// $P2 = floatval($valP2);
+// }
+if ($P2 >= 200.0 || $P2 < 0.0) {
+ echo ('
');
+} else if ($P2 < 150.0) {
+ echo ('
');
+} else {
+ echo ('
');
+}
+echo ('
');
+if ($P2 >= 10.0) {
+ printf ( "%.0f", $P2);
+} else if ($P2 >= 0.1) {
+ printf ( "%.1f", $P2);
+} else {
+ printf ( "%.2E", $P2);
+}
+echo (" mbar");
+echo ('
');
+
+// $command = $ini_array['DocumentRoot']."/PumpStationControl --web getPressure 3";
+// exec ($command, $valP3, $return);
+// if (is_array($valP3)) {
+// $P3 = floatval($valP3[0]);
+// } else {
+// $P3 = floatval($valP3);
+// }
+if ($P3 >= 200.0 || $P3 < 0.0) {
+ echo ('
');
+} else if ($P3 < 150.0) {
+ echo ('
');
+} else {
+ echo ('
');
+}
+echo ('
');
+if ($P3 >= 10.0) {
+ printf ( "%.0f", $P3);
+} else if ($P3 >= 0.1) {
+ printf ( "%.1f", $P3);
+} else {
+ printf ( "%.2E", $P3);
+}
+echo (" mbar");
+echo ('
');
+
+$command = $ini_array ['DocumentRoot'] . "/PumpStationControl --web getSwitchStatus";
+exec ( $command, $valSS, $return );
+if (is_array ( $valSS )) {
+ $SS = $valSS [0];
+} else {
+ $SS = $valSS;
+}
+list ( $valS0, $valS1, $valS2, $valS3, $valS4 ) = explode ( ";", $SS );
+
+$Pump1State = intval ( $valS0 );
+$Pump2State = intval ( $valS1 );
+$Valve1State = intval ( $valS2 );
+$Valve2State= intval ( $valS3 );
+$Valve3State= intval ( $valS4 );
- # $command = $ini_array['DocumentRoot']."/PumpStationControl --web getSwitchState 2";
- # exec ($command, $valS2, $return);
- # if (is_array($valS2)) {
- # $S2 = boolval($valS2[0]);
- # } else {
- # $S2 = boolval($valS2);
- # }
- if ($S2 == 0 ) {
- echo ('
');
- } else if ($S2 == 1 ) {
- echo ('
');
- }
- echo ('
');
- if ($S2 == 0 ) {
- echo ("closed");
- } else if ($S2 == 1 ) {
- echo ("open");
- } else {
- echo ("XXX");
- }
- echo ("
");
-
- # $command = $ini_array['DocumentRoot']."/PumpStationControl --web getSwitchState 3";
- # exec ($command, $valS3, $return);
- # if (is_array($valS3)) {
- # $S3 = boolval($valS3[0]);
- # } else {
- # $S3 = boolval($valS3);
- # }
- if ($S3 == 0 ) {
- echo ('
');
- } else if ($S3 == 1 ) {
- echo ('
');
- }
- echo ('
');
- if ($S3 == 0 ) {
- echo ("OFF");
- } else if ($S3 == 1 ) {
- echo ("ON");
- } else {
- echo ("XXX");
- }
- echo ("
");
-
- # $command = $ini_array['DocumentRoot']."/PumpStationControl --web getSwitchState 4";
- # exec ($command, $valS4, $return);
- # if (is_array($valS4)) {
- # $S4 = boolval($valS4[0]);
- # } else {
- # $S4 = boolval($valS4);
- # }
- if ($S4 == 0 ) {
- echo ('
');
- } else if ($S4 == 1 ) {
- echo ('
');
- }
- echo ('
');
- if ($S4 == 0 ) {
- echo ("OFF");
- } else if ($S4 == 1 ) {
- echo ("ON");
- } else {
- echo ("XXX");
- }
- echo ("
");
- ?>
+$command = $ini_array ['DocumentRoot'] . "/PumpStationControl --web getPumpOperatingHours";
+exec ( $command, $valOH, $return );
+if (is_array ( $valOH )) {
+ $OH = $valOH [0];
+} else {
+ $OH = $valOH;
+}
+list ( $valOH1, $valOH2 ) = explode ( ";", $OH );
+
+// $command = $ini_array['DocumentRoot']."/PumpStationControl --web getSwitchState " . $ini_array['Valve1Switch'];
+// exec ($command, $valV1, $return);
+// if (is_array($valV1)) {
+// $Valve1State= boolval($valV1[0]);
+// } else {
+// $Valve1State= boolval($valV1);
+// }
+if ($Valve1State== 0) {
+ echo ('
');
+} else if ($Valve1State== 1) {
+ echo ('
');
+}
+echo ('
');
+if ($Valve1State== 0) {
+ echo ("closed");
+} else if ($Valve1State== 1) {
+ echo ("open");
+} else {
+ echo ("XXX");
+}
+echo ("
");
+
+// $command = $ini_array['DocumentRoot']."/PumpStationControl --web getSwitchState " . $ini_array['Valve2Switch'];
+// exec ($command, $valV2, $return);
+// if (is_array($valV2)) {
+// $Valve2State= boolval($valV2[0]);
+// } else {
+// $Valve2State= boolval($valV2);
+// }
+if ($Valve2State== 0) {
+ echo ('
');
+} else if ($S1 == 1) {
+ echo ('
');
+}
+echo ('
');
+if ($Valve2State== 0) {
+ echo ("closed");
+} else if ($Valve2State== 1) {
+ echo ("open");
+} else {
+ echo ("XXX");
+}
+echo ("
");
+
+// $command = $ini_array['DocumentRoot']."/PumpStationControl --web getSwitchState " . $ini_array['Valve3Switch'];
+// exec ($command, $valV3, $return);
+// if (is_array($valV3)) {
+// $Valve3State= boolval($valV3[0]);
+// } else {
+// $Valve3State= boolval($valV3);
+// }
+if ($Valve3State== 0) {
+ echo ('
');
+} else if ($Valve3State== 1) {
+ echo ('
');
+}
+echo ('
');
+if ($Valve3State== 0) {
+ echo ("closed");
+} else if ($Valve3State== 1) {
+ echo ("open");
+} else {
+ echo ("XXX");
+}
+echo ("
");
+
+// $command = $ini_array['DocumentRoot']."/PumpStationControl --web getSwitchState " . $ini_array['Pump2Switch'];
+// exec ($command, $valP2, $return);
+// if (is_array($valP2)) {
+// $Pump2State= boolval($valP2[0]);
+// } else {
+// $Pump2State= boolval($valP2);
+// }
+if ($Pump2State== 0) {
+ echo ('
');
+} else if ($Pump2State== 1) {
+ echo ('
');
+}
+echo ('
');
+printf ( "%.2f h", $valOH2 );
+echo ("
");
+
+// $command = $ini_array['DocumentRoot']."/PumpStationControl --web getSwitchState " . $ini_array['Pump1Switch'];
+// exec ($command, $valP1, $return);
+// if (is_array($valP1)) {
+// $Pump1State= boolval($valP1[0]);
+// } else {
+// $Pump1State= boolval($valP1);
+// }
+if ($Pump1State== 0) {
+ echo ('
');
+} else if ($Pump1State== 1) {
+ echo ('
');
+}
+echo ('
');
+printf ( "%.2f h", $valOH1 );
+echo ("
");
+?>
Valve 1
");
+ if ($Valve1State== 0 ) {
+ echo ("
");
} else {
- echo ("
");
+ echo ("
");
}
?>
@@ -260,10 +270,10 @@
Valve 2
");
+ if ($Valve2State== 0 ) {
+ echo ("
");
} else {
- echo ("
");
+ echo ("
");
}
?>
@@ -271,10 +281,10 @@
Valve 3
");
+ if ($Valve3State== 0 ) {
+ echo ("
");
} else {
- echo ("
");
+ echo ("
");
}
?>
@@ -282,10 +292,10 @@
Pump 1
");
+ if ($Pump1State== 0 ) {
+ echo ("
");
} else {
- echo ("
");
+ echo ("
");
}
?>
@@ -293,10 +303,10 @@
Pump 2
");
+ if ($Pump2State== 0 ) {
+ echo ("
");
} else {
- echo ("
");
+ echo ("
");
}
?>
@@ -308,18 +318,18 @@
-
+
-
+
-
+