From 83767be80c29e3d3ca99f4a7d2eaab97f8256d1b Mon Sep 17 00:00:00 2001
From: Sebastian Schmelzer
Date: Wed, 11 Jan 2012 15:22:32 +0100
Subject: remove unused stuff
---
.../modules/dev/controllers/BootisoController.php | 192 ---------------------
1 file changed, 192 deletions(-)
delete mode 100644 application/modules/dev/controllers/BootisoController.php
(limited to 'application/modules/dev/controllers/BootisoController.php')
diff --git a/application/modules/dev/controllers/BootisoController.php b/application/modules/dev/controllers/BootisoController.php
deleted file mode 100644
index 1256c5b..0000000
--- a/application/modules/dev/controllers/BootisoController.php
+++ /dev/null
@@ -1,192 +0,0 @@
-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) . "
";
- echo "Message: " . $e->getMessage() . "
";
-
- }
- $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) . "
";
- echo "Message: " . $e->getMessage() . "
";
- }
-
- $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');
- }
-
-
-}
-
-
-
-
-
-
-
--
cgit v1.2.3-55-g7522