start();
$user->setup();
$auth->acl($user->data);
// End session management
extract($_GET);
extract($_POST);
$redirect = (!empty($redirect)) ? $_SERVER['QUERY_STRING'] : '';
// Do the login/logout/form/whatever
if ( isset($login) || isset($logout) )
{
if ( isset($login) && !$user->data['user_id'] )
{
$autologin = ( !empty($autologin) ) ? true : false;
//
// Is the board disabled? Are we an admin? No, then back to the index we go
//
if ( $board_config['board_disable'] && !$auth->acl_get('a_') )
{
redirect("index.$phpEx$SID");
}
if ( !$auth->login($username, $password, $autologin) )
{
$template->assign_vars(array(
'META' => '')
);
$message = $user->lang['Error_login'] . '