From b5cbdd6b400aa1ec77c9846e9cc8d4257f437e3c Mon Sep 17 00:00:00 2001
From: Simon
Date: Mon, 14 Mar 2011 16:09:03 +0100
Subject: Application in 3 Modules gesplittet, Dev = unsere
entwicklungsumgebung, user = die weboberfläche fr anwender mit acl etc, fbgui
= für die fbgui truppe - links in dev müssen noch angepasst werden
---
.../modules/dev/controllers/BootisoController.php | 125 +++++++++++++++++++++
1 file changed, 125 insertions(+)
create mode 100644 application/modules/dev/controllers/BootisoController.php
(limited to 'application/modules/dev/controllers/BootisoController.php')
diff --git a/application/modules/dev/controllers/BootisoController.php b/application/modules/dev/controllers/BootisoController.php
new file mode 100644
index 0000000..078c962
--- /dev/null
+++ b/application/modules/dev/controllers/BootisoController.php
@@ -0,0 +1,125 @@
+view->bootisolist = $bootisomapper->fetchAll();
+
+ foreach ($this->view->bootisolist as $bootiso){
+ $bootiso->setGroupID("[".$bootiso->getGroupID()."] ".$groupmapper->find($bootiso->getGroupID())->getTitle());
+ $bootiso->setMembershipID("[".$bootiso->getMembershipID()."] ".$personmapper->find($membershipmapper->find($bootiso->getMembershipID())->getPersonID())->getFirstname());
+ }
+
+ }
+
+ public function createbootisoAction()
+ {
+ $groupmapper = new Application_Model_GroupMapper();
+
+ if (!isset($_POST["createbootiso"])){
+ $createbootisoForm = new Application_Form_BootisoCreate(array('grouplist' => $groupmapper->fetchAll()));
+ } else {
+
+ $createbootisoForm = new Application_Form_BootisoCreate(array('grouplist' => $groupmapper->fetchAll()),$_POST);
+
+ if ($createbootisoForm->isValid($_POST)) {
+
+ $bootiso = new Application_Model_BootIso($_POST);
+ $bootiso->setMembershipID('1');
+ $bootisomapper = new Application_Model_BootIsoMapper();
+ $bootiso->setCreated(time());
+
+ try {
+ $bootisomapper->save($bootiso);
+ }catch(Zend_Exception $e)
+ {
+ echo "Caught exception: " . get_class($e) . "
";
+ echo "Message: " . $e->getMessage() . "
";
+
+ }
+ $this->_redirect('/bootiso');
+ }
+ }
+
+ $this->view->createbootisoForm = $createbootisoForm;
+ }
+
+ public function editbootisoAction()
+ {
+ $bootisoID = $this->_request->getParam('bootisoID');
+ $groupmapper = new Application_Model_GroupMapper();
+
+ if (!isset($_POST["editbootiso"])){
+ $bootisoID = $this->_request->getParam('bootisoID');
+ if (!isset($bootisoID) || !is_numeric($bootisoID)){
+ $this->_redirect('/bootiso');
+ } else {
+ $bootiso = new Application_Model_BootIso();
+ $bootisomapper = new Application_Model_BootIsoMapper();
+ $bootisomapper->find($bootisoID, $bootiso);
+
+ $editbootisoForm = new Application_Form_BootisoEdit(array('grouplist' => $groupmapper->fetchAll()));
+ $editbootisoForm->populate($bootiso->toArray());
+ }
+ }else{
+ $editbootisoForm = new Application_Form_BootisoEdit(array('grouplist' => $groupmapper->fetchAll()),$_POST);
+
+ if ($editbootisoForm->isValid($_POST)) {
+
+ $bootiso = new Application_Model_BootIso($_POST);
+ $bootiso->setMembershipID('1');
+ $bootisomapper = new Application_Model_BootIsoMapper();
+ $bootiso->setCreated(time());
+ $bootiso->setID($bootisoID);
+
+ try {
+ $bootisomapper->save($bootiso);
+ }catch(Zend_Exception $e)
+ {
+ echo "Caught exception: " . get_class($e) . "
";
+ echo "Message: " . $e->getMessage() . "
";
+ }
+
+ $this->_redirect('/bootiso');
+ }
+
+ }
+
+ $this->view->editbootisoForm = $editbootisoForm;
+ }
+
+ public function deletebootisoAction()
+ {
+ $bootisoID = $this->_request->getParam('bootisoID');
+ if (!isset($bootisoID)){
+ $this->_redirect('/bootiso');
+ } else {
+ $bootiso = new Application_Model_BootIso();
+ $bootiso->setID($bootisoID);
+ $bootisomapper = new Application_Model_BootIsoMapper();
+ $bootisomapper->delete($bootiso);
+ }
+ $this->_redirect('/bootiso');
+ }
+
+
+}
+
+
+
+
+
+
+
--
cgit v1.2.3-55-g7522