php-mpos/public/include/pages/login.inc.php
Sebastian Grewe d4f4b9073f Working jQuery Mobile frontend for mobile devices
* Added mobile device detection PHP library
* Call PHP library to decide which theme to use
* Added theme as a configuration option into global config
 * Selectable Desktop theme (default: mmcFE)
 * Selectable Mobile theme (default: mobile)
 * Disable mobile theme support entirely

**NOTE**: This requires updates to the `global.inc.php` so please check
the dist file and update your config before filing a new issue!

Addresses #25
2013-06-28 13:45:14 +02:00

15 lines
426 B
PHP

<?php
// Make sure we are called from index.php
if (!defined('SECURITY'))
die('Hacking attempt');
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');
}
$smarty->assign('CONTENT', 'default.tpl');
?>