summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-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
10 files changed, 131 insertions, 25 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