Revision 365, 0.7 KB
(checked in by exi, 14 years ago)
|
Updated included EVEAPI to 2.71
Included a mod_xajax compatible apiuser mod
Tweaked some code of the apiuser mod (menu, xajax, templates)
Removed the post.php from the xajax mod.
|
Line | |
---|
1 | <?php |
---|
2 | $page = new Page('Login'); |
---|
3 | // print_r($_SESSION['user']); |
---|
4 | |
---|
5 | if (trim($_POST['usrpass'])) |
---|
6 | { |
---|
7 | $result = user::login($_POST['usrlogin'], $_POST['usrpass']); |
---|
8 | if ( $_POST['usrlogin'] == '' && $_POST['usrpass'] == ADMIN_PASSWORD || user::role('admin') ) |
---|
9 | { |
---|
10 | session::create(true); |
---|
11 | |
---|
12 | header('Location: ?a=admin'); |
---|
13 | } |
---|
14 | else |
---|
15 | { |
---|
16 | |
---|
17 | if ($result) |
---|
18 | { |
---|
19 | header('Location: ?a=home'); |
---|
20 | } |
---|
21 | else |
---|
22 | { |
---|
23 | $smarty->assign('error', 'Login error, please check your username and password.'); |
---|
24 | } |
---|
25 | } |
---|
26 | } |
---|
27 | |
---|
28 | $page->setContent($smarty->fetch('../mods/apiuser/templates/user_login.tpl')); |
---|
29 | $page->generate(); |
---|
30 | ?> |
---|