perform($user_id,$_POST['user_pwd'],1,true,$user_remember)) { $_SESSION['sess_user_id'] = $user_id; $redir = 'index.php'; if (!empty($_SESSION['sess_auth_from'])) { if ($_SESSION['sess_auth_from'] != $_SERVER['REQUEST_URI']) { $redir = $_SESSION['sess_auth_from']; } unset($_SESSION['sess_auth_from']); } header('Location: '.$redir); exit; } else { $err = __('Login failed. Please try again.'); } } else { $user_id = ''; } header('Content-Type: text/html; charset='.dc_encoding); ?>