diff options
| author | michael pereira | 2011-07-18 13:14:19 +0200 |
|---|---|---|
| committer | michael pereira | 2011-07-18 13:14:19 +0200 |
| commit | 83fee3ad5545e3902519cf7cc0fb44d56e881f22 (patch) | |
| tree | 54e846f596486b31c8f4669d0619305200e0bc6c /application/modules/ipxe/views/scripts | |
| parent | ipxe.lkrn (diff) | |
| download | pbs2-83fee3ad5545e3902519cf7cc0fb44d56e881f22.tar.gz pbs2-83fee3ad5545e3902519cf7cc0fb44d56e881f22.tar.xz pbs2-83fee3ad5545e3902519cf7cc0fb44d56e881f22.zip | |
login fuer ipxe
Diffstat (limited to 'application/modules/ipxe/views/scripts')
| -rw-r--r-- | application/modules/ipxe/views/scripts/resource/getvesamenu.phtml | 75 |
1 files changed, 38 insertions, 37 deletions
diff --git a/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml b/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml index dc9892e..0e00f9c 100644 --- a/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml +++ b/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml @@ -1,7 +1,7 @@ <?php -// $username = $_SERVER["PHP_AUTH_USER"]; -// $password = $_SERVER["PHP_AUTH_PW"]; + $username = $_SERVER["PHP_AUTH_USER"]; + $password = $_SERVER["PHP_AUTH_PW"]; $index = 0; @@ -53,11 +53,11 @@ global $password; switch ( "$username:$password" ) { - case "test:test": - case "guest:guest": - return 1; - default: - return 0; + case "test:test": + case "guest:guest": + return 1; + default: + return 0; } } @@ -102,37 +102,38 @@ menu color sel 7;37;40 #ff1c2a33 #667799bb all MENU MSGCOLOR #ff1c2a33 #00000000 none <? - if(!isset($this->error)) - title ( $this->title ); - else - title($this->error); - -// if ( ! authenticated() ) { -// retry(); -// } else { -// -// if ( $username == "test" ) { -// -// localboot(); -// } - -$bootosmapper = new Application_Model_BootOsMapper(); - -if(isset($this->bmelist)){ - foreach($this->bmelist as $bme){ - - $kcl = $bootosmapper->find($bme->getBootosID())->getDefaultkcl(); + if(!isset($this->error)) + title ( $this->title ); + else + title($this->error); + + if ( ! authenticated() ) { + retry(); + } else { - if($bme->getKcl() && $kcl != null){ - uriboot ( $bme->getTitle(), - "http://$this->host/ipxe/resource/getkernel/alpha/$this->alphaID/bme/".$bme->getID()."/file/kernel", "initrd=http://$this->host/ipxe/resource/getinitramfs/alpha/$this->alphaID/bme/".$bme->getID()."/file/initramfs $kcl alpha=$this->alphaID file=http://$this->host/c/$this->alphaID/default.tgz ".$bme->getKclappend()); - }else{ - uriboot ( $bme->getTitle(), - "http://$this->host/ipxe/resource/getkernel/alpha/$this->alphaID/bme/".$bme->getID()."/file/kernel", "initrd=http://$this->host/ipxe/resource/getinitramfs/alpha/$this->alphaID/bme/".$bme->getID()."/file/initramfs alpha=$this->alphaID file=http://$this->host/c/$this->alphaID/default.tgz ".$bme->getKclappend()); + if ( $username == "test" ) { + + localboot(); } - } -} + } + +//$bootosmapper = new Application_Model_BootOsMapper(); +// +//if(isset($this->bmelist)){ +// foreach($this->bmelist as $bme){ +// +// $kcl = $bootosmapper->find($bme->getBootosID())->getDefaultkcl(); +// +// if($bme->getKcl() && $kcl != null){ +// uriboot ( $bme->getTitle(), +// "http://$this->host/ipxe/resource/getkernel/alpha/$this->alphaID/bme/".$bme->getID()."/file/kernel", "initrd=http://$this->host/ipxe/resource/getinitramfs/alpha/$this->alphaID/bme/".$bme->getID()."/file/initramfs $kcl alpha=$this->alphaID file=http://$this->host/c/$this->alphaID/default.tgz ".$bme->getKclappend()); +// }else{ +// uriboot ( $bme->getTitle(), +// "http://$this->host/ipxe/resource/getkernel/alpha/$this->alphaID/bme/".$bme->getID()."/file/kernel", "initrd=http://$this->host/ipxe/resource/getinitramfs/alpha/$this->alphaID/bme/".$bme->getID()."/file/initramfs alpha=$this->alphaID file=http://$this->host/c/$this->alphaID/default.tgz ".$bme->getKclappend()); +// } +// } +//} +// +//localboot(); -localboot(); - ?>
\ No newline at end of file |
