28 $my_style = 'ui-redmond'; |
28 $my_style = 'ui-redmond'; |
29 |
29 |
30 $answer = send_cmd('GLOBAL GET'); |
30 $answer = send_cmd('GLOBAL GET'); |
31 $arr = explode("\r\n", $answer); |
31 $arr = explode("\r\n", $answer); |
32 $version = "?"; |
32 $version = "?"; |
|
33 $simula = false; |
33 |
34 |
34 if (startsWith($arr[0], "213")) { |
35 if (startsWith($arr[0], "213")) { |
35 $j = 1; |
36 $j = 1; |
36 while (1) { |
37 while (1) { |
37 if (strcmp($arr[$j], ".") == 0) |
38 if (strcmp($arr[$j], ".") == 0) |
41 if ($f[0] == "RELEASE") |
42 if ($f[0] == "RELEASE") |
42 $version = $f[1]; |
43 $version = $f[1]; |
43 $j++; |
44 $j++; |
44 } |
45 } |
45 } |
46 } |
|
47 |
|
48 if (send_cmd_check("SIMULATOR LIST") == 0) |
|
49 $simula = true; |
46 |
50 |
47 $outstr = '<!DOCTYPE html>'.PHP_EOL; |
51 $outstr = '<!DOCTYPE html>'.PHP_EOL; |
48 $outstr .= '<html>'.PHP_EOL; |
52 $outstr .= '<html>'.PHP_EOL; |
49 $outstr .= ' <head>'.PHP_EOL; |
53 $outstr .= ' <head>'.PHP_EOL; |
50 $outstr .= ' <meta http-equiv="content-type" content="text/html; charset=utf-8" />'.PHP_EOL; |
54 $outstr .= ' <meta http-equiv="content-type" content="text/html; charset=utf-8" />'.PHP_EOL; |
85 $outstr .= ' <input type="submit" id="units" value="Fermentation Units" />'.PHP_EOL; |
89 $outstr .= ' <input type="submit" id="units" value="Fermentation Units" />'.PHP_EOL; |
86 $outstr .= ' </form>'.PHP_EOL; |
90 $outstr .= ' </form>'.PHP_EOL; |
87 /* |
91 /* |
88 * See if the server supports simulators |
92 * See if the server supports simulators |
89 */ |
93 */ |
90 if (send_cmd_check("SIMULATOR LIST") == 0) { |
94 //if (send_cmd_check("SIMULATOR LIST") == 0) { |
|
95 if ($simula) { |
91 $outstr .= ' <form action="simulator.php" style="margin:20px;">'.PHP_EOL; |
96 $outstr .= ' <form action="simulator.php" style="margin:20px;">'.PHP_EOL; |
92 $outstr .= ' <input type="submit" class="jqx-button" style="width: 200px; height: 25px;" value="Simulator Setup" />'.PHP_EOL; |
97 $outstr .= ' <input type="submit" id="simulator" value="Simulator Setup" />'.PHP_EOL; |
93 $outstr .= ' </form>'.PHP_EOL; |
98 $outstr .= ' </form>'.PHP_EOL; |
94 } |
99 } |
95 $outstr .= ' </div>'.PHP_EOL; |
100 $outstr .= ' </div>'.PHP_EOL; |
96 $outstr .= ' </div>'.PHP_EOL; |
101 $outstr .= ' </div>'.PHP_EOL; |
97 $outstr .= ' <script type="text/javascript">'.PHP_EOL; |
102 $outstr .= ' <script type="text/javascript">'.PHP_EOL; |
98 $outstr .= ' $(document).ready(function () {'.PHP_EOL; |
103 $outstr .= ' $(document).ready(function () {'.PHP_EOL; |
99 $outstr .= ' $("#maintenance").jqxButton({ width: 150, height: 25, theme: \'ui-redmond\' });'.PHP_EOL; |
104 $outstr .= ' $("#maintenance").jqxButton({ width: 150, height: 25, theme: \'ui-redmond\' });'.PHP_EOL; |
100 $outstr .= ' $("#global").jqxButton({ width: 200, height: 25, theme: \'ui-redmond\' });'.PHP_EOL; |
105 $outstr .= ' $("#global").jqxButton({ width: 200, height: 25, theme: \'ui-redmond\' });'.PHP_EOL; |
101 $outstr .= ' $("#devices").jqxButton({ width: 200, height: 25, theme: \'ui-redmond\' });'.PHP_EOL; |
106 $outstr .= ' $("#devices").jqxButton({ width: 200, height: 25, theme: \'ui-redmond\' });'.PHP_EOL; |
102 $outstr .= ' $("#units").jqxButton({ width: 200, height: 25, theme: \'ui-redmond\' });'.PHP_EOL; |
107 $outstr .= ' $("#units").jqxButton({ width: 200, height: 25, theme: \'ui-redmond\' });'.PHP_EOL; |
|
108 if ($simula) |
|
109 $outstr .= ' $("#simulator").jqxButton({ width: 200, height: 25, theme: \'ui-redmond\' });'.PHP_EOL; |
103 $outstr .= ' });'.PHP_EOL; |
110 $outstr .= ' });'.PHP_EOL; |
104 $outstr .= ' </script>'.PHP_EOL; |
111 $outstr .= ' </script>'.PHP_EOL; |
105 $outstr .= build_footer(); |
112 $outstr .= build_footer(); |
106 |
113 |
107 echo $outstr; |
114 echo $outstr; |