diff options
| author | michael pereira | 2011-07-19 23:28:06 +0200 |
|---|---|---|
| committer | michael pereira | 2011-07-19 23:28:06 +0200 |
| commit | c3c4b5d2ab3d823992746772f36b5530865cd05f (patch) | |
| tree | 473b3f9775d4c4bcac472009b0f7a21883ac487d /application/modules | |
| parent | menu structire (diff) | |
| download | pbs2-c3c4b5d2ab3d823992746772f36b5530865cd05f.tar.gz pbs2-c3c4b5d2ab3d823992746772f36b5530865cd05f.tar.xz pbs2-c3c4b5d2ab3d823992746772f36b5530865cd05f.zip | |
menu structire
Diffstat (limited to 'application/modules')
| -rw-r--r-- | application/modules/ipxe/controllers/ResourceController.php | 14 | ||||
| -rw-r--r-- | application/modules/ipxe/views/scripts/resource/getvesamenu.phtml | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/application/modules/ipxe/controllers/ResourceController.php b/application/modules/ipxe/controllers/ResourceController.php index 11b61e9..3897b79 100644 --- a/application/modules/ipxe/controllers/ResourceController.php +++ b/application/modules/ipxe/controllers/ResourceController.php @@ -73,13 +73,13 @@ class Ipxe_ResourceController extends Zend_Controller_Action $login = $this->_request->getParam('login'); -// if($login){ -// if(!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])){ -// header('WWW-Authenticate: Basic realm=""'); -// header('HTTP/1.0 401 Unauthorized'); -// exit; -// } -// } + if($login == true){ + if(!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])){ + header('WWW-Authenticate: Basic realm=""'); + header('HTTP/1.0 401 Unauthorized'); + exit; + } + } header('Content-Type: text/html'); $content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']) == 'IE') ? 'inline' : 'attachment'; header('Content-Disposition: ' . $content_disp . '; filename="vesamenu.conf"'); diff --git a/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml b/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml index 597c0c2..e66cf9d 100644 --- a/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml +++ b/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml @@ -41,7 +41,7 @@ echo " menu label Authentication Failed\n"; echo " menu disable\n"; uriboot ( "Try again", "/ipxe/auth/serial/serialnumber/55-44-33-22-11/mac/123/login/true", "" ); - uriboot ( "Return to Group Bootmenu", "/ipxe/auth/serial/serialnumber/55-44-33-22-11/mac/123", "" ); + uriboot ( "Return to Group Bootmenu", "/ipxe/auth/serial/serialnumber/55-44-33-22-11/mac/123/login/false", "" ); } function authenticated ($username, $password) { @@ -102,7 +102,7 @@ MENU MSGCOLOR #ff1c2a33 #00000000 none title($this->error); } - if ( ! authenticated($this->username, $this->password) ) { + if ( !authenticated($this->username, $this->password) && $this->login == true) { retry(); } else { |
