From da8bab4d36844a8c6dd87e4063db816b6e097bea Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Fri, 25 Mar 2011 15:11:32 +0100 Subject: bla --- application/modules/dev/forms/FilterEvaluate.php | 2 +- application/modules/fbgui/controllers/IndexController.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'application/modules') diff --git a/application/modules/dev/forms/FilterEvaluate.php b/application/modules/dev/forms/FilterEvaluate.php index 9922f2b..7fd16c3 100644 --- a/application/modules/dev/forms/FilterEvaluate.php +++ b/application/modules/dev/forms/FilterEvaluate.php @@ -12,7 +12,7 @@ class dev_Form_FilterEvaluate extends Zend_Form { $this->setName("Test Filter"); $this->setMethod('post'); - $this->setAction('/filter/evaluate'); + $this->setAction('/dev/filter/evaluate'); $this->addElement('text', 'ip', array( 'filters' => array('StringTrim'), diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php index 2dce0dd..8993285 100644 --- a/application/modules/fbgui/controllers/IndexController.php +++ b/application/modules/fbgui/controllers/IndexController.php @@ -30,8 +30,9 @@ class Fbgui_IndexController extends Zend_Controller_Action elseif(isset($_POST['serialnumber'])){ $result = array(); $results = $bootisomapper->findBy('serialnumber',$_POST['serialnumber']); + print_a($results); $bootiso->setOptions($results[0]); - $bootiso->setID($result[0]['bootisoID']); + $bootiso->setID($results[0]['bootisoID']); $groupID = $bootiso->getGroupID(); } -- cgit v1.2.3-55-g7522 From 850a083485b3aa7540a54e1d04ed490a916e35d4 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 25 Mar 2011 15:18:54 +0100 Subject: quickfix sessionmanagement --- application/modules/fbgui/controllers/IndexController.php | 4 ++-- send-post.html | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'application/modules') diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php index 8993285..0719b89 100644 --- a/application/modules/fbgui/controllers/IndexController.php +++ b/application/modules/fbgui/controllers/IndexController.php @@ -30,7 +30,7 @@ class Fbgui_IndexController extends Zend_Controller_Action elseif(isset($_POST['serialnumber'])){ $result = array(); $results = $bootisomapper->findBy('serialnumber',$_POST['serialnumber']); - print_a($results); + print_a($results); $bootiso->setOptions($results[0]); $bootiso->setID($results[0]['bootisoID']); $groupID = $bootiso->getGroupID(); @@ -45,7 +45,7 @@ class Fbgui_IndexController extends Zend_Controller_Action $clientID = $client->getID(); $session = new Application_Model_Session(); - $session->setBootisoID($_POST['bootisoID']); + $session->setBootisoID($bootiso->getID()); $session->setClientID($clientID); $session->setTime(time()); $session->setIp($_SERVER['REMOTE_ADDR']); diff --git a/send-post.html b/send-post.html index 080e73a..6e04b1f 100644 --- a/send-post.html +++ b/send-post.html @@ -11,6 +11,8 @@

+ +

@@ -21,8 +23,10 @@
http://pbs2.local/ - -
+ + +

-- cgit v1.2.3-55-g7522 From fe944ac09029d3e173b629f99e0b8ef4d8212d0b Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 25 Mar 2011 15:51:56 +0100 Subject: gruppengraph nach einloggen in /user/ --- .zfproject.xml | 7 ++++++ application/controllers/IndexController.php | 9 ++++--- application/controllers/StatsController.php | 28 ++++++++++++++++++++++ .../modules/user/views/scripts/index/index.phtml | 2 +- library/Pbs/Graph.php | 2 +- send-post.html | 8 ++----- .../controllers/StatsControllerTest.php | 20 ++++++++++++++++ 7 files changed, 63 insertions(+), 13 deletions(-) create mode 100644 application/controllers/StatsController.php create mode 100644 tests/application/controllers/StatsControllerTest.php (limited to 'application/modules') diff --git a/.zfproject.xml b/.zfproject.xml index eda876f..70ccd1c 100644 --- a/.zfproject.xml +++ b/.zfproject.xml @@ -15,6 +15,9 @@ + + + @@ -689,6 +692,9 @@ + + + @@ -753,6 +759,7 @@ + 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 @@ +_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); + } + } +} + diff --git a/application/modules/user/views/scripts/index/index.phtml b/application/modules/user/views/scripts/index/index.phtml index a6e84a7..0f1fab5 100644 --- a/application/modules/user/views/scripts/index/index.phtml +++ b/application/modules/user/views/scripts/index/index.phtml @@ -13,6 +13,6 @@ - + diff --git a/library/Pbs/Graph.php b/library/Pbs/Graph.php index 13bbe3a..7711dce 100644 --- a/library/Pbs/Graph.php +++ b/library/Pbs/Graph.php @@ -14,7 +14,7 @@ class Pbs_Graph{ $this->graphstring = 'digraph groups { - size="6,6";'; + size="5,5";'; $this->getParentGroups($groupID); $this->getChildGroups($groupID); $this->graphstring .= '}'; diff --git a/send-post.html b/send-post.html index 6e04b1f..6cad8c8 100644 --- a/send-post.html +++ b/send-post.html @@ -9,8 +9,6 @@
http://132.230.4.27/ - -

@@ -23,8 +21,6 @@
http://pbs2.local/ -
@@ -37,8 +33,8 @@
http://localhost:81/ - -
+ +

diff --git a/tests/application/controllers/StatsControllerTest.php b/tests/application/controllers/StatsControllerTest.php new file mode 100644 index 0000000..d130e2e --- /dev/null +++ b/tests/application/controllers/StatsControllerTest.php @@ -0,0 +1,20 @@ +