root/dev/common/login.php @ 370

Revision 370, 0.8 KB (checked in by kovell, 13 years ago)

- SQL queries optimised for speed and error protection.
- feed syndication optimised
- front page includes optional clock and optional kill/loss display
- mysqli support added
- transaction protection of kills added where supported (mysqli and InnoDB)
- summary tables and contracts show total destroyed value instead of ship value
- html errors reduced
- related kill calculation improved
- query caching errors reduced
- minor bugfixes
- Smarty 2.6.25 added
- apoc fitting mod added and modded
- code optimisations
- code comments added (doxygen format)
- conflicting mods are now identified

RevLine 
[92]1<?php
[188]2$page = new Page('Login');
[92]3
[188]4if (trim($_POST['usrpass']))
[92]5{
[370]6    // Allow plain text passwords for compatibility with older boards when updating.
7    if ($_POST['usrlogin'] == '' && (crypt($_POST['usrpass'],ADMIN_PASSWORD) == ADMIN_PASSWORD || $_POST['usrpass'] == ADMIN_PASSWORD))
[92]8    {
[254]9        session::create(true);
[188]10
11        header('Location: ?a=admin');
12    }
13    else
14    {
15        $result = user::login($_POST['usrlogin'], $_POST['usrpass']);
16        if ($result)
[92]17        {
[188]18            header('Location: ?a=home');
[92]19        }
20        else
21        {
[188]22            $smarty->assign('error', 'Login error, please check your username and password.');
[92]23        }
24    }
25}
26
[188]27$page->setContent($smarty->fetch(get_tpl('user_login')));
[92]28$page->generate();
[31]29?>
Note: See TracBrowser for help on using the browser.