You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

26 lines
646 B

<?php
class AdminloginController extends BaseController
{
function load()
{
$this->session_only = false;
}
function dispatch()
{
$this->page->setTitle(__('title.administration', APP_TITLE));
$this->page->menuAddLink(__('page.home'), 'main');
$this->page->menuAddLink(__('page.administration'), 'admin', true);
$cd = new \Modl\ConfigDAO();
$config = $cd->get();
if($config->user == $_POST['username']
&& $config->pass == sha1($_POST['password'])) {
$_SESSION['admin'] = true;
$this->name = 'admin';
}
}
}