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/modules/fbgui/controllers/IndexController.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'application/modules/fbgui/controllers/IndexController.php') 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(); + } -- cgit v1.2.3-55-g7522 From fa5ec972eab53575b06bb5062cbdb579126b8013 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 21 Mar 2011 14:32:55 +0100 Subject: quick-hack um durchzubooten --- .../modules/fbgui/controllers/IndexController.php | 27 ++++++++++++++++++++-- .../modules/fbgui/views/scripts/index/index.phtml | 2 +- .../modules/fbgui/views/scripts/index/start.phtml | 0 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 application/modules/fbgui/views/scripts/index/start.phtml (limited to 'application/modules/fbgui/controllers/IndexController.php') diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php index fe457b6..12514c5 100644 --- a/application/modules/fbgui/controllers/IndexController.php +++ b/application/modules/fbgui/controllers/IndexController.php @@ -68,10 +68,33 @@ class Fbgui_IndexController extends Zend_Controller_Action else{ echo "

Not Welcome

"; print_a($_POST); - } + } } - + public function startAction(){ + $bootmenuntryID = $this->_request->getParam('bme'); + $bootmenuentriesMapper = new Application_Model_BootMenuEntriesMapper(); + $bootmenuentry = new Application_Model_BootMenuEntries(); + $bootmenuentriesMapper->find($bootmenuntryID,$bootmenuentry); + + $sessionMapper = new Application_Model_SessionMapper(); + $session_k = $sessionMapper->findBy('alphasessionID',$_SESSION['alphasessionID']); + + $session = new Application_Model_Session(); + $session->setOptions($session_k[0]); + $session->setID($session_k[0]['sessionID']); +# print_a($bootmenuentry);die(); + $session->setBootmenuentryID($bootmenuntryID); + $session->setBootosID($bootmenuentry->getBootosID()); + echo "

Downloading

"; + echo ""; + + } } diff --git a/application/modules/fbgui/views/scripts/index/index.phtml b/application/modules/fbgui/views/scripts/index/index.phtml index 2e93bda..b2b813d 100644 --- a/application/modules/fbgui/views/scripts/index/index.phtml +++ b/application/modules/fbgui/views/scripts/index/index.phtml @@ -3,7 +3,7 @@ getID();?> getTitle();?> - take this + take this diff --git a/application/modules/fbgui/views/scripts/index/start.phtml b/application/modules/fbgui/views/scripts/index/start.phtml new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3-55-g7522 From aed012ae09ec5c404acdc20240fe7cbd8fe5a04c Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 21 Mar 2011 15:11:22 +0100 Subject: fbgui: serialnumber von bootmedium wird berücksichtigt zur Gruppenfindung --- application/modules/fbgui/controllers/IndexController.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'application/modules/fbgui/controllers/IndexController.php') diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php index 12514c5..6c4a542 100644 --- a/application/modules/fbgui/controllers/IndexController.php +++ b/application/modules/fbgui/controllers/IndexController.php @@ -28,8 +28,17 @@ class Fbgui_IndexController extends Zend_Controller_Action $bootisomapper = new Application_Model_BootIsoMapper(); $bootiso = new Application_Model_BootIso(); - $bootisomapper->find($_POST['bootisoID'],$bootiso); - $groupID = $bootiso->getGroupID(); + if(isset($_POST['bootisoID'])){ + $bootisomapper->find($_POST['bootisoID'],$bootiso); + $groupID = $bootiso->getGroupID(); + } + elseif(isset($_POST['serialnumber'])){ + $results = $bootisomapper->findBy('serialnumber',$_POST['serialnumber']); + $bootiso->setOptions($results[0]); + $bootiso->setID($result[0]['bootisoID']); + $groupID = $bootiso->getGroupID(); + + } $client = new Application_Model_Client(); $client->setMacadress($_POST['mac']); -- cgit v1.2.3-55-g7522