summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbd542010-08-30 11:49:18 +0200
committerbd542010-08-30 11:49:18 +0200
commit100572c23d79d2648ef4ac0560007866e5625c65 (patch)
tree8178c7dac9d7294c1d9f148d6aa10a41d9052c48
parentminor bugfix (diff)
downloadpbs-100572c23d79d2648ef4ac0560007866e5625c65.tar.gz
pbs-100572c23d79d2648ef4ac0560007866e5625c65.tar.xz
pbs-100572c23d79d2648ef4ac0560007866e5625c65.zip
Extension for client configuration (structure) addedHEADmaster
-rw-r--r--application/Bootstrap.php1
-rw-r--r--application/controllers/ConfigController.php47
-rw-r--r--application/controllers/IndexController.php57
-rw-r--r--application/forms/Login.php38
-rw-r--r--application/models/Config.php8
-rw-r--r--application/views/scripts/config/addclient.phtml1
-rw-r--r--application/views/scripts/config/deleteclient.phtml1
-rw-r--r--application/views/scripts/config/editclient.phtml1
-rw-r--r--application/views/scripts/config/index.phtml1
-rw-r--r--application/views/scripts/index/config.phtml1
-rw-r--r--data/db/pbsbin0 -> 14336 bytes
-rw-r--r--pbs0
-rw-r--r--public/index.php2
-rw-r--r--public/js/config.js12
-rw-r--r--tests/application/controllers/ConfigControllerTest.php20
15 files changed, 164 insertions, 26 deletions
diff --git a/application/Bootstrap.php b/application/Bootstrap.php
index 35400b1..088bd84 100644
--- a/application/Bootstrap.php
+++ b/application/Bootstrap.php
@@ -4,6 +4,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initAutoload()
{
+
$moduleLoader = new Zend_Application_Module_Autoloader(
array(
'namespace' => '',
diff --git a/application/controllers/ConfigController.php b/application/controllers/ConfigController.php
new file mode 100644
index 0000000..0c8a825
--- /dev/null
+++ b/application/controllers/ConfigController.php
@@ -0,0 +1,47 @@
+<?php
+
+class ConfigController extends Zend_Controller_Action
+{
+
+ public function init()
+ {
+ /* Initialize action controller here */
+
+ }
+
+ public function indexAction()
+ {
+ $form = new Application_Form_Login();
+ $request = $this->getRequest();
+ if ($request->isPost()) {
+ if ($form->isValid($request->getPost())) {
+ // do something here to log in
+ }
+ }
+ $this->view->form = $form;
+ }
+
+ public function addclientAction()
+ {
+ // action body
+ }
+
+ public function editclientAction()
+ {
+ // action body
+ }
+
+ public function deleteclientAction()
+ {
+ // action body
+ }
+
+
+}
+
+
+
+
+
+
+
diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php
index def0377..018ebe6 100644
--- a/application/controllers/IndexController.php
+++ b/application/controllers/IndexController.php
@@ -6,57 +6,62 @@ class IndexController extends Zend_Controller_Action
public function init()
{
$burl = $this->view->baseUrl();
- $v = $this->view;
-
- $v->headLink()
- ->prependStylesheet($burl .'/styles/site.css')
- ->appendStylesheet($burl.'/styles/smoothness/jquery-ui-1.7.2.custom.css');
- $v->headScript()
- ->setFile($burl.'/js/jquery-1.3.2.min.js')
- ->appendFile($burl.'/js/jquery-ui-1.7.2.custom.min.js')
- ->appendFile($burl.'/js/pbs.js');
-
- $v->menubar = array(
- "Home" => "/",
- "Bootmedia" => "/index/bootmedia",
- "Menus" => "/index/menu",
- "Menu Assignment" => "/index/menuassignment"#,
-# "Systeminfo" => "/index/sysinfo"
- );
+ $v = $this->view;
+
+ $v->headLink()
+ ->prependStylesheet($burl .'/styles/site.css')
+ ->appendStylesheet($burl.'/styles/smoothness/jquery-ui-1.7.2.custom.css');
+ $v->headScript()
+ ->setFile($burl.'/js/jquery-1.3.2.min.js')
+ ->appendFile($burl.'/js/jquery-ui-1.7.2.custom.min.js')
+ ->appendFile($burl.'/js/pbs.js')
+ ->appendFile($burl.'/js/config.js');
+
+ $v->menubar = array(
+ "Home" => "/",
+ "Bootmedia" => "/index/bootmedia",
+ "Menus" => "/index/menu",
+ "Menu Assignment" => "/index/menuassignment",
+ "Configuration" => "/index/configuration"
+ #,
+ # "Systeminfo" => "/index/sysinfo"
+ );
}
public function indexAction()
{
$this->view->title = "Home";
- $this->view->headTitle($this->view->title, 'APPEND');
+ $this->view->headTitle($this->view->title, 'APPEND');
}
public function menuAction()
{
$this->view->title = "Menus";
- $this->view->headTitle($this->view->title, 'APPEND');
-
+ $this->view->headTitle($this->view->title, 'APPEND');
}
public function bootmediaAction()
{
$this->view->title = "Bootmedia";
- $this->view->headTitle($this->view->title, 'APPEND');
-
+ $this->view->headTitle($this->view->title, 'APPEND');
}
public function menuassignmentAction()
{
$this->view->title = "Menu Assignment";
- $this->view->headTitle($this->view->title, 'APPEND');
-
+ $this->view->headTitle($this->view->title, 'APPEND');
}
public function sysinfoAction()
{
$this->view->title = "System Information";
- $this->view->headTitle($this->view->title, 'APPEND');
+ $this->view->headTitle($this->view->title, 'APPEND');
+ }
+ public function configAction()
+ {
+ $this->view->title = "Client Configuration";
+ $this->view->headTitle($this->view->title, 'APPEND');
}
@@ -64,3 +69,5 @@ class IndexController extends Zend_Controller_Action
+
+
diff --git a/application/forms/Login.php b/application/forms/Login.php
new file mode 100644
index 0000000..170b100
--- /dev/null
+++ b/application/forms/Login.php
@@ -0,0 +1,38 @@
+<?php
+
+class Application_Form_Login extends Zend_Form
+{
+
+ public function init()
+ {
+ $this->setName("Login");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'username', array(
+ 'filters' => array('StringTrim', 'StringToLower'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Username:',
+ ));
+
+ $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/models/Config.php b/application/models/Config.php
new file mode 100644
index 0000000..5750d71
--- /dev/null
+++ b/application/models/Config.php
@@ -0,0 +1,8 @@
+<?php
+
+class Application_Model_Config
+{
+
+
+}
+
diff --git a/application/views/scripts/config/addclient.phtml b/application/views/scripts/config/addclient.phtml
new file mode 100644
index 0000000..b781ff9
--- /dev/null
+++ b/application/views/scripts/config/addclient.phtml
@@ -0,0 +1 @@
+<br /><br /><center>View script for controller <b>Config</b> and script/action name <b>addclient</b></center> \ No newline at end of file
diff --git a/application/views/scripts/config/deleteclient.phtml b/application/views/scripts/config/deleteclient.phtml
new file mode 100644
index 0000000..3a8b1a9
--- /dev/null
+++ b/application/views/scripts/config/deleteclient.phtml
@@ -0,0 +1 @@
+<br /><br /><center>View script for controller <b>Config</b> and script/action name <b>deleteclient</b></center> \ No newline at end of file
diff --git a/application/views/scripts/config/editclient.phtml b/application/views/scripts/config/editclient.phtml
new file mode 100644
index 0000000..14a7690
--- /dev/null
+++ b/application/views/scripts/config/editclient.phtml
@@ -0,0 +1 @@
+<br /><br /><center>View script for controller <b>Config</b> and script/action name <b>editclient</b></center> \ No newline at end of file
diff --git a/application/views/scripts/config/index.phtml b/application/views/scripts/config/index.phtml
new file mode 100644
index 0000000..4d9a1fb
--- /dev/null
+++ b/application/views/scripts/config/index.phtml
@@ -0,0 +1 @@
+<br /><br /><center>View script for controller <b>Config</b> and script/action name <b>index</b></center> \ No newline at end of file
diff --git a/application/views/scripts/index/config.phtml b/application/views/scripts/index/config.phtml
new file mode 100644
index 0000000..dd77c9c
--- /dev/null
+++ b/application/views/scripts/index/config.phtml
@@ -0,0 +1 @@
+<br /><br /><center>View script for controller <b>Index</b> and script/action name <b>config</b></center> \ No newline at end of file
diff --git a/data/db/pbs b/data/db/pbs
new file mode 100644
index 0000000..f771f57
--- /dev/null
+++ b/data/db/pbs
Binary files differ
diff --git a/pbs b/pbs
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/pbs
diff --git a/public/index.php b/public/index.php
index c8b5cde..5aea4f0 100644
--- a/public/index.php
+++ b/public/index.php
@@ -11,7 +11,7 @@ defined('APPLICATION_ENV')
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
- '/opt/ZF/library',
+// '/opt/ZF/library',
get_include_path(),
)));
diff --git a/public/js/config.js b/public/js/config.js
new file mode 100644
index 0000000..caf1822
--- /dev/null
+++ b/public/js/config.js
@@ -0,0 +1,12 @@
+
+var configCreate = function () {
+
+};
+
+var configEdit = function () {
+
+};
+
+var configDelete = function () {
+
+};
diff --git a/tests/application/controllers/ConfigControllerTest.php b/tests/application/controllers/ConfigControllerTest.php
new file mode 100644
index 0000000..40c5bfe
--- /dev/null
+++ b/tests/application/controllers/ConfigControllerTest.php
@@ -0,0 +1,20 @@
+<?php
+
+require_once 'PHPUnit/Framework/TestCase.php';
+
+class ConfigControllerTest extends PHPUnit_Framework_TestCase
+{
+
+ public function setUp()
+ {
+ /* Setup Routine */
+ }
+
+ public function tearDown()
+ {
+ /* Tear Down Routine */
+ }
+
+
+}
+