| 1 |
|
<?php |
| 2 |
|
|
| 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 |
|
# Navigation for the i-scream alerts. |
| 24 |
|
# pjm2@ukc.ac.uk |
| 25 |
|
# |
| 32 |
|
|
| 33 |
|
include("iutils.inc.php"); |
| 34 |
|
|
| 35 |
+ |
if ($formMethod == "GET") { |
| 36 |
+ |
# in order of public.php |
| 37 |
+ |
$machine = $_GET['machine']; |
| 38 |
+ |
$fontsize = $_GET['fontsize']; |
| 39 |
+ |
$refresh = $_GET['refresh']; |
| 40 |
+ |
$hideform = $_GET['hideform']; |
| 41 |
+ |
$pagewidth = $_GET['pagewidth']; |
| 42 |
+ |
$small = $_GET['small']; |
| 43 |
+ |
$submit = $_GET['submit']; |
| 44 |
+ |
} |
| 45 |
+ |
|
| 46 |
|
function printLine($title) { |
| 47 |
|
echo "<hr style=\"color:#9999ff;\">"; |
| 48 |
|
echo "<b>$title</b>"; |
| 96 |
|
<font size="$fontsize" color="$alertColour"><b>$alertLevel</b></font> |
| 97 |
|
</td> |
| 98 |
|
<td> |
| 99 |
< |
<font size="$fontsize">$attributeName</font> |
| 99 |
> |
<font size="$fontsize">$attributeName (c:$value t:$thresholdValue)</font> |
| 100 |
|
</td> |
| 101 |
|
<td> |
| 102 |
|
|
| 198 |
|
} |
| 199 |
|
|
| 200 |
|
if ($small == "on") { |
| 201 |
< |
echo "</table>"; |
| 201 |
> |
echo <<<EOT |
| 202 |
> |
<tr> |
| 203 |
> |
<td colspan="5"> </td> |
| 204 |
> |
</tr> |
| 205 |
> |
</table> |
| 206 |
> |
EOT; |
| 207 |
|
} |
| 208 |
|
else { |
| 209 |
|
echo <<<EOT |
| 246 |
|
|
| 247 |
|
<? } ?> |
| 248 |
|
|
| 213 |
– |
<table border="0" align="center"> |
| 214 |
– |
<tr> |
| 215 |
– |
<td> |
| 216 |
– |
|
| 249 |
|
<? if ($machine) { |
| 250 |
|
|
| 251 |
|
printLine(""); |
| 252 |
|
|
| 253 |
+ |
$masterwidth = ""; |
| 254 |
+ |
if ($small != "on") { |
| 255 |
+ |
$masterwidth = ' width="100%"'; |
| 256 |
+ |
} |
| 257 |
+ |
|
| 258 |
+ |
echo <<<EOT |
| 259 |
+ |
<table border="0" align="center"$masterwidth> |
| 260 |
+ |
<tr> |
| 261 |
+ |
<td> |
| 262 |
+ |
EOT; |
| 263 |
+ |
|
| 264 |
|
if ($machine == "ALL") { |
| 265 |
|
$machine_array = getdirArray($alertDirectory, 'asort'); |
| 266 |
|
if ($machine_array != FALSE) { |
| 268 |
|
printReports($machine, $small); |
| 269 |
|
} |
| 270 |
|
} |
| 271 |
+ |
else { |
| 272 |
+ |
print "<font size='$fontsize'><b>There are currently no alerts</b></font>"; |
| 273 |
+ |
} |
| 274 |
|
} |
| 275 |
|
else { |
| 276 |
|
printReports($machine, $small); |
| 277 |
|
} |
| 278 |
|
|
| 279 |
+ |
echo <<<EOT |
| 280 |
+ |
</td> |
| 281 |
+ |
</tr> |
| 282 |
+ |
</table> |
| 283 |
+ |
EOT; |
| 284 |
|
} |
| 285 |
|
else { |
| 286 |
|
printLine(""); |
| 287 |
|
} |
| 288 |
|
|
| 289 |
|
?> |
| 239 |
– |
|
| 240 |
– |
</td> |
| 241 |
– |
</tr> |
| 242 |
– |
</table> |
| 290 |
|
|
| 291 |
|
<? include($bottomHTML); ?> |