summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/controllers/ResourceController.php5
-rw-r--r--application/modules/fbgui/controllers/IndexController.php20
-rw-r--r--application/modules/fbgui/views/scripts/index/error.phtml1
-rw-r--r--library/Pbs/Notifier.php7
4 files changed, 21 insertions, 12 deletions
diff --git a/application/controllers/ResourceController.php b/application/controllers/ResourceController.php
index de08859..c7ba2a0 100644
--- a/application/controllers/ResourceController.php
+++ b/application/controllers/ResourceController.php
@@ -149,6 +149,7 @@ class ResourceController extends Zend_Controller_Action
public function getkclAction()
{
+
$bmeID = $this->thisSession->getBootmenuentryID();
@@ -221,7 +222,3 @@ class ResourceController extends Zend_Controller_Action
-
-
-
-
diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php
index ae23d86..6941e47 100644
--- a/application/modules/fbgui/controllers/IndexController.php
+++ b/application/modules/fbgui/controllers/IndexController.php
@@ -12,13 +12,17 @@ class Fbgui_IndexController extends Zend_Controller_Action
$membershipMapper->find($userIDsNamespace['membershipID'],$this->membership);
}
+ public function errorAction()
+ {
+ $result = $this->_request->getParam('serialresult');
+ if($result != ""){
+ $pbsNotifier = new Pbs_Notifier();
+ $this->view->notification = $pbsNotifier->notify('serial',$result);
+ }
+ }
+
public function indexAction()
- {
- $params = $this->_request->getParam('postdata');
- if(isset($_SESSION['postdata'])){
- $_POST = ($_SESSION['postdata']);
- }
-
+ {
if(isset($_POST['bootisoID']) || isset($_POST['serialnumber'])){
// Create a session
$n = new Pbs_Session();
@@ -32,7 +36,7 @@ class Fbgui_IndexController extends Zend_Controller_Action
elseif(isset($_POST['serialnumber'])){
$results = $bootisomapper->findBy(array('serialnumber' => $_POST['serialnumber']),true);
if(count($results) == 0){
- echo 'Your serialnumber is not known by the system';
+ $this->_redirect('/fbgui/index/error/serialresult/noserial');
}
$bootiso->setOptions($results[0]);
$bootiso->setID($results[0]['bootisoID']);
@@ -103,7 +107,7 @@ class Fbgui_IndexController extends Zend_Controller_Action
}
}
else{
- echo "<h1>Not Welcome</h1>";
+ $this->_redirect('/fbgui/index/error/serialresult/noserial');
}
}
diff --git a/application/modules/fbgui/views/scripts/index/error.phtml b/application/modules/fbgui/views/scripts/index/error.phtml
new file mode 100644
index 0000000..1569250
--- /dev/null
+++ b/application/modules/fbgui/views/scripts/index/error.phtml
@@ -0,0 +1 @@
+<?php if($this->notification != ''){echo $this->notification;} ?>
diff --git a/library/Pbs/Notifier.php b/library/Pbs/Notifier.php
index 2d86748..74971f7 100644
--- a/library/Pbs/Notifier.php
+++ b/library/Pbs/Notifier.php
@@ -95,6 +95,13 @@ class Pbs_Notifier{
break;
}
break;
+ case "serial":
+ switch($result){
+ case "noserial":
+ $result = "<div class='errorbox'>Your PreBoot is broken, please download a new Version or contact a PBS Administrator</div>";
+ break;
+ }
+ break;
case "link":
switch($result){
case "forbidden":