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 |
– |
# |
23 |
|
# CONFIGURABLE CONSTANTS: - |
24 |
|
|
25 |
|
include("alerts_config.inc.php"); |
31 |
|
|
32 |
|
if ($formMethod == "GET") { |
33 |
|
# in order of public.php |
34 |
< |
$machine = $_GET['machine']; |
35 |
< |
$fontsize = $_GET['fontsize']; |
36 |
< |
$refresh = $_GET['refresh']; |
37 |
< |
$hideform = $_GET['hideform']; |
38 |
< |
$pagewidth = $_GET['pagewidth']; |
42 |
< |
$small = $_GET['small']; |
43 |
< |
$submit = $_GET['submit']; |
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) { |
212 |
|
|
213 |
|
?> |
214 |
|
|
215 |
< |
<? include($titleHTML); ?> |
215 |
> |
<?php include($titleHTML); ?> |
216 |
|
|
217 |
< |
<? if ($hideform != "on") { ?> |
217 |
> |
<?php if ($hideform != "on") { ?> |
218 |
|
|
219 |
< |
<? printLine("Latest alerts for hosts"); ?> |
219 |
> |
<?php printLine("Latest alerts for hosts"); ?> |
220 |
|
|
221 |
< |
<form method="<? echo $formMethod ?>" action="<? echo $thisPage ?>"> |
222 |
< |
<? |
221 |
> |
<form method="<?php echo $formMethod ?>" action="<?php echo $thisPage ?>"> |
222 |
> |
<?php |
223 |
|
|
224 |
|
$file_array = getdirArray($alertDirectory,'asort'); |
225 |
|
print "<select size=\"1\" name=\"machine\">"; |
226 |
|
if ($machine) { ?> |
227 |
< |
<option selected value="<? echo $machine ?>"><? echo $machine ?></option> |
227 |
> |
<option selected value="<?php echo $machine ?>"><?php echo $machine ?></option> |
228 |
|
<option value="">----------------</option> |
229 |
< |
<? } |
229 |
> |
<?php } |
230 |
|
foreach ($file_array as $file_name) { |
231 |
|
#if (is_dir($file_name)) { |
232 |
|
print "<option value=\"$file_name\">$file_name</option>"; |
235 |
|
print "</select>"; |
236 |
|
|
237 |
|
?> |
238 |
< |
<input type="hidden" name="small" value="<?=$small?>"> |
238 |
> |
<input type="hidden" name="small" value="<?php=$small?>"> |
239 |
|
<input type="submit" name="submit" value="Display"> |
240 |
|
</form> |
241 |
|
|
242 |
< |
<? } ?> |
242 |
> |
<?php } ?> |
243 |
|
|
244 |
< |
<? if ($machine) { |
244 |
> |
<?php if ($machine) { |
245 |
|
|
246 |
|
printLine(""); |
247 |
|
|
283 |
|
|
284 |
|
?> |
285 |
|
|
286 |
< |
<? include($bottomHTML); ?> |
286 |
> |
<?php include($bottomHTML); ?> |