function web_validate_session_and_redirect() { global $page_title, $page_file, $page_error; if (web_validate_session()) { return TRUE; } $page_title = "Not logged in"; $page_file = "not-loggedin.php"; $page_error = "You're not logged in. Your session might have timed out if you were previously logged in."; if (isset($_GET["page"])) { $_SESSION["redirect_page"] = $_GET["page"]; } header("Location: {$root_url}" . "not-logged-in"); return FALSE; }
} $page_file = "paypal.php"; $page_title = "Return from PayPal"; break; /* * Show start page or, for logged in users, their default page * */ /* * Show start page or, for logged in users, their default page * */ default: $page_file = "frontpage.php"; $page_title = "Distributed online cracking that doesn't suck"; if (web_validate_session()) { $page_file = "loggedin.php"; $page_title = "Logged in - Home"; } break; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="sv" xmlns="http://www.w3.org/1999/xhtml" xml:lang="sv"> <head> <title><?php echo htmlspecialchars($page_title); ?> </title> <meta name="description" content="Distributed, online cracking that doesn't suck"/> <meta name="keywords" content="Distributed,cracking,online,md5,des,rawmd5,password,plaintext"/>