Index: trunk/wb/search/search.php
===================================================================
--- trunk/wb/search/search.php	(revision 285)
+++ trunk/wb/search/search.php	(revision 286)
@@ -23,7 +23,10 @@
 
 */
 
-if(!defined('WB_URL')) { header('Location: index.php'); }
+if(!defined('WB_URL')) { 
+	header('Location: index.php');
+	exit(0);
+}
 
 // Check if search is enabled
 if(SHOW_SEARCH != true) {
Index: trunk/wb/install/index.php
===================================================================
--- trunk/wb/install/index.php	(revision 285)
+++ trunk/wb/install/index.php	(revision 286)
@@ -32,10 +32,11 @@
 
 // Check if the page has been reloaded
 if(!isset($_GET['sessions_checked']) OR $_GET['sessions_checked'] != 'true') {
-   // Set session variable
-   $_SESSION['session_support'] = '<font class="good">Enabled</font>';
-   // Reload page
-   header('Location: index.php?sessions_checked=true');
+	// Set session variable
+	$_SESSION['session_support'] = '<font class="good">Enabled</font>';
+	// Reload page
+	header('Location: index.php?sessions_checked=true');
+	exit(0);
 } else {
    // Check if session variable has been saved after reload
    if(isset($_SESSION['session_support'])) {
Index: trunk/wb/admin/groups/save.php
===================================================================
--- trunk/wb/admin/groups/save.php	(revision 285)
+++ trunk/wb/admin/groups/save.php	(revision 286)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: save.php,v 1.4 2005/04/02 06:25:37 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -34,6 +34,7 @@
 // Check if group group_id is a valid number and doesnt equal 1
 if(!isset($_POST['group_id']) OR !is_numeric($_POST['group_id']) OR $_POST['group_id'] == 1) {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$group_id = $_POST['group_id'];
 }
Index: trunk/wb/admin/groups/groups.php
===================================================================
--- trunk/wb/admin/groups/groups.php	(revision 285)
+++ trunk/wb/admin/groups/groups.php	(revision 286)
@@ -32,11 +32,13 @@
 
 if(!isset($_POST['action']) OR $_POST['action'] != "modify" AND $_POST['action'] != "delete") {
 	header("Location: index.php");
+	exit(0);
 }
 
 // Check if group group_id is a valid number and doesnt equal 1
 if(!isset($_POST['group_id']) OR !is_numeric($_POST['group_id']) OR $_POST['group_id'] == 1) {
 	header("Location: index.php");
+	exit(0);
 }
 
 if($_POST['action'] == 'modify') {
Index: trunk/wb/admin/media/rename2.php
===================================================================
--- trunk/wb/admin/media/rename2.php	(revision 285)
+++ trunk/wb/admin/media/rename2.php	(revision 286)
@@ -56,6 +56,7 @@
 // Get the temp id
 if(!is_numeric($admin->get_post('id'))) {
 	header("Location: browse.php?dir=$directory");
+	exit(0);
 } else {
 	$file_id = $admin->get_post('id');
 }
Index: trunk/wb/admin/media/browse.php
===================================================================
--- trunk/wb/admin/media/browse.php	(revision 285)
+++ trunk/wb/admin/media/browse.php	(revision 286)
@@ -57,6 +57,7 @@
 if($admin->get_get('up') == 1) {
 	$parent_directory = dirname($directory);
 	header("Location: browse.php?dir=$parent_directory");	
+	exit(0);
 }
 
 // Workout the parent dir link
Index: trunk/wb/admin/media/delete.php
===================================================================
--- trunk/wb/admin/media/delete.php	(revision 285)
+++ trunk/wb/admin/media/delete.php	(revision 286)
@@ -48,6 +48,7 @@
 // Get the temp id
 if(!is_numeric($admin->get_get('id'))) {
 	header("Location: browse.php?dir=$directory");
+	exit(0);
 } else {
 	$file_id = $admin->get_get('id');
 }
Index: trunk/wb/admin/media/create.php
===================================================================
--- trunk/wb/admin/media/create.php	(revision 285)
+++ trunk/wb/admin/media/create.php	(revision 286)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: create.php,v 1.10 2005/04/25 11:53:12 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -26,11 +26,13 @@
 // Get dir name and target location
 if(!isset($_POST['name']) OR $_POST['name'] == '') {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$name = $_POST['name'];
 }
 if(!isset($_POST['target']) OR $_POST['target'] == '') {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$target = $_POST['target'];
 }
Index: trunk/wb/admin/media/upload.php
===================================================================
--- trunk/wb/admin/media/upload.php	(revision 285)
+++ trunk/wb/admin/media/upload.php	(revision 286)
@@ -26,6 +26,7 @@
 // Target location
 if(!isset($_POST['target']) OR $_POST['target'] == '') {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$target = $_POST['target'];
 }
Index: trunk/wb/admin/media/rename.php
===================================================================
--- trunk/wb/admin/media/rename.php	(revision 285)
+++ trunk/wb/admin/media/rename.php	(revision 286)
@@ -47,6 +47,7 @@
 // Get the temp id
 if(!is_numeric($admin->get_get('id'))) {
 	header("Location: browse.php?dir=$directory");
+	exit(0);
 } else {
 	$file_id = $admin->get_get('id');
 }
Index: trunk/wb/admin/templates/uninstall.php
===================================================================
--- trunk/wb/admin/templates/uninstall.php	(revision 285)
+++ trunk/wb/admin/templates/uninstall.php	(revision 286)
@@ -26,6 +26,7 @@
 // Check if user selected template
 if(!isset($_POST['file']) OR $_POST['file'] == "") {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$file = $_POST['file'];
 }
@@ -33,6 +34,7 @@
 // Extra protection
 if(trim($file) == '') {
 	header("Location: index.php");
+	exit(0);
 }
 
 // Setup admin object
Index: trunk/wb/admin/templates/details.php
===================================================================
--- trunk/wb/admin/templates/details.php	(revision 285)
+++ trunk/wb/admin/templates/details.php	(revision 286)
@@ -29,6 +29,7 @@
 // Get template name
 if(!isset($_POST['file']) OR $_POST['file'] == "") {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$file = $_POST['file'];
 }
@@ -36,6 +37,7 @@
 // Check if the template exists
 if(!file_exists(WB_PATH.'/templates/'.$file)) {
 	header("Location: index.php");
+	exit(0);
 }
 
 // Print admin header
Index: trunk/wb/admin/templates/install.php
===================================================================
--- trunk/wb/admin/templates/install.php	(revision 285)
+++ trunk/wb/admin/templates/install.php	(revision 286)
@@ -26,6 +26,7 @@
 // Check if user uploaded a file
 if(!isset($_FILES['userfile'])) {
 	header("Location: index.php");
+	exit(0);
 }
 
 // Setup admin object
Index: trunk/wb/admin/pages/move_down.php
===================================================================
--- trunk/wb/admin/pages/move_down.php	(revision 285)
+++ trunk/wb/admin/pages/move_down.php	(revision 286)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: move_down.php,v 1.2 2005/04/02 06:25:37 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -41,6 +41,7 @@
 	}
 } else {
 	header("Location: index.php");
+	exit(0);
 }
 
 // Create new admin object and print admin header
Index: trunk/wb/admin/pages/save.php
===================================================================
--- trunk/wb/admin/pages/save.php	(revision 285)
+++ trunk/wb/admin/pages/save.php	(revision 286)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: save.php,v 1.2 2005/04/02 06:25:37 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -26,11 +26,13 @@
 // Get page & section id
 if(!isset($_POST['page_id']) OR !is_numeric($_POST['page_id'])) {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$page_id = $_POST['page_id'];
 }
 if(!isset($_POST['section_id']) OR !is_numeric($_POST['section_id'])) {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$section_id = $_POST['section_id'];
 }
Index: trunk/wb/admin/pages/settings.php
===================================================================
--- trunk/wb/admin/pages/settings.php	(revision 285)
+++ trunk/wb/admin/pages/settings.php	(revision 286)
@@ -24,6 +24,7 @@
 // Get page id
 if(!isset($_GET['page_id']) OR !is_numeric($_GET['page_id'])) {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$page_id = $_GET['page_id'];
 }
Index: trunk/wb/admin/pages/delete.php
===================================================================
--- trunk/wb/admin/pages/delete.php	(revision 285)
+++ trunk/wb/admin/pages/delete.php	(revision 286)
@@ -26,6 +26,7 @@
 // Get page id
 if(!isset($_GET['page_id']) OR !is_numeric($_GET['page_id'])) {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$page_id = $_GET['page_id'];
 }
Index: trunk/wb/admin/pages/sections_save.php
===================================================================
--- trunk/wb/admin/pages/sections_save.php	(revision 285)
+++ trunk/wb/admin/pages/sections_save.php	(revision 286)
@@ -29,11 +29,13 @@
 // Make sure people are allowed to access this page
 if(MANAGE_SECTIONS != 'enabled') {
 	header('Location: '.ADMIN_URL.'/pages/index.php');
+	exit(0);
 }
 
 // Get page id
 if(!isset($_GET['page_id']) OR !is_numeric($_GET['page_id'])) {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$page_id = $_GET['page_id'];
 }
Index: trunk/wb/admin/pages/move_up.php
===================================================================
--- trunk/wb/admin/pages/move_up.php	(revision 285)
+++ trunk/wb/admin/pages/move_up.php	(revision 286)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: move_up.php,v 1.2 2005/04/02 06:25:37 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -41,6 +41,7 @@
 	}
 } else {
 	header("Location: index.php");
+	exit(0);
 }
 
 // Create new admin object and print admin header
Index: trunk/wb/admin/pages/intro2.php
===================================================================
--- trunk/wb/admin/pages/intro2.php	(revision 285)
+++ trunk/wb/admin/pages/intro2.php	(revision 286)
@@ -26,6 +26,7 @@
 // Get posted content
 if(!isset($_POST['content'])) {
 	header("Location: intro.php");
+	exit(0);
 } else {
 	$content = $_POST['content'];
 }
Index: trunk/wb/admin/pages/settings2.php
===================================================================
--- trunk/wb/admin/pages/settings2.php	(revision 285)
+++ trunk/wb/admin/pages/settings2.php	(revision 286)
@@ -26,6 +26,7 @@
 // Get page id
 if(!isset($_POST['page_id']) OR !is_numeric($_POST['page_id'])) {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$page_id = $_POST['page_id'];
 }
Index: trunk/wb/admin/pages/restore.php
===================================================================
--- trunk/wb/admin/pages/restore.php	(revision 285)
+++ trunk/wb/admin/pages/restore.php	(revision 286)
@@ -26,6 +26,7 @@
 // Get page id
 if(!isset($_GET['page_id']) OR !is_numeric($_GET['page_id'])) {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$page_id = $_GET['page_id'];
 }
Index: trunk/wb/admin/pages/sections.php
===================================================================
--- trunk/wb/admin/pages/sections.php	(revision 285)
+++ trunk/wb/admin/pages/sections.php	(revision 286)
@@ -27,11 +27,13 @@
 // Make sure people are allowed to access this page
 if(MANAGE_SECTIONS != 'enabled') {
 	header('Location: '.ADMIN_URL.'/pages/index.php');
+	exit(0);
 }
 
 // Get page id
 if(!isset($_GET['page_id']) OR !is_numeric($_GET['page_id'])) {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$page_id = $_GET['page_id'];
 }
Index: trunk/wb/admin/pages/modify.php
===================================================================
--- trunk/wb/admin/pages/modify.php	(revision 285)
+++ trunk/wb/admin/pages/modify.php	(revision 286)
@@ -26,6 +26,7 @@
 // Get page id
 if(!isset($_GET['page_id']) OR !is_numeric($_GET['page_id'])) {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$page_id = $_GET['page_id'];
 }
Index: trunk/wb/admin/interface/time_formats.php
===================================================================
--- trunk/wb/admin/interface/time_formats.php	(revision 285)
+++ trunk/wb/admin/interface/time_formats.php	(revision 286)
@@ -33,6 +33,7 @@
 
 if(!defined('WB_URL')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 // Define that this file is loaded
Index: trunk/wb/admin/interface/charsets.php
===================================================================
--- trunk/wb/admin/interface/charsets.php	(revision 285)
+++ trunk/wb/admin/interface/charsets.php	(revision 286)
@@ -33,6 +33,7 @@
 
 if(!defined('WB_URL')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 // Create array
Index: trunk/wb/admin/interface/timezones.php
===================================================================
--- trunk/wb/admin/interface/timezones.php	(revision 285)
+++ trunk/wb/admin/interface/timezones.php	(revision 286)
@@ -33,6 +33,7 @@
 
 if(!defined('WB_URL')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 // Create array
Index: trunk/wb/admin/interface/er_levels.php
===================================================================
--- trunk/wb/admin/interface/er_levels.php	(revision 285)
+++ trunk/wb/admin/interface/er_levels.php	(revision 286)
@@ -34,6 +34,7 @@
 
 if(!defined('WB_URL')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 // Define that this file is loaded
Index: trunk/wb/admin/interface/version.php
===================================================================
--- trunk/wb/admin/interface/version.php	(revision 285)
+++ trunk/wb/admin/interface/version.php	(revision 286)
@@ -33,6 +33,7 @@
 
 if(!defined('WB_URL')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 define('VERSION', '2.6.1');
Index: trunk/wb/admin/interface/date_formats.php
===================================================================
--- trunk/wb/admin/interface/date_formats.php	(revision 285)
+++ trunk/wb/admin/interface/date_formats.php	(revision 286)
@@ -33,6 +33,7 @@
 
 if(!defined('WB_URL')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 // Define that this file is loaded
Index: trunk/wb/admin/settings/tool.php
===================================================================
--- trunk/wb/admin/settings/tool.php	(revision 285)
+++ trunk/wb/admin/settings/tool.php	(revision 286)
@@ -29,6 +29,7 @@
 
 if(!isset($_GET['tool'])) {
 	header("Location: index.php?advanced=yes");
+	exit(0);
 }
 
 // Check if tool is installed
@@ -35,6 +36,7 @@
 $result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'tool' AND directory = '".$_GET['tool']."'");
 if($result->numRows() == 0) {
 	header("Location: index.php?advanced=yes");
+	exit(0);
 }
 $tool = $result->fetchRow();
 
Index: trunk/wb/admin/users/save.php
===================================================================
--- trunk/wb/admin/users/save.php	(revision 285)
+++ trunk/wb/admin/users/save.php	(revision 286)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: save.php,v 1.4 2005/04/02 06:25:53 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -34,6 +34,7 @@
 // Check if user id is a valid number and doesnt equal 1
 if(!isset($_POST['user_id']) OR !is_numeric($_POST['user_id']) OR $_POST['user_id'] == 1) {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$user_id = $_POST['user_id'];
 }
Index: trunk/wb/admin/users/users.php
===================================================================
--- trunk/wb/admin/users/users.php	(revision 285)
+++ trunk/wb/admin/users/users.php	(revision 286)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: users.php,v 1.4 2005/04/02 06:25:53 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -32,11 +32,13 @@
 
 if(!isset($_POST['action']) OR $_POST['action'] != "modify" AND $_POST['action'] != "delete") {
 	header("Location: index.php");
+	exit(0);
 }
 
 // Check if user id is a valid number and doesnt equal 1
 if(!isset($_POST['user_id']) OR !is_numeric($_POST['user_id']) OR $_POST['user_id'] == 1) {
 	header("Location: index.php");
+	exit(0);
 }
 
 if($_POST['action'] == 'modify') {
Index: trunk/wb/admin/languages/uninstall.php
===================================================================
--- trunk/wb/admin/languages/uninstall.php	(revision 285)
+++ trunk/wb/admin/languages/uninstall.php	(revision 286)
@@ -26,11 +26,13 @@
 // Check if user selected language
 if(!isset($_POST['code']) OR $_POST['code'] == "") {
 	header("Location: index.php");
+	exit(0);
 }
 
 // Extra protection
 if(trim($_POST['code']) == '') {
 	header("Location: index.php");
+	exit(0);
 }
 
 // Setup admin object
Index: trunk/wb/admin/languages/details.php
===================================================================
--- trunk/wb/admin/languages/details.php	(revision 285)
+++ trunk/wb/admin/languages/details.php	(revision 286)
@@ -29,6 +29,7 @@
 // Get language name
 if(!isset($_POST['code']) OR $_POST['code'] == "") {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$code = $_POST['code'];
 }
@@ -36,6 +37,7 @@
 // Check if the language exists
 if(!file_exists(WB_PATH.'/languages/'.$code.'.php')) {
 	header("Location: index.php");
+	exit(0);
 }
 
 // Print admin header
Index: trunk/wb/admin/languages/install.php
===================================================================
--- trunk/wb/admin/languages/install.php	(revision 285)
+++ trunk/wb/admin/languages/install.php	(revision 286)
@@ -26,6 +26,7 @@
 // Check if user uploaded a file
 if(!isset($_FILES['userfile'])) {
 	header("Location: index.php");
+	exit(0);
 }
 
 // Setup admin object
Index: trunk/wb/admin/modules/uninstall.php
===================================================================
--- trunk/wb/admin/modules/uninstall.php	(revision 285)
+++ trunk/wb/admin/modules/uninstall.php	(revision 286)
@@ -26,6 +26,7 @@
 // Check if user selected module
 if(!isset($_POST['file']) OR $_POST['file'] == "") {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$file = $_POST['file'];
 }
@@ -33,6 +34,7 @@
 // Extra protection
 if(trim($file) == '') {
 	header("Location: index.php");
+	exit(0);
 }
 
 // Setup admin object
Index: trunk/wb/admin/modules/details.php
===================================================================
--- trunk/wb/admin/modules/details.php	(revision 285)
+++ trunk/wb/admin/modules/details.php	(revision 286)
@@ -29,6 +29,7 @@
 // Get module name
 if(!isset($_POST['file']) OR $_POST['file'] == "") {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$file = $_POST['file'];
 }
@@ -36,6 +37,7 @@
 // Check if the module exists
 if(!file_exists(WB_PATH.'/modules/'.$file)) {
 	header("Location: index.php");
+	exit(0);
 }
 
 // Print admin header
Index: trunk/wb/admin/modules/install.php
===================================================================
--- trunk/wb/admin/modules/install.php	(revision 285)
+++ trunk/wb/admin/modules/install.php	(revision 286)
@@ -26,6 +26,7 @@
 // Check if user uploaded a file
 if(!isset($_FILES['userfile'])) {
 	header("Location: index.php");
+	exit(0);
 }
 
 // Setup admin object
Index: trunk/wb/modules/form/modify_field.php
===================================================================
--- trunk/wb/modules/form/modify_field.php	(revision 285)
+++ trunk/wb/modules/form/modify_field.php	(revision 286)
@@ -33,6 +33,7 @@
 // Get id
 if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
+	exit(0);
 } else {
 	$field_id = $_GET['field_id'];
 }
Index: trunk/wb/modules/form/move_down.php
===================================================================
--- trunk/wb/modules/form/move_down.php	(revision 285)
+++ trunk/wb/modules/form/move_down.php	(revision 286)
@@ -33,6 +33,7 @@
 // Get id
 if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$field_id = $_GET['field_id'];
 }
Index: trunk/wb/modules/form/save_field.php
===================================================================
--- trunk/wb/modules/form/save_field.php	(revision 285)
+++ trunk/wb/modules/form/save_field.php	(revision 286)
@@ -33,6 +33,7 @@
 // Get id
 if(!isset($_POST['field_id']) OR !is_numeric($_POST['field_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
+	exit(0);
 } else {
 	$field_id = $_POST['field_id'];
 	$field_id = $field_id;
Index: trunk/wb/modules/form/delete_field.php
===================================================================
--- trunk/wb/modules/form/delete_field.php	(revision 285)
+++ trunk/wb/modules/form/delete_field.php	(revision 286)
@@ -33,6 +33,7 @@
 // Get id
 if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
+	exit(0);
 } else {
 	$field_id = $_GET['field_id'];
 }
Index: trunk/wb/modules/form/move_up.php
===================================================================
--- trunk/wb/modules/form/move_up.php	(revision 285)
+++ trunk/wb/modules/form/move_up.php	(revision 286)
@@ -33,6 +33,7 @@
 // Get id
 if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
 	header("Location: index.php");
+	exit(0);
 } else {
 	$field_id = $_GET['field_id'];
 }
Index: trunk/wb/modules/form/delete_submission.php
===================================================================
--- trunk/wb/modules/form/delete_submission.php	(revision 285)
+++ trunk/wb/modules/form/delete_submission.php	(revision 286)
@@ -33,6 +33,7 @@
 // Get id
 if(!isset($_GET['submission_id']) OR !is_numeric($_GET['submission_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
+	exit(0);
 } else {
 	$submission_id = $_GET['submission_id'];
 }
Index: trunk/wb/modules/form/view_submission.php
===================================================================
--- trunk/wb/modules/form/view_submission.php	(revision 285)
+++ trunk/wb/modules/form/view_submission.php	(revision 286)
@@ -33,6 +33,7 @@
 // Get id
 if(!isset($_GET['submission_id']) OR !is_numeric($_GET['submission_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
+	exit(0);
 } else {
 	$submission_id = $_GET['submission_id'];
 }
Index: trunk/wb/modules/backup/backup-sql.php
===================================================================
--- trunk/wb/modules/backup/backup-sql.php	(revision 285)
+++ trunk/wb/modules/backup/backup-sql.php	(revision 286)
@@ -27,7 +27,10 @@
 $filename = $_SERVER['HTTP_HOST'].'-backup-'.gmdate('Y-m-d', mktime()+TIMEZONE).'.sql';
 
 // Check if user clicked on the backup button
-if(!isset($_POST['backup'])){ header('Location: ../'); }
+if(!isset($_POST['backup'])){ 
+	header('Location: ../');
+	exit(0);
+}
 
 // Include config
 require_once('../../config.php');
Index: trunk/wb/modules/news/modify_post.php
===================================================================
--- trunk/wb/modules/news/modify_post.php	(revision 285)
+++ trunk/wb/modules/news/modify_post.php	(revision 286)
@@ -28,6 +28,7 @@
 // Get id
 if(!isset($_GET['post_id']) OR !is_numeric($_GET['post_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
+	exit(0);
 } else {
 	$post_id = $_GET['post_id'];
 }
Index: trunk/wb/modules/news/move_down.php
===================================================================
--- trunk/wb/modules/news/move_down.php	(revision 285)
+++ trunk/wb/modules/news/move_down.php	(revision 286)
@@ -29,6 +29,7 @@
 if(!isset($_GET['post_id']) OR !is_numeric($_GET['post_id'])) {
 	if(!isset($_GET['group_id']) OR !is_numeric($_GET['group_id'])) {
 		header("Location: index.php");
+		exit(0);
 	} else {
 		$id = $_GET['group_id'];
 		$id_field = 'group_id';
Index: trunk/wb/modules/news/comment_page.php
===================================================================
--- trunk/wb/modules/news/comment_page.php	(revision 285)
+++ trunk/wb/modules/news/comment_page.php	(revision 286)
@@ -24,12 +24,16 @@
 */
 
 // Make sure page cannot be accessed directly
-if(!defined('WB_URL')) { header('Location: ../index.php'); }
+if(!defined('WB_URL')) { 
+	header('Location: ../index.php');
+	exit(0);
+}
 	
 // Get comments page template details from db
 $query_settings = $database->query("SELECT comments_page,use_captcha FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '".SECTION_ID."'");
 if($query_settings->numRows() == 0) {
 	header('Location: '.WB_URL.'/pages/');
+	exit(0);
 } else {
 	$settings = $query_settings->fetchRow();
 	// Print comments page
Index: trunk/wb/modules/news/comment.php
===================================================================
--- trunk/wb/modules/news/comment.php	(revision 285)
+++ trunk/wb/modules/news/comment.php	(revision 286)
@@ -30,6 +30,7 @@
 if(!isset($_GET['id']) OR !is_numeric($_GET['id'])) {
 	if(!isset($_POST['post_id']) OR !is_numeric($_POST['post_id'])) {
 		header('Location: '.WB_URL.'/pages/');
+		exit(0);
 	} else {
 		$post_id = $_POST['post_id'];
 	}
@@ -45,6 +46,7 @@
 $query_post = $database->query("SELECT post_id,title,section_id,page_id FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id'");
 if($query_post->numRows() == 0) {
 	header('Location: '.WB_URL.'/pages/');
+	exit(0);
 } else {
 	$fetch_post = $query_post->fetchRow();
 	$page_id = $fetch_post['page_id'];
@@ -58,6 +60,7 @@
 	$query_page = $database->query("SELECT parent,page_title,menu_title,keywords,description,visibility FROM ".TABLE_PREFIX."pages WHERE page_id = '$page_id'");
 	if($query_page->numRows() == 0) {
 		header('Location: '.WB_URL.'/pages/');
+		exit(0);
 	} else {
 		$page = $query_page->fetchRow();
 		// Required page details
Index: trunk/wb/modules/news/save_post.php
===================================================================
--- trunk/wb/modules/news/save_post.php	(revision 285)
+++ trunk/wb/modules/news/save_post.php	(revision 286)
@@ -28,6 +28,7 @@
 // Get id
 if(!isset($_POST['post_id']) OR !is_numeric($_POST['post_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
+	exit(0);
 } else {
 	$id = $_POST['post_id'];
 	$post_id = $id;
Index: trunk/wb/modules/news/modify_group.php
===================================================================
--- trunk/wb/modules/news/modify_group.php	(revision 285)
+++ trunk/wb/modules/news/modify_group.php	(revision 286)
@@ -28,6 +28,7 @@
 // Get id
 if(!isset($_GET['group_id']) OR !is_numeric($_GET['group_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
+	exit(0);
 } else {
 	$group_id = $_GET['group_id'];
 }
Index: trunk/wb/modules/news/rss.php
===================================================================
--- trunk/wb/modules/news/rss.php	(revision 285)
+++ trunk/wb/modules/news/rss.php	(revision 286)
@@ -29,6 +29,7 @@
 	define('PAGE_ID', $page_id);
 } else {
 	header('Location: '.WB_URL);
+	exit(0);
 }
 if(isset($_GET['group_id']) AND is_numeric($_GET['group_id'])) {
 	$group_id = $_GET['group_id'];
Index: trunk/wb/modules/news/delete_post.php
===================================================================
--- trunk/wb/modules/news/delete_post.php	(revision 285)
+++ trunk/wb/modules/news/delete_post.php	(revision 286)
@@ -28,6 +28,7 @@
 // Get id
 if(!isset($_GET['post_id']) OR !is_numeric($_GET['post_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
+	exit(0);
 } else {
 	$post_id = $_GET['post_id'];
 }
Index: trunk/wb/modules/news/modify_comment.php
===================================================================
--- trunk/wb/modules/news/modify_comment.php	(revision 285)
+++ trunk/wb/modules/news/modify_comment.php	(revision 286)
@@ -28,6 +28,7 @@
 // Get id
 if(!isset($_GET['comment_id']) OR !is_numeric($_GET['comment_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
+	exit(0);
 } else {
 	$comment_id = $_GET['comment_id'];
 }
Index: trunk/wb/modules/news/move_up.php
===================================================================
--- trunk/wb/modules/news/move_up.php	(revision 285)
+++ trunk/wb/modules/news/move_up.php	(revision 286)
@@ -29,6 +29,7 @@
 if(!isset($_GET['post_id']) OR !is_numeric($_GET['post_id'])) {
 	if(!isset($_GET['group_id']) OR !is_numeric($_GET['group_id'])) {
 		header("Location: index.php");
+		exit(0);
 	} else {
 		$id = $_GET['group_id'];
 		$id_field = 'group_id';
Index: trunk/wb/modules/news/save_group.php
===================================================================
--- trunk/wb/modules/news/save_group.php	(revision 285)
+++ trunk/wb/modules/news/save_group.php	(revision 286)
@@ -28,6 +28,7 @@
 // Get id
 if(!isset($_POST['group_id']) OR !is_numeric($_POST['group_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
+	exit(0);
 } else {
 	$group_id = $_POST['group_id'];
 }
Index: trunk/wb/modules/news/view.php
===================================================================
--- trunk/wb/modules/news/view.php	(revision 285)
+++ trunk/wb/modules/news/view.php	(revision 286)
@@ -277,6 +277,7 @@
 		}
 	} else {
 		header('Location: '.WB_URL.'/pages/');
+		exit(0);
 	}
 	
 	// Print post header
Index: trunk/wb/modules/news/delete_group.php
===================================================================
--- trunk/wb/modules/news/delete_group.php	(revision 285)
+++ trunk/wb/modules/news/delete_group.php	(revision 286)
@@ -28,6 +28,7 @@
 // Get id
 if(!isset($_GET['group_id']) OR !is_numeric($_GET['group_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
+	exit(0);
 } else {
 	$group_id = $_GET['group_id'];
 }
Index: trunk/wb/modules/news/save_comment.php
===================================================================
--- trunk/wb/modules/news/save_comment.php	(revision 285)
+++ trunk/wb/modules/news/save_comment.php	(revision 286)
@@ -28,6 +28,7 @@
 // Get id
 if(!isset($_POST['comment_id']) OR !is_numeric($_POST['comment_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
+	exit(0);
 } else {
 	$comment_id = $_POST['comment_id'];
 }
Index: trunk/wb/modules/news/delete_comment.php
===================================================================
--- trunk/wb/modules/news/delete_comment.php	(revision 285)
+++ trunk/wb/modules/news/delete_comment.php	(revision 286)
@@ -28,6 +28,7 @@
 // Get id
 if(!isset($_GET['comment_id']) OR !is_numeric($_GET['comment_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
+	exit(0);
 } else {
 	$comment_id = $_GET['comment_id'];
 }
@@ -35,6 +36,7 @@
 // Get post id
 if(!isset($_GET['post_id']) OR !is_numeric($_GET['post_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
+	exit(0);
 } else {
 	$post_id = $_GET['post_id'];
 }
Index: trunk/wb/modules/news/submit_comment.php
===================================================================
--- trunk/wb/modules/news/submit_comment.php	(revision 285)
+++ trunk/wb/modules/news/submit_comment.php	(revision 286)
@@ -68,7 +68,6 @@
 	$query_page = $database->query("SELECT link FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id'");
 	$page = $query_page->fetchRow();
 	header('Location: '.$wb->page_link($page['link']).'?id='.$post_id);
-	
 } else {
 	header('Location: '.WB_URL.'/pages/');
 }
Index: trunk/wb/modules/admin.php
===================================================================
--- trunk/wb/modules/admin.php	(revision 285)
+++ trunk/wb/modules/admin.php	(revision 286)
@@ -35,6 +35,7 @@
 // Stop this file being access directly
 if(!defined('WB_URL')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 // Get page id
@@ -43,6 +44,7 @@
 		if(!isset($_GET['page_id']) OR !is_numeric($_GET['page_id'])) {
 			if(!isset($_POST['page_id']) OR !is_numeric($_POST['page_id'])) {
 				header("Location: index.php");
+				exit(0);
 			} else {
 				$page_id = $_POST['page_id'];
 			}
@@ -67,6 +69,7 @@
 		$section_id = 0;
 	} else {
 		header("Location: $section_required");
+		exit(0);
 	}
 }
 
Index: trunk/wb/account/login_form.php
===================================================================
--- trunk/wb/account/login_form.php	(revision 285)
+++ trunk/wb/account/login_form.php	(revision 286)
@@ -25,6 +25,7 @@
 
 if(!defined('WB_URL')) {
 	header('Location: ../pages/index.php');
+	exit(0);
 }
 
 if(defined('SMART_LOGIN') AND SMART_LOGIN == 'enabled') {
Index: trunk/wb/account/forgot.php
===================================================================
--- trunk/wb/account/forgot.php	(revision 285)
+++ trunk/wb/account/forgot.php	(revision 286)
@@ -40,8 +40,10 @@
 if(!FRONTEND_LOGIN) {
 	if(INTRO_PAGE) {
 		header('Location: '.WB_URL.PAGES_DIRECTORY.'/index'.PAGE_EXTENSION);
+		exit(0);
 	} else {
 		header('Location: '.WB_URL.'/index'.PAGE_EXTENSION);
+		exit(0);
 	}
 }
 
Index: trunk/wb/account/preferences.php
===================================================================
--- trunk/wb/account/preferences.php	(revision 285)
+++ trunk/wb/account/preferences.php	(revision 286)
@@ -28,8 +28,10 @@
 if(!FRONTEND_LOGIN) {
 	if(INTRO_PAGE) {
 		header('Location: '.WB_URL.PAGES_DIRECTORY.'/index'.PAGE_EXTENSION);
+		exit(0);
 	} else {
 		header('Location: '.WB_URL.'/index'.PAGE_EXTENSION);
+		exit(0);
 	}
 }
 
@@ -36,6 +38,7 @@
 require_once(WB_PATH.'/framework/class.wb.php');
 if (wb::is_authenticated()==false) {
 	header('Location: '.WB_URL.'/account/login.php');
+	exit(0);
 }
 
 // Required page details
Index: trunk/wb/account/password.php
===================================================================
--- trunk/wb/account/password.php	(revision 285)
+++ trunk/wb/account/password.php	(revision 286)
@@ -25,6 +25,7 @@
 
 if(!defined('WB_URL')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 // Get the values entered
Index: trunk/wb/account/forgot_form.php
===================================================================
--- trunk/wb/account/forgot_form.php	(revision 285)
+++ trunk/wb/account/forgot_form.php	(revision 286)
@@ -25,6 +25,7 @@
 
 if(!defined('WB_URL')) {
 	header('Location: ../pages/index.php');
+	exit(0);
 }
 
 // Create new database object
Index: trunk/wb/account/preferences_form.php
===================================================================
--- trunk/wb/account/preferences_form.php	(revision 285)
+++ trunk/wb/account/preferences_form.php	(revision 286)
@@ -25,6 +25,7 @@
 
 if(!defined('WB_URL')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 ?>
Index: trunk/wb/account/details.php
===================================================================
--- trunk/wb/account/details.php	(revision 285)
+++ trunk/wb/account/details.php	(revision 286)
@@ -25,6 +25,7 @@
 
 if(!defined('WB_URL')) {
 	header('Location: ../pages/index.php');
+	exit(0);
 }
 
 // Get entered values
Index: trunk/wb/account/signup.php
===================================================================
--- trunk/wb/account/signup.php	(revision 285)
+++ trunk/wb/account/signup.php	(revision 286)
@@ -28,8 +28,10 @@
 if(!is_numeric(FRONTEND_SIGNUP)) {
 	if(INTRO_PAGE) {
 		header('Location: '.WB_URL.PAGES_DIRECTORY.'/index'.PAGE_EXTENSION);
+		exit(0);
 	} else {
 		header('Location: '.WB_URL.'/index'.PAGE_EXTENSION);
+		exit(0);
 	}
 }
 
Index: trunk/wb/account/email.php
===================================================================
--- trunk/wb/account/email.php	(revision 285)
+++ trunk/wb/account/email.php	(revision 286)
@@ -25,6 +25,7 @@
 
 if(!defined('WB_URL')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 // Get the values entered
Index: trunk/wb/account/signup2.php
===================================================================
--- trunk/wb/account/signup2.php	(revision 285)
+++ trunk/wb/account/signup2.php	(revision 286)
@@ -25,6 +25,7 @@
 
 if(!defined('WB_URL')) {
 	header('Location: ../pages/index.php');
+	exit(0);
 }
 
 require_once(WB_PATH.'/framework/class.wb.php');
Index: trunk/wb/account/login.php
===================================================================
--- trunk/wb/account/login.php	(revision 285)
+++ trunk/wb/account/login.php	(revision 286)
@@ -29,8 +29,10 @@
 if(!FRONTEND_LOGIN) {
 	if(INTRO_PAGE) {
 		header('Location: '.WB_URL.PAGES_DIRECTORY.'/index'.PAGE_EXTENSION);
+		exit(0);
 	} else {
 		header('Location: '.WB_URL.'/index'.PAGE_EXTENSION);
+		exit(0);
 	}
 }
 
Index: trunk/wb/account/signup_form.php
===================================================================
--- trunk/wb/account/signup_form.php	(revision 285)
+++ trunk/wb/account/signup_form.php	(revision 286)
@@ -25,6 +25,7 @@
 
 if(!defined('WB_URL')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 ?>
Index: trunk/wb/framework/class.admin.php
===================================================================
--- trunk/wb/framework/class.admin.php	(revision 285)
+++ trunk/wb/framework/class.admin.php	(revision 286)
@@ -34,6 +34,7 @@
 
 if(!defined('WB_URL')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 require_once(WB_PATH.'/framework/class.wb.php');
@@ -63,6 +64,7 @@
 			// First check if the user is logged-in
 			if($this->is_authenticated() == false) {
 				header('Location: '.ADMIN_URL.'/login/index.php');
+				exit(0);
 			}
 			// Now check if they are allowed in this section
 			if($this->get_permission($section_permission) == false) {
Index: trunk/wb/framework/class.login.php
===================================================================
--- trunk/wb/framework/class.login.php	(revision 285)
+++ trunk/wb/framework/class.login.php	(revision 286)
@@ -34,6 +34,7 @@
 // Stop this file from being accessed directly
 if(!defined('WB_URL')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 define('LOGIN_CLASS_LOADED', true);
@@ -110,6 +111,7 @@
 			if($this->authenticate()) {
 				// Authentication successful
 				header("Location: ".$this->url);
+				exit(0);
 			} else {
 				$this->message = $MESSAGE['LOGIN']['AUTHENTICATION_FAILED'];
 				$this->increase_attemps();
@@ -142,6 +144,7 @@
 				// Authentication successful
 				//echo $this->url;exit();
 				header("Location: ".$this->url);
+				exit(0);
 			} else {
 				$this->message = $MESSAGE['LOGIN']['AUTHENTICATION_FAILED'];
 				$this->increase_attemps();
@@ -362,6 +365,7 @@
 	// Warn user that they have had to many login attemps
 	function warn() {
 		header('Location: '.$this->warning_url);
+		exit(0);
 	}
 	
 }
Index: trunk/wb/framework/class.order.php
===================================================================
--- trunk/wb/framework/class.order.php	(revision 285)
+++ trunk/wb/framework/class.order.php	(revision 286)
@@ -35,6 +35,7 @@
 // Stop this file from being accessed directly
 if(!defined('WB_URL')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 define('ORDERING_CLASS_LOADED', true);
Index: trunk/wb/framework/convert.php
===================================================================
--- trunk/wb/framework/convert.php	(revision 285)
+++ trunk/wb/framework/convert.php	(revision 286)
@@ -30,6 +30,7 @@
 */
 if(!defined('WB_URL')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 $conversion_array = array(
Index: trunk/wb/framework/class.frontend.php
===================================================================
--- trunk/wb/framework/class.frontend.php	(revision 285)
+++ trunk/wb/framework/class.frontend.php	(revision 286)
@@ -31,6 +31,7 @@
 
 if(!defined('WB_PATH')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 
@@ -200,6 +201,7 @@
 			if($this->is_authenticated() == false) {
 				// User needs to login first
 				header("Location: ".WB_URL."/account/login".PAGE_EXTENSION.'?redirect='.$this->link);
+				exit(0);
 			}
 			// Check if we should show this page
 			if($this->show_page($this->page) == false) {
Index: trunk/wb/framework/frontend.functions.php
===================================================================
--- trunk/wb/framework/frontend.functions.php	(revision 285)
+++ trunk/wb/framework/frontend.functions.php	(revision 286)
@@ -29,6 +29,7 @@
 */
 if(!defined('WB_URL')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 // references to objects and variables that changed their names
Index: trunk/wb/framework/class.database.php
===================================================================
--- trunk/wb/framework/class.database.php	(revision 285)
+++ trunk/wb/framework/class.database.php	(revision 286)
@@ -35,6 +35,7 @@
 // Stop this file from being accessed directly
 if(!defined('WB_URL')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 if(!defined('DB_URL')) {
Index: trunk/wb/framework/functions.php
===================================================================
--- trunk/wb/framework/functions.php	(revision 285)
+++ trunk/wb/framework/functions.php	(revision 286)
@@ -33,6 +33,7 @@
 // Stop this file from being accessed directly
 if(!defined('WB_URL')) {
 	header('Location: ../index.php');
+	exit(0);
 }
 
 // Define that this file has been loaded
Index: trunk/wb/index.php
===================================================================
--- trunk/wb/index.php	(revision 285)
+++ trunk/wb/index.php	(revision 286)
@@ -31,6 +31,7 @@
 // Check if the config file has been set-up
 if(!defined('WB_PATH')) {
 	header("Location: install/index.php");
+	exit(0);
 }
 
 require_once(WB_PATH.'/framework/class.frontend.php');
