diff options
Diffstat (limited to 'application/controllers/ResourceController.php')
| -rw-r--r-- | application/controllers/ResourceController.php | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/application/controllers/ResourceController.php b/application/controllers/ResourceController.php index 6ded9fa..03d5eff 100644 --- a/application/controllers/ResourceController.php +++ b/application/controllers/ResourceController.php @@ -595,20 +595,30 @@ class 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"'); + header('Pragma: no-cache'); + header('Expires: 0'); + + $vesamenuView = new Zend_View(); + $vesamenuView->addScriptPath(APPLICATION_PATH.'/views/scripts/resource/'); + $vesamenuView->host = $_SERVER['HTTP_HOST']; + $vesamenu = $vesamenuView->render('getvesamenu.phtml'); + + header("Content-Length: ".(strlen($vesamenu))); + } public function ipxeAction(){ header('Content-Type: text/plain'); - - $vesamenuView = new Zend_View(); - $vesamenuView->addScriptPath(APPLICATION_PATH.'/views/scripts/resource/'); - $vesamenuView->host = $_SERVER['HTTP_HOST']; - $vesamenu = $vesamenuView->render('getvesamenu.phtml'); $result = "#!ipxe\n"; $result .= "imgfree\n"; - $result .= "chain http://".$_SERVER['HTTP_HOST']."/resource/getvesamenu $vesamenu"; + $result .= "chain http://".$_SERVER['HTTP_HOST']."/resource/getvesamenu http://".$_SERVER['HTTP_HOST']."/resource/getvesamenuconfig"; header("Content-Length: ".(strlen($result))); |
