diff options
Diffstat (limited to 'application/controllers/StatsController.php')
| -rw-r--r-- | application/controllers/StatsController.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/application/controllers/StatsController.php b/application/controllers/StatsController.php new file mode 100644 index 0000000..024eacd --- /dev/null +++ b/application/controllers/StatsController.php @@ -0,0 +1,28 @@ +<?php + +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($userIDsNamespace['groupID'] !=''){ + header("Content-Type: image/png"); + + $n = new Pbs_Graph(); + $str = 'echo "'; + $str .= $n->graph($userIDsNamespace['groupID']); + $str .= '" | dot -Tpng '; + + passthru($str); + } + } +} + |
