| 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"); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 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 | + | $hideform = isset($_GET['hideform']) ? $_GET['hideform'] : ""; | 
 
 
 
 
 
 
 
 | 37 | + | $pagewidth = isset($_GET['pagewidth']) ? $_GET['pagewidth'] : ""; | 
 
 
 
 
 
 
 
 | 38 | + | $small = isset($_GET['small']) ? $_GET['small'] : ""; | 
 
 
 
 
 
 
 
 | 39 | + | } | 
 
 
 
 
 
 
 
 | 40 | + |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 41 |  | function printLine($title) { | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 42 |  | echo "<hr style=\"color:#9999ff;\">"; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 43 |  | echo "<b>$title</b>"; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 91 |  | <font size="$fontsize" color="$alertColour"><b>$alertLevel</b></font> | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 92 |  | </td> | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 93 |  | <td> | 
 
 
 
 
 
 
 
 
 
 
 | 94 | < | <font size="$fontsize">$attributeName</font> | 
 
 
 
 
 
 
 
 
 | 94 | > | <font size="$fontsize">$attributeName (c:$value t:$thresholdValue)</font> | 
 
 
 
 
 
 
 
 
 
 
 | 95 |  | </td> | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 96 |  | <td> | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 97 |  |   | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 241 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 242 |  | <? } ?> | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 243 |  |  | 
 
 
 
 
 
 
 
 
 | 218 | – | <table border="0" align="center"> | 
 
 
 
 
 
 
 
 
 | 219 | – | <tr> | 
 
 
 
 
 
 
 
 
 | 220 | – | <td> | 
 
 
 
 
 
 
 
 
 | 221 | – |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 244 |  | <? if ($machine) { | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 245 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 246 |  | printLine(""); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 247 |  |  | 
 
 
 
 
 
 
 
 | 248 | + | $masterwidth = ""; | 
 
 
 
 
 
 
 
 | 249 | + | if ($small != "on") { | 
 
 
 
 
 
 
 
 | 250 | + | $masterwidth = ' width="100%"'; | 
 
 
 
 
 
 
 
 | 251 | + | } | 
 
 
 
 
 
 
 
 | 252 | + |  | 
 
 
 
 
 
 
 
 | 253 | + | echo <<<EOT | 
 
 
 
 
 
 
 
 | 254 | + | <table border="0" align="center"$masterwidth> | 
 
 
 
 
 
 
 
 | 255 | + | <tr> | 
 
 
 
 
 
 
 
 | 256 | + | <td> | 
 
 
 
 
 
 
 
 | 257 | + | EOT; | 
 
 
 
 
 
 
 
 | 258 | + |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 259 |  | if ($machine == "ALL") { | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 260 |  | $machine_array = getdirArray($alertDirectory, 'asort'); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 261 |  | if ($machine_array != FALSE) { | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 263 |  | printReports($machine, $small); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 264 |  | } | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 265 |  | } | 
 
 
 
 
 
 
 
 | 266 | + | else { | 
 
 
 
 
 
 
 
 | 267 | + | print "<font size='$fontsize'><b>There are currently no alerts</b></font>"; | 
 
 
 
 
 
 
 
 | 268 | + | } | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 269 |  | } | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 270 |  | else { | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 271 |  | printReports($machine, $small); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 272 |  | } | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 273 |  |  | 
 
 
 
 
 
 
 
 | 274 | + | echo <<<EOT | 
 
 
 
 
 
 
 
 | 275 | + | </td> | 
 
 
 
 
 
 
 
 | 276 | + | </tr> | 
 
 
 
 
 
 
 
 | 277 | + | </table> | 
 
 
 
 
 
 
 
 | 278 | + | EOT; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 279 |  | } | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 280 |  | else { | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 281 |  | printLine(""); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 282 |  | } | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 283 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 284 |  | ?> | 
 
 
 
 
 
 
 
 
 | 244 | – |  | 
 
 
 
 
 
 
 
 
 | 245 | – | </td> | 
 
 
 
 
 
 
 
 
 | 246 | – | </tr> | 
 
 
 
 
 
 
 
 
 | 247 | – | </table> | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 285 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 286 |  | <? include($bottomHTML); ?> |