Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 575)
+++ trunk/CHANGELOG	(revision 576)
@@ -11,10 +11,13 @@
 ! = Update/Change
 
 ------------------------------------- 2.7.0 -------------------------------------
-
-20-Jan-2008 Thomas Hornik
-!	updated admin/pages/sections.php to changed jscalendar-api from changeset 571
-!	module menu_link: after adding a menu_link, the anchor dropdown shows "#"; fixed 
+
+20-Jan-2008 Christian Sommer
++	added the new admin tool email output filter which allows to transform
+	emails before displaying them on the frontend
+20-Jan-2008 Thomas Hornik
+!	updated admin/pages/sections.php to changed jscalendar-api from changeset 571
+!	module menu_link: after adding a menu_link, the anchor dropdown shows "#"; fixed 
 #	fixed E_NOTICE-warning in news-module (about SECTION_ID in comment.php)
 19-Jan-2008 Christian Sommer
 !	Reduced the success time out and set WYSIWSY background to white
@@ -23,9 +26,9 @@
 19-Jan-2008 Matthias Gallas
 #	Fixed bug in news modul with missing variable PAGE_DIRECTORY
 +	Added keywords to new files
-19-Jan-2008 Thomas Hornik
--	Module news: removed old calendar
-+	Module news: adapted news to use the new include/jscalendar
+19-Jan-2008 Thomas Hornik
+-	Module news: removed old calendar
++	Module news: adapted news to use the new include/jscalendar
 +	added installation-instructions to include/jscalendar
 #	Module code: curly backets get deleted by pparse() from phplib. fixed
 +	Module menu_link: added dropdown-listbox to select anchor
Index: trunk/wb/framework/frontend.functions.php
===================================================================
--- trunk/wb/framework/frontend.functions.php	(revision 575)
+++ trunk/wb/framework/frontend.functions.php	(revision 576)
@@ -346,18 +346,18 @@
 			$base_file = "frontend.js";
 		}
 
-  	// gather information for all models embedded on actual page
+  		// gather information for all models embedded on actual page
 		$page_id = $wb->page_id;
-    $query_modules = $database->query("SELECT module FROM " .TABLE_PREFIX ."sections 
+    	$query_modules = $database->query("SELECT module FROM " .TABLE_PREFIX ."sections 
 			WHERE page_id=$page_id AND module<>'wysiwyg'");
 
-    while($row = $query_modules->fetchRow()) {
+    	while($row = $query_modules->fetchRow()) {
 			// check if page module directory contains a frontend.js or frontend.css file
-    	if(file_exists(WB_PATH ."/modules/" .$row['module'] ."/$base_file")) {
+    		if(file_exists(WB_PATH ."/modules/" .$row['module'] ."/$base_file")) {
 				// create link with frontend.js or frontend.css source for the current module
 				$tmp_link = str_replace("{MODULE_DIRECTORY}", $row['module'], $base_link);
 
-        // define constant indicating that the register_frontent_files was invoked
+        		// define constant indicating that the register_frontent_files was invoked
 				if($file_id == 'css') {
 					define('MOD_FRONTEND_CSS_REGISTERED', true);
 				} else {
@@ -364,13 +364,18 @@
 					define('MOD_FRONTEND_JAVASCRIPT_REGISTERED', true);
 				}
 
-        // ensure that frontend.js or frontend.css is only added once per module type
-        if(strpos($head_links, $tmp_link) === false) {
+        		// ensure that frontend.js or frontend.css is only added once per module type
+        		if(strpos($head_links, $tmp_link) === false) {
 					$head_links .= $tmp_link ."\n";
 				}
 			}
-    }
-  	// write out links with all external module javascript/CSS files, remove last line feed
+    	}
+  		// include the Javascript email protection function
+  		if($file_id != 'css' && file_exists(WB_PATH .'/modules/mail_filter/js/mdcr.js')) {
+			$head_links .= '<script type="text/javascript" src="'.WB_URL.'/modules/mail_filter/js/mdcr.js"></script>' ."\n";
+		}
+  		
+		// write out links with all external module javascript/CSS files, remove last line feed
 		echo $head_links;
 	}
 }
Index: trunk/wb/index.php
===================================================================
--- trunk/wb/index.php	(revision 575)
+++ trunk/wb/index.php	(revision 576)
@@ -79,7 +79,25 @@
 	}
 }
 
-// Display the template
+if(file_exists(WB_PATH .'/modules/mail_filter/filter-routines.php')) {
+	// include the filter routines
+	require_once(WB_PATH .'/modules/mail_filter/filter-routines.php');
+	
+	// get the mail filter settings from the database 
+	$mail_filter_settings = get_mail_filter_settings();
+	// check if we should filter emails before displaying them
+	if($mail_filter_settings['email_filter'] == '1') {
+		// filter email addresses before displaying them
+		ob_start();
+		require(WB_PATH.'/templates/'.TEMPLATE.'/index.php');
+		$frontend_output = ob_get_contents();
+		ob_end_clean();
+		$frontend_output = filter_email_links($frontend_output);
+		echo $frontend_output;
+		die;
+	}
+}
+// Display the template (no output filtering)
 require(WB_PATH.'/templates/'.TEMPLATE.'/index.php');
 
 ?>
\ No newline at end of file
Index: trunk/wb/modules/mail_filter/uninstall.php
===================================================================
--- trunk/wb/modules/mail_filter/uninstall.php	(nonexistent)
+++ trunk/wb/modules/mail_filter/uninstall.php	(revision 576)
@@ -0,0 +1,32 @@
+<?php
+
+// $Id: uninstall.php 547 2008-01-17 19:38:05Z doc $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2008, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// prevent this file from being accessed directly
+if(!defined('WB_PATH')) { exit('Cannot access this file directly'); }
+
+$table = TABLE_PREFIX .'mod_mail_filter';
+$database->query("DROP TABLE `$table`");
+
+?>
\ No newline at end of file
Index: trunk/wb/modules/mail_filter/filter-routines.php
===================================================================
--- trunk/wb/modules/mail_filter/filter-routines.php	(nonexistent)
+++ trunk/wb/modules/mail_filter/filter-routines.php	(revision 576)
@@ -0,0 +1,179 @@
+<?php
+
+// $Id: filter-routines.php 519 2007-12-23 14:37:02Z Doc $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2008, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// direct access prevention
+defined('WB_PATH') OR die(header('Location: ../index.php'));
+
+
+// function to read the current filter settings
+if (!function_exists('get_mail_filter_settings')) {
+	function get_mail_filter_settings() {
+		global $database, $admin;
+		// connect to database and read out filter settings
+		$result = $database->query("SELECT * FROM " .TABLE_PREFIX ."mod_mail_filter");
+		if($result->numRows() > 0) {
+			// get all data
+			$data = $result->fetchRow();
+			$filter_settings['email_filter'] = $admin->strip_slashes($data['email_filter']);
+			$filter_settings['mailto_filter'] = $admin->strip_slashes($data['mailto_filter']);
+			$filter_settings['at_replacement'] = $admin->strip_slashes($data['at_replacement']);
+			$filter_settings['dot_replacement'] = $admin->strip_slashes($data['dot_replacement']);
+		} else {
+			// something went wrong, use dummy value
+			$filter_settings['email_filter'] = '0';
+			$filter_settings['mailto_filter'] = '0';
+			$filter_settings['at_replacement'] = '(at)';
+			$filter_settings['dot_replacement'] = '(dot)';
+		}
+		
+		// return array with filter settings
+		return $filter_settings;
+	}
+}
+
+
+// function to rewrite email before beeing displayed the frontend
+if (!function_exists('filter_email_links')) {
+	function filter_email_links($content) {
+		// get the mailer settings from the global variable defined in /wb/index.php
+		global $mail_filter_settings;
+
+		// check if there is anything to do
+		global $mail_filter_settings;
+		if(!isset($mail_filter_settings['email_filter']) || $mail_filter_settings['email_filter'] !=='1' ||
+			!isset($mail_filter_settings['mailto_filter']) || !isset($mail_filter_settings['at_replacement']) || 
+			!isset($mail_filter_settings['dot_replacement'])) {
+			return $content;
+		}
+
+		// search pattern to find all mail addresses embedded in the frontend content (both text and mailto emails)
+		$pattern = '#(<a href="mailto:)?(\w[\w|\.|\-]+@\w[\w|\.|\-]+\.[a-zA-Z]{2,})([^">]*">)?([^<]*</a>)?#i';
+		/*
+			exp 1:  (<a href=mailto:)?	-> Optional: search for <a href=mailto:
+			exp 2a: (\w[\w|\.|\-]+@ 	 	-> 1st char word element, one ore more (+) word elements, or (|) . or (|) - followed by @
+			exp 2b: \w[\w|\.|\-]+ 		-> see exp 2 for explanation
+			exp 2c: \.[a-zA-Z]{2,})  	-> dot followed by at least 2 characters (TLD filter: .de, .com, .info) 
+			exp 3: ([^">]*">)?  			-> Optional: all characters except > followed by ">; could contain ?subject=...&body=...
+			exp 4: ([^<]*</a>)?  			-> Optional: all characters except <; email link message
+			? 1 or 0 matches, # encapsulate regex, () subpattern as additional array element, i.. inherent (not case sensitive)
+		*/
+
+		// find all email addresses embedded in the content and encrypt them via callback function encrypt_emails
+		$content = preg_replace_callback($pattern, 'encrypt_emails', $content);
+		return $content;
+	}
+}
+
+
+// function to encrypt mailto links before beeing displayed at the frontend
+if (!function_exists('encrypt_emails')) {
+	function encrypt_emails($match) { 
+		// get the mailer settings from the global variable defined in /wb/index.php
+		global $mail_filter_settings;
+
+		// check if there is anything to do
+		if(!isset($mail_filter_settings['email_filter']) || $mail_filter_settings['email_filter'] !=='1' ||
+			!isset($mail_filter_settings['mailto_filter']) || !isset($mail_filter_settings['at_replacement']) || 
+			!isset($mail_filter_settings['dot_replacement'])) {
+			return $match[0];
+		}
+		
+		// work out replacements
+		$at_replace = strip_tags($mail_filter_settings['at_replacement']);
+		$dot_replace = strip_tags($mail_filter_settings['dot_replacement']);
+
+		// check if extracted email address is mailto or text ($match[0] contains entire regexp pattern)
+		if (strpos($match[0], "mailto:") > 0) {
+			// mailto email
+
+			// do we need to consider mailto links
+			if($mail_filter_settings['mailto_filter'] !='1') {
+				// do not touch mailto links
+				return $match[0];
+			}
+			
+			// email sub parts: [<a href="mailto:] [name@domain.com] [?subject=blubb&Body=text">] [Mail description</a>]
+			$email_href			= $match[1];	// a href part
+			$email_address		= $match[2];	// email address
+			$email_options 	= $match[3];	// optional: subject or body text for mail clients
+			$email_link_text 	= $match[4];	// optional: mail description
+
+			// do some cleaning
+			$email_options 	= str_replace("\">", "", $email_options);					// strip off '">'
+			$email_link_text 	= str_replace("</a>", "", trim($email_link_text));		// strip off closing </a>
+
+			// make sure that all emails have a description
+			if(strlen($email_link_text) == 0 ) {
+				$email_link_text = $email_address;
+			}
+
+			// replace "@" and "." within top level domain (TLD) if link text is a valid email address
+			if(preg_match('#\w[\w|\.|\-]+@\w[\w|\.|\-]+\.[a-zA-Z]{2,}#i', $email_link_text, $email)) {
+				$email_link_text = str_replace("@", $at_replace, $email_address);		// replace @
+				// remove "." from top level domain (TLD) part
+				if (preg_match('#\.[a-zA-Z]{2,}$#im', $email_link_text, $tld) !==0) {
+					$tld_replace =  str_replace(".", $dot_replace, $tld[0]);
+					$email_link_text = str_replace($tld[0], $tld_replace, $email_link_text);				// replace . in email TLD part
+				}
+			}
+		
+			//////////////////////////////////////////////////////////////////////////////////////////////////////////////
+			// encrypt the email address
+			//////////////////////////////////////////////////////////////////////////////////////////////////////////////
+			// create random encryption key
+			mt_srand((double)microtime()*1000000);			// initialize the randomizer (PHP < 4.2.0)
+			$char_shift = mt_rand(1, 5);						// shift:=1; a->b, shift:=5; a-->f
+			$decryption_key = chr($char_shift+97);			// ASCII a:=97
+		
+			// prepare mailto string for encryption (mail protocol, decryption key, mail address)
+			$email_address = "mailto:" .$decryption_key .$email_address;
+		
+			// encrypt email address by shifting characters
+		  	$encrypted_email = "";
+			for($i=0; $i<strlen($email_address); $i++) {
+				$encrypted_email .= chr(ord($email_address[$i]) + $char_shift);
+			}
+			$encrypted_email[7] = $decryption_key;			// replace first character after mailto: with decryption key 
+			$encrypted_email = rawurlencode($encrypted_email);
+
+			// return encrypted javascript mailto link
+			$mailto_link  = "<a href=\"javascript:mdcr('";		// a href part with javascript function to decrypt the email address
+			$mailto_link .= "$encrypted_email')\">";				// add encrypted email address as paramter to JS function mdcr
+			$mailto_link .= $email_link_text ."</a>";				// add email link text and closing </a> tag
+			return $mailto_link;
+		
+		} else {
+			// text email (e.g. name@domain.com)
+			$match[0] = str_replace("@", $at_replace, $match[0]);		// replace @
+			// remove "." from top level domain (TLD) part
+			if (preg_match('#\.[a-zA-Z]{2,}$#im', $match[0], $tld) !==0) {
+				$tld_replace =  str_replace(".", $dot_replace, $tld[0]);
+				return str_replace($tld[0], $tld_replace, $match[0]);							// replace . in email TLD part
+			}
+		}
+	}
+}
+
+?>
Index: trunk/wb/modules/mail_filter/info.php
===================================================================
--- trunk/wb/modules/mail_filter/info.php	(nonexistent)
+++ trunk/wb/modules/mail_filter/info.php	(revision 576)
@@ -0,0 +1,42 @@
+<?php
+
+// $Id: info.php 519 2007-12-23 14:37:02Z Doc $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2008, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+ -----------------------------------------------------------------------------------------
+  Email Output Filter tool for Website Baker v2.7
+  Licencsed under GNU, written by Christian Sommer (Doc)
+ -----------------------------------------------------------------------------------------
+   v0.10  (doc; 21 Jan, 2008)
+    + initial module release (Note: requires WB 2.7 core file changes to work)
+
+*/
+
+$module_directory 	= 'mail_filter';
+$module_name 			= 'Email Output Filter';
+$module_function 		= 'tool';
+$module_version 		= '0.10';
+$module_platform 		= '2.7';
+$module_author 		= 'Christian Sommer (doc)';
+$module_license 		= 'GNU General Public License';
+$module_description 	= 'This module allows you to define rewrite rules for emails (e.g. <em>name@mail.com</em> --> <em>name(at)mail(dot).com</em>).';
+
+?>
\ No newline at end of file
Index: trunk/wb/modules/mail_filter/tool.php
===================================================================
--- trunk/wb/modules/mail_filter/tool.php	(nonexistent)
+++ trunk/wb/modules/mail_filter/tool.php	(revision 576)
@@ -0,0 +1,104 @@
+<?php
+
+// $Id: tool.php 519 2007-12-23 14:37:02Z Doc $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2008, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// direct access prevention
+defined('WB_PATH') OR die(header('Location: ../index.php'));
+
+// check if data was submitted
+if(isset($_POST['save_settings'])) {
+	// get configuration settings
+	$email_filter = ($_POST['email_filter'] == '1') ? '1' : '0';
+	$mailto_filter = ($_POST['mailto_filter'] == '1') ? '1' : '0';
+	
+	// get replacement settings
+	$at_replacement = strip_tags($_POST['at_replacement']);
+	$at_replacement = (strlen(trim($at_replacement)) > 0) ? $admin->add_slashes($at_replacement) : '(at)';
+	$dot_replacement = strip_tags($_POST['dot_replacement']);
+	$dot_replacement = (strlen(trim($dot_replacement)) > 0) ? $admin->add_slashes($dot_replacement) : '(dot)';
+	
+	// update database settings
+	$database->query("UPDATE " .TABLE_PREFIX ."mod_mail_filter SET email_filter = '$email_filter', 
+		mailto_filter = '$mailto_filter', at_replacement = '$at_replacement', dot_replacement = '$dot_replacement'");
+
+	// check if there is a database error, otherwise say successful
+	if($database->is_error()) {
+		$admin->print_error($database->get_error(), $js_back);
+	} else {
+		$admin->print_success($MESSAGE['PAGES']['SAVED'], ADMIN_URL.'/admintools/tool.php?tool=mail_filter');
+	}
+
+} else {
+	// write out heading
+	echo '<h2>Email Output Filter</h2>';
+
+	// include filter functions
+	require_once(WB_PATH .'/modules/mail_filter/filter-routines.php');
+	
+	// read the mail filter settings from the database 
+	$data = get_mail_filter_settings();
+	
+	// output the form with values from the database
+?>
+
+<p>You can enable/disable the output filtering of email adresses with the options below. The Javascript mailto: encryption requires to enable the register_frontend_modfiles in your browser.</p>
+<form name="store_settings" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
+	<table width="98%" cellspacing="0" cellpadding="5px" class="row_a">
+	<tr><td colspan="2"><strong>Basic Configuration:</strong></td></tr>
+	<tr>
+		<td width="35%">Email Output Filter:</td>
+		<td>
+			<input type="radio" <?php echo ($data['email_filter']=='1') ?'checked="checked"' :'';?> 
+				name="email_filter" value="1">Enabled
+			<input type="radio" <?php echo ($data['email_filter']=='0') ?'checked="checked"' :'';?> 
+				name="email_filter" value="0">Disabled
+		</td>
+	</tr>
+	<tr>
+		<td>Javascript Encryption (mailto):</td>
+		<td>
+			<input type="radio" <?php echo ($data['mailto_filter']=='1') ?'checked="checked"' :'';?>
+				name="mailto_filter" value="1">Enabled
+			<input type="radio" <?php echo (($data['mailto_filter'])=='0') ?'checked="checked"' :'';?>
+				name="mailto_filter" value="0">Disabled
+		</td>
+	</tr>
+	<tr><td colspan="2"><br /><strong>Email Replacements:</strong></td></tr>
+	<tr>
+		<td>Replacement for "@":</td>
+		<td><input type="text" style="width: 160px" value="<?php echo $data['at_replacement'];?>" 
+			name="at_replacement"/></td>
+	</tr>
+	<tr>
+		<td>Replacement for ".":</td>
+		<td><input type="text" style="width: 160px" value="<?php echo $data['dot_replacement'];?>" 
+			name="dot_replacement"/></td>
+	</tr>
+	</table>
+	<input type="submit" name="save_settings" style="margin-top:10px; width:140px;" value="<?php echo $TEXT['SAVE']; ?>" />
+</form>
+<?php
+}
+
+?>
Index: trunk/wb/modules/mail_filter/install.php
===================================================================
--- trunk/wb/modules/mail_filter/install.php	(nonexistent)
+++ trunk/wb/modules/mail_filter/install.php	(revision 576)
@@ -0,0 +1,45 @@
+<?php
+
+// $Id: install.php 565 2008-01-19 15:07:26Z doc $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2008, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// prevent this file from being accessed directly
+if(!defined('WB_PATH')) { exit('Cannot access this file directly'); }
+
+$table = TABLE_PREFIX .'mod_mail_filter';
+$database->query("DROP TABLE IF EXISTS `$table`");
+
+$database->query("CREATE TABLE `$table` (
+	`email_filter` VARCHAR(1) NOT NULL DEFAULT '0',
+	`mailto_filter` VARCHAR(1) NOT NULL DEFAULT '0',
+	`at_replacement` VARCHAR(255) NOT NULL DEFAULT '(at)',
+	`dot_replacement` VARCHAR(255) NOT NULL DEFAULT '(dot)'
+	)"
+);
+
+// add new row using the table default values defined above
+//$database->query("INSERT INTO ".TABLE_PREFIX."mod_mail_filter");
+$database->query("INSERT INTO ".TABLE_PREFIX."mod_mail_filter (email_filter, mailto_filter, at_replacement, dot_replacement) VALUES ('0', '0', '(at)', '(dot)')");
+
+
+?>
\ No newline at end of file
Index: trunk/wb/modules/mail_filter/js/mdcr.js
===================================================================
--- trunk/wb/modules/mail_filter/js/mdcr.js	(nonexistent)
+++ trunk/wb/modules/mail_filter/js/mdcr.js	(revision 576)
@@ -0,0 +1,23 @@
+/*
+--------------------------------------------------------------------------------
+  MDCR (Mail DeCrypt Routine) for Website Baker v2.6.x
+  Licencsed under GNU, written by Christian Sommer (Doc)
+--------------------------------------------------------------------------------
+*/
+
+function mdcr(s) {
+  location.href=dcstr(s);
+}
+
+function dcstr(s) {
+  var m = unescape(s);
+  var x = m.charCodeAt(7)-97;
+  var c = m.substr(0,7) + m.substr(8);
+  var n=0;
+  var r="";
+
+  for(var i=0; i<c.length; i++) {
+    r+=String.fromCharCode(c.charCodeAt(i) - x);
+  }
+  return r;
+}
\ No newline at end of file
Index: trunk/wb/modules/mail_filter/index.php
===================================================================
--- trunk/wb/modules/mail_filter/index.php	(nonexistent)
+++ trunk/wb/modules/mail_filter/index.php	(revision 576)
@@ -0,0 +1,28 @@
+<?php
+
+// $Id: index.php 519 2007-12-23 14:37:02Z Doc $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2008, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+header('Location: ../index.php');
+
+?>
\ No newline at end of file
