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-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:02 +02:00
|
|
|
return $this->Trend();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Trend() {
|
|
|
|
return Statistics::TrendChart(array('Member', 'SiteTree', 'Group'), 'day', 'mchart', 'Line', 'red');
|
|
|
|
}
|
|
|
|
|
|
|
|
function BrowserPie() {
|
|
|
|
return Statistics::BrowserChart();
|
2007-09-14 21:33:51 +02:00
|
|
|
}
|
2007-09-16 18:24:02 +02:00
|
|
|
|
|
|
|
function UserTable() {
|
|
|
|
//Statistics::getBrowserChart();
|
|
|
|
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
|
|
|
|
|
|
|
public function users($params) {
|
|
|
|
return Statistics::UserRecordTable();
|
2007-09-15 22:23:50 +02:00
|
|
|
}
|
2007-09-16 18:24:02 +02:00
|
|
|
|
|
|
|
public function overview($params) {
|
|
|
|
return $this->BrowserPie();
|
2007-09-15 02:49:54 +02:00
|
|
|
}
|
2007-09-16 18:24:02 +02:00
|
|
|
|
2007-09-14 21:33:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|