blob: 67d2c54daaa04e5bfbed36b27976ab7b3cad99a4 [file] [log] [blame]
<?php
require_once($_SERVER['DOCUMENT_ROOT'] ."/eclipse.org-common/system/app.class.php");
require_once("/home/data/httpd/eclipse-php-classes/menu/menu.class.php");
#*****************************************************************************
#
# showyearlystats.php
#
# Author: M. Ward
# Date: 2008-04-10
#
# Description: show the load stats for the all available years on the given server.
#
#
#
#
# HISTORY:
#
#****************************************************************************
//set the default debug level nice and low
define('DEBUG',0);
//define('BASEPATH','/tmp/')
$Session = $App->useSession('required');
$Friend = $Session->getFriend();
if (!$Friend->getIsCommitter()){
header("HTTP/1.1 403 Forbidden");
exit;
}
include "../html/header.php";
//do menu stuff
$Menu = new Menu("en");
$Menu->addMenuItem("Main stats page", "dailyloadstats.php", "_self");
include("../modules/menu.php");
//get the servername
$server= $_REQUEST['server'];
//get directory data
$contents = scandir($server);
$html = "<h2>Yearly Summaries</h2>";
foreach( $contents as $entry) {
//is it a directory?
if ( $entry != "." && $entry != ".." ){
if( is_dir( $server ."/" . $entry ) == true) {
$html .= "</br></br><img src='drawyearstats.php?server=$server&year=$entry'></br></br></br>";
} else {
$html .= "not a directory !$entries";
}
}
}
echo $html;
include "../html/footer.php";