summaryrefslogtreecommitdiffstats
path: root/application/controllers
diff options
context:
space:
mode:
authorSimon2011-03-25 15:51:56 +0100
committerSimon2011-03-25 15:51:56 +0100
commitfe944ac09029d3e173b629f99e0b8ef4d8212d0b (patch)
tree1c080155e4ac6e5d0472fbca4b9b39a0ca375c27 /application/controllers
parentdebuglevel aus (diff)
downloadpbs2-fe944ac09029d3e173b629f99e0b8ef4d8212d0b.tar.gz
pbs2-fe944ac09029d3e173b629f99e0b8ef4d8212d0b.tar.xz
pbs2-fe944ac09029d3e173b629f99e0b8ef4d8212d0b.zip
gruppengraph nach einloggen in /user/
Diffstat (limited to 'application/controllers')
-rw-r--r--application/controllers/IndexController.php9
-rw-r--r--application/controllers/StatsController.php28
2 files changed, 32 insertions, 5 deletions
diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php
index 2c53550..cf6673c 100644
--- a/application/controllers/IndexController.php
+++ b/application/controllers/IndexController.php
@@ -14,12 +14,11 @@ class IndexController extends Zend_Controller_Action
$_SESSION['postdata'] = $_POST;
$this->_redirect('/fbgui/index/index');
}
-
- echo 'tesT';
+
// action body
- $n = new Pbs_Graph();
- print_a($n->graph(2));
- }
+
+
+ }
}
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);
+ }
+ }
+}
+