4 |
|
// pjm2@ukc.ac.uk |
5 |
|
|
6 |
|
|
7 |
+ |
function isReportEmpty($filename) { |
8 |
+ |
if (filesize($filename) < 33) { |
9 |
+ |
return TRUE; |
10 |
+ |
} |
11 |
+ |
return FALSE; |
12 |
+ |
} |
13 |
+ |
|
14 |
|
function getdirArray($dir='./',$sort='asort') { |
15 |
|
global $dir_file_count; |
16 |
|
if ( is_dir($dir) ) { |
107 |
|
include("$day/$machine_name/$report/i-maxmin.txt"); |
108 |
|
|
109 |
|
$url = escapeshellcmd("$day/$machine_name/$report/i-chart.gif"); |
110 |
< |
if (file_exists($url)) { ?> |
110 |
> |
if (isReportEmpty("$day/$machine_name/$report/i-data.txt")) { |
111 |
> |
echo "Host <b>$machine_name</b> did not send any information about <b>$report</b> on <b>$day</b>. Please select another report."; |
112 |
> |
} |
113 |
> |
else if (file_exists($url)) { ?> |
114 |
|
|
115 |
|
<center><b>[<? echo $machine_name; ?>] - <? echo $report; ?></b></center> |
116 |
|
|