From 0f951e0891c773f086c53a6cf9cff3d7c8881403 Mon Sep 17 00:00:00 2001 From: michael pereira Date: Thu, 27 Oct 2011 19:03:15 +0200 Subject: start label for vesamenu --- .../modules/ipxe/controllers/AuthController.php | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 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 f7bc897..753a925 100644 --- a/application/modules/ipxe/controllers/AuthController.php +++ b/application/modules/ipxe/controllers/AuthController.php @@ -85,8 +85,8 @@ class Ipxe_AuthController extends Zend_Controller_Action if(isset($this->session)){ $result .= ":start\n"; $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$this->session->getAlphasessionID()."/error/$this->error\n"; -// $result .= "imgselect login || goto start\n"; -// $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$this->session->getAlphasessionID()."/error/login\n"; + $result .= "imgselect login || goto start\n"; + $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$this->session->getAlphasessionID()."/error/login\n"; $result .= "shell\n"; }else{ $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/serialnumer/$serialnumber/mac/$mac/error/$this->error\n"; @@ -105,7 +105,7 @@ class Ipxe_AuthController extends Zend_Controller_Action header('Content-Type: text/plain'); $result = "#!ipxe\n"; $result .= "login\n"; - $result .= "module http://\${username:uristring}:\${password:uristring}@".$_SERVER['HTTP_HOST']."/ipxe/auth/login/alpha/".$alpha."\n"; + $result .= "chain http://\${username:uristring}:\${password:uristring}@".$_SERVER['HTTP_HOST']."/ipxe/auth/login/alpha/".$alpha."\n"; header("Content-Length: ".(strlen($result))); echo $result; exit; @@ -143,16 +143,24 @@ class Ipxe_AuthController extends Zend_Controller_Action } else { $this->error = "login"; - $this->_redirect('/ipxe/resource/getvesamenuconfig/alpha/'.$alpha.'/error/'.$this->error); } }else{ $this->error = "session"; } - header('Content-Type: text/plain'); -// $result = "blub"; -// header("Content-Length: ".(strlen($result))); -// echo $result; + if($this->error == 'login'){ + header('Content-Type: text/plain'); + $result = "#!ipxe\n"; + $result .= "module http://".$_SERVER['HTTP_HOST']."/ipxe/auth/login/alpha/".$alpha."/error/login\n"; + header("Content-Length: ".(strlen($result))); + echo $result; + }else{ + header('Content-Type: text/plain'); + $result = "#!ipxe\n"; + $result .= "module http://".$_SERVER['HTTP_HOST']."/ipxe/auth/login/alpha/".$alpha."/error/\n"; + header("Content-Length: ".(strlen($result))); + echo $result; + } //$this->_redirect('/ipxe/resource/getvesamenuconfig/alpha/'.$alpha.'/error/'.$this->error); -- cgit v1.2.3-55-g7522