* Removed unneeded template icons * Added new icon font * Added icons to navbard * Added full admin features Updates #444
17 lines
666 B
PHP
17 lines
666 B
PHP
<?php
|
|
|
|
// Make sure we are called from index.php
|
|
if (!defined('SECURITY')) die('Hacking attempt');
|
|
|
|
if ($setting->getValue('maintenance') && !$user->isAdmin($user->getUserId($_POST['username']))) {
|
|
$_SESSION['POPUP'][] = array('CONTENT' => 'You are not allowed to login during maintenace.', 'TYPE' => 'info');
|
|
} else if ($user->checkLogin(@$_POST['username'], @$_POST['password']) ) {
|
|
header('Location: index.php?page=home');
|
|
} else if (@$_POST['username'] && @$_POST['password']) {
|
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Unable to login: '. $user->getError(), 'TYPE' => 'errormsg');
|
|
}
|
|
|
|
// Load login template
|
|
$smarty->assign('CONTENT', 'default.tpl');
|
|
?>
|