43 |
|
<? } |
44 |
|
foreach($file_array as $file_name) { |
45 |
|
#if (is_dir($file_name)) { |
46 |
< |
if (!preg_match("/^[0-9]{4}\-[0-9]{2}\-[0-9]{2}$/", $file_name)) { |
46 |
> |
if (preg_match("/^[0-9]{4}\-[0-9]{2}\-[0-9]{2}$/", $file_name)) { |
47 |
|
$i++; |
48 |
|
print "<option value=\"$file_name\">$file_name</option>"; |
49 |
|
} |
71 |
|
<? } else { ?> |
72 |
|
<option selected value="">[select machine]</option> |
73 |
|
<? } ?> |
74 |
< |
<? include("$day/$machineNameHTML"); ?> |
74 |
> |
<? include("$reportDirectory/$day/$machineNameHTML"); ?> |
75 |
|
</select> |
76 |
|
|
77 |
|
<select size="1" name="report"> |
81 |
|
<? } else { ?> |
82 |
|
<option selected value="">[select report]</option> |
83 |
|
<? } ?> |
84 |
< |
<? include("$day/$reportHTML"); ?> |
84 |
> |
<? include("$reportDirectory/$day/$reportHTML"); ?> |
85 |
|
</select> |
86 |
|
|
87 |
|
<input type="hidden" name="day" value="<? echo $day ?>"> |
98 |
|
<? |
99 |
|
if ($submit == "Show" && $machine_name && $report) { |
100 |
|
|
101 |
< |
include("$day/$machine_name/$report/$reportLimitsFile"); |
101 |
> |
include("$reportDirectory/$day/$machine_name/$report/$reportLimitsFile"); |
102 |
|
|
103 |
< |
$url = escapeshellcmd("$day/$machine_name/$report/$reportChartFile"); |
104 |
< |
if (isReportEmpty("$day/$machine_name/$report/$reportChartDataFile", $minFileSize)) { |
103 |
> |
$url = "$webRoot/$day/$machine_name/$report/$reportChartFile"; |
104 |
> |
if (isReportEmpty("$reportDirectory/$day/$machine_name/$report/$reportChartDataFile", $minFileSize)) { |
105 |
|
echo "Host <b>$machine_name</b> did not send any information about <b>$report</b> on <b>$day</b>. Please select another report."; |
106 |
|
} |
107 |
< |
else if (file_exists($url)) { ?> |
107 |
> |
else if (file_exists("$reportDirectory/$day/$machine_name/$report/$reportChartFile")) { ?> |
108 |
|
|
109 |
|
<center><b>[<? echo $machine_name; ?>] - <? echo $report; ?></b></center> |
110 |
|
|
132 |
|
|
133 |
|
<b>Extra data</b> |
134 |
|
<p> |
135 |
< |
<a href="<? echo "$day/$machine_name/$report/$reportChartDataFile" ?>">Raw plot data</a><br> |
136 |
< |
<a href="<? echo "$day/$machine_name/$report/$reportChartFile" ?>">GIF chart</a><br> |
137 |
< |
<a href="<? echo "$day/$machine_name/$report/$reportLimitsFile" ?>">PHP y-axis limits include</a> |
135 |
> |
<a href="<? echo "$webRoot/$day/$machine_name/$report/$reportChartDataFile" ?>">Raw plot data</a><br> |
136 |
> |
<a href="<? echo "$webRoot/$day/$machine_name/$report/$reportChartFile" ?>">GIF chart</a><br> |
137 |
> |
<a href="<? echo "$webRoot/$day/$machine_name/$report/$reportLimitsFile" ?>">PHP y-axis limits include</a> |
138 |
|
|
139 |
|
<? } |
140 |
|
else { |