10 |
|
# |
11 |
|
# END CONFIGURATION |
12 |
|
|
13 |
+ |
include("iutils.inc.php"); |
14 |
|
|
14 |
– |
# return an array of subdirectories from a directory. |
15 |
– |
function getdirArray($dir='./',$sort='asort') { |
16 |
– |
global $dir_file_count; |
17 |
– |
if ( is_dir($dir) ) { |
18 |
– |
$fd = @opendir($dir); |
19 |
– |
while ( ($part = @readdir($fd)) == TRUE ) { |
20 |
– |
clearstatcache(); |
21 |
– |
if ($part != "." && $part != "..") { |
22 |
– |
$dir_array[] = $part; |
23 |
– |
} |
24 |
– |
} |
25 |
– |
if($fd == TRUE) { |
26 |
– |
closedir($fd); |
27 |
– |
} |
28 |
– |
if (is_array($dir_array)) { |
29 |
– |
$sort($dir_array); |
30 |
– |
$dir_file_count = count($dir_array); |
31 |
– |
Return $dir_array; |
32 |
– |
} else { |
33 |
– |
Return FALSE; |
34 |
– |
} |
35 |
– |
} else { |
36 |
– |
Return FALSE; |
37 |
– |
} |
38 |
– |
} |
39 |
– |
|
15 |
|
function printLine($title) { |
16 |
< |
echo "<hr color=\"#9999ff\">"; |
16 |
> |
echo "<hr style=\"color:#9999ff;\">"; |
17 |
|
echo "<b>$title</b>"; |
18 |
|
} |
19 |
|
|
67 |
|
<td align="left">0<?=$units?></td> |
68 |
|
<td align="right"><?=$max?><?=$units?></td> |
69 |
|
</tr> |
70 |
+ |
<tr> |
71 |
+ |
<td colspan="2"> </td> |
72 |
+ |
</tr> |
73 |
|
</table> |
74 |
|
<? |
75 |
|
} |
101 |
|
<input type="submit" name="submit" value="Display"> |
102 |
|
</form> |
103 |
|
|
126 |
– |
<hr weight="1" color="<? echo $lineColor ?>"> |
127 |
– |
|
104 |
|
<? if ($machine) { |
105 |
|
|
106 |
|
$last_modified = filemtime("$latestDirectory/$machine/$latestData"); |
107 |
|
clearstatcache(); |
108 |
|
$data_age = time() - $last_modified; |
109 |
|
|
110 |
< |
$last_modified = strftime("%a %d %b %Y at %T", $last_modified); |
110 |
> |
$last_modified = date("l jS F - g:ia", $last_modified); |
111 |
|
|
112 |
|
if ($data_age > $warning_age) { |
113 |
|
$warning = <<<EOT |
120 |
|
} |
121 |
|
|
122 |
|
echo <<<EOT |
123 |
< |
<table border="0" bgcolor="#000066" cellpadding="3" cellspacing="1" align="center"> |
123 |
> |
<table border="0" bgcolor="#000066" cellpadding="3" cellspacing="1"> |
124 |
|
<tr> |
125 |
|
<td bgcolor="#000066"> |
126 |
|
|
148 |
|
# Display the data specified in the display include. |
149 |
|
include("latest_display.inc.php"); |
150 |
|
} |
175 |
– |
|
176 |
– |
printLine(""); |
151 |
|
} |
152 |
|
|
153 |
|
?> |
154 |
|
|
155 |
+ |
<? printLine(""); ?> |
156 |
|
|
157 |
|
<? include($bottomHTML); ?> |