diff options
| author | michael pereira | 2011-07-11 02:46:16 +0200 |
|---|---|---|
| committer | michael pereira | 2011-07-11 02:46:16 +0200 |
| commit | eb9a0f4331d01db36421324439e7a33386f222e1 (patch) | |
| tree | 45d274fd34f3963d62b9b3b1c7adee080694b4dd /application/modules/ipxe | |
| parent | redirect raus (diff) | |
| download | pbs2-eb9a0f4331d01db36421324439e7a33386f222e1.tar.gz pbs2-eb9a0f4331d01db36421324439e7a33386f222e1.tar.xz pbs2-eb9a0f4331d01db36421324439e7a33386f222e1.zip | |
redirect raus
Diffstat (limited to 'application/modules/ipxe')
| -rw-r--r-- | application/modules/ipxe/controllers/ResourceController.php | 68 | ||||
| -rw-r--r-- | application/modules/ipxe/views/scripts/resource/getvesamenu.phtml | 40 |
2 files changed, 54 insertions, 54 deletions
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'); diff --git a/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml b/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml index 552dacf..6785183 100644 --- a/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml +++ b/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml @@ -102,10 +102,10 @@ menu color sel 7;37;40 #ff1c2a33 #667799bb all MENU MSGCOLOR #ff1c2a33 #00000000 none <? -// if(!isset($this->error)) -// title ( $this->title ); -// else -// title($this->error); + if(!isset($this->error)) + title ( $this->title ); + else + title($this->error); // // if ( ! authenticated() ) { // retry(); @@ -116,22 +116,22 @@ MENU MSGCOLOR #ff1c2a33 #00000000 none // localboot(); // } -//$bootosmapper = new Application_Model_BootOsMapper(); -// -//if(isset($this->bmelist)){ -// foreach($this->bmelist as $bme){ -// -// $kcl = $bootosmapper->find($bme->getBootosID())->getDefaultkcl(); -// -// if($bme->getKcl() && $kcl != null){ -// uriboot ( $bme->getTitle(), -// "http://$this->host/ipxe/resource/start/alpha/$this->alphaID/bme/".$bme->getID(), "initrd=http://$this->host/resource/getinitramfs/alpha/$this->alphaID/file/initramfs $kcl alpha=$this->alphaID file=http://$this->host/c/$this->alphaID/default.tgz ".$bme->getKclappend()); -// }else{ -// uriboot ( $bme->getTitle(), -// "http://$this->host/ipxe/resource/start/alpha/$this->alphaID/bme/".$bme->getID(), "initrd=http://$this->host/resource/getinitramfs/alpha/$this->alphaID/file/initramfs alpha=$this->alphaID file=http://$this->host/c/$this->alphaID/default.tgz ".$bme->getKclappend()); -// } -// } -//} +$bootosmapper = new Application_Model_BootOsMapper(); + +if(isset($this->bmelist)){ + foreach($this->bmelist as $bme){ + + $kcl = $bootosmapper->find($bme->getBootosID())->getDefaultkcl(); + + if($bme->getKcl() && $kcl != null){ + uriboot ( $bme->getTitle(), + "http://$this->host/ipxe/resource/start/alpha/$this->alphaID/bme/".$bme->getID(), "initrd=http://$this->host/resource/getinitramfs/alpha/$this->alphaID/file/initramfs $kcl alpha=$this->alphaID file=http://$this->host/c/$this->alphaID/default.tgz ".$bme->getKclappend()); + }else{ + uriboot ( $bme->getTitle(), + "http://$this->host/ipxe/resource/start/alpha/$this->alphaID/bme/".$bme->getID(), "initrd=http://$this->host/resource/getinitramfs/alpha/$this->alphaID/file/initramfs alpha=$this->alphaID file=http://$this->host/c/$this->alphaID/default.tgz ".$bme->getKclappend()); + } + } +} localboot(); // } |
