From eb9a0f4331d01db36421324439e7a33386f222e1 Mon Sep 17 00:00:00 2001 From: michael pereira Date: Mon, 11 Jul 2011 02:46:16 +0200 Subject: redirect raus --- .../ipxe/controllers/ResourceController.php | 68 +++++++++++----------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'application/modules/ipxe/controllers/ResourceController.php') diff --git a/application/modules/ipxe/controllers/ResourceController.php b/application/modules/ipxe/controllers/ResourceController.php index ea3c80b..54a6c89 100644 --- a/application/modules/ipxe/controllers/ResourceController.php +++ b/application/modules/ipxe/controllers/ResourceController.php @@ -20,19 +20,19 @@ class Ipxe_ResourceController extends Zend_Controller_Action $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); -// $session = new Application_Model_Session(); -// $sm = new Application_Model_SessionMapper(); -// -// //TODO Error Messages if something failed -// $alphaID = $this->_request->getParam('alpha'); -// -// if($alphaID != ""){ -// $alphasessionID = $alphaID; -// $result = $sm->findBy(array('alphasessionID' => $alphasessionID),true); -// # print_a($result); -// $this->thisSession = $session->setOptions($result[0]); -// $this->thisSession->setID($result[0]['sessionID']); -// } + $session = new Application_Model_Session(); + $sm = new Application_Model_SessionMapper(); + + //TODO Error Messages if something failed + $alphaID = $this->_request->getParam('alpha'); + + if($alphaID != ""){ + $alphasessionID = $alphaID; + $result = $sm->findBy(array('alphasessionID' => $alphasessionID),true); + # print_a($result); + $this->thisSession = $session->setOptions($result[0]); + $this->thisSession->setID($result[0]['sessionID']); + } } @@ -68,27 +68,27 @@ class Ipxe_ResourceController extends Zend_Controller_Action $vesamenuView->addScriptPath(APPLICATION_PATH.'/modules/ipxe/views/scripts/resource/'); $vesamenuView->host = $_SERVER['HTTP_HOST']; -// // Request Bootmenu -// $pbsFilter = new Pbs_Filter(); -// $bootmenuID = $pbsFilter->evaluate(); -// -// if($bootmenuID != null){ -// $vesamenuView->alphaID = $this->thisSession->getAlphasessionID(); -// -// $bootmenuMapper = new Application_Model_BootMenuMapper(); -// $bm = $bootmenuMapper->find($bootmenuID); -// $vesamenuView->title = $bm->getTitle(); -//// $this->view->startcounter = $bm->getStartcounter(); -// -// $bootmenuentriesMapper = new Application_Model_BootMenuEntriesMapper(); -// $res = $bootmenuentriesMapper->findBy(array('bootmenuID' => $bootmenuID),false); -// $vesamenuView->bmelist = $res; -// -// } -// else{ -// -// $vesamenuView->error = "You have no BootMenu."; -// } + // Request Bootmenu + $pbsFilter = new Pbs_Filter(); + $bootmenuID = $pbsFilter->evaluate(); + + if($bootmenuID != null){ + $vesamenuView->alphaID = $this->thisSession->getAlphasessionID(); + + $bootmenuMapper = new Application_Model_BootMenuMapper(); + $bm = $bootmenuMapper->find($bootmenuID); + $vesamenuView->title = $bm->getTitle(); +// $this->view->startcounter = $bm->getStartcounter(); + + $bootmenuentriesMapper = new Application_Model_BootMenuEntriesMapper(); + $res = $bootmenuentriesMapper->findBy(array('bootmenuID' => $bootmenuID),false); + $vesamenuView->bmelist = $res; + + } + else{ + + $vesamenuView->error = "You have no BootMenu."; + } $vesamenu = $vesamenuView->render('getvesamenu.phtml'); -- cgit v1.2.3-55-g7522