From 7ac0191a1a3367547a9180401aa508df2952085e Mon Sep 17 00:00:00 2001 From: jeena Date: Mon, 8 Jul 2013 22:07:51 +0200 Subject: [PATCH] added AdminController --- application/controller/AdminController.php | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 application/controller/AdminController.php diff --git a/application/controller/AdminController.php b/application/controller/AdminController.php new file mode 100644 index 0000000..342e69a --- /dev/null +++ b/application/controller/AdminController.php @@ -0,0 +1,32 @@ +_location('gate'); + } + + public function gateAction() + { + } + + public function loginAction() + { + if($this->_getParam('password') == '') + { + $_SESSION['logged'] = 1; + $this->_location('index'); + } + else + { + $this->_location('gate', null, array('wrongpassword' => '')); + } + + } + + public function logoutAction() + { + $_SESSION['logged'] = 0; + $this->_location('gate'); + } +}