Skip to content
Snippets Groups Projects
Commit 2a958a7a authored by Marius Burkard's avatar Marius Burkard
Browse files

Merge branch '6147-awstats-links' into 'develop'

Resolve "AWstats links"

Closes #6147

See merge request ispconfig/ispconfig3!1470
parents 91ea8545 5d143fe8
No related branches found
No related tags found
No related merge requests found
...@@ -43,23 +43,17 @@ if ($handle = opendir('.')) ...@@ -43,23 +43,17 @@ if ($handle = opendir('.'))
arsort($awprev); arsort($awprev);
$options = ""; $options = "";
foreach ($awprev as $key => $value) foreach ($awprev as $key => $value) {
{ // Define name for the index file
$awstatsindex = 'awsindex.html';
if(file_exists($value.'/awsindex.html') && file_exists($value.'/goaindex.html')) { if(!file_exists($value.'/awsindex.html') && file_exists($value.'/goaindex.html')) {
$awstatsindex = 'awsindex.html'; $awstatsindex = 'goaindex.html';
} elseif(file_exists($value.'/awsindex.html') && !file_exists($value.'/goaindex.html')) { }
$awstatsindex = 'awsindex.html'; // Set name for first entry in month list
} else {
$awstatsindex = 'goaindex.html';
}
if($key == $current) $options .= "<option selected=\"selected\" value=\"{$awstatsindex}\">{$value}</option>\n"; if($key == $current) $options .= "<option selected=\"selected\" value=\"{$awstatsindex}\">{$value}</option>\n";
else $options .= "<option value=\"{$value}/{$awstatsindex}\">{$value}</option>\n"; else $options .= "<option value=\"{$value}/{$awstatsindex}\">{$value}</option>\n";
} }
$awstatsindex = 'awsindex.html';
$html = "<!DOCTYPE html>\n<html>\n<head>\n<title>Stats</title>\n"; $html = "<!DOCTYPE html>\n<html>\n<head>\n<title>Stats</title>\n";
$html .= "<style>\nhtml,body {margin:0px;padding:0px;width:100%;height:100%;background-color: #ccc;}\n"; $html .= "<style>\nhtml,body {margin:0px;padding:0px;width:100%;height:100%;background-color: #ccc;}\n";
$html .= "#header\n{\nwidth:100%;margin:0px auto;\nheight:20px;\nposition:fixed;\npadding:4px;\ntext-align:center;\n}\n"; $html .= "#header\n{\nwidth:100%;margin:0px auto;\nheight:20px;\nposition:fixed;\npadding:4px;\ntext-align:center;\n}\n";
...@@ -68,7 +62,7 @@ $html .= $script; ...@@ -68,7 +62,7 @@ $html .= $script;
$html .= "<div id=\"header\">{$yearmonth_text}\n"; $html .= "<div id=\"header\">{$yearmonth_text}\n";
$html .= "<select name=\"awdate\" onchange=\"load_content(this.value)\">\n"; $html .= "<select name=\"awdate\" onchange=\"load_content(this.value)\">\n";
$html .= $options; $html .= $options;
$html .= "</select>\n</div>\n<iframe src=\"{$awstatsindex}\" id=\"content\"></iframe>\n"; $html .= "</select>\n</div>\n<iframe src=\"awsindex.html\" id=\"content\"></iframe>\n";
$html .= "</body></html>"; $html .= "</body></html>";
echo $html; echo $html;
?> ?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment