From 897af06af9522ded99b1e0f46730299e89856ffe Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Mon, 11 Jun 2012 05:00:57 -0400 Subject: [PATCH] Updated version number to 3.0.4.6 --- server/conf/awstats_index.php.master | 48 ++++++++++++++++++++++++------------------------ 1 files changed, 24 insertions(+), 24 deletions(-) diff --git a/server/conf/awstats_index.php.master b/server/conf/awstats_index.php.master index 09fcde0..1cb20a6 100644 --- a/server/conf/awstats_index.php.master +++ b/server/conf/awstats_index.php.master @@ -1,8 +1,3 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> -<title>AWAstats Statistics</title> <script> function load_content(url) { @@ -10,8 +5,7 @@ iframe.src = url; } </script> -</head> -<body> + <?php $aw['aw_jump_text'] = 'Jump to previous stats: '; $aw['aw_renamed_index'] = 'awsindex.html'; @@ -22,37 +16,45 @@ { if (substr($file,0,1) != "." && is_dir($file)) { - $awprev[] = $file; + $orderkey = substr($file,0,4).substr($file,5,2); + if (substr($file,5,2) < 10 ) + { + $orderkey = substr($file,0,4)."0".substr($file,5,2); + } + $awprev[$orderkey] = $file; } } - $month = date("m")+1-1; - + $month = date("n"); + $year = date("Y"); + if (date("d") == 1) { - $month = date("m")-1; - } - - $year = date("Y"); - - if (date("m") == 1) - { + $month = date("m")-1; + if (date("m") == 1) + { $year = date("Y")-1; $month = "12"; + } } - $awprev[] = $year."-".$month; - closedir($handle); + $current = $year.$month; + if ( $month < 10 ) { + $current = $year."0".$month; + } + $awprev[$current] = $year."-".$month; + + closedir($handle); } echo '<div style="width: 97%; margin-left: 4px; height: 20px; background-color: #FFFFFF; position: fixed; padding: 7px; border: 2px solid #cccccc;><div align="left"><font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif">' .$aw["aw_jump_text"]. '</font </div>'; echo "<select name='awdate' onchange=\"load_content(this.value)\">"; -rsort($awprev); +krsort($awprev); foreach ($awprev as $key => $value) { - if($key == 0) + if($key == $current) { echo "<option selected=\"selected\" value=\"".$aw['aw_renamed_index']."\"> $value</option>"; } @@ -64,6 +66,4 @@ echo '</select></div><iframe src="'.$aw['aw_renamed_index'].'" frameborder="0" scrolling="Yes" width="100%" height="100%" style="margin-top:25px" id="content"></iframe>'; -?> -</body> -</html> \ No newline at end of file +?> \ No newline at end of file -- Gitblit v1.9.1