summaryrefslogtreecommitdiffstats
path: root/application/controllers/StatsController.php
diff options
context:
space:
mode:
authorSebastian Schmelzer2012-01-11 14:36:35 +0100
committerSebastian Schmelzer2012-01-11 14:36:35 +0100
commitfca04a6dab252eb9e8c0a92ce3b7e14b32e68d1e (patch)
tree6e6aaf749f34db8c7c7153c23ef85c57187430bb /application/controllers/StatsController.php
parentAPI: mit addBootos kann man nun auch editieren (diff)
downloadpbs2-fca04a6dab252eb9e8c0a92ce3b7e14b32e68d1e.tar.gz
pbs2-fca04a6dab252eb9e8c0a92ce3b7e14b32e68d1e.tar.xz
pbs2-fca04a6dab252eb9e8c0a92ce3b7e14b32e68d1e.zip
format source files
Diffstat (limited to 'application/controllers/StatsController.php')
-rw-r--r--application/controllers/StatsController.php92
1 files changed, 45 insertions, 47 deletions
diff --git a/application/controllers/StatsController.php b/application/controllers/StatsController.php
index 05762a4..6ccd6bc 100644
--- a/application/controllers/StatsController.php
+++ b/application/controllers/StatsController.php
@@ -1,51 +1,49 @@
-<?php
+<? php
/*
* Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
- * This program is free software distributed under the GPL version 2.
- * See http://gpl.openslx.org/
- *
- * If you have any feedback please consult http://feedback.openslx.org/ and
- * send your suggestions, praise, or complaints to feedback@openslx.org
- *
- * General information about OpenSLX can be found at http://openslx.org/
- */
-
-class StatsController extends Zend_Controller_Action
-{
-
- public function init()
- {
- $this->_helper->layout->disableLayout();
- $this->_helper->viewRenderer->setNoRender();
- }
-
- public function graphgroupAction(){
-
- $userIDsNamespace = Zend_Session::namespaceGet('userIDs');
-
- if(isset($userIDsNamespace['groupID'])){
- header("Content-Type: image/png");
- header("Expires: 0");
- $n = new Pbs_Graph();
-
- $level = $this->_request->getParam('level');
- if(is_numeric($level) && $level != ''){
- $n->setHiglightLevel($level);
- }
- $groupID = $userIDsNamespace['groupID'];
-
- $group = $this->_request->getParam('group');
- if((Pbs_Acl::checkRight('gsdo') || Pbs_Acl::checkRight('gsdog')) && is_numeric($group)){
- $groupID = $group;
- }
-
- $child = $this->_request->getParam('child');
- if(Pbs_Acl::checkRight('glk') && $child != ''){
- $n->newChild($child);
- }
-
- echo $n->graph($groupID);
- }
- }
+* This program is free software distributed under the GPL version 2.
+* See http://gpl.openslx.org/
+*
+* If you have any feedback please consult http://feedback.openslx.org/ and
+* send your suggestions, praise, or complaints to feedback@openslx.org
+*
+* General information about OpenSLX can be found at http://openslx.org/
+*/
+
+class StatsController extends Zend_Controller_Action {
+
+ public function init() {
+ $this->_helper->layout->disableLayout();
+ $this->_helper->viewRenderer->setNoRender();
+ }
+
+ public function graphgroupAction() {
+
+ $userIDsNamespace = Zend_Session::namespaceGet('userIDs');
+
+ if(isset($userIDsNamespace['groupID'])) {
+ header("Content-Type: image/png");
+ header("Expires: 0");
+ $n = new Pbs_Graph();
+
+ $level = $this->_request->getParam('level');
+ if(is_numeric($level) && $level != '') {
+ $n->setHiglightLevel($level);
+ }
+ $groupID = $userIDsNamespace['groupID'];
+
+ $group = $this->_request->getParam('group');
+ if((Pbs_Acl::checkRight('gsdo') || Pbs_Acl::checkRight('gsdog')) && is_numeric($group)) {
+ $groupID = $group;
+ }
+
+ $child = $this->_request->getParam('child');
+ if(Pbs_Acl::checkRight('glk') && $child != '') {
+ $n->newChild($child);
+ }
+
+ echo $n->graph($groupID);
+ }
+ }
}