<?php error_reporting(E_ALL); ini_set('display_errors', 1); ob_start(); // Output buffering - allows header rewrites to happen at anytime before flushing the buffer session_start(); require_once("incdir.php.inc"); require_once("config.php"); include_php_dir("includes",$debug); mysql_init(); handle_ajax(); document_header(); echo include_javascript_dir("js"); echo include_stylesheet_dir("stylesheets"); if (isset($_SESSION['validated']) && $_SESSION['validated']) { redirect("index.php"); } //Logged in users should not be at this page if (!isset($_POST['username']) AND !isset($_POST['password'])) { drawlogin(NULL); } //No action yet elseif (!$_POST['username'] OR !$_POST['password']) { drawlogin("missing"); } elseif (validate($_POST['username'],$_POST['password'])) { redirect("index.php");
<?php ob_start(); // Output buffering - allows header rewrites to happen at anytime before flushing the buffer session_start(); require_once "incdir.php.inc"; require_once "config.php"; include_php_dir("includes"); mysql_init(); document_header(); echo include_javascript_dir("js", $debug); echo include_stylesheet_dir("stylesheets", $debug); check_validated(); //Any pre-page logic should go here! if (isset($_POST['addpoints-submit'])) { add_points(strtolower($_POST['note']), $_POST['value'], $_GET['user_id']); } if (isset($_POST['removepoints-submit'])) { remove_points($_POST['point_id']); } if (count($_SESSION['notifications']) != 0) { draw_notification(); } if (isset($_GET['user_id'])) { $userinfo = get_user_info($_GET['user_id']); } draw_page($userinfo); close_page(); ob_end_flush(); // Flush the buffer out to client document_footer();