From 410f14355ac05a9c2f3cdc53bbbfe24dfb15ee82 Mon Sep 17 00:00:00 2001 From: michael pereira Date: Tue, 19 Jul 2011 15:45:24 +0200 Subject: menu structure --- application/modules/ipxe/controllers/AuthController.php | 9 +++++++-- application/modules/ipxe/controllers/ResourceController.php | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'application/modules/ipxe/controllers') diff --git a/application/modules/ipxe/controllers/AuthController.php b/application/modules/ipxe/controllers/AuthController.php index 0492339..bedd202 100644 --- a/application/modules/ipxe/controllers/AuthController.php +++ b/application/modules/ipxe/controllers/AuthController.php @@ -34,6 +34,7 @@ class Ipxe_AuthController extends Zend_Controller_Action { $serialnumber = $this->_request->getParam('serialnumber'); $mac = $this->_request->getParam('mac'); + $login = $this->_request->getParam('login'); if(isset($serialnumber)){ // Create a session @@ -69,9 +70,13 @@ class Ipxe_AuthController extends Zend_Controller_Action $result = "#!ipxe\n"; $result .= "imgfree\n"; - $result .= "login\n"; + if(isset($login)){ + $result .= "login\n"; + }else{ + $login = false; + } - $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenu/alpha/".$session->getAlphasessionID()." http://\${username:uristring}:\${password:uristring}@".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$session->getAlphasessionID(); + $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenu/alpha/".$session->getAlphasessionID()." http://\${username:uristring}:\${password:uristring}@".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$session->getAlphasessionID()."/login/".$login; header("Content-Length: ".(strlen($result))); diff --git a/application/modules/ipxe/controllers/ResourceController.php b/application/modules/ipxe/controllers/ResourceController.php index 6884aa1..ed317ce 100644 --- a/application/modules/ipxe/controllers/ResourceController.php +++ b/application/modules/ipxe/controllers/ResourceController.php @@ -87,6 +87,7 @@ class Ipxe_ResourceController extends Zend_Controller_Action $vesamenuView->addScriptPath(APPLICATION_PATH.'/modules/ipxe/views/scripts/resource/'); $vesamenuView->username = $_SERVER['PHP_AUTH_USER']; $vesamenuView->password = $_SERVER['PHP_AUTH_PW']; + $vesamenuView->login = $this->_request->getParam('login'); $vesamenuView->host = $_SERVER['HTTP_HOST']; $_SESSION['alphasessionID'] = $this->thisSession->getAlphasessionID(); -- cgit v1.2.3-55-g7522