add('REDIRECT',$_GET['redirect']); } else { if (verifyUser($_POST['username'], $_POST['password'])) { sess_set('uname',$_POST['username']); header('Location: ' . rawurldecode($_POST['redirect'])); exit; } else { $template = new FITemplate('login'); $template->add('REDIRECT',$_POST['redirect']); $template->adds_block('ERROR',array('MSG' => "The username/password pair didn't resolve to a real user. Try logging on again, spelling the password right, or making sure you actually have an a account.")); } } $template->display(); ?>