summaryrefslogtreecommitdiffstats
path: root/application/modules
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules')
-rw-r--r--application/modules/ipxe/controllers/ResourceController.php4
-rw-r--r--application/modules/ipxe/views/scripts/resource/getvesamenu.phtml15
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();
}