summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Schmelzer2012-01-11 15:22:32 +0100
committerSebastian Schmelzer2012-01-11 15:22:32 +0100
commit83767be80c29e3d3ca99f4a7d2eaab97f8256d1b (patch)
tree354ee1ba3343291cd389aea69582d677fb7b8a26
parentfix stylecode output (diff)
downloadpbs2-83767be80c29e3d3ca99f4a7d2eaab97f8256d1b.tar.gz
pbs2-83767be80c29e3d3ca99f4a7d2eaab97f8256d1b.tar.xz
pbs2-83767be80c29e3d3ca99f4a7d2eaab97f8256d1b.zip
remove unused stuff
-rw-r--r--application/modules/dev/Bootstrap.php20
-rw-r--r--application/modules/dev/controllers/AuthController.php234
-rw-r--r--application/modules/dev/controllers/BootisoController.php192
-rw-r--r--application/modules/dev/controllers/BootmenuController.php325
-rw-r--r--application/modules/dev/controllers/BootosController.php215
-rw-r--r--application/modules/dev/controllers/ClientController.php100
-rw-r--r--application/modules/dev/controllers/ConfigController.php128
-rw-r--r--application/modules/dev/controllers/ErrorController.php59
-rw-r--r--application/modules/dev/controllers/FilterController.php667
-rw-r--r--application/modules/dev/controllers/GroupController.php252
-rw-r--r--application/modules/dev/controllers/IndexController.php29
-rw-r--r--application/modules/dev/controllers/PersonController.php177
-rw-r--r--application/modules/dev/controllers/PoolController.php178
-rw-r--r--application/modules/dev/controllers/PrebootController.php196
-rw-r--r--application/modules/dev/controllers/ResourceController.php173
-rw-r--r--application/modules/dev/controllers/RoleController.php280
-rw-r--r--application/modules/dev/controllers/SessionController.php184
-rw-r--r--application/modules/dev/forms/AuthDelete.php36
-rw-r--r--application/modules/dev/forms/AuthLogin.php46
-rw-r--r--application/modules/dev/forms/AuthRecoverPassword.php36
-rw-r--r--application/modules/dev/forms/AuthRegister.php113
-rw-r--r--application/modules/dev/forms/BootisoCreate.php117
-rw-r--r--application/modules/dev/forms/BootisoEdit.php109
-rw-r--r--application/modules/dev/forms/BootmenuCreate.php59
-rw-r--r--application/modules/dev/forms/BootmenuEdit.php59
-rw-r--r--application/modules/dev/forms/BootmenuEntriesAdd.php146
-rw-r--r--application/modules/dev/forms/BootmenuEntriesEdit.php148
-rw-r--r--application/modules/dev/forms/BootosCreate.php143
-rw-r--r--application/modules/dev/forms/BootosEdit.php153
-rw-r--r--application/modules/dev/forms/Client.php67
-rw-r--r--application/modules/dev/forms/ConfigCreate.php71
-rw-r--r--application/modules/dev/forms/ConfigEdit.php70
-rw-r--r--application/modules/dev/forms/ConfirmDeleteAccount.php33
-rw-r--r--application/modules/dev/forms/FilterAdd.php73
-rw-r--r--application/modules/dev/forms/FilterEntriesAdd.php153
-rw-r--r--application/modules/dev/forms/FilterEvaluate.php138
-rw-r--r--application/modules/dev/forms/GroupAdd.php73
-rw-r--r--application/modules/dev/forms/GroupEdit.php56
-rw-r--r--application/modules/dev/forms/GroupLink.php63
-rw-r--r--application/modules/dev/forms/GroupRequest.php50
-rw-r--r--application/modules/dev/forms/GroupSelect.php50
-rw-r--r--application/modules/dev/forms/LinkRight.php56
-rw-r--r--application/modules/dev/forms/NewPassword.php45
-rw-r--r--application/modules/dev/forms/PersonEdit.php125
-rw-r--r--application/modules/dev/forms/Pool.php60
-rw-r--r--application/modules/dev/forms/PoolClient.php40
-rw-r--r--application/modules/dev/forms/PrebootCreate.php70
-rw-r--r--application/modules/dev/forms/PrebootEdit.php67
-rw-r--r--application/modules/dev/forms/RoleAdd.php62
-rw-r--r--application/modules/dev/forms/RoleEdit.php70
-rw-r--r--application/modules/dev/forms/Session.php147
-rw-r--r--application/modules/dev/layouts/dev.phtml99
-rw-r--r--application/modules/dev/views/scripts/auth/delete.phtml6
-rw-r--r--application/modules/dev/views/scripts/auth/login.phtml6
-rw-r--r--application/modules/dev/views/scripts/auth/recoverpassword.phtml5
-rw-r--r--application/modules/dev/views/scripts/auth/register.phtml5
-rw-r--r--application/modules/dev/views/scripts/bootiso/createbootiso.phtml4
-rw-r--r--application/modules/dev/views/scripts/bootiso/editbootiso.phtml4
-rw-r--r--application/modules/dev/views/scripts/bootiso/index.phtml66
-rw-r--r--application/modules/dev/views/scripts/bootmenu/addbootmenuentry.phtml4
-rw-r--r--application/modules/dev/views/scripts/bootmenu/createbootmenu.phtml4
-rw-r--r--application/modules/dev/views/scripts/bootmenu/editbootmenu.phtml4
-rw-r--r--application/modules/dev/views/scripts/bootmenu/editbootmenuentry.phtml4
-rw-r--r--application/modules/dev/views/scripts/bootmenu/index.phtml134
-rw-r--r--application/modules/dev/views/scripts/bootos/createbootos.phtml4
-rw-r--r--application/modules/dev/views/scripts/bootos/editbootos.phtml4
-rw-r--r--application/modules/dev/views/scripts/bootos/index.phtml80
-rw-r--r--application/modules/dev/views/scripts/client/addclient.phtml3
-rw-r--r--application/modules/dev/views/scripts/client/editclient.phtml3
-rw-r--r--application/modules/dev/views/scripts/client/index.phtml48
-rw-r--r--application/modules/dev/views/scripts/client/removeclient.phtml1
-rw-r--r--application/modules/dev/views/scripts/config/createconfig.phtml4
-rw-r--r--application/modules/dev/views/scripts/config/editconfig.phtml4
-rw-r--r--application/modules/dev/views/scripts/config/index.phtml52
-rw-r--r--application/modules/dev/views/scripts/error/error.phtml28
-rw-r--r--application/modules/dev/views/scripts/filter/addfilter.phtml3
-rw-r--r--application/modules/dev/views/scripts/filter/addfilterentry.phtml3
-rw-r--r--application/modules/dev/views/scripts/filter/editfilter.phtml8
-rw-r--r--application/modules/dev/views/scripts/filter/editfilterentry.phtml2
-rw-r--r--application/modules/dev/views/scripts/filter/evaluate.phtml0
-rw-r--r--application/modules/dev/views/scripts/filter/index.phtml122
-rw-r--r--application/modules/dev/views/scripts/filter/testevaluate.phtml4
-rw-r--r--application/modules/dev/views/scripts/group/add.phtml5
-rw-r--r--application/modules/dev/views/scripts/group/edit.phtml11
-rw-r--r--application/modules/dev/views/scripts/group/index.phtml57
-rw-r--r--application/modules/dev/views/scripts/group/link.phtml5
-rw-r--r--application/modules/dev/views/scripts/group/show.phtml123
-rw-r--r--application/modules/dev/views/scripts/index/index.phtml1
-rw-r--r--application/modules/dev/views/scripts/person/edit.phtml5
-rw-r--r--application/modules/dev/views/scripts/person/request.phtml7
-rw-r--r--application/modules/dev/views/scripts/person/show.phtml55
-rw-r--r--application/modules/dev/views/scripts/pool/createpool.phtml2
-rw-r--r--application/modules/dev/views/scripts/pool/deletepool.phtml1
-rw-r--r--application/modules/dev/views/scripts/pool/editpool.phtml4
-rw-r--r--application/modules/dev/views/scripts/pool/index.phtml131
-rw-r--r--application/modules/dev/views/scripts/pool/linkclient.phtml3
-rw-r--r--application/modules/dev/views/scripts/pool/unlinkclient.phtml1
-rw-r--r--application/modules/dev/views/scripts/preboot/createpreboot.phtml4
-rw-r--r--application/modules/dev/views/scripts/preboot/editpreboot.phtml4
-rw-r--r--application/modules/dev/views/scripts/preboot/index.phtml57
-rw-r--r--application/modules/dev/views/scripts/resource/index.phtml0
-rw-r--r--application/modules/dev/views/scripts/role/add.phtml5
-rw-r--r--application/modules/dev/views/scripts/role/edit.phtml11
-rw-r--r--application/modules/dev/views/scripts/role/groupselect.phtml5
-rw-r--r--application/modules/dev/views/scripts/role/index.phtml61
-rw-r--r--application/modules/dev/views/scripts/role/linkright.phtml5
-rw-r--r--application/modules/dev/views/scripts/role/show.phtml69
-rw-r--r--application/modules/dev/views/scripts/session/createsession.phtml5
-rw-r--r--application/modules/dev/views/scripts/session/deletesession.phtml1
-rw-r--r--application/modules/dev/views/scripts/session/editsession.phtml5
-rw-r--r--application/modules/dev/views/scripts/session/index.phtml51
111 files changed, 0 insertions, 7625 deletions
diff --git a/application/modules/dev/Bootstrap.php b/application/modules/dev/Bootstrap.php
deleted file mode 100644
index 68050a1..0000000
--- a/application/modules/dev/Bootstrap.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-class dev_Bootstrap extends Zend_Application_Module_Bootstrap {
- function _initViewHelpers() {
- $this->bootstrap('layout');
-
- $layout = $this->getResource('layout');
- $view = $layout->getView();
- $view->headLink()->appendStylesheet('/media/css/dev.css');
- }
-}
diff --git a/application/modules/dev/controllers/AuthController.php b/application/modules/dev/controllers/AuthController.php
deleted file mode 100644
index b94daef..0000000
--- a/application/modules/dev/controllers/AuthController.php
+++ /dev/null
@@ -1,234 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_AuthController extends Zend_Controller_Action {
- protected $personmapper;
- private $db = null;
-
- public function init() {
- $this->db = Zend_Db_Table::getDefaultAdapter();
- $this->personmapper = new Application_Model_PersonMapper();
- }
-
- public function indexAction() {
- $this->_helper-> viewRenderer-> setNoRender();
- $this->_helper->redirector('login', 'auth');
- }
-
- public function loginAction() {
- if (Zend_Auth::getInstance()->hasIdentity()) {
- $this->_redirect('/dev/');
- } else {
- if (!isset($_POST["login"])) {
- $loginForm = new dev_Form_AuthLogin();
- } else {
- $loginForm = new dev_Form_AuthLogin($_POST);
-
- if ($loginForm->isValid($_POST)) {
-
- $auth = Zend_Auth::getInstance();
-
- $adapter = new Zend_Auth_Adapter_DbTable(
- $this->db,
- 'pbs_person',
- 'email',
- 'password',
- 'MD5(CONCAT(?, password_salt))'
- );
-
-
- $adapter->setIdentity($loginForm->getValue('email'));
- $adapter->setCredential($loginForm->getValue('password'));
-
- $result = $auth->authenticate($adapter);
-
- // TODO: erweiterte fehlerbeschreibung des Users
-
- if ($result->isValid()) {
- $this->personmapper = new Application_Model_PersonMapper();
- $result = $this->personmapper->findBy(array('email' => Zend_Auth::getInstance()->getIdentity()), true);
- $person = new Application_Model_Person($result[0]);
- $person->setID($result[0]['personID']);
- $date = new DateTime();
- $person->setLogindate($date->getTimestamp());
- $this->personmapper->save($person);
- $this->_redirect('/dev/');
- return;
- } else {
- echo "Wrong Email or Password.";
- }
- }
- }
- $this->view->loginForm = $loginForm;
- }
- }
-
- public function registerAction() {
- if (Zend_Auth::getInstance()->hasIdentity()) {
- print_a('Already logged in.');
- } else {
- if (!isset($_POST["register"])) {
- $registerForm = new dev_Form_AuthRegister();
- } else {
- $registerForm = new dev_Form_AuthRegister($_POST);
-
- if ($registerForm->isValid($_POST)) {
-
- $person = new Application_Model_Person($_POST);
- $this->personmapper = new Application_Model_PersonMapper();
-
- $date = new DateTime();
- $person->setRegisterdate($date->getTimestamp());
- $person->setPasswordSalt(MD5($date->getTimestamp()));
- $person->setPassword(MD5($person->getPassword() . $person->getPasswordSalt()));
- print_a($person);
- try {
- $this->personmapper->save($person);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- echo "Email Address already existing..";
- return;
- }
- echo "Successfully registered. <br/>";
- echo "Continue to Login: <a href=\""."/dev/auth/login"."\">Login</a>";
- $this->_helper->redirector('login', 'auth');
- return;
- }
- }
- $this->view->registerForm = $registerForm;
- }
- }
-
- public function logoutAction() {
- $this->_helper-> viewRenderer-> setNoRender();
- $auth = Zend_Auth::getInstance();
- $auth->clearIdentity();
- Zend_Session::namespaceUnset('userIDs');
- Zend_Session::forgetMe();
- $this->_helper->redirector('login', 'auth');
- return;
- }
-
- public function recoverpasswordAction() {
- if (isset($_POST["savePassword"])) {
- $personID = $_POST['personID'];
- $recoverPasswordForm = new dev_Form_NewPassword(array("personID" => $personID, $_POST));
- if ($recoverPasswordForm->isValid($_POST)) {
- $this->personmapper = new Application_Model_PersonMapper();
- $person = $this->personmapper->find($personID);
- $date = new DateTime();
- $person->setPassword($_POST['password']);
- $person->setPasswordSalt(MD5($date->getTimestamp()));
- $person->setPassword(MD5($person->getPassword() . $person->getPasswordSalt()));
- try {
- $this->personmapper->save($person);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- echo "Email Address already existing.";
- return;
- }
- $this->_helper->redirector('login', 'auth');
- return;
- }
- } else if(isset($_GET['recoveryid'])) {
- $recoveryid = $_GET['recoveryid'];
- $passwordRecoveryMapper = new Application_Model_PasswordRecoveryMapper();
- $passwordRecovery = $passwordRecoveryMapper->findBy(array("recoveryID" => $recoveryid), true);
- if(count($passwordRecovery) > 0) {
- $passwordRecoveryObject = new Application_Model_PasswordRecovery();
- $passwordRecoveryObject->setID($passwordRecovery[0]['personID']);
- $passwordRecoveryObject->setRecoveryID($passwordRecovery[0]['recoveryID']);
- $personID = $passwordRecoveryObject->getID();
- $recoverPasswordForm = new dev_Form_NewPassword(array("personID" => $personID));
- try {
- $passwordRecoveryMapper->delete($passwordRecoveryObject);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
- } else {
- $this->_helper->redirector('login', 'auth');
- return;
- }
- } else {
- if (!isset($_POST["recoverPassword"])) {
- $recoverPasswordForm = new dev_Form_AuthRecoverPassword();
- } else {
- $recoverPasswordForm = new dev_Form_AuthRecoverPassword($_POST);
- if ($recoverPasswordForm->isValid($_POST)) {
- $recoverPasswordForm->getView()->url();
- $this->personmapper = new Application_Model_PersonMapper();
- $result = $this->personmapper->findBy('email', $_POST['email']);
- $person = new Application_Model_Person($result[0]);
- $person->setID($result[0]['personID']);
- $email = $person->getEmail();
- $name = $person->getFirstname() . ' ' . $person->getName();
- $url = $this->getRequest()->getScheme() . '://' . $this->getRequest()->getHttpHost() . $this->view->url();
- $recoveryid = randomString(100);
- $mailbody = 'Um das Passwort zu ändern klicken Sie auf folgenden Link<br /><br /><a href="'. $url . '/auth/recoverpassword/?recoveryid='. $recoveryid . '">Passwort ändern</a>';
- $mail = new Zend_Mail();
- $mail->setBodyHtml($mailbody, 'utf8');
- $mail->getBodyHtml()->getContent();
- $mail->setFrom('admin@local', 'Admin');
- $mail->addTo($email, $name);
- $mail->setSubject('Password Wiederherstellung Preboot Server');
- $passwordRecoveryMapper = new Application_Model_PasswordRecoveryMapper();
- $passwordRecoveryObject = new Application_Model_PasswordRecovery();
- $passwordRecoveryObject->setID($person->getID());
- $passwordRecoveryObject->setRecoveryID($recoveryid);
- try {
- $passwordRecoveryMapper->save($passwordRecoveryObject);
- $mail->send();
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
- $this->_helper->redirector('login', 'auth');
- return;
- }
- }
- }
- $this->view->recoverPasswordForm = $recoverPasswordForm;
- }
-
- public function deleteAction() {
- if($_POST['confirmdelete']) {
- $auth = Zend_Auth::getInstance();
- $result = $this->personmapper->findBy(array('email' => $auth->getIdentity()), true);
- $person = $result[0];
- $personID = $person["personID"];
- if (isset($personID)) {
- $this->personmapper = new Application_Model_PersonMapper();
- $person = $this->personmapper->find($personID);
- try {
- $this->personmapper->delete($person);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
- $auth->clearIdentity();
- Zend_Session::namespaceUnset('userIDs');
- Zend_Session::forgetMe();
- $this->_helper->redirector('login', 'auth');
- return;
- }
- } else {
- $deleteconfirmform = new dev_Form_ConfirmDeleteAccount();
- $this->view->deleteconfirmform = $deleteconfirmform;
- }
- }
-}
diff --git a/application/modules/dev/controllers/BootisoController.php b/application/modules/dev/controllers/BootisoController.php
deleted file mode 100644
index 1256c5b..0000000
--- a/application/modules/dev/controllers/BootisoController.php
+++ /dev/null
@@ -1,192 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_BootisoController extends Zend_Controller_Action {
-
- public function init() {
- $db = Zend_Db_Table::getDefaultAdapter();
- }
-
- public function indexAction() {
- $bootisomapper = new Application_Model_BootIsoMapper();
- $groupmapper = new Application_Model_GroupMapper();
- $membershipmapper = new Application_Model_MembershipMapper();
- $personmapper = new Application_Model_PersonMapper();
- $prebootmapper = new Application_Model_PreBootMapper();
-
- $this->view->bootisolist = $bootisomapper->fetchAll();
- $this->view->prebootlist = array();
-
-
- foreach ($this->view->bootisolist as $bootiso) {
- $this->view->prebootlist[$bootiso->getID()] = $prebootmapper->find($bootiso->getPrebootID())->getTitle();
- $bootiso->setGroupID("[".$bootiso->getGroupID()."] ".$groupmapper->find($bootiso->getGroupID())->getTitle());
- $bootiso->setMembershipID("[".$bootiso->getMembershipID()."] ".$personmapper->find($membershipmapper->find($bootiso->getMembershipID())->getPersonID())->getFirstname());
- }
-
- }
-
- public function downloadbootisoAction() {
- $this->_helper->layout->disableLayout();
- $this->_helper->viewRenderer->setNoRender(true);
-
- $prebootID = $this->_request->getParam('prebootID');
- $bootisoID = $this->_request->getParam('bootisoID');
-
- if(is_dir("../resources/bootmedium/$prebootID/") && is_numeric($prebootID) && is_numeric($bootisoID)) {
-
- chdir("../resources/bootmedium/$prebootID/");
-
- header("X-Sendfile: $bootisoID".".zip");
- header('Content-Type: application/x-gzip');
- $content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']) == 'IE') ? 'inline' : 'attachment';
- header('Content-Disposition: ' . $content_disp . '; filename="preboot.zip"');
- header('Pragma: no-cache');
- header('Expires: 0');
-
-
- $handle = fopen($bootisoID.".zip", 'r');
- $chunk_size = 8192;
- while ($chunk = fread($handle, $chunk_size)) {
- echo $chunk;
- ob_flush();
- }
-
- }
-
-
-
-
- }
-
- public function createbootisoAction() {
- $groupmapper = new Application_Model_GroupMapper();
- $prebootmapper = new Application_Model_PreBootMapper();
-
- if (!isset($_POST["createbootiso"])) {
- $createbootisoForm = new dev_Form_BootisoCreate(array('grouplist' => $groupmapper->fetchAll(), 'prebootlist' => $prebootmapper->fetchAll()));
- } else {
-
- $createbootisoForm = new dev_Form_BootisoCreate(array('grouplist' => $groupmapper->fetchAll(), 'prebootlist' => $prebootmapper->fetchAll()), $_POST);
-
- if ($createbootisoForm->isValid($_POST)) {
-
- $bootiso = new Application_Model_BootIso($_POST);
- $bootiso->setMembershipID('1');
- $bootisomapper = new Application_Model_BootIsoMapper();
- $bootiso->setCreated(time());
-
- $prebootID = $bootiso->getPrebootID();
-
- try {
-
- $bootisoID = $bootisomapper->save($bootiso);
-
- copy("../resources/bootmedium/$prebootID/preboot.zip", "../resources/bootmedium/$prebootID/$bootisoID".".zip");
- $zip = new ZipArchive();
- $res = $zip->open("../resources/bootmedium/$prebootID/$bootisoID".".zip");
- if($res == = true) {
- $rootdir = $zip->getNameIndex(0);
- $zip->addFromString($rootdir."build/rootfs/tmp/serial", $bootiso->getSerialnumber());
- $zip->close();
- }
-
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
-
- }
- $this->_redirect('/dev/bootiso');
- }
- }
-
- $this->view->createbootisoForm = $createbootisoForm;
- }
-
- public function editbootisoAction() {
- $bootisoID = $this->_request->getParam('bootisoID');
- $groupmapper = new Application_Model_GroupMapper();
- $prebootmapper = new Application_Model_PreBootMapper();
-
-
- if (!isset($_POST["editbootiso"])) {
- $bootisoID = $this->_request->getParam('bootisoID');
- if (!isset($bootisoID) || !is_numeric($bootisoID)) {
- $this->_redirect('/dev/bootiso');
- } else {
- $bootiso = new Application_Model_BootIso();
- $bootisomapper = new Application_Model_BootIsoMapper();
- $bootisomapper->find($bootisoID, $bootiso);
-
- $editbootisoForm = new dev_Form_BootisoEdit(array('grouplist' => $groupmapper->fetchAll(), 'prebootlist' => $prebootmapper->fetchAll()));
- $editbootisoForm->populate($bootiso->toArray());
- }
- } else {
- $editbootisoForm = new dev_Form_BootisoEdit(array('grouplist' => $groupmapper->fetchAll(), 'prebootlist' => $prebootmapper->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);
- $prebootID = $bootiso->getPrebootID();
-
- try {
-
-
- $zip = new ZipArchive();
- $res = $zip->open("../resources/bootmedium/$prebootID/$bootisoID".".zip");
- if($res == = true) {
- $rootdir = $zip->getNameIndex(0);
- $zip->addFromString($rootdir."build/rootfs/serial", $bootiso->getSerialnumber());
- $zip->close();
- }
-
- $bootisomapper->save($bootiso);
-
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- }
-
- $this->_redirect('/dev/bootiso');
- }
-
- }
-
- $this->view->editbootisoForm = $editbootisoForm;
- }
-
- public function deletebootisoAction() {
- $bootisoID = $this->_request->getParam('bootisoID');
- if (!isset($bootisoID)) {
- $this->_redirect('/dev/bootiso');
- } else {
- $bootiso = new Application_Model_BootIso();
- $bootiso->setID($bootisoID);
- $bootisomapper = new Application_Model_BootIsoMapper();
- $bootisomapper->delete($bootiso);
- }
- $this->_redirect('/dev/bootiso');
- }
-
-
-}
-
-
-
-
-
-
-
diff --git a/application/modules/dev/controllers/BootmenuController.php b/application/modules/dev/controllers/BootmenuController.php
deleted file mode 100644
index 6376088..0000000
--- a/application/modules/dev/controllers/BootmenuController.php
+++ /dev/null
@@ -1,325 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_BootmenuController extends Zend_Controller_Action {
-
- public function init() {
- $db = Zend_Db_Table::getDefaultAdapter();
- }
-
- public function indexAction() {
- $bootmenumapper = new Application_Model_BootMenuMapper();
- $bootmenuentriesmapper = new Application_Model_BootMenuEntriesMapper();
- $bootosmapper = new Application_Model_BootOsMapper();
- $configmapper = new Application_Model_ConfigMapper();
- $membershipmapper = new Application_Model_MembershipMapper();
- $groupmapper = new Application_Model_GroupMapper();
- $personmapper = new Application_Model_PersonMapper();
-
- $this->view->bootosmapper = $bootosmapper;
- $this->view->configmapper = $configmapper;
-
- $bootmenuID = $this->_request->getParam('bootmenuid');
- $preboot = $this->_request->getParam('preboot');
-
- if($preboot == "") {
- if($bootmenuID == "") {
- $this->view->bootmenulist = $bootmenumapper->fetchAll();
- $bootmenuentries = array();
- foreach ($this->view->bootmenulist as $bootmenu) {
- $bootmenuentries[$bootmenu->getID()] = $bootmenuentriesmapper->findBy(array('bootmenuID' => $bootmenu->getID()));
- $bootmenu->setGroupID("[".$bootmenu->getGroupID()."] ".$groupmapper->find($bootmenu->getGroupID())->getTitle());
- $bootmenu->setMembershipID("[".$bootmenu->getMembershipID()."] ".$personmapper->find($membershipmapper->find($bootmenu->getMembershipID())->getPersonID())->getFirstname());
- }
- } else {
- $bootmenu = new Application_Model_BootMenu();
- $bootmenumapper->find($bootmenuID, $bootmenu);
-
- $bootmenuentries = array();
- $bootmenuentries[$bootmenuID] = $bootmenuentriesmapper->findBy('bootmenuID', $bootmenuID);
- $bootmenu->setGroupID("[".$bootmenu->getGroupID()."] ".$groupmapper->find($bootmenu->getGroupID())->getTitle());
- $bootmenu->setMembershipID("[".$bootmenu->getMembershipID()."] ".$personmapper->find($membershipmapper->find($bootmenu->getMembershipID())->getPersonID())->getFirstname());
-
- $this->view->bootmenulist = array($bootmenu);
-
- }
-
- $this->view->bootmenuentrylist = $bootmenuentries;
-
- } else {
- $this->_helper->layout->disableLayout();
- $this->_helper->viewRenderer->setNoRender();
-
- if($bootmenuID == "") {
- $this->view->bootmenulist = $bootmenumapper->fetchAll();
- $bootmenuentries = array();
- foreach ($this->view->bootmenulist as $bootmenu) {
- $bootmenuentries[$bootmenu->getID()] = $bootmenuentriesmapper->findBy('bootmenuID', $bootmenu->getID());
- $bootmenu->setGroupID("[".$bootmenu->getGroupID()."] ".$groupmapper->find($bootmenu->getGroupID())->getTitle());
- $bootmenu->setMembershipID("[".$bootmenu->getMembershipID()."] ".$personmapper->find($membershipmapper->find($bootmenu->getMembershipID())->getPersonID())->getFirstname());
- }
- } else {
- $bootmenu = new Application_Model_BootMenu();
- $bootmenumapper->find($bootmenuID, $bootmenu);
-
- $cc['title'] = $bootmenu->getTitle();
-
- $bootmenuentries = array();
- $bootmenuentries = $bootmenuentriesmapper->findBy('bootmenuID', $bootmenuID);
-
- foreach($bootmenuentries as $bootmenuentry) {
- $ar = array();
- $ar['title'] = $bootmenuentry->getTitle();
- $ar['id'] = $bootmenuentry->getID();
- $cc['data'][] = $ar;
- }
-
- echo json_encode($cc);
-
- //print_a($cc);
-
- }
-
- }
- }
-
- public function addbootmenuentryAction() {
- $bootmenuID = $this->_request->getParam('bootmenuID');
- $bootosmapper = new Application_Model_BootOsMapper();
- $configmapper = new Application_Model_ConfigMapper();
-
- if (!isset($_POST["addbootmenuentry"])) {
- $addbootmenuentryForm = new dev_Form_BootmenuEntriesAdd(array('bootoslist' => $bootosmapper->fetchAll(), 'maxorder' => $this->_request->getParam('maxorder'), 'configlist' => $configmapper->fetchAll()));
- $addbootmenuentryForm->populate(array('order' => $this->_request->getParam('maxorder')));
- unset($_POST['kcl']);
- unset($_POST['configID']);
- $addbootmenuentryForm->populate($_POST);
- } else {
-
- $addbootmenuentryForm = new dev_Form_BootmenuEntriesAdd(array('bootoslist' => $bootosmapper->fetchAll(), 'maxorder' => $this->_request->getParam('maxorder'), 'configlist' => $configmapper->fetchAll()), $_POST);
-
- if ($addbootmenuentryForm->isValid($_POST)) {
-
- $bootmenuentry = new Application_Model_BootMenuEntries($_POST);
- $bootmenuentry->setBootmenuID($bootmenuID);
-
- $bootmenuentrymapper = new Application_Model_BootMenuEntriesMapper();
-
- try {
- if($bootmenuentry->getOrder() < $this->_request->getParam('maxorder')) {
- $bootmenuentry->setOrder($bootmenuentry->getOrder());
- $bootmenuentrymapper->order($bootmenuentry);
- }
-
- //print_a($bootmenuentry);
-
- $bootmenuentrymapper->save($bootmenuentry);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
-
- }
- $this->_redirect('/dev/bootmenu');
- }
- }
-
- $this->view->addbootmenuentryForm = $addbootmenuentryForm;
-
- }
-
- public function createbootmenuAction() {
- $groupmapper = new Application_Model_GroupMapper();
-
- if (!isset($_POST["createbootmenu"])) {
- $createbootmenuForm = new dev_Form_BootmenuCreate(array('grouplist' => $groupmapper->fetchAll()));
- } else {
-
- $createbootmenuForm = new dev_Form_BootmenuCreate(array('grouplist' => $groupmapper->fetchAll()), $_POST);
-
- if ($createbootmenuForm->isValid($_POST)) {
-
- $bootmenu = new Application_Model_BootMenu($_POST);
- $bootmenu->setMembershipID('1');
- $bootmenu->setCreated(time());
- $bootmenumapper = new Application_Model_BootMenuMapper();
-
- try {
- $bootmenumapper->save($bootmenu);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
-
- }
- $this->_redirect('/dev/bootmenu');
- }
- }
-
- $this->view->createbootmenuForm = $createbootmenuForm;
- }
-
- public function editbootmenuAction() {
- $bootmenuID = $this->_request->getParam('bootmenuID');
- $groupmapper = new Application_Model_GroupMapper();
-
- if (!isset($_POST["editbootmenu"])) {
- $bootmenuID = $this->_request->getParam('bootmenuID');
- if (!isset($bootmenuID) || !is_numeric($bootmenuID)) {
- $this->_redirect('/bootmenu');
- } else {
- $bootmenu = new Application_Model_BootMenu();
- $bootmenumapper = new Application_Model_BootMenuMapper();
- $bootmenumapper->find($bootmenuID, $bootmenu);
-
- $editbootmenuForm = new dev_Form_BootmenuEdit(array('grouplist' => $groupmapper->fetchAll()));
- $editbootmenuForm->populate($bootmenu->toArray());
- }
- } else {
- $editbootmenuForm = new dev_Form_BootmenuEdit(array('grouplist' => $groupmapper->fetchAll()), $_POST);
-
- if ($editbootmenuForm->isValid($_POST)) {
-
- $bootmenu = new Application_Model_BootMenu($_POST);
- $bootmenu->setMembershipID('1');
- $bootmenu->setCreated(time());
- $bootmenumapper = new Application_Model_BootMenuMapper();
-
- $bootmenu->setID($bootmenuID);
-
- try {
-
- $bootmenumapper->save($bootmenu);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- }
-
- $this->_redirect('/dev/bootmenu');
- }
-
- }
-
- $this->view->editbootmenuForm = $editbootmenuForm;
- }
-
- public function editbootmenuentryAction() {
- $bootmenuentryID = $this->_request->getParam('bootmenuentryID');
- $bootmenuID = $this->_request->getParam('bootmenuID');
- $bootosmapper = new Application_Model_BootOsMapper();
- $configmapper = new Application_Model_ConfigMapper();
- $bootmenuentry = new Application_Model_BootMenuEntries();
- $bootmenuentrymapper = new Application_Model_BootMenuEntriesMapper();
-
- if (!isset($_POST["editbootmenuentry"])) {
- $bootmenuentryID = $this->_request->getParam('bootmenuentryID');
- if (!isset($bootmenuentryID) || !is_numeric($bootmenuentryID)) {
- $this->_redirect('/dev/bootmenu');
- } else {
-
- $bootmenuentrymapper->find($bootmenuentryID, $bootmenuentry);
-
- $editbootmenuentryForm = new dev_Form_BootmenuEntriesEdit(array('bootoslist' => $bootosmapper->fetchAll(), 'maxorder' => $this->_request->getParam('maxorder'), 'configlist' => $configmapper->fetchAll(), 'kcl' => $bootmenuentry->getKcl()));
-
- if(!isset($_POST['configID'])) {
- $editbootmenuentryForm->populate($bootmenuentry->toArray());
- } else {
- unset($_POST['kcl']);
- unset($_POST['configID']);
- $editbootmenuentryForm->populate($_POST);
- }
- }
- } else {
- $editbootmenuentryForm = new dev_Form_BootmenuEntriesEdit(array('bootoslist' => $bootosmapper->fetchAll(), 'maxorder' => $this->_request->getParam('maxorder'), 'configlist' => $configmapper->fetchAll(), 'kcl' => $bootmenuentry->getKcl()), $_POST);
-
- if ($editbootmenuentryForm->isValid($_POST)) {
-
- $bootmenuentry = new Application_Model_BootMenuEntries($_POST);
-
- $bootmenuentry->setBootmenuID($bootmenuID);
- $bootmenuentry->setID($bootmenuentryID);
-
- $bootmenuentrymapper = new Application_Model_BootMenuEntriesMapper();
-
- try {
- if($bootmenuentry->getOrder() < $this->_request->getParam('oldorder'))
- { $bootmenuentrymapper->orderbefore($bootmenuentry, $this->_request->getParam('oldorder')); }
- else
- { $bootmenuentrymapper->orderafter($bootmenuentry, $this->_request->getParam('oldorder')); }
-
- $bootmenuentrymapper->save($bootmenuentry);
-
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- }
-
- $this->_redirect('/dev/bootmenu');
- }
-
- }
-
- $this->view->editbootmenuentryForm = $editbootmenuentryForm;
-
- }
-
- public function removebootmenuentryAction() {
- $bootmenuentryID = $this->_request->getParam('bootmenuentryID');
- if (!isset($bootmenuentryID) || !is_numeric($bootmenuentryID)) {
- $this->_redirect('/bootmenu');
- } else {
- $bootmenuentry = new Application_Model_BootMenuEntries();
- $bootmenuentrymapper = new Application_Model_BootMenuEntriesMapper();
- $bootmenuentrymapper->find($bootmenuentryID, $bootmenuentry);
- $bootmenuentrymapper->delete($bootmenuentry);
- $bootmenuentrymapper->orderremove($bootmenuentry);
- }
- $this->_redirect('/dev/bootmenu');
- }
-
- public function deletebootmenuAction() {
- $bootmenuID = $this->_request->getParam('bootmenuID');
- if (!isset($bootmenuID) || !is_numeric($bootmenuID)) {
- $this->_redirect('/dev/bootmenu');
- } else {
- $bootmenu = new Application_Model_BootMenu();
- $bootmenu->setID($bootmenuID);
- $bootmenumapper = new Application_Model_BootMenuMapper();
- $bootmenumapper->delete($bootmenu);
- }
- $this->_redirect('/dev/bootmenu');
- }
-
- private function arrayDiff($a, $b) {
- foreach($a as $k1 => $i1) {
- foreach($b as $k2 => $i2) {
- if($i1->getID() == $i2->getBootosID()) {
- unset($a[$k1]);
- }
- }
- }
- return $a;
- }
-
-
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/application/modules/dev/controllers/BootosController.php b/application/modules/dev/controllers/BootosController.php
deleted file mode 100644
index b177642..0000000
--- a/application/modules/dev/controllers/BootosController.php
+++ /dev/null
@@ -1,215 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_BootosController extends Zend_Controller_Action {
-
- public function init() {
- $db = Zend_Db_Table::getDefaultAdapter();
- }
-
- public function indexAction() {
-
- $bootosmapper = new Application_Model_BootOsMapper();
-
- $groupmapper = new Application_Model_GroupMapper();
- $membershipmapper = new Application_Model_MembershipMapper();
- $personmapper = new Application_Model_PersonMapper();
- $configmapper = new Application_Model_ConfigMapper();
-
- $this->view->bootoslist = $bootosmapper->fetchAll();
- $this->view->update = array();
-
- if(count($this->view->bootoslist) > 0) {
- foreach ($this->view->bootoslist as $bootos) {
- $this->view->update[$bootos->getID()] = $this->checkupdateAction($bootos);
- $bootos->setGroupID("[".$bootos->getGroupID()."] ".$groupmapper->find($bootos->getGroupID())->getTitle());
- $bootos->setMembershipID("[".$bootos->getMembershipID()."] ".$personmapper->find($membershipmapper->find($bootos->getMembershipID())->getPersonID())->getFirstname());
- $bootos->setConfigID("[".$bootos->getConfigID()."] ".$configmapper->find($bootos->getConfigID())->getTitle());
-
- }
- }
-
- }
-
- public function createbootosAction() {
- $groupmapper = new Application_Model_GroupMapper();
- $configmapper = new Application_Model_ConfigMapper();
-
- if (!isset($_POST["createbootos"])) {
- try {
- $createbootosForm = new dev_Form_BootosCreate(array('grouplist' => $groupmapper->fetchAll() , 'configlist' => $configmapper->fetchAll()));
- } catch(Zend_Exception $e) {
- print_a($e);
- }
- } else {
-
- $createbootosForm = new dev_Form_BootosCreate(array('grouplist' => $groupmapper->fetchAll() , 'configlist' => $configmapper->fetchAll()), $_POST);
-
- if ($createbootosForm->isValid($_POST)) {
-
- $bootos = new Application_Model_BootOs($_POST);
-
- $bootos->setMembershipID('1');
- if($bootos->getConfigID() == '')
- { $bootos->setConfigID(NULL); }
- $bootosmapper = new Application_Model_BootOsMapper();
- $bootos->setCreated(time());
-
- try {
- exec("wget --spider ".$bootos->getPath_kernel()." 2>&1 | grep 'Remote file exists.'", $exists_kernel);
- exec("wget --spider ".$bootos->getPath_init()." 2>&1 | grep 'Remote file exists.'" , $exists_init);
-
- if(!array_pop($exists_init) || !array_pop($exists_kernel)) {
- $this->view->createbootosForm = $createbootosForm;
- return;
- }
-
- $bootosID = $bootosmapper->save($bootos);
-
- $initpath = "../resources/bootos/".$bootosID."/initramfs/";
- $kernelpath = "../resources/bootos/".$bootosID."/kernel/";
-
- mkdir($initpath , 0777, true);
- mkdir($kernelpath , 0777, true);
-
- exec("wget -O '".$kernelpath."kernel' ".$bootos->getPath_kernel());
- exec("wget -O '".$initpath."initramfs' ".$bootos->getPath_init());
-
-
-
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
-
- }
-
- $this->_redirect('/dev/bootos');
- }
- }
-
- $this->view->createbootosForm = $createbootosForm;
- }
-
- public function checkupdateAction($bootos) {
- exec("wget --server-response --spider '".escapeshellcmd($bootos->getPath_kernel())."' 2>&1 | grep 'Last-Modified:'", $kerneldate);
- exec("wget --server-response --spider '".escapeshellcmd($bootos->getPath_init())."' 2>&1 | grep 'Last-Modified:'", $initdate);
-
- $kerneldate = strtotime(trim(str_replace('Last-Modified:', '', array_pop($kerneldate))));
- $kernelname = array_pop(scandir("../resources/bootos/".$bootos->getID()."/kernel/"));
-
- if($kernelname != "." && $kernelname != "..")
- { $kernelolddate = filemtime("../resources/bootos/".$bootos->getID()."/kernel/".$kernelname); }
- else
- { $kernelolddate = false; }
-
- $initdate = strtotime(trim(str_replace('Last-Modified:', '', array_pop($initdate))));
- $initname = array_pop(scandir("../resources/bootos/".$bootos->getID()."/initramfs/"));
-
- if($initname != "." && $initname != "..")
- { $initolddate = filemtime("../resources/bootos/".$bootos->getID()."/initramfs/".$initname); }
- else
- { $initolddate = false; }
-
- //print_a($kernelname,$kerneldate,$kernelolddate,$initname,$initdate,$initolddate);
-
-
- if($kerneldate > $kernelolddate || $initdate > $initolddate)
- { return true; }
- else
- { return false; }
-
- }
-
- public function updatebootosAction() {
- $bootosID = $this->_request->getParam('bootosID');
- $bootosmapper = new Application_Model_BootOsMapper();
- $bootos = $bootosmapper->find($bootosID);
-
- $initpath = "../resources/bootos/".$bootosID."/initramfs/";
- $kernelpath = "../resources/bootos/".$bootosID."/kernel/";
-
- exec("wget -P ".$kernelpath." -N ".$bootos->getPath_kernel());
- exec("wget -P ".$initpath." -N ".$bootos->getPath_init());
-
- $this->_redirect('/dev/bootos');
- }
-
- public function editbootosAction() {
- $bootosID = $this->_request->getParam('bootosID');
- $groupmapper = new Application_Model_GroupMapper();
- $configmapper = new Application_Model_ConfigMapper();
-
- if (!isset($_POST["editbootos"])) {
- $bootosID = $this->_request->getParam('bootosID');
- if (!isset($bootosID) || !is_numeric($bootosID)) {
- $this->_redirect('/dev/bootos');
- } else {
- $bootos = new Application_Model_BootOs();
- $bootosmapper = new Application_Model_BootOsMapper();
- $bootos = $bootosmapper->find($bootosID);
-
- $editbootosForm = new dev_Form_BootosEdit(array('grouplist' => $groupmapper->fetchAll() , 'configlist' => $configmapper->fetchAll()));
- $editbootosForm->populate($bootos->toArray());
- }
- } else {
- $editbootosForm = new dev_Form_BootosEdit(array('grouplist' => $groupmapper->fetchAll() , 'configlist' => $configmapper->fetchAll()), $_POST);
-
- if ($editbootosForm->isValid($_POST)) {
-
- //TODO: Check for new URL and download new files.
- $bootos = new Application_Model_BootOs($_POST);
- $bootos->setMembershipID('1');
- if($bootos->getConfigID() == '')
- { $bootos->setConfigID(NULL); }
- $bootosmapper = new Application_Model_BootOsMapper();
- $bootos->setCreated(time());
- $bootos->setID($bootosID);
-
- try {
- $bootosmapper->save($bootos);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- }
-
- $this->_redirect('/dev/bootos');
- }
-
- }
-
- $this->view->editbootosForm = $editbootosForm;
-
- }
-
- public function deletebootosAction() {
- $bootosID = $this->_request->getParam('bootosID');
- if (!isset($bootosID)) {
- $this->_redirect('/dev/bootos');
- } else {
- $bootos = new Application_Model_BootOs();
- $bootos->setID($bootosID);
- $bootosmapper = new Application_Model_BootOsMapper();
- $bootosmapper->delete($bootos);
- }
- $this->_redirect('/dev/bootos');
-
- }
-
-
-}
-
-
-
-
-
-
-
diff --git a/application/modules/dev/controllers/ClientController.php b/application/modules/dev/controllers/ClientController.php
deleted file mode 100644
index 4d83359..0000000
--- a/application/modules/dev/controllers/ClientController.php
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_ClientController extends Zend_Controller_Action {
-
- public function init() {
- /* Initialize action controller here */
- }
-
- public function indexAction() {
- $clientMapper = new Application_Model_ClientMapper();
- $this->view->clients = $clientMapper->fetchAll();
- }
-
- public function addclientAction() {
- $mac = $this->_request->getParam('mac');
- $hh = $this->_request->getParam('hh');
-
- $groupMapper = new Application_Model_GroupMapper();
- $groups = $groupMapper->fetchAll();
-#print_a($groups);die();
-
- if (!isset($_POST["add"])) {
- $addclient = new dev_Form_Client(array('buttontext' => 'Create Client', 'groups' => $groups));
- $this->view->addclient = $addclient;
- } else {
- $addfilterform = new dev_Form_Client(array('buttontext' => 'Create Client', 'groups' => $groups), $_POST);
- if ($addfilterform->isValid($_POST) || ($mac != '' && $hh != '') ) {
- $client = new Application_Model_Client($_POST);
- $mac = ($mac != '') ? $mac : $_POST['macadress'];
- $hh = ($hh != '') ? $hh : $_POST['hardwarehash'];
- $client->setMacadress($mac);
- $client->setHardwarehash($hh);
- $clientmapper = new Application_Model_ClientMapper();
- $clientmapper->save($client);
- print_a('inserted');
- $this->_redirect('/dev/client');
- }
- $this->view->addclient = $addclient;
- }
- }
-
- public function removeclientAction() {
- $clientID = $this->_request->getParam('clientID');
- // TODO: ACL implementieren ob er den filter löschen darf
- if(is_numeric($clientID)) {
- $removeClient = new Application_Model_Client();
- $removeClient->setID($clientID);
- $clientMapper = new Application_Model_ClientMapper();
- $clientMapper->delete($removeClient);
- }
- $this->_redirect('/dev/client');
- }
-
- public function editclientAction() {
- $groupMapper = new Application_Model_GroupMapper();
- $groups = $groupMapper->fetchAll();
-# print_a($this);die();
-
- if (!isset($_POST["add"])) {
- $clientID = $this->_request->getParam('clientID');
- $data = new Application_Model_Client();
- $mapper = new Application_Model_ClientMapper();
- $mapper->find($clientID, $data);
-
- $editclient = new dev_Form_Client(array('buttontext' => 'Edit Client', 'groups' => $groups));
- $editclient->populate($data->toArray());
- $this->view->editclient = $editclient;
- } else {
- $editclient = new dev_Form_Client(array('buttontext' => 'Edit Client', 'groups' => $groups), $_POST);
- if ($editclient->isValid($_POST) || ($mac != '' && $hh != '') ) {
- $client = new Application_Model_Client($_POST);
- $client->setID($this->_request->getParam('clientID'));
- $clientmapper = new Application_Model_ClientMapper();
- $clientmapper->save($client);
- print_a('updated');
- $this->_redirect('/dev/client');
- }
- $this->view->editclient = $editclient;
- }
- }
-
-
-}
-
-
-
-
-
-
-
diff --git a/application/modules/dev/controllers/ConfigController.php b/application/modules/dev/controllers/ConfigController.php
deleted file mode 100644
index 2c937df..0000000
--- a/application/modules/dev/controllers/ConfigController.php
+++ /dev/null
@@ -1,128 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_ConfigController extends Zend_Controller_Action {
-
- public function init() {
- $db = Zend_Db_Table::getDefaultAdapter();
- }
-
- public function indexAction() {
- $configmapper = new Application_Model_ConfigMapper();
-
- $groupmapper = new Application_Model_GroupMapper();
- $membershipmapper = new Application_Model_MembershipMapper();
- $personmapper = new Application_Model_PersonMapper();
-
- $this->view->configlist = $configmapper->fetchAll();
-
- foreach ($this->view->configlist as $config) {
- $config->setGroupID("[".$config->getGroupID()."] ".$groupmapper->find($config->getGroupID())->getTitle());
- $config->setMembershipID("[".$config->getMembershipID()."] ".$personmapper->find($membershipmapper->find($config->getMembershipID())->getPersonID())->getFirstname());
- }
-
- }
-
- public function createconfigAction() {
- $groupmapper = new Application_Model_GroupMapper();
- if (!isset($_POST["createconfig"])) {
- $createconfigForm = new dev_Form_ConfigCreate(array('grouplist' => $groupmapper->fetchAll()));
- } else {
-
- $createconfigForm = new dev_Form_ConfigCreate(array('grouplist' => $groupmapper->fetchAll()), $_POST);
-
- if ($createconfigForm->isValid($_POST)) {
-
- $config = new Application_Model_Config($_POST);
- $config->setCreated(time());
- $config->setMembershipID('1');
-
- $configmapper = new Application_Model_ConfigMapper();
-
- try {
- $configmapper->save($config);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
-
- }
- $this->_redirect('/dev/config');
- }
- }
-
- $this->view->createconfigForm = $createconfigForm;
- }
-
- public function editconfigAction() {
- $configID = $this->_request->getParam('configID');
- $groupmapper = new Application_Model_GroupMapper();
-
- if (!isset($_POST["editconfig"])) {
- $configID = $this->_request->getParam('configID');
- if (!isset($configID) || !is_numeric($configID)) {
- $this->_redirect('/dev/config');
- } else {
- $config = new Application_Model_Config();
- $configmapper = new Application_Model_ConfigMapper();
- $config = $configmapper->find($configID);
-
- $editconfigForm = new dev_Form_ConfigEdit(array('grouplist' => $groupmapper->fetchAll()));
- $editconfigForm->populate($config->toArray());
- }
- } else {
- $editconfigForm = new dev_Form_ConfigEdit(array('grouplist' => $groupmapper->fetchAll()), $_POST);
-
- if ($editconfigForm->isValid($_POST)) {
-
- $config = new Application_Model_Config($_POST);
- $configmapper = new Application_Model_ConfigMapper();
- $config->setCreated(time());
- $config->setMembershipID('1');
- $config->setID($configID);
-
- try {
- $configmapper->save($config);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- }
-
- $this->_redirect('/dev/config');
- }
-
- }
-
- $this->view->editconfigForm = $editconfigForm;
- }
-
- public function deleteconfigAction() {
- $configID = $this->_request->getParam('configID');
- if (!isset($configID)) {
- $this->_redirect('/dev/config');
- } else {
- $config = new Application_Model_Config();
- $config->setID($configID);
- $configmapper = new Application_Model_ConfigMapper();
- $configmapper->delete($config);
- }
- $this->_redirect('/dev/config');
- }
-
-
-}
-
-
-
-
-
-
-
diff --git a/application/modules/dev/controllers/ErrorController.php b/application/modules/dev/controllers/ErrorController.php
deleted file mode 100644
index 7d88cac..0000000
--- a/application/modules/dev/controllers/ErrorController.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_ErrorController extends Zend_Controller_Action {
-
- public function errorAction() {
- $errors = $this->_getParam('error_handler');
- switch ($errors->type) {
- case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:
- case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
- case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
-
- // 404 error -- controller or action not found
- $this->getResponse()->setHttpResponseCode(404);
- $this->view->message = 'Page not found';
- print_a($errors);
- break;
- default:
- // application error
- $this->getResponse()->setHttpResponseCode(500);
- $this->view->message = 'Application error';
- print_a($errors);
- break;
- }
-
- // Log exception, if logger available
- if ($log = $this->getLog()) {
- $log->crit($this->view->message, $errors->exception);
- }
-
- // conditionally display exceptions
- if ($this->getInvokeArg('displayExceptions') == true) {
- $this->view->exception = $errors->exception;
- }
-
- $this->view->request = $errors->request;
- }
-
- public function getLog() {
- $bootstrap = $this->getInvokeArg('bootstrap');
- if (!$bootstrap->hasPluginResource('Log')) {
- return false;
- }
- $log = $bootstrap->getResource('Log');
- return $log;
- }
-
-
-}
-
diff --git a/application/modules/dev/controllers/FilterController.php b/application/modules/dev/controllers/FilterController.php
deleted file mode 100644
index fc3fddd..0000000
--- a/application/modules/dev/controllers/FilterController.php
+++ /dev/null
@@ -1,667 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_FilterController extends Zend_Controller_Action {
-
- private $_filtermapper = null;
-
- private $db = null;
-
- public function init() {
- try {
- $this->_filtermapper = new Application_Model_FilterMapper();
- } catch (Zend_Exception $e) {
- echo "Error message 1: " . $e->getMessage() . "\n";
- }
- $this->db = Zend_Db_Table::getDefaultAdapter();
- }
-
- public function indexAction() {
- try {
- $this->_filtermapper = new Application_Model_FilterMapper();
- $this->view->filters = $this->_filtermapper->fetchAll();
- } catch (Zend_Exception $e) {
- echo "Error message 2: " . $e->getMessage() . "\n";
- }
- }
-
- public function addfilterAction() {
- $bmmapper = new Application_Model_BootMenuMapper();
- //TODO get bootmenu by group
- $bootmenus = $bmmapper->fetchAll();
- if (!isset($_POST["add"])) {
- $addfilterform = new dev_Form_FilterAdd(array('buttontext' => 'Create Filter', 'bootmenus' => $bootmenus));
- $this->view->addfilterform = $addfilterform;
- } else {
- $addfilterform = new dev_Form_FilterAdd(array('buttontext' => 'Create Filter', 'bootmenus' => $bootmenus), $_POST);
- if ($addfilterform->isValid($_POST)) {
- try {
- $newfilter = new Application_Model_Filter($_POST);
- $newfilter->setCreated(time());
-
- // TODO: Ändere mit ACL
- $newfilter->setGroupID('1');
- $newfilter->setMembershipID('1');
-
- $newfilter2 = new Application_Model_FilterMapper();
- $newfilter2->save($newfilter);
-
- $this->_redirect('/dev/filter');
- return;
- } catch (Zend_Exception $e) {
- echo "Error message 2: " . $e->getMessage() . "\n";
- }
- }
- $this->view->addfilterform = $addfilterform;
- }
- }
-
- public function removefilterAction() {
- $filterID = $this->_request->getParam('filterID');
- // TODO: ACL implementieren ob er den filter löschen darf
- if(is_numeric($filterID)) {
- $deletefilter = new Application_Model_Filter();
- $deletefilter->setID($filterID);
- $filtermapper = new Application_Model_FilterMapper();
- $filtermapper->delete($deletefilter);
- }
- $this->_redirect('/dev/filter');
- }
-
- public function editfilterAction() {
- $bmmapper = new Application_Model_BootMenuMapper();
- //TODO get bootmenu by group
- $bootmenus = $bmmapper->fetchAll();
- if (!isset($_POST["add"])) {
- // TODO: ACL implementieren ob er editieren darf
- $filterID = $this->_request->getParam('filterID');
- $filter = new Application_Model_Filter();
-
-
- $filtermapper = new Application_Model_FilterMapper();
- $filtermapper->find($filterID, $filter);
- $filter2 = $filter->toArray();
-
- $editfilterform = new dev_Form_FilterAdd(array('buttontext' => 'Edit Filter', 'bootmenus' => $bootmenus));
- $editfilterform->populate($filter2);
- $this->view->editfilterform = $editfilterform;
-
- } else {
- try {
- $filterID = $this->_request->getParam('filterID');
-
- $editfilterform = new dev_Form_FilterAdd(array('buttontext' => 'Edit Filter', 'bootmenus' => $bootmenus), $_POST);
- //TODO: ACL integrieren
- $_POST['groupID'] = 1;
- $_POST['membershipID'] = 1;
- $_POST['created'] = time();
-
- if ($editfilterform->isValid($_POST)) {
- $newfilterenty = new Application_Model_Filter($_POST);
- $newfilterenty->setID($this->_request->getParam('filterID'));
- $newfilter2 = new Application_Model_FilterMapper();
- $newfilter2->save($newfilterenty);
- echo 'valid';
- $this->_redirect('/dev/filter');
- }
- $this->view->editfilterform = $editfilterform;
- } catch (Zend_Exception $e) {
- echo "Error message 2: " . $e->getMessage() . "\n";
- }
- }
- }
-
- public function addfilterentryAction() {
- // TODO: ACL implementieren ob er editieren darf
- if (!isset($_POST["add"])) {
- try {
- $editfilterform = new dev_Form_FilterEntriesAdd(
- array( 'buttontext' => 'Add Filterentry',
- 'filterID' => $this->_request->getParam('filterID'),
- 'data' => $_POST
- ));
- $editfilterform->populate($_POST);
- $this->view->editfilterform = $editfilterform;
- } catch (Zend_Exception $e) {
- echo "Error message 2: " . $e->getMessage() . "\n";
- }
- } else {
- $editfilterform = new dev_Form_FilterEntriesAdd(array('buttontext' => 'Add Filterentry'), $_POST);
- if ($editfilterform->isValid($_POST)) {
- $newfilterenty = new Application_Model_FilterEntries();
- $newfilterenty->setFilterID($_POST['filterID']);
- $newfilterenty->setFiltertypeID($_POST['filtertypeID']);
-
- if($_POST['filtertypeID'] == 1) {
- $newfilterenty->setFiltervalue($this->fillIP($_POST['filtervalue']));
- $newfilterenty->setFiltervalue2($this->fillIP($_POST['filtervalue2']));
- } else {
- $newfilterenty->setFiltervalue($_POST['filtervalue']);
- $newfilterenty->setFiltervalue2($_POST['filtervalue2']);
- }
-
- $newfilter2 = new Application_Model_FilterEntriesMapper();
- $newfilter2->save($newfilterenty);
-#print_a($newfilterenty);
- $this->_redirect('/dev/filter');
- }
- $this->view->editfilterform = $editfilterform;
- }
- }
-
- public function editfilterentryAction() {
- if (!isset($_POST["add"])) {
- try {
- $filterentriesID = $this->_request->getParam('filterentriesID');
-
- $filterentry = new Application_Model_FilterEntries();
- $filterentriesmapper = new Application_Model_FilterEntriesMapper();
- $filterentriesmapper->find($filterentriesID, $filterentry);
-
-
-
-#$editfilterform->setFilterID($filterID);
- if(isset($_POST['filtertypeID']) && $_POST['filtertypeID'] != $filterentry->getFiltertypeID()) {
- $filterentry->setFiltertypeID($_POST['filtertypeID']) ;
- }
- $data = $filterentry->toArray();
- print_a($data);
- $editfilterform = new dev_Form_FilterEntriesAdd(
- array('buttontext' => 'Edit Filterentry',
- 'data' => $data));
-
- $editfilterform->populate($filterentry->toArray());
- $this->view->editfilterform = $editfilterform;
-
- } catch (Zend_Exception $e) {
- echo "Error message 2: " . $e->getMessage() . "\n";
- }
- } else {
- try {
- $filterentriesID = $this->_request->getParam('filterentriesID');
- $editfilterform = new dev_Form_FilterEntriesAdd(array('buttontext' => 'Edit Filterentry'), $_POST);
- if ($editfilterform->isValid($_POST)) {
- if($_POST['filterID'] == '')
- { unset($_POST['filterID']); }
- $newfilterenty = new Application_Model_FilterEntries($_POST);
- $newfilterenty->setID($filterentriesID);
- if($_POST['filtertypeID'] == 1) {
- $newfilterenty->setFiltervalue($this->fillIP($_POST['filtervalue']));
- $newfilterenty->setFiltervalue2($this->fillIP($_POST['filtervalue2']));
- } else {
- $newfilterenty->setFiltervalue($_POST['filtervalue']);
- $newfilterenty->setFiltervalue2($_POST['filtervalue2']);
- }
- $newfilter2 = new Application_Model_FilterEntriesMapper();
- $newfilter2->save($newfilterenty);
-#print_a($newfilterenty);
- $this->_redirect('/dev/filter');
-
- }
- $this->view->editfilterform = $editfilterform;
- } catch (Zend_Exception $e) {
- echo "Error message 2: " . $e->getMessage() . "\n";
- }
- }
- }
-
- public function removefilterentryAction() {
- try {
- $filterentriesID = $this->_request->getParam('filterentriesID');
-
- // TODO: ACL implementieren ob er den filter löschen darf
- if(is_numeric($filterentriesID)) {
- $deletefilterentry = new Application_Model_FilterEntries();
- $deletefilterentry->setID($filterentriesID);
-
- $filterentriesmapper = new Application_Model_FilterEntriesMapper();
- $filterentriesmapper->delete($deletefilterentry);
- echo "ok";
- }
- $this->_redirect('/dev/filter');
- } catch (Zend_Exception $e) {
- echo "Error message 2: " . $e->getMessage() . "\n";
- }
- }
-
- private function fillIP($ip) {
- $ar = explode(".", $ip);
- $representation = array();
- foreach($ar as $part) {
- $representation[] = sprintf("%03s", $part);
- }
- return implode(".", $representation);
- }
-
- private function fillMac($ip) {
- $ar = explode(":", $ip);
- $representation = array();
- foreach($ar as $part) {
- $representation[] = sprintf("%02s", $part);
- }
- return implode(":", $representation);
- }
-
- public function evaluateAction() {
- $db = $this->db;
- $showPartResults = false;
- // For Testing Filters
-
-
- $testFilter = (isset($_POST['submit'])) ? true : false;
-
- if($testFilter) {
- $ipAdress = $_POST['ip'];
- $macAdress = $_POST['mac'];
- $poolID = $_POST['poolID'];
- $bootisoID = $_POST['bootisoID'];
- $membershipID = $_POST['membershipID'];
- $groupID = $_POST['groupID'];
- $time = ($_POST['time']);
- $clientID = $_POST['clientID'];
- $weekday = $_POST['weekday'];
- $date = $_POST['date'];
- print_a('Input',
- array('ipAdress' => $ipAdress,
- 'macAdress' => $macAdress,
- 'poolID' => $poolID,
- 'bootisoID' => $bootisoID,
- 'membershipID' => $membershipID,
- 'groupID' => $groupID,
- 'time' => $time." - ".date('d.m.Y H:i:s', $time),
- 'clientID' => $clientID,
- 'hardwarehash' => $hardwarehash,
- 'weekday' => $weekday,
- 'date' => $date));
- }
-
-
- try {
- $mysession = '1';
- $set = array();
-
-
- $session = new Application_Model_Session();
- $sessionmapper = new Application_Model_SessionMapper();
- $sessionmapper->find($mysession, $session);
-#########################################################
- // IP Adress
- $filtertypID = 1;
- // get it from session_table with session_id from the session
- if(!$testFilter) {
- $ipAdress = $session->getIp();
- }
- $ipAdress = str_replace(".", "", $this->fillIP($ipAdress));
-
- $select = $db->select()
- ->from(array('pbs_filterentries')
- )
- ->where('filtertypeID = ?', $filtertypID)
- ->where('REPLACE(filtervalue,".","") <= ?', $ipAdress)
- ->where('? <= REPLACE(filtervalue2,".","")', $ipAdress);
-
- $stmt = $select->query();
- $result = $stmt->fetchAll();
- foreach($result as $r) {
- $set[$filtertypID][] = $r['filterID'];
- }
-
- if($showPartResults)
- { print_a('ipAdress', $result, $set[$filtertypID]); }
-
-#########################################################
- // Mac range
- $filtertypID = 2;
- // get it from session_table with session_id from the session
- if(!$testFilter) {
- $client = new Application_Model_Client();
- $clientmapper = new Application_Model_ClientMapper();
- $clientmapper->find($session->getClientID(), $client);
- $macAdress = $client->getMacadress();
- }
- try {
- $macAdress = $this->fillMac($macAdress);
- $stmt = $db->query("SELECT * FROM pbs_filterentries WHERE
- filtertypeID = ".$filtertypID." AND
- filtervalue <= '".$macAdress."' AND
- '".$macAdress."' <= filtervalue2");
- $result = $stmt->fetchAll();
- foreach($result as $r) {
- $set[$filtertypID][] = $r['filterID'];
- }
- } catch(Exception $e) {
- }
- if($showPartResults)
- { print_a('macAdress', $result, $set[$filtertypID]); }
-
-#########################################################
- // PoolID
- $filtertypID = 3;
- // get PoolID from client_ID from session_id from the session
- if(!$testFilter) {
- $poolentry = new Application_Model_PoolEntries();
- $poolentrymapper = new Application_Model_PoolEntriesMapper();
- $poolentry = $poolentrymapper->findby(array('clientID' => $client->getID()), true);
- $poolentry = $poolentry[0];
-
- $poolID = $poolentry['poolID'];
- }
-
- try {
- $stmt = $db->query("SELECT * FROM pbs_filterentries WHERE
- filtertypeID = ".$filtertypID." AND
- filtervalue = ".$poolID." ");
- $result = $stmt->fetchAll();
- if(count($result) > 0) {
- foreach($result as $r) {
- $set[$filtertypID][] = $r['filterID'];
- }
- }
- } catch(Exception $e) {
- }
-
- if($showPartResults)
- { print_a('poolID', $result, $set[$filtertypID]); }
-#########################################################
- // ClientID
- $filtertypID = 8;
- // get client_ID from session_id from the session
-
- if(!$testFilter) {
- $clientID = $session->getClientID();
- }
- try {
- $stmt = $db->query("SELECT * FROM pbs_filterentries WHERE
- filtertypeID = ".$filtertypID." AND
- filtervalue = ".$clientID." ");
- $result = $stmt->fetchAll();
- foreach($result as $r) {
- $set[$filtertypID][] = $r['filterID'];
- }
- } catch(Exception $e) {
- }
-
- if($showPartResults)
- { print_a('clientID', $result, $set[$filtertypID]); }
-#########################################################
- // BootIsoID
- $filtertypID = 4;
- // get BootIsoID from client_ID from session_id from the session
- if(!$testFilter) {
- $bootisoID = $session->getBootisoID();
- }
- try {
- $stmt = $db->query("SELECT * FROM pbs_filterentries WHERE
- filtertypeID = ".$filtertypID." AND
- filtervalue = ".$bootisoID." ");
- $result = $stmt->fetchAll();
- foreach($result as $r) {
- $set[$filtertypID][] = $r['filterID'];
- }
- } catch(Exception $e) {
- }
-
- if($showPartResults)
- { print_a('bootisoID', $result, $set[$filtertypID]); }
-#########################################################
- // MembershipID
- $filtertypID = 5;
-
- if(!$testFilter) {
- // get membership from the session
- //TODO: GET MEMBERSHIP from SESSION
- $membershipID = 1;
- }
- try {
- $stmt = $db->query("SELECT * FROM pbs_filterentries WHERE
- filtertypeID = ".$filtertypID." AND
- filtervalue = ".$membershipID." ");
- $result = $stmt->fetchAll();
- foreach($result as $r) {
- $set[$filtertypID][] = $r['filterID'];
- }
- } catch(Exception $e) {
- }
-
- if($showPartResults)
- { print_a('membership', $result, $set[$filtertypID]); }
-#########################################################
- // GroupID
- $filtertypID = 6;
-
- if(!$testFilter) {
- // get membership from the session
- //TODO: GET GROUP from SESSION
- $groupID = 1;
- }
- try {
- $stmt = $db->query("SELECT * FROM pbs_filterentries WHERE
- filtertypeID = ".$filtertypID." AND
- filtervalue = ".$groupID." ");
- $result = $stmt->fetchAll();
- foreach($result as $r) {
- $set[$filtertypID][] = $r['filterID'];
- }
- } catch(Exception $e) {
- }
-
- if($showPartResults)
- { print_a('membership', $result, $set[$filtertypID]); }
-#########################################################
- // Time
- $filtertypID = 7;
- if(!$testFilter) {
- $time = time("H:i");
- }
-
- $nowShort = $time;
-
- $nowShort = str_replace(":", "", $nowShort);
- try {
- $select = $db->select()
- ->from(array('pbs_filterentries')
- )
- ->where('filtertypeID = ?', $filtertypID)
- ->where('REPLACE(filtervalue,":","") <= ? AND ? <= REPLACE(filtervalue2,":","")', $nowShort);
-
- $stmt = $select->query();
- $result = $stmt->fetchAll();
- foreach($result as $r) {
- $set[$filtertypID][] = $r['filterID'];
- }
- } catch(Exception $e) {
- }
-
- if($showPartResults)
- { print_a('time', $result, $set[$filtertypID]); }
-#########################################################
- // Hardwarehash
- $filtertypID = 9;
- if(!$testFilter) {
- // get hardwarehash from session
- $hardwarehash = 'aaaa';
- }
-
- try {
- $select = $db->select()
- ->from(array('pbs_filterentries')
- )
- ->where('filtertypeID = ?', $filtertypID)
- ->where('`filtervalue` = ?', $hardwarehash);
- $stmt = $select->query();
- $result = $stmt->fetchAll();
- foreach($result as $r) {
- $set[$filtertypID][] = $r['filterID'];
- }
- } catch(Exception $e) {
- }
-
- if($showPartResults)
- { print_a('hardwarehash', $result, $set[$filtertypID]); }
-#########################################################
- // weekday
- $filtertypID = 10;
- if(!$testFilter) {
- $weekday = date('N');
- }
-
- try {
- $select = $db->select()
- ->from(array('pbs_filterentries')
- )
- ->where('filtertypeID = ?', $filtertypID)
- ->where('filtervalue = ? ', $weekday);
-
- $stmt = $select->query();
- $result = $stmt->fetchAll();
- foreach($result as $r) {
- $set[$filtertypID][] = $r['filterID'];
- }
- } catch(Exception $e) {
- }
-
- if($showPartResults)
- { print_a('weekday', $result, $set[$filtertypID]); }
-#########################################################
- // weekday
- $filtertypID = 11;
- if(!$testFilter) {
- $date = date('d.m.Y');
- }
-
- try {
- $select = $db->select()
- ->from(array('pbs_filterentries')
- )
- ->where('filtertypeID = ?', $filtertypID)
- ->where('REPLACE(filtervalue,".","") <= ? AND ? <= REPLACE(filtervalue2,".","")', $date);
-
- $stmt = $select->query();
- $result = $stmt->fetchAll();
- foreach($result as $r) {
- $set[$filtertypID][] = $r['filterID'];
- }
- } catch(Exception $e) {
- }
-
- if($showPartResults)
- { print_a('weekday', $result, $set[$filtertypID]); }
-########################################
- // ErgebnisSet auswerten
- print_a('the result sets of the filtertypes', $set);
-
- // Merging of the resultsets of the filter
- $kk = array();
- foreach($set as $myset) {
- $kk = array_merge($kk, $myset);
- }
- $set = $kk;
- // counting how often a filter is evaluated at database
- $a = array();
- foreach($set as $k => $s) {
- $a[$s] += 1;
- }
- print_a('Übereinstimmungen pro Filter', $a);
- // Get the number of filtertypes every filter has
- $stmt = $db->query('SELECT filterID, COUNT(filtertypeID) as num FROM pbs_filterentries GROUP BY filterID');
- $resultset = $stmt->fetchAll();
- foreach($resultset as $d) {
- $database[$d['filterID']] = $d['num'];
- }
- print_a('Anzahl Filterentries in Datenbank', $database);
-
- // remove all filters from resultset, which to few filtertypes satisfied
- $result = array();
- foreach($a as $i => $b) {
- if($a[$i] < $database[$i]) {
- unset($a[$i]);
- } else {
- $result[] = $i;
- }
- }
-
- print_a('True Filters', $result);
- // now selecting the filter with the highest priority
- $query = 'SELECT filterID, bootmenuID, priority
- FROM pbs_filter WHERE ';
- foreach($result as $e) {
- $queryTmp[] = "filterID = '$e'";
- }
- $query . = implode(" OR ", $queryTmp);
- $query . = 'ORDER BY priority DESC LIMIT 0,1';
- $bootmenuID = 'null';
- try {
- $stmt = $db->query($query);
- $resultset = $stmt->fetchAll();
- $bootmenuID = $resultset[0]['bootmenuID'];
- } catch(Exception $e) {
- }
- if($bootmenuID != 'null') {
- $bm = new Application_Model_BootMenu();
- $bmmapper = new Application_Model_BootMenuMapper();
- $bmmapper->find($bootmenuID, $bm);
- echo "<h1><a href='/bootmenu/index/bootmenuid/".$bootmenuID."'>Goto BootmenuID: ".$bootmenuID."</a></h1>";
- } else {
- echo "<h1>No Result :-(</h1>";
- }
-
- } catch (Zend_Exception $e) {
- echo "class: ".get_class($e)."<br>\n";
- echo "Error message 2: " . $e->getMessage() . "\n";
- }
- }
-
- public function testevaluateAction() {
- $pm = new Application_Model_PoolMapper();
- $pools = $pm->fetchAll();
-
- $bim = new Application_Model_BootIsoMapper();
- $bootisos = $bim->fetchAll();
-
- $mm = new Application_Model_MembershipMapper();
- $memberships = $mm->fetchAll();
-
- $gm = new Application_Model_GroupMapper();
- $groups = $gm->fetchAll();
-
- $cm = new Application_Model_ClientMapper();
- $clients = $cm->fetchAll();
-
- $filterevaluate = new dev_Form_FilterEvaluate(
- array( 'pools' => $pools,
- 'bootisos' => $bootisos,
- 'memberships' => $memberships,
- 'groups' => $groups,
- 'clients' => $clients,
-
- ));
- $filterevaluate->populate(array(
- 'ip' => '132.230.5.6',
- 'mac' => '08:00:20:ae:fd:7e',
- 'time' => date('d.m.Y H:i'))
- );
- $this->view->filterevaluate = $filterevaluate;
- }
-
-
-}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/application/modules/dev/controllers/GroupController.php b/application/modules/dev/controllers/GroupController.php
deleted file mode 100644
index 02c7ad6..0000000
--- a/application/modules/dev/controllers/GroupController.php
+++ /dev/null
@@ -1,252 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_GroupController extends Zend_Controller_Action {
- protected $groupMapper;
- protected $groupGroupsMapper;
- protected $membershipMapper;
- protected $groupRequestMapper;
- protected $personmapper;
- protected $rolemapper;
- protected $groupList;
-
- public function init() {
- if (Zend_Auth::getInstance()->hasIdentity()) {
- $this->groupMapper = new Application_Model_GroupMapper();
- $this->groupGroupsMapper = new Application_Model_GroupGroupsMapper();
- $this->membershipMapper = new Application_Model_MembershipMapper();
- $this->groupRequestMapper = new Application_Model_GroupRequestMapper();
- $this->personmapper = new Application_Model_PersonMapper();
- $this->rolemapper = new Application_Model_RoleMapper();
- $this->groupList = $this->groupMapper->fetchAll();
- } else {
- $this->_helper->redirector('login', 'auth');
- return;
- }
- }
-
- public function indexAction() {
- $this->view->groupList = $this->groupList;
- }
-
- public function addAction() {
- if (!isset($_POST["add"])) {
- $addForm = new dev_Form_GroupAdd(array('grouplist' => $this->groupList));
- } else {
- $addForm = new dev_Form_GroupAdd(array('grouplist' => $this->groupList), $_POST);
-
- if ($addForm->isValid($_POST)) {
- $group = new Application_Model_Group($_POST);
- try {
- $this->groupMapper->save($group);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
- if($_POST['superordinatedGroupID'] != -1) {
- $lastID = $this->groupMapper->getDbTable()->getDefaultAdapter()->lastInsertId();
- $groupgroups = new Application_Model_GroupGroups();
- $groupgroups->setParentID($_POST['superordinatedGroupID']);
- $groupgroups->setGroupID($lastID);
- try {
- $this->groupGroupsMapper->save($groupgroups);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
-
- }
- $this->_helper->redirector('', 'group');
- return;
- }
- }
-
- $this->view->addForm = $addForm;
- }
-
- public function editAction() {
- $groupID = $this->_request->getParam('groupID');
- if(!isset($groupID)) {
- $addForm = new dev_Form_GroupAdd(array('grouplist' => $this->groupList));
- $this->view->addForm = $addForm;
- return;
- }
- if (!isset($_POST["save"])) {
- $group = $this->groupMapper->find($groupID);
- $_POST['title'] = $group->getTitle();
- $_POST['description'] = $group->getDescription();
- $editForm = new dev_Form_GroupEdit();
- } else {
- $editForm = new dev_Form_GroupEdit($_POST);
- if ($editForm->isValid($_POST)) {
- $group = new Application_Model_Group($_POST);
- $group->setID($this->_request->getParam('groupID'));
- try {
- $this->groupMapper->save($group);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
- $this->_helper->redirector('', 'group');
- return;
- }
- }
-
- $this->view->editForm = $editForm;
-
- }
-
- public function showAction() {
- $groupID = $this->_request->getParam('groupID');
- if($groupID) {
- $groupRequests = $this->groupRequestMapper->findBy(array('groupID' => $groupID), true);
- if(isset($groupRequests)) {
- foreach($groupRequests as $groupRequest) {
- $person = $this->personmapper->find($groupRequest['personID']);
- $groupRequestList[] = array(
- 'grouprequestID' => $groupRequest['grouprequestID'],
- 'person' => $person
- );
- }
- if(is_array($groupRequestList)) {
- $this->view->groupRequestList = $groupRequestList;
- }
- $this->view->roleList = $this->rolemapper->findBy('groupID', $groupID);
- }
- $members = $this->membershipMapper->findBy('groupID', $groupID);
- if(isset($members)) {
- foreach($members as $member) {
- $person = $this->personmapper->find($member['personID']);
- $membersList[] = array(
- 'membershipID' => $member['membershipID'],
- 'person' => $person
- );
- }
- if(is_array($membersList)) {
- $this->view->membersList = $membersList;
- }
- }
- $groupgroups = $this->groupGroupsMapper->findBy('groupID', $groupID);
- if(is_object($groupgroups)) {
- $parentGroup = $this->groupMapper->find($groupgroups->getParentID());
- $this->view->$parentGroup = $parentGroup;
- }
- $group = $this->groupMapper->find($groupID);
- $this->view->group = $group;
- $this->view->groupID = $groupID;
- }
- }
-
- public function linkAction() {
- if (!isset($_POST["link"])) {
- $linkForm = new dev_Form_GroupLink(array('grouplist' => $this->groupList));
- } else {
- $linkForm = new dev_Form_GroupLink(array('grouplist' => $this->groupList), $_POST);
-
- if ($linkForm->isValid($_POST)) {
- $groupgroups = new Application_Model_GroupGroups();
- $groupgroups->setParentID($_POST['superordinatedGroupID']);
- $groupgroups->setGroupID($_POST['groupID']);
- try {
- $this->groupGroupsMapper->save($groupgroups);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
- $this->_helper->redirector('', 'group');
- return;
- }
- }
-
- $this->view->linkForm = $linkForm;
- }
-
- public function deleteAction() {
- $this->_helper->viewRenderer->setNoRender();
- $groupID = $this->_request->getParam('groupID');
- if (isset($groupID)) {
- $group = $this->groupMapper->find($groupID);
- try {
- $this->groupMapper->delete($group);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
- $this->_helper->redirector('', 'group');
- return;
- }
- }
-
- public function grantpersonAction() {
- $this->_helper->viewRenderer->setNoRender();
- if(isset($_POST['grouprequestID']) && isset($_POST['roleID'])) {
- $groupRequest = $this->groupRequestMapper->find($_POST['grouprequestID']);
- try {
- $this->groupRequestMapper->delete($groupRequest);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
- $membership = new Application_Model_Membership();
- $membership->setGroupID($groupRequest->getGroupID());
- $membership->setPersonID($groupRequest->getPersonID());
- $membership->setRoleID($_POST['roleID']);
- try {
- $this->membershipMapper->save($membership);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
- $this->_redirect("/dev/group/show/groupID/" . $groupRequest->getGroupID());
- }
- }
-
- public function revokepersonAction() {
- $this->_helper->viewRenderer->setNoRender();
- $membershipID = $this->_request->getParam('membershipID');
- if(isset($membershipID)) {
- $membership = $this->membershipMapper->find($membershipID);
- if(isset($membership)) {
- try {
- $this->membershipMapper->delete($membership);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
- $this->_redirect("/dev/group/edit/groupID/" . $membership->getGroupID());
- }
-
- }
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/application/modules/dev/controllers/IndexController.php b/application/modules/dev/controllers/IndexController.php
deleted file mode 100644
index 39e2c1f..0000000
--- a/application/modules/dev/controllers/IndexController.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_IndexController extends Zend_Controller_Action {
-
- public function init() {
- /* Initialize action controller here */
- }
-
- public function indexAction() {
- // action body
-
- }
-
-}
-
-
-
-
-
diff --git a/application/modules/dev/controllers/PersonController.php b/application/modules/dev/controllers/PersonController.php
deleted file mode 100644
index aebf7bc..0000000
--- a/application/modules/dev/controllers/PersonController.php
+++ /dev/null
@@ -1,177 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_PersonController extends Zend_Controller_Action {
- protected $person;
- protected $personmapper;
- protected $membershipMapper;
- protected $memberships;
- protected $groupMapper;
- protected $groups;
- protected $groupRequestMapper;
-
- public function init() {
- if (Zend_Auth::getInstance()->hasIdentity()) {
- $this->personmapper = new Application_Model_PersonMapper();
- $result = $this->personmapper->findBy(array('email' => Zend_Auth::getInstance()->getIdentity()), true);
- $this->person = new Application_Model_Person($result[0]);
- $this->person->setID($result[0]['personID']);
- $this->groupMapper = new Application_Model_GroupMapper();
- $this->groupRequestMapper = new Application_Model_GroupRequestMapper();
- $this->membershipMapper = new Application_Model_MembershipMapper();
- $this->memberships = $this->membershipMapper->findBy("personID", $this->person->getID());
- if(isset($this->memberships)) {
- foreach($this->memberships as $membership) {
- $group = $this->groupMapper->find($membership['groupID']);
- $this->groups[] = array (
- 'groupID' => $group->getID(),
- 'title' => $group->getTitle(),
- 'description' => $group->getDescription(),
- 'membershipID' => $membership['membershipID']
- );
- }
- }
- } else {
- $this->_helper->redirector('login', 'auth');
- return;
- }
- }
-
- public function indexAction() {
- $this->_helper-> viewRenderer-> setNoRender();
- $this->_helper->redirector('show', 'person');
- return;
- }
-
- public function showAction() {
- $this->view->person = $this->person;
- $this->view->groups = $this->groups;
- }
-
- public function editAction() {
- $this->view->person = $this->person;
- if (!isset($_POST["save"])) {
- $editForm = new dev_Form_PersonEdit();
- } else {
- $editForm = new dev_Form_PersonEdit($_POST);
- if ($editForm->isValid($_POST)) {
- if(isset($_POST['newpassword'])) {
- $date = new DateTime();
- $this->person->setPassword($_POST['newpassword']);
- $this->person->setPasswordSalt(MD5($date->getTimestamp()));
- $this->person->setPassword(MD5($this->person->getPassword() . $this->person->getPasswordSalt()));
- }
- $this->person->setOptions($_POST);
- try {
- $this->personmapper->save($this->person);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- echo "Email Address already existing.";
- return;
- }
- $this->_helper->redirector('show', 'person');
- return;
- }
- }
- $this->view->editForm = $editForm;
- }
-
- public function requestAction() {
- $this->view->person = $this->person;
- $allgroups = $this->groupMapper->fetchAll();
- $groupRequests = $this->groupRequestMapper->findBy(array('personID' => $this->person->getID()), true);
- $count = 0;
- foreach($allgroups as $group) {
- foreach($groupRequests as $groupRequest) {
- if($groupRequest['groupID'] == $group->getID()) {
- $groupsFound[$count] = true;
- } else {
- $groupsFound[$count] = false;
- }
- }
- foreach($this->memberships as $membership) {
- if($membership['groupID'] == $group->getID()) {
- $groupsFound[$count] = true;
- } else {
- if($groupsFound[$count] != true) {
- $groupsFound[$count] = false;
- }
- }
- }
- $count++;
- }
- if(count($groupsFound) > 0) {
- foreach($groupsFound as $k => $v) {
- if($v == true) {
- unset($allgroups[$k]);
- }
- }
- }
- if (!isset($_POST["request"])) {
- if(count($allgroups) <= 0) {
- echo "No Groups to choose.";
- }
- $requestForm = new dev_Form_GroupRequest(array('grouplist' => $allgroups));
- } else {
- $requestForm = new dev_Form_GroupRequest(array('grouplist' => $allgroups), $_POST);
- if ($requestForm->isValid($_POST)) {
- $groupRequestMapper = new Application_Model_GroupRequestMapper();
- $groupRequest = new Application_Model_GroupRequest();
- $groupRequest->setGroupID($_POST['groupID']);
- $date = new DateTime();
- $groupRequest->setTime($date->getTimestamp());
- $groupRequest->setPersonID($this->person->getID());
- try {
- $groupRequestMapper->save($groupRequest);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
- $this->_helper->redirector('show', 'person');
- return;
- }
- }
- $this->view->requestForm = $requestForm;
- }
-
- public function leaveAction() {
- $this->_helper-> viewRenderer-> setNoRender();
- $this->view->person = $this->person;
- $membershipID = $this->_request->getParam('membershipID');
- if(isset($membershipID)) {
- $membership = $this->membershipMapper->find($membershipID);
- try {
- $this->membershipMapper->delete($membership);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
- $this->_helper->redirector('show', 'person');
- return;
- }
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/application/modules/dev/controllers/PoolController.php b/application/modules/dev/controllers/PoolController.php
deleted file mode 100644
index 696dd44..0000000
--- a/application/modules/dev/controllers/PoolController.php
+++ /dev/null
@@ -1,178 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_PoolController extends Zend_Controller_Action {
-
- public function init() {
- /* Initialize action controller here */
- }
-
- public function indexAction() {
- $poolMapper = new Application_Model_PoolMapper();
- $this->view->pools = $poolMapper->fetchAll();
-
- $clientmapper = new Application_Model_ClientMapper();
- $clients = $clientmapper->fetchAll();
- foreach($clients as $c) {
-#$client = new Application_Model_Client($c);
- $clientsArray[] = $c->toArray();
- }
- $assignedclientmapper = new Application_Model_PoolEntriesMapper();
- $assignedclients = $assignedclientmapper->fetchAll();
- foreach($assignedclients as $c) {
- $assignedclientsArray[] = $c->toArray();
- }
- $freeclients = $this->arrayDiff($clientsArray, $assignedclientsArray);
-
- $this->view->freeclients = $freeclients;
-
- }
-
- public function createpoolAction() {
- if (!isset($_POST["add"])) {
- $addfilterform = new dev_Form_Pool(array('buttontext' => 'Create Pool'));
- $this->view->addpool = $addfilterform;
- } else {
- $addpoolform = new dev_Form_Pool(array('buttontext' => 'Create Pool'), $_POST);
- if ($addpoolform->isValid($_POST)) {
- try {
- $pool = new Application_Model_Pool($_POST);
- $poolmapper = new Application_Model_PoolMapper();
- $poolmapper->save($pool);
- $this->_redirect('/dev/pool');
- return;
- } catch (Zend_Exception $e) {
- echo "Error message 2: " . $e->getMessage() . "\n";
- }
- }
- $this->view->addpool = $addfilterform;
- }
- }
-
- public function deletepoolAction() {
- $poolID = $this->_request->getParam('poolID');
- // TODO: ACL implementieren ob er den pool löschen darf
- if(is_numeric($poolID)) {
- $deletepool = new Application_Model_Pool();
- $deletepool->setID($poolID);
- $poolmapper = new Application_Model_PoolMapper();
- $poolmapper->delete($deletepool);
- }
- $this->_redirect('/dev/pool');
- }
-
- public function editpoolAction() {
- if (!isset($_POST["add"])) {
- $poolID = $this->_request->getParam('poolID');
-
- $pool = new Application_Model_Pool();
- $poolmapper = new Application_Model_PoolMapper();
- $poolmapper->find($poolID, $pool);
- $poolArray = $pool->toArray();
-
- $editpool = new dev_Form_Pool(array('buttontext' => 'Edit Pool'));
- $editpool->populate($poolArray);
- $this->view->editpoolform = $editpool;
-
- } else {
- $editpoolform = new dev_Form_Pool(array('buttontext' => 'Edit Pool'), $_POST);
- if ($editpoolform->isValid($_POST)) {
- try {
- $pool = new Application_Model_Pool($_POST);
- $pool->setID($this->_request->getParam('poolID'));
- $poolmapper = new Application_Model_PoolMapper();
- $poolmapper->save($pool);
- $this->_redirect('/dev/pool');
- } catch (Zend_Exception $e) {
- echo "Error message 2: " . $e->getMessage() . "\n";
- }
- }
- $this->view->editpoolform = $editpoolform;
- }
- }
-
- public function linkclientAction() {
- $clientID = $this->_request->getParam('clientID');
- $poolID = $this->_request->getParam('poolID');
- if(!isset($_POST['clientID']) && ($clientID == '')) {
- $clientmapper = new Application_Model_ClientMapper();
- $clients = $clientmapper->fetchAll();
- foreach($clients as $c) {
- $clientsArray[] = $c->toArray();
- }
- $assignedclientmapper = new Application_Model_PoolEntriesMapper();
- $assignedclients = $assignedclientmapper->fetchAll();
- foreach($assignedclients as $c) {
- $assignedclientsArray[] = $c->toArray();
- }
- $freeclients = $this->arrayDiff($clientsArray, $assignedclientsArray);
-
- $poolclient = new dev_Form_PoolClient(array('buttontext' => 'Link Client', 'clients' => $freeclients));
- $this->view->poolclient = $poolclient;
- } else {
- $poolclient = new dev_Form_PoolClient(array('buttontext' => 'Link Client'), $_POST);
- try {
- $pool = new Application_Model_PoolEntries($_POST);
- $pool->setPoolID($this->_request->getParam('poolID'));
- if($pool->getClientID() == '') {
- $pool->setClientID($this->_request->getParam('clientID'));
- }
- $poolmapper = new Application_Model_PoolEntriesMapper();
- $poolmapper->save($pool);
- $this->_redirect('/dev/pool');
- } catch (Zend_Exception $e) {
- echo "Error message 2: " . $e->getMessage() . "\n";
- }
- $this->view->poolclient = $poolclient;
-
- }
- }
- private function arrayDiff($a, $b) {
- foreach($a as $k1 => $i1) {
- foreach($b as $k2 => $i2) {
- if($i1['clientID'] == $i2['clientID']) {
- unset($a[$k1]);
- }
- }
- }
- return $a;
- }
-
-
- public function unlinkclientAction() {
- $poolentriesID = $this->_request->getParam('poolentriesID');
-
- // TODO: ACL implementieren ob er den filter löschen darf
- if(is_numeric($poolentriesID)) {
- $deletepoolentries = new Application_Model_PoolEntries();
- $deletepoolentries->setID($poolentriesID);
-
- $deletepoolentriesmapper = new Application_Model_PoolEntriesMapper();
- $deletepoolentriesmapper->delete($deletepoolentries);
- echo "ok";
- }
- $this->_redirect('/dev/pool');
- }
-
-
-}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/application/modules/dev/controllers/PrebootController.php b/application/modules/dev/controllers/PrebootController.php
deleted file mode 100644
index 024bae3..0000000
--- a/application/modules/dev/controllers/PrebootController.php
+++ /dev/null
@@ -1,196 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_PrebootController extends Zend_Controller_Action {
-
- public function init() {
- $db = Zend_Db_Table::getDefaultAdapter();
- }
-
- public function indexAction() {
- $prebootmapper = new Application_Model_PreBootMapper();
- $groupmapper = new Application_Model_GroupMapper();
- $membershipmapper = new Application_Model_MembershipMapper();
- $personmapper = new Application_Model_PersonMapper();
-
- $this->view->prebootlist = $prebootmapper->fetchAll();
- $this->view->update = array();
-
- foreach ($this->view->prebootlist as $preboot) {
- $this->view->update[$preboot->getID()] = $this->checkupdateAction($preboot);
- $preboot->setGroupID("[".$preboot->getGroupID()."] ".$groupmapper->find($preboot->getGroupID())->getTitle());
- $preboot->setMembershipID("[".$preboot->getMembershipID()."] ".$personmapper->find($membershipmapper->find($preboot->getMembershipID())->getPersonID())->getFirstname());
- }
- }
-
- public function createprebootAction() {
- $groupmapper = new Application_Model_GroupMapper();
-
- if (!isset($_POST["createpreboot"])) {
- $createprebootForm = new dev_Form_PrebootCreate(array('grouplist' => $groupmapper->fetchAll()));
- } else {
-
- $createprebootForm = new dev_Form_PrebootCreate(array('grouplist' => $groupmapper->fetchAll()), $_POST);
-
- if ($createprebootForm->isValid($_POST)) {
-
- $preboot = new Application_Model_PreBoot($_POST);
- $preboot->setMembershipID('1');
- $prebootmapper = new Application_Model_PreBootMapper();
-
- try {
-
- exec("wget --spider ".$preboot->getPath_preboot()." 2>&1 | grep 'Remote file exists.'", $exists_preboot);
-
- if(!array_pop($exists_preboot)) {
- $this->view->createprebootForm = $createprebootForm;
- return;
- }
-
- $prebootID = $prebootmapper->save($preboot);
-
- $path_preboot = "../resources/bootmedium/$prebootID/";
- mkdir($path_preboot , 0777, true);
-
- exec("wget -O '".$path_preboot."preboot.zip' ".$preboot->getPath_preboot());
-
-
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
-
- }
- $this->_redirect('/dev/preboot');
- }
- }
-
- $this->view->createprebootForm = $createprebootForm;
- }
-
- public function checkupdateAction($preboot) {
- $prebootID = $preboot->getID();
- exec("wget --server-response --spider ".escapeshellcmd($preboot->getPath_preboot())." 2>&1 | grep 'Last-Modified:'", $prebootdate);
-
- //print_a($prebootdate);
-
- $prebootdate = strtotime(trim(str_replace('Last-Modified:', '', array_pop($prebootdate))));
-
- if(is_file("../resources/bootmedium/$prebootID/preboot.zip"))
- { $prebootolddate = filemtime("../resources/bootmedium/".$prebootID."/preboot.zip"); }
- else
- { $prebootolddate = false; }
-
- //print_a($prebootname,$prebootdate,$prebootolddate);
-
-
- if($prebootdate > $prebootolddate)
- { return true; }
- else
- { return false; }
-
- }
-
- public function updateprebootAction() {
-
- $prebootID = $this->_request->getParam('prebootID');
-
- $prebootmapper = new Application_Model_PreBootMapper();
- $preboot = new Application_Model_PreBoot();
- $prebootmapper->find($prebootID, $preboot);
-
- $path_preboot = "../resources/bootmedium/$prebootID/";
-
- exec("wget -O '".$path_preboot."preboot.zip' ".$preboot->getPath_preboot());
-
- $filelist = array();
- $filelist = scandir($path_preboot);
-
- $bootisoMapper = new Application_Model_BootIsoMapper();
-
- foreach($filelist as $file) {
- if($file == "." || $file == ".." || $file == "preboot.zip") {
- //do nothing
- } else {
- $bootisoID = str_replace('.zip', '', $file);
- $serialnumber = $bootisoMapper->find($bootisoID)->getSerialnumber();
-
- copy("../resources/bootmedium/$prebootID/preboot.zip", "../resources/bootmedium/$prebootID/$bootisoID".".zip");
- $zip = new ZipArchive();
- $res = $zip->open("../resources/bootmedium/$prebootID/$bootisoID".".zip");
- if($res == = true) {
- $rootdir = $zip->getNameIndex(0);
- $zip->addFromString($rootdir."build/rootfs/serial", $serialnumber);
- $zip->close();
- }
- }
- }
-
- $this->_redirect('/dev/preboot');
- }
-
- public function editprebootAction() {
- $prebootID = $this->_request->getParam('prebootID');
- $groupmapper = new Application_Model_GroupMapper();
-
- if (!isset($_POST["editpreboot"])) {
- $prebootID = $this->_request->getParam('prebootID');
- if (!isset($prebootID) || !is_numeric($prebootID)) {
- $this->_redirect('/dev/preboot');
- } else {
- $preboot = new Application_Model_PreBoot();
- $prebootmapper = new Application_Model_PreBootMapper();
- $prebootmapper->find($prebootID, $preboot);
-
- $editprebootForm = new dev_Form_PrebootEdit(array('grouplist' => $groupmapper->fetchAll()));
- $editprebootForm->populate($preboot->toArray());
- }
- } else {
- $editprebootForm = new dev_Form_PrebootEdit(array('grouplist' => $groupmapper->fetchAll()), $_POST);
-
- if ($editprebootForm->isValid($_POST)) {
-
- $preboot = new Application_Model_PreBoot($_POST);
- $preboot->setMembershipID('1');
- $prebootmapper = new Application_Model_PreBootMapper();
- $preboot->setID($prebootID);
-
- try {
- $prebootmapper->save($preboot);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- }
-
- $this->_redirect('/dev/preboot');
- }
-
- }
-
- $this->view->editprebootForm = $editprebootForm;
- }
-
- public function deleteprebootAction() {
- $prebootID = $this->_request->getParam('prebootID');
- if (!isset($prebootID)) {
- $this->_redirect('/dev/preboot');
- } else {
- $preboot = new Application_Model_PreBoot();
- $preboot->setID($prebootID);
- $prebootmapper = new Application_Model_PreBootMapper();
- $prebootmapper->delete($preboot);
- }
- $this->_redirect('/dev/preboot');
- }
-
-
-}
-
diff --git a/application/modules/dev/controllers/ResourceController.php b/application/modules/dev/controllers/ResourceController.php
deleted file mode 100644
index 62252d9..0000000
--- a/application/modules/dev/controllers/ResourceController.php
+++ /dev/null
@@ -1,173 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_ResourceController extends Zend_Controller_Action {
-
- private $thisSession;
-
- public function init() {
- $this->_helper->layout->disableLayout();
- $this->_helper->viewRenderer->setNoRender();
-
- $alphasessionID = $this->_request->getParam('alpha');
- $session = new Application_Model_Session();
- $sm = new Application_Model_SessionMapper();
- $result = $sm->findBy(array('alphasessionID' => $alphasessionID), true);
-# print_a($result);
- $this->thisSession = $session->setOptions($result[0]);
- $this->thisSession->setID($result[0]['sessionID']);
- }
-
- public function indexAction() {
-
-
- }
-
- public function getinitramfsAction() {
-
- $bootosID = $this->thisSession->getBootosID();
-
- if(is_dir("../resources/bootos/$bootosID/initramfs/") && is_numeric($bootosID)) {
-
- header('Content-Type: application/x-gzip');
- $content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']) == 'IE') ? 'inline' : 'attachment';
- header('Content-Disposition: ' . $content_disp . '; filename="initramfs"');
- header('Pragma: no-cache');
- header('Expires: 0');
-
- // create file.
- chdir("../resources/bootos/$bootosID/initramfs/");
- $initname = array_pop(scandir("./"));
-
- passthru( "cat ".$initname);
- }
- }
-
- public function getconfigAction() {
- $bootmenuentryID = $this->thisSession->getBootmenuentryID();
-
- $bootmenuentry = new Application_Model_BootMenuEntries();
- $bmm = new Application_Model_BootMenuEntriesMapper();
- $bmm->find($bootmenuentryID, $bootmenuentry);
-# print_a($bootmenuentry);
-
- $configID = $bootmenuentry->getConfigID();
-
- if(is_dir("../resources/config/$configID/config/") && is_numeric($configID)) {
-
- header('Content-Type: application/x-gzip');
- $content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']) == 'IE') ? 'inline' : 'attachment';
- header('Content-Disposition: ' . $content_disp . '; filename="config.tgz"');
- header('Pragma: no-cache');
- header('Expires: 0');
-
- // create the gzipped tarfile.
- chdir("../resources/config/$configID/config/");
- passthru( "tar cz ./");
- }
- }
-
- public function getkernelAction() {
- $bootosID = $this->thisSession->getBootosID();
-
- if(is_dir("../resources/bootos/$bootosID/kernel/") && is_numeric($bootosID)) {
-
- header('Content-Type: application/x-gzip');
- $content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']) == 'IE') ? 'inline' : 'attachment';
- header('Content-Disposition: ' . $content_disp . '; filename="kernel"');
- header('Pragma: no-cache');
- header('Expires: 0');
-
- // create the gzipped tarfile.
- chdir("../resources/bootos/$bootosID/kernel/");
- $kernelname = array_pop(scandir("./"));
-
- passthru( "cat ". $kernelname);
- }
- }
-
- public function getkclAction() {
- $bmeID = $this->thisSession->getBootmenuentryID();
-
- if(is_numeric($bmeID)) {
-
- $bmemapper = new Application_Model_BootMenuEntriesMapper();
- $bme = new Application_Model_BootMenuEntries();
- $bmemapper->find($bmeID, $bme);
-
- header('Content-Type: text/html');
- $content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']) == 'IE') ? 'inline' : 'attachment';
- header('Content-Disposition: ' . $content_disp . '; filename="kcl.txt"');
- header('Pragma: no-cache');
- header('Expires: 0');
-
- if($bme->getKcl() != null)
- { $result = $bme->getKcl() . " " . $bme->getKclappend(); }
- else
- { $result = $bme->getKclappend(); }
-
- echo $result;
-
-
- }
-
- }
-
- public function getbootmenuentryAction() {
- // obsolete function (now only for debugging)
- // after selecting the BootOS it will be saved in session
- // so getkclAction, getkernelAction, getconfigAction and getinitramfsAction
- // can be called with session-identifier
- $bootmenuentryID = $this->_request->getParam('bootmenuentryID');
- $bootosID = $this->_request->getParam('bootosID');
-
- $this->thisSession->setBootosID($bootosID)->setBootmenuentryID($bootmenuentryID);
- $sessionMapper = new Application_Model_SessionMapper();
- $sessionMapper->save($this->thisSession);
-
- if($this->thisSession->getBootmenuentryID() != null) {
- header('Content-Type: application/json');
- $return_val =
- array(
- 'info' => 'This function is for debugging purpose only',
- 'kernel' => $this->generateURL('getkernel', 'alpha', $_SESSION['alphasessionID'], "kernel"),
- 'initramfs' => $this->generateURL('getinitramfs', 'alpha', $_SESSION['alphasessionID'], "initramfs"),
- 'kcl' => $this->generateURL('getkcl', 'alpha', $_SESSION['alphasessionID'], "kcl.txt"),
- 'config' => $_SESSION['alphasessionID']
- );
- echo json_encode($return_val);
- } else {
- echo json_encode(
- array( 'info' => 'This function is for debugging purpose only',
- 'error' => 'your session is out of date')
- );
- }
- }
-
- private function generateURL($action, $varname, $varvalue, $filename) {
- $path = '/dev/resource/'. $action .'/' . $varname .'/' . $varvalue .'/file/' . $filename ;
- $path = "http://" . $_SERVER['SERVER_NAME'] . $path;
- return $path;
- }
-
-}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/application/modules/dev/controllers/RoleController.php b/application/modules/dev/controllers/RoleController.php
deleted file mode 100644
index db39f46..0000000
--- a/application/modules/dev/controllers/RoleController.php
+++ /dev/null
@@ -1,280 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_RoleController extends Zend_Controller_Action {
- protected $roleMapper;
- protected $rightMapper;
- protected $rightRolesMapper;
-
- public function init() {
- if (Zend_Auth::getInstance()->hasIdentity()) {
- $this->roleMapper = new Application_Model_RoleMapper();
- $this->rightMapper = new Application_Model_RightMapper();
- $this->rightRolesMapper = new Application_Model_RightRolesMapper();
- } else {
- $this->_helper->redirector('login', 'auth');
- }
- }
-
- public function indexAction() {
- $roleNamespace = Zend_Session::namespaceGet('role');
- if(isset($roleNamespace['groupID'])) {
- $roleList = $this->roleMapper->findBy(array('groupID' => $roleNamespace['groupID']), true);
- $this->view->groupID = $roleNamespace['groupID'];
- $this->view->roleList = $roleList;
- } else {
- $this->_helper->redirector('groupselect', 'role');
- return;
- }
- }
-
- public function addAction() {
- $roleNamespace = Zend_Session::namespaceGet('role');
- if(isset($roleNamespace['groupID'])) {
- if (!isset($_POST["add"])) {
- $addForm = new dev_Form_RoleAdd(array('rightlist' => $rightList));
- } else {
- $addForm = new dev_Form_RoleAdd(array('rightlist' => $rightList), $_POST);
- if ($addForm->isValid($_POST)) {
-
- $_POST['groupID'] = $roleNamespace['groupID'];
- $role = new Application_Model_Role($_POST);
- try {
- $this->roleMapper->save($role);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
- $this->_helper->redirector('', 'role');
- return;
- }
- }
-
- $this->view->addForm = $addForm;
- } else {
- $this->_helper->redirector('groupselect', 'role');
- return;
- }
- }
-
- public function editAction() {
- $roleID = $this->_request->getParam('roleID');
- if(!isset($roleID)) {
- $addForm = new dev_Form_RoleAdd();
- $this->view->addForm = $addForm;
- return;
- }
- if (!isset($_POST["save"])) {
- $role = $this->roleMapper->find($roleID);
- $_POST['title'] = $role->getTitle();
- $_POST['description'] = $role->getDescription();
- $_POST['groupID'] = $role->getGroupID();
- $_POST['inheritance'] = $role->getInheritance();
- $editForm = new dev_Form_RoleEdit();
- } else {
- $editForm = new dev_Form_RoleEdit($_POST);
- if ($editForm->isValid($_POST)) {
- $role = new Application_Model_Role($_POST);
- $role->setID($this->_request->getParam('roleID'));
- try {
- $this->roleMapper->save($role);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
- $this->_helper->redirector('', 'role');
- return;
- }
- }
- $this->view->editForm = $editForm;
- }
-
- public function showAction() {
- $roleID = $this->_request->getParam('roleID');
- if($roleID) {
- $rightroles = $this->rightRolesMapper->findBy(array('roleID' => $roleID), true);
- if(count($rightroles) > 0) {
- foreach($rightroles as $rightrole) {
- $right = $this->rightMapper->find($rightrole['rightID']);
- $rightsList[] = $right;
- }
- if(is_array($rightsList)) {
- $this->view->rightsList = $rightsList;
- }
- }
- $this->view->role = $this->roleMapper->find($roleID);
- $this->view->roleID = $roleID;
- } else {
- $this->_helper->redirector('', 'role');
- return;
- }
- }
-
- public function deleteAction() {
- $this->_helper->viewRenderer->setNoRender();
- $roleID = $this->_request->getParam('roleID');
- if (isset($roleID)) {
- $role = $this->roleMapper->find($roleID);
- try {
- $this->roleMapper->delete($role);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
- $this->_helper->redirector('', 'role');
- return;
- } else {
- $this->_helper->redirector('', 'role');
- return;
- }
- }
-
- public function linkrightAction() {
- $roleID = $this->_request->getParam('roleID');
- if(isset($roleID)) {
- $rightroles = $this->rightRolesMapper->findBy(array('roleID' => $roleID), true);
- $rights = $this->rightMapper->fetchAll();
- if(count($rightroles) > 0) {
- if(count($rights) > 0) {
- foreach($rights as $right) {
- foreach($rightroles as $rightrole) {
- if($right->getID() == $rightrole['rightID']) {
- $found = true;
- break;
- }
- }
- if(!$found) {
- $rightlist[] = $right;
- }
- $found = false;
- }
- }
- } else {
- $rightlist = $rights;
- }
- if(count($rightlist) > 0) {
- if (!isset($_POST["link"])) {
- $linkForm = new dev_Form_LinkRight(array('rightlist' => $rightlist, 'roleID' => $roleID));
- } else {
- $linkForm = new dev_Form_LinkRight(array('rightlist' => $rightlist), $_POST);
- if ($linkForm->isValid($_POST)) {
- $rightroles = new Application_Model_RightRoles();
- $rightroles->setRightID($_POST['rightID']);
- $rightroles->setRoleID($roleID);
- try {
- $this->rightRolesMapper->save($rightroles);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
- $this->_redirect('/dev/role/show/roleID/' . $roleID);
- return;
- }
- }
- $this->view->linkForm = $linkForm;
- } else {
- $this->_redirect('/dev/role/show/roleID/' . $roleID);
- return;
- }
- } else {
- $this->_helper->redirector('', 'role');
- return;
- }
- }
-
- public function unlinkrightAction() {
- $this->_helper-> viewRenderer-> setNoRender();
- $rightRolesID = $this->_request->getParam('rightrolesID');
- if(isset($rightRolesID)) {
- $rightRolesID = explode('-', $rightRolesID);
- $roleID = $rightRolesID[0];
- $rightID = $rightRolesID[1];
- if (isset($roleID) && isset($rightID)) {
- $rightroles = new Application_Model_RightRoles();
- $rightroles->setRoleID($roleID);
- $rightroles->setRightID($rightID);
- try {
- $this->rightRolesMapper->delete($rightroles);
- } catch(Zend_Exception $e) {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
- $this->_redirect('/dev/role/show/roleID/' . $roleID);
- return;
- }
- } else {
- $this->_helper->redirector('', 'role');
- return;
- }
- }
-
- public function groupselectAction() {
- $roleNamespace = Zend_Session::namespaceGet('role');
- if(isset($roleNamespace['groupID'])) {
- $this->_helper->redirector('', 'role');
- } else {
- if(isset($_POST['selectgroup'])) {
- $roleSession = new Zend_Session_Namespace('role');
- $roleSession->groupID = $_POST['groupID'];
- $this->_helper->redirector('', 'role');
- return;
- } else {
- $personMapper = new Application_Model_PersonMapper();
- $result = $personMapper->findBy(array('email' => Zend_Auth::getInstance()->getIdentity()), true);
- $person = new Application_Model_Person($result[0]);
- $person->setID($result[0]['personID']);
- $membershipMapper = new Application_Model_MembershipMapper();
- $memberships = $membershipMapper->findBy(array("personID" => $person->getID(), true));
- $groupMapper = new Application_Model_GroupMapper();
- if(isset($memberships)) {
- foreach($memberships as $membership) {
- $group = $groupMapper->find($membership['groupID']);
- $groupList[] = $group;
- }
- }
- $groupSelectForm = new dev_Form_GroupSelect(array('grouplist' => $groupList));
- $this->view->groupSelectForm = $groupSelectForm;
- }
- }
- }
-
- public function changegroupAction() {
- $this->_helper-> viewRenderer-> setNoRender();
- Zend_Session::namespaceUnset('role');
- $this->_helper->redirector('groupselect', 'role');
- return;
- }
-
-
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/application/modules/dev/controllers/SessionController.php b/application/modules/dev/controllers/SessionController.php
deleted file mode 100644
index 56a7733..0000000
--- a/application/modules/dev/controllers/SessionController.php
+++ /dev/null
@@ -1,184 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_SessionController extends Zend_Controller_Action {
-
- public function init() {
- /* Initialize action controller here */
- }
-
- public function indexAction() {
- $mapper = new Application_Model_SessionMapper();
- $this->view->sessions = $mapper->fetchAll();
-#print_a($_SESSION);
- }
- private function getUniqueCode($length = "") {
- $code = md5(uniqid(rand(), true));
- if ($length != "") { return substr($code, 0, $length); }
- else { return $code; }
- }
-
- public function createsessionAction() {
- $cm = new Application_Model_ClientMapper();
- $clients = $cm->fetchAll();
-
- $bm = new Application_Model_BootOsMapper();
- $bootos = $bm->fetchAll();
-
- $bi = new Application_Model_BootIsoMapper();
- $bootisos = $bi->fetchAll();
-
- $bmem = new Application_Model_BootMenuEntriesMapper();
- $bootmenuentries = $bmem->fetchAll();
-
- $mm = new Application_Model_MembershipMapper();
- $memberships = $mm->fetchAll();
-
-
- if (!isset($_POST["add"])) {
- $createsession = new dev_Form_Session(array('buttontext' => 'Create Session', 'bootmenuentries' => $bootmenuentries, 'clients' => $clients, 'bootos' => $bootos, 'bootisos' => $bootisos, 'memberships' => $memberships));
- $this->view->createsession = $createsession;
- } else {
- // TODO extend with normal function not only with post
- $createsession = new dev_Form_Session(array('buttontext' => 'Create Session', 'bootmenuentries' => $bootmenuentries, 'clients' => $clients, 'bootos' => $bootos, 'bootisos' => $bootisos), $_POST);
-#print_a($_POST);
- if ($createsession->isValid($_POST)) {
- try {
- $uniqid = $this->getUniqueCode(10);
- $sm = new Application_Model_SessionMapper();
- while(count($sm->findBy(array('alphasessionID' => $uniqid), true)) > 0) {
- $uniqid = $this->getUniqueCode(16);
- }
-
- $session = new Application_Model_Session($_POST);
- $session->setTime(strtotime($_POST['time']));
- $session->setAlphasessionID($uniqid);
-
- // UNIQUE ID IN SESSION SPEICHERN:
- $_SESSION['alphasessionID'] = $uniqid;
-
- if($session->getClientID() == '') {
- $session->setClientID(null);
- }
- if($session->getBootosID() == '') {
- $session->setBootosID(null);
- }
- if($session->getBootmenuentryID() == '') {
- $session->setBootmenuentryID(null);
- }
- if($session->getMembershipID() == '') {
- $session->setMembershipID(null);
- }
- $sessionmapper = new Application_Model_SessionMapper();
- $sessionmapper->save($session);
-
- $this->_redirect('/dev/session');
-
- } catch (Zend_Exception $e) {
- echo "Error message 2: " . $e->getMessage() . "\n";
- }
- }
- $this->view->createsession = $createsession;
- }
- }
-
- public function editsessionAction() {
- $cm = new Application_Model_ClientMapper();
- $clients = $cm->fetchAll();
-
- $bm = new Application_Model_BootOsMapper();
- $bootos = $bm->fetchAll();
-
- $bi = new Application_Model_BootIsoMapper();
- $bootisos = $bi->fetchAll();
-
- $bmem = new Application_Model_BootMenuEntriesMapper();
- $bootmenuentries = $bmem->fetchAll();
-
- $mm = new Application_Model_MembershipMapper();
- $memberships = $mm->fetchAll();
-
- if (!isset($_POST["add"])) {
- // TODO: ACL implementieren ob er editieren darf
- $sessionID = $this->_request->getParam('sessionID');
- $session = new Application_Model_Session();
- try {
-
- $sessionmapper = new Application_Model_SessionMapper();
- $sessionmapper->find($sessionID, $session);
- $session->setTime(date('d.m.Y H:i', $session->getTime()));
- $session2 = $session->toArray();
-#print_a($session2);
-
- $editsession = new dev_Form_Session(array('buttontext' => 'Edit Session', 'bootmenuentries' => $bootmenuentries, 'clients' => $clients, 'bootos' => $bootos, 'bootisos' => $bootisos, 'memberships' => $memberships));
- $editsession->populate($session2);
- $this->view->editsession = $editsession;
- } catch (Zend_Exception $e) {
- echo "Error message 2: " . $e->getMessage() . "\n";
- }
-
- } else {
- try {
- $sessionID = $this->_request->getParam('sessionID');
-
- $editsession = new dev_Form_Session(array('buttontext' => 'Edit Session', 'bootmenuentries' => $bootmenuentries, 'clients' => $clients, 'bootos' => $bootos, 'bootisos' => $bootisos, 'memberships' => $memberships), $_POST);
-
- if ($editsession->isValid($_POST)) {
- $_SESSION['alphasessionID'] = $_POST['alphasessionID'];
- $session = new Application_Model_Session($_POST);
- $session->setID($this->_request->getParam('sessionID'));
- $session->setTime(strtotime($_POST['time']));
- if($session->getClientID() == '') {
- $session->setClientID(null);
- }
- if($session->getBootosID() == '') {
- $session->setBootosID(null);
- }
- if($session->getBootmenuentryID() == '') {
- $session->setBootmenuentryID(null);
- }
- if($session->getMembershipID() == '') {
- $session->setMembershipID(null);
- }
- $sessionmapper = new Application_Model_SessionMapper();
- $sessionmapper->save($session);
- echo 'valid';
- } else {
- echo 'not valid';
- }
- } catch (Zend_Exception $e) {
- echo "Error message 2: " . $e->getMessage() . "\n";
- }
- $this->_redirect('/dev/session');
- }
- }
-
- public function deletesessionAction() {
- $sessionID = $this->_request->getParam('sessionID');
- if(is_numeric($sessionID)) {
- $deletesession = new Application_Model_Session();
- $deletesession->setID($sessionID);
- $sessionmapper = new Application_Model_SessionMapper();
- $sessionmapper->delete($deletesession);
- }
- $this->_redirect('/dev/session');
- }
-
-
-}
-
-
-
-
-
-
-
diff --git a/application/modules/dev/forms/AuthDelete.php b/application/modules/dev/forms/AuthDelete.php
deleted file mode 100644
index dda4f14..0000000
--- a/application/modules/dev/forms/AuthDelete.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_AuthDelete extends Zend_Form {
-
- public function init() {
- $this->setName("Delete");
- $this->setMethod('post');
-
- $this->addElement('text', 'ID', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'ID:',
- ));
- $this->addElement('submit', 'delete', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Delete',
- ));
- }
-
-
-}
-
diff --git a/application/modules/dev/forms/AuthLogin.php b/application/modules/dev/forms/AuthLogin.php
deleted file mode 100644
index 56d6e79..0000000
--- a/application/modules/dev/forms/AuthLogin.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_AuthLogin extends Zend_Form {
-
- public function init() {
- $this->setName("Login");
- $this->setMethod('post');
-
- $this->addElement('text', 'email', array(
- 'filters' => array('StringTrim', 'StringToLower'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'E-Mail:',
- ));
-
- $this->addElement('password', 'password', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Password:',
- ));
-
- $this->addElement('submit', 'login', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Login',
- ));
- }
-
-
-}
-
diff --git a/application/modules/dev/forms/AuthRecoverPassword.php b/application/modules/dev/forms/AuthRecoverPassword.php
deleted file mode 100644
index 4c84b8e..0000000
--- a/application/modules/dev/forms/AuthRecoverPassword.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_AuthRecoverPassword extends Zend_Form {
-
- public function init() {
- $this->setName("RecoverPassword");
- $this->setMethod('post');
-
- $this->addElement('text', 'email', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 30)),
- ),
- 'required' => true,
- 'label' => 'Email:',
- ));
- $this->addElement('submit', 'recoverPassword', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Recover',
- ));
- }
-
-
-}
-
diff --git a/application/modules/dev/forms/AuthRegister.php b/application/modules/dev/forms/AuthRegister.php
deleted file mode 100644
index 8860467..0000000
--- a/application/modules/dev/forms/AuthRegister.php
+++ /dev/null
@@ -1,113 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_AuthRegister extends Zend_Form {
-
- public function init() {
- $this->setName("Register");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
-
- $this->addElement('text', 'name', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Name:',
- ));
-
- $this->addElement('text', 'firstname', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Firstname:',
- ));
-
- $this->addElement('text', 'street', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Street:',
- ));
-
- $this->addElement('text', 'housenumber', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Housenumber:',
- ));
-
- $this->addElement('text', 'city', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'City:',
- ));
-
- $this->addElement('text', 'postalcode', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Postalcode:',
- ));
-
- $this->addElement('text', 'email', array(
- 'filters' => array('StringTrim', 'StringToLower'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Email:',
- ));
-
- $this->addElement('password', 'password', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Password:',
- ));
-
- $this->addElement('submit', 'register', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Register',
- ));
-
-
- }
-
-
-
-}
-
diff --git a/application/modules/dev/forms/BootisoCreate.php b/application/modules/dev/forms/BootisoCreate.php
deleted file mode 100644
index d273f69..0000000
--- a/application/modules/dev/forms/BootisoCreate.php
+++ /dev/null
@@ -1,117 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_BootisoCreate extends Zend_Form {
-
- private $grouplist;
- private $prebootlist;
-
- public function setGrouplist($grouplist) {
- $this->grouplist = $grouplist;
-
- }
- public function setPrebootlist($prebootlist) {
- $this->prebootlist = $prebootlist;
-
- }
-
-
- public function init() {
- $this->setName("BootIsoCreate");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $groupfield = $this->createElement('select', 'groupID');
- $groupfield ->setLabel('Group:');
-
- if(count($this->grouplist) > 0) {
- foreach($this->grouplist as $group => $g) {
- $groupfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $groupfield->setRegisterInArrayValidator(false);
- $this->addElement($groupfield);
-
- $prebootfield = $this->createElement('select', 'prebootID');
- $prebootfield ->setLabel('Preboot:');
-
- if(count($this->prebootlist) > 0) {
- foreach($this->prebootlist as $preboot => $p) {
- $prebootfield->addMultiOption($p->getID(), $p->getTitle());
- }
- }
- $prebootfield->setRegisterInArrayValidator(false);
- $this->addElement($prebootfield);
-
- $serial = time();
- for($i = 2; $i < 14; $i += 3)
- { $serial = substr($serial, 0, $i) .'-'. substr($serial, $i, strlen($serial)); }
-
- $this->addElement('text', 'serialnumber', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'size' => 50,
- 'label' => 'Serialnumber:',
- 'value' => $serial
- ));
-
-
-
-
- $date = new DateTime();
- $date->add(new DateInterval('P1Y'));
- $this->addElement('text', 'expires', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'Expires:',
- 'value' => $date->format('Y-m-d'),
- ));
-
- $this->addElement('text', 'public', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Public-Level:',
- 'value' => '0'
- ));
-
- $this->addElement('submit', 'createbootiso', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Create BootISO',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/dev/bootiso"'
- ));
-
- }
-
-
-}
-
diff --git a/application/modules/dev/forms/BootisoEdit.php b/application/modules/dev/forms/BootisoEdit.php
deleted file mode 100644
index ef8f9eb..0000000
--- a/application/modules/dev/forms/BootisoEdit.php
+++ /dev/null
@@ -1,109 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_BootisoEdit extends Zend_Form {
-
-
- private $grouplist;
- private $prebootlist;
-
- public function setGrouplist($grouplist) {
- $this->grouplist = $grouplist;
-
- }
- public function setPrebootlist($prebootlist) {
- $this->prebootlist = $prebootlist;
-
- }
-
-
- public function init() {
- $this->setName("BootIsoCreate");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $groupfield = $this->createElement('select', 'groupID');
- $groupfield ->setLabel('Group:');
-
- if(count($this->grouplist) > 0) {
- foreach($this->grouplist as $group => $g) {
- $groupfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $groupfield->setRegisterInArrayValidator(false);
- $this->addElement($groupfield);
-
- $prebootfield = $this->createElement('select', 'prebootID');
- $prebootfield ->setLabel('Preboot:');
-
- if(count($this->prebootlist) > 0) {
- foreach($this->prebootlist as $preboot => $p) {
- $prebootfield->addMultiOption($p->getID(), $p->getTitle());
- }
- }
- $prebootfield->setRegisterInArrayValidator(false);
- $this->addElement($prebootfield);
-
- $this->addElement('text', 'serialnumber', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'size' => 50,
- 'label' => 'Serialnumber:',
- ));
-
- $date = new DateTime();
- $date->add(new DateInterval('P1Y'));
- $this->addElement('text', 'expires', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'Expires:',
- 'value' => $date->format('Y-m-d'),
- ));
-
- $this->addElement('text', 'public', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Public-Level:',
- 'value' => '0'
- ));
-
-
- $this->addElement('submit', 'editbootiso', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Edit BootISO',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/dev/bootiso"'
- ));
-
- }
-}
-
diff --git a/application/modules/dev/forms/BootmenuCreate.php b/application/modules/dev/forms/BootmenuCreate.php
deleted file mode 100644
index 3b5ada6..0000000
--- a/application/modules/dev/forms/BootmenuCreate.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_BootmenuCreate extends Zend_Form {
- private $grouplist;
-
- public function setGrouplist($grouplist) {
- $this->grouplist = $grouplist;
-
- }
-
- public function init() {
- $this->setName("BootMenuCreate");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $groupfield = $this->createElement('select', 'groupID');
- $groupfield ->setLabel('Group:');
-
- if(count($this->grouplist) > 0) {
- foreach($this->grouplist as $group => $g) {
- $groupfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $groupfield->setRegisterInArrayValidator(false);
- $this->addElement($groupfield);
-
- $this->addElement('submit', 'createbootmenu', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Create Bootmenu',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/bootmenu"'
- ));
-
- }
-
-
-}
-
diff --git a/application/modules/dev/forms/BootmenuEdit.php b/application/modules/dev/forms/BootmenuEdit.php
deleted file mode 100644
index f171c94..0000000
--- a/application/modules/dev/forms/BootmenuEdit.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_BootmenuEdit extends Zend_Form {
-
- private $grouplist;
-
- public function setGrouplist($grouplist) {
- $this->grouplist = $grouplist;
-
- }
-
- public function init() {
- $this->setName("BootMenuEdit");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $groupfield = $this->createElement('select', 'groupID');
- $groupfield ->setLabel('Group:');
-
- if(count($this->grouplist) > 0) {
- foreach($this->grouplist as $group => $g) {
- $groupfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $groupfield->setRegisterInArrayValidator(false);
- $this->addElement($groupfield);
-
- $this->addElement('submit', 'editbootmenu', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Edit BootMenu',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/bootmenu"'
- ));
-
- }
-
-}
-
diff --git a/application/modules/dev/forms/BootmenuEntriesAdd.php b/application/modules/dev/forms/BootmenuEntriesAdd.php
deleted file mode 100644
index c42a30c..0000000
--- a/application/modules/dev/forms/BootmenuEntriesAdd.php
+++ /dev/null
@@ -1,146 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_BootmenuEntriesAdd extends Zend_Form {
- private $bootoslist;
- private $configlist;
- private $maxorder;
-
- public function setBootoslist($bootoslist) {
- $this->bootoslist = $bootoslist;
- }
-
- public function setMaxorder($maxorder) {
- $this->maxorder = $maxorder;
-
- }
-
- public function setConfiglist($configlist) {
- $this->configlist = $configlist;
-
- }
-
-
- public function init() {
-
- if(!isset($_POST['bootosID'])) {
- $firstbootos = array_slice($this->bootoslist, 0, 1);
- $_POST['bootosID'] = $firstbootos[0]->getID();
- $_POST['kclactive'] = true;
- }
-
- $this->setName("BootMenuEntryAdd");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $bootosfield = $this->createElement('select', 'bootosID');
- $bootosfield ->setLabel('BootOs:');
- $bootosfield->setAttrib('onChange', "document.getElementById('BootMenuEntryAdd').submit();");
-
- if(count($this->bootoslist) > 0) {
- foreach($this->bootoslist as $bootos => $b) {
- $bootosfield->addMultiOption($b->getID(), $b->getTitle());
- }
- }
- $bootosfield->setRegisterInArrayValidator(false);
-
- $this->addElement($bootosfield);
-
- $kclactive = $this->createElement('checkbox', 'kclactive');
- $kclactive->setAttrib('onChange', "document.getElementById('BootMenuEntryAdd').submit();");
- $kclactive->setLabel('Use default KCL:');
- $kclactive->setValue(true);
- $this->addElement($kclactive);
-
-
- if($_POST['kclactive']) {
- $this->addElement('textarea', 'kcl', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'cols' => 50,
- 'rows' => 5,
- 'label' => 'KCL:',
- 'readOnly' => true,
- 'value' => $this->bootoslist[$_POST['bootosID']]->getDefaultkcl()
-
- ));
- }
-
- if($_POST['kclactive'])
- { $kcllength = 175 - strlen($this->bootoslist[$_POST['bootosID']]->getDefaultkcl()); }
- else
- { $kcllength = 175; }
-
- $this->addElement('textarea', 'kclappend', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, $kcllength)),
- ),
- 'required' => false,
- 'cols' => 50,
- 'rows' => 5,
- 'label' => 'KCL-Append:',
- 'description' => 'Chars left: ' . $kcllength
- ));
-
- $defaultconfigid = $this->bootoslist[$_POST['bootosID']]->getConfigID();
- $configfield = $this->createElement('select', 'configID');
- $configfield->setLabel('Config:');
- $configfield->addMultiOption($defaultconfigid, 'default');
-
- if(count($this->configlist) > 0) {
- foreach($this->configlist as $config => $c) {
- if($c->getID() != $defaultconfigid)
- { $configfield->addMultiOption($c->getID(), $c->getTitle()); }
- }
- }
-
- $configfield->setRegisterInArrayValidator(false);
- $this->addElement($configfield);
-
- $orderfield = $this->createElement('select', 'order');
- $orderfield ->setLabel('Position:');
-
- for ($i = 0; $i <= $this->maxorder; $i++) {
- $orderfield->addMultiOption($i, $i + 1);
- }
- $orderfield->setRegisterInArrayValidator(false);
- $this->addElement($orderfield);
-
- $this->addElement('submit', 'addbootmenuentry', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Add Bootmenuentry',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/dev/bootmenu"'
- ));
-
- }
-
-
-
-
-}
-
diff --git a/application/modules/dev/forms/BootmenuEntriesEdit.php b/application/modules/dev/forms/BootmenuEntriesEdit.php
deleted file mode 100644
index c37a38d..0000000
--- a/application/modules/dev/forms/BootmenuEntriesEdit.php
+++ /dev/null
@@ -1,148 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_BootmenuEntriesEdit extends Zend_Form {
-
- private $bootoslist;
- private $configlist;
- private $maxorder;
- private $kcl;
-
- public function setBootoslist($bootoslist) {
- $this->bootoslist = $bootoslist;
- }
-
- public function setMaxorder($maxorder) {
- $this->maxorder = $maxorder;
- }
-
- public function setConfiglist($configlist) {
- $this->configlist = $configlist;
- }
- public function setKcl($kcl) {
- $this->kcl = $kcl;
- }
-
-
- public function init() {
-
- if(!isset($_POST['bootosID'])) {
- $firstbootos = array_slice($this->bootoslist, 0, 1);
- $_POST['bootosID'] = $firstbootos[0]->getID();
- if(isset($this->kcl))
- { $_POST['kclactive'] = true; }
- else
- { $_POST['kclactive'] = false; }
- }
-
- $this->setName("BootMenuEntryAdd");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $bootosfield = $this->createElement('select', 'bootosID');
- $bootosfield->setLabel('BootOs:');
- $bootosfield->setAttrib('onChange', "document.getElementById('BootMenuEntryAdd').submit();");
-
-
- if(count($this->bootoslist) > 0) {
- foreach($this->bootoslist as $bootos => $b) {
- $bootosfield->addMultiOption($b->getID(), $b->getTitle());
- }
- }
- $bootosfield->setRegisterInArrayValidator(false);
- $this->addElement($bootosfield);
-
- $kclactive = $this->createElement('checkbox', 'kclactive');
- $kclactive->setAttrib('onChange', "document.getElementById('BootMenuEntryAdd').submit();");
- $kclactive->setLabel('Use default KCL:');
- $kclactive->setValue($_POST['kclactive']);
- $this->addElement($kclactive);
-
- if($_POST['kclactive']) {
- $this->addElement('textarea', 'kcl', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'cols' => 50,
- 'rows' => 5,
- 'label' => 'KCL:',
- 'readOnly' => true,
- 'value' => $this->bootoslist[$_POST['bootosID']]->getDefaultkcl()
- ));
- }
-
- if($_POST['kclactive'])
- { $kcllength = 175 - strlen($this->bootoslist[$_POST['bootosID']]->getDefaultkcl()); }
- else
- { $kcllength = 175; }
-
- $this->addElement('textarea', 'kclappend', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, $kcllength)),
- ),
- 'required' => false,
- 'cols' => 50,
- 'rows' => 5,
- 'label' => 'KCL-Append:',
- 'description' => 'Chars left: ' . $kcllength
-
- ));
-
- $defaultconfigid = $this->bootoslist[$_POST['bootosID']]->getConfigID();
- $configfield = $this->createElement('select', 'configID');
- $configfield->setLabel('Config:');
- $configfield->addMultiOption($defaultconfigid, 'default');
-
- if(count($this->configlist) > 0) {
- foreach($this->configlist as $config => $c) {
- if($c->getID() != $defaultconfigid)
- { $configfield->addMultiOption($c->getID(), $c->getTitle()); }
- }
- }
- $configfield->setRegisterInArrayValidator(false);
- $this->addElement($configfield);
-
- $orderfield = $this->createElement('select', 'order');
- $orderfield ->setLabel('Position:');
-
- for ($i = 0; $i < $this->maxorder; $i++) {
- $orderfield->addMultiOption($i, $i + 1);
- }
- $orderfield->setRegisterInArrayValidator(false);
- $this->addElement($orderfield);
-
- $this->addElement('submit', 'editbootmenuentry', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Edit Bootmenuentry',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/dev/bootmenu"'
- ));
-
- }
-
-
-}
-
diff --git a/application/modules/dev/forms/BootosCreate.php b/application/modules/dev/forms/BootosCreate.php
deleted file mode 100644
index 0c00896..0000000
--- a/application/modules/dev/forms/BootosCreate.php
+++ /dev/null
@@ -1,143 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_BootosCreate extends Zend_Form {
-
- private $grouplist;
- private $configlist;
-
- public function setGrouplist($grouplist) {
- $this->grouplist = $grouplist;
-
- }
-
- public function setConfiglist($configlist) {
- $this->configlist = $configlist;
-
- }
-
- public function init() {
- $this->setName("BootOsCreate");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
-
- $configfield = $this->createElement('select', 'configID');
- $configfield ->setLabel('Config:');
-
- if(count($this->configlist) > 0) {
- foreach($this->configlist as $config => $c) {
- $configfield->addMultiOption($c->getID(), $c->getTitle());
- }
- }
- $configfield->setRegisterInArrayValidator(false);
- $this->addElement($configfield);
-
- $groupfield = $this->createElement('select', 'groupID');
- $groupfield ->setLabel('Group:');
-
- if(count($this->grouplist) > 0) {
- foreach($this->grouplist as $group => $g) {
- $groupfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $groupfield->setRegisterInArrayValidator(false);
- $this->addElement($groupfield);
-
- $this->addElement('text', 'path_init', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 250)),
- ),
- 'required' => true,
- 'size' => 50,
- 'label' => 'Init-Path:',
- ));
-
- $this->addElement('text', 'path_kernel', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 250)),
- ),
- 'required' => true,
- 'size' => 50,
- 'label' => 'Kernel-Path:',
- ));
-
- $this->addElement('textarea', 'defaultkcl', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 175)),
- ),
- 'required' => false,
- 'rows' => 5,
- 'cols' => 50,
- 'label' => 'Default-KCL:',
- ));
-
- $this->addElement('textarea', 'description', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'rows' => 5,
- 'cols' => 50,
- 'label' => 'Description:',
- ));
-
- $date = new DateTime();
- $date->add(new DateInterval('P1Y'));
- $this->addElement('text', 'expires', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'Expires:',
- 'value' => $date->format('Y-m-d'),
- ));
-
-
- $this->addElement('text', 'public', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Public-Level:',
- 'value' => '0',
- ));
-
- $this->addElement('submit', 'createbootos', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Create BootOS',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/bootos"'
- ));
-
- }
-
-
-}
-
diff --git a/application/modules/dev/forms/BootosEdit.php b/application/modules/dev/forms/BootosEdit.php
deleted file mode 100644
index 00854c6..0000000
--- a/application/modules/dev/forms/BootosEdit.php
+++ /dev/null
@@ -1,153 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_BootosEdit extends Zend_Form {
-
- private $grouplist;
- private $configlist;
-
- public function setGrouplist($grouplist) {
- $this->grouplist = $grouplist;
-
- }
-
- public function setConfiglist($configlist) {
- $this->configlist = $configlist;
-
- }
-
- public function init() {
- $this->setName("BootOsEdit");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $configfield = $this->createElement('select', 'configID');
- $configfield ->setLabel('Config:');
-
- if(count($this->configlist) > 0) {
- foreach($this->configlist as $config => $c) {
- $configfield->addMultiOption($c->getID(), $c->getTitle());
- }
- }
- $configfield->setRegisterInArrayValidator(false);
- $this->addElement($configfield);
-
- $groupfield = $this->createElement('select', 'groupID');
- $groupfield ->setLabel('Group:');
-
- if(count($this->grouplist) > 0) {
- foreach($this->grouplist as $group => $g) {
- $groupfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $groupfield->setRegisterInArrayValidator(false);
- $this->addElement($groupfield);
-
- $this->addElement('text', 'path_init', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'size' => 50,
- 'label' => 'Init-Path:',
- ));
-
- $this->addElement('text', 'path_kernel', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'size' => 50,
- 'label' => 'Kernel-Path:',
- ));
-
- $this->addElement('textarea', 'defaultkcl', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 175)),
- ),
- 'required' => false,
- 'rows' => 5,
- 'cols' => 50,
- 'label' => 'Default-KCL:',
- ));
-
- $this->addElement('textarea', 'description', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'rows' => 5,
- 'cols' => 50,
- 'label' => 'Description:',
- ));
-
- $date = new DateTime();
- $date->add(new DateInterval('P1Y'));
- $this->addElement('text', 'expires', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'Expires:',
- 'value' => $date->format('Y-m-d'),
- ));
-
-
- $this->addElement('text', 'public', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Public-Level:',
- 'value' => '0',
- ));
-
- $this->addElement('submit', 'editbootos', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Edit BootOS',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/bootos"'
- ));
-
- }
-
-
-}
-
-
-
diff --git a/application/modules/dev/forms/Client.php b/application/modules/dev/forms/Client.php
deleted file mode 100644
index 426587c..0000000
--- a/application/modules/dev/forms/Client.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_Client extends Zend_Form {
-
- public function init() {
- $this->setName("pool");
- $this->setMethod('post');
-
- $groupfield = $this->createElement('select', 'groupID');
- $groupfield ->setLabel('Group:');
-
- foreach($this->groups as $c) {
- $groupfield->addMultiOption($c->getID(), $c->getTitle());
- }
- $this->addElement($groupfield);
-
-
- $this->addElement('text', 'macadress', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'MacAdress:',
- ));
- $this->addElement('text', 'hardwarehash', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Hardwarehash:',
- ));
-
- $this->addElement('submit', 'add', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => $this->buttontext,
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/dev/client"'
- ));
- }
- private $buttontext = 'Save';
- private $groups;
- function setButtontext($v) {
- $this->buttontext = $v;
- }
- public function setGroups($groups) {
- $this->groups = $groups;
- return $this;
- }
-
-
-}
-
diff --git a/application/modules/dev/forms/ConfigCreate.php b/application/modules/dev/forms/ConfigCreate.php
deleted file mode 100644
index 1499bd5..0000000
--- a/application/modules/dev/forms/ConfigCreate.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_ConfigCreate extends Zend_Form {
-
- private $grouplist;
-
- public function setGrouplist($grouplist) {
- $this->grouplist = $grouplist;
-
- }
-
- public function init() {
- $this->setName("ConfigCreate");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $groupfield = $this->createElement('select', 'groupID');
- $groupfield ->setLabel('Group:');
-
- if(count($this->grouplist) > 0) {
- foreach($this->grouplist as $group => $g) {
- $groupfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
-
- $groupfield->setRegisterInArrayValidator(false);
- $this->addElement($groupfield);
-
- $this->addElement('textarea', 'shellscript', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'rows' => 10,
- 'cols' => 70,
- 'label' => 'Shellscript:',
- ));
-
- $this->addElement('submit', 'createconfig', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Create Config',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/config"'
- ));
-
- }
-
-}
-
diff --git a/application/modules/dev/forms/ConfigEdit.php b/application/modules/dev/forms/ConfigEdit.php
deleted file mode 100644
index e4e687b..0000000
--- a/application/modules/dev/forms/ConfigEdit.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_ConfigEdit extends Zend_Form {
- private $grouplist;
-
- public function setGrouplist($grouplist) {
- $this->grouplist = $grouplist;
-
- }
-
- public function init() {
- $this->setName("ConfigEdit");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $groupfield = $this->createElement('select', 'groupID');
- $groupfield ->setLabel('Group:');
-
- if(count($this->grouplist) > 0) {
- foreach($this->grouplist as $group => $g) {
- $groupfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
-
- $groupfield->setRegisterInArrayValidator(false);
- $this->addElement($groupfield);
-
- $this->addElement('textarea', 'shellscript', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'rows' => 10,
- 'cols' => 70,
- 'label' => 'Shellscript:',
- ));
-
- $this->addElement('submit', 'editconfig', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Edit Config',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/config"'
- ));
-
- }
-
-}
-
diff --git a/application/modules/dev/forms/ConfirmDeleteAccount.php b/application/modules/dev/forms/ConfirmDeleteAccount.php
deleted file mode 100644
index 7c56ed4..0000000
--- a/application/modules/dev/forms/ConfirmDeleteAccount.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_ConfirmDeleteAccount extends Zend_Form {
-
- public function init() {
- $this->setName("ConfirmDeleteAccount");
- $this->setMethod('post');
-
- $this->addElement('submit', 'confirmdelete', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Confirm',
- ));
-
- $this->addElement('button', 'cancel', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Cancel',
- 'onclick' => 'location.href="javascript:history.back();"',
- ));
- }
-}
-
diff --git a/application/modules/dev/forms/FilterAdd.php b/application/modules/dev/forms/FilterAdd.php
deleted file mode 100644
index 836218e..0000000
--- a/application/modules/dev/forms/FilterAdd.php
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_FilterAdd extends Zend_Form {
- private $bootmenus;
-
- public function init() {
- $this->setName("Add Filter");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
- $this->addElement('textarea', 'description', array(
- 'filters' => array('StringTrim'),
- 'required' => false,
- 'label' => 'Description:',
- ));
-
- $bootmenufield = $this->createElement('select', 'bootmenuID');
- $bootmenufield ->setLabel('Bootmenu:');
-
- if(count($this->bootmenus) > 0) {
- foreach($this->bootmenus as $id => $g) {
- $bootmenufield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $bootmenufield->setRegisterInArrayValidator(false);
- $this->addElement($bootmenufield);
-
- $this->addElement('text', 'priority', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Priority:',
- ));
- $this->addElement('submit', 'add', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => $this->buttontext,
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/filter"'
- ));
- }
- function setBootmenus($val) {
- $this->bootmenus = $val;
- return;
- }
- private $buttontext = 'Save';
- function setButtontext($v) {
- $this->buttontext = $v;
- }
-
-}
-
diff --git a/application/modules/dev/forms/FilterEntriesAdd.php b/application/modules/dev/forms/FilterEntriesAdd.php
deleted file mode 100644
index f76a6f4..0000000
--- a/application/modules/dev/forms/FilterEntriesAdd.php
+++ /dev/null
@@ -1,153 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_FilterEntriesAdd extends Zend_Form {
- private $filterID = 0;
-
- public function init() {
- $this->setName("Add Filterentry");
- $this->setMethod('post');
- $this->setAttrib('id', 'filterentryform');
-#print_a($this->data);
-
- try {
- $filtertypemapper = new Application_Model_FilterTypeMapper();
- $filtertype = $filtertypemapper->fetchAll();
-
- $filtertypes = $this->createElement('select', 'filtertypeID');
- $filtertypes ->setLabel('Type:');
- $filtertypes ->setAttrib('id', 'filtertype');
- $filtertypes->addMultiOption('', '');
- foreach($filtertype as $f) {
- $filtertypes->addMultiOption($f->getID(), $f->getFiltertypename());
- }
- $filterentry = $filtertypes->getMultiOption($this->data['filtertypeID']);
- $filterentryID = $this->data['filtertypeID'];
- } catch (Zend_Exception $e) {
- echo "Error message 1: " . $e->getMessage() . "\n";
- }
- switch($filterentryID) {
- default:
- $desc = "Select the filtertype";
- $label1 = 'Value 1:';
- $label2 = 'Value 2:';
- break;
- case "1":
- $desc = "You can set one IP or an IP-Range";
- $label1 = 'Start:';
- $label2 = 'End:';
- break;
- case "2":
- $desc = "You can set one Mac-Adress or an Mac-Range";
- $label1 = 'Start:';
- $label2 = 'End:';
- break;
- case "3":
- $desc = "Select your Pool";
- $label1 = 'PoolID:';
- break;
- case "4":
- $desc = "Select your BootIso";
- $label1 = 'BootIsoID:';
- break;
- case "5":
- $desc = "Select a Membership";
- $label1 = 'Membership:';
- break;
- case "6":
- $desc = "Select a Group";
- $label1 = 'Group:';
- break;
- case "7":
- $desc = "Specify a time-range";
- $label1 = 'Start:';
- $label2 = 'End:';
- break;
- case "8":
- $desc = "Select a Client";
- $label1 = 'Client:';
- break;
- case "9":
- $desc = "Define a Hardwarehash";
- $label1 = 'Hardwarehash:';
- break;
- case "10":
- $desc = "Specify the Weekday (Monday:1, Tuesday:2 ... Sunday:7) or a range";
- $label1 = 'Start Day:';
- $label2 = 'End Day:';
- break;
- case "11":
- $desc = "Specify the date or a day range of the filter";
- $label1 = 'Start Date:';
- $label2 = 'End Date:';
- break;
- }
- $filtertypes->setDescription($desc);
- $this->addElement($filtertypes);
-
- $this->addElement('text', 'filtervalue', array(
- 'label' => $label1,
- 'id' => 'val1'
- ));
-
- if(!in_array($filterentryID, array(3, 4, 5, 6, 8, 9))) {
- $this->addElement('text', 'filtervalue2', array(
- 'label' => $label2,
- 'id' => 'val2'
- ));
- }
-
- $this->addElement('submit', 'add', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => $this->buttontext,
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/filter"'
- ));
-
- $this->addElement('hidden', 'filterID', array(
- 'value' => $this->filterID
- ));
-
-
- }
-
- private $buttontext = 'Save';
- function setButtontext($v) {
- $this->buttontext = $v;
- }
- private $data ;
- function setData($v) {
- $this->data = $v;
- }
- function setFilterID($v) {
- $this->filterID = $v;
- }
-}
-
-? >
-< script type = "text/javascript" >
-$('#filtertype').change(function() {
- //alert($("#filtertype option:selected").val());
- $('#filterentryform').submit();
-});
-$('#val1').focusout(function() {
- if($("#filtertype option:selected").val() == 1 && $('#val2').val() == "") {
- $('#val2').val($('#val1').val());
- }
- if($("#filtertype option:selected").val() == 2 && $('#val2').val() == "") {
- $('#val2').val($('#val1').val());
- }
-});
-< / script >
diff --git a/application/modules/dev/forms/FilterEvaluate.php b/application/modules/dev/forms/FilterEvaluate.php
deleted file mode 100644
index 2aebc0f..0000000
--- a/application/modules/dev/forms/FilterEvaluate.php
+++ /dev/null
@@ -1,138 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_FilterEvaluate extends Zend_Form {
- private $pools;
- private $bootisos;
- private $memberships;
- private $groups;
- private $clients;
-
- public function init() {
- $this->setName("Test Filter");
- $this->setMethod('post');
- $this->setAction('/dev/filter/evaluate');
-
- $this->addElement('text', 'ip', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'IP:',
- ));
-######################################
- $this->addElement('text', 'mac', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'Mac:',
- ));
-######################################
- $poolfield = $this->createElement('select', 'poolID');
- $poolfield ->setLabel('Pool:');
- $poolfield->addMultiOption('', '');
- if(count($this->pools) > 0) {
- foreach($this->pools as $id => $g) {
- $poolfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $poolfield->setRegisterInArrayValidator(false);
- $this->addElement($poolfield);
-######################################
- $bootisofield = $this->createElement('select', 'bootisoID');
- $bootisofield ->setLabel('BootIso:');
- $bootisofield->addMultiOption('', '');
- if(count($this->bootisos) > 0) {
- foreach($this->bootisos as $id => $g) {
- $bootisofield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $bootisofield->setRegisterInArrayValidator(false);
- $this->addElement($bootisofield);
-######################################
- $membershipfield = $this->createElement('select', 'membershipID');
- $membershipfield ->setLabel('Membership:');
- $membershipfield->addMultiOption('', '');
- if(count($this->memberships) > 0) {
- foreach($this->memberships as $id => $g) {
- $membershipfield->addMultiOption($g->getID(), $g->getPersonID());
- }
- }
- $membershipfield->setRegisterInArrayValidator(false);
- $this->addElement($membershipfield);
-######################################
- $groupfield = $this->createElement('select', 'groupID');
- $groupfield ->setLabel('Group:');
- $groupfield->addMultiOption('', '');
- if(count($this->groups) > 0) {
- foreach($this->groups as $id => $g) {
- $groupfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $groupfield->setRegisterInArrayValidator(false);
- $this->addElement($groupfield);
-######################################
- $this->addElement('text', 'time', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'Time:',
- ));
-######################################
- $clientfield = $this->createElement('select', 'clientID');
- $clientfield ->setLabel('Client:');
- $clientfield->addMultiOption('', '');
- if(count($this->clients) > 0) {
- foreach($this->clients as $id => $g) {
- $clientfield->addMultiOption($g->getID(), $g->getID() . " - " . $g->getMacadress());
- }
- }
- $clientfield->setRegisterInArrayValidator(false);
- $this->addElement($clientfield);
-######################################
- $this->addElement('text', 'hardwarehash', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'Hardwarehash:',
- ));
-
- $this->addElement('submit', 'submit', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Get It On!',
- ));
- }
- function setPools($v) {
- $this->pools = $v;
- }
- function setBootisos($v) {
- $this->bootisos = $v;
- }
- function setMemberships($v) {
- $this->memberships = $v;
- }
- function setGroups($v) {
- $this->groups = $v;
- }
- function setClients($v) {
- $this->clients = $v;
- }
-}
-
diff --git a/application/modules/dev/forms/GroupAdd.php b/application/modules/dev/forms/GroupAdd.php
deleted file mode 100644
index 9349b17..0000000
--- a/application/modules/dev/forms/GroupAdd.php
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_GroupAdd extends Zend_Form {
- private $grouplist;
-
- public function setGrouplist($grouplist) {
- $this->grouplist = $grouplist;
-
- }
-
-
- public function init() {
- $this->setName("GroupAdd");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $this->addElement('text', 'description', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 140)),
- ),
- 'required' => false,
- 'label' => 'Description:',
- ));
-
- $groupfield = $this->createElement('select', 'superordinatedGroupID');
- $groupfield ->setLabel('superordinated Group:');
-
- $groupfield->addMultiOption('-1', '---- none ----');
-
- if(count($this->grouplist) > 0) {
- foreach($this->grouplist as $group => $g) {
- $groupfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $groupfield->setRegisterInArrayValidator(false);
- $this->addElement($groupfield);
-
- $this->addElement('submit', 'add', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Add',
- ));
-
- $this->addElement('button', 'cancel', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Cancel',
- 'onclick' => 'location.href="javascript:history.back();"',
- ));
- }
-
-
-}
-
diff --git a/application/modules/dev/forms/GroupEdit.php b/application/modules/dev/forms/GroupEdit.php
deleted file mode 100644
index 222d03a..0000000
--- a/application/modules/dev/forms/GroupEdit.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_GroupEdit extends Zend_Form {
-
-
- public function init() {
- $this->setName("GroupEdit");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- 'value' => $_POST['title'],
- ));
-
- $this->addElement('text', 'description', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 140)),
- ),
- 'required' => false,
- 'label' => 'Description:',
- 'value' => $_POST['description'],
- ));
-
- $this->addElement('submit', 'save', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Save',
- ));
-
- $this->addElement('button', 'cancel', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Cancel',
- 'onclick' => 'location.href="javascript:history.back();"',
- ));
- }
-
-
-}
-
diff --git a/application/modules/dev/forms/GroupLink.php b/application/modules/dev/forms/GroupLink.php
deleted file mode 100644
index 4ebfaa1..0000000
--- a/application/modules/dev/forms/GroupLink.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_GroupLink extends Zend_Form {
- private $grouplist;
-
- public function setGrouplist($grouplist) {
- $this->grouplist = $grouplist;
-
- }
-
- public function init() {
- $this->setName("GroupLink");
- $this->setMethod('post');
-
- $groupfield = $this->createElement('select', 'groupID');
- $groupfield ->setLabel('Group:');
-
- if(count($this->grouplist) > 0) {
- foreach($this->grouplist as $group => $g) {
- $groupfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $groupfield->setRegisterInArrayValidator(false);
- $this->addElement($groupfield);
-
- $groupfield1 = $this->createElement('select', 'superordinatedGroupID');
- $groupfield1 ->setLabel('superordinated Group:');
-
- if(count($this->grouplist) > 0) {
- foreach($this->grouplist as $group => $g) {
- $groupfield1->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $groupfield1->setRegisterInArrayValidator(false);
- $this->addElement($groupfield1);
-
- $this->addElement('submit', 'link', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Link',
- ));
-
- $this->addElement('button', 'cancel', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Cancel',
- 'onclick' => 'location.href="javascript:history.back();"',
- ));
- }
-
-
-}
-
diff --git a/application/modules/dev/forms/GroupRequest.php b/application/modules/dev/forms/GroupRequest.php
deleted file mode 100644
index 867cc0d..0000000
--- a/application/modules/dev/forms/GroupRequest.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_GroupRequest extends Zend_Form {
- private $grouplist;
-
- public function setGrouplist($grouplist) {
- $this->grouplist = $grouplist;
-
- }
-
- public function getGrouplist() {
- return $this->grouplist;
- }
-
- public function init() {
- $this->setName("GroupRequest");
- $this->setMethod('post');
-
- $groupfield = $this->createElement('select', 'groupID');
- $groupfield ->setLabel('Group:');
-
- if(count($this->grouplist) > 0) {
- foreach($this->grouplist as $group => $g) {
- $groupfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
-
- $groupfield->setRegisterInArrayValidator(false);
- $this->addElement($groupfield);
-
- $this->addElement('submit', 'request', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Request',
- ));
-
- }
-
-}
-
diff --git a/application/modules/dev/forms/GroupSelect.php b/application/modules/dev/forms/GroupSelect.php
deleted file mode 100644
index a2cf1e6..0000000
--- a/application/modules/dev/forms/GroupSelect.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_GroupSelect extends Zend_Form {
- private $grouplist;
-
- public function setGrouplist($grouplist) {
- $this->grouplist = $grouplist;
-
- }
-
- public function getGrouplist() {
- return $this->grouplist;
- }
-
- public function init() {
- $this->setName("GroupSelect");
- $this->setMethod('post');
-
- $groupfield = $this->createElement('select', 'groupID');
- $groupfield ->setLabel('Group:');
-
- if(count($this->grouplist) > 0) {
- foreach($this->grouplist as $group => $g) {
- $groupfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
-
- $groupfield->setRegisterInArrayValidator(false);
- $this->addElement($groupfield);
-
- $this->addElement('submit', 'selectgroup', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Select',
- ));
- }
-
-
-}
-
diff --git a/application/modules/dev/forms/LinkRight.php b/application/modules/dev/forms/LinkRight.php
deleted file mode 100644
index 4269bd8..0000000
--- a/application/modules/dev/forms/LinkRight.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_LinkRight extends Zend_Form {
- private $rightlist;
- private $roleID;
-
- public function setRightlist($rightlist) {
- $this->rightlist = $rightlist;
- }
-
- public function setRoleID($roleID) {
- $this->roleID = $roleID;
- }
-
- public function init() {
- $this->setName("LinkRight");
- $this->setMethod('post');
-
- $rightfield = $this->createElement('select', 'rightID');
- $rightfield ->setLabel('Right:');
-
- if(count($this->rightlist) > 0) {
- foreach($this->rightlist as $right => $r) {
- $rightfield->addMultiOption($r->getID(), $r->getTitle());
- }
- }
- $rightfield->setRegisterInArrayValidator(false);
- $this->addElement($rightfield);
-
- $this->addElement('submit', 'link', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Add',
- ));
-
- $this->addElement('button', 'cancel', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Cancel',
- 'onclick' => 'location.href="javascript:history.back();"',
- ));
- }
-
-
-}
-
diff --git a/application/modules/dev/forms/NewPassword.php b/application/modules/dev/forms/NewPassword.php
deleted file mode 100644
index 68304c4..0000000
--- a/application/modules/dev/forms/NewPassword.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_NewPassword extends Zend_Form {
- private $personID;
-
- public function setPersonID($personID) {
- $this->personID = $personID;
- }
-
- public function init() {
- $this->setName("NewPassword");
- $this->setMethod('post');
-
- $this->addElement('hidden', 'personID', array(
- 'value' => $this->personID
- ));
-
- $this->addElement('password', 'password', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Password:',
- ));
-
- $this->addElement('submit', 'savePassword', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Save',
- ));
- }
-
-
-} \ No newline at end of file
diff --git a/application/modules/dev/forms/PersonEdit.php b/application/modules/dev/forms/PersonEdit.php
deleted file mode 100644
index 4f81c29..0000000
--- a/application/modules/dev/forms/PersonEdit.php
+++ /dev/null
@@ -1,125 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_PersonEdit extends Zend_Form {
-
- public function init() {
- $this->setName("PersonEdit");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- 'value' => $this->getView()->person->getTitle(),
- ));
-
-
- $this->addElement('text', 'name', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Name:',
- 'value' => $this->getView()->person->getName(),
- ));
-
- $this->addElement('text', 'firstname', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Firstname:',
- 'value' => $this->getView()->person->getFirstname(),
- ));
-
- $this->addElement('text', 'street', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Street:',
- 'value' => $this->getView()->person->getStreet(),
- ));
-
- $this->addElement('text', 'housenumber', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Housenumber:',
- 'value' => $this->getView()->person->getHousenumber(),
- ));
-
- $this->addElement('text', 'city', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'City:',
- 'value' => $this->getView()->person->getCity(),
- ));
-
- $this->addElement('text', 'postalcode', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Postalcode:',
- 'value' => $this->getView()->person->getPostalcode(),
- ));
-
- $this->addElement('text', 'email', array(
- 'filters' => array('StringTrim', 'StringToLower'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Email:',
- 'value' => $this->getView()->person->getEmail(),
- ));
-
- $this->addElement('password', 'newpassword', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'Neues Password:',
- ));
-
- $this->addElement('submit', 'save', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Save',
- ));
-
- $this->addElement('button', 'cancel', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Cancel',
- 'onclick' => 'location.href="javascript:history.back();"',
- ));
- }
-
-
-}
-
diff --git a/application/modules/dev/forms/Pool.php b/application/modules/dev/forms/Pool.php
deleted file mode 100644
index dd6e170..0000000
--- a/application/modules/dev/forms/Pool.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_Pool extends Zend_Form {
-
- public function init() {
- $this->setName("pool");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
- $this->addElement('textarea', 'description', array(
- 'filters' => array('StringTrim'),
- 'required' => false,
- 'label' => 'Description:',
- ));
- // TODO: Add target of Filter
-
- $this->addElement('text', 'location', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Location:',
- ));
-
- $this->addElement('submit', 'add', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => $this->buttontext,
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/pool"'
- ));
- }
- private $buttontext = 'Save';
- function setButtontext($v) {
- $this->buttontext = $v;
- }
-
-
-}
-
diff --git a/application/modules/dev/forms/PoolClient.php b/application/modules/dev/forms/PoolClient.php
deleted file mode 100644
index 0a87280..0000000
--- a/application/modules/dev/forms/PoolClient.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_PoolClient extends Zend_Form {
- private $clients;
-
- public function init() {
- $this->setName("addClientToPool");
- $this->setMethod('post');
-
- $clientfield = $this->createElement('select', 'clientID');
- $clientfield ->setLabel('Client:');
- print_a($this->clients);
- foreach($this->clients as $c) {
- $clientfield->addMultiOption($c['clientID'], $c['macadress']." - ".$c['hardwarehash']);
- }
- $this->addElement($clientfield);
-
- $this->addElement('submit', 'add', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Save',
- ));
- }
- public function setClients($clients) {
- $this->clients = $clients;
- return $this;
- }
-
-}
-
diff --git a/application/modules/dev/forms/PrebootCreate.php b/application/modules/dev/forms/PrebootCreate.php
deleted file mode 100644
index 8aa6063..0000000
--- a/application/modules/dev/forms/PrebootCreate.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_PrebootCreate extends Zend_Form {
-
- private $grouplist;
-
- public function setGrouplist($grouplist) {
- $this->grouplist = $grouplist;
-
- }
-
- public function init() {
- $this->setName("PreBootCreate");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $groupfield = $this->createElement('select', 'groupID');
- $groupfield ->setLabel('Group:');
-
- if(count($this->grouplist) > 0) {
- foreach($this->grouplist as $group => $g) {
- $groupfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $groupfield->setRegisterInArrayValidator(false);
- $this->addElement($groupfield);
-
- $this->addElement('text', 'path_preboot', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 240)),
- ),
- 'required' => true,
- 'size' => 50,
- 'label' => 'Path to Preboot:',
- ));
-
- $this->addElement('submit', 'createpreboot', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Create Preboot',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/dev/preboot"'
- ));
-
- }
-
-
-}
-
diff --git a/application/modules/dev/forms/PrebootEdit.php b/application/modules/dev/forms/PrebootEdit.php
deleted file mode 100644
index cb9e622..0000000
--- a/application/modules/dev/forms/PrebootEdit.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_PrebootEdit extends Zend_Form {
- private $grouplist;
-
- public function setGrouplist($grouplist) {
- $this->grouplist = $grouplist;
-
- }
-
- public function init() {
- $this->setName("PreBootEdit");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $groupfield = $this->createElement('select', 'groupID');
- $groupfield ->setLabel('Group:');
-
- if(count($this->grouplist) > 0) {
- foreach($this->grouplist as $group => $g) {
- $groupfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $groupfield->setRegisterInArrayValidator(false);
- $this->addElement($groupfield);
-
- $this->addElement('text', 'path_preboot', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 240)),
- ),
- 'required' => true,
- 'size' => 50,
- 'label' => 'Path to Preboot:',
- ));
-
- $this->addElement('submit', 'editpreboot', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Edit Preboot',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/dev/preboot"'
- ));
-
- }
-}
-
diff --git a/application/modules/dev/forms/RoleAdd.php b/application/modules/dev/forms/RoleAdd.php
deleted file mode 100644
index 36badf2..0000000
--- a/application/modules/dev/forms/RoleAdd.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_RoleAdd extends Zend_Form {
- private $rightlist;
-
- public function setRightlist($rightlist) {
- $this->rightlist = $rightlist;
- }
-
- public function init() {
- $this->setName("RoleAdd");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $this->addElement('text', 'description', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 140)),
- ),
- 'required' => false,
- 'label' => 'Description:',
- ));
-
- $this->addElement('checkbox', 'inheritance', array(
- 'label' => 'Inheritance:',
- ));
-
- $this->addElement('submit', 'add', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Add',
- ));
-
- $this->addElement('button', 'cancel', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Cancel',
- 'onclick' => 'location.href="javascript:history.back();"',
- ));
- }
-
-
-}
-
diff --git a/application/modules/dev/forms/RoleEdit.php b/application/modules/dev/forms/RoleEdit.php
deleted file mode 100644
index 9020967..0000000
--- a/application/modules/dev/forms/RoleEdit.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_RoleEdit extends Zend_Form {
-
- public function init() {
- $this->setName("RoleEdit");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- 'value' => $_POST['title'],
- ));
-
- $this->addElement('text', 'description', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 140)),
- ),
- 'required' => false,
- 'label' => 'Description:',
- 'value' => $_POST['description'],
- ));
-
- if($_POST['inheritance'] == 1) {
- $this->addElement('checkbox', 'inheritance', array(
- 'label' => 'Inheritance:',
- 'checked' => 'checked',
- ));
- } else {
- $this->addElement('checkbox', 'inheritance', array(
- 'label' => 'Inheritance:',
- ));
- }
-
- $this->addElement('hidden', 'groupID', array(
- 'value' => $_POST['groupID'],
- ));
-
- $this->addElement('submit', 'save', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Save',
- ));
-
- $this->addElement('button', 'cancel', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Cancel',
- 'onclick' => 'location.href="javascript:history.back();"',
- ));
- }
-
-
-}
-
diff --git a/application/modules/dev/forms/Session.php b/application/modules/dev/forms/Session.php
deleted file mode 100644
index 88b45ab..0000000
--- a/application/modules/dev/forms/Session.php
+++ /dev/null
@@ -1,147 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
-* This program is free software distributed under the GPL version 2.
-* See http://gpl.openslx.org/
-*
-* If you have any feedback please consult http://feedback.openslx.org/ and
-* send your suggestions, praise, or complaints to feedback@openslx.org
-*
-* General information about OpenSLX can be found at http://openslx.org/
-*/
-
-class dev_Form_Session extends Zend_Form {
-
- private $clients;
- private $bootos;
- private $bootisos;
- private $bootmenuentries;
- private $memberships;
-
- public function init() {
- $this->setName("session");
- $this->setMethod('post');
-
- $this->addElement('text', 'alphasessionID', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 16)),
- ),
- 'required' => false,
- 'label' => 'alphasessionID:',
- ));
-
- $clientfield = $this->createElement('select', 'clientID');
- $clientfield ->setLabel('Client:');
- $clientfield->addMultiOption('', '');
- if(count($this->clients) > 0) {
- foreach($this->clients as $id => $g) {
- $clientfield->addMultiOption($g->getID(), $g->getMacadress());
- }
- }
- $clientfield->setRegisterInArrayValidator(false);
- $this->addElement($clientfield);
-
-
- $bootmenuentrieyfield = $this->createElement('select', 'bootmenuentryID');
- $bootmenuentrieyfield->setLabel('BootmenuentryID:');
- $bootmenuentrieyfield->addMultiOption('', '');
- if(count($this->bootmenuentries) > 0) {
- foreach($this->bootmenuentries as $id => $g) {
- $bootmenuentrieyfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $bootmenuentrieyfield->setRegisterInArrayValidator(false);
- $this->addElement($bootmenuentrieyfield);
-
-
- $bootosfield = $this->createElement('select', 'bootosID');
- $bootosfield ->setLabel('BootOs:');
- $bootosfield->addMultiOption('', '');
- if(count($this->bootos) > 0) {
- foreach($this->bootos as $id => $g) {
- $bootosfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $bootosfield->setRegisterInArrayValidator(false);
- $this->addElement($bootosfield);
-
- $bootisofield = $this->createElement('select', 'bootisoID');
- $bootisofield ->setLabel('BootIso:');
- if(count($this->bootisos) > 0) {
- foreach($this->bootisos as $id => $g) {
- $bootisofield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $bootisofield->setRegisterInArrayValidator(false);
- $this->addElement($bootisofield);
-
- $membershipfield = $this->createElement('select', 'membershipID');
- $membershipfield ->setLabel('Membership:');
- $membershipfield ->addMultiOption('', '');
- if(count($this->memberships) > 0) {
- foreach($this->memberships as $id => $g) {
- $membershipfield->addMultiOption($g->getID(), $g->getPersonID());
- }
- }
- $membershipfield->setRegisterInArrayValidator(false);
- $this->addElement($membershipfield);
-
- $this->addElement('text', 'time', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'time:',
- ));
- $this->addElement('text', 'ip', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'ip:',
- ));
- $this->addElement('text', 'ip6', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'ip6:',
- ));
-
- $this->addElement('submit', 'add', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => $this->buttontext,
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/session"'
- ));
- }
- function setClients($v) {
- $this->clients = $v;
- }
- function setBootos($v) {
- $this->bootos = $v;
- }
- function setBootisos($v) {
- $this->bootisos = $v;
- }
- function setBootmenuentries($v) {
- $this->bootmenuentries = $v;
- }
- function setMemberships($v) {
- $this->memberships = $v;
- }
- private $buttontext = 'Save';
- function setButtontext($v) {
- $this->buttontext = $v;
- }
-
-
-}
-
diff --git a/application/modules/dev/layouts/dev.phtml b/application/modules/dev/layouts/dev.phtml
deleted file mode 100644
index 944c617..0000000
--- a/application/modules/dev/layouts/dev.phtml
+++ /dev/null
@@ -1,99 +0,0 @@
-<?php echo $this->doctype(); ?>
-
-<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de">
-<head>
-
-<?php
-$request = Zend_Controller_Front::getInstance()->getRequest();
-$this->headTitle()->append(ucwords($request->getControllerName()));
-$this->headTitle()->append(ucwords($request->getActionName()));
-echo $this->headTitle()."\n";
-echo $this->headMeta()."\n";
-echo $this->headStyle()."\n";
-echo $this->headLink()."\n";
-echo $this->headScript()."\n";
-?>
-<script src='/media/js/jquery.min.js'></script>
-<script src='/media/js/jquery-ui.min.js'></script>
-<script src='/media/js/script.js'></script>
-</head>
-<body>
-<div id='sidepannel'>
- <div id="logo"><div id="logo-bar-gray"></div></div>
- <div id="sidepannel-top" class='portletNavigationTree'>
- <ul class='navTreeLevel0'>
- <li class='navTreeItem'><a href='/'><<</a></li>
- <li class='navTreeItem'><a href='/dev/'>dev</a></li>
- <li>
- <ul class='navTreeLevel1'>
- <li class='navTreeItem'><a href='/dev/person'>Person</a></li>
- <li class='navTreeItem'><a href='/dev/group'>Group</a></li>
- <li class='navTreeItem'><a href='/dev/role'>Role</a></li>
- <li class='navTreeItem'><a href='/dev/bootiso'>BootIso</a></li>
- <li class='navTreeItem'><a href='/dev/preboot'>Preboot</a></li>
- <li class='navTreeItem'><a href='/dev/bootmenu'>BootMenu</a></li>
- <li class='navTreeItem'><a href='/dev/config'>Config</a></li>
- <li class='navTreeItem'><a href='/dev/bootos'>BootOs</a></li>
- <li class='navTreeItem'><a href='/dev/client'>Client</a></li>
- <li class='navTreeItem'><a href='/dev/filter'>Filter</a></li>
- <li class='navTreeItem'><a href='/dev/pool'>Pool</a></li>
- <li class='navTreeItem'><a href='/dev/session'>Session</a></li>
- <?php if (!Zend_Auth::getInstance()->hasIdentity()) {?>
- <li class='navTreeItem'><a href='/dev/auth/login'>Login</a></li>
- <li class='navTreeItem'><a href='/dev/auth/register'>Register</a></li>
- <?php
- } else {?>
- <li class='navTreeItem'><a href='/dev/auth/delete'>Delete Account</a></li>
- <li class='navTreeItem'><a href='/dev/auth/logout'>Logout</a></li>
- <?php
- }
- ?>
- </ul>
- </li>
-
- </ul>
- </div>
-</div>
-<div id='main'>
- <div id="head-bg">
- <div id="head">
- <h1>pbs<sup>2</sup></h1>
- <h2>Rechenzentrum Universit&auml;t Freiburg</h2>
- </div>
- </div>
- <div id="logo-bar-red"></div>
- <div id="head-titlebar">
- <?php
- echo ucwords($request->getControllerName()) . " > " . ucwords($request->getActionName());
- ?>
- </div>
- <div id="content">
- <?php echo $this->layout()->content; ?>
- </div>
-
- <div id="footer" class="footer flexbox flex">
- <div style='padding:5px;'>
- <a onclick="$('#debug .v1').toggle();$('#debug .v2').toggle();">display Debug</a> //
- <i>last edit: <?php echo date("m\/Y",filectime('index.php'));?></i> //
- <i>version: 0.1.1</i>
- </div>
- </div>
-</div>
-
-<div id='debug'>
- <div class='v1'>
- <a onclick="$('#debug .v1').toggle();$('#debug .v2').toggle();">
- <img src='/media/img/down.png' />
- </a>
- </div>
- <div class='v2' style='display:none;'>
- <div style='text-align:right;'>
- <a onclick="$('#debug .v1').toggle();$('#debug .v2').toggle();">
- <img src='/media/img/up.png' />
- </a>
- </div>
- <?php print_a('Session',$_SESSION,'GET',$_GET,'POST',$_POST); ?>
- </div>
-</div>
-</body>
-</html>
diff --git a/application/modules/dev/views/scripts/auth/delete.phtml b/application/modules/dev/views/scripts/auth/delete.phtml
deleted file mode 100644
index 62bf24e..0000000
--- a/application/modules/dev/views/scripts/auth/delete.phtml
+++ /dev/null
@@ -1,6 +0,0 @@
-<h1>Delete Account</h1>
-Do you really want to delete this account?
-<?php
-$this->deleteconfirmform->setAction($this->url());
-echo $this->deleteconfirmform;
-?> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/auth/login.phtml b/application/modules/dev/views/scripts/auth/login.phtml
deleted file mode 100644
index e22bd0b..0000000
--- a/application/modules/dev/views/scripts/auth/login.phtml
+++ /dev/null
@@ -1,6 +0,0 @@
-<h1>Login</h1>
-<?php
-$this->loginForm->setAction($this->url());
-echo $this->loginForm;
-?>
-<div><button onclick="location.href='/dev/auth/recoverpassword'">Recover Password</button></div>
diff --git a/application/modules/dev/views/scripts/auth/recoverpassword.phtml b/application/modules/dev/views/scripts/auth/recoverpassword.phtml
deleted file mode 100644
index 089aec3..0000000
--- a/application/modules/dev/views/scripts/auth/recoverpassword.phtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<h1>Recover Password</h1>
-<?php
-$this->recoverPasswordForm->setAction($this->url());
-echo $this->recoverPasswordForm;
-?>
diff --git a/application/modules/dev/views/scripts/auth/register.phtml b/application/modules/dev/views/scripts/auth/register.phtml
deleted file mode 100644
index 74c7df5..0000000
--- a/application/modules/dev/views/scripts/auth/register.phtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<h1>New Account</h1>
-<?php
-$this->registerForm->setAction($this->url());
-echo $this->registerForm;
-?>
diff --git a/application/modules/dev/views/scripts/bootiso/createbootiso.phtml b/application/modules/dev/views/scripts/bootiso/createbootiso.phtml
deleted file mode 100644
index a5ad609..0000000
--- a/application/modules/dev/views/scripts/bootiso/createbootiso.phtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-$this->createbootisoForm->setAction($this->url());
-echo $this->createbootisoForm;
-?>
diff --git a/application/modules/dev/views/scripts/bootiso/editbootiso.phtml b/application/modules/dev/views/scripts/bootiso/editbootiso.phtml
deleted file mode 100644
index 9b04c95..0000000
--- a/application/modules/dev/views/scripts/bootiso/editbootiso.phtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-$this->editbootisoForm->setAction($this->url());
-echo $this->editbootisoForm;
-?>
diff --git a/application/modules/dev/views/scripts/bootiso/index.phtml b/application/modules/dev/views/scripts/bootiso/index.phtml
deleted file mode 100644
index ada36d6..0000000
--- a/application/modules/dev/views/scripts/bootiso/index.phtml
+++ /dev/null
@@ -1,66 +0,0 @@
-<h1>BootMedien</h1>
-<?php echo $this->formButton('createbootiso', 'Create BootISO', array(
- 'onclick' => 'self.location="/dev/bootiso/createbootiso"',
- 'class' => 'addbutton'))?>
-<table>
- <tr>
- <th>ID</th>
- <th>Title</th>
- <th>GroupID</th>
- <th>MembershipID</th>
- <th>PrebootID</th>
- <th>Serialnumber</th>
- <th>Created</th>
- <th>Expires</th>
- <th>Public</th>
- <th colspan=3>Actions</th>
- </tr>
- <?php if(count($this->bootisolist)==0)
- echo "</table> There are no BootISO's entries to display." ?>
- <?php foreach ($this->bootisolist as $bootiso): ?>
- <tr class=entry>
- <td><?php echo $this->escape($bootiso->getID()); ?></td>
- <td><?php echo $this->escape($bootiso->getTitle()); ?></td>
- <td><?php echo $this->escape($bootiso->getGroupID()); ?></td>
- <td><?php echo $this->escape($bootiso->getMembershipID()); ?></td>
- <td><?php echo "[" . $this->escape($bootiso->getPrebootID()) . "] " . $this->prebootlist[$bootiso->getID()]; ?></td>
- <td><?php echo $this->escape($bootiso->getSerialnumber()); ?></td>
- <td><?php echo $this->escape(date('Y-m-d H:i:s', $bootiso->getCreated())); ?></td>
- <td><?php echo $this->escape($bootiso->getExpires()); ?></td>
- <td><?php echo $this->escape($bootiso->getPublic()); ?></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'bootiso',
- 'action' => 'downloadbootiso',
- 'prebootID' => $bootiso->getprebootID(),
- 'bootisoID' => $bootiso->getID()
- ),
- 'default',
- true, false) ?>"><img src='/media/img/download.png' alt='Download BootMedium' /></a></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'bootiso',
- 'action' => 'editbootiso',
- 'bootisoID' => $bootiso->getID()
- ),
- 'default',
- true, false) ?>"><img src='/media/img/edit.png' alt='Edit BootISO' /></a></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'bootiso',
- 'action' => 'deletebootiso',
- 'bootisoID' => $bootiso->getID()
- ),
- 'default',
- true) ?>"><img src='/media/img/delete.png' alt='Delete BootISO'/></a></td>
- </tr>
- <?php endforeach; ?>
-</table>
-
-
-
-
-
diff --git a/application/modules/dev/views/scripts/bootmenu/addbootmenuentry.phtml b/application/modules/dev/views/scripts/bootmenu/addbootmenuentry.phtml
deleted file mode 100644
index 914cc9c..0000000
--- a/application/modules/dev/views/scripts/bootmenu/addbootmenuentry.phtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-$this->addbootmenuentryForm->setAction($this->url());
-echo $this->addbootmenuentryForm;
-?> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/bootmenu/createbootmenu.phtml b/application/modules/dev/views/scripts/bootmenu/createbootmenu.phtml
deleted file mode 100644
index 2d2c2df..0000000
--- a/application/modules/dev/views/scripts/bootmenu/createbootmenu.phtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-$this->createbootmenuForm->setAction($this->url());
-echo $this->createbootmenuForm;
-?>
diff --git a/application/modules/dev/views/scripts/bootmenu/editbootmenu.phtml b/application/modules/dev/views/scripts/bootmenu/editbootmenu.phtml
deleted file mode 100644
index b7adc4a..0000000
--- a/application/modules/dev/views/scripts/bootmenu/editbootmenu.phtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-$this->editbootmenuForm->setAction($this->url());
-echo $this->editbootmenuForm;
-?>
diff --git a/application/modules/dev/views/scripts/bootmenu/editbootmenuentry.phtml b/application/modules/dev/views/scripts/bootmenu/editbootmenuentry.phtml
deleted file mode 100644
index 5680d65..0000000
--- a/application/modules/dev/views/scripts/bootmenu/editbootmenuentry.phtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-$this->editbootmenuentryForm->setAction($this->url());
-echo $this->editbootmenuentryForm;
-?> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/bootmenu/index.phtml b/application/modules/dev/views/scripts/bootmenu/index.phtml
deleted file mode 100644
index 3eb3b0c..0000000
--- a/application/modules/dev/views/scripts/bootmenu/index.phtml
+++ /dev/null
@@ -1,134 +0,0 @@
-<h1>BootMenu</h1>
-<?php echo $this->formButton('createbootmenu', 'Create BootMenu', array(
- 'onclick' => 'self.location="/dev/bootmenu/createbootmenu"',
- 'class' => 'addbutton'))?>
-
-
-<table>
- <tr>
- <th>ID</th>
- <th>Title</th>
- <th>GroupID</th>
- <th>MembershipID</th>
- <th>Changed</th>
- <th colspan=3>Actions</th>
- </tr>
- <?php if(count($this->bootmenulist)==0)
- echo "</table> There are no BootMenus to display." ?>
- <?php foreach ($this->bootmenulist as $bootmenu): ?>
- <tr class=entry>
- <td><?php echo $this->escape($bootmenu->getID()); ?></td>
- <td><?php echo $this->escape($bootmenu->getTitle()); ?></td>
- <td><?php echo $this->escape($bootmenu->getGroupID()); ?></td>
- <td><?php echo $this->escape($bootmenu->getMembershipID()); ?></td>
- <td><?php echo $this->escape(date('Y-m-d H:i:s', $bootmenu->getCreated())); ?></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'bootmenu',
- 'action' => 'editbootmenu',
- 'bootmenuID' => $bootmenu->getID()
- ),
- 'default',
- true, false) ?>"><img src='/media/img/edit.png' alt='Edit Bootmenu'/></a></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'bootmenu',
- 'action' => 'deletebootmenu',
- 'bootmenuID' => $bootmenu->getID()
- ),
- 'default',
- true) ?>"><img src='/media/img/delete.png' alt='Delete Bootmenu'/></a></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'bootmenu',
- 'action' => 'addbootmenuentry',
- 'bootmenuID' => $bootmenu->getID(),
- 'maxorder' => count($this->bootmenuentrylist[$bootmenu->getID()])
- ),
- 'default',
- true) ?>"><img src='/media/img/add.png' alt='Add Entry'/></a></td>
- </tr>
-
-<?php if(count($this->bootmenuentrylist[$bootmenu->getID()]) > 0):?>
- <tr class=detail>
- <td class=arrowtop>↳</td>
- <td colspan=7>
- <table>
- <tr>
- <th></th>
- <th>ID</th>
- <th>Title</th>
-<!-- <th>BootmenuID</th>-->
- <th>BootOS</th>
- <th>kcl</th>
- <th>kclappend</th>
- <th>Config</th>
- <th>Position</th>
- <th colspan=2>Actions</th>
-
- </tr>
- <?php foreach ($this->bootmenuentrylist[$bootmenu->getID()] as $bootmenuentry): ?>
- <?php $bootos = $this->bootosmapper->find($bootmenuentry->getBootosID());?>
- <?php $config = $this->configmapper->find($bootmenuentry->getConfigID());?>
- <tr>
- <td class='action'>
- <a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'resource',
- 'action' => 'getbootmenuentry',
- 'bootmenuentryID' => $bootmenuentry->getID(),
- 'bootosID' => $bootmenuentry->getBootosID(),
- 'alpha' => $_SESSION['alphasessionID']
- ),
- 'default',
- true, false) ?>"><img src='/media/img/play.gif'>
- </a>
- </td>
- <td><?php echo $this->escape($bootmenuentry->getID()); ?></td>
- <td><?php echo $this->escape($bootmenuentry->getTitle()); ?></td>
- <!--<td><?php echo $this->escape($bootmenuentry->getBootmenuID()); ?></td>
- --><td><?php echo "[".$this->escape($bootmenuentry->getBootosID())."] ". $bootos->getTitle(); ?></td>
- <td><?php echo $this->escape($bootmenuentry->getKcl()); ?></td>
- <td><?php echo $this->escape($bootmenuentry->getKclappend()); ?></td>
- <td><?php echo "[".$this->escape($bootmenuentry->getConfigID())."] ". $config->getTitle(); ?></td>
- <td><?php echo $this->escape($bootmenuentry->getOrder() + 1); ?></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'bootmenu',
- 'action' => 'editbootmenuentry',
- 'bootmenuentryID' => $bootmenuentry->getID(),
- 'bootmenuID' => $bootmenu->getID(),
- 'maxorder' => count($this->bootmenuentrylist[$bootmenu->getID()]),
- 'oldorder' => $bootmenuentry->getOrder()
- ),
- 'default',
- true, false) ?>"><img src='/media/img/edit.png' alt='Edit Entry'/></a></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'bootmenu',
- 'action' => 'removebootmenuentry',
- 'bootmenuentryID' => $bootmenuentry->getID()
- ),
- 'default',
- true) ?>"><img src='/media/img/delete.png' alt='Remove Entry'/></a></td>
- </tr>
- <?php endforeach; ?>
- </table>
- </td>
- </tr>
- <?php endif; ?>
- <?php endforeach; ?>
-</table>
-
-
-
-
-
-
-
diff --git a/application/modules/dev/views/scripts/bootos/createbootos.phtml b/application/modules/dev/views/scripts/bootos/createbootos.phtml
deleted file mode 100644
index 3d35695..0000000
--- a/application/modules/dev/views/scripts/bootos/createbootos.phtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-$this->createbootosForm->setAction($this->url());
-echo $this->createbootosForm;
-?>
diff --git a/application/modules/dev/views/scripts/bootos/editbootos.phtml b/application/modules/dev/views/scripts/bootos/editbootos.phtml
deleted file mode 100644
index 43813de..0000000
--- a/application/modules/dev/views/scripts/bootos/editbootos.phtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-$this->editbootosForm->setAction($this->url());
-echo $this->editbootosForm;
-?>
diff --git a/application/modules/dev/views/scripts/bootos/index.phtml b/application/modules/dev/views/scripts/bootos/index.phtml
deleted file mode 100644
index 2f7f86f..0000000
--- a/application/modules/dev/views/scripts/bootos/index.phtml
+++ /dev/null
@@ -1,80 +0,0 @@
-<h1>BootOS</h1>
-<?php echo $this->formButton('createbootos', 'Create BootOS', array(
- 'onclick' => 'self.location="/dev/bootos/createbootos"',
- 'class' => 'addbutton'))?>
-
-<table>
- <tr>
- <th>ID</th>
- <th>Title</th>
- <th>GroupID</th>
- <th>MembershipID</th>
- <th>ConfigID</th>
- <th>Init</th>
- <th>Kernel</th>
- <th>Kcl</th>
- <th>Description</th>
- <th>Changed</th>
- <th>Expires</th>
- <th>Public</th>
- <th colspan=3>Actions</th>
- </tr>
- <?php if(count($this->bootoslist)==0)
- echo "</table> There are no BootOs's to display." ?>
- <?php foreach ($this->bootoslist as $bootos): ?>
- <tr class=entry>
- <td><?php echo $this->escape($bootos->getID()); ?></td>
- <td><?php echo $this->escape($bootos->getTitle()); ?></td>
- <td><?php echo $this->escape($bootos->getGroupID()); ?></td>
- <td><?php echo $this->escape($bootos->getMembershipID()); ?></td>
- <td><?php echo $this->escape($bootos->getConfigID()); ?></td>
- <td><?php echo $this->escape($bootos->getPath_init()); ?></td>
- <td><?php echo $this->escape($bootos->getPath_kernel()); ?></td>
- <td><?php echo $this->escape($bootos->getDefaultkcl()); ?></td>
- <td><?php echo $this->escape($bootos->getDescription()); ?></td>
- <td><?php echo $this->escape(date('Y-m-d H:i:s', $bootos->getCreated())); ?></td>
- <td><?php echo $this->escape($bootos->getExpires()); ?></td>
- <td><?php echo $this->escape($bootos->getPublic()); ?></td>
- <?php if($this->update[$bootos->getID()]==true): ?>
- <td class='action'><a
- href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'bootos',
- 'action' => 'updatebootos',
- 'bootosID' => $bootos->getID()
- ),
- 'default',
- true, false) ?>"><img src='/media/img/update.png' alt='Updates available' /></a></td>
- <?php else: ?>
- <td class='action'><img src='/media/img/update_grey.png' alt='No updates available' /></td>
- <?php endif; ?>
- <td class='action'><a
- href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'bootos',
- 'action' => 'editbootos',
- 'bootosID' => $bootos->getID()
- ),
- 'default',
- true, false) ?>"><img src='/media/img/edit.png' alt='Edit BootOS' /></a></td>
- <td class='action'><a
- href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'bootos',
- 'action' => 'deletebootos',
- 'bootosID' => $bootos->getID()
- ),
- 'default',
- true) ?>"><img src='/media/img/delete.png' alt='Delete BootOS' /></a></td>
- </tr>
- <?php endforeach; ?>
-</table>
-
-
-
-
-
-
diff --git a/application/modules/dev/views/scripts/client/addclient.phtml b/application/modules/dev/views/scripts/client/addclient.phtml
deleted file mode 100644
index e5b0bcf..0000000
--- a/application/modules/dev/views/scripts/client/addclient.phtml
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-
-echo $this->addclient;
diff --git a/application/modules/dev/views/scripts/client/editclient.phtml b/application/modules/dev/views/scripts/client/editclient.phtml
deleted file mode 100644
index 94d6b34..0000000
--- a/application/modules/dev/views/scripts/client/editclient.phtml
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-
-echo $this->editclient;
diff --git a/application/modules/dev/views/scripts/client/index.phtml b/application/modules/dev/views/scripts/client/index.phtml
deleted file mode 100644
index 612e23b..0000000
--- a/application/modules/dev/views/scripts/client/index.phtml
+++ /dev/null
@@ -1,48 +0,0 @@
-<h1>Clients</h1>
-<?php echo $this->formButton('createbootos', 'Create Client', array(
- 'onclick' => 'self.location="/dev/client/addclient"',
- 'class' => 'addbutton'))?>
-
-<?php if ($this->clients): ?>
- <table>
- <tr>
- <th>ID</th>
- <th>GroupID</th>
- <th>MAC</th>
- <th>Hardwarehash</th>
- <th colspan=2>Actions</th>
- </tr>
- <?php foreach ($this->clients as $client): ?>
- <tr class=entry>
- <td><?php echo $this->escape($client->getID()) ?></td>
- <td><?php echo $this->escape($client->getGroupID()) ?></td>
- <td class='monospace'><?php echo $this->escape($client->getMacadress()) ?></td>
- <td class='monospace'><?php echo $this->escape($client->getHardwarehash()) ?></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'client',
- 'action' => 'editclient',
- 'clientID' => $client->getID()
- ),
- 'default',
- true) ?>"><img src='/media/img/edit.png' alt='Edit Client'/></a></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'client',
- 'action' => 'removeclient',
- 'clientID' => $client->getID()
- ),
- 'default',
- true) ?>"><img src='/media/img/delete.png' alt='Delete Client'/></a></td>
- </tr>
- <?php endforeach ?>
- </table>
-
-<?php else: ?>
-
-
- <p>There are no clients to display.</p>
-
-<?php endif;?>
diff --git a/application/modules/dev/views/scripts/client/removeclient.phtml b/application/modules/dev/views/scripts/client/removeclient.phtml
deleted file mode 100644
index 7b5f64f..0000000
--- a/application/modules/dev/views/scripts/client/removeclient.phtml
+++ /dev/null
@@ -1 +0,0 @@
-<br /><br /><center>View script for controller <b>Client</b> and script/action name <b>deleteclient</b></center> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/config/createconfig.phtml b/application/modules/dev/views/scripts/config/createconfig.phtml
deleted file mode 100644
index e6edf7b..0000000
--- a/application/modules/dev/views/scripts/config/createconfig.phtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-$this->createconfigForm->setAction($this->url());
-echo $this->createconfigForm;
-?>
diff --git a/application/modules/dev/views/scripts/config/editconfig.phtml b/application/modules/dev/views/scripts/config/editconfig.phtml
deleted file mode 100644
index 4971f2e..0000000
--- a/application/modules/dev/views/scripts/config/editconfig.phtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-$this->editconfigForm->setAction($this->url());
-echo $this->editconfigForm;
-?>
diff --git a/application/modules/dev/views/scripts/config/index.phtml b/application/modules/dev/views/scripts/config/index.phtml
deleted file mode 100644
index 2191f6a..0000000
--- a/application/modules/dev/views/scripts/config/index.phtml
+++ /dev/null
@@ -1,52 +0,0 @@
-<h1>Config</h1>
-<?php echo $this->formButton('createconfig', 'Create Config', array(
- 'onclick' => 'self.location="/dev/config/createconfig"',
- 'class' => 'addbutton'))?>
-
-<table>
- <tr>
- <th>ID</th>
- <th>Title</th>
- <th>GroupID</th>
- <th>MembershipID</th>
- <th>Shellscript</th>
- <th>Changed</th>
- <th colspan=2>Actions</th>
- </tr>
- <?php if(count($this->configlist)==0)
- echo "</table> There are no Config's to display." ?>
- <?php foreach ($this->configlist as $config): ?>
- <tr class=entry>
- <td><?php echo $this->escape($config->getID()); ?></td>
- <td><?php echo $this->escape($config->getTitle()); ?></td>
- <td><?php echo $this->escape($config->getGroupID()); ?></td>
- <td><?php echo $this->escape($config->getMembershipID()); ?></td>
- <td><?php echo $this->escape($config->getShellscript()); ?></td>
- <td><?php echo $this->escape(date('Y-m-d H:i:s', $config->getCreated())); ?></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'config',
- 'action' => 'editconfig',
- 'configID' => $config->getID()
- ),
- 'default',
- true, false) ?>"><img src='/media/img/edit.png' alt='Edit Config'/></a></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'config',
- 'action' => 'deleteconfig',
- 'configID' => $config->getID()
- ),
- 'default',
- true) ?>"><img src='/media/img/delete.png' alt='Delete Config'/></a></td>
- </tr>
- <?php endforeach; ?>
-</table>
-
-
-
-
-
-
diff --git a/application/modules/dev/views/scripts/error/error.phtml b/application/modules/dev/views/scripts/error/error.phtml
deleted file mode 100644
index 1997506..0000000
--- a/application/modules/dev/views/scripts/error/error.phtml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Zend Framework Default Application</title>
-</head>
-<body>
- <h1>An error occurred</h1>
- <h2><?php echo $this->message ?></h2>
-
- <?php if (isset($this->exception)): ?>
-
- <h3>Exception information:</h3>
- <p>
- <b>Message:</b> <?php echo $this->exception->getMessage() ?>
- </p>
-
- <h3>Stack trace:</h3>
- <pre><?php echo $this->exception->getTraceAsString() ?>
- </pre>
-
- <h3>Request Parameters:</h3>
- <pre><?php echo var_export($this->request->getParams(), true) ?>
- </pre>
- <?php endif ?>
-
-</body>
-</html>
diff --git a/application/modules/dev/views/scripts/filter/addfilter.phtml b/application/modules/dev/views/scripts/filter/addfilter.phtml
deleted file mode 100644
index 40b4ccf..0000000
--- a/application/modules/dev/views/scripts/filter/addfilter.phtml
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-#$this->addfilterform->setAction($this->url());
-echo $this->addfilterform;
diff --git a/application/modules/dev/views/scripts/filter/addfilterentry.phtml b/application/modules/dev/views/scripts/filter/addfilterentry.phtml
deleted file mode 100644
index 8bf501a..0000000
--- a/application/modules/dev/views/scripts/filter/addfilterentry.phtml
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-$this->editfilterform->setAction($this->url());
-echo $this->editfilterform;
diff --git a/application/modules/dev/views/scripts/filter/editfilter.phtml b/application/modules/dev/views/scripts/filter/editfilter.phtml
deleted file mode 100644
index 8bc38f7..0000000
--- a/application/modules/dev/views/scripts/filter/editfilter.phtml
+++ /dev/null
@@ -1,8 +0,0 @@
-<h1>Edit Filter</h1>
-<?php
-
-$this->editfilterform->setAction($this->url());
-echo $this->editfilterform;
-
-
-?>
diff --git a/application/modules/dev/views/scripts/filter/editfilterentry.phtml b/application/modules/dev/views/scripts/filter/editfilterentry.phtml
deleted file mode 100644
index 038f16a..0000000
--- a/application/modules/dev/views/scripts/filter/editfilterentry.phtml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?php
-echo $this->editfilterform;
diff --git a/application/modules/dev/views/scripts/filter/evaluate.phtml b/application/modules/dev/views/scripts/filter/evaluate.phtml
deleted file mode 100644
index e69de29..0000000
--- a/application/modules/dev/views/scripts/filter/evaluate.phtml
+++ /dev/null
diff --git a/application/modules/dev/views/scripts/filter/index.phtml b/application/modules/dev/views/scripts/filter/index.phtml
deleted file mode 100644
index fd46cd7..0000000
--- a/application/modules/dev/views/scripts/filter/index.phtml
+++ /dev/null
@@ -1,122 +0,0 @@
-<h1>Filters</h1>
-<?php echo $this->formButton('createconfig', 'Create Filter', array(
- 'onclick' => 'self.location="/dev/filter/addfilter"',
- 'class' => 'addbutton'))?>
-
-<?php if ($this->filters): ?>
- <table>
- <tr>
- <th>ID</th>
- <th>Title</th>
- <th>Description</th>
- <th>Priority</th>
- <th>TargetBootMenu</th>
- <th colspan=3>Actions</th>
- </tr>
- <?php foreach ($this->filters as $filter): ?>
- <tr class='entry'>
- <td><?php echo $this->escape($filter->getID()) ?></td>
- <td><?php echo $this->escape($filter->title) ?></td>
- <td><?php echo $this->escape($filter->Description) ?></td>
- <td><?php echo $this->escape($filter->priority) ?></td>
- <td><?php echo $this->escape($filter->bootmenuID) ?></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'filter',
- 'action' => 'editfilter',
- 'filterID' => $filter->getID()
- ),
- 'default',
- true) ?>"><img src='/media/img/edit.png' alt='Edit Filter'/></a></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'filter',
- 'action' => 'removefilter',
- 'filterID' => $filter->getID()
- ),
- 'default',
- true) ?>"><img src='/media/img/delete.png' alt='Delete Filter'/></a></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'filter',
- 'action' => 'addfilterentry',
- 'filterID' => $filter->getID()
- ),
- 'default',
- true) ?>"><img src='/media/img/add.png' alt='Add Filterentry'/></a></td>
- </tr>
- <?php
- $fe = new Application_Model_FilterEntriesMapper();
- # print_a($erg = $fe->findBy('filterID',$filter->getID()));
- $erg = $fe->findBy(array('filterID' => $filter->getID()),true);
- ?>
- <?php if (count($erg)>0): ?>
- <tr class=detail>
- <td class=arrowtop>↳</td>
- <td colspan=7>
- <?php
-
- ?>
- <table>
- <tr>
- <th>Filtertype</th>
- <th>Value</th>
- <th>Value2</th>
- <th colspan=2>Actions</th>
- </tr>
- <?php foreach ($erg as $filterentry): ?>
-
- <tr>
- <td><?php
-
- $filter2 = new Application_Model_FilterTypeMapper();
- $erg = new Application_Model_FilterType();
- $filter2->find($filterentry['filtertypeID'],$erg);
- //name zur ID finden
- echo "[".$filterentry['filtertypeID']."] ";
- echo $erg->getFiltertypename();
-
-
- ?></td>
- <td><?php echo $filterentry['filtervalue'];?></td>
- <td><?php echo $filterentry['filtervalue2'];?></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'filter',
- 'action' => 'editfilterentry',
- 'filterentriesID' => $filterentry['filterentriesID']
- ),
- 'default',
- true) ?>"><img src='/media/img/edit.png' alt='Edit Filterentry'/></a></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'filter',
- 'action' => 'removefilterentry',
- 'filterentriesID' => $filterentry['filterentriesID']
- ),
- 'default',
- true) ?>"><img src='/media/img/delete.png' alt='Delete Filterentry'/></a></td>
- </tr>
-
- <?php endforeach ?>
- </table>
- </td>
- </tr>
- <?php endif;?>
- <?php endforeach ?>
- </table>
-
-
-<?php else: ?>
-
- <p>There are no filters to display.</p>
-
-<?php endif;?>
-<?php echo $this->formButton('createconfig', 'Test Filters', array(
- 'onclick' => 'self.location="/dev/filter/testevaluate"',
- 'class' => 'addbutton'))?>
diff --git a/application/modules/dev/views/scripts/filter/testevaluate.phtml b/application/modules/dev/views/scripts/filter/testevaluate.phtml
deleted file mode 100644
index 8a10629..0000000
--- a/application/modules/dev/views/scripts/filter/testevaluate.phtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<h1>Test Filters</h1>
-
-<?php
-echo $this->filterevaluate;
diff --git a/application/modules/dev/views/scripts/group/add.phtml b/application/modules/dev/views/scripts/group/add.phtml
deleted file mode 100644
index 588ce31..0000000
--- a/application/modules/dev/views/scripts/group/add.phtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<h1>Add Group</h1>
-<?php
-$this->addForm->setAction($this->url());
-echo $this->addForm;
-?> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/group/edit.phtml b/application/modules/dev/views/scripts/group/edit.phtml
deleted file mode 100644
index 6b042e1..0000000
--- a/application/modules/dev/views/scripts/group/edit.phtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<h1>Edit Group</h1>
-<?php
-if(isset($this->addForm)) {
- $this->addForm->setAction('/dev/group/add');
- echo $this->addForm;
-}
-else {
- $this->editForm->setAction($this->url());
- echo $this->editForm;
-}
-?>
diff --git a/application/modules/dev/views/scripts/group/index.phtml b/application/modules/dev/views/scripts/group/index.phtml
deleted file mode 100644
index a3d1269..0000000
--- a/application/modules/dev/views/scripts/group/index.phtml
+++ /dev/null
@@ -1,57 +0,0 @@
-<h1>Groups</h1>
-<?php echo $this->formButton('addgroup', 'Add Group', array(
- 'onclick' => 'self.location="/dev/group/add"',
- 'class' => 'addbutton'))?>
-<table>
- <tr>
- <th>Title</th>
- <th colspan=3>Actions</th>
- </tr>
- <?php
- $count = 0;
- foreach($this->groupList as $group) {
- ?>
- <tr class="entry">
- <td><?php echo $group->getTitle(); ?></td>
- <td class='action'><a
- href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'group',
- 'action' => 'show',
- 'groupID' => $group->getID()
- ),
- 'default',
- true) ?>"> <img src='/media/img/show.png' alt='Show Group' /></a></td>
- <td class='action'><a
- href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'group',
- 'action' => 'edit',
- 'groupID' => $group->getID()
- ),
- 'default',
- true) ?>"> <img src='/media/img/edit.png' alt='Edit Group' /></a></td>
- <td class='action'><a
- href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'group',
- 'action' => 'delete',
- 'groupID' => $group->getID()
- ),
- 'default',
- true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a>
- </td>
- </tr>
- <?php
- $count++;
- }
- ?>
-</table>
-<div>
-<?php echo $this->formButton('linkgroups', 'Link Groups', array(
- 'onclick' => 'self.location="/dev/group/link"',
- 'class' => 'addbutton'))?>
-</div>
diff --git a/application/modules/dev/views/scripts/group/link.phtml b/application/modules/dev/views/scripts/group/link.phtml
deleted file mode 100644
index 5bb2a9d..0000000
--- a/application/modules/dev/views/scripts/group/link.phtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<h1>Link Groups</h1>
-<?php
-$this->linkForm->setAction($this->url());
-echo $this->linkForm;
-?> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/group/show.phtml b/application/modules/dev/views/scripts/group/show.phtml
deleted file mode 100644
index f8fbe1e..0000000
--- a/application/modules/dev/views/scripts/group/show.phtml
+++ /dev/null
@@ -1,123 +0,0 @@
-<h1>Group Details</h1>
-<?php
-if($this->groupID) {
- ?>
- <?php echo $this->formButton('deletegroup', 'Delete', array(
- 'onclick' => 'self.location="/dev/group/delete/groupID/' . $this->group->getID() .'"',
- 'class' => 'rightbutton'))?>
- <?php echo $this->formButton('editgroup', 'Edit', array(
- 'onclick' => 'self.location="/dev/group/edit/groupID/' . $this->group->getID() .'"',
- 'class' => 'rightbutton'))?>
-<span class="clear"></span>
-<table>
- <tr>
- <th>Title</th>
- <th>Description</th>
- </tr>
- <tr class="entry">
- <td><?php echo $this->group->getTitle(); ?></td>
- <td><?php echo $this->group->getDescription(); ?></td>
- </tr>
- <?php
- if(isset($parentGroup) && is_object($parentGroup)) {
- ?>
- <tr>
- <td><b>Superordinated Group:</b></td>
- <td><?php echo $this->parentGroup->getTitle(); ?></td>
- </tr>
- <?php
- }
- ?>
-</table>
- <?php
- if(isset($this->groupRequestList)) {
- ?>
-<br />
-<h2>Requests:</h2>
-<table>
- <tr>
- <th>Firstname</th>
- <th>Name</th>
- <th>email</th>
- <th>city</th>
- <th>grant</th>
- </tr>
- <?php
- foreach($this->groupRequestList as $grouprequest) {
- $grouprequestID = $grouprequest['grouprequestID'];
- $person = $grouprequest['person'];
- ?>
- <tr class="entry">
- <td><?php echo $person->getFirstname(); ?></td>
- <td><?php echo $person->getName(); ?></td>
- <td><?php echo $person->getEmail(); ?></td>
- <td><?php echo $person->getCity(); ?></td>
- <td>
- <form action="/dev/group/grantperson" method="post"><input
- type="hidden" name="grouprequestID"
- value="<?php echo $grouprequestID; ?>" /> <?php printRoleSelect($this->roleList); ?>
- <input type="image" src='/media/img/save.png' alt='Grant Person'
- name="confirm" value="confirm" /></form>
- </td>
- </tr>
- <?php
- }
- ?>
-</table>
- <?php
- }
- if(isset($this->membersList)) {
- ?>
-<br />
-<h2>Members:</h2>
-<table>
- <tr>
- <th>Firstname</th>
- <th>Name</th>
- <th>email</th>
- <th>city</th>
- <th>revoke</th>
- </tr>
-
- <?php
- foreach($this->membersList as $member) {
- $membershipID = $member['membershipID'];
- $person = $member['person'];
- ?>
- <tr class="entry">
- <td><?php echo $person->getFirstname(); ?></td>
- <td><?php echo $person->getName(); ?></td>
- <td><?php echo $person->getEmail(); ?></td>
- <td><?php echo $person->getCity(); ?></td>
- <td class='action'><a
- href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'group',
- 'action' => 'revokeperson',
- 'membershipID' => $membershipID,
- ),
- 'default',
- true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a>
- </td>
- </tr>
- <?php
- }
- ?>
-</table>
- <?php
- }
-}
-
-function printRoleSelect($roleList) {
- if(!is_array($roleList)) {
- return;
- }
- echo "<select name=\"roleID\">";
- foreach($roleList as $role) {
- echo "<option value=\"" . $role['roleID'] . "\">" . $role['title'] . "</option>";
- }
- echo "</select>";
-}
-?>
-<br /><br /><br /><br /><br /> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/index/index.phtml b/application/modules/dev/views/scripts/index/index.phtml
deleted file mode 100644
index 57e6edb..0000000
--- a/application/modules/dev/views/scripts/index/index.phtml
+++ /dev/null
@@ -1 +0,0 @@
-<h1>Welcome</h1>
diff --git a/application/modules/dev/views/scripts/person/edit.phtml b/application/modules/dev/views/scripts/person/edit.phtml
deleted file mode 100644
index 3e666d4..0000000
--- a/application/modules/dev/views/scripts/person/edit.phtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<h1>Edit Person</h1>
-<?php
-$this->editForm->setAction($this->url());
-echo $this->editForm;
-?> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/person/request.phtml b/application/modules/dev/views/scripts/person/request.phtml
deleted file mode 100644
index 91a625b..0000000
--- a/application/modules/dev/views/scripts/person/request.phtml
+++ /dev/null
@@ -1,7 +0,0 @@
-<h1>Request Membership</h1>
-<?php
-if(count($this->requestForm->getGrouplist())>0) {
- $this->requestForm->setAction($this->url());
- echo $this->requestForm;
-}
-?> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/person/show.phtml b/application/modules/dev/views/scripts/person/show.phtml
deleted file mode 100644
index b0c6fc1..0000000
--- a/application/modules/dev/views/scripts/person/show.phtml
+++ /dev/null
@@ -1,55 +0,0 @@
-<h1>Person</h1>
-<?php echo $this->formButton('editperson', 'Edit', array(
- 'onclick' => 'self.location="/dev/person/edit/"',
- 'class' => 'rightbutton'))?>
-<br /><br />
-<div class="personColorDiv"><span class="bold">Title:</span>&nbsp;<?php echo $this->person->getTitle(); ?></div>
-<div class="personDiv"><span class="bold">Name:</span>&nbsp;<?php echo $this->person->getName(); ?></div>
-<div class="personColorDiv"><span class="bold">Firstname:</span>&nbsp;<?php echo $this->person->getFirstname(); ?></div>
-<div class="personDiv"><span class="bold">Street:</span>&nbsp;<?php echo $this->person->getStreet(); ?></div>
-<div class="personColorDiv"><span class="bold">Housenumber:</span>&nbsp;<?php echo $this->person->getHousenumber(); ?></div>
-<div class="personDiv"><span class="bold">City:</span>&nbsp;<?php echo $this->person->getCity(); ?></div>
-<div class="personColorDiv"><span class="bold">Postalcode:</span>&nbsp;<?php echo $this->person->getPostalcode(); ?></div>
-<div class="personDiv"><span class="bold">Email:</span>&nbsp;<?php echo $this->person->getEmail(); ?></div>
-<div class="personColorDiv"><span class="bold">Last Login Date:</span>&nbsp;<?php if( $this->person->getLogindate()) echo date ('d. F Y - H:i', $this->person->getLogindate()) . " Uhr"; ?></div>
-<div class="personDiv"><span class="bold">Register Date:</span>&nbsp;<?php echo date ('d. F Y - H:i', $this->person->getRegisterdate()) . ' Uhr'; ?></div>
-<?php
-if(isset($this->groups)) {
- ?>
-<br />
-<h2>Member in the following Groups:</h2>
-<table>
-<?php
-foreach($this->groups as $group) {
- ?>
- <tr>
- <th>Title</th>
- <th>Description</th>
- <th>Leave</th>
- </tr>
- <tr>
- <td><?php echo $group['title']; ?></td>
- <td><?php echo $group['description']; ?></td>
- <td class='action'><a
- href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'person',
- 'action' => 'leave',
- 'membershipID' => $group['membershipID']
- ),
- 'default',
- true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a>
- </td>
- </tr>
- <?php
-}
-}
-?>
-</table>
-<?php echo $this->formButton('addtogroup', 'Add to additional
-Groups', array(
- 'onclick' => 'self.location="/dev/person/request/"',
- 'class' => 'addbutton'));
-?>
-<br /><br /><br /><br /><br /> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/pool/createpool.phtml b/application/modules/dev/views/scripts/pool/createpool.phtml
deleted file mode 100644
index 305b36e..0000000
--- a/application/modules/dev/views/scripts/pool/createpool.phtml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?php
-echo $this->addpool;
diff --git a/application/modules/dev/views/scripts/pool/deletepool.phtml b/application/modules/dev/views/scripts/pool/deletepool.phtml
deleted file mode 100644
index 622e663..0000000
--- a/application/modules/dev/views/scripts/pool/deletepool.phtml
+++ /dev/null
@@ -1 +0,0 @@
-<br /><br /><center>View script for controller <b>Pool</b> and script/action name <b>deletepool</b></center> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/pool/editpool.phtml b/application/modules/dev/views/scripts/pool/editpool.phtml
deleted file mode 100644
index 359a5f9..0000000
--- a/application/modules/dev/views/scripts/pool/editpool.phtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<h1>Edit Pool</h1>
-<?php
-
-echo $this->editpoolform;
diff --git a/application/modules/dev/views/scripts/pool/index.phtml b/application/modules/dev/views/scripts/pool/index.phtml
deleted file mode 100644
index cd49048..0000000
--- a/application/modules/dev/views/scripts/pool/index.phtml
+++ /dev/null
@@ -1,131 +0,0 @@
-<h1>Pools</h1>
-<?php echo $this->formButton('createconfig', 'Create Pool', array(
- 'onclick' => 'self.location="/dev/pool/createpool"',
- 'class' => 'addbutton'))?>
-
-<?php if ($this->pools): ?>
- <table >
- <tr>
- <th>ID</th>
- <th>Title</th>
- <th>Description</th>
- <th>Location</th>
- <th colspan=3>Actions</th>
- </tr>
- <?php foreach ($this->pools as $pool): ?>
- <tr class=entry>
- <td><?php echo $this->escape($pool->getID()) ?></td>
- <td><?php echo $this->escape($pool->getTitle()) ?></td>
- <td><?php echo $this->escape($pool->getDescription()) ?></td>
- <td><?php echo $this->escape($pool->getLocation()) ?></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'pool',
- 'action' => 'editpool',
- 'poolID' => $pool->getID()
- ),
- 'default',
- true) ?>"><img src='/media/img/edit.png' alt='Edit Pool'/></a></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'pool',
- 'action' => 'deletepool',
- 'poolID' => $pool->getID()
- ),
- 'default',
- true) ?>"><img src='/media/img/delete.png' alt='Delete Pool'/></a></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'pool',
- 'action' => 'linkclient',
- 'poolID' => $pool->getID()
- ),
- 'default',
- true) ?>"><img src='/media/img/add.png' alt='Link Client'/></a></td>
- </tr>
- <?php
- $poolentriesMapper = new Application_Model_PoolEntriesMapper();
- $clients = $poolentriesMapper->findBy(array('poolID' => $pool->getID()),true);
- ?>
- <?php if (count($clients)>0): ?>
- <tr class=detail>
- <td class=arrowtop>↳</td>
- <td colspan=6>
- <table>
- <tr>
- <th>ClientID</th>
- <th>Mac</th>
- <th>Hardwarehash</th>
- <th>Actions</th>
- </tr>
- <?php
- foreach ($clients as $client): ?>
- <tr>
- <td><?php echo $client['clientID'];?></td>
- <?php
- $cli = new Application_Model_Client();
- $clientMapper = new Application_Model_ClientMapper();
- $clientMapper->find($client['clientID'],$cli);
- ?>
- <td><?php echo ($cli->macAdress); ?></td>
- <td><?php echo ($cli->hardwarehash); ?></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'pool',
- 'action' => 'unlinkclient',
- 'poolentriesID' => $client['poolentriesID']
- ),
- 'default',
- true) ?>"><img src='/media/img/delete.png' alt='Unlink Client'/></a></td>
- </tr>
- <?php endforeach ?>
- </table>
- </td>
- </tr>
- <?php endif;?>
- <?php endforeach ?>
- </table>
-<h2>Free clients</h2>
-<table >
-<tr>
-<th>ClientID</th>
-<th>MacAdress</th>
-<th>Hardwarehash</th>
-<th>Actions</th>
-</tr>
-<?php
-foreach ($this->freeclients as $client): ?>
- <tr>
- <td><?php echo $client['clientID']; ?></td>
- <td><?php echo $client['macadress']; ?></td>
- <td><?php echo $client['hardwarehash']; ?></td>
- <td><select onChange="location.href=this.options[this.selectedIndex].value">
- <option></option>
- <?php foreach ($this->pools as $pool): ?>
- <option value="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'pool',
- 'action' => 'linkclient',
- 'clientID' => $client['clientID'],
- 'poolID' => $pool->getID(),
- ),
- 'default',
- true) ?>"><?php echo $pool->getTitle(); ?></option>
- <?php //<img src='/media/img/add.png' alt='Link to Pool'/></a></td> ?>
- <?php endforeach ?>
- </select>
- </td>
- </tr>
-<?php endforeach ?>
-</table>
-<?php else: ?>
-
-
- <p>There are no pools to display.</p>
-
-<?php endif;?>
diff --git a/application/modules/dev/views/scripts/pool/linkclient.phtml b/application/modules/dev/views/scripts/pool/linkclient.phtml
deleted file mode 100644
index cbd2dd4..0000000
--- a/application/modules/dev/views/scripts/pool/linkclient.phtml
+++ /dev/null
@@ -1,3 +0,0 @@
-<h1>Link Clients</h1>
-<?php
-echo $this->poolclient;
diff --git a/application/modules/dev/views/scripts/pool/unlinkclient.phtml b/application/modules/dev/views/scripts/pool/unlinkclient.phtml
deleted file mode 100644
index 35aa9c5..0000000
--- a/application/modules/dev/views/scripts/pool/unlinkclient.phtml
+++ /dev/null
@@ -1 +0,0 @@
-<br /><br /><center>View script for controller <b>Pool</b> and script/action name <b>unlinkclient</b></center> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/preboot/createpreboot.phtml b/application/modules/dev/views/scripts/preboot/createpreboot.phtml
deleted file mode 100644
index 19d1595..0000000
--- a/application/modules/dev/views/scripts/preboot/createpreboot.phtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-$this->createprebootForm->setAction($this->url());
-echo $this->createprebootForm;
-?>
diff --git a/application/modules/dev/views/scripts/preboot/editpreboot.phtml b/application/modules/dev/views/scripts/preboot/editpreboot.phtml
deleted file mode 100644
index a8f9c42..0000000
--- a/application/modules/dev/views/scripts/preboot/editpreboot.phtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-$this->editprebootForm->setAction($this->url());
-echo $this->editprebootForm;
-?>
diff --git a/application/modules/dev/views/scripts/preboot/index.phtml b/application/modules/dev/views/scripts/preboot/index.phtml
deleted file mode 100644
index eec8f1b..0000000
--- a/application/modules/dev/views/scripts/preboot/index.phtml
+++ /dev/null
@@ -1,57 +0,0 @@
-<h1>Preboot</h1>
-<?php echo $this->formButton('createpreboot', 'Create PreBoot', array(
- 'onclick' => 'self.location="/dev/preboot/createpreboot"',
- 'class' => 'addbutton'))?>
-
-<table>
- <tr>
- <th>ID</th>
- <th>Title</th>
- <th>GroupID</th>
- <th>MembershipID</th>
- <th>Preboot Path</th>
- <th colspan=3>Actions</th>
- </tr>
- <?php if(count($this->prebootlist)==0)
- echo "</table> There are no Preboot entries to display." ?>
- <?php foreach ($this->prebootlist as $preboot): ?>
- <tr class=entry>
- <td><?php echo $this->escape($preboot->getID()); ?></td>
- <td><?php echo $this->escape($preboot->getTitle()); ?></td>
- <td><?php echo $this->escape($preboot->getGroupID()); ?></td>
- <td><?php echo $this->escape($preboot->getMembershipID()); ?></td>
- <td><?php echo $this->escape($preboot->getPath_preboot()); ?></td>
- <?php if($this->update[$preboot->getID()]==true): ?>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'preboot',
- 'action' => 'updatepreboot',
- 'prebootID' => $preboot->getID()
- ),
- 'default',
- true, false) ?>"><img src='/media/img/update.png' alt='Updates available' /></a></td>
- <?php else: ?>
- <td class='action'><img src='/media/img/update_grey.png' alt='No updates available' /></td>
- <?php endif; ?>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'preboot',
- 'action' => 'editpreboot',
- 'prebootID' => $preboot->getID()
- ),
- 'default',
- true, false) ?>"><img src='/media/img/edit.png' alt='Edit Preboot' /></a></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'preboot',
- 'action' => 'deletepreboot',
- 'prebootID' => $preboot->getID()
- ),
- 'default',
- true) ?>"><img src='/media/img/delete.png' alt='Delete Preboot'/></a></td>
- </tr>
- <?php endforeach; ?>
-</table> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/resource/index.phtml b/application/modules/dev/views/scripts/resource/index.phtml
deleted file mode 100644
index e69de29..0000000
--- a/application/modules/dev/views/scripts/resource/index.phtml
+++ /dev/null
diff --git a/application/modules/dev/views/scripts/role/add.phtml b/application/modules/dev/views/scripts/role/add.phtml
deleted file mode 100644
index 23d4c55..0000000
--- a/application/modules/dev/views/scripts/role/add.phtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<h1>Add Role</h1>
-<?php
-$this->addForm->setAction($this->url());
-echo $this->addForm;
-?> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/role/edit.phtml b/application/modules/dev/views/scripts/role/edit.phtml
deleted file mode 100644
index 59482f0..0000000
--- a/application/modules/dev/views/scripts/role/edit.phtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<h1>Edit Role</h1>
-<?php
-if(isset($this->addForm)) {
- $this->addForm->setAction('/etc/role/add');
- echo $this->addForm;
-}
-else {
- $this->editForm->setAction($this->url());
- echo $this->editForm;
-}
-?>
diff --git a/application/modules/dev/views/scripts/role/groupselect.phtml b/application/modules/dev/views/scripts/role/groupselect.phtml
deleted file mode 100644
index d1c08fd..0000000
--- a/application/modules/dev/views/scripts/role/groupselect.phtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<h1>Select Group</h1>
-<?php
-$this->groupSelectForm->setAction($this->url());
-echo $this->groupSelectForm;
-?> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/role/index.phtml b/application/modules/dev/views/scripts/role/index.phtml
deleted file mode 100644
index 59b66d7..0000000
--- a/application/modules/dev/views/scripts/role/index.phtml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-if($this->groupID) {
- ?>
-<h1>Roles</h1>
- <?php echo $this->formButton('addrole', 'Add Role', array(
- 'onclick' => 'self.location="/dev/role/add"',
- 'class' => 'addbutton'))?>
-<table>
- <tr>
- <th>Title</th>
- <th colspan=3>Actions</th>
- </tr>
- <?php
- $count = 0;
- foreach($this->roleList as $role) {
- ?>
- <tr class="entry">
- <td><?php echo $role['title'] ?></td>
- <td class='action'><a
- href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'role',
- 'action' => 'show',
- 'roleID' => $role['roleID']
- ),
- 'default',
- true) ?>"> <img src='/media/img/show.png' alt='Show Group' /></a></td>
- <td class='action'><a
- href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'role',
- 'action' => 'edit',
- 'roleID' => $role['roleID']
- ),
- 'default',
- true) ?>"> <img src='/media/img/edit.png' alt='Edit Group' /></a></td>
- <td class='action'><a
- href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'role',
- 'action' => 'delete',
- 'roleID' => $role['roleID']
- ),
- 'default',
- true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a>
- </td>
- </tr>
- <?php
- $count++;
- }
- ?>
-</table>
-<?php echo $this->formButton('changeGroup', 'Change Group', array(
- 'onclick' => 'self.location="/dev/role/changegroup"',
- 'class' => 'rightbutton'))?>
-<?php
-}
-?> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/role/linkright.phtml b/application/modules/dev/views/scripts/role/linkright.phtml
deleted file mode 100644
index 38c0d45..0000000
--- a/application/modules/dev/views/scripts/role/linkright.phtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<h1>Add Right</h1>
-<?php
-$this->linkForm->setAction($this->url());
-echo $this->linkForm;
-?> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/role/show.phtml b/application/modules/dev/views/scripts/role/show.phtml
deleted file mode 100644
index 38e6023..0000000
--- a/application/modules/dev/views/scripts/role/show.phtml
+++ /dev/null
@@ -1,69 +0,0 @@
-<h1>Role Details</h1>
-<?php
-if($this->roleID) {
- ?>
- <?php echo $this->formButton('deleterole', 'Delete', array(
- 'onclick' => 'self.location="/dev/role/delete/roleID/' . $this->role->getID() .'"',
- 'class' => 'rightbutton'))?>
- <?php echo $this->formButton('editrole', 'Edit', array(
- 'onclick' => 'self.location="/dev/role/edit/roleID/' . $this->role->getID() .'"',
- 'class' => 'rightbutton'))?>
-<span class="clear"></span>
-<table>
- <tr>
- <th>Title</th>
- <th>Description</th>
- <th>Inheritance</th>
- </tr>
- <tr class="entry">
- <td><?php echo $this->role->getTitle(); ?></td>
- <td><?php echo $this->role->getDescription(); ?></td>
- <td><?php if($this->role->getInheritance() == 1) echo "yes"; else echo "no"; ?></td>
- </tr>
-</table>
-<br />
-<h2>Rights:</h2>
- <?php echo $this->formButton('linkright', 'Add Right', array(
- 'onclick' => 'self.location="/dev/role/linkright/roleID/' . $this->role->getID() .'"',
- 'class' => 'addbutton'))?>
- <?php if(isset($this->rightsList)) {
- ?>
-<table>
- <tr>
- <th>Title</th>
- <th>Description</th>
- <th>Remove</th>
- </tr>
-
- <?php
- foreach($this->rightsList as $right) {
- ?>
- <tr class="entry">
- <td><?php echo $right->getTitle(); ?></td>
- <td><?php echo $right->getDescription(); ?></td>
- <td class='action'><a
- href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'role',
- 'action' => 'unlinkright',
- 'rightrolesID' => $this->roleID . '-' . $right->getID(),
- ),
- 'default',
- true) ?>"> <img src='/media/img/delete.png' alt='Remove Right' /></a>
- </td>
- </tr>
- <?php
- }
- ?>
-</table>
- <?php
- } else {
- ?>
-<br />
-<center>
-<h3>No Rights have been added!</h3>
-</center>
- <?php
- }
-} \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/session/createsession.phtml b/application/modules/dev/views/scripts/session/createsession.phtml
deleted file mode 100644
index 11fe7ce..0000000
--- a/application/modules/dev/views/scripts/session/createsession.phtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<h1>create session</h1>
-
-<?php
-echo $this->createsession;
-?>
diff --git a/application/modules/dev/views/scripts/session/deletesession.phtml b/application/modules/dev/views/scripts/session/deletesession.phtml
deleted file mode 100644
index 57f8698..0000000
--- a/application/modules/dev/views/scripts/session/deletesession.phtml
+++ /dev/null
@@ -1 +0,0 @@
-<br /><br /><center>View script for controller <b>Session</b> and script/action name <b>deletesession</b></center> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/session/editsession.phtml b/application/modules/dev/views/scripts/session/editsession.phtml
deleted file mode 100644
index 88fb273..0000000
--- a/application/modules/dev/views/scripts/session/editsession.phtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<h1>edit session</h1>
-
-<?php
-echo $this->editsession;
-?>
diff --git a/application/modules/dev/views/scripts/session/index.phtml b/application/modules/dev/views/scripts/session/index.phtml
deleted file mode 100644
index 32f9ae9..0000000
--- a/application/modules/dev/views/scripts/session/index.phtml
+++ /dev/null
@@ -1,51 +0,0 @@
-<h1>Session</h1>
-<?php echo $this->formButton('createconfig', 'Create Session', array(
- 'onclick' => 'self.location="/dev/session/createsession"',
- 'class' => 'addbutton'))?>
-<table>
-<tr>
- <th>ID</th>
- <th>alphasessionID</th>
- <th>ClientID</th>
- <th>BootmenuentryID</th>
- <th>BootOsID</th>
- <th>BootIsoID</th>
- <th>MembershipID</th>
- <th>Time</th>
- <th>IP</th>
- <th>IPv6</th>
- <th colspan=2>Actions</th>
-</tr>
-<?php foreach ($this->sessions as $session): ?>
- <tr class=entry>
- <td><?php echo $this->escape($session->getID()) ?></td>
- <td><?php echo $this->escape($session->getAlphasessionID()) ?></td>
- <td><?php echo $this->escape($session->getClientID()) ?></td>
- <td><?php echo $this->escape($session->getBootmenuentryID()) ?></td>
- <td><?php echo $this->escape($session->getBootosID()) ?></td>
- <td><?php echo $this->escape($session->getBootisoID()) ?></td>
- <td><?php echo $this->escape($session->getMembershipID()) ?></td>
- <td><?php echo date('d.m.Y H:i',$this->escape($session->getTime())) ?></td>
- <td><?php echo $this->escape($session->getIp()) ?></td>
- <td><?php echo $this->escape($session->getIp6()) ?></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'session',
- 'action' => 'editsession',
- 'sessionID' => $session->getID()
- ),
- 'default',
- true) ?>"><img src='/media/img/edit.png' alt='Edit Filter'/></a></td>
- <td class='action'><a href="<?php echo $this->url(
- array(
- 'module' => 'dev',
- 'controller' => 'session',
- 'action' => 'deletesession',
- 'sessionID' => $session->getID()
- ),
- 'default',
- true) ?>"><img src='/media/img/delete.png' alt='Delete Filter'/></a></td>
- </tr>
-<?php endforeach ?>
-</table>