File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,21 @@ arsort($awprev);
4545$options = "";
4646foreach ($awprev as $key => $value)
4747{
48+
49+ if(file_exists($value.'/awsindex.html') && file_exists($value.'/goaindex.html')) {
50+ $awstatsindex = 'awsindex.html';
51+ } elseif(file_exists($value.'/awsindex.html') && !file_exists($value.'/goaindex.html')) {
52+ $awstatsindex = 'awsindex.html';
53+ } else {
54+ $awstatsindex = 'goaindex.html';
55+ }
56+
4857 if($key == $current) $options .= "<option selected=\"selected\" value=\"{$awstatsindex}\">{$value}</option>\n";
4958 else $options .= "<option value=\"{$value}/{$awstatsindex}\">{$value}</option>\n";
5059}
5160
61+ $awstatsindex = 'awsindex.html';
62+
5263$html = "<!DOCTYPE html>\n<html>\n<head>\n<title>Stats</title>\n";
5364$html .= "<style>\nhtml,body {margin:0px;padding:0px;width:100%;height:100%;background-color: #ccc;}\n";
5465$html .= "#header\n{\nwidth:100%;margin:0px auto;\nheight:20px;\nposition:fixed;\npadding:4px;\ntext-align:center;\n}\n";
@@ -60,4 +71,4 @@ $html .= $options;
6071$html .= "</select>\n</div>\n<iframe src=\"{$awstatsindex}\" id=\"content\"></iframe>\n";
6172$html .= "</body></html>";
6273echo $html;
63- ?>
74+ ?>
You can’t perform that action at this time.
0 commit comments