From 1677ce1908152787220c1674d718bb03fecedec6 Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 22 Mar 2011 10:27:02 +0100 Subject: fbgui oberfläche angepasst --- application/controllers/IndexController.php | 2 +- .../modules/fbgui/controllers/IndexController.php | 24 ++++++++-------------- application/modules/fbgui/layouts/fbgui.phtml | 22 +------------------- 3 files changed, 11 insertions(+), 37 deletions(-) (limited to 'application') diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php index 83fbe08..79a6d99 100644 --- a/application/controllers/IndexController.php +++ b/application/controllers/IndexController.php @@ -12,7 +12,7 @@ class IndexController extends Zend_Controller_Action { if(stristr($_SERVER['HTTP_USER_AGENT'],'prebootGUI')){ $_SESSION['postdata'] = $_POST; - $this->_redirect('/fbgui/index/index/data/'.json_encode($_POST)) ; + $this->_redirect('/fbgui/index/index/postdata/'.json_encode($_POST)) ; } diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php index 906de49..55dc846 100644 --- a/application/modules/fbgui/controllers/IndexController.php +++ b/application/modules/fbgui/controllers/IndexController.php @@ -10,28 +10,22 @@ class Fbgui_IndexController extends Zend_Controller_Action public function indexAction() { - $params = $this->_request->getParam('data'); - $keys = $this->_request->getParam('keys'); - $post = $this->_request->getParam('post'); + $params = $this->_request->getParam('postdata'); + if(isset($_SESSION['postdata'])){ $_POST = ($_SESSION['postdata']); unset($_SESSION['postdata']); } elseif($params != ''){ - print_a(json_decode($this->_request->getParam('data'))); + print_a(json_decode($this->_request->getParam('postdata'))); $data = array(); - $data = json_decode($this->_request->getParam('data')); + $data = json_decode($this->_request->getParam('postdata')); $_POST['bootisoID'] = $data->bootisoID; $_POST['mac'] = $data->mac; $_POST['hardwarehash'] = $data->hardwarehash; } - elseif($post != '' && $keys != ''){ - $keys = $keys; - $post = $post; - $_POST = array_combine ( $keys , $post ); - print_a($keys, $data,$_POST); - } - if(isset($_POST['bootisoID'])){ + + if(isset($_POST['bootisoID']) || isset($_POST['serialnumber'])){ // Create a session $n = new Pbs_Session(); @@ -107,9 +101,9 @@ class Fbgui_IndexController extends Zend_Controller_Action $sessionMapper->save($session); echo "

Downloading

"; echo ""; diff --git a/application/modules/fbgui/layouts/fbgui.phtml b/application/modules/fbgui/layouts/fbgui.phtml index e3b286a..335e3c5 100644 --- a/application/modules/fbgui/layouts/fbgui.phtml +++ b/application/modules/fbgui/layouts/fbgui.phtml @@ -27,27 +27,7 @@ echo $this->headScript()."\n";