www-thermferm/maintenance.php

changeset 620
1bf0b9e056f3
parent 592
ff30227c0903
child 621
a0b611846d78
--- a/www-thermferm/maintenance.php	Mon Aug 08 10:54:27 2022 +0200
+++ b/www-thermferm/maintenance.php	Mon Aug 08 11:49:57 2022 +0200
@@ -30,6 +30,7 @@
 $answer = send_cmd('GLOBAL GET');
 $arr = explode("\r\n", $answer);
 $version = "?";
+$simula = false;
 
 if (startsWith($arr[0], "213")) {
     $j = 1;
@@ -44,6 +45,9 @@
     }
 }
 
+if (send_cmd_check("SIMULATOR LIST") == 0)
+    $simula = true;
+
 $outstr  = '<!DOCTYPE html>'.PHP_EOL;
 $outstr .= '<html>'.PHP_EOL;
 $outstr .= ' <head>'.PHP_EOL;
@@ -87,9 +91,10 @@
 /*
  * See if the server supports simulators
  */
-if (send_cmd_check("SIMULATOR LIST") == 0) {
+//if (send_cmd_check("SIMULATOR LIST") == 0) {
+if ($simula) {
     $outstr .= '      <form action="simulator.php" style="margin:20px;">'.PHP_EOL;
-    $outstr .= '       <input type="submit" class="jqx-button" style="width: 200px; height: 25px;" value="Simulator Setup" />'.PHP_EOL;
+    $outstr .= '       <input type="submit" id="simulator" value="Simulator Setup" />'.PHP_EOL;
     $outstr .= '      </form>'.PHP_EOL;
 }
 $outstr .= '     </div>'.PHP_EOL;
@@ -100,6 +105,8 @@
 $outstr .= '      $("#global").jqxButton({ width: 200, height: 25, theme: \'ui-redmond\' });'.PHP_EOL;
 $outstr .= '      $("#devices").jqxButton({ width: 200, height: 25, theme: \'ui-redmond\' });'.PHP_EOL;
 $outstr .= '      $("#units").jqxButton({ width: 200, height: 25, theme: \'ui-redmond\' });'.PHP_EOL;
+if ($simula)
+    $outstr .= '      $("#simulator").jqxButton({ width: 200, height: 25, theme: \'ui-redmond\' });'.PHP_EOL;
 $outstr .= '     });'.PHP_EOL;
 $outstr .= '    </script>'.PHP_EOL;
 $outstr .= build_footer();

mercurial