diff options
-rw-r--r-- | application/controllers/IndexController.php | 2 | ||||
-rw-r--r-- | application/modules/fbgui/controllers/IndexController.php | 17 |
2 files changed, 14 insertions, 5 deletions
diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php index f3e5256..83fbe08 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') ; + $this->_redirect('/fbgui/index/index/data/'.json_encode($_POST)) ; } diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php index c8df829..906de49 100644 --- a/application/modules/fbgui/controllers/IndexController.php +++ b/application/modules/fbgui/controllers/IndexController.php @@ -10,13 +10,22 @@ class Fbgui_IndexController extends Zend_Controller_Action public function indexAction() { - if(isset($_SESSION['postdata'])){ + $params = $this->_request->getParam('data'); + $keys = $this->_request->getParam('keys'); + $post = $this->_request->getParam('post'); + if(isset($_SESSION['postdata'])){ $_POST = ($_SESSION['postdata']); unset($_SESSION['postdata']); + } + elseif($params != ''){ + print_a(json_decode($this->_request->getParam('data'))); + $data = array(); + $data = json_decode($this->_request->getParam('data')); + $_POST['bootisoID'] = $data->bootisoID; + $_POST['mac'] = $data->mac; + $_POST['hardwarehash'] = $data->hardwarehash; } - $keys = $this->_request->getParam('keys'); - $post = $this->_request->getParam('post'); - if($post != '' && $keys != ''){ + elseif($post != '' && $keys != ''){ $keys = $keys; $post = $post; $_POST = array_combine ( $keys , $post ); |