ob_start(); ?>
@ session_start(); include ('declerations.php'); include('database.php'); include('user.php'); /* Redirects client to specified location */ function RedirectTo($url) { header("Location: ".$url); } /* Provides a means by which a user can get redirected to a selection of locations 'home' : homepage 'barnaby' : barnaby grimes site 'edge' : The edge cronicles 'farflung' : Farflung adventures */ function RedirectToPage($page) { $url = ""; // chose where to go switch($page) { case "home": $url = "index.php"; break; case "barnaby": $url = "barnaby/index.php"; break; case "edge": $url = "edge/index.php"; break; case "farflung": $url = "farflung/index.php"; break; } RedirectTo($url); } /* Checks to see if the posted variable has been entered */ function PostVarEntered($postVar) { if (isset($_POST[$postVar]) && $_POST[$postVar] == '') { return false; } else { return true; } } /* Checks to see if the query string variable has been entered */ function QueryStringVarEntered($getVar) { if (isset($_GET[$getVar]) && $_GET[$getVar] == '') { return false; } else { return true; } } /* Generic email function that leverages the mail facility in PHP to send an HTML formatted or plain text email */ function SendMail($from, $to, $subject, $body, $isHtml) { $headers = "From: ".$from." \r\n"; // set HTML email header if necessary if ($isHtml) { $headers.= "Content-Type: text/html; charset=ISO-8859-1 "; $headers .= "MIME-Version: 1.0 "; } // send mail @ mail($to, $subject, $body, $headers); // next line for testing only //echo("To: ".$to."