2007-09-14 21:33:51 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class StatisticsAdmin extends LeftAndMain {
|
2007-09-15 02:55:36 +02:00
|
|
|
static $tree_class = "SiteTree";
|
|
|
|
static $subitem_class = "Member";
|
2007-09-16 18:24:02 +02:00
|
|
|
var $charts = array();
|
2007-09-15 02:55:36 +02:00
|
|
|
|
2007-09-14 21:33:51 +02:00
|
|
|
/**
|
|
|
|
* Initialisation method called before accessing any functionality that BulkLoaderAdmin has to offer
|
|
|
|
*/
|
|
|
|
public function init() {
|
|
|
|
parent::init();
|
2007-09-16 18:24:02 +02:00
|
|
|
|
2007-09-16 18:24:45 +02:00
|
|
|
//Get rid of prototype 1.4.x
|
|
|
|
Requirements::clear();
|
|
|
|
|
|
|
|
//Load prototype 1.5.x
|
|
|
|
Requirements::javascript("jsparty/prototype15.js");
|
|
|
|
|
|
|
|
//Restore needed requirements
|
|
|
|
Requirements::javascript("jsparty/behaviour.js");
|
|
|
|
Requirements::javascript("jsparty/prototype_improvements.js");
|
|
|
|
Requirements::javascript("jsparty/loader.js");
|
|
|
|
|
|
|
|
Requirements::javascript("jsparty/layout_helpers.js");
|
|
|
|
Requirements::javascript("jsparty/tree/tree.js");
|
|
|
|
Requirements::css("jsparty/tree/tree.css");
|
|
|
|
Requirements::javascript("jsparty/scriptaculous/effects.js");
|
|
|
|
Requirements::javascript("jsparty/scriptaculous/dragdrop.js");
|
|
|
|
|
|
|
|
Requirements::javascript("jsparty/tabstrip/tabstrip.js");
|
|
|
|
Requirements::css("jsparty/tabstrip/tabstrip.css");
|
|
|
|
|
|
|
|
|
|
|
|
Requirements::css("jsparty/greybox/greybox.css");
|
|
|
|
Requirements::javascript("jsparty/greybox/AmiJS.js");
|
|
|
|
Requirements::javascript("jsparty/greybox/greybox.js");
|
|
|
|
|
|
|
|
Requirements::javascript("cms/javascript/LeftAndMain.js");
|
|
|
|
Requirements::javascript("cms/javascript/LeftAndMain_left.js");
|
|
|
|
Requirements::javascript("cms/javascript/LeftAndMain_right.js");
|
|
|
|
|
|
|
|
Requirements::javascript("jsparty/calendar/calendar.js");
|
|
|
|
Requirements::javascript("jsparty/calendar/lang/calendar-en.js");
|
|
|
|
Requirements::javascript("jsparty/calendar/calendar-setup.js");
|
|
|
|
Requirements::css("sapphire/css/CalendarDateField.css");
|
|
|
|
Requirements::css("jsparty/calendar/calendar-win2k-1.css");
|
|
|
|
|
|
|
|
Requirements::javascript('sapphire/javascript/Validator.js');
|
|
|
|
|
|
|
|
Requirements::css("sapphire/css/SubmittedFormReportField.css");
|
|
|
|
|
|
|
|
Requirements::css('cms/css/TinyMCEImageEnhancement.css');
|
|
|
|
Requirements::javascript("jsparty/SWFUpload/SWFUpload.js");
|
|
|
|
Requirements::javascript("cms/javascript/Upload.js");
|
|
|
|
Requirements::javascript("sapphire/javascript/Security_login.js");
|
|
|
|
Requirements::javascript('cms/javascript/TinyMCEImageEnhancement.js');
|
|
|
|
|
|
|
|
|
|
|
|
//Load statistics requirements
|
2007-09-15 22:23:50 +02:00
|
|
|
Requirements::javascript("jsparty/plotr.js");
|
2007-09-16 18:24:02 +02:00
|
|
|
Requirements::javascript("jsparty/tablesort.js");
|
|
|
|
Requirements::javascript("cms/javascript/StatisticsAdmin.js");
|
|
|
|
|
2007-09-15 22:23:50 +02:00
|
|
|
Requirements::css("cms/css/StatisticsAdmin.css");
|
2007-09-14 21:33:51 +02:00
|
|
|
}
|
2007-09-16 18:24:02 +02:00
|
|
|
|
2007-09-14 21:33:51 +02:00
|
|
|
public function Link($action=null) {
|
|
|
|
return "admin/statistics/$action";
|
|
|
|
}
|
2007-09-16 18:24:02 +02:00
|
|
|
|
2007-09-14 21:33:51 +02:00
|
|
|
/**
|
|
|
|
* Form that will be shown when we open one of the items
|
2007-09-16 18:24:02 +02:00
|
|
|
*/
|
2007-09-15 22:23:50 +02:00
|
|
|
public function EditForm() {
|
2007-09-16 18:24:45 +02:00
|
|
|
return $this->showAll();
|
2007-09-16 18:24:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function Trend() {
|
2007-09-16 18:27:36 +02:00
|
|
|
return Statistics::TrendChart(array('PageView', 'Member', 'SiteTree'), 'day', 'mchart', 'Line', 'red');
|
2007-09-16 18:24:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function BrowserPie() {
|
|
|
|
return Statistics::BrowserChart();
|
2007-09-14 21:33:51 +02:00
|
|
|
}
|
2007-09-16 18:24:02 +02:00
|
|
|
|
2007-09-16 18:27:36 +02:00
|
|
|
function OSPie() {
|
|
|
|
return Statistics::OSChart();
|
|
|
|
}
|
|
|
|
|
|
|
|
function UACPie() {
|
|
|
|
return Statistics::ActivityChart();
|
|
|
|
}
|
|
|
|
|
2007-09-16 18:24:02 +02:00
|
|
|
function UserTable() {
|
|
|
|
return Statistics::UserRecordTable();
|
2007-09-15 02:55:36 +02:00
|
|
|
}
|
2007-09-16 18:24:02 +02:00
|
|
|
|
|
|
|
function ViewTable() {
|
|
|
|
return Statistics::getViews('all');
|
2007-09-15 02:55:36 +02:00
|
|
|
}
|
2007-09-16 18:24:02 +02:00
|
|
|
|
2007-09-16 18:27:36 +02:00
|
|
|
|
2007-09-16 18:24:02 +02:00
|
|
|
|
2007-09-16 18:24:45 +02:00
|
|
|
function showAll() {
|
|
|
|
return $this->BrowserPie() .
|
2007-09-16 18:27:36 +02:00
|
|
|
$this->OSPie() .
|
|
|
|
$this->UACPie() .
|
2007-09-16 18:24:45 +02:00
|
|
|
$this->Trend() .
|
|
|
|
$this->UserTable() .
|
|
|
|
$this->ViewTable();
|
2007-09-15 02:49:54 +02:00
|
|
|
}
|
2007-09-16 18:24:02 +02:00
|
|
|
|
2007-09-14 21:33:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|