blob: 7ce4ae3d0f7d98651aee80e304d48e1b2ad43694 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
<?php
class BootosController extends Zend_Controller_Action
{
public function init()
{
$db = Zend_Db_Table::getDefaultAdapter();
}
public function indexAction()
{
$bootosmapper = new Application_Model_BootOsMapper();
$this->view->bootoslist = $bootosmapper->fetchAll();
}
public function createbootosAction()
{
if (!isset($_POST["createbootos"])){
$createbootosForm = new Application_Form_BootosCreate();
} else {
$createbootosForm = new Application_Form_BootosCreate($_POST);
if ($createbootosForm->isValid($_POST)) {
$bootos = new Application_Model_BootOs($_POST);
if($bootos->getConfigID() == '')
$bootos->setConfigID(NULL);
$bootosmapper = new Application_Model_BootOsMapper();
$date = new DateTime();
$bootos->setCreated($date->getTimestamp());
try {
$bootosmapper->save($bootos);
}catch(Zend_Exception $e)
{
echo "Caught exception: " . get_class($e) . "<br/>";
echo "Message: " . $e->getMessage() . "<br/>";
}
echo "BootOS erfolgreich angelegt. <br/>";
return;
}
}
$this->view->createbootosForm = $createbootosForm;
}
public function editbootosAction()
{
// action body
}
public function deletebootosAction()
{
// action body
}
}
|