fix syntax
Signed-off-by: Christopher Guindon <chris.guindon@eclipse.org>
diff --git a/committers/loadstats/dailyloadstats.php b/committers/loadstats/dailyloadstats.php
index 2951f49..a063228 100755
--- a/committers/loadstats/dailyloadstats.php
+++ b/committers/loadstats/dailyloadstats.php
@@ -1,48 +1,48 @@
<?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");
+ require_once($_SERVER['DOCUMENT_ROOT'] ."/eclipse.org-common/system/app.class.php");
+ require_once("/home/data/httpd/eclipse-php-classes/menu/menu.class.php");
- #*****************************************************************************
- #
- # loadstats.php
- #
- # Author: M. Ward
- # Date: 2006-05-08
- #
- # Description: show the load stats for the last 24 hours on the servers.
- #
- #
- #
- #
- # HISTORY:
- #
- #****************************************************************************
+ #*****************************************************************************
+ #
+ # loadstats.php
+ #
+ # Author: M. Ward
+ # Date: 2006-05-08
+ #
+ # Description: show the load stats for the last 24 hours on the servers.
+ #
+ #
+ #
+ #
+ # HISTORY:
+ #
+ #****************************************************************************
//set the default debug level nice and low
define('DEBUG',0);
define('BASEPATH','/home/data/common/monitor/loadstats/');
- $App = new App();
- $App->preventCaching();
+ $App = new App();
+ $App->preventCaching();
- //connect to ldap
- $Session = $this->App->useSession('required');
- $Friend = $this->Session->getFriend();
+ //connect to ldap
+ $Session = $App->useSession('required');
+ $Friend = $Session->getFriend();
if (!$Friend->getIsCommitter()){
header("HTTP/1.1 403 Forbidden");
exit;
}
- include "../html/header.php";
- $Menu = new Menu("en");
+ include "../html/header.php";
+ $Menu = new Menu("en");
include("../modules/menu.php");
- //var_dump(gd_info());
+ //var_dump(gd_info());
- //current date info
- $today=date('d');
- $month = date ('n');
- $year = date('Y');
+ //current date info
+ $today=date('d');
+ $month = date ('n');
+ $year = date('Y');
//now the main processing loop.
//get all of the directory entries
@@ -55,5 +55,3 @@
}
}
include "../html/footer.php";
-
-?>
diff --git a/committers/loadstats/showmonthstats.php b/committers/loadstats/showmonthstats.php
index b13e5d3..8442b48 100755
--- a/committers/loadstats/showmonthstats.php
+++ b/committers/loadstats/showmonthstats.php
@@ -1,49 +1,49 @@
<?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");
+ require_once($_SERVER['DOCUMENT_ROOT'] ."/eclipse.org-common/system/app.class.php");
+ require_once("/home/data/httpd/eclipse-php-classes/menu/menu.class.php");
- #*****************************************************************************
- #
- # loadstats.php
- #
- # Author: M. Ward
- # Date: 2006-05-08
- #
- # Description: show the load stats for the last month on the given server.
- #
- #
- #
- #
- # HISTORY:
- #
- #****************************************************************************
+ #*****************************************************************************
+ #
+ # loadstats.php
+ #
+ # Author: M. Ward
+ # Date: 2006-05-08
+ #
+ # Description: show the load stats for the last month on the given server.
+ #
+ #
+ #
+ #
+ # HISTORY:
+ #
+ #****************************************************************************
//set the default debug level nice and low
define('DEBUG',0);
//define('BASEPATH','/tmp/')
- $App = new App();
- $App->preventCaching();
+ $App = new App();
+ $App->preventCaching();
- $Session = $this->App->useSession('required');
- $Friend = $this->Session->getFriend();
+ $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 "../html/header.php";
+ //do menu stuff
+ $Menu = new Menu("en");
+ $Menu->addMenuItem("Main stats page", "dailyloadstats.php", "_self");
include("../modules/menu.php");
- //build a calendar
+ //build a calendar
//get the passed values, if they haven't been passed, then use the current values
//start with the month
if( isset($_REQUEST['day']) && $_REQUEST['day'] != '' && is_numeric($_REQUEST['day']) && $_REQUEST['day'] >= 0 && $_REQUEST['day'] <= 31 ){
- if( $_REQUEST['day'] < 10 )
+ if( $_REQUEST['day'] < 10 )
$today = "0" . $_REQUEST['day'];
else
$today = $_REQUEST['day'];
@@ -82,9 +82,9 @@
//use showmonth to adjust the image
if( isset($_REQUEST['showmonth']) && is_numeric($_REQUEST['showmonth']) && $_REQUEST['showmonth'] >= 1 ){
- $html = "<img src='drawmonthstats.php?server=$server&month=$month&year=$year'></br></br></br>";
+ $html = "<img src='drawmonthstats.php?server=$server&month=$month&year=$year'></br></br></br>";
} else {
- $html = "<img src='drawstats.php?server=$server&year=$year&month=$month&day=$today'></br></br></br>";
+ $html = "<img src='drawstats.php?server=$server&year=$year&month=$month&day=$today'></br></br></br>";
}
@@ -106,22 +106,22 @@
$calendar .= "<td colspan='$dayOfWeek'> </td>\n\r";
}
while ($currentDay <= $numberofdays) {
- if ($dayOfWeek == 7) {
- $dayOfWeek = 0;
- $calendar .= "</tr><tr>";
- }
- $day_code = date( 'd', mktime( 0,0,0,$month,$currentDay,$year));
- if( is_file($server ."/" .$year . "/" . $month_name . "/loadavgfor." . $day_code) == true) {
- $calendar .= "<td><a href=\"showmonthstats.php?server=$server&year=$year&month=$month&day=$currentDay\">$currentDay</a></td>\n\r";
- } else {
- $calendar .= "<td>$currentDay</td>\n\r";
- }
- $currentDay++;
- $dayOfWeek++;
+ if ($dayOfWeek == 7) {
+ $dayOfWeek = 0;
+ $calendar .= "</tr><tr>";
+ }
+ $day_code = date( 'd', mktime( 0,0,0,$month,$currentDay,$year));
+ if( is_file($server ."/" .$year . "/" . $month_name . "/loadavgfor." . $day_code) == true) {
+ $calendar .= "<td><a href=\"showmonthstats.php?server=$server&year=$year&month=$month&day=$currentDay\">$currentDay</a></td>\n\r";
+ } else {
+ $calendar .= "<td>$currentDay</td>\n\r";
+ }
+ $currentDay++;
+ $dayOfWeek++;
}
if ($dayOfWeek != 7) {
- $remainingDays = 7 - $dayOfWeek;
- $calendar .= "<td colspan='$remainingDays'> </td>\n\r";
+ $remainingDays = 7 - $dayOfWeek;
+ $calendar .= "<td colspan='$remainingDays'> </td>\n\r";
}
$calendar .= "<tr><td colspan=7><a href=\"showyearlystats.php?server=$server\">Yearly Summaries</a></td></tr>\n\r";
$calendar .= "</table>\n\r";
@@ -135,5 +135,3 @@
echo $html;
include "../html/footer.php";
-
-?>
diff --git a/committers/loadstats/showyearlystats.php b/committers/loadstats/showyearlystats.php
index fa55248..67d2c54 100755
--- a/committers/loadstats/showyearlystats.php
+++ b/committers/loadstats/showyearlystats.php
@@ -1,61 +1,59 @@
<?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");
+ 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:
- #
- #****************************************************************************
+ #*****************************************************************************
+ #
+ # 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 = $this->App->useSession('required');
- $Friend = $this->Session->getFriend();
+ $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 "../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
+ //get the servername
$server= $_REQUEST['server'];
- //get directory data
- $contents = scandir($server);
+ //get directory data
+ $contents = scandir($server);
- $html = "<h2>Yearly Summaries</h2>";
+ $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";
- }
- }
- }
+ 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";
-
-?>
+ include "../html/footer.php";
\ No newline at end of file