File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed
Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -43,23 +43,17 @@ if ($handle = opendir('.'))
4343arsort($awprev);
4444
4545$options = "";
46- foreach ($awprev as $key => $value)
47- {
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-
46+ foreach ($awprev as $key => $value) {
47+ // Define name for the index file
48+ $awstatsindex = 'awsindex.html';
49+ if(!file_exists($value.'/awsindex.html') && file_exists($value.'/goaindex.html')) {
50+ $awstatsindex = 'goaindex.html';
51+ }
52+ // Set name for first entry in month list
5753 if($key == $current) $options .= "<option selected=\"selected\" value=\"{$awstatsindex}\">{$value}</option>\n";
5854 else $options .= "<option value=\"{$value}/{$awstatsindex}\">{$value}</option>\n";
5955}
6056
61- $awstatsindex = 'awsindex.html';
62-
6357$html = "<!DOCTYPE html>\n<html>\n<head>\n<title>Stats</title>\n";
6458$html .= "<style>\nhtml,body {margin:0px;padding:0px;width:100%;height:100%;background-color: #ccc;}\n";
6559$html .= "#header\n{\nwidth:100%;margin:0px auto;\nheight:20px;\nposition:fixed;\npadding:4px;\ntext-align:center;\n}\n";
You can’t perform that action at this time.
0 commit comments