summaryrefslogtreecommitdiffstats
path: root/application/modules
diff options
context:
space:
mode:
authormichael pereira2011-10-26 17:45:19 +0200
committermichael pereira2011-10-26 17:45:19 +0200
commit6b9df5c45f297910d18197f164288b5f90ad11b8 (patch)
tree2819a45c9cff31fb920a3fd5dbb5ad8095894c36 /application/modules
parentvesamenu.c32 (diff)
downloadpbs2-6b9df5c45f297910d18197f164288b5f90ad11b8.tar.gz
pbs2-6b9df5c45f297910d18197f164288b5f90ad11b8.tar.xz
pbs2-6b9df5c45f297910d18197f164288b5f90ad11b8.zip
vesamenu.c32
Diffstat (limited to 'application/modules')
-rw-r--r--application/modules/ipxe/controllers/AuthController.php29
-rw-r--r--application/modules/ipxe/views/scripts/resource/getvesamenu.phtml10
2 files changed, 19 insertions, 20 deletions
diff --git a/application/modules/ipxe/controllers/AuthController.php b/application/modules/ipxe/controllers/AuthController.php
index c884098..6fdfcbe 100644
--- a/application/modules/ipxe/controllers/AuthController.php
+++ b/application/modules/ipxe/controllers/AuthController.php
@@ -102,23 +102,22 @@ class Ipxe_AuthController extends Zend_Controller_Action
$result = "#!ipxe\n";
$result .= "imgfree\n";
$result .= "login\n";
- $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 http://\${username:uristring}:\${password:uristring}@".$_SERVER['HTTP_HOST']."/ipxe/auth/login/alpha/".$alpha."\n";
+ $result .= "http://\${username:uristring}:\${password:uristring}@".$_SERVER['HTTP_HOST']."/ipxe/auth/login/alpha/".$alpha."\n";
header("Content-Length: ".(strlen($result)));
echo $result;
exit;
}
+
+
// if(!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])){
// header('WWW-Authenticate: Basic realm=""');
// header('HTTP/1.0 401 Unauthorized');
// exit;
// }
-// $email = $_SERVER['PHP_AUTH_USER'];
-// $password = $_SERVER['PHP_AUTH_PW'];
-
- $email = 'test';
- $password = 'test';
+ $email = $_SERVER['PHP_AUTH_USER'];
+ $password = $_SERVER['PHP_AUTH_PW'];
$auth = Zend_Auth::getInstance();
$adapter = new Zend_Auth_Adapter_DbTable($this->db, 'pbs_person', 'email', 'password', 'MD5(CONCAT(?, password_salt))');
@@ -164,15 +163,17 @@ class Ipxe_AuthController extends Zend_Controller_Action
$this->error = "session";
}
- header('Content-Type: text/plain');
-
- $result = "#!ipxe\n";
- $result .= "imgfree\n";
- $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$alpha."/error/$this->error\n";
-
- header("Content-Length: ".(strlen($result)));
+// header('Content-Type: text/plain');
+//
+// $result = "#!ipxe\n";
+// $result .= "imgfree\n";
+// $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$alpha."/error/$this->error\n";
+//
+// header("Content-Length: ".(strlen($result)));
+
+// echo $result;
+ $this->_redirect('/ipxe/resource/getvesamenuconfig/alpha/'.$alpha.'/error/'.$this->error);
- echo $result;
}
public function switchgroupAction(){
diff --git a/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml b/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml
index 5819d3f..3408ec7 100644
--- a/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml
+++ b/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml
@@ -128,10 +128,9 @@ MENU MSGCOLOR #ff1c2a33 #00000000 none
title ( "Select Membership:" );
if(isset($this->memberships)){
foreach($this->memberships as $membership){
-// uriboot ($membership['group']." as ".$membership['role'], "/ipxe/auth/setgroup/membershipid/".$membership['membershipID']."/alpha/$this->alphaID", '');
uriboot ($membership['group']." as ".$membership['role'], "/ipxe/vesamenu.c32", "/ipxe/auth/setgroup/membershipid/".$membership['membershipID']."/alpha/$this->alphaID");
}
- uriboot ( "Return to Group Bootmenu", "/ipxe/auth/logout/alpha/$this->alphaID", "" );
+ uriboot ( "Return to Group Bootmenu", "/ipxe/vesamenu.c32", "/ipxe/auth/logout/alpha/$this->alphaID" );
}else{
nomembership($this->alphaID);
}
@@ -162,12 +161,11 @@ MENU MSGCOLOR #ff1c2a33 #00000000 none
comment ("info", "More Options:");
if(!$this->loggedin){
- uriboot ( "Login", "/ipxe/vesamenu.c32", "/ipxe/auth/login/alpha/$this->alphaID" );
+ uriboot ( "Login", "/ipxe/vesamenu.c32", "/ipxe/auth/login/alpha/$this->alphaID/login/true" );
texthelp("Login to get your own Bootmenu.");
}else{
-// uriboot ( "Switch Group From $this->group", "/ipxe/auth/switchgroup/alpha/$this->alphaID", "" );
- uriboot ( "Switch Group From $this->group", "vesamenu.c32", "/ipxe/auth/switchgroup/alpha/$this->alphaID" );
- uriboot ( "Return to Group Bootmenu $this->group", "/ipxe/auth/logout/alpha/$this->alphaID", "" );
+ uriboot ( "Switch Group From $this->group", "/ipxe/vesamenu.c32", "/ipxe/auth/switchgroup/alpha/$this->alphaID" );
+ uriboot ( "Return to Group Bootmenu $this->group", "/ipxe/vesamenu.c32", "/ipxe/auth/logout/alpha/$this->alphaID" );
}
localboot();