From 6b9df5c45f297910d18197f164288b5f90ad11b8 Mon Sep 17 00:00:00 2001 From: michael pereira Date: Wed, 26 Oct 2011 17:45:19 +0200 Subject: vesamenu.c32 --- .../modules/ipxe/controllers/AuthController.php | 29 +++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'application/modules/ipxe/controllers/AuthController.php') 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(){ -- cgit v1.2.3-55-g7522