diff options
| author | michael pereira | 2011-07-18 14:46:03 +0200 |
|---|---|---|
| committer | michael pereira | 2011-07-18 14:46:03 +0200 |
| commit | d8ecc255a943dfe7697c6c538a7d2a53f7519a56 (patch) | |
| tree | 12218c9896efbb19e29e2d057001273d317f47c5 | |
| parent | login test (diff) | |
| download | pbs2-d8ecc255a943dfe7697c6c538a7d2a53f7519a56.tar.gz pbs2-d8ecc255a943dfe7697c6c538a7d2a53f7519a56.tar.xz pbs2-d8ecc255a943dfe7697c6c538a7d2a53f7519a56.zip | |
login test
| -rw-r--r-- | application/modules/ipxe/controllers/ResourceController.php | 4 | ||||
| -rw-r--r-- | application/modules/ipxe/views/scripts/resource/getvesamenu.phtml | 15 |
2 files changed, 9 insertions, 10 deletions
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 @@ <?php - - $username = $_SERVER["PHP_AUTH_USER"]; - $password = $_SERVER["PHP_AUTH_PW"]; $index = 0; function title ( $title ) { - global $username; + $this->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(); } |
