From d8ecc255a943dfe7697c6c538a7d2a53f7519a56 Mon Sep 17 00:00:00 2001 From: michael pereira Date: Mon, 18 Jul 2011 14:46:03 +0200 Subject: login test --- .../modules/ipxe/controllers/ResourceController.php | 4 +++- .../modules/ipxe/views/scripts/resource/getvesamenu.phtml | 15 ++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'application/modules') diff --git a/application/modules/ipxe/controllers/ResourceController.php b/application/modules/ipxe/controllers/ResourceController.php index 839debc..b0132da 100644 --- a/application/modules/ipxe/controllers/ResourceController.php +++ b/application/modules/ipxe/controllers/ResourceController.php @@ -70,7 +70,7 @@ class Ipxe_ResourceController extends Zend_Controller_Action } public function getvesamenuconfigAction(){ - + 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"'); @@ -79,6 +79,8 @@ class Ipxe_ResourceController extends Zend_Controller_Action $vesamenuView = new Zend_View(); $vesamenuView->addScriptPath(APPLICATION_PATH.'/modules/ipxe/views/scripts/resource/'); + $vesamenuView->username = $_SERVER["PHP_AUTH_USER"]; + $vesamenuView->password = $_SERVER["PHP_AUTH_PW"]; $vesamenuView->host = $_SERVER['HTTP_HOST']; $_SESSION['alphasessionID'] = $this->thisSession->getAlphasessionID(); diff --git a/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml b/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml index 0e00f9c..f99217c 100644 --- a/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml +++ b/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml @@ -1,14 +1,11 @@ username; echo "menu title ".$title; - echo ( $username ? " for ".$username : "" )."\n"; + echo ( $this->username ? " for ".$this->username : "" )."\n"; } function label ( $label ) { @@ -49,10 +46,10 @@ } function authenticated () { - global $username; - global $password; + $this->username; + $this->password; - switch ( "$username:$password" ) { + switch ( "$this->username:$this->password" ) { case "test:test": case "guest:guest": return 1; @@ -111,7 +108,7 @@ MENU MSGCOLOR #ff1c2a33 #00000000 none retry(); } else { - if ( $username == "test" ) { + if ( $this->username == "test" ) { localboot(); } -- cgit v1.2.3-55-g7522