diff options
Diffstat (limited to 'application/modules/fbgui/controllers/IndexController.php')
-rw-r--r-- | application/modules/fbgui/controllers/IndexController.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php index c27fb10..1058a11 100644 --- a/application/modules/fbgui/controllers/IndexController.php +++ b/application/modules/fbgui/controllers/IndexController.php @@ -90,11 +90,21 @@ class Fbgui_IndexController extends Zend_Controller_Action // 'Your client is '.$session->getClientID(), // 'goto bootmenu '.$bootmenuID); + $bootmenuMapper = new Application_Model_BootMenuMapper(); + $bm = $bootmenuMapper->find($bootmenuID); + $this->view->title = $bm->getTitle(); + $bootmenuentriesMapper = new Application_Model_BootMenuEntriesMapper(); $res = $bootmenuentriesMapper->findBy(array('bootmenuID' => $bootmenuID),false); $this->view->entries = $res; if (!Zend_Auth::getInstance()->hasIdentity()) { - echo "<a href='/fbgui/auth/login/'>Goto Login to get your Bootmenu</a>"; + #echo "<a href='/fbgui/auth/login/'>Goto Login to get your Bootmenu</a>"; + $pbsNotifier = new Pbs_Notifier(); + $this->view->notification = $pbsNotifier->notify("This is not your Bootmenu. You have to login to get your own Bootmenu.<br />Click here to <a href='/fbgui/auth/login/'>login</a>",'info'); + } + if(Zend_Auth::getInstance()->hasIdentity() && $bm->MembershipID != $this->membership->getID() ){ + $pbsNotifier = new Pbs_Notifier(); + $this->view->notification = $pbsNotifier->notify("This is not your Bootmenu. There is currently a BootMenu with a higher priority active.",'info'); } } else{ @@ -106,7 +116,9 @@ class Fbgui_IndexController extends Zend_Controller_Action // 'Your client is '.$session->getClientID(), // 'there is no bootmenu for you'); - echo "<a href='/fbgui/auth/login/'>Goto Login to get your Bootmenu</a>"; + $pbsNotifier = new Pbs_Notifier(); + $this->view->notification = $pbsNotifier->notify("There is no BootMenu to show. Please log in to get your BootMenu.<br />Click here to <a href='/fbgui/auth/login/'>login</a>",'error'); + } } else{ |