Source for file login.php
Documentation is available at login.php
require_once './include/version.php';
require_once dirname(__FILE__ ) . '/lib/core.php';
require_once 'smarty/libs/Smarty.class.php';
$smarty->plugins_dir[] = 'include';
require_once $smarty->_get_plugin_filepath('function', 'html_doctype');
$smarty->assign('noNav', true);
if (isset ($_POST['submit'])) {
if (!$login->submit_login($_POST['username'], $_POST['password'])) {
$notify[] = array('title' => 'Login Failed',
'desc' => 'invalid username/password combo',
$notify[] = array('title' => 'Login Succeeded',
'desc' => 'You are logged in as <strong>' . $_POST['username'] . '</strong>',
//header( 'Location: index.php' ) ;
$notify[] = array('title' => 'Database Error',
'desc' => 'Can\'t connect to database server. <a href="settings.php">Check settings</a>.: ' . $e->getMessage(),
} elseif (isset ($_GET['logout'])) {
unset ($_SESSION['uid']);
$notify[] = array('title' => 'Logout Succeeded',
'desc' => 'You have been successfully logged out from the system',
$smarty->assign('notifMsg', $notify);
$smarty->assign('pageTitle', 'phpUserTrack Login Page');
$smarty->display('header.tpl');
$smarty->display('login.tpl');
$smarty->display('footer.tpl');
|