summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/modules/fbgui/controllers/IndexController.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php
index 12514c5..6c4a542 100644
--- a/application/modules/fbgui/controllers/IndexController.php
+++ b/application/modules/fbgui/controllers/IndexController.php
@@ -28,8 +28,17 @@ class Fbgui_IndexController extends Zend_Controller_Action
$bootisomapper = new Application_Model_BootIsoMapper();
$bootiso = new Application_Model_BootIso();
- $bootisomapper->find($_POST['bootisoID'],$bootiso);
- $groupID = $bootiso->getGroupID();
+ if(isset($_POST['bootisoID'])){
+ $bootisomapper->find($_POST['bootisoID'],$bootiso);
+ $groupID = $bootiso->getGroupID();
+ }
+ elseif(isset($_POST['serialnumber'])){
+ $results = $bootisomapper->findBy('serialnumber',$_POST['serialnumber']);
+ $bootiso->setOptions($results[0]);
+ $bootiso->setID($result[0]['bootisoID']);
+ $groupID = $bootiso->getGroupID();
+
+ }
$client = new Application_Model_Client();
$client->setMacadress($_POST['mac']);