summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/configs/application.ini2
-rw-r--r--application/controllers/FilterController.php42
-rw-r--r--application/forms/FilterAdd.php28
-rw-r--r--application/forms/FilterCreate.php13
-rw-r--r--application/views/scripts/filter/addfilter.phtml3
-rw-r--r--application/views/scripts/filter/index.phtml31
-rw-r--r--application/views/scripts/person/index.phtml1
-rw-r--r--simonFilter.txt9
8 files changed, 115 insertions, 14 deletions
diff --git a/application/configs/application.ini b/application/configs/application.ini
index 6970da3..9bfaec2 100644
--- a/application/configs/application.ini
+++ b/application/configs/application.ini
@@ -10,7 +10,7 @@ resources.frontController.params.displayExceptions = 0
resources.db.adapter = PDO_MYSQL
resources.db.params.host = localhost
resources.db.params.username = root
-resources.db.params.password = lsfks
+resources.db.params.password = 123456
resources.db.params.dbname = pbs
resources.db.isDefaultTableAdapter = true
diff --git a/application/controllers/FilterController.php b/application/controllers/FilterController.php
new file mode 100644
index 0000000..da8e404
--- /dev/null
+++ b/application/controllers/FilterController.php
@@ -0,0 +1,42 @@
+<?php
+
+class FilterController extends Zend_Controller_Action
+{
+
+ private $_filtermapper = null;
+
+ public function init()
+ {
+ try{
+ $this->_filtermapper = new Application_Model_FilterMapper();
+ }catch (Zend_Exception $e) {
+ echo "Error message 1: " . $e->getMessage() . "\n";
+ }
+ /* Initialize action controller here */
+ }
+
+ 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()
+ {
+ $db = Zend_Db_Table::getDefaultAdapter();
+
+ $addfilterform = new Application_Form_FilterAdd();
+
+ $this->view->addfilterform = $addfilterform;
+ }
+
+
+}
+
+
+
diff --git a/application/forms/FilterAdd.php b/application/forms/FilterAdd.php
new file mode 100644
index 0000000..969f07b
--- /dev/null
+++ b/application/forms/FilterAdd.php
@@ -0,0 +1,28 @@
+<?php
+
+class Application_Form_FilterAdd 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('submit', 'register', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Login',
+ ));
+ }
+
+
+}
+
diff --git a/application/forms/FilterCreate.php b/application/forms/FilterCreate.php
deleted file mode 100644
index e239b94..0000000
--- a/application/forms/FilterCreate.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
-class Application_Form_FilterCreate extends Zend_Form
-{
-
- public function init()
- {
- /* Form Elements & Other Definitions Here ... */
- }
-
-
-}
-
diff --git a/application/views/scripts/filter/addfilter.phtml b/application/views/scripts/filter/addfilter.phtml
new file mode 100644
index 0000000..3c87e1e
--- /dev/null
+++ b/application/views/scripts/filter/addfilter.phtml
@@ -0,0 +1,3 @@
+<?php
+$this->addfilterform->setAction($this->url());
+echo $this->addfilterform;
diff --git a/application/views/scripts/filter/index.phtml b/application/views/scripts/filter/index.phtml
new file mode 100644
index 0000000..0f9b51e
--- /dev/null
+++ b/application/views/scripts/filter/index.phtml
@@ -0,0 +1,31 @@
+<h1>Filters</h1>
+<p><a href="<?php echo $this->url(
+ array(
+ 'controller' => 'filter',
+ 'action' => 'addfilter'
+ ),
+ 'default',
+ true) ?>">add new filter</a></p>
+
+<?php if ($this->filters): ?>
+
+ <!-- A table of filters. -->
+ <table border=1>
+ <tr>
+ <th>filterid</th>
+ </tr>
+ <?php foreach ($this->filters as $filter): ?>
+ <tr>
+ <td><?php echo $this->escape($filter->title) ?></td>
+ </tr>
+ <?php endforeach ?>
+
+
+
+ </table>
+
+<?php else: ?>
+
+ <p>There are no filters to display.</p>
+
+<?php endif;?>
diff --git a/application/views/scripts/person/index.phtml b/application/views/scripts/person/index.phtml
new file mode 100644
index 0000000..1ba7791
--- /dev/null
+++ b/application/views/scripts/person/index.phtml
@@ -0,0 +1 @@
+<br /><br /><center>View script for controller <b>Person</b> and script/action name <b>index</b></center>
diff --git a/simonFilter.txt b/simonFilter.txt
new file mode 100644
index 0000000..bac6fd7
--- /dev/null
+++ b/simonFilter.txt
@@ -0,0 +1,9 @@
+
+- IP / IP-range
+- Mac Adresse
+- PoolID
+- BootIso
+- Besitzer
+- Uhrzeit
+
+