# | Line 1 | Line 1 | |
---|---|---|
1 | <?php | |
2 | ||
3 | – | # Navigation for the i-scream alerts. |
4 | – | # pjm2@ukc.ac.uk |
3 | # | |
4 | + | # i-scream central monitoring system |
5 | + | # http://www.i-scream.org |
6 | + | # Copyright (C) 2000-2002 i-scream |
7 | + | # |
8 | + | # This program is free software; you can redistribute it and/or |
9 | + | # modify it under the terms of the GNU General Public License |
10 | + | # as published by the Free Software Foundation; either version 2 |
11 | + | # of the License, or (at your option) any later version. |
12 | + | # |
13 | + | # This program is distributed in the hope that it will be useful, |
14 | + | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | + | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | + | # GNU General Public License for more details. |
17 | + | # |
18 | + | # You should have received a copy of the GNU General Public License |
19 | + | # along with this program; if not, write to the Free Software |
20 | + | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 | + | # |
22 | + | |
23 | # CONFIGURABLE CONSTANTS: - | |
24 | ||
25 | include("alerts_config.inc.php"); | |
# | Line 12 | Line 29 | include("alerts_config.inc.php"); | |
29 | ||
30 | include("iutils.inc.php"); | |
31 | ||
32 | + | if ($formMethod == "GET") { |
33 | + | # in order of public.php |
34 | + | $machine = isset($_GET['machine']) ? $_GET['machine'] : ""; |
35 | + | $fontsize = isset($_GET['fontsize']) ? $_GET['fontsize'] : ""; |
36 | + | $refresh = isset($_GET['refresh']) ? $_GET['refresh'] : ""; |
37 | + | $hideform = isset($_GET['hideform']) ? $_GET['hideform'] : ""; |
38 | + | $pagewidth = isset($_GET['pagewidth']) ? $_GET['pagewidth'] : ""; |
39 | + | $small = isset($_GET['small']) ? $_GET['small'] : ""; |
40 | + | $submit = isset($_GET['submut']) ? $_GET['submit'] : ""; |
41 | + | } |
42 | + | |
43 | function printLine($title) { | |
44 | echo "<hr style=\"color:#9999ff;\">"; | |
45 | echo "<b>$title</b>"; | |
# | Line 65 | Line 93 | function printAlert($machine, $alert, $small="") { | |
93 | <font size="$fontsize" color="$alertColour"><b>$alertLevel</b></font> | |
94 | </td> | |
95 | <td> | |
96 | < | <font size="$fontsize">$attributeName</font> |
96 | > | <font size="$fontsize">$attributeName (c:$value t:$thresholdValue)</font> |
97 | </td> | |
98 | <td> | |
99 | | |
# | Line 167 | Line 195 | EOT; | |
195 | } | |
196 | ||
197 | if ($small == "on") { | |
198 | < | echo "</table>"; |
198 | > | echo <<<EOT |
199 | > | <tr> |
200 | > | <td colspan="5"> </td> |
201 | > | </tr> |
202 | > | </table> |
203 | > | EOT; |
204 | } | |
205 | else { | |
206 | echo <<<EOT | |
# | Line 210 | Line 243 | EOT; | |
243 | ||
244 | <? } ?> | |
245 | ||
213 | – | <table border="0" align="center"> |
214 | – | <tr> |
215 | – | <td> |
216 | – | |
246 | <? if ($machine) { | |
247 | ||
248 | printLine(""); | |
249 | ||
250 | + | $masterwidth = ""; |
251 | + | if ($small != "on") { |
252 | + | $masterwidth = ' width="100%"'; |
253 | + | } |
254 | + | |
255 | + | echo <<<EOT |
256 | + | <table border="0" align="center"$masterwidth> |
257 | + | <tr> |
258 | + | <td> |
259 | + | EOT; |
260 | + | |
261 | if ($machine == "ALL") { | |
262 | $machine_array = getdirArray($alertDirectory, 'asort'); | |
263 | if ($machine_array != FALSE) { | |
# | Line 225 | Line 265 | EOT; | |
265 | printReports($machine, $small); | |
266 | } | |
267 | } | |
268 | + | else { |
269 | + | print "<font size='$fontsize'><b>There are currently no alerts</b></font>"; |
270 | + | } |
271 | } | |
272 | else { | |
273 | printReports($machine, $small); | |
274 | } | |
275 | ||
276 | + | echo <<<EOT |
277 | + | </td> |
278 | + | </tr> |
279 | + | </table> |
280 | + | EOT; |
281 | } | |
282 | else { | |
283 | printLine(""); | |
284 | } | |
285 | ||
286 | ?> | |
239 | – | |
240 | – | </td> |
241 | – | </tr> |
242 | – | </table> |
287 | ||
288 | <? include($bottomHTML); ?> |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |