From e83e5f1768562d142e638980dc0c8d7fd4d88104 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 21 Mar 2011 12:48:44 +0100 Subject: FilterEntries-Formular steht --- application/controllers/IndexController.php | 1 + 1 file changed, 1 insertion(+) (limited to 'application/controllers/IndexController.php') diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php index 2972e9e..5f61df4 100644 --- a/application/controllers/IndexController.php +++ b/application/controllers/IndexController.php @@ -10,6 +10,7 @@ class IndexController extends Zend_Controller_Action public function indexAction() { + print_a($_SERVER); if(stristr($_SERVER['HTTP_USER_AGENT'],'prebootGUI')){ $this->_forward('index','Index','fbgui'); } -- cgit v1.2.3-55-g7522 From 15437db2980b0ab7782fe1dab261aa75b6b0b410 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 21 Mar 2011 14:07:06 +0100 Subject: Filter angepasst, wenn keine Mitgliedschaft besteht fbgui als beispiel mit bootmenu ausgestattet --- application/controllers/IndexController.php | 8 ++-- .../modules/fbgui/controllers/IndexController.php | 14 +++--- .../modules/fbgui/views/scripts/index/index.phtml | 52 ++++------------------ library/Pbs/Filter.php | 8 ++++ 4 files changed, 31 insertions(+), 51 deletions(-) (limited to 'application/controllers/IndexController.php') diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php index 5f61df4..f3e5256 100644 --- a/application/controllers/IndexController.php +++ b/application/controllers/IndexController.php @@ -10,10 +10,12 @@ class IndexController extends Zend_Controller_Action public function indexAction() { - print_a($_SERVER); - if(stristr($_SERVER['HTTP_USER_AGENT'],'prebootGUI')){ - $this->_forward('index','Index','fbgui'); + if(stristr($_SERVER['HTTP_USER_AGENT'],'prebootGUI')){ + $_SESSION['postdata'] = $_POST; + $this->_redirect('/fbgui/index/index') ; } + + // action body } diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php index f5f8cdf..fe457b6 100644 --- a/application/modules/fbgui/controllers/IndexController.php +++ b/application/modules/fbgui/controllers/IndexController.php @@ -10,7 +10,10 @@ class Fbgui_IndexController extends Zend_Controller_Action public function indexAction() { - + if(isset($_SESSION['postdata'])){ + $_POST = ($_SESSION['postdata']); + unset($_SESSION['postdata']); + } $keys = $this->_request->getParam('keys'); $post = $this->_request->getParam('post'); if($post != '' && $keys != ''){ @@ -51,10 +54,11 @@ class Fbgui_IndexController extends Zend_Controller_Action // Request Bootmenu $pbsFilter = new Pbs_Filter(); $bootmenuID = $pbsFilter->evaluate(); - print_a('bootmenuID is ',$bootmenuID); if($bootmenuID != null){ - print_a('goto bootmenu'); - #$this->_redirect('/dev/bootmenu/index/bootmenuid/'.$bootmenuID); + print_a('goto bootmenu '.$bootmenuID); + $bootmenuentriesMapper = new Application_Model_BootMenuEntriesMapper(); + $res = $bootmenuentriesMapper->findBy('bootmenuID',$bootmenuID); + $this->view->entries = $res; } else{ print_a('no filter is valid, goto login'); @@ -65,7 +69,7 @@ class Fbgui_IndexController extends Zend_Controller_Action echo "

Not Welcome

"; print_a($_POST); } - die(); + } diff --git a/application/modules/fbgui/views/scripts/index/index.phtml b/application/modules/fbgui/views/scripts/index/index.phtml index 4b38f0a..2e93bda 100644 --- a/application/modules/fbgui/views/scripts/index/index.phtml +++ b/application/modules/fbgui/views/scripts/index/index.phtml @@ -1,43 +1,9 @@ - -
-

Welcome to the Zend Framework!

- -

This is your project's main page

- -
-

-

- Helpful Links:
- Zend Framework Website | - Zend Framework Manual -

-
-
\ No newline at end of file + +entries as $entry):?> + + + + + + +
getID();?>getTitle();?>take this
diff --git a/library/Pbs/Filter.php b/library/Pbs/Filter.php index 91e97e9..1759412 100644 --- a/library/Pbs/Filter.php +++ b/library/Pbs/Filter.php @@ -208,6 +208,14 @@ class Pbs_Filter{ //TODO: GET GROUP from SESSION $groupID = $this->membership->getGroupID(); } + } + else{ + $bootisoMapper = new Application_Model_BootisoMapper(); + $bootiso = new Application_Model_BootIso(); + $bootisoMapper->find($session->getBootisoID(),$bootiso); + $groupID = $bootiso->getGroupID(); + } + if(isset($groupID)){ try{ $stmt = $db->query("SELECT * FROM pbs_filterentries WHERE filtertypeID = ".$filtertypID." AND -- cgit v1.2.3-55-g7522