added some useful models and controllers
This commit is contained in:
parent
a6873ee6c8
commit
57c0436f14
45 changed files with 6456 additions and 0 deletions
32
application/controller/AdminController.php
Normal file
32
application/controller/AdminController.php
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
class AdminController extends Katharsis_Controller_Abstract
|
||||
{
|
||||
public function indexAction()
|
||||
{
|
||||
if(!Access::isLogged()) $this->_location('gate');
|
||||
}
|
||||
|
||||
public function gateAction()
|
||||
{
|
||||
}
|
||||
|
||||
public function loginAction()
|
||||
{
|
||||
if($this->_getParam('password') == 'holzmitloch')
|
||||
{
|
||||
$_SESSION['logged'] = 1;
|
||||
$this->_location('index');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_location('gate', null, array('wrongpassword' => ''));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function logoutAction()
|
||||
{
|
||||
$_SESSION['logged'] = 0;
|
||||
$this->_location('gate');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue