Index: trunk/wb/include/htmlarea/popups/link.php
===================================================================
--- trunk/wb/include/htmlarea/popups/link.php	(revision 39)
+++ trunk/wb/include/htmlarea/popups/link.php	(revision 40)
@@ -75,7 +75,7 @@
 	global $template, $database;
 	$get_pages = $database->query("SELECT page_id,menu_title,link,level FROM ".TABLE_PREFIX."pages WHERE parent = '$parent' AND visibility!='deleted' ORDER BY position ASC");
 	while($page = $get_pages->fetchRow()) {
-		$title = $admin->stripslashes($page['menu_title']);
+		$title = $admin->strip_slashes($page['menu_title']);
 		// Add leading -'s so we can tell what level a page is at
 		$leading_dashes = '';
 		for($i = 0; $i < $page['level']; $i++) {
@@ -99,7 +99,7 @@
 	$template->parse('page_list', 'page_list_block', true);
 	// Loop through pages
 	while($page = $get_pages->fetchRow()) {
-		$title = $admin->stripslashes($page['menu_title']);
+		$title = $admin->strip_slashes($page['menu_title']);
 		$template->set_var('TITLE', $title);
 		$template->set_var('LINK', '[wblink'.$page['page_id'].']');
 		$template->parse('page_list', 'page_list_block', true);
Index: trunk/wb/search/search.php
===================================================================
--- trunk/wb/search/search.php	(revision 39)
+++ trunk/wb/search/search.php	(revision 40)
@@ -40,7 +40,7 @@
 			$string=str_replace(',', '', $_REQUEST['string']);
 		}
 		// reverse potential magic_quotes action
-		$original_string=$this->stripslashes($string);
+		$original_string=$this->strip_slashes($string);
 		// Double backslashes (mySQL needs doubly escaped backslashes in LIKE comparisons)
 		$string = addslashes($this->escape_backslashes($original_string));
 		// then escape for mySQL query
@@ -103,13 +103,13 @@
 	// Replace vars in search settings with values
 	$vars = array('[SEARCH_STRING]', '[WB_URL]', '[PAGE_EXTENSION]', '[TEXT_RESULTS_FOR]');
 	$values = array($search_string, WB_URL, PAGE_EXTENSION, $TEXT['RESULTS_FOR']);
-	$search_footer = str_replace($vars, $values, $this->stripslashes($fetch_footer['value']));
-	$search_results_header = str_replace($vars, $values, $this->stripslashes($fetch_results_header['value']));
-	$search_results_footer = str_replace($vars, $values, $this->stripslashes($fetch_results_footer['value']));
+	$search_footer = str_replace($vars, $values, $this->strip_slashes($fetch_footer['value']));
+	$search_results_header = str_replace($vars, $values, $this->strip_slashes($fetch_results_header['value']));
+	$search_results_footer = str_replace($vars, $values, $this->strip_slashes($fetch_results_footer['value']));
 	// Do extra vars/values replacement
 	$vars = array('[SEARCH_STRING]', '[WB_URL]', '[PAGE_EXTENSION]', '[TEXT_SEARCH]', '[TEXT_ALL_WORDS]', '[TEXT_ANY_WORDS]', '[TEXT_EXACT_MATCH]', '[TEXT_MATCH]', '[TEXT_MATCHING]', '[ALL_CHECKED]', '[ANY_CHECKED]', '[EXACT_CHECKED]');
 	$values = array($search_string, WB_URL, PAGE_EXTENSION, $TEXT['SEARCH'], $TEXT['ALL_WORDS'], $TEXT['ANY_WORDS'], $TEXT['EXACT_MATCH'], $TEXT['MATCH'], $TEXT['MATCHING'], $all_checked, $any_checked, $exact_checked);
-	$search_header = str_replace($vars, $values, $this->stripslashes($fetch_header['value']));
+	$search_header = str_replace($vars, $values, $this->strip_slashes($fetch_header['value']));
 	
 	// Insert js code
 	?>
@@ -158,10 +158,10 @@
 					$date = $TEXT['UNKNOWN'].' '.$TEXT['DATE'];
 					$time = $TEXT['UNKNOWN'].' '.$TEXT['TIME'];
 				}
-				$values = array($link, $this->stripslashes($page['page_title']),$this->stripslashes($page['description']), $users[$page['modified_by']]['username'], $users[$page['modified_by']]['display_name'], $date, $time, $TEXT['LAST_UPDATED_BY'], strtolower($TEXT['ON']));
+				$values = array($link, $this->strip_slashes($page['page_title']),$this->strip_slashes($page['description']), $users[$page['modified_by']]['username'], $users[$page['modified_by']]['display_name'], $date, $time, $TEXT['LAST_UPDATED_BY'], strtolower($TEXT['ON']));
 				// Show loop code with vars replaced by values
 				if($values != array()) {
-					echo str_replace($vars, $values, $this->stripslashes($fetch_results_loop['value']));
+					echo str_replace($vars, $values, $this->strip_slashes($fetch_results_loop['value']));
 				}
 				// Say that we have already listed this page id
 				$pages_listed[$page['page_id']] = true;
@@ -184,7 +184,7 @@
 					// Fetch query start
 					$fetch_query_start = $get_query_start->fetchRow();
 					// Prepare query start for execution by replacing {TP} with the TABLE_PREFIX
-					$query_start = str_replace('[TP]', TABLE_PREFIX, $this->stripslashes($fetch_query_start['value']));
+					$query_start = str_replace('[TP]', TABLE_PREFIX, $this->strip_slashes($fetch_query_start['value']));
 					// Get query end
 					$get_query_end = $database->query("SELECT value FROM ".TABLE_PREFIX."search WHERE name = 'query_end' AND extra = '$module_name' LIMIT 1");
 					if($get_query_end->numRows() > 0) {
@@ -191,7 +191,7 @@
 						// Fetch query start
 						$fetch_query_end = $get_query_end->fetchRow();
 						// Set query end
-						$query_end = $this->stripslashes($fetch_query_end['value']);
+						$query_end = $this->strip_slashes($fetch_query_end['value']);
 						// Get query body
 						$get_query_body = $database->query("SELECT value FROM ".TABLE_PREFIX."search WHERE name = 'query_body' AND extra = '$module_name' LIMIT 1");
 						if($get_query_body->numRows() > 0) {
@@ -198,7 +198,7 @@
 							// Fetch query start
 							$fetch_query_body = $get_query_body->fetchRow();
 							// Prepare query body for execution by replacing {STRING} with the correct one
-							$query_body = str_replace(array('[TP]','[O]','[W]'), array(TABLE_PREFIX,'LIKE','%'), $this->stripslashes($fetch_query_body['value']));
+							$query_body = str_replace(array('[TP]','[O]','[W]'), array(TABLE_PREFIX,'LIKE','%'), $this->strip_slashes($fetch_query_body['value']));
 							// Loop through query body for each string, then combine with start and end
 							$prepared_query = $query_start;
 							$count = 0;
@@ -226,9 +226,9 @@
 											$date = $TEXT['UNKNOWN'].' '.$TEXT['DATE'];
 											$time = $TEXT['UNKNOWN'].' '.$TEXT['TIME'];
 										}
-										$values = array($link, $this->stripslashes($page[$fields['title']]), $this->stripslashes($page[$fields['description']]), $users[$page[$fields['modified_by']]]['username'], $users[$page[$fields['modified_by']]]['display_name'], $date, $time, $TEXT['LAST_UPDATED_BY'], strtolower($TEXT['ON']));
+										$values = array($link, $this->strip_slashes($page[$fields['title']]), $this->strip_slashes($page[$fields['description']]), $users[$page[$fields['modified_by']]]['username'], $users[$page[$fields['modified_by']]]['display_name'], $date, $time, $TEXT['LAST_UPDATED_BY'], strtolower($TEXT['ON']));
 										// Show loop code with vars replaced by values
-										echo str_replace($vars, $values, $this->stripslashes($fetch_results_loop['value']));
+										echo str_replace($vars, $values, $this->strip_slashes($fetch_results_loop['value']));
 										// Say that this page or item has been listed if we can
 										if(isset($fields['page_id'])) {
 											$pages_listed[$page[$fields['page_id']]] = true;
Index: trunk/wb/install/save.php
===================================================================
--- trunk/wb/install/save.php	(revision 39)
+++ trunk/wb/install/save.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: save.php,v 1.15 2005/04/25 11:53:12 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -106,154 +106,156 @@
 	return $default_dir_mode;
 }
 
+require_once('../framework/class.wb.php');
+
 // Begin check to see if form was even submitted
-	// Set error if no post vars found
-	if(!isset($_POST['website_title'])) {
-		set_error('Please fill-in the form below');
-	}
+// Set error if no post vars found
+if(!isset($_POST['website_title'])) {
+	set_error('Please fill-in the form below');
+}
 // End check to see if form was even submitted
 
 // Begin path and timezone details code
-	// Check if user has entered the installation path
-	if(!isset($_POST['wb_path']) OR $_POST['wb_path'] == '') {
-		set_error('Please enter an absolute path');
-	} else {
-		$wb_path = $_POST['wb_path'];
-	}
-	// Check if user has entered the installation url
-	if(!isset($_POST['wb_url']) OR $_POST['wb_url'] == '') {
-		set_error('Please enter an absolute URL');
-	} else {
-		$wb_url = $_POST['wb_url'];
-	}
-	// Remove any slashes at the end of the URL and path
-	if(substr($wb_url, strlen($wb_url)-1, 1) == "/") {
-		$wb_url = substr($wb_url, 0, strlen($wb_url)-1);
-	}
-	if(substr($wb_path, strlen($wb_path)-1, 1) == "/") {
-		$wb_path = substr($wb_path, 0, strlen($wb_path)-1);
-	}
-	if(substr($wb_url, strlen($wb_url)-1, 1) == "\\") {
-		$wb_url = substr($wb_url, 0, strlen($wb_url)-1);
-	}
-	if(substr($wb_path, strlen($wb_path)-1, 1) == "\\") {
-		$wb_path = substr($wb_path, 0, strlen($wb_path)-1);
-	}
-	if(substr($wb_url, strlen($wb_url)-1, 1) == "/") {
-		$wb_url = substr($wb_url, 0, strlen($wb_url)-1);
-	}
-	if(substr($wb_path, strlen($wb_path)-1, 1) == "/") {
-		$wb_path = substr($wb_path, 0, strlen($wb_path)-1);
-	}
-	if(substr($wb_url, strlen($wb_url)-1, 1) == "\\") {
-		$wb_url = substr($wb_url, 0, strlen($wb_url)-1);
-	}
-	if(substr($wb_path, strlen($wb_path)-1, 1) == "\\") {
-		$wb_path = substr($wb_path, 0, strlen($wb_path)-1);
-	}
-	// Get the default time zone
-	if(!isset($_POST['default_timezone']) OR !is_numeric($_POST['default_timezone'])) {
-		set_error('Please select a valid default timezone');
-	} else {
-		$default_timezone = $_POST['default_timezone']*60*60;
-	}
+// Check if user has entered the installation path
+if(!isset($_POST['wb_path']) OR $_POST['wb_path'] == '') {
+	set_error('Please enter an absolute path');
+} else {
+	$wb_path = $_POST['wb_path'];
+}
+// Check if user has entered the installation url
+if(!isset($_POST['wb_url']) OR $_POST['wb_url'] == '') {
+	set_error('Please enter an absolute URL');
+} else {
+	$wb_url = $_POST['wb_url'];
+}
+// Remove any slashes at the end of the URL and path
+if(substr($wb_url, strlen($wb_url)-1, 1) == "/") {
+	$wb_url = substr($wb_url, 0, strlen($wb_url)-1);
+}
+if(substr($wb_path, strlen($wb_path)-1, 1) == "/") {
+	$wb_path = substr($wb_path, 0, strlen($wb_path)-1);
+}
+if(substr($wb_url, strlen($wb_url)-1, 1) == "\\") {
+	$wb_url = substr($wb_url, 0, strlen($wb_url)-1);
+}
+if(substr($wb_path, strlen($wb_path)-1, 1) == "\\") {
+	$wb_path = substr($wb_path, 0, strlen($wb_path)-1);
+}
+if(substr($wb_url, strlen($wb_url)-1, 1) == "/") {
+	$wb_url = substr($wb_url, 0, strlen($wb_url)-1);
+}
+if(substr($wb_path, strlen($wb_path)-1, 1) == "/") {
+	$wb_path = substr($wb_path, 0, strlen($wb_path)-1);
+}
+if(substr($wb_url, strlen($wb_url)-1, 1) == "\\") {
+	$wb_url = substr($wb_url, 0, strlen($wb_url)-1);
+}
+if(substr($wb_path, strlen($wb_path)-1, 1) == "\\") {
+	$wb_path = substr($wb_path, 0, strlen($wb_path)-1);
+}
+// Get the default time zone
+if(!isset($_POST['default_timezone']) OR !is_numeric($_POST['default_timezone'])) {
+	set_error('Please select a valid default timezone');
+} else {
+	$default_timezone = $_POST['default_timezone']*60*60;
+}
 // End path and timezone details code
 
 // Begin operating system specific code
-	// Get operating system
-	if(!isset($_POST['operating_system']) OR $_POST['operating_system'] != 'linux' AND $_POST['operating_system'] != 'windows') {
-		set_error('Please select a valid operating system');
-	} else {
-		$operating_system = $_POST['operating_system'];
-	}
-	// Work-out file permissions
-	if($operating_system == 'windows') {
-		$file_mode = '0777';
-		$dir_mode = '0777';
-	} elseif(isset($_POST['world_writeable']) AND $_POST['world_writeable'] == 'true') {
-		$file_mode = '0777';
-		$dir_mode = '0777';
-	} else {
-		$file_mode = default_file_mode('../temp');
-		$dir_mode = default_dir_mode('../temp');
-	}
+// Get operating system
+if(!isset($_POST['operating_system']) OR $_POST['operating_system'] != 'linux' AND $_POST['operating_system'] != 'windows') {
+	set_error('Please select a valid operating system');
+} else {
+	$operating_system = $_POST['operating_system'];
+}
+// Work-out file permissions
+if($operating_system == 'windows') {
+	$file_mode = '0777';
+	$dir_mode = '0777';
+} elseif(isset($_POST['world_writeable']) AND $_POST['world_writeable'] == 'true') {
+	$file_mode = '0777';
+	$dir_mode = '0777';
+} else {
+	$file_mode = default_file_mode('../temp');
+	$dir_mode = default_dir_mode('../temp');
+}
 // End operating system specific code
 
 // Begin database details code
-	// Check if user has entered a database host
-	if(!isset($_POST['database_host']) OR $_POST['database_host'] == '') {
-		set_error('Please enter a database host name');
-	} else {
-		$database_host = $_POST['database_host'];
-	}
-	// Check if user has entered a database username
-	if(!isset($_POST['database_username']) OR $_POST['database_username'] == '') {
-		set_error('Please enter a database username');
-	} else {
-		$database_username = $_POST['database_username'];
-	}
-	// Check if user has entered a database password
-	if(!isset($_POST['database_password'])) {
-		set_error('Please enter a database password');
-	} else {
-		$database_password = $_POST['database_password'];
-	}
-	// Check if user has entered a database name
-	if(!isset($_POST['database_name']) OR $_POST['database_name'] == '') {
-		set_error('Please enter a database name');
-	} else {
-		$database_name = $_POST['database_name'];
-	}
-	// Get table prefix
-	$table_prefix = $_POST['table_prefix'];
-	// Find out if the user wants to install tables and data
-	if(isset($_POST['install_tables']) AND $_POST['install_tables'] == 'true') {
-		$install_tables = true;
-	} else {
-		$install_tables = false;
-	}
+// Check if user has entered a database host
+if(!isset($_POST['database_host']) OR $_POST['database_host'] == '') {
+	set_error('Please enter a database host name');
+} else {
+	$database_host = $_POST['database_host'];
+}
+// Check if user has entered a database username
+if(!isset($_POST['database_username']) OR $_POST['database_username'] == '') {
+	set_error('Please enter a database username');
+} else {
+	$database_username = $_POST['database_username'];
+}
+// Check if user has entered a database password
+if(!isset($_POST['database_password'])) {
+	set_error('Please enter a database password');
+} else {
+	$database_password = $_POST['database_password'];
+}
+// Check if user has entered a database name
+if(!isset($_POST['database_name']) OR $_POST['database_name'] == '') {
+	set_error('Please enter a database name');
+} else {
+	$database_name = $_POST['database_name'];
+}
+// Get table prefix
+$table_prefix = $_POST['table_prefix'];
+// Find out if the user wants to install tables and data
+if(isset($_POST['install_tables']) AND $_POST['install_tables'] == 'true') {
+	$install_tables = true;
+} else {
+	$install_tables = false;
+}
 // End database details code
 
 // Begin website title code
-	// Get website title
-	if(!isset($_POST['website_title']) OR $_POST['website_title'] == '') {
-		set_error('Please enter a website title');
-	} else {
-		$website_title = addslashes($_POST['website_title']);
-	}
+// Get website title
+if(!isset($_POST['website_title']) OR $_POST['website_title'] == '') {
+	set_error('Please enter a website title');
+} else {
+	$website_title = wb::addslashes($_POST['website_title']);
+}
 // End website title code
 
 // Begin admin user details code
-	// Get admin username
-	if(!isset($_POST['admin_username']) OR $_POST['admin_username'] == '') {
-		set_error('Please enter a username for the Administrator account');
+// Get admin username
+if(!isset($_POST['admin_username']) OR $_POST['admin_username'] == '') {
+	set_error('Please enter a username for the Administrator account');
+} else {
+	$admin_username = $_POST['admin_username'];
+}
+// Get admin email and validate it
+if(!isset($_POST['admin_email']) OR $_POST['admin_email'] == '') {
+	set_error('Please enter an email for the Administrator account');
+} else {
+	if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $_POST['admin_email'])) {
+		$admin_email = $_POST['admin_email'];
 	} else {
-		$admin_username = $_POST['admin_username'];
+		set_error('Please enter a valid email address for the Administrator account');
 	}
-	// Get admin email and validate it
-	if(!isset($_POST['admin_email']) OR $_POST['admin_email'] == '') {
-		set_error('Please enter an email for the Administrator account');
-	} else {
-		if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $_POST['admin_email'])) {
-			$admin_email = $_POST['admin_email'];
-		} else {
-			set_error('Please enter a valid email address for the Administrator account');
-		}
-	}
-	// Get the two admin passwords entered, and check that they match
-	if(!isset($_POST['admin_password']) OR $_POST['admin_password'] == '') {
-		set_error('Please enter a password for the Administrator account');
-	} else {
-		$admin_password = $_POST['admin_password'];
-	}
-	if(!isset($_POST['admin_repassword']) OR $_POST['admin_repassword'] == '') {
-		set_error('Please make sure you re-enter the password for the Administrator account');
-	} else {
-		$admin_repassword = $_POST['admin_repassword'];
-	}
-	if($admin_password != $admin_repassword) {
-		set_error('Sorry, the two Administrator account passwords you entered do not match');
-	}
+}
+// Get the two admin passwords entered, and check that they match
+if(!isset($_POST['admin_password']) OR $_POST['admin_password'] == '') {
+	set_error('Please enter a password for the Administrator account');
+} else {
+	$admin_password = $_POST['admin_password'];
+}
+if(!isset($_POST['admin_repassword']) OR $_POST['admin_repassword'] == '') {
+	set_error('Please make sure you re-enter the password for the Administrator account');
+} else {
+	$admin_repassword = $_POST['admin_repassword'];
+}
+if($admin_password != $admin_repassword) {
+	set_error('Sorry, the two Administrator account passwords you entered do not match');
+}
 // End admin user details code
 
 // Try and write settings to config file
@@ -362,7 +364,7 @@
 mysql_close();
 
 // Re-connect to the database, this time using in-build database class
-require(WB_PATH.'/framework/class.admin.php');
+require_once(WB_PATH.'/framework/class.admin.php');
 $database = new database();
 
 // Check if we should install tables
@@ -498,7 +500,7 @@
 	$insert_website_footer = "INSERT INTO `".TABLE_PREFIX."settings` VALUES ('', 'footer', '')";
 	$database->query($insert_website_footer);
 	// Search header
-	$search_header = addslashes('
+	$search_header = wb::addslashes('
 <h1>Search</h1>
 
 <form name="search" action="[WB_URL]/search/index[PAGE_EXTENSION]" method="post">
@@ -505,20 +507,20 @@
 <table cellpadding="3" cellspacing="0" border="0" width="500">
 <tr>
 <td>
-	<input type="text" name="string" value="[SEARCH_STRING]" style="width: 100%;" />
+<input type="text" name="string" value="[SEARCH_STRING]" style="width: 100%;" />
 </td>
 <td width="150">
-	<input type="submit" value="[TEXT_SEARCH]" style="width: 100%;" />
+<input type="submit" value="[TEXT_SEARCH]" style="width: 100%;" />
 </td>
 </tr>
 <tr>
 <td colspan="2">
-	<input type="radio" name="match" id="match_all" value="all"[ALL_CHECKED] />
-	<a href="javascript: toggle_radio(\'match_all\');">[TEXT_ALL_WORDS]</a>
-	<input type="radio" name="match" id="match_any" value="any"[ANY_CHECKED] />
-	<a href="javascript: toggle_radio(\'match_any\');">[TEXT_ANY_WORDS]</a>
-	<input type="radio" name="match" id="match_exact" value="exact"[EXACT_CHECKED] />
-	<a href="javascript: toggle_radio(\'match_exact\');">[TEXT_EXACT_MATCH]</a>
+<input type="radio" name="match" id="match_all" value="all"[ALL_CHECKED] />
+<a href="javascript: toggle_radio(\'match_all\');">[TEXT_ALL_WORDS]</a>
+<input type="radio" name="match" id="match_any" value="any"[ANY_CHECKED] />
+<a href="javascript: toggle_radio(\'match_any\');">[TEXT_ANY_WORDS]</a>
+<input type="radio" name="match" id="match_exact" value="exact"[EXACT_CHECKED] />
+<a href="javascript: toggle_radio(\'match_exact\');">[TEXT_EXACT_MATCH]</a>
 </td>
 </tr>
 </table>
@@ -530,30 +532,30 @@
 	$insert_search_header = "INSERT INTO `".TABLE_PREFIX."search` VALUES ('', 'header', '$search_header', '')";
 	$database->query($insert_search_header);
 	// Search footer
-	$search_footer = addslashes('');
+	$search_footer = wb::addslashes('');
 	$insert_search_footer = "INSERT INTO `".TABLE_PREFIX."search` VALUES ('', 'footer', '$search_footer', '')";
 	$database->query($insert_search_footer);
 	// Search results header
-	$search_results_header = addslashes(''.
+	$search_results_header = wb::addslashes(''.
 '[TEXT_RESULTS_FOR] \'<b>[SEARCH_STRING]</b>\':
 <table cellpadding="2" cellspacing="0" border="0" width="100%" style="padding-top: 10px;">');
 	$insert_search_results_header = "INSERT INTO `".TABLE_PREFIX."search` VALUES ('', 'results_header', '$search_results_header', '')";
 	$database->query($insert_search_results_header);
 	// Search results loop
-	$search_results_loop = addslashes(''.
+	$search_results_loop = wb::addslashes(''.
 '<tr style="background-color: #F0F0F0;">
 <td><a href="[LINK]">[TITLE]</a></td>
 <td align="right">[TEXT_LAST_UPDATED_BY] [DISPLAY_NAME] ([USERNAME]) [TEXT_ON] [DATE]</td>
 </tr>
 <tr><td colspan="2" style="text-align: justify; padding-bottom: 10px;">[DESCRIPTION]</td></tr>');
-	$insert_search_results_loop = "INSERT INTO `".TABLE_PREFIX."search` VALUES ('', 'results_loop', '$search_results_loop', '')";
-	$database->query($insert_search_results_loop);
-	// Search results footer
-	$search_results_footer = addslashes("</table>");
-	$insert_search_results_footer = "INSERT INTO `".TABLE_PREFIX."search` VALUES ('', 'results_footer', '$search_results_footer', '')";
-	$database->query($insert_search_results_footer);
-	// Search no results
-	$search_no_results = addslashes('<br />No results found');
+$insert_search_results_loop = "INSERT INTO `".TABLE_PREFIX."search` VALUES ('', 'results_loop', '$search_results_loop', '')";
+$database->query($insert_search_results_loop);
+// Search results footer
+$search_results_footer = wb::addslashes("</table>");
+$insert_search_results_footer = "INSERT INTO `".TABLE_PREFIX."search` VALUES ('', 'results_footer', '$search_results_footer', '')";
+$database->query($insert_search_results_footer);
+// Search no results
+$search_no_results = wb::add_slashes('<br />No results found');
 	$insert_search_no_results = "INSERT INTO `".TABLE_PREFIX."search` VALUES ('', 'no_results', '$search_no_results', '')";
 	$database->query($insert_search_no_results);
 	// Search template
Index: trunk/wb/admin/media/browse.php
===================================================================
--- trunk/wb/admin/media/browse.php	(revision 39)
+++ trunk/wb/admin/media/browse.php	(revision 40)
@@ -103,7 +103,7 @@
 			$temp_id++;
 			$template->set_var(array(
 											'NAME' => $name,
-											'NAME_SLASHED' => addslashes($name),
+											'NAME_SLASHED' => $admin->add_slashes($name),
 											'TEMP_ID' => $temp_id,
 											'LINK' => "browse.php?dir=$directory/$link_name",
 											'LINK_TARGET' => '',
@@ -125,7 +125,7 @@
 			$temp_id++;
 			$template->set_var(array(
 											'NAME' => $name,
-											'NAME_SLASHED' => addslashes($name),
+											'NAME_SLASHED' => $admin->add_slashes($name),
 											'TEMP_ID' => $temp_id,
 											'LINK' => WB_URL.MEDIA_DIRECTORY.$directory.'/'.$name,
 											'LINK_TARGET' => '_blank',
Index: trunk/wb/admin/templates/uninstall.php
===================================================================
--- trunk/wb/admin/templates/uninstall.php	(revision 39)
+++ trunk/wb/admin/templates/uninstall.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: uninstall.php,v 1.2 2005/04/02 06:25:53 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -47,7 +47,7 @@
 if($_POST['file'] == DEFAULT_TEMPLATE) {
 	$admin->print_error($MESSAGE['GENERIC']['CANNOT_UNINSTALL_IN_USE']);
 } else {
-	$query_templates = $database->query("SELECT page_id FROM ".TABLE_PREFIX."pages WHERE template = '".addslashes($_POST['file'])."' LIMIT 1");
+	$query_templates = $database->query("SELECT page_id FROM ".TABLE_PREFIX."pages WHERE template = '".$admin->add_slashes($_POST['file'])."' LIMIT 1");
 	if($query_templates->numRows() > 0) {
 		$admin->print_error($MESSAGE['GENERIC']['CANNOT_UNINSTALL_IN_USE']);
 	}
Index: trunk/wb/admin/pages/intro.php
===================================================================
--- trunk/wb/admin/pages/intro.php	(revision 39)
+++ trunk/wb/admin/pages/intro.php	(revision 40)
@@ -43,7 +43,7 @@
 $template->set_file('page', 'intro.html');
 $template->set_block('page', 'main_block', 'main');
 $template->set_var(array(
-								'CONTENT' => $admin->stripslashes($content),
+								'CONTENT' => $admin->strip_slashes($content),
 								'WB_URL' => WB_URL,
 								'ADMIN_URL' => ADMIN_URL,
 								'TEXT_SAVE' => $TEXT['SAVE'],
Index: trunk/wb/admin/pages/settings.php
===================================================================
--- trunk/wb/admin/pages/settings.php	(revision 39)
+++ trunk/wb/admin/pages/settings.php	(revision 40)
@@ -79,10 +79,10 @@
 $template->set_block('page', 'main_block', 'main');
 $template->set_var(array(
 								'PAGE_ID' => $results_array['page_id'],
-								'PAGE_TITLE' => $admin->stripslashes($results_array['page_title']),
-								'MENU_TITLE' => $admin->stripslashes($results_array['menu_title']),
-								'DESCRIPTION' => $admin->stripslashes($results_array['description']),
-								'KEYWORDS' => $admin->stripslashes($results_array['keywords']),
+								'PAGE_TITLE' => $admin->strip_slashes($results_array['page_title']),
+								'MENU_TITLE' => $admin->strip_slashes($results_array['menu_title']),
+								'DESCRIPTION' => $admin->strip_slashes($results_array['description']),
+								'KEYWORDS' => $admin->strip_slashes($results_array['keywords']),
 								'MODIFIED_BY' => $user['display_name'],
 								'MODIFIED_BY_USERNAME' => $user['username'],
 								'MODIFIED_WHEN' => $modified_ts,
@@ -251,7 +251,7 @@
 			for($i = 1; $i <= $page['level']; $i++) { $title_prefix .= ' - '; }
 				$template->set_var(array(
 												'ID' => $page['page_id'],
-												'TITLE' => $admin->stripslashes($title_prefix.$page['page_title'])
+												'TITLE' => $admin->strip_slashes($title_prefix.$page['page_title'])
 												)
 										);
 				if($results_array['parent'] == $page['page_id']) {
Index: trunk/wb/admin/pages/sections_save.php
===================================================================
--- trunk/wb/admin/pages/sections_save.php	(revision 39)
+++ trunk/wb/admin/pages/sections_save.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: sections_save.php,v 1.6 2005/04/08 07:36:58 rdjurovich Exp $+// $Id$ 
 /*
 
@@ -84,7 +84,7 @@
 				$section_id = $section['section_id'];
 				$sql = '';
 				if(isset($_POST['block'.$section_id]) AND $_POST['block'.$section_id] != '') {
-					$sql = "block = '".addslashes($_POST['block'.$section_id])."'";
+					$sql = "block = '".$admin->add_slashes($_POST['block'.$section_id])."'";
 					$query = "UPDATE ".TABLE_PREFIX."sections SET $sql WHERE section_id = '$section_id' LIMIT 1";
 					if($sql != '') {
 						$database->query($query);
Index: trunk/wb/admin/pages/index.php
===================================================================
--- trunk/wb/admin/pages/index.php	(revision 39)
+++ trunk/wb/admin/pages/index.php	(revision 40)
@@ -150,15 +150,15 @@
 				</td>
 				<?php if($admin->get_permission('pages_modify') == true AND $can_modify == true) { ?>
 				<td>
-					<a href="<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>"><?php echo $admin->stripslashes($page['page_title']); ?></a>
+					<a href="<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>"><?php echo $admin->strip_slashes($page['page_title']); ?></a>
 				</td>
 				<?php } else { ?>
 				<td>
-					<?php	echo $admin->stripslashes($page['page_title']); ?>
+					<?php	echo $admin->strip_slashes($page['page_title']); ?>
 				</td>
 				<?php } ?>
 				<td align="left" width="232">
-					<font color="#999999"><?php echo $admin->stripslashes($page['menu_title']); ?></font>
+					<font color="#999999"><?php echo $admin->strip_slashes($page['menu_title']); ?></font>
 				</td>
 				<td align="center" valign="middle" width="90">
 				<?php if($page['visibility'] == 'public') { ?>
@@ -446,7 +446,7 @@
 			for($i = 1; $i <= $page['level']; $i++) { $title_prefix .= ' - '; }
 				$template->set_var(array(
 												'ID' => $page['page_id'],
-												'TITLE' => $admin->stripslashes($title_prefix.$page['page_title'])
+												'TITLE' => $admin->strip_slashes($title_prefix.$page['page_title'])
 												)
 										);
 				if($can_modify == true) {
Index: trunk/wb/admin/pages/trash.php
===================================================================
--- trunk/wb/admin/pages/trash.php	(revision 39)
+++ trunk/wb/admin/pages/trash.php	(revision 40)
@@ -141,15 +141,15 @@
 				</td>
 				<?php if($admin->get_permission('pages_modify') == true AND $can_modify == true AND $page['visibility'] != 'heading') { ?>
 				<td>
-					<a href="<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>"><?php echo $admin->stripslashes($page['page_title']); ?></a>
+					<a href="<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>"><?php echo $admin->strip_slashes($page['page_title']); ?></a>
 				</td>
 				<?php } else { ?>
 				<td>
 					<?php
 					if($page['visibility'] != 'heading') {
-						echo $admin->stripslashes($page['page_title']);
+						echo $admin->strip_slashes($page['page_title']);
 					} else {
-						echo '<b>'.$admin->stripslashes($page['page_title']).'</b>';
+						echo '<b>'.$admin->strip_slashes($page['page_title']).'</b>';
 					}
 					?>
 				</td>
Index: trunk/wb/admin/pages/settings2.php
===================================================================
--- trunk/wb/admin/pages/settings2.php	(revision 39)
+++ trunk/wb/admin/pages/settings2.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: settings2.php,v 1.12 2005/06/23 05:46:06 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -39,10 +39,10 @@
 require_once(WB_PATH.'/framework/functions.php');
 
 // Get values
-$page_title = addslashes($admin->get_post('page_title'));
-$menu_title = addslashes($admin->get_post('menu_title'));
-$description = addslashes($admin->get_post('description'));
-$keywords = addslashes($admin->get_post('keywords'));
+$page_title = $admin->add_slashes($admin->get_post('page_title'));
+$menu_title = $admin->add_slashes($admin->get_post('menu_title'));
+$description = $admin->add_slashes($admin->get_post('description'));
+$keywords = $admin->add_slashes($admin->get_post('keywords'));
 $parent = $admin->get_post('parent');
 $visibility = $admin->get_post('visibility');
 $template = $admin->get_post('template');
Index: trunk/wb/admin/pages/sections.php
===================================================================
--- trunk/wb/admin/pages/sections.php	(revision 39)
+++ trunk/wb/admin/pages/sections.php	(revision 40)
@@ -134,7 +134,7 @@
 	</td>
 	<td align="right">
 		<?php echo $TEXT['CURRENT_PAGE']; ?>: 
-		<b><?php echo $admin->stripslashes($results_array['page_title']); ?></b>
+		<b><?php echo $admin->strip_slashes($results_array['page_title']); ?></b>
 		-
 		<a href="<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>"><?php echo $HEADING['MODIFY_PAGE']; ?></a>
 		-
Index: trunk/wb/admin/pages/modify.php
===================================================================
--- trunk/wb/admin/pages/modify.php	(revision 39)
+++ trunk/wb/admin/pages/modify.php	(revision 40)
@@ -81,7 +81,7 @@
 $template->set_block('page', 'main_block', 'main');
 $template->set_var(array(
 								'PAGE_ID' => $results_array['page_id'],
-								'PAGE_TITLE' => $admin->stripslashes($results_array['page_title']),
+								'PAGE_TITLE' => $admin->strip_slashes($results_array['page_title']),
 								'MODIFIED_BY' => $user['display_name'],
 								'MODIFIED_BY_USERNAME' => $user['username'],
 								'MODIFIED_WHEN' => $modified_ts,
Index: trunk/wb/admin/pages/add.php
===================================================================
--- trunk/wb/admin/pages/add.php	(revision 39)
+++ trunk/wb/admin/pages/add.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: add.php,v 1.12 2005/04/08 07:36:58 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -32,7 +32,7 @@
 require_once(WB_PATH.'/framework/functions.php');
 
 // Get values
-$title = addslashes($admin->get_post('title'));
+$title = $admin->add_slashes($admin->get_post('title'));
 $module = $admin->get_post('type');
 $parent = $admin->get_post('parent');
 $visibility = $admin->get_post('visibility');
Index: trunk/wb/admin/settings/save.php
===================================================================
--- trunk/wb/admin/settings/save.php	(revision 39)
+++ trunk/wb/admin/settings/save.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: save.php,v 1.14 2005/06/23 05:56:33 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -45,7 +45,7 @@
 while($setting = $results->fetchRow()) {
 	$setting_name = $setting['name'];
 	$value = $admin->get_post($setting_name);
-	$value = addslashes($value);
+	$value = $admin->add_slashes($value);
 	$database->query("UPDATE ".TABLE_PREFIX."settings SET value = '$value' WHERE name = '$setting_name'");
 }
 
@@ -56,7 +56,7 @@
 	$setting_name = $search_setting['name'];
 	$post_name = 'search_'.$search_setting['name'];
 	$value = $admin->get_post($post_name);
-	$value = addslashes($value);
+	$value = $admin->add_slashes($value);
 	$database->query("UPDATE ".TABLE_PREFIX."search SET value = '$value' WHERE name = '$setting_name'");
 }
 
@@ -199,7 +199,7 @@
 	"define('HOMEPAGE_REDIRECTION', ".str_replace(';', '', $_POST['homepage_redirection']).");\n".
 	"define('PAGE_LANGUAGES', ".str_replace(';', '', $_POST['page_languages']).");\n".
 	"\n".
-	"define('WYSIWYG_STYLE', '".addslashes($_POST['wysiwyg_style'])."');\n".
+	"define('WYSIWYG_STYLE', '".$admin->add_slashes($_POST['wysiwyg_style'])."');\n".
 	"\n".
 	"define('MANAGE_SECTIONS', ".str_replace(';', '', $_POST['manage_sections']).");\n".
 	"define('SECTION_BLOCKS', ".str_replace(';', '', $_POST['section_blocks']).");\n".
Index: trunk/wb/admin/settings/index.php
===================================================================
--- trunk/wb/admin/settings/index.php	(revision 39)
+++ trunk/wb/admin/settings/index.php	(revision 40)
@@ -45,7 +45,7 @@
 $results = $database->query($query);
 while($setting = $results->fetchRow()) {
 	$setting_name = $setting['name'];
-	$setting_value = htmlspecialchars($admin->stripslashes($setting['value']));
+	$setting_value = htmlspecialchars($admin->strip_slashes($setting['value']));
 	switch($setting_name) {
 		// Website title
 		case 'title':
@@ -79,7 +79,7 @@
 $results = $database->query($query);
 while($setting = $results->fetchRow()) {
 	$setting_name = $setting['name'];
-	$setting_value = htmlspecialchars($admin->stripslashes($setting['value']));
+	$setting_value = htmlspecialchars($admin->strip_slashes($setting['value']));
 	switch($setting_name) {
 		// Search header
 		case 'header':
@@ -463,7 +463,7 @@
 }
 
 // Insert WYSIWYG style value into template
-$template->set_var('WYSIWYG_STYLE', $admin->stripslashes(WYSIWYG_STYLE));
+$template->set_var('WYSIWYG_STYLE', $admin->strip_slashes(WYSIWYG_STYLE));
 
 // Insert Server Email value into template
 $template->set_var('SERVER_EMAIL', SERVER_EMAIL);
Index: trunk/wb/admin/users/add.php
===================================================================
--- trunk/wb/admin/users/add.php	(revision 39)
+++ trunk/wb/admin/users/add.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: add.php,v 1.5 2005/04/02 06:25:53 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -71,7 +71,7 @@
 }
 
 // Check if the email already exists
-$results = $database->query("SELECT user_id FROM ".TABLE_PREFIX."users WHERE email = '".addslashes($_POST['email'])."'");
+$results = $database->query("SELECT user_id FROM ".TABLE_PREFIX."users WHERE email = '".$admin->add_slashes($_POST['email'])."'");
 if($results->numRows() > 0) {
 	if(isset($MESSAGE['USERS']['EMAIL_TAKEN'])) {
 		$admin->print_error($MESSAGE['USERS']['EMAIL_TAKEN'], $js_back);
Index: trunk/wb/admin/preferences/details.php
===================================================================
--- trunk/wb/admin/preferences/details.php	(revision 39)
+++ trunk/wb/admin/preferences/details.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: details.php,v 1.2 2005/04/02 06:25:37 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -29,7 +29,7 @@
 $admin = new admin('Preferences');
 
 // Get entered values
-$display_name = addslashes($admin->get_post('display_name'));
+$display_name = $admin->add_slashes($admin->get_post('display_name'));
 $language = $admin->get_post('language');
 $timezone = $admin->get_post('timezone')*60*60;
 $date_format = $admin->get_post('date_format');
Index: trunk/wb/admin/languages/uninstall.php
===================================================================
--- trunk/wb/admin/languages/uninstall.php	(revision 39)
+++ trunk/wb/admin/languages/uninstall.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: uninstall.php,v 1.2 2005/04/02 06:25:37 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -45,7 +45,7 @@
 if($_POST['code'] == DEFAULT_LANGUAGE OR $_POST['code'] == LANGUAGE) {
 	$admin->print_error($MESSAGE['GENERIC']['CANNOT_UNINSTALL_IN_USE']);
 } else {
-	$query_users = $database->query("SELECT user_id FROM ".TABLE_PREFIX."users WHERE language = '".addslashes($_POST['code'])."' LIMIT 1");
+	$query_users = $database->query("SELECT user_id FROM ".TABLE_PREFIX."users WHERE language = '".$admin->add_slashes($_POST['code'])."' LIMIT 1");
 	if($query_users->numRows() > 0) {
 		$admin->print_error($MESSAGE['GENERIC']['CANNOT_UNINSTALL_IN_USE']);
 	}
Index: trunk/wb/admin/login/forgot/index.php
===================================================================
--- trunk/wb/admin/login/forgot/index.php	(revision 39)
+++ trunk/wb/admin/login/forgot/index.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: index.php,v 1.4 2005/06/22 05:30:35 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -42,7 +42,7 @@
 	$email = $_POST['email'];
 	
 	// Check if the email exists in the database
-	$query = "SELECT user_id,username,display_name,email,last_reset FROM ".TABLE_PREFIX."users WHERE email = '".addslashes($_POST['email'])."'";
+	$query = "SELECT user_id,username,display_name,email,last_reset FROM ".TABLE_PREFIX."users WHERE email = '".$admin->add_slashes($_POST['email'])."'";
 	$results = $database->query($query);
 	if($results->numRows() > 0) {
 
Index: trunk/wb/admin/modules/uninstall.php
===================================================================
--- trunk/wb/admin/modules/uninstall.php	(revision 39)
+++ trunk/wb/admin/modules/uninstall.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: uninstall.php,v 1.4 2005/04/25 11:53:12 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -44,7 +44,7 @@
 }
 
 // Check if the module is in use
-$query_modules = $database->query("SELECT section_id FROM ".TABLE_PREFIX."sections WHERE module = '".addslashes($_POST['file'])."' LIMIT 1");
+$query_modules = $database->query("SELECT section_id FROM ".TABLE_PREFIX."sections WHERE module = '".$admin->add_slashes($_POST['file'])."' LIMIT 1");
 if($query_modules->numRows() > 0) {
 	$admin->print_error($MESSAGE['GENERIC']['CANNOT_UNINSTALL_IN_USE']);
 }
Index: trunk/wb/modules/wrapper/view.php
===================================================================
--- trunk/wb/modules/wrapper/view.php	(revision 39)
+++ trunk/wb/modules/wrapper/view.php	(revision 40)
@@ -26,7 +26,7 @@
 // Get url
 $get_settings = $database->query("SELECT url,height FROM ".TABLE_PREFIX."mod_wrapper WHERE section_id = '$section_id'");
 $fetch_settings = $get_settings->fetchRow();
-$url = $this->stripslashes($fetch_settings['url']);
+$url = $this->strip_slashes($fetch_settings['url']);
 
 ?>
 <iframe src="<?php echo $url; ?>" width="100%" height="<?php echo $fetch_settings['height']; ?>px" frameborder="0" scrolling="auto">
Index: trunk/wb/modules/wrapper/save.php
===================================================================
--- trunk/wb/modules/wrapper/save.php	(revision 39)
+++ trunk/wb/modules/wrapper/save.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: save.php,v 1.2 2005/04/02 06:25:57 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -31,7 +31,7 @@
 
 // Update the mod_wrapper table with the contents
 if(isset($_POST['url'])) {
-	$url = addslashes($_POST['url']);
+	$url = $admin->add_slashes($_POST['url']);
 	$height = $_POST['height'];
 	if(!is_numeric($height)) {
 		$height = 400;
Index: trunk/wb/modules/wrapper/modify.php
===================================================================
--- trunk/wb/modules/wrapper/modify.php	(revision 39)
+++ trunk/wb/modules/wrapper/modify.php	(revision 40)
@@ -32,7 +32,7 @@
 $query = "SELECT url,height FROM ".TABLE_PREFIX."mod_wrapper WHERE section_id = '$section_id'";
 $get_settings = $database->query($query);
 $settings = $get_settings->fetchRow();
-$url = $admin->stripslashes($settings['url']);
+$url = $admin->strip_slashes($settings['url']);
 $height = $settings['height'];
 
 // Insert vars
Index: trunk/wb/modules/menu_link/save.php
===================================================================
--- trunk/wb/modules/menu_link/save.php	(revision 39)
+++ trunk/wb/modules/menu_link/save.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: save.php,v 1.2 2005/04/02 06:25:56 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -34,7 +34,7 @@
 // Update the mod_menu_links table with the link
 if(isset($_POST['link'])) {
 	// Update link and target
-	$link = addslashes($_POST['link']);
+	$link = $admin->add_slashes($_POST['link']);
 	$target = $_POST['target'];
 	$query = "UPDATE ".TABLE_PREFIX."pages SET link = '$link', target = '$target' WHERE page_id = '$page_id'";
 	$database->query($query);
Index: trunk/wb/modules/menu_link/modify.php
===================================================================
--- trunk/wb/modules/menu_link/modify.php	(revision 39)
+++ trunk/wb/modules/menu_link/modify.php	(revision 40)
@@ -32,7 +32,7 @@
 $query_info = "SELECT link,target FROM ".TABLE_PREFIX."pages WHERE page_id = '$page_id'";
 $get_info = $database->query($query_info);
 $fetch_info = $get_info->fetchRow();
-$link = $admin->stripslashes($fetch_info['link']);
+$link = $admin->strip_slashes($fetch_info['link']);
 $target = $fetch_info['target'];
 
 // Insert vars
Index: trunk/wb/modules/wysiwyg/view.php
===================================================================
--- trunk/wb/modules/wysiwyg/view.php	(revision 39)
+++ trunk/wb/modules/wysiwyg/view.php	(revision 40)
@@ -26,7 +26,7 @@
 // Get content
 $get_content = $database->query("SELECT content FROM ".TABLE_PREFIX."mod_wysiwyg WHERE section_id = '$section_id'");
 $fetch_content = $get_content->fetchRow();
-$content = $this->stripslashes($fetch_content['content']);
+$content = $this->strip_slashes($fetch_content['content']);
 
 $this->preprocess($content);
 
Index: trunk/wb/modules/wysiwyg/save.php
===================================================================
--- trunk/wb/modules/wysiwyg/save.php	(revision 39)
+++ trunk/wb/modules/wysiwyg/save.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: save.php,v 1.2 2005/04/02 06:25:57 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -31,7 +31,7 @@
 
 // Update the mod_wysiwygs table with the contents
 if(isset($_POST['content'])) {
-	$content = addslashes($_POST['content']);
+	$content = $admin->add_slashes($_POST['content']);
 	$text = strip_tags($content);
 	$database = new database();
 	$query = "UPDATE ".TABLE_PREFIX."mod_wysiwyg SET content = '$content', text = '$text' WHERE section_id = '$section_id'";
Index: trunk/wb/modules/wysiwyg/modify.php
===================================================================
--- trunk/wb/modules/wysiwyg/modify.php	(revision 39)
+++ trunk/wb/modules/wysiwyg/modify.php	(revision 40)
@@ -29,7 +29,7 @@
 $query = "SELECT content FROM ".TABLE_PREFIX."mod_wysiwyg WHERE section_id = '$section_id'";
 $get_content = $database->query($query);
 $content = $get_content->fetchRow();
-$content = $admin->stripslashes(htmlspecialchars($content['content']));
+$content = $admin->strip_slashes(htmlspecialchars($content['content']));
 
 // Load HTMLArea
 if(!isset($loaded_htmlarea)) {
@@ -55,7 +55,7 @@
 		echo 'var editor = new HTMLArea("content'.$wysiwyg_section["section_id"].'");'
 			. 'editor.registerPlugin(ContextMenu);'
 			. 'editor.registerPlugin(TableOperations);'
-			. 'editor.config.pageStyle = "body { '.$admin->stripslashes(WYSIWYG_STYLE).' }";'
+			. 'editor.config.pageStyle = "body { '.$admin->strip_slashes(WYSIWYG_STYLE).' }";'
 			. 'editor.generate();';
 		}
 	}
Index: trunk/wb/modules/form/modify_field.php
===================================================================
--- trunk/wb/modules/form/modify_field.php	(revision 39)
+++ trunk/wb/modules/form/modify_field.php	(revision 40)
@@ -63,7 +63,7 @@
 <tr>
 	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
 	<td>
-		<input type="text" name="title" value="<?php echo htmlspecialchars($admin->stripslashes($form['title'])); ?>" style="width: 100%;" maxlength="255" />
+		<input type="text" name="title" value="<?php echo htmlspecialchars($admin->strip_slashes($form['title'])); ?>" style="width: 100%;" maxlength="255" />
 	</td>
 </tr>
 <tr>
@@ -86,7 +86,7 @@
 	<tr>
 		<td valign="top"><?php echo $TEXT['TEMPLATE']; ?>:</td>
 		<td>
-		<textarea name="template" style="width: 100%; height: 20px;"><?php echo htmlspecialchars($admin->stripslashes($form['extra'])); ?></textarea>
+		<textarea name="template" style="width: 100%; height: 20px;"><?php echo htmlspecialchars($admin->strip_slashes($form['extra'])); ?></textarea>
 		</td>
 	</tr>
 	<?php } elseif($type == 'textfield') { ?>
Index: trunk/wb/modules/form/save_field.php
===================================================================
--- trunk/wb/modules/form/save_field.php	(revision 39)
+++ trunk/wb/modules/form/save_field.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: save_field.php,v 1.5 2005/03/28 11:58:04 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -46,7 +46,7 @@
 if($admin->get_post('title') == '' OR $admin->get_post('type') == '') {
 	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
 } else {
-	$title = addslashes($admin->get_post('title'));
+	$title = $admin($admin->get_post('title'));
 	$type = $admin->get_post('type');
 	$required = $admin->get_post('required');
 }
@@ -77,7 +77,7 @@
 } elseif($admin->get_post('type') == 'heading') {
 	$extra = $admin->get_post('template');
 	if(trim($extra) == '') $extra = '<tr><td class="field_heading" colspan="2">{TITLE}{FIELD}</td></tr>';
-	$extra = addslashes($extra);
+	$extra = $admin($extra);
 	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '', extra = '$extra' WHERE field_id = '$field_id'");
 } elseif($admin->get_post('type') == 'select') {
 	$extra = $admin->get_post('size').','.$admin->get_post('multiselect');
Index: trunk/wb/modules/form/modify_settings.php
===================================================================
--- trunk/wb/modules/form/modify_settings.php	(revision 39)
+++ trunk/wb/modules/form/modify_settings.php	(revision 40)
@@ -58,25 +58,25 @@
 <tr>
 	<td class="setting_name" width="220"><?php echo $TEXT['HEADER']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="header" style="width: 100%; height: 80px;"><?php echo $admin->stripslashes($setting['header']); ?></textarea>
+		<textarea name="header" style="width: 100%; height: 80px;"><?php echo $admin->strip_slashes($setting['header']); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['FIELD'].' '.$TEXT['LOOP']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="field_loop" style="width: 100%; height: 60px;"><?php echo $admin->stripslashes($setting['field_loop']); ?></textarea>
+		<textarea name="field_loop" style="width: 100%; height: 60px;"><?php echo $admin->strip_slashes($setting['field_loop']); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['FOOTER']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="footer" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($setting['footer'])); ?></textarea>
+		<textarea name="footer" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes($setting['footer'])); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['TO']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="email_to" style="width: 100%; height: 30px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($setting['email_to'])); ?></textarea>
+		<textarea name="email_to" style="width: 100%; height: 30px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes($setting['email_to'])); ?></textarea>
 	</td>
 </tr>
 <tr>
@@ -85,7 +85,7 @@
 		<select name="email_from_field" style="width: 100%;">
 			<option value="" onclick="javascript: document.getElementById('email_from').style.display = 'block';"><?php echo $TEXT['CUSTOM']; ?>:</option>
 			<?php
-			$email_from_value = str_replace($raw, $friendly, $admin->stripslashes($setting['email_from']));
+			$email_from_value = str_replace($raw, $friendly, $admin->strip_slashes($setting['email_from']));
 			$query_email_fields = $database->query("SELECT field_id,title FROM ".TABLE_PREFIX."mod_form_fields ORDER BY position ASC");
 			if($query_email_fields->numRows() > 0) {
 				while($field = $query_email_fields->fetchRow()) {
@@ -104,25 +104,25 @@
 <tr>
 	<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['SUBJECT']; ?>:</td>
 	<td class="setting_name">
-		<input type="text" name="email_subject" style="width: 100%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, $admin->stripslashes($setting['email_subject'])); ?>" />
+		<input type="text" name="email_subject" style="width: 100%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, $admin->strip_slashes($setting['email_subject'])); ?>" />
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['SUCCESS'].' '.$TEXT['MESSAGE']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="success_message" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($setting['success_message'])); ?></textarea>
+		<textarea name="success_message" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes($setting['success_message'])); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['MAX_SUBMISSIONS_PER_HOUR']; ?>:</td>
 	<td class="setting_name">
-		<input type="text" name="max_submissions" style="width: 100%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, $admin->stripslashes($setting['max_submissions'])); ?>" />
+		<input type="text" name="max_submissions" style="width: 100%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, $admin->strip_slashes($setting['max_submissions'])); ?>" />
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['SUBMISSIONS_STORED_IN_DATABASE']; ?>:</td>
 	<td class="setting_name">
-		<input type="text" name="stored_submissions" style="width: 100%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, $admin->stripslashes($setting['stored_submissions'])); ?>" />
+		<input type="text" name="stored_submissions" style="width: 100%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, $admin->strip_slashes($setting['stored_submissions'])); ?>" />
 	</td>
 </tr>
 </table>
Index: trunk/wb/modules/form/view.php
===================================================================
--- trunk/wb/modules/form/view.php	(revision 39)
+++ trunk/wb/modules/form/view.php	(revision 40)
@@ -113,9 +113,9 @@
 $query_settings = $database->query("SELECT header,field_loop,footer FROM ".TABLE_PREFIX."mod_form_settings WHERE section_id = '$section_id'");
 if($query_settings->numRows() > 0) {
 	$fetch_settings = $query_settings->fetchRow();
-	$header = $this->stripslashes($fetch_settings['header']);
-	$field_loop = $this->stripslashes($fetch_settings['field_loop']);
-	$footer = $this->stripslashes($fetch_settings['footer']);
+	$header = $this->strip_slashes($fetch_settings['header']);
+	$field_loop = $this->strip_slashes($fetch_settings['field_loop']);
+	$footer = $this->strip_slashes($fetch_settings['footer']);
 } else {
 	$header = '';
 	$field_loop = '';
@@ -136,7 +136,7 @@
 	while($field = $query_fields->fetchRow()) {
 		// Set field values
 		$field_id = $field['field_id'];
-		$value = $this->stripslashes($field['value']);
+		$value = $this->strip_slashes($field['value']);
 		// Print field_loop after replacing vars with values
 		$vars = array('{TITLE}', '{REQUIRED}');
 		$values = array($field['title']);
@@ -198,16 +198,16 @@
 	$query_settings = $database->query("SELECT email_to,email_from,email_subject,success_message,max_submissions,stored_submissions FROM ".TABLE_PREFIX."mod_form_settings WHERE section_id = '$section_id'");
 	if($query_settings->numRows() > 0) {
 		$fetch_settings = $query_settings->fetchRow();
-		$email_to = $this->stripslashes($fetch_settings['email_to']);
-		$email_from = $this->stripslashes($fetch_settings['email_from']);
+		$email_to = $this->strip_slashes($fetch_settings['email_to']);
+		$email_from = $this->strip_slashes($fetch_settings['email_from']);
 		if(substr($email_from, 0, 5) == 'field') {
 			// Set the email from field to what the user entered in the specified field
-			$email_from = addslashes($_POST[$email_from]);
+			$email_from = $this->add_slashes($_POST[$email_from]);
 		}
-		$email_subject = $this->stripslashes($fetch_settings['email_subject']);
-		$success_message = $this->stripslashes($fetch_settings['success_message']);
-		$max_submissions = $this->stripslashes($fetch_settings['max_submissions']);
-		$stored_submissions = $this->stripslashes($fetch_settings['stored_submissions']);
+		$email_subject = $this->strip_slashes($fetch_settings['email_subject']);
+		$success_message = $this->strip_slashes($fetch_settings['success_message']);
+		$max_submissions = $this->strip_slashes($fetch_settings['max_submissions']);
+		$stored_submissions = $this->strip_slashes($fetch_settings['stored_submissions']);
 	} else {
 		exit($TEXT['UNDER_CONSTRUCTION']);
 	}
@@ -231,11 +231,11 @@
 					} elseif (!is_array($_POST['field'.$field['field_id']])) {
 					$email_body .= '
 					
-	'.$this->stripslashes($field['title']).': '.$_POST['field'.$field['field_id']].'\n';
+	'.$this->strip_slashes($field['title']).': '.$_POST['field'.$field['field_id']]."\n";
 					} else {
 						$email_body .= '
 					
-	'.$this->stripslashes($field['title']).': \n';
+	'.$this->strip_slashes($field['title']).": \n";
 						foreach ($_POST['field'.$field['field_id']] as $k=>$v) {
 							$email_body .= '
 					
@@ -243,14 +243,14 @@
 						}
 					}
 				} elseif($field['required'] == 1) {
-				$required[] = $this->stripslashes($field['title']);
+				$required[] = $this->strip_slashes($field['title']);
 				}
 			}
 		}
 	}
 	
-	// Addslashes to email body
-	$email_body = addslashes($email_body);
+	// Addslashes to email body - proposed by Icheb in topic=1170.0
+	// $email_body = $this->add_slashes($email_body);
 	
 	// Check if the user forgot to enter values into all the required fields
 	if($required != array()) {
@@ -288,6 +288,7 @@
 			} else {
 				$submitted_by = 0;
 			}
+			$email_body = $this->add_slashes($email_body);
 			$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_submissions (page_id,section_id,submitted_when,submitted_by,body) VALUES ('".PAGE_ID."','$section_id','".mktime()."','$submitted_by','$email_body')");
 			// Make sure submissions table isn't too full
 			$query_submissions = $database->query("SELECT submission_id FROM ".TABLE_PREFIX."mod_form_submissions ORDER BY submitted_when");
Index: trunk/wb/modules/form/save_settings.php
===================================================================
--- trunk/wb/modules/form/save_settings.php	(revision 39)
+++ trunk/wb/modules/form/save_settings.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: save_settings.php,v 1.3 2005/03/28 04:34:45 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -37,17 +37,17 @@
 // This code removes any <?php tags and adds slashes
 $friendly = array('&lt;', '&gt;', '?php');
 $raw = array('<', '>', '');
-$header = addslashes($_POST['header']);
-$field_loop = addslashes($_POST['field_loop']);
-$footer = addslashes($_POST['footer']);
-$email_to = addslashes($_POST['email_to']);
+$header = $admin->add_slashes($_POST['header']);
+$field_loop = $admin->add_slashes($_POST['field_loop']);
+$footer = $admin->add_slashes($_POST['footer']);
+$email_to = $admin->add_slashes($_POST['email_to']);
 if($_POST['email_from_field'] == '') {
-	$email_from = addslashes($_POST['email_from']);
+	$email_from = $admin->add_slashes($_POST['email_from']);
 } else {
-	$email_from = addslashes($_POST['email_from_field']);
+	$email_from = $admin->add_slashes($_POST['email_from_field']);
 }
-$email_subject = addslashes($_POST['email_subject']);
-$success_message = addslashes($_POST['success_message']);
+$email_subject = $admin->add_slashes($_POST['email_subject']);
+$success_message = $admin->add_slashes($_POST['success_message']);
 if(!is_numeric($_POST['max_submissions'])) {
 	$max_submissions = 50;
 } else {
Index: trunk/wb/modules/form/view_submission.php
===================================================================
--- trunk/wb/modules/form/view_submission.php	(revision 39)
+++ trunk/wb/modules/form/view_submission.php	(revision 40)
@@ -75,7 +75,7 @@
 </tr>
 <tr>
 	<td colspan="2">
-		<?php echo $admin->stripslashes(str_replace('\n', '<br />', $submission['body'])); ?>
+		<?php echo $admin->strip_slashes(str_replace('\n', '<br />', $submission['body'])); ?>
 	</td>
 </tr>
 </table>
Index: trunk/wb/modules/code/view.php
===================================================================
--- trunk/wb/modules/code/view.php	(revision 39)
+++ trunk/wb/modules/code/view.php	(revision 40)
@@ -26,7 +26,7 @@
 // Get content
 $get_content = $database->query("SELECT content FROM ".TABLE_PREFIX."mod_code WHERE section_id = '$section_id'");
 $fetch_content = $get_content->fetchRow();
-$content = $this->stripslashes($fetch_content['content']);
+$content = $this->strip_slashes($fetch_content['content']);
 eval($content);
 
 ?>
\ No newline at end of file
Index: trunk/wb/modules/code/save.php
===================================================================
--- trunk/wb/modules/code/save.php	(revision 39)
+++ trunk/wb/modules/code/save.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: save.php,v 1.2 2005/04/02 06:25:55 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -33,7 +33,7 @@
 if(isset($_POST['content'])) {
 	$tags = array('<?php', '?>', '<?');
 	$blanks = array('','','');
-	$content = addslashes(str_replace($tags, $blanks, $_POST['content']));
+	$content = $admin->add_slashes(str_replace($tags, $blanks, $_POST['content']));
 	$database = new database();
 	$query = "UPDATE ".TABLE_PREFIX."mod_code SET content = '$content' WHERE section_id = '$section_id'";
 	$database->query($query);	
Index: trunk/wb/modules/code/modify.php
===================================================================
--- trunk/wb/modules/code/modify.php	(revision 39)
+++ trunk/wb/modules/code/modify.php	(revision 40)
@@ -32,7 +32,7 @@
 $query = "SELECT content FROM ".TABLE_PREFIX."mod_code WHERE section_id = '$section_id'";
 $get_content = $database->query($query);
 $content = $get_content->fetchRow();
-$content = $admin->stripslashes(htmlspecialchars($content['content']));
+$content = $admin->strip_slashes(htmlspecialchars($content['content']));
 
 // Insert vars
 $template->set_var(array(
Index: trunk/wb/modules/news/modify_post.php
===================================================================
--- trunk/wb/modules/news/modify_post.php	(revision 39)
+++ trunk/wb/modules/news/modify_post.php	(revision 40)
@@ -51,12 +51,12 @@
 function initEditor() {
 	var editor = new HTMLArea("short");
 	editor.registerPlugin(ContextMenu);
-	editor.config.pageStyle = "body { <?php echo $admin->stripslashes(WYSIWYG_STYLE); ?> }";
+	editor.config.pageStyle = "body { <?php echo $admin->strip_slashes(WYSIWYG_STYLE); ?> }";
 	editor.generate();
 	var editor = new HTMLArea("long");
 	editor.registerPlugin(ContextMenu);
 	editor.registerPlugin(TableOperations);
-	editor.config.pageStyle = "body { <?php echo $admin->stripslashes(WYSIWYG_STYLE); ?> }";
+	editor.config.pageStyle = "body { <?php echo $admin->strip_slashes(WYSIWYG_STYLE); ?> }";
 	editor.generate();
 }
 </script>
@@ -72,7 +72,7 @@
 <tr>
 	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
 	<td>
-		<input type="text" name="title" value="<?php echo $admin->stripslashes(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
+		<input type="text" name="title" value="<?php echo $admin->strip_slashes(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
 	</td>
 </tr>
 <tr>
@@ -121,13 +121,13 @@
 <tr>
 	<td valign="top"><?php echo $TEXT['SHORT']; ?>:</td>
 	<td>
-		<textarea name="short" id="short" style="width: 100%; height: 135px;"><?php echo htmlspecialchars($admin->stripslashes($fetch_content['short'])); ?></textarea>
+		<textarea name="short" id="short" style="width: 100%; height: 135px;"><?php echo htmlspecialchars($admin->strip_slashes($fetch_content['short'])); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td valign="top"><?php echo $TEXT['LONG']; ?>:</td>
 	<td>
-		<textarea name="long" id="long" style="width: 100%; height: 300px;"><?php echo htmlspecialchars($admin->stripslashes($fetch_content['long'])); ?></textarea>
+		<textarea name="long" id="long" style="width: 100%; height: 300px;"><?php echo htmlspecialchars($admin->strip_slashes($fetch_content['long'])); ?></textarea>
 	</td>
 </tr>
 </table>
Index: trunk/wb/modules/news/comment_page.php
===================================================================
--- trunk/wb/modules/news/comment_page.php	(revision 39)
+++ trunk/wb/modules/news/comment_page.php	(revision 40)
@@ -35,7 +35,7 @@
 	// Print comments page
 	$vars = array('[POST_TITLE]', '[ACTION_URL]');
 	$values = array(POST_TITLE, WB_URL.'/modules/news/submit_comment.php?page_id='.PAGE_ID.'&section_id='.SECTION_ID.'&post_id='.POST_ID);
-	echo str_replace($vars, $values, $this->stripslashes($settings['comments_page']));
+	echo str_replace($vars, $values, $this->strip_slashes($settings['comments_page']));
 }
 
 ?>
\ No newline at end of file
Index: trunk/wb/modules/news/save_post.php
===================================================================
--- trunk/wb/modules/news/save_post.php	(revision 39)
+++ trunk/wb/modules/news/save_post.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: save_post.php,v 1.8 2005/06/21 09:13:55 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -41,9 +41,9 @@
 if($admin->get_post('title') == '' AND $admin->get_post('url') == '') {
 	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$id);
 } else {
-	$title = addslashes($admin->get_post('title'));
-	$short = addslashes($admin->get_post('short'));
-	$long = addslashes($admin->get_post('long'));
+	$title = $admin->add_slashes($admin->get_post('title'));
+	$short = $admin->add_slashes($admin->get_post('short'));
+	$long = $admin->add_slashes($admin->get_post('long'));
 	$commenting = $admin->get_post('commenting');
 	$active = $admin->get_post('active');
 	$old_link = $admin->get_post('link');
Index: trunk/wb/modules/news/modify_group.php
===================================================================
--- trunk/wb/modules/news/modify_group.php	(revision 39)
+++ trunk/wb/modules/news/modify_group.php	(revision 40)
@@ -51,7 +51,7 @@
 <tr>
 	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
 	<td>
-		<input type="text" name="title" value="<?php echo $admin->stripslashes(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
+		<input type="text" name="title" value="<?php echo $admin->strip_slashes(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
 	</td>
 </tr>
 <tr>
Index: trunk/wb/modules/news/modify_settings.php
===================================================================
--- trunk/wb/modules/news/modify_settings.php	(revision 39)
+++ trunk/wb/modules/news/modify_settings.php	(revision 40)
@@ -53,31 +53,31 @@
 <tr>
 	<td class="setting_name" width="100"><?php echo $TEXT['HEADER']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="header" style="width: 100%; height: 80px;"><?php echo $admin->stripslashes($fetch_content['header']); ?></textarea>
+		<textarea name="header" style="width: 100%; height: 80px;"><?php echo $admin->strip_slashes($fetch_content['header']); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['POST'].' '.$TEXT['LOOP']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="post_loop" style="width: 100%; height: 60px;"><?php echo $admin->stripslashes($fetch_content['post_loop']); ?></textarea>
+		<textarea name="post_loop" style="width: 100%; height: 60px;"><?php echo $admin->strip_slashes($fetch_content['post_loop']); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['FOOTER']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="footer" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($fetch_content['footer'])); ?></textarea>
+		<textarea name="footer" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes($fetch_content['footer'])); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['POST_HEADER']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="post_header" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($fetch_content['post_header'])); ?></textarea>
+		<textarea name="post_header" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes($fetch_content['post_header'])); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['POST_FOOTER']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="post_footer" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($fetch_content['post_footer'])); ?></textarea>
+		<textarea name="post_footer" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes($fetch_content['post_footer'])); ?></textarea>
 	</td>
 </tr>
 <tr>
@@ -130,25 +130,25 @@
 <tr>
 	<td class="setting_name"><?php echo $TEXT['COMMENTS'].' '.$TEXT['HEADER']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="comments_header" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($fetch_content['comments_header'])); ?></textarea>
+		<textarea name="comments_header" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes($fetch_content['comments_header'])); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['COMMENTS'].' '.$TEXT['LOOP']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="comments_loop" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($fetch_content['comments_loop'])); ?></textarea>
+		<textarea name="comments_loop" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes($fetch_content['comments_loop'])); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['COMMENTS'].' '.$TEXT['FOOTER']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="comments_footer" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($fetch_content['comments_footer'])); ?></textarea>
+		<textarea name="comments_footer" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes($fetch_content['comments_footer'])); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['COMMENTS'].' '.$TEXT['PAGE']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="comments_page" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($fetch_content['comments_page'])); ?></textarea>
+		<textarea name="comments_page" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes($fetch_content['comments_page'])); ?></textarea>
 	</td>
 </tr>
 </table>
Index: trunk/wb/modules/news/modify_comment.php
===================================================================
--- trunk/wb/modules/news/modify_comment.php	(revision 39)
+++ trunk/wb/modules/news/modify_comment.php	(revision 40)
@@ -52,13 +52,13 @@
 <tr>
 	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
 	<td>
-		<input type="text" name="title" value="<?php echo $admin->stripslashes(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
+		<input type="text" name="title" value="<?php echo $admin->strip_slashes(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
 	</td>
 </tr>
 <tr>
 	<td valign="top"><?php echo $TEXT['COMMENT']; ?>:</td>
 	<td>
-		<textarea name="comment" style="width: 100%; height: 150px;"><?php echo $admin->stripslashes(htmlspecialchars($fetch_content['comment'])); ?></textarea>
+		<textarea name="comment" style="width: 100%; height: 150px;"><?php echo $admin->strip_slashes(htmlspecialchars($fetch_content['comment'])); ?></textarea>
 	</td>
 </tr>
 </table>
Index: trunk/wb/modules/news/save_group.php
===================================================================
--- trunk/wb/modules/news/save_group.php	(revision 39)
+++ trunk/wb/modules/news/save_group.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: save_group.php,v 1.3 2005/03/27 05:25:32 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -43,7 +43,7 @@
 if($admin->get_post('title') == '') {
 	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/news/modify_group.php?page_id='.$page_id.'&section_id='.$section_id.'&group_id='.$group_id);
 } else {
-	$title = addslashes($admin->get_post('title'));
+	$title = $admin->add_slashes($admin->get_post('title'));
 	$active = $admin->get_post('active');
 }
 
Index: trunk/wb/modules/news/view.php
===================================================================
--- trunk/wb/modules/news/view.php	(revision 39)
+++ trunk/wb/modules/news/view.php	(revision 40)
@@ -55,7 +55,7 @@
 	while($group = $query_users->fetchRow()) {
 		// Insert user info into users array
 		$group_id = $group['group_id'];
-		$groups[$group_id]['title'] = $this->stripslashes($group['title']);
+		$groups[$group_id]['title'] = $this->strip_slashes($group['title']);
 		$groups[$group_id]['active'] = $group['active'];
 		if(file_exists(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg')) {
 			$groups[$group_id]['image'] = WB_URL.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg';
@@ -82,9 +82,9 @@
 	$query_settings = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
 	if($query_settings->numRows() > 0) {
 		$fetch_settings = $query_settings->fetchRow();
-		$setting_header = $this->stripslashes($fetch_settings['header']);
-		$setting_post_loop = $this->stripslashes($fetch_settings['post_loop']);
-		$setting_footer = $this->stripslashes($fetch_settings['footer']);
+		$setting_header = $this->strip_slashes($fetch_settings['header']);
+		$setting_post_loop = $this->strip_slashes($fetch_settings['post_loop']);
+		$setting_footer = $this->strip_slashes($fetch_settings['footer']);
 		$setting_posts_per_page = $fetch_settings['posts_per_page'];
 	} else {
 		$setting_header = '';
@@ -185,14 +185,14 @@
 				if($group_image == '') { $display_image = 'none'; } else { $display_image = ''; }
 				if($group_id == 0) { $display_group = 'none'; } else { $display_group = ''; }
 				// Replace [wblink--PAGE_ID--] with real link
-				$short = $this->stripslashes($post['short']);
+				$short = $this->strip_slashes($post['short']);
 				$this->preprocess($short);
 				// Replace vars with values
 				$vars = array('[PAGE_TITLE]', '[GROUP_ID]', '[GROUP_TITLE]', '[GROUP_IMAGE]', '[DISPLAY_GROUP]', '[DISPLAY_IMAGE]', '[TITLE]', '[SHORT]', '[LINK]', '[DATE]', '[TIME]', '[USER_ID]', '[USERNAME]', '[DISPLAY_NAME]', '[EMAIL]', '[TEXT_READ_MORE]');
 				if(isset($users[$uid]['username']) AND $users[$uid]['username'] != '') {
-					$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->stripslashes($post['title']), $short, $post_link, $post_date, $post_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email'], $TEXT['READ_MORE']);
+					$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes($post['title']), $short, $post_link, $post_date, $post_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email'], $TEXT['READ_MORE']);
 				} else {
-					$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->stripslashes($post['title']), $short, $post_link, $post_date, $post_time, '', '', '', '', $TEXT['READ_MORE']);
+					$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes($post['title']), $short, $post_link, $post_date, $post_time, '', '', '', '', $TEXT['READ_MORE']);
 				}
 				echo str_replace($vars, $values, $setting_post_loop);
 			}
@@ -212,11 +212,11 @@
 	$query_settings = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
 	if($query_settings->numRows() > 0) {
 		$fetch_settings = $query_settings->fetchRow();
-		$setting_post_header = $this->stripslashes($fetch_settings['post_header']);
-		$setting_post_footer = $this->stripslashes($fetch_settings['post_footer']);
-		$setting_comments_header = $this->stripslashes($fetch_settings['comments_header']);
-		$setting_comments_loop = $this->stripslashes($fetch_settings['comments_loop']);
-		$setting_comments_footer = $this->stripslashes($fetch_settings['comments_footer']);
+		$setting_post_header = $this->strip_slashes($fetch_settings['post_header']);
+		$setting_post_footer = $this->strip_slashes($fetch_settings['post_footer']);
+		$setting_comments_header = $this->strip_slashes($fetch_settings['comments_header']);
+		$setting_comments_loop = $this->strip_slashes($fetch_settings['comments_loop']);
+		$setting_comments_footer = $this->strip_slashes($fetch_settings['comments_footer']);
 	} else {
 		$setting_post_header = '';
 		$setting_post_footer = '';
@@ -258,11 +258,11 @@
 			if($group_id == 0) { $display_group = 'none'; } else { $display_group = ''; }
 			$vars = array('[PAGE_TITLE]', '[GROUP_ID]', '[GROUP_TITLE]', '[GROUP_IMAGE]', '[DISPLAY_GROUP]', '[DISPLAY_IMAGE]', '[TITLE]', '[SHORT]', '[BACK]', '[DATE]', '[TIME]', '[USER_ID]', '[USERNAME]', '[DISPLAY_NAME]', '[EMAIL]');
 			if(isset($users[$uid]['username']) AND $users[$uid]['username'] != '') {
-				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->stripslashes($post['title']), $this->stripslashes($post['short']), $page_link, $post_date, $post_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email']);
+				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes($post['title']), $this->strip_slashes($post['short']), $page_link, $post_date, $post_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email']);
 			} else {
-				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->stripslashes($post['title']), $this->stripslashes($post['short']), $page_link, $post_date, $post_time, '', '', '', '');
+				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes($post['title']), $this->strip_slashes($post['short']), $page_link, $post_date, $post_time, '', '', '', '');
 			}
-			$post_long = $this->stripslashes($post['long']);
+			$post_long = $this->strip_slashes($post['long']);
 		}
 	} else {
 		header('Location: '.WB_URL.'/pages/');
@@ -290,8 +290,8 @@
 		if($query_comments->numRows() > 0) {
 			while($comment = $query_comments->fetchRow()) {
 				// Display Comments without slashes, but with new-line characters
-				$comment['comment'] = nl2br($this->stripslashes($comment['comment']));
-				$comment['title'] = $this->stripslashes($comment['title']);
+				$comment['comment'] = nl2br($this->strip_slashes($comment['comment']));
+				$comment['title'] = $this->strip_slashes($comment['title']);
 				// Print comments loop
 				$commented_date = gmdate(DATE_FORMAT, $comment['commented_when']+TIMEZONE);
 				$commented_time = gmdate(TIME_FORMAT, $comment['commented_when']+TIMEZONE);
@@ -298,9 +298,9 @@
 				$uid = $comment['commented_by'];
 				$vars = array('[TITLE]','[COMMENT]','[DATE]','[TIME]','[USER_ID]','[USERNAME]','[DISPLAY_NAME]', '[EMAIL]');
 				if(isset($users[$uid]['username']) AND $users[$uid]['username'] != '') {
-					$values = array($this->stripslashes($comment['title']), $this->stripslashes($comment['comment']), $commented_date, $commented_time, $uid, $this->stripslashes($users[$uid]['username']), $this->stripslashes($users[$uid]['display_name']), $this->stripslashes($users[$uid]['email']));
+					$values = array($this->strip_slashes($comment['title']), $this->strip_slashes($comment['comment']), $commented_date, $commented_time, $uid, $this->strip_slashes($users[$uid]['username']), $this->strip_slashes($users[$uid]['display_name']), $this->strip_slashes($users[$uid]['email']));
 				} else {
-					$values = array($this->stripslashes($comment['title']), $this->stripslashes($comment['comment']), $commented_date, $commented_time, '0', strtolower($TEXT['UNKNOWN']), $TEXT['UNKNOWN'], '');
+					$values = array($this->strip_slashes($comment['title']), $this->strip_slashes($comment['comment']), $commented_date, $commented_time, '0', strtolower($TEXT['UNKNOWN']), $TEXT['UNKNOWN'], '');
 				}
 				echo str_replace($vars, $values, $setting_comments_loop);
 			}
Index: trunk/wb/modules/news/save_settings.php
===================================================================
--- trunk/wb/modules/news/save_settings.php	(revision 39)
+++ trunk/wb/modules/news/save_settings.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: save_settings.php,v 1.2 2005/04/01 07:52:58 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -32,15 +32,15 @@
 // This code removes any <?php tags and adds slashes
 $friendly = array('&lt;', '&gt;', '?php');
 $raw = array('<', '>', '');
-$header = addslashes(str_replace($friendly, $raw, $_POST['header']));
-$post_loop = addslashes(str_replace($friendly, $raw, $_POST['post_loop']));
-$footer = addslashes(str_replace($friendly, $raw, $_POST['footer']));
-$post_header = addslashes(str_replace($friendly, $raw, $_POST['post_header']));
-$post_footer = addslashes(str_replace($friendly, $raw, $_POST['post_footer']));
-$comments_header = addslashes(str_replace($friendly, $raw, $_POST['comments_header']));
-$comments_loop = addslashes(str_replace($friendly, $raw, $_POST['comments_loop']));
-$comments_footer = addslashes(str_replace($friendly, $raw, $_POST['comments_footer']));
-$comments_page = addslashes(str_replace($friendly, $raw, $_POST['comments_page']));
+$header = $admin->add_slashes(str_replace($friendly, $raw, $_POST['header']));
+$post_loop = $admin->add_slashes(str_replace($friendly, $raw, $_POST['post_loop']));
+$footer = $admin->add_slashes(str_replace($friendly, $raw, $_POST['footer']));
+$post_header = $admin->add_slashes(str_replace($friendly, $raw, $_POST['post_header']));
+$post_footer = $admin->add_slashes(str_replace($friendly, $raw, $_POST['post_footer']));
+$comments_header = $admin->add_slashes(str_replace($friendly, $raw, $_POST['comments_header']));
+$comments_loop = $admin->add_slashes(str_replace($friendly, $raw, $_POST['comments_loop']));
+$comments_footer = $admin->add_slashes(str_replace($friendly, $raw, $_POST['comments_footer']));
+$comments_page = $admin->add_slashes(str_replace($friendly, $raw, $_POST['comments_page']));
 $commenting = $_POST['commenting'];
 $posts_per_page = $_POST['posts_per_page'];
 if(extension_loaded('gd') AND function_exists('imageCreateFromJpeg')) {
Index: trunk/wb/modules/news/save_comment.php
===================================================================
--- trunk/wb/modules/news/save_comment.php	(revision 39)
+++ trunk/wb/modules/news/save_comment.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: save_comment.php,v 1.1.1.1 2005/01/30 10:32:21 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -40,8 +40,8 @@
 if($admin->get_post('title') == '' AND $admin->get_post('comment') == '') {
 	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/modify_comment.php?page_id='.$page_id.'&section_id='.$section_id.'comment_id='.$id);
 } else {
-	$title = addslashes($admin->get_post('title'));
-	$comment = addslashes($admin->get_post('comment'));
+	$title = $admin->add_slashes($admin->get_post('title'));
+	$comment = $admin->add_slashes($admin->get_post('comment'));
 	$post_id = $admin->get_post('post_id');
 }
 
Index: trunk/wb/modules/news/submit_comment.php
===================================================================
--- trunk/wb/modules/news/submit_comment.php	(revision 39)
+++ trunk/wb/modules/news/submit_comment.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: submit_comment.php,v 1.3 2005/03/28 11:58:04 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -42,8 +42,8 @@
 	$page_id = $_GET['page_id'];
 	$section_id = $_GET['section_id'];
 	$post_id = $_GET['post_id'];
-	$title = addslashes(strip_tags($_POST['title']));
-	$comment = addslashes(strip_tags($_POST['comment']));
+	$title = $admin->add_slashes(strip_tags($_POST['title']));
+	$comment = $admin->add_slashes(strip_tags($_POST['comment']));
 	$commented_when = mktime();
 	if(isset($admin) AND $admin->is_authenticated() == true) {
 		$commented_by = $admin->get_user_id();
Index: trunk/wb/modules/news/modify.php
===================================================================
--- trunk/wb/modules/news/modify.php	(revision 39)
+++ trunk/wb/modules/news/modify.php	(revision 40)
@@ -65,7 +65,7 @@
 			</td>
 			<td>
 				<a href="<?php echo WB_URL; ?>/modules/news/modify_post.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $post['post_id']; ?>">
-					<?php echo $admin->stripslashes($post['title']); ?>
+					<?php echo $admin->strip_slashes($post['title']); ?>
 				</a>
 			</td>
 			<td width="180">
@@ -74,7 +74,7 @@
 				$query_title = $database->query("SELECT title FROM ".TABLE_PREFIX."mod_news_groups WHERE group_id = '".$post['group_id']."'");
 				if($query_title->numRows() > 0) {
 					$fetch_title = $query_title->fetchRow();
-					echo $admin->stripslashes($fetch_title['title']);
+					echo $admin->strip_slashes($fetch_title['title']);
 				} else {
 					echo $TEXT['NONE'];
 				}
Index: trunk/wb/modules/news/add.php
===================================================================
--- trunk/wb/modules/news/add.php	(revision 39)
+++ trunk/wb/modules/news/add.php	(revision 40)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: add.php,v 1.2 2005/04/01 07:52:58 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -51,7 +51,7 @@
 <td width="35%" align="right">[NEXT_PAGE_LINK]</td>
 </tr>
 </table>';
-$post_header = addslashes('<table cellpadding="0" cellspacing="0" border="0" width="100%">
+$post_header = $admin->add_slashes('<table cellpadding="0" cellspacing="0" border="0" width="100%">
 <tr>
 <td height="30"><h1>[TITLE]</h1></td>
 <td rowspan="3" style="display: [DISPLAY_IMAGE]"><img src="[GROUP_IMAGE]" alt="[GROUP_TITLE]" /></td>
@@ -66,7 +66,7 @@
 <p style="text-align: justify;">');
 $post_footer = '</p>
 <a href=\"[BACK]\">Back</a>';
-$comments_header = addslashes('<br /><br />
+$comments_header = $admin->add_slashes('<br /><br />
 <style type="text/css">
 .comment_title { font-weight: bold; }
 .comment_text { font-weight: bold; background-color: #FDFDFD; border-bottom: 1px solid #DDDDDD; padding-bottom: 15px; }
@@ -76,7 +76,7 @@
 </style>
 <h2>Comments</h2>
 <table cellpadding="2" cellspacing="0" border="0" width="100%">');
-$comments_loop = addslashes('<tr>
+$comments_loop = $admin->add_slashes('<tr>
 <td class="comment_title">[TITLE]</td>
 <td class="comment_info">By [DISPLAY_NAME] on [DATE] at [TIME]</td>
 </tr>
Index: trunk/wb/modules/admin.php
===================================================================
--- trunk/wb/modules/admin.php	(revision 39)
+++ trunk/wb/modules/admin.php	(revision 40)
@@ -126,7 +126,7 @@
 $template->set_block('page', 'main_block', 'main');
 $template->set_var(array(
 								'PAGE_ID' => $results_array['page_id'],
-								'PAGE_TITLE' => $admin->stripslashes($results_array['page_title']),
+								'PAGE_TITLE' => $admin->strip_slashes($results_array['page_title']),
 								'MODIFIED_BY' => $user['display_name'],
 								'MODIFIED_BY_USERNAME' => $user['username'],
 								'MODIFIED_WHEN' => $modified_ts,
Index: trunk/wb/account/forgot_form.php
===================================================================
--- trunk/wb/account/forgot_form.php	(revision 39)
+++ trunk/wb/account/forgot_form.php	(revision 40)
@@ -36,7 +36,7 @@
 	$email = $_POST['email'];
 	
 	// Check if the email exists in the database
-	$query = "SELECT user_id,username,display_name,email FROM ".TABLE_PREFIX."users WHERE email = '".addslashes($_POST['email'])."'";
+	$query = "SELECT user_id,username,display_name,email FROM ".TABLE_PREFIX."users WHERE email = '".$this->add_slashes($_POST['email'])."'";
 	$results = $database->query($query);
 	if($results->numRows() > 0) {
 		// Get the id, username, and email from the above db query
Index: trunk/wb/account/signup2.php
===================================================================
--- trunk/wb/account/signup2.php	(revision 39)
+++ trunk/wb/account/signup2.php	(revision 40)
@@ -75,7 +75,7 @@
 }
 
 // Check if the email already exists
-$results = $database->query("SELECT user_id FROM ".TABLE_PREFIX."users WHERE email = '".addslashes($_POST['email'])."'");
+$results = $database->query("SELECT user_id FROM ".TABLE_PREFIX."users WHERE email = '".$this->add_slashes($_POST['email'])."'");
 if($results->numRows() > 0) {
 	if(isset($MESSAGE['USERS']['EMAIL_TAKEN'])) {
 		$admin->print_error($MESSAGE['USERS']['EMAIL_TAKEN'], $js_back);
Index: trunk/wb/framework/class.admin.php
===================================================================
--- trunk/wb/framework/class.admin.php	(revision 39)
+++ trunk/wb/framework/class.admin.php	(revision 40)
@@ -93,7 +93,7 @@
 													'SECTION_NAME' => $MENU[strtoupper($this->section_name)],
 													'INTERFACE_DIR' => ADMIN_URL.'/interface',
 													'BODY_TAGS' => $body_tags,
-													'WEBSITE_TITLE' => $this->stripslashes($title['value']),
+													'WEBSITE_TITLE' => $this->strip_slashes($title['value']),
 													'TEXT_ADMINISTRATION' => $TEXT['ADMINISTRATION'],
 													'VERSION' => VERSION
 													)
Index: trunk/wb/framework/class.wb.php
===================================================================
--- trunk/wb/framework/class.wb.php	(revision 39)
+++ trunk/wb/framework/class.wb.php	(revision 40)
@@ -30,11 +30,7 @@
 This class is the basis for admin and frontend classes.
 
 */
-if(!defined('WB_URL')) {
-	header('Location: ../index.php');
-}
 
-
 class wb
 {
 	function wb() {
@@ -74,16 +70,17 @@
 	}
 
 	// Modified addslashes function which takes into account magic_quotes
-	function addslashes($input) {
+	function add_slashes($input) {
+		return addslashes($input);		
 		if ( get_magic_quotes_gpc() || ( !is_string($input) ) ) {
 			return $input;
 		}
-		$output = stripslashes($input);
+		$output = addslashes($input);
 		return $output;
 	}
 
 	// Ditto for stripslashes
-	function stripslashes($input) {
+	function strip_slashes($input) {
 		if ( !get_magic_quotes_gpc() || ( !is_string($input) ) ) {
 			return $input;
 		}
@@ -154,7 +151,7 @@
 
 	// Get the current users display name
 	function get_display_name() {
-		return $this->stripslashes($_SESSION['DISPLAY_NAME']);
+		return $this->strip_slashes($_SESSION['DISPLAY_NAME']);
 	}
 
 	// Get the current users email address
Index: trunk/wb/framework/class.frontend.php
===================================================================
--- trunk/wb/framework/class.frontend.php	(revision 39)
+++ trunk/wb/framework/class.frontend.php	(revision 40)
@@ -72,7 +72,7 @@
 				$content = fread($handle, filesize($filename));
 				fclose($handle);
 				$this->preprocess($content);
-				echo $this->stripslashes($content);
+				echo $this->strip_slashes($content);
 				return false;
 			}
 		}
@@ -140,10 +140,10 @@
 			define('PAGE_ID', $this->page['page_id']);
 			$this->page_id=$this->page['page_id'];
 			// Page Title
-			define('PAGE_TITLE', $this->stripslashes($this->page['page_title']));
+			define('PAGE_TITLE', $this->strip_slashes($this->page['page_title']));
 			$this->page_title=PAGE_TITLE;
 			// Menu Title
-			$menu_title = $this->stripslashes($this->page['menu_title']);
+			$menu_title = $this->strip_slashes($this->page['menu_title']);
 			if($menu_title != '') {
 				define('MENU_TITLE', $menu_title);
 			} else {
@@ -252,7 +252,7 @@
 		while($setting = $get_settings->fetchRow()) {
 			switch($setting['name']) {
 				case 'title':
-					define('WEBSITE_TITLE', $this->stripslashes($setting['value']));
+					define('WEBSITE_TITLE', $this->strip_slashes($setting['value']));
 					$this->website_title=WEBSITE_TITLE;
 				break;
 				case 'description':
@@ -259,24 +259,24 @@
 					if($page_description != '') {
 						define('WEBSITE_DESCRIPTION', $page_description);
 					} else {
-						define('WEBSITE_DESCRIPTION', $this->stripslashes($setting['value']));
+						define('WEBSITE_DESCRIPTION', $this->strip_slashes($setting['value']));
 					}
 					$this->website_description=WEBSITE_DESCRIPTION;
 				break;
 				case 'keywords':
 					if($page_keywords != '') {
-						define('WEBSITE_KEYWORDS', $this->stripslashes($setting['value']).' '.$page_keywords);
+						define('WEBSITE_KEYWORDS', $this->strip_slashes($setting['value']).' '.$page_keywords);
 					} else {
-						define('WEBSITE_KEYWORDS', $this->stripslashes($setting['value']));
+						define('WEBSITE_KEYWORDS', $this->strip_slashes($setting['value']));
 					}
 					$this->website_keywords=WEBSITE_KEYWORDS;
 				break;
 				case 'header':
-					define('WEBSITE_HEADER', $this->stripslashes($setting['value']));
+					define('WEBSITE_HEADER', $this->strip_slashes($setting['value']));
 					$this->website_header=WEBSITE_HEADER;
 				break;
 				case 'footer':
-					define('WEBSITE_FOOTER', $this->stripslashes($setting['value']));
+					define('WEBSITE_FOOTER', $this->strip_slashes($setting['value']));
 					$this->website_footer=WEBSITE_FOOTER;
 				break;
 			}
@@ -390,7 +390,7 @@
 	            $link = $this->page_link($page['link']);
 	         }
 	         // Create values
-	         $values = array($class,'<a href="'.$link.'" target="'.$page['target'].'" '.$class.'>', '</a>', $this->stripslashes($page['menu_title']), $this->stripslashes($page['page_title']));
+	         $values = array($class,'<a href="'.$link.'" target="'.$page['target'].'" '.$class.'>', '</a>', $this->strip_slashes($page['menu_title']), $this->strip_slashes($page['page_title']));
 	         // Replace vars with value and print
 	         echo "\n".str_replace($vars, $values, $this->menu_item_template);
 	         // Generate sub-menu
Index: trunk/wb/framework/functions.php
===================================================================
--- trunk/wb/framework/functions.php	(revision 39)
+++ trunk/wb/framework/functions.php	(revision 40)
@@ -630,8 +630,8 @@
 	$parent = $results_array['parent'];
 	$level = $results_array['level'];
 	$link = $results_array['link'];
-	$page_title = $admin->stripslashes($results_array['page_title']);
-	$menu_title = $admin->stripslashes($results_array['menu_title']);
+	$page_title = $admin->strip_slashes($results_array['page_title']);
+	$menu_title = $admin->strip_slashes($results_array['menu_title']);
 	
 	// Get the sections that belong to the page
 	$query_sections = $database->query("SELECT section_id,module FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id'");
