From: Roland Häder <roland@mxchange.org>
Date: Thu, 11 Sep 2008 22:49:59 +0000 (+0000)
Subject: Code-style applied, surfbar URLs can now be edited
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=80e2def8ef2125fd4d7d1312ee3993ab613f0846;p=mailer.git

Code-style applied, surfbar URLs can now be edited
---

diff --git a/.gitattributes b/.gitattributes
index 2aa491be7a..e29c0e11d5 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -196,7 +196,6 @@ inc/libs/newsletter_functions.php -text
 inc/libs/nickname_functions.php -text
 inc/libs/optimize_functions.php -text
 inc/libs/order_functions.php -text
-inc/libs/output_functions.php -text
 inc/libs/payout_functions.php -text
 inc/libs/primera_functions.php -text
 inc/libs/rallye_functions.php -text
@@ -592,6 +591,7 @@ templates/de/emails/admin/admin_autopurge_tsks.tpl -text
 templates/de/emails/admin/admin_autopurge_turbo.tpl -text
 templates/de/emails/admin/admin_autopurge_unconfirmed.tpl -text
 templates/de/emails/admin/admin_del_surfbar_urls.tpl -text
+templates/de/emails/admin/admin_edit_surfbar_urls.tpl -text
 templates/de/emails/admin/admin_holiday_deactivated.tpl -text
 templates/de/emails/admin/admin_holiday_request.tpl -text
 templates/de/emails/admin/admin_holiday_unlock.tpl -text
@@ -662,6 +662,7 @@ templates/de/emails/member/member_bonus.tpl -text
 templates/de/emails/member/member_contct.tpl -text
 templates/de/emails/member/member_del_surfbar_urls.tpl -text
 templates/de/emails/member/member_doubler.tpl -text
+templates/de/emails/member/member_edit_surfbar_urls.tpl -text
 templates/de/emails/member/member_holiday_activated.tpl -text
 templates/de/emails/member/member_holiday_removed.tpl -text
 templates/de/emails/member/member_holiday_request.tpl -text
@@ -859,6 +860,8 @@ templates/de/html/admin/admin_edit_rallyes_row.tpl -text
 templates/de/html/admin/admin_edit_sponsor_add_points.tpl -text
 templates/de/html/admin/admin_edit_sponsor_edit.tpl -text
 templates/de/html/admin/admin_edit_sponsor_sub_points.tpl -text
+templates/de/html/admin/admin_edit_surfbar_urls.tpl -text
+templates/de/html/admin/admin_edit_surfbar_urls_row.tpl -text
 templates/de/html/admin/admin_edit_user.tpl -text
 templates/de/html/admin/admin_email_archiv.tpl -text
 templates/de/html/admin/admin_email_archiv_row.tpl -text
diff --git a/inc/databases.php b/inc/databases.php
index ca325b7db3..3bdc5b46c9 100644
--- a/inc/databases.php
+++ b/inc/databases.php
@@ -114,7 +114,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
-define('CURR_SVN_REVISION', "302");
+define('CURR_SVN_REVISION', "303");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
diff --git a/inc/fatal_errors.php b/inc/fatal_errors.php
index 6bb6a0ca55..05959f4e26 100644
--- a/inc/fatal_errors.php
+++ b/inc/fatal_errors.php
@@ -48,7 +48,7 @@ if ((sizeof($FATAL) > 0) || (!empty($FATAL[0])))
 	if (isBooleanConstantAndTrue('mxchange_installing')) {
 		// While we are installing ouput other header than while it is installed... :-)
 		$OUT = "";
-		foreach ($FATAL as $key=>$value) {
+		foreach ($FATAL as $key => $value) {
 			// Prepare content for the template
 			$content = array(
 				'key'   => ($key + 1),
@@ -64,7 +64,7 @@ if ((sizeof($FATAL) > 0) || (!empty($FATAL[0])))
 	} elseif (isBooleanConstantAndTrue('mxchange_installed')) {
 		// Display all runtime fatal errors
 		$OUT = "";
-		foreach ($FATAL as $key=>$value) {
+		foreach ($FATAL as $key => $value) {
 			// Prepare content for the template
 			$content = array(
 				'key'   => ($key + 1),
diff --git a/inc/functions.php b/inc/functions.php
index c73058b0a5..de2c08a4a0 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -719,7 +719,7 @@ function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0") {
 		$DATA[10]   = $UID;
 
 		// Replace variables
-		foreach ($REPLACER as $key=>$value)
+		foreach ($REPLACER as $key => $value)
 		{
 			if (isset($DATA[$key])) $content = str_replace($value, $DATA[$key], $content);
 		}
@@ -769,7 +769,7 @@ function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0") {
 		$MAILID     = $DATA[11];
 
 		// Replace variables
-		foreach ($REPLACER as $key=>$value)
+		foreach ($REPLACER as $key => $value)
 		{
 			if (isset($DATA[$key])) $content = str_replace($value, $DATA[$key], $content);
 		}
@@ -865,33 +865,30 @@ function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0") {
 		$tmpl_file = @implode("", @file($file));
 		$tmpl_file = addslashes($tmpl_file);
 
-		// Compile code
-		$tmpl_file = COMPILE_CODE($tmpl_file);
-
 		// Run code
-		$tmpl_file = "\$content=\"".$tmpl_file."\";";
+		$tmpl_file = "\$newContent=\"".COMPILE_CODE($tmpl_file)."\";";
 		eval($tmpl_file);
 
-		// Replace HTML confirm chars
-		$content = html_entity_decode($content);
+		// Replace HTML conform chars
+		$newContent = html_entity_decode($newContent);
 	} elseif (!empty($template)) {
 		// Template file not found!
-		$content = TEMPLATE_404.": ".$template."<br />
+		$newContent = TEMPLATE_404.": ".$template."<br />
 ".TEMPLATE_CONTENT."
-<PRE>".print_r($content, true)."</PRE>
+<PRE>".print_r($newContent, true)."</PRE>
 ".TEMPLATE_DATA."
 <PRE>".print_r($DATA, true)."</PRE>
 <br /><br />";
 
 		// Debug mode not active? Then remove the HTML tags
-		if (!DEBUG_MODE) $content = strip_tags($content);
+		if (!DEBUG_MODE) $newContent = strip_tags($newContent);
 	} else {
 		// No template name supplied!
-		$content = NO_TEMPLATE_SUPPLIED;
+		$newContent = NO_TEMPLATE_SUPPLIED;
 	}
 
 	// Return compiled content
-	return COMPILE_CODE($content);
+	return COMPILE_CODE($newContent);
 }
 //
 function MAKE_TIME($H, $M, $S, $stamp) {
@@ -983,20 +980,21 @@ function COMPILE_CODE($code, $simple = false, $constants = true, $full = true) {
 	if ((count($matches) > 0) && (count($matches[0]) > 0)) {
 		// Replace all matches
 		$matchesFound = array();
-		foreach ($matches[0] as $key=>$match) {
+		foreach ($matches[0] as $key => $match) {
 			// Avoid replacing matches multiple times
 			if (!isset($matchesFound[$match])) {
 				// Not yet replaced!
 				$code = str_replace($match, "\".".$match.".\"", $code);
 				$matchesFound[$match] = 1;
-			}
+			} // END - if
 
 			// Take all string elements
 			if (("".bigintval($matches[4][$key])."" != $matches[4][$key]) && (!isset($matchesFound[$key."_".$matches[4][$key]]))) {
 				// Replace it in the code
-				$code = str_replace("[".$matches[4][$key]."]", "['".$matches[4][$key]."']", $code);
+				$newMatch = str_replace("[".$matches[4][$key]."]", "['".$matches[4][$key]."']", $match);
+				$code = str_replace($match, $newMatch, $code);
 				$matchesFound[$key."_".$matches[4][$key]] = 1;
-			}
+			} // END - if
 		}
 	}
 
@@ -1025,9 +1023,9 @@ function array_pk_sort(&$array, $a_sort, $primary_key = 0, $order = -1, $nums =
 	$dummy = $array;
 	while ($primary_key < count($a_sort))
 	{
-		foreach ($dummy[$a_sort[$primary_key]] as $key=>$value)
+		foreach ($dummy[$a_sort[$primary_key]] as $key => $value)
 		{
-			foreach ($dummy[$a_sort[$primary_key]] as $key2=>$value2)
+			foreach ($dummy[$a_sort[$primary_key]] as $key2 => $value2)
 			{
 				$match = false;
 				if (!$nums)
@@ -1044,7 +1042,7 @@ function array_pk_sort(&$array, $a_sort, $primary_key = 0, $order = -1, $nums =
 				if ($match)
 				{
 					// We have found two different values, so let's sort whole array
-					foreach ($dummy as $sort_key=>$sort_val)
+					foreach ($dummy as $sort_key => $sort_val)
 					{
 						$t                       = $dummy[$sort_key][$key];
 						$dummy[$sort_key][$key]  = $dummy[$sort_key][$key2];
@@ -1092,7 +1090,7 @@ function ADD_SELECTION($type, $DEFAULT, $prefix="", $id="0")
 		break;
 
 	case "month": // Month
-		foreach ($MONTH_DESCR as $month=>$descr)
+		foreach ($MONTH_DESCR as $month => $descr)
 		{
 			$OUT .= "      <OPTION value=\"".$month."\"";
 			if ($DEFAULT == $month) $OUT .= " selected=\"selected\"";
@@ -1578,7 +1576,7 @@ function CREATE_FANCY_TIME($stamp) {
 	// Get data array with years/months/weeks/days/...
 	$data = CREATE_TIME_SELECTIONS($stamp, "", "", "", true);
 	$ret = "";
-	foreach($data as $k=>$v) {
+	foreach($data as $k => $v) {
 		if ($v > 0) {
 			// Value is greater than 0 "eval" data to return string
 			$eval = "\$ret .= \", \".\$v.\" \"._".strtoupper($k).";";
@@ -2402,23 +2400,26 @@ function HANDLE_EXTRA_VALUES ($filterFunction, $value, $extraValue) {
 
 	// Do we have a special filter function?
 	if (!empty($filterFunction)) {
-		// Do we have extra parameters here?
-		if (!empty($extraValue)) {
-			// Put both parameters in one new array by default
-			$args = array($value, $extraValue);
-
-			// If we have an array simply use it and pre-extend it with our value
-			if (is_array($extraValue)) {
-				// Make the new args array
-				$args = array_merge(array($value), $extraValue);
-			} // END - if
-
-			// Call the multi-parameter call-back
-			$ret = call_user_func_array($filterFunction, $args);
-		} else {
-			// One parameter call
-			$ret = call_user_func($filterFunction, $value);
-		}
+		// Does the filter function exist?
+		if (function_exists($filterFunction)) {
+			// Do we have extra parameters here?
+			if (!empty($extraValue)) {
+				// Put both parameters in one new array by default
+				$args = array($value, $extraValue);
+
+				// If we have an array simply use it and pre-extend it with our value
+				if (is_array($extraValue)) {
+					// Make the new args array
+					$args = array_merge(array($value), $extraValue);
+				} // END - if
+
+				// Call the multi-parameter call-back
+				$ret = call_user_func_array($filterFunction, $args);
+			} else {
+				// One parameter call
+				$ret = call_user_func($filterFunction, $value);
+			}
+		} // END - if
 	} // END - if
 
 	// Return the value
@@ -2459,6 +2460,11 @@ function CONVERT_SELECTIONS_TO_TIMESTAMP(&$POST, &$DATA, &$id, &$skip) {
 		$skip = false; $TEST2 = "";
 	}
 }
+// Reverts the german decimal comma into Computer decimal dot
+function REVERT_COMMA ($str) {
+	$float = (float)str_replace(",", ".", $str);
+	return $float;
+}
 //
 //////////////////////////////////////////////////
 //                                              //
diff --git a/inc/install-inc.php b/inc/install-inc.php
index 58b56350cd..b07d9fef35 100644
--- a/inc/install-inc.php
+++ b/inc/install-inc.php
@@ -166,7 +166,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
 		if (empty($mysql['prefix'])) $mysql['prefix'] = "mxchange_";
 		if ((sizeof($FATAL) > 0) || (!empty($FATAL[0]))) {
 			OUTPUT_HTML("<SPAN class=\"install_fatal\">");
-			foreach ($FATAL as $key=>$err) {
+			foreach ($FATAL as $key => $err) {
 				OUTPUT_HTML("  <STRONG>&middot;</STRONG>&nbsp;".FATAL_NO.($key + 1).":&nbsp;".$err."<br />");
 			}
 			OUTPUT_HTML("</SPAN><br />");
@@ -311,7 +311,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
 <TR><TD colspan=\"2\" height=\"21\" class=\"seperator\">&nbsp;</TD></TR>
 <TR>
   <TD colspan=\"2\" align=\"center\">");
-		foreach ($mysql as $key=>$value) {
+		foreach ($mysql as $key => $value) {
 			OUTPUT_HTML("    <INPUT type=\"hidden\" name=\"mysql[".$key."]\" value=\"".$value."\">");
 		}
 		OUTPUT_HTML("    <INPUT type=\"hidden\" name=\"spath\" value=\"".__SPATH_VALUE."\">
@@ -418,7 +418,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
 				}
 				define('__FATAL_ERROR_LI', $OUT);
 				$OUT = "";
-				foreach ($mysql as $key=>$value)
+				foreach ($mysql as $key => $value)
 				{
 					$OUT .= "    <INPUT type=\"hidden\" name=\"mysql[".$key."]\" value=\"".$value."\">\n";
 				}
diff --git a/inc/language/de.php b/inc/language/de.php
index 1b3737116e..7bb2a18425 100644
--- a/inc/language/de.php
+++ b/inc/language/de.php
@@ -1151,6 +1151,8 @@ define('ADMIN_SUPPORT_FORUM_LINK', "Direktlink zum Support-Forum (neues Fenster)
 define('ADMIN_REFERAL_LEVEL_ZERO_NOTICE', "Die Referal-Ebene 0 ist das Mitglied selber und sollte daher auf 100% stehen. Sie sollte auch nicht ge&auml;ndert oder gel&ouml;scht werden! Dann erhalten Ihre Mitglieder keine {!POINTS!} gutgeschrieben.");
 define('ADMIN_ALL_ENTRIES_REMOVED', "Alle ausgew&auml;hlten Eintr&auml;ge sind gel&ouml;scht.");
 define('ADMIN_SOME_ENTRIES_NOT_DELETED', "Es wurden <u>%s</u> von <u>%s</u> ausgew&auml;hlten Eintr&auml;ge gel&ouml;scht.");
+define('ADMIN_ALL_ENTRIES_EDITED', "Alle ausgew&auml;hlten Eintr&auml;ge sind ge&auml;ndert.");
+define('ADMIN_SOME_ENTRIES_NOT_EDITED', "Es wurden <u>%s</u> von <u>%s</u> ausgew&auml;hlten Eintr&auml;ge ge&auml;ndert.");
 
 //
 ?>
diff --git a/inc/language/surfbar_de.php b/inc/language/surfbar_de.php
index cef49798e2..f7044edd66 100644
--- a/inc/language/surfbar_de.php
+++ b/inc/language/surfbar_de.php
@@ -66,7 +66,9 @@ define('ADMIN_SURFBAR_REGISTERED', "URL aufgenommen");
 define('ADMIN_SURFBAR_LAST_LOCKED', "Zuletzt gesperrt");
 define('ADMIN_SURFBAR_LOCK_REASON', "Sperrgrund");
 define('ADMIN_SURFBAR_EDIT_URL', "URL &auml;ndern");
+define('ADMIN_SURFBAR_EDIT_URL_NOW', "URL jetzt &auml;ndern");
 define('ADMIN_SURFBAR_DEL_URL', "URL l&ouml;schen");
+define('ADMIN_SURFBAR_DEL_URL_NOW', "URLs jetzt entfernen");
 define('ADMIN_SURFBAR_UNLOCK_URL', "URL ent-/sperren");
 define('ADMIN_SURFBAR_CONFIRM_URL', "URL(s) freigeben");
 define('ADMIN_SURFBAR_UNLOCK_DONE', "Freischaltung ausgew&auml;hlter URL(s) vollst&auml;ndig. :-)");
@@ -74,11 +76,11 @@ define('ADMIN_SURFBAR_UNLOCK_FAILED', "Freischaltung fehlgeschlagen. Bitte nachs
 define('ADMIN_SURFBAR_URL_ADDED', "URL wurde der Surfbar hinzugef&uuml;gt.");
 define('ADMIN_SURFBAR_URL_NOT_ADDED', "URL wurde wegen Fehler nicht hinzugef&uuml;gt. Ist die URL bereits vorhanden?");
 define('ADMIN_SURFBAR_ADD_URL', "URL hinzuf&uuml;gen");
-define('ADMIN_SURFBAR_DEL_URL_NOW', "URLs jetzt entfernen");
 
 // Admin titles
 define('ADMIN_SURFBAR_LIST_URLS_TITLE', "URLs in Surfbar aufisten");
 define('ADMIN_SURFBAR_DELETE_URLS_TITLE', "URLs aus Surfbar entfernen");
+define('ADMIN_SURFBAR_EDIT_URLS_TITLE', "URLs editieren");
 
 // General member text
 define('MEMBER_SURFBAR_URL_ADDED', "URL hinzugef&uuml;gt und wartet auf Freischaltung.");
@@ -93,6 +95,7 @@ define('ADMIN_SURFBAR_NOTIFY_URL_CONFIRMED_SUBJECT', "URL in Surfbar freigegeben
 
 // Auto-generated admin subject lines
 define('ADMIN_DEL_SURFBAR_URLS_SUBJECT', "URL aus Surfbar entfernt");
+define('ADMIN_EDIT_SURFBAR_URLS_SUBJECT', "URL in Surfbar ge&auml;ndert");
 
 // Subject lines for members
 define('MEMBER_SURFBAR_NOTIFY_URL_UNLOCK_SUBJECT', "Ihre URL wurde in die Surfbar aufgenommen");
@@ -101,6 +104,7 @@ define('MEMBER_SURFBAR_NOTIFY_URL_CONFIRMED_SUBJECT', "Ihre URL wurde f&uuml;r d
 
 // Auto-generated member subject lines
 define('MEMBER_DEL_SURFBAR_URLS_SUBJECT', "Ihre URL wurde aus der Surfbar entfernt");
+define('MEMBER_EDIT_SURFBAR_URLS_SUBJECT', "&Auml;nderung Ihrer URL in der Surfbar");
 
 // URL status
 define('SURFBAR_URL_STATUS_CONFIRMED', "Freigegeben");
diff --git a/inc/libs/admins_functions.php b/inc/libs/admins_functions.php
index a2964387bb..55cebce7d9 100644
--- a/inc/libs/admins_functions.php
+++ b/inc/libs/admins_functions.php
@@ -84,7 +84,7 @@ function ADMINS_CHECK_ACL($act, $wht) {
 		// Load only from array when there are lines!
 		if ((isset($cacheArray['admin_acls'])) && (is_array($cacheArray['admin_acls'])) && (count($cacheArray['admin_acls']) > 0)) {
 			// Load ACL from array
-			foreach ($cacheArray['admin_acls']['admin_id'] as $id=>$aid_acls) {
+			foreach ($cacheArray['admin_acls']['admin_id'] as $id => $aid_acls) {
 				if ($aid == $aid_acls) {
 					// Okay, one line was found!
 					if ((!empty($act)) && ($cacheArray['admin_acls']['action_menu'][$id] == $act)) {
@@ -179,7 +179,7 @@ function ADMINS_CHANGE_ADMIN_ACCOUNT($POST) {
 
 	// Begin the update
 	$cacheInstance_UPDATE = "0";
-	foreach ($POST['login'] as $id=>$login) {
+	foreach ($POST['login'] as $id => $login) {
 		// Secure ID number
 		$id = bigintval($id);
 
@@ -278,7 +278,7 @@ WHERE id=%s LIMIT 1",
 function ADMINS_EDIT_ADMIN_ACCOUNTS ($POST) {
 	// Begin the edit loop
 	$SW = 2; $OUT = "";
-	foreach ($POST['sel'] as $id=>$sel) {
+	foreach ($POST['sel'] as $id => $sel) {
 		// Secure ID number
 		$id = bigintval($id);
 
@@ -324,7 +324,7 @@ function ADMINS_DELETE_ADMIN_ACCOUNTS ($POST) {
 	if ($accounts > 1) {
 		// Delete accounts
 		$SW = 2; $OUT = "";
-		foreach ($POST['sel'] as $id=>$sel) {
+		foreach ($POST['sel'] as $id => $sel) {
 			// Secure ID number
 			$id = bigintval($id);
 
@@ -363,7 +363,7 @@ function ADMINS_DELETE_ADMIN_ACCOUNTS ($POST) {
 function ADMINS_REMOVE_ADMIN_ACCOUNTS ($POST) {
 	// Begin removal
 	$cacheInstance_UPDATE = "0";
-	foreach ($POST['sel'] as $id=>$del) {
+	foreach ($POST['sel'] as $id => $del) {
 		// Secure ID number
 		$id = bigintval($id);
 
diff --git a/inc/libs/cache_functions.php b/inc/libs/cache_functions.php
index 1a7a5f14e5..e0c3fec20c 100644
--- a/inc/libs/cache_functions.php
+++ b/inc/libs/cache_functions.php
@@ -258,13 +258,13 @@ class mxchange_cache
 				// Flush array to cache file
 				$fp = fopen($this->cache_inc, 'w');
 				fwrite($fp, "\$ARRAY = \"".$ARRAY."\";\n");
-				foreach ($dummy as $k=>$v)
+				foreach ($dummy as $k => $v)
 				{
 					if (is_array($v))
 					{
 						// Multi line(s) found
 						$LINE = "";
-						foreach($v as $k2=>$v2)
+						foreach($v as $k2 => $v2)
 						{
 							// Put every array element in a row...
 							$LINE .= "\$data['".$k."'][] = \"".$v2."\";\n";
@@ -308,7 +308,7 @@ class mxchange_cache
 				{
 					$key = $search_key;
 					// Key (hopefully) found?
-					foreach ($dummy as $a=>$v)
+					foreach ($dummy as $a => $v)
 					{
 						// So we can update all entries
 						if ($a == $search)
@@ -321,13 +321,13 @@ class mxchange_cache
 					// Flush array to cache file
 					$fp = fopen($this->cache_inc, 'w');
 					fwrite($fp, "\$dummy = \"".$ARRAY."\";\n");
-					foreach ($dummy as $k=>$v)
+					foreach ($dummy as $k => $v)
 					{
 						if (is_array($v))
 						{
 							// Multi line(s) found
 							$LINE = "";
-							foreach($v as $k2=>$v2)
+							foreach($v as $k2 => $v2)
 							{
 								// Put every array element in a row...
 								$LINE .= "\$data['".$k."'][] = \"".$v2."\";\n";
diff --git a/inc/libs/output_functions.php b/inc/libs/output_functions.php
deleted file mode 100644
index 45f0eb4069..0000000000
--- a/inc/libs/output_functions.php
+++ /dev/null
@@ -1,157 +0,0 @@
-<?php
-/************************************************************************
- * MXChange v0.2.1                                    Start: 01/26/2005 *
- * ===============                              Last change: 01/26/2005 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : output_functions.php                             *
- * -------------------------------------------------------------------- *
- * Short description : Class containing the HTML sub-system             *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Klasse fuer das HTML-Subsystem                   *
- * -------------------------------------------------------------------- *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2008 by Roland Haeder                           *
- * For more information visit: http://www.mxchange.org                  *
- *                                                                      *
- * This program 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.                                  *
- *                                                                      *
- * This program 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 this program; if not, write to the Free Software          *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
- * MA  02110-1301  USA                                                  *
- ************************************************************************/
-
-// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
-	$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
-	require($INC);
-}
-// Add HTML to the output stream
-class HTMLParser {
-
-// Initializer
-function HTMLParser() {
-}
-
-// Add HTML-Code to buffer
-function add_html ($HTML, $NEW_LINE = true) {
-	global $OUTPUT;
-}
-
-// Compiles HTML code
-function compile_html($code, $simple=false) {
-	global $SEC_CHARS;
-
-	// Compile constants
-	$code = str_replace('{--', '".', str_replace('--}', '."', $code));
-
-	// Compile QUOT and other non-HTML codes
-	foreach ($SEC_CHARS['to'] as $k=>$from) {
-		// Do the reversed thing as in inc/libs/security_functions.php
-		$code = str_replace($from, $SEC_CHARS['from'][$k], $code);
-	}
-
-	// But keep simple quotes for later use
-	if ($simple) $code = str_replace("'", '{QUOT}', $code);
-
-	// Return compiled code
-	return $code;
-}
-
-// Load a template file and return it's content (only it's name; do not use ' or ")
-function get_template ($template, $return=false, $content="")
-{
-	// Add more variables which you want to use in your template files
-	global $DATA, $ACTION, $WHAT;
-	$REFID = bigintval(get_session('refid'));
-
-	if ($template == "member_support_form") {
-		// Support request of a member
-		$result = SQL_QUERY_ESC("SELECT sex, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid='%s' LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__);
-		list($sex, $surname, $family) = SQL_FETCHROW($result);
-		SQL_FREERESULT($result);
-		$salut = TRANSLATE_SEX($sex);
-	}
-
-	// Base directory
-	$BASE = sprintf("%stemplates/%s/html/", PATH, GET_LANGUAGE());
-	$MODE = "";
-
-	// Check for admin/guest/member templates
-	if (strpos($template, "admin_") > -1) {
-		// Admin template found
-		$MODE = "admin/";
-	} elseif (strpos($template, "guest_") > -1) {
-		// Guest template found
-		$MODE = "guest/";
-	} elseif (strpos($template, "member_") > -1) {
-		// Member template found
-		$MODE = "member/";
-	} elseif (strpos($template, "install_") > -1) {
-		// Installation template found
-		$MODE = "install/";
-	} elseif (strpos($template, "mailid_") > -1) {
-		// Mail confirmation template found
-		$MODE = "mailid/";
-	}
-
-	// Generate file name
-	$file = $BASE.$MODE.$template.".tpl";
-	if ((!empty($_GET['what'])) && ((strpos($template, "_header") > 0) || (strpos($template, "_footer") > 0)) && (($MODE == "guest/") || ($MODE == "member/") || ($MODE == "admin/"))) {
-		// Select what depended header/footer template file for admin/guest/member area
-		$file2 = sprintf("%s%s%s_%s.tpl", $BASE, $MODE, $template, SQL_ESCAPE($_GET['what']));
-
-		// Probe for it...
-		if (FILE_READABLE($file2)) $file = $file2;
-
-		// Remove variable from memory
-		unset($file2);
-	} // END - if
-
-	// Does the special template exists?
-	if (!FILE_READABLE($file)) {
-		// Reset to default template
-		$file = sprintf("%stemplates/%s/html/%s.tpl", PATH, GET_LANGUAGE(), $template);
-	} // END - if
-
-	// Now does the final template exists?
-	if (FILE_READABLE($file)) {
-		// The local file does exists so we load it. :)
-		$tmpl_file = implode("", file($file));
-		$tmpl_file = str_replace("'", '{QUOT}', $tmpl_file);
-
-		// Compile and run code
-		$ret = COMPILE_CODE(addslashes($tmpl_file), false, true);
-		$ret = "<!-- Template ".$template." - Start -->\n".$ret."<!-- Template ".$template." - End -->\n";
-	} elseif (IS_ADMIN()) {
-		// Only admins shall see this warning
-		$ret = "<br /><SPAN class=\"guest_failed\">".TEMPLATE_404."</SPAN><br />
-(".basename($file).")
-<br /><br />";
-	}
-
-	if ($return) {
-		// Return the HTML code
-		return $ret;
-	} else {
-		// Output directly
-		$this->add_html ($ret);
-	}
-}
-
-	// END OF CLASS
-}
-
-//
-?>
diff --git a/inc/libs/rallye_functions.php b/inc/libs/rallye_functions.php
index ad8d6c5f15..d6aaef96f8 100644
--- a/inc/libs/rallye_functions.php
+++ b/inc/libs/rallye_functions.php
@@ -352,7 +352,7 @@ function RALLYE_EXPIRE_RALLYES($result)
 
 	// Just count...
 	$TOTAL = 0;
-	foreach($prices['uid'] as $key=>$uid)
+	foreach($prices['uid'] as $key => $uid)
 	{
 		// Check status
 		//   active = 1: account is still confirmed
@@ -384,7 +384,7 @@ LIMIT 1", array(bigintval($uid), $since), __FILE__, __LINE__);
 	 array(bigintval($id)), __FILE__, __LINE__);
 
 	// Run array through (by uid is the most important 2nd-level-array)
-	foreach($prices['uid'] as $key=>$uid)
+	foreach($prices['uid'] as $key => $uid)
 	{
 		// Allow valid and active users with at least one ref to get points
 		if (($uid > 0) && ($prices['ref'][$key] > 0) && ($prices['active'][$key] == 1) && ($prices['cpoints'][$key] > 0))
@@ -569,7 +569,7 @@ WHERE d.status='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p
 	$prices = RALLYE_LOAD_PRICES_ARRAY($rallye);
 
 	// Merge users into prices
-	foreach ($prices['level'] as $k=>$lvl)
+	foreach ($prices['level'] as $k => $lvl)
 	{
 		$prices['uid'][$k]  = $users['uid'][$k];
 		if (empty($prices['uid'][$k])) $prices['uid'][$k]  = "---";
@@ -748,7 +748,7 @@ function RALLYE_GET_REFCOUNT($uid, $old=0)
 	{
 		// Get refs from cache
 		$cnt = 0;
-		foreach ($cacheArray['ref_system']['userid'] as $id=>$u_id)
+		foreach ($cacheArray['ref_system']['userid'] as $id => $u_id)
 		{
 			if (($u_id == $uid) && ($cacheArray['ref_system']['level'][$id] == 0))
 			{
diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php
index 5837b848eb..894e388e1b 100644
--- a/inc/libs/register_functions.php
+++ b/inc/libs/register_functions.php
@@ -63,7 +63,7 @@ function REGISTER_FILL_MUST_CONSTANTS()
 function REGISTER_CHECK_REQUIRED_FIELDS(&$array)
 {
 	$ret = false;
-	foreach ($array as $key=>$value)
+	foreach ($array as $key => $value)
 	{
 		$result = SQL_QUERY("SELECT field_required FROM "._MYSQL_PREFIX."_must_register WHERE field_name='".$key."' LIMIT 1", __FILE__, __LINE__);
 		if (SQL_NUMROWS($result) == 1)
diff --git a/inc/libs/rewrite_functions.php b/inc/libs/rewrite_functions.php
index 308b42da68..22e14f9b07 100644
--- a/inc/libs/rewrite_functions.php
+++ b/inc/libs/rewrite_functions.php
@@ -102,7 +102,7 @@ function REWRITE_LINKS($HTML)
 	}
 
 	// Replace all array elements through
-	foreach ($REPLACE['search'] as $k=>$v)
+	foreach ($REPLACE['search'] as $k => $v)
 	{
 		if (eregi("$v=", $test))
 		{
diff --git a/inc/libs/security_functions.php b/inc/libs/security_functions.php
index fbd361ed7c..363bca731c 100644
--- a/inc/libs/security_functions.php
+++ b/inc/libs/security_functions.php
@@ -123,13 +123,13 @@ $URL_CHARS = array(
 
 // Overworked security part:
 if (is_array($_GET)) {
-	foreach ($_GET as $seckey=>$secvalue) {
+	foreach ($_GET as $seckey => $secvalue) {
 		if (is_array($secvalue)) {
 			// Throw arrays away...
 			unset($_GET[$seckey]);
 		} else {
 			// Only variables are allowed (non-array) but we secure them all!
-			foreach ($SEC_CHARS['from'] as $key=>$char) {
+			foreach ($SEC_CHARS['from'] as $key => $char) {
 				// Pass all through
 				$_GET[$seckey] = str_replace($char  , $SEC_CHARS['to'][$key], $_GET[$seckey]);
 			}
@@ -142,10 +142,10 @@ if (is_array($_GET)) {
 
 if (basename($_SERVER['PHP_SELF']) != "install.php") {
 	// And POST data
-	foreach ($_POST as $seckey=>$secvalue) {
+	foreach ($_POST as $seckey => $secvalue) {
 		if (!is_array($secvalue)) {
 			// Only variables are allowed (non-array) to be secured...
-			foreach ($SEC_CHARS['from'] as $key=>$char) {
+			foreach ($SEC_CHARS['from'] as $key => $char) {
 				// Pass all through
 				$_POST[$seckey] = str_replace($char  , $SEC_CHARS['to'][$key], $_POST[$seckey]);
 			}
@@ -156,13 +156,13 @@ if (basename($_SERVER['PHP_SELF']) != "install.php") {
 	}
 
 	// ... and finally cookies
-	foreach ($_COOKIE as $seckey=>$secvalue) {
+	foreach ($_COOKIE as $seckey => $secvalue) {
 		if (is_array($secvalue)) {
 			// Throw arrays away...
 			unset($_COOKIE[$seckey]);
 		} else {
 			// Only variables are allowed (non-array) but we secure them all!
-			foreach ($SEC_CHARS['from'] as $key=>$char) {
+			foreach ($SEC_CHARS['from'] as $key => $char) {
 				// Pass all through
 				$_COOKIE[$seckey] = str_replace($char  , $SEC_CHARS['to'][$key], $_COOKIE[$seckey]);
 			}
diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php
index 7ee98e3118..c9ce82d799 100644
--- a/inc/libs/sponsor_functions.php
+++ b/inc/libs/sponsor_functions.php
@@ -54,7 +54,7 @@ function SPONSOR_HANDLE_SPONSOR(&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_ST
 	);
 
  	// Check if sponsor already exists
-	foreach ($POST as $k=>$v)
+	foreach ($POST as $k => $v)
 	{
 		if (!(array_search($k, $SKIPPED) > -1))
 		{
@@ -163,7 +163,7 @@ function SPONSOR_HANDLE_SPONSOR(&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_ST
 		{
 			// Update his data
 			$SQL = "UPDATE "._MYSQL_PREFIX."_sponsor_data SET ";
-			foreach ($DATA['keys'] as $k=>$v)
+			foreach ($DATA['keys'] as $k => $v)
 			{
 				$SQL .= $v."='%s', ";
 			}
@@ -213,7 +213,7 @@ function SPONSOR_HANDLE_SPONSOR(&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_ST
 		{
 			// Add all data as hidden data
 			$OUT = "";
-			foreach ($POST as $k=>$v)
+			foreach ($POST as $k => $v)
 			{
 				// Do not add 'force' !
 				if ($k != "force")
@@ -478,13 +478,13 @@ function SPONSOR_SAVE_DATA($POST, $content)
 	$MSG = SPONSOR_ACCOUNT_DATA_NOT_SAVED;
 
 	// Check for submitted passwords
-	if ((!empty($HTTP_POST_VARS['pass1'])) && (!empty($HTTP_POST_VARS['pass2'])))
+	if ((!empty($_POST['pass1'])) && (!empty($_POST['pass2'])))
 	{
 		// Are both passwords the same?
-		if ($HTTP_POST_VARS['pass1'] == $HTTP_POST_VARS['pass2'])
+		if ($_POST['pass1'] == $_POST['pass2'])
 		{
 			// Okay, then set password and remove pass1 and pass2
-			$HTTP_POST_VARS['password'] = md5($HTTP_POST_VARS['pass1']);
+			$_POST['password'] = md5($_POST['pass1']);
 		}
 	}
 
@@ -500,7 +500,7 @@ function SPONSOR_SAVE_DATA($POST, $content)
 
 	// Prepare SQL string
 	$SQL = "UPDATE "._MYSQL_PREFIX."_sponsor_data SET";
-	foreach ($POST as $key=>$value)
+	foreach ($POST as $key => $value)
 	{
 		// Mmmmm, too less security here???
 		$SQL   .= " ".strip_tags($key)."='%s',";
diff --git a/inc/libs/task_functions.php b/inc/libs/task_functions.php
index e71856915b..d5b79dc22d 100644
--- a/inc/libs/task_functions.php
+++ b/inc/libs/task_functions.php
@@ -555,7 +555,7 @@ ORDER BY beg_points DESC, userid";
 function TASK_CREATE_EXTRA_ROWS($SQLs, $WHATs, $DESCRs, $TITLEs){
 	// Init
 	$OUT = ""; $SW = 2; $MAX = sizeof($SQLs) - 1;
-	foreach ($SQLs as $key=>$sql) {
+	foreach ($SQLs as $key => $sql) {
 		// Run SQL command, get line numbers and free memory
 		$result = SQL_QUERY($sql, __FILE__, __LINE__);
 		$value = SQL_NUMROWS($result);
diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php
index 533dded260..b297144340 100644
--- a/inc/libs/user_functions.php
+++ b/inc/libs/user_functions.php
@@ -111,7 +111,7 @@ function SortLinks($letter, $sortby, $colspan, $return=false)
 		$list['nickname'] = NICKNAME;
 	}
 
-	foreach ($list as $sort=>$title) {
+	foreach ($list as $sort => $title) {
 		if ($sortby == $sort) {
 			$OUT .= "<STRONG>".$title."</STRONG>&nbsp;|&nbsp;";
 		} else {
diff --git a/inc/load_cache-admin.php b/inc/load_cache-admin.php
index 5648d8eef8..e6d2822e7d 100644
--- a/inc/load_cache-admin.php
+++ b/inc/load_cache-admin.php
@@ -51,7 +51,7 @@ if (($cacheInstance->cache_file("admins", true) == true)) {
 			//* DEBUG: */ print_r($cacheArray['admins']);
 
 			// The cache file seems to be fine
-			foreach ($cacheArray['admins']['login'] as $k=>$login) {
+			foreach ($cacheArray['admins']['login'] as $k => $login) {
 				// Rewrite default_acl
 				$cacheArray['admins']['aid'][$login]      = $cacheArray['admins']['aid'][$k];
 				$cacheArray['admins']['password'][$login] = $cacheArray['admins']['password'][$k];
@@ -78,7 +78,7 @@ if (($cacheInstance->cache_file("admins", true) == true)) {
 			//* DEBUG: */ print_r($cacheArray['admins']);
 
 			// Rewrite Login
-			foreach ($cacheArray['admins']['login'] as $k=>$login) {
+			foreach ($cacheArray['admins']['login'] as $k => $login) {
 				$cacheArray['admins']['login'][$cacheArray['admins']['aid'][$login]] = $login;
 				if (!in_array($k, $cacheArray['admins']['aid'])) {
 					unset($cacheArray['admins']['login'][$k]);
@@ -133,7 +133,7 @@ if (GET_EXT_VERSION("admins") >= "0.3") {
 
 		// Valid cache file
 		$CNT = 0;
-		foreach ($cacheArray['admin_acls'] as $k=>$array) {
+		foreach ($cacheArray['admin_acls'] as $k => $array) {
 			$CNT += count($array);
 		}
 
diff --git a/inc/load_cache-config.php b/inc/load_cache-config.php
index 74e0d8061b..94d88621e0 100644
--- a/inc/load_cache-config.php
+++ b/inc/load_cache-config.php
@@ -45,8 +45,8 @@ if ($cacheInstance->cache_file("config", true) == true) {
 
 	// Valid cache file
 	$CNT = 0; $newCache = array();
-	foreach ($cacheArrayConfig as $key=>$array) {
-		foreach ($array as $key2=>$value) {
+	foreach ($cacheArrayConfig as $key => $array) {
+		foreach ($array as $key2 => $value) {
 			$newCache[$key2][$key] = $value;
 		}
 		$CNT += count($array);
diff --git a/inc/load_cache-modreg.php b/inc/load_cache-modreg.php
index a5bc454344..d835fc6668 100644
--- a/inc/load_cache-modreg.php
+++ b/inc/load_cache-modreg.php
@@ -45,7 +45,7 @@ if ($cacheInstance->cache_file("mod_reg", true) == true) {
 
 	// Valid cache file
 	$CNT = 0;
-	foreach ($cacheArray['modules'] as $k=>$array) {
+	foreach ($cacheArray['modules'] as $k => $array) {
 		$CNT += count($array);
 	}
 
@@ -60,7 +60,7 @@ if ($cacheInstance->cache_file("mod_reg", true) == true) {
 	} else {
 		// Rewrite module cache
 		$modArray = $cacheArray['modules'];
-		foreach ($modArray['module'] as $key=>$mod) {
+		foreach ($modArray['module'] as $key => $mod) {
 			$cacheArray['modules']['id'][$mod] = $modArray['id'][$key];
 			unset($cacheArray['modules']['id'][$key]);
 			$cacheArray['modules']['title'][$mod] = $modArray['title'][$key];
diff --git a/inc/load_cache-refdepths.php b/inc/load_cache-refdepths.php
index d490a66367..fc84d19627 100644
--- a/inc/load_cache-refdepths.php
+++ b/inc/load_cache-refdepths.php
@@ -45,7 +45,7 @@ if ($cacheInstance->cache_file("refdepths", true) == true) {
 
 	// Valid cache file
 	$CNT = 0;
-	foreach ($cacheArray['ref_depths'] as $k=>$array) {
+	foreach ($cacheArray['ref_depths'] as $k => $array) {
 		$CNT += count($array);
 	}
 
@@ -86,7 +86,7 @@ if (GET_EXT_VERSION("admins") >= "0.3") {
 
 		// Valid cache file
 		$CNT = 0;
-		foreach ($cacheArray['admin_acls'] as $k=>$array) {
+		foreach ($cacheArray['admin_acls'] as $k => $array) {
 			$CNT += count($array);
 		}
 
diff --git a/inc/load_cache-refsystem.php b/inc/load_cache-refsystem.php
index 93da9adc69..4fd07642cc 100644
--- a/inc/load_cache-refsystem.php
+++ b/inc/load_cache-refsystem.php
@@ -45,7 +45,7 @@ if ($cacheInstance->cache_file("refsystem", true) == true) {
 
 	// Valid cache file
 	$CNT = 0;
-	foreach ($cacheArray['ref_system'] as $k=>$array) {
+	foreach ($cacheArray['ref_system'] as $k => $array) {
 		$CNT += count($array);
 	}
 
diff --git a/inc/load_extensions.php b/inc/load_extensions.php
index 1b5d401cbc..59bc1518a0 100644
--- a/inc/load_extensions.php
+++ b/inc/load_extensions.php
@@ -89,7 +89,7 @@ if ($cacheMode == "load") {
 	// Load extension data from cache file
 	$EXT_DUMMY = $cacheInstance->cache_load();
 	$EXT_NAMES = array();
-	foreach ($EXT_DUMMY['ext_name'] as $k=>$name) {
+	foreach ($EXT_DUMMY['ext_name'] as $k => $name) {
 		// Load functions file
 		if ($EXT_DUMMY['ext_funcs'][$k] == "Y") {
 			require_once(PATH."inc/libs/".$name."_functions.php");
diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php
index 86bcda7b13..078d9027d8 100644
--- a/inc/modules/admin/admin-inc.php
+++ b/inc/modules/admin/admin-inc.php
@@ -729,7 +729,7 @@ function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = "id") {
 	$cnt = 0; $newStatus = "Y";
 	if ((is_array($IDs)) && (count($IDs) > 0)) {
 		// "Walk" all through and count them
-		foreach ($IDs as $id=>$selected) {
+		foreach ($IDs as $id => $selected) {
 			// Secure the ID number
 			$id = bigintval($id);
 
@@ -888,8 +888,96 @@ function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc
 	if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues))) {
 		// Shall we change here or list for editing?
 		if ($editNow) {
-			// Change them
-			die("EDIT!");
+			// Change them all
+			$affected = 0;
+			foreach ($IDs as $id => $sel) {
+				// Prepare content array (new values)
+				$content = array();
+
+				// Prepare SQL for this row
+				$SQL = "UPDATE "._MYSQL_PREFIX."_".$table." SET";
+				foreach ($_POST as $key => $entries) {
+					// Skip raw userid which is always invalid
+					if ($key == "uid_raw") {
+						// Continue with next field
+						continue;
+					} // END - if
+
+					// Is entries an array?
+					if (($key != $idColumn) && (is_array($entries)) && (isset($entries[$id]))) {
+						// Add this entry to content
+						$content[$key] = $entries[$id];
+
+						// Send data through the filter function if found
+						if ((isset($filterFunctions[$key])) && (isset($extraValues[$key]))) {
+							// Filter function set!
+							$entries[$id] = HANDLE_EXTRA_VALUES($filterFunctions[$key], $entries[$id], $extraValues[$key]);
+						} // END - if
+
+						// Then add this value
+						$SQL .= sprintf(" %s='%s',",
+							SQL_ESCAPE($key),
+							SQL_ESCAPE($entries[$id])
+						);
+					} elseif (($key != $idColumn) && (!is_array($entries))) {
+						// Add normal entries as well!
+						$content[$key] =  $entries;
+					}
+
+					// Do we have an URL?
+					if ($key == "url") {
+						// Then add a framekiller test as well
+						$content['frametester'] = FRAMETESTER($content[$key]);
+					} // END - if
+				}
+				$SQL = substr($SQL, 0, -1) . " WHERE ".$idColumn."=".$id." LIMIT 1";
+
+				// Run this query
+				SQL_QUERY($SQL, __FILE__, __LINE__);
+
+				// Add affected rows
+				$affected += SQL_AFFECTEDROWS();
+
+				// Load all data from that id
+				$result = SQL_QUERY_ESC("SELECT * FROM "._MYSQL_PREFIX."_%s WHERE %s=%s LIMIT 1",
+					array($table, $idColumn, $id), __FILE__, __LINE__);
+
+				// Fetch the data
+				global $DATA;
+				$DATA = SQL_FETCHARRAY($result);
+
+				// Free the result
+				SQL_FREERESULT($result);
+
+				// Is a raw user id set?
+				if ((isset($_POST['uid_raw'][$id])) && ($_POST['uid_raw'][$id] > 0)) {
+					// Generate subject
+					$eval = "\$subject = MEMBER_EDIT_".strtoupper($table)."_SUBJECT;";
+					eval($eval);
+
+					// Load email template
+					$mail = LOAD_EMAIL_TEMPLATE("member_edit_".$table, $content);
+
+					// Send email out
+					SEND_EMAIL($_POST['uid_raw'][$id], $subject, $mail);
+				} // END  - if
+
+				// Generate subject
+				$eval = "\$subject = ADMIN_EDIT_".strtoupper($table)."_SUBJECT;";
+				eval($eval);
+
+				// Send admin notification out
+				SEND_ADMIN_NOTIFICATION($subject, "admin_edit_".$table, $content, $_POST['uid_raw'][$id]);
+			} // END - foreach
+
+			// Was this fine?
+			if ($affected == count($IDs)) {
+				// All deleted
+				LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_ALL_ENTRIES_EDITED);
+			} else {
+				// Some are still there :(
+				LOAD_TEMPLATE("admin_settings_saved", false, sprintf(ADMIN_SOME_ENTRIES_NOT_EDITED, $affected, count($IDs)));
+			}
 		} else {
 			// List for editing
 			ADMIN_BUILD_LIST("edit", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn);
diff --git a/inc/modules/admin/overview-inc.php b/inc/modules/admin/overview-inc.php
index 665d189f4e..3742b3bba1 100644
--- a/inc/modules/admin/overview-inc.php
+++ b/inc/modules/admin/overview-inc.php
@@ -148,7 +148,7 @@ function OUTPUT_SELECTED_TASKS($_POST, $result_tasks) {
 	if ((isset($_POST['assign'])) && (count($_POST['task']) > 0)) {
 		// Assign / do tasks
 		$OUT = ""; $SW = 2;
-		foreach ($_POST['task'] as $id=>$sel) {
+		foreach ($_POST['task'] as $id => $sel) {
 			$result_task = SQL_QUERY_ESC("SELECT id, userid, task_type, subject, text, task_created, status, assigned_admin FROM "._MYSQL_PREFIX."_task_system WHERE id=%s AND (assigned_admin='%s' OR (assigned_admin='0' AND status='NEW')) LIMIT 1",
 			 array(bigintval($id), GET_ADMIN_ID(get_session('admin_login'))), __FILE__, __LINE__);
 			if (SQL_NUMROWS($result_task) == 1) {
@@ -403,7 +403,7 @@ function OUTPUT_SELECTED_TASKS($_POST, $result_tasks) {
 			if (!empty($_POST['unassign']))
 			{
 				// Unassign from tasks
-				foreach ($_POST['task'] as $id=>$sel)
+				foreach ($_POST['task'] as $id => $sel)
 				{
 					$result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin=0 WHERE id=%s AND assigned_admin=%s LIMIT 1",
 					 array(bigintval($id), GET_ADMIN_ID(get_session('admin_login'))), __FILE__, __LINE__);
@@ -412,7 +412,7 @@ function OUTPUT_SELECTED_TASKS($_POST, $result_tasks) {
 			 elseif (isset($_POST['del']))
 			{
 				// Delete tasks
-				foreach ($_POST['task'] as $id=>$sel)
+				foreach ($_POST['task'] as $id => $sel)
 				{
 					$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE id=%s AND assigned_admin IN (%s,0) LIMIT 1",
 					 array(bigintval($id), GET_ADMIN_ID(get_session('admin_login'))), __FILE__, __LINE__);
diff --git a/inc/modules/admin/what-admin_add.php b/inc/modules/admin/what-admin_add.php
index 7882d8fbea..7907f4c4e2 100644
--- a/inc/modules/admin/what-admin_add.php
+++ b/inc/modules/admin/what-admin_add.php
@@ -73,7 +73,7 @@ if (!isset($_POST['ok']))
 
 		// Remove double eintries
 		$prev = ""; $dmy = $menus; $dmy2 = $titles; $dmy3 = $below;
-		foreach ($menus as $key=>$value)
+		foreach ($menus as $key => $value)
 		{
 			if ($value == $prev)
 			{
@@ -88,7 +88,7 @@ if (!isset($_POST['ok']))
 		}
 		$menus = $dmy; $titles = $dmy2; $below = $dmy3;
 		// Load sub menus :)
-		foreach ($menus as $key_main=>$value_main)
+		foreach ($menus as $key_main => $value_main)
 		{
 			$result = SQL_QUERY_ESC("SELECT what, title, sort FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND what != '' ORDER BY sort",
 			 array($value_main), __FILE__, __LINE__);
@@ -115,7 +115,7 @@ if (!isset($_POST['ok']))
 
 				// Remove double eintries
 				$prev = ""; $dmy = $menus[$value_main]; $dmy2 = $titles[$value_main]; $dmy3 = $below[$value_main];
-				foreach ($menus[$value_main] as $key=>$value)
+				foreach ($menus[$value_main] as $key => $value)
 				{
 					if ($value == $prev)
 					{
@@ -134,14 +134,14 @@ if (!isset($_POST['ok']))
 	}
 	$OUT = "    <SELECT class=\"admin_select\" name=\"sort\" size=\"1\">
       <OPTION value=\"0\">".IS_FIRST_MENU."</OPTION>\n";
-  	foreach ($below as $key=>$m)
+  	foreach ($below as $key => $m)
 	{
 		if (is_array($m))
 		{
-			foreach ($m as $key2=>$m2)
+			foreach ($m as $key2 => $m2)
 			{
 				$OUT .= "      <OPTION value=\"".$m2."\">".$titles[$key][$key2];
-				foreach ($menus as $k=>$v)
+				foreach ($menus as $k => $v)
 				{
 					if (($v == $key) && (!is_array($v)))
 					{
diff --git a/inc/modules/admin/what-adminedit.php b/inc/modules/admin/what-adminedit.php
index 9ad293ca65..562040fcce 100644
--- a/inc/modules/admin/what-adminedit.php
+++ b/inc/modules/admin/what-adminedit.php
@@ -58,7 +58,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) {
 	define('__SUB_VALUE', $SUB);
 	define('__CHK_VALUE', $chk);
 	$cnt = 0; $SW = 2;
-	foreach ($_POST['sel'] as $sel=>$confirm)
+	foreach ($_POST['sel'] as $sel => $confirm)
 	{
 		if ($confirm == 1)
 		{
@@ -107,7 +107,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) {
 	define('__CHK_VALUE', $chk);
 	// Del menu entries with or without confirmation
 	$SW = 2; $cnt = 0; $OUT = "";
-	foreach ($_POST['sel'] as $sel=>$confirm)
+	foreach ($_POST['sel'] as $sel => $confirm)
 	{
 		if ($confirm == 1)
 		{
@@ -153,7 +153,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) {
 	switch ($_POST['ok'])
 	{
 	case "edit": // Edit menu
-		foreach ($_POST['sel'] as $sel=>$menu)
+		foreach ($_POST['sel'] as $sel => $menu)
 		{
 			// Secure ID
 			$sel = bigintval($sel);
@@ -177,7 +177,7 @@ WHERE ".$AND." AND id=%s LIMIT 1",
 		break;
 
 	case "del": // Delete menu
-		foreach ($_POST['sel'] as $sel=>$menu)
+		foreach ($_POST['sel'] as $sel => $menu)
 		{
 			$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE ".$AND." AND id=%s LIMIT 1",
 			 array(bigintval($sel)), __FILE__, __LINE__);
diff --git a/inc/modules/admin/what-admins_mails.php b/inc/modules/admin/what-admins_mails.php
index 7089670e0e..620c42338a 100644
--- a/inc/modules/admin/what-admins_mails.php
+++ b/inc/modules/admin/what-admins_mails.php
@@ -49,7 +49,7 @@ if (isset($_POST['edit']))
 		// Add option for userlog
 		$cacheArray['admins'] = ADD_OPTION_LINES("admins", "id", "login", "", "email");
 		$SW = 2; $rowNameS = "";
-		foreach ($_POST['sel'] as $template=>$sel)
+		foreach ($_POST['sel'] as $template => $sel)
 		{
 			// First of all load data from DB
 			$result = SQL_QUERY_ESC("SELECT admin_id, id FROM "._MYSQL_PREFIX."_admins_mails WHERE mail_template='%s' ORDER BY id",
@@ -122,7 +122,7 @@ ORDER BY m.admin_id, m.mail_template", __FILE__, __LINE__);
 		if (isset($_POST['change']))
 		{
 			// Ok, update database
-			foreach ($_POST['admin_id'] as $id=>$aid)
+			foreach ($_POST['admin_id'] as $id => $aid)
 			{
 				// Secure IDs
 				$id  = bigintval($id);
diff --git a/inc/modules/admin/what-config_admins.php b/inc/modules/admin/what-config_admins.php
index d75a08ed75..b0555fa83b 100644
--- a/inc/modules/admin/what-config_admins.php
+++ b/inc/modules/admin/what-config_admins.php
@@ -47,7 +47,7 @@ if ((isset($_POST['edit'])) && ($SEL > 0))
 {
 	// Edit ACLs
 	$SW = 2; $OUT = "";
-	foreach ($_POST['sel'] as $id=>$sel)
+	foreach ($_POST['sel'] as $id => $sel)
 	{
 		// Load data for the ID
 		$result = SQL_QUERY_ESC("SELECT admin_id, action_menu, what_menu, access_mode FROM "._MYSQL_PREFIX."_admins_acls WHERE id=%s LIMIT 1",
@@ -82,7 +82,7 @@ if ((isset($_POST['edit'])) && ($SEL > 0))
  elseif ((isset($_POST['change'])) && ($SEL > 0))
 {
 	// Change entries
-	foreach ($_POST['sel'] as $id=>$sel)
+	foreach ($_POST['sel'] as $id => $sel)
 	{
 		// Secure ID
 		$id = bigintval($id);
@@ -105,7 +105,7 @@ if ((isset($_POST['edit'])) && ($SEL > 0))
 {
 	// Delete ACLs
 	$SW = 2; $OUT = "";
-	foreach ($_POST['sel'] as $id=>$sel)
+	foreach ($_POST['sel'] as $id => $sel)
 	{
 		// Load data for the ID
 		$result = SQL_QUERY_ESC("SELECT admin_id, action_menu, what_menu, access_mode FROM "._MYSQL_PREFIX."_admins_acls WHERE id=%s LIMIT 1",
@@ -154,7 +154,7 @@ if ((isset($_POST['edit'])) && ($SEL > 0))
  elseif ((isset($_POST['remove'])) && ($SEL > 0))
 {
 	// Remove entries
-	foreach ($_POST['sel'] as $id=>$sel)
+	foreach ($_POST['sel'] as $id => $sel)
 	{
 		$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admins_acls WHERE id=%s LIMIT 1",
 		 array(bigintval($id)),__FILE__, __LINE__);
diff --git a/inc/modules/admin/what-config_bonus.php b/inc/modules/admin/what-config_bonus.php
index c07251b6dc..edf24bfc67 100644
--- a/inc/modules/admin/what-config_bonus.php
+++ b/inc/modules/admin/what-config_bonus.php
@@ -96,7 +96,7 @@ if (isset($_POST['ok']))
 
 	// Generate list
 	$OUT = "<OL start=\"2\">\n";
-	foreach ($RANKS as $k=>$rate) {
+	foreach ($RANKS as $k => $rate) {
 		if (!empty($rate)) 	{
 			// Print only when something is in
 			$OUT .= "  <LI><INPUT type=\"text\" name=\"rate[".($k + 2)."]\" class=\"admin_normal\" size=\"4\" maxlength=\"7\" value=\"".$rate."\">&nbsp;<FONT class=\"admin_notes\">(".POINTS.")</FONT?</LI>\n";
diff --git a/inc/modules/admin/what-config_cats.php b/inc/modules/admin/what-config_cats.php
index ecd7de4b83..4bc5215739 100644
--- a/inc/modules/admin/what-config_cats.php
+++ b/inc/modules/admin/what-config_cats.php
@@ -66,7 +66,7 @@ if (isset($_POST['add'])) {
 } elseif ((isset($_POST['ok'])) && (isset($_POST['id'])) && (is_array($_POST['id']))) {
 	// Change or delete categories...
 	$TEXT = "";
-	foreach ($_POST['id'] as $id=>$cat) {
+	foreach ($_POST['id'] as $id => $cat) {
 		// Secure ID
 		$id = bigintval($id);
 
@@ -103,7 +103,7 @@ if (isset($_POST['add'])) {
 {
 	// Delete categories
 	$SW = 2; $OUT = "";
-	foreach ($_POST['sel'] as $id=>$value)
+	foreach ($_POST['sel'] as $id => $value)
 	{
 		// Load data of category
 		$result = SQL_QUERY_ESC("SELECT cat FROM "._MYSQL_PREFIX."_cats WHERE id=%s LIMIT 1",
@@ -129,7 +129,7 @@ if (isset($_POST['add'])) {
 } elseif ((isset($_POST['edit'])) && ((SELECTION_COUNT($_POST['sel']) > 0) || (isset($_POST['sel'][0])))) {
 	// Edit categories
 	$SW = 2; $OUT = "";
-	foreach ($_POST['sel'] as $id=>$value)
+	foreach ($_POST['sel'] as $id => $value)
 	{
 		// Load data from the category
 		$result = SQL_QUERY_ESC("SELECT cat, visible, sort FROM "._MYSQL_PREFIX."_cats WHERE id=%s LIMIT 1",
diff --git a/inc/modules/admin/what-config_email.php b/inc/modules/admin/what-config_email.php
index fcc868b16c..cb306c5d5a 100644
--- a/inc/modules/admin/what-config_email.php
+++ b/inc/modules/admin/what-config_email.php
@@ -65,7 +65,7 @@ if (isset($_POST['add_max'])) {
 } elseif ((isset($_POST['ok'])) && (isset($_GET['do']))) {
 	// Change or delete entries...
 	$TEXT = "";
-	foreach ($_POST['id'] as $id=>$value) {
+	foreach ($_POST['id'] as $id => $value) {
 		// Secure ID
 		$id = bigintval($id);
 
@@ -92,7 +92,7 @@ if (isset($_POST['add_max'])) {
 } elseif ((isset($_POST['del'])) && ((SELECTION_COUNT($_POST['sel']) > 0) || (isset($_POST['sel'][0])))) {
 	// Delete entries
 	$SW = 2; $OUT = "";
-	foreach ($_POST['sel'] as $id=>$value)
+	foreach ($_POST['sel'] as $id => $value)
 	{
 		// Load data
 		$result = SQL_QUERY_ESC("SELECT value, comment FROM "._MYSQL_PREFIX."_max_receive WHERE id=%s LIMIT 1",
@@ -119,7 +119,7 @@ if (isset($_POST['add_max'])) {
 } elseif ((isset($_POST['edit'])) && ((SELECTION_COUNT($_POST['sel']) > 0) || (isset($_POST['sel'][0])))) {
 	// Edit entries
 	$SW = 2; $OUT = "";
-	foreach ($_POST['sel'] as $id=>$value) {
+	foreach ($_POST['sel'] as $id => $value) {
 		// Load data
 		$result = SQL_QUERY_ESC("SELECT value, comment FROM "._MYSQL_PREFIX."_max_receive WHERE id=%s LIMIT 1",
 		 array(bigintval($id)), __FILE__, __LINE__);
diff --git a/inc/modules/admin/what-config_mods.php b/inc/modules/admin/what-config_mods.php
index 997f0de016..346b168906 100644
--- a/inc/modules/admin/what-config_mods.php
+++ b/inc/modules/admin/what-config_mods.php
@@ -51,7 +51,7 @@ if (isset($_POST['edit']))
 		$OUT = ""; $SW = 2;
 
 		// Edit selected modules
-		foreach ($_POST['sel'] as $id=>$sel)
+		foreach ($_POST['sel'] as $id => $sel)
 		{
 			// Load module data
 			$result = SQL_QUERY_ESC("SELECT module, title, locked, hidden, admin_only, mem_only FROM "._MYSQL_PREFIX."_mod_reg WHERE id=%s LIMIT 1",
@@ -93,7 +93,7 @@ if (isset($_POST['edit']))
  elseif (isset($_POST['change']))
 {
 	// Change modules
-	foreach ($_POST['sel'] as $id=>$sel)
+	foreach ($_POST['sel'] as $id => $sel)
 	{
 		// Secure ID number
 		$id = bigintval($id);
diff --git a/inc/modules/admin/what-config_payouts.php b/inc/modules/admin/what-config_payouts.php
index 85f05c5466..39e03d9c91 100644
--- a/inc/modules/admin/what-config_payouts.php
+++ b/inc/modules/admin/what-config_payouts.php
@@ -87,7 +87,7 @@ if ((isset($_POST['edit'])) && (SELECTION_COUNT($_POST['sel']) > 0))
 	if ((isset($_GET['ok'])) && ($_GET['ok'] == "ok"))
 	{
 		// Edit entries
-		foreach ($_POST['sel'] as $id=>$sel)
+		foreach ($_POST['sel'] as $id => $sel)
 		{
 			// Secure ID
 			$id = bigintval($id);
@@ -116,7 +116,7 @@ WHERE id='".$id."' LIMIT 1",
 	{
 		$display = false; //Suppress any other outputs
 		$SW = 2; $OUT = "";
-		foreach ($_POST['sel'] as $id=>$sel)
+		foreach ($_POST['sel'] as $id => $sel)
 		{
 			// Load data
 			$result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url FROM "._MYSQL_PREFIX."_payout_types WHERE id=%s LIMIT 1",
@@ -150,7 +150,7 @@ WHERE id='".$id."' LIMIT 1",
 	if ($_GET['ok'] == "ok")
 	{
 		// Delete entries
-		foreach ($_POST['sel'] as $id=>$sel)
+		foreach ($_POST['sel'] as $id => $sel)
 		{
 			$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_payout_types WHERE id=%s LIMIT 1",
 			 array(bigintval($id)), __FILE__, __LINE__);
@@ -161,7 +161,7 @@ WHERE id='".$id."' LIMIT 1",
 	{
 		$display = false; //Suppress any other outputs
 		$SW = 2; $OUT = "";
-		foreach ($_POST['sel'] as $id=>$sel)
+		foreach ($_POST['sel'] as $id => $sel)
 		{
 			// Secure ID number
 			$id = bigintval($id);
diff --git a/inc/modules/admin/what-config_points.php b/inc/modules/admin/what-config_points.php
index f3ae527583..1d9ee21ade 100644
--- a/inc/modules/admin/what-config_points.php
+++ b/inc/modules/admin/what-config_points.php
@@ -85,7 +85,7 @@ if (isset($_POST['ok']))
 			break;
 
 		case "edit": // Change entries
-			foreach ($_POST['lvl'] as $id=>$value)
+			foreach ($_POST['lvl'] as $id => $value)
 			{
 				// Secure ID
 				$id = bigintval($id);
@@ -98,7 +98,7 @@ if (isset($_POST['ok']))
 			break;
 
 		case "del":
-			foreach ($_POST['id'] as $id=>$value)
+			foreach ($_POST['id'] as $id => $value)
 			{
 				$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_refdepths WHERE id=%s LIMIT 1",
 				 array(bigintval($id)), __FILE__, __LINE__);
@@ -213,7 +213,7 @@ WHERE mails_confirmed < %s", $REF, $REF);
 	{
 		// Delete entries
 		$SW = 2; $OUT = "";
-		foreach ($_POST['sel'] as $id=>$value)
+		foreach ($_POST['sel'] as $id => $value)
 		{
 			$result = SQL_QUERY_ESC("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths WHERE id=%s LIMIT 1",
 			 array(bigintval($id)), __FILE__, __LINE__);
@@ -241,7 +241,7 @@ WHERE mails_confirmed < %s", $REF, $REF);
 	{
 		// Edit entries
 		$SW = 2; $OUT = "";
-		foreach ($_POST['sel'] as $id=>$value)
+		foreach ($_POST['sel'] as $id => $value)
 		{
 			$result = SQL_QUERY_ESC("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths WHERE id=%s LIMIT 1",
 			 array(bigintval($id)), __FILE__, __LINE__);
diff --git a/inc/modules/admin/what-config_rallye_prices.php b/inc/modules/admin/what-config_rallye_prices.php
index de11145ca2..d56729c939 100644
--- a/inc/modules/admin/what-config_rallye_prices.php
+++ b/inc/modules/admin/what-config_rallye_prices.php
@@ -81,7 +81,7 @@ VALUES ('%s', '%s', '%s', '%s')",
 		if ($SEL > 0)
 		{
 			// Delete selected entries
-			foreach ($_POST['sel'] as $id=>$sel)
+			foreach ($_POST['sel'] as $id => $sel)
 			{
 				$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_prices WHERE id=%s LIMIT 1",
 				 array(bigintval($id)), __FILE__, __LINE__);
@@ -98,7 +98,7 @@ VALUES ('%s', '%s', '%s', '%s')",
 	 elseif (isset($_POST['change']))
 	{
 		// Change entries
-		foreach ($_POST['level'] as $id=>$level)
+		foreach ($_POST['level'] as $id => $level)
 		{
 			// Secure ID
 			$id = bigintval($id);
@@ -120,7 +120,7 @@ VALUES ('%s', '%s', '%s', '%s')",
 		{
 			// Make selected editable
 			$SW = 2; $OUT = "";
-			foreach ($_POST['sel'] as $id=>$sel)
+			foreach ($_POST['sel'] as $id => $sel)
 			{
 				// Load data to selected rallye
 				$result = SQL_QUERY_ESC("SELECT rallye_id, price_level, points, info FROM "._MYSQL_PREFIX."_rallye_prices WHERE id=%s LIMIT 1",
@@ -165,7 +165,7 @@ VALUES ('%s', '%s', '%s', '%s')",
 		{
 			// List all prices
 			$SW = 2; $OUT = "";
-			foreach ($_POST['sel'] as $id=>$sel)
+			foreach ($_POST['sel'] as $id => $sel)
 			{
 				// Load data to selected rallye
 				$result = SQL_QUERY_ESC("SELECT rallye_id, price_level, points, info FROM "._MYSQL_PREFIX."_rallye_prices WHERE id=%s LIMIT 1",
diff --git a/inc/modules/admin/what-config_register.php b/inc/modules/admin/what-config_register.php
index 7da90e439d..ac02a5a59e 100644
--- a/inc/modules/admin/what-config_register.php
+++ b/inc/modules/admin/what-config_register.php
@@ -44,7 +44,7 @@ ADD_DESCR("admin", basename(__FILE__));
 // Do we want to save changes?
 if (isset($_POST['ok']))
 {
-	foreach ($_POST['sel'] as $id=>$value)
+	foreach ($_POST['sel'] as $id => $value)
 	{
 		$result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_must_register SET field_required='%s' WHERE id=%s AND field_required != '%s' LIMIT 1",
 		 array($value, bigintval($id), $value),__FILE__, __LINE__);
diff --git a/inc/modules/admin/what-config_rewrite.php b/inc/modules/admin/what-config_rewrite.php
index 9d16d7bfd6..d1384b3a93 100644
--- a/inc/modules/admin/what-config_rewrite.php
+++ b/inc/modules/admin/what-config_rewrite.php
@@ -44,7 +44,7 @@ if (isset($_POST['ok']))
 {
 	// Generate string
 	$MODs = array();
-	foreach ($_POST['mod'] as $mod=>$sel)
+	foreach ($_POST['mod'] as $mod => $sel)
 	{
 		// Now you can never deselect the admin module, bah!!! ;-)
 		if (($sel == "Y") || ($mod == "admin"))
diff --git a/inc/modules/admin/what-del_holiday.php b/inc/modules/admin/what-del_holiday.php
index f2b840e3fd..5f0ce83e9b 100644
--- a/inc/modules/admin/what-del_holiday.php
+++ b/inc/modules/admin/what-del_holiday.php
@@ -49,7 +49,7 @@ if ($SUM > 0)
 {
 	// Delete multiple holiday requests (for list_holiday)
 	$cnt = 0;
-	foreach ($_POST['sel'] as $id=>$sel)
+	foreach ($_POST['sel'] as $id => $sel)
 	{
 		// Get the userid
 		$result = SQL_QUERY_ESC("SELECT userid, holiday_start, holiday_end
diff --git a/inc/modules/admin/what-del_transfer.php b/inc/modules/admin/what-del_transfer.php
index 3c833ba359..7a3b3c2238 100644
--- a/inc/modules/admin/what-del_transfer.php
+++ b/inc/modules/admin/what-del_transfer.php
@@ -48,7 +48,7 @@ if (isset($_POST['del']))
 	if ($SEL > 0)
 	{
 		// Delete entries...
-		foreach ($_POST['sel'] as $id=>$sel)
+		foreach ($_POST['sel'] as $id => $sel)
 		{
 			$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_transfers_in WHERE trans_id=%s LIMIT 1",
 			 array(bigintval($id)), __FILE__, __LINE__);
diff --git a/inc/modules/admin/what-extensions.php b/inc/modules/admin/what-extensions.php
index 1930311d39..c33b616d40 100644
--- a/inc/modules/admin/what-extensions.php
+++ b/inc/modules/admin/what-extensions.php
@@ -53,7 +53,7 @@ if (!empty($_GET['reg_ext'])) {
 	// The ID comes from task management and it is - of course - *not* the extension's name!
 } elseif ((isset($_POST['change'])) && ($SEL > 0) && (!IS_DEMO())) {
 	// De-/activate extensions
-	foreach ($_POST['sel'] as $id=>$active) {
+	foreach ($_POST['sel'] as $id => $active) {
 		// Shall we keep the extension always active?
 		if ((isset($cacheArray['active_extensions'][GET_EXT_NAME($id)])) && ($cacheArray['active_extensions'][GET_EXT_NAME($id)] == "Y") && ($active == "N")) {
 			// Keep this extension active!
@@ -73,7 +73,7 @@ if (!empty($_GET['reg_ext'])) {
 	if (isset($_POST['modify'])) {
 		// Change entries
 		$cacheInstance_UPDATE = "0";
-		foreach ($_POST['sel'] as $id=>$sel) {
+		foreach ($_POST['sel'] as $id => $sel) {
 			// Secure ID
 			$id = bigintval($id);
 
@@ -109,7 +109,7 @@ if (!empty($_GET['reg_ext'])) {
 	} else {
 		// Edit selected entries
 		$SW = "2"; $OUT = "";
-		foreach ($_POST['sel'] as $id=>$sel) {
+		foreach ($_POST['sel'] as $id => $sel) {
 			// Edit this extension?
 			if (($sel == "Y") || ($sel == "N")) {
 				// Load required data
@@ -153,7 +153,7 @@ if (!empty($_GET['reg_ext'])) {
 } elseif ((isset($_POST['delete'])) && ($SEL > 0) && (!IS_DEMO())) {
 	// List extensions and when verbose is enabled SQL statements which will be executed
 	$SW = 2; $OUT = "";
-	foreach ($_POST['sel'] as $id=>$sel) {
+	foreach ($_POST['sel'] as $id => $sel) {
 		// Init variables
 		$VERBOSE_OUT = ""; $SQLs = array();
 
@@ -198,7 +198,7 @@ if (!empty($_GET['reg_ext'])) {
 } elseif ((isset($_POST['remove'])) && ($SEL > 0) && (!IS_DEMO())) {
 	// Remove extensions from DB (you have to delete all files manually!)
 	$cacheInstance_UPDATE = "0";
-	foreach ($_POST['sel'] as $id=>$active) {
+	foreach ($_POST['sel'] as $id => $active) {
 		// Secure ID number
 		$id = bigintval($id);
 
@@ -354,7 +354,7 @@ case "search": // Search for new extensions on our server
 
 		// Get count of extensions for validation
 		$count = trim($response[sizeof($response) - 2]);
-		foreach ($response as $id=>$value)
+		foreach ($response as $id => $value)
 		{
 			$value = str_replace("\n", "", $value); $ver = "";
 			// Leave loop when data is invalid or EOF?
@@ -383,7 +383,7 @@ case "search": // Search for new extensions on our server
 					$INFO = ADMIN_EXT_NO_INFO_FOUND;
 
 					// Trim every data line
-					foreach ($LANG_DUMMY as $k=>$v)
+					foreach ($LANG_DUMMY as $k => $v)
 					{
 						$v = trim($v);
 						if (substr($v, 3) == "") $v = "---";
@@ -412,7 +412,7 @@ case "search": // Search for new extensions on our server
 
 			// Extensions where found which are not downloaded and installed
 			$SW = 2; $OUT = ""; $TSIZE = 0;
-			foreach ($EXT_SEARCH['fname'] as $id=>$name)
+			foreach ($EXT_SEARCH['fname'] as $id => $name)
 			{
 				// Generate download link
 				$LINK = SERVER_URL."/extensions/ext-".$name.".zip";
diff --git a/inc/modules/admin/what-guest_add.php b/inc/modules/admin/what-guest_add.php
index 1d790e0e5e..e5f22c6b9d 100644
--- a/inc/modules/admin/what-guest_add.php
+++ b/inc/modules/admin/what-guest_add.php
@@ -73,7 +73,7 @@ if (!isset($_POST['ok']))
 
 		// Remove double eintries
 		$prev = ""; $dmy = $menus; $dmy2 = $titles; $dmy3 = $below;
-		foreach ($menus as $key=>$value)
+		foreach ($menus as $key => $value)
 		{
 			if ($value == $prev)
 			{
@@ -88,7 +88,7 @@ if (!isset($_POST['ok']))
 		}
 		$menus = $dmy; $titles = $dmy2; $below = $dmy3;
 		// Load sub menus :)
-		foreach ($menus as $key_main=>$value_main)
+		foreach ($menus as $key_main => $value_main)
 		{
 			$result = SQL_QUERY_ESC("SELECT what, title, sort
 FROM "._MYSQL_PREFIX."_guest_menu
@@ -119,7 +119,7 @@ WHERE action='%s' AND what != '' ORDER BY sort",
 
 				// Remove double eintries
 				$prev = ""; $dmy = $menus[$value_main]; $dmy2 = $titles[$value_main]; $dmy3 = $below[$value_main];
-				foreach ($menus[$value_main] as $key=>$value)
+				foreach ($menus[$value_main] as $key => $value)
 				{
 					if ($value == $prev)
 					{
@@ -139,14 +139,14 @@ WHERE action='%s' AND what != '' ORDER BY sort",
 
 	$OUT = "    <SELECT class=\"admin_select\" name=\"sort\" size=\"1\">
       <OPTION value=\"0\">".IS_FIRST_MENU."</OPTION>";
-  	foreach ($below as $key=>$m)
+  	foreach ($below as $key => $m)
 	{
 		if (is_array($m))
 		{
-			foreach ($m as $key2=>$m2)
+			foreach ($m as $key2 => $m2)
 			{
 				$OUT .= "      <OPTION value=\"".$m2."\">".$titles[$key][$key2];
-				foreach ($menus as $k=>$v)
+				foreach ($menus as $k => $v)
 				{
 					if (($v == $key) && (!is_array($v)))
 					{
diff --git a/inc/modules/admin/what-guestedit.php b/inc/modules/admin/what-guestedit.php
index 0185b03d87..d27a0f11c5 100644
--- a/inc/modules/admin/what-guestedit.php
+++ b/inc/modules/admin/what-guestedit.php
@@ -61,7 +61,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
 	define('__CHK_VALUE', $chk);
 
 	$cnt = 0; $SW = 2; $OUT = "";
-	foreach ($_POST['sel'] as $sel=>$confirm)
+	foreach ($_POST['sel'] as $sel => $confirm)
 	{
 		if ($confirm == 1)
 		{
@@ -108,7 +108,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
 	define('__CHK_VALUE', $chk);
 
 	$cnt = 0; $OUT = ""; $SW = 2;
-	foreach ($_POST['sel'] as $sel=>$confirm)
+	foreach ($_POST['sel'] as $sel => $confirm)
 	{
 		if ($confirm == 1)
 		{
@@ -152,7 +152,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
 	switch ($_POST['ok'])
 	{
 	case "edit": // Edit menu
-		foreach ($_POST['sel'] as $sel=>$menu)
+		foreach ($_POST['sel'] as $sel => $menu)
 		{
 			// Secure selector
 			$sel = bigintval($sel);
@@ -165,7 +165,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
 		break;
 
 	case "del": // Delete menu
-		foreach ($_POST['sel'] as $sel=>$menu)
+		foreach ($_POST['sel'] as $sel => $menu)
 		{
 			// Delete enty
 			$query = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE ".$AND." AND id=%s LIMIT 1",
@@ -175,7 +175,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
 		break;
 
 	case "status": // Change access levels
-		foreach ($_POST['sel'] as $sel=>$menu)
+		foreach ($_POST['sel'] as $sel => $menu)
 		{
 			// Secure selector
 			$sel = bigintval($sel);
@@ -201,7 +201,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
 
 	// Load template
 	$SW = 2; $cnt = 0; $OUT = "";
-	foreach ($_POST['sel'] as $sel=>$confirm)
+	foreach ($_POST['sel'] as $sel => $confirm)
 	{
 		if ($confirm == 1)
 		{
diff --git a/inc/modules/admin/what-list_country.php b/inc/modules/admin/what-list_country.php
index 16ceaef0bf..f0c8457997 100644
--- a/inc/modules/admin/what-list_country.php
+++ b/inc/modules/admin/what-list_country.php
@@ -104,7 +104,7 @@ if ((isset($_POST['add'])) && (!empty($_POST['code'])) && (!empty($_POST['descr'
 
 		// Edit all selected country codes
 		$OUT = ""; $SW = 2;
-		foreach ($_POST['id'] as $id=>$status)
+		foreach ($_POST['id'] as $id => $status)
 		{
 			// Load data from DB
 			$result = SQL_QUERY_ESC("SELECT code, descr FROM "._MYSQL_PREFIX."_countries WHERE id=%s LIMIT 1",
@@ -154,7 +154,7 @@ if ((isset($_POST['add'])) && (!empty($_POST['code'])) && (!empty($_POST['descr'
 	if ((isset($_POST['modify'])) && (!empty($_POST['id'])))
 	{
 		// Modify
-		foreach ($_POST['id'] as $id=>$sel)
+		foreach ($_POST['id'] as $id => $sel)
 		{
 			$SQLs[] = "UPDATE "._MYSQL_PREFIX."_countries SET code='".$_POST['code'][$id]."', descr='".$_POST['descr'][$id]."', is_active='".$_POST['is_active'][$id]."' WHERE id='".$id."' LIMIT 1";
 		}
diff --git a/inc/modules/admin/what-list_rallyes.php b/inc/modules/admin/what-list_rallyes.php
index aee3d15034..7ef34bd302 100644
--- a/inc/modules/admin/what-list_rallyes.php
+++ b/inc/modules/admin/what-list_rallyes.php
@@ -106,7 +106,7 @@ if (isset($_GET['rallye']))
 	if ($SEL > 0)
 	{
 		// Delete selected rallyes and all it's data
-		foreach ($_POST['sel'] as $id=>$sel)
+		foreach ($_POST['sel'] as $id => $sel)
 		{
 			// Remove selected rallye entirely...
 			$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_data WHERE id=%s LIMIT 1",
@@ -133,7 +133,7 @@ if (isset($_GET['rallye']))
 	if ($SEL > 0)
 	{
 		// Change selected rallyes and all it's data
-		foreach ($_POST['title'] as $id=>$title)
+		foreach ($_POST['title'] as $id => $title)
 		{
 			// Secure ID number
 			$id = bigintval($id);
@@ -169,7 +169,7 @@ if (isset($_POST['edit']))
 	{
 		// Make all selected and deactivated rallyes editable
 		$SW = 2; $OUT = "";
-		foreach ($_POST['sel'] as $id=>$sel)
+		foreach ($_POST['sel'] as $id => $sel)
 		{
 			// Load rallye basic data
 			$result = SQL_QUERY_ESC("SELECT title, descr, template, start_time, end_time, min_users, min_prices FROM "._MYSQL_PREFIX."_rallye_data WHERE id=%s LIMIT 1",
diff --git a/inc/modules/admin/what-list_sponsor.php b/inc/modules/admin/what-list_sponsor.php
index a753c8d831..9135b5b2cd 100644
--- a/inc/modules/admin/what-list_sponsor.php
+++ b/inc/modules/admin/what-list_sponsor.php
@@ -52,7 +52,7 @@ WHERE id='%s' LIMIT 1",
 		SQL_FREERESULT($result);
 
 		// Check if an entry is empty
-		foreach ($DATA as $k=>$v) {
+		foreach ($DATA as $k => $v) {
 			if (empty($v)) $DATA[$k] = "---";
 		}
 
diff --git a/inc/modules/admin/what-list_sponsor_pay.php b/inc/modules/admin/what-list_sponsor_pay.php
index 8564656c69..daa2da6000 100644
--- a/inc/modules/admin/what-list_sponsor_pay.php
+++ b/inc/modules/admin/what-list_sponsor_pay.php
@@ -57,7 +57,7 @@ if (isset($_POST['add'])) {
 		unset($_POST['remove']);
 	} elseif (isset($_POST['change'])) {
 		// Change entries here...
-		foreach ($_POST['id'] as $id=>$sel) {
+		foreach ($_POST['id'] as $id => $sel) {
 			// Secure ID
 			$id = bigintval($id);
 
@@ -72,7 +72,7 @@ SET pay_name='%s', pay_rate='%s', pay_min_count='%s', pay_currency='%s' WHERE id
 		$MSG = SPONSOR_PAY_ENTRIES_CHANGED;
 	} elseif (isset($_POST['remove'])) {
 		// Remove entries here...
-		foreach ($_POST['id'] as $id=>$sel) {
+		foreach ($_POST['id'] as $id => $sel) {
 			// Remove entry
 			$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_sponsor_paytypes WHERE id='%s' LIMIT 1",
  array(bigintval($id)), __FILE__, __LINE__);
@@ -116,7 +116,7 @@ if (isset($_POST['add'])) {
 } elseif ((isset($_POST['edit'])) || (isset($_POST['del']))) {
 	// Load all data
 	$OUT = ""; $SW = 2;
-	foreach ($_POST['id'] as $id=>$sel) {
+	foreach ($_POST['id'] as $id => $sel) {
 		// Load entry
 		$result = SQL_QUERY_ESC("SELECT pay_name, pay_rate, pay_min_count, pay_currency FROM "._MYSQL_PREFIX."_sponsor_paytypes WHERE id='%s' LIMIT 1",
 		 array(bigintval($id)), __FILE__, __LINE__);
diff --git a/inc/modules/admin/what-list_surfbar_urls.php b/inc/modules/admin/what-list_surfbar_urls.php
index 37f4366809..3b8f7b7afc 100644
--- a/inc/modules/admin/what-list_surfbar_urls.php
+++ b/inc/modules/admin/what-list_surfbar_urls.php
@@ -50,13 +50,20 @@ if (isset($_POST['edit'])) {
 		$_POST['id'],
 		"surfbar_urls",
 		array("id", "userid", "url", "reward", "costs"),
-		array("bigintval", "ADD_MEMBER_SELECTION_BOX", "FRAMETESTER", "TRANSLATE_COMMA", "TRANSLATE_COMMA"),
-		array("", array(false, true), "", "", "")
+		array("bigintval", "ADD_MEMBER_SELECTION_BOX", "", "TRANSLATE_COMMA", "TRANSLATE_COMMA"),
+		array("", array(false, true, true), "", "", "")
 	);
 	$show = false;
 } elseif (isset($_POST['do_edit'])) {
 	// Delete entries (with confirmation)
-	ADMIN_EDIT_ENTRIES_CONFIRM($_POST['id'], "surfbar_urls", array(), array(), array(), true);
+	ADMIN_EDIT_ENTRIES_CONFIRM(
+		$_POST['id'],
+		"surfbar_urls",
+		array("", ""),
+		array('reward' => "REVERT_COMMA", 'costs' => "REVERT_COMMA"),
+		array('reward' => "", 'costs' => ""),
+		true
+	);
 } elseif (isset($_POST['delete'])) {
 	// Delete entries (with confirmation)
 	ADMIN_DELETE_ENTRIES_CONFIRM($_POST['id'], "surfbar_urls", array("id", "userid", "url", "registered"), array("bigintval", "ADMIN_USER_PROFILE_LINK", "FRAMETESTER", "MAKE_DATETIME"), array("", "", "", "2"));
diff --git a/inc/modules/admin/what-mem_add.php b/inc/modules/admin/what-mem_add.php
index 1f4002f6d6..8c90ff9847 100644
--- a/inc/modules/admin/what-mem_add.php
+++ b/inc/modules/admin/what-mem_add.php
@@ -74,7 +74,7 @@ if (!isset($_POST['ok']))
 
 		// Remove double eintries
 		$prev = ""; $dmy = $menus; $dmy2 = $titles; $dmy3 = $below;
-		foreach ($menus as $key=>$value)
+		foreach ($menus as $key => $value)
 		{
 			if ($value == $prev)
 			{
@@ -90,7 +90,7 @@ if (!isset($_POST['ok']))
 		}
 		$menus = $dmy; $titles = $dmy2; $below = $dmy3;
 		// Load sub menus :)
-		foreach ($menus as $key_main=>$value_main)
+		foreach ($menus as $key_main => $value_main)
 		{
 			$result = SQL_QUERY_ESC("SELECT what, title, sort FROM "._MYSQL_PREFIX."_member_menu WHERE action='%s' AND what != '' ORDER BY sort",
 			 array($value_main), __FILE__, __LINE__);
@@ -119,7 +119,7 @@ if (!isset($_POST['ok']))
 
 				// Remove double eintries
 				$prev = ""; $dmy = $menus[$value_main]; $dmy2 = $titles[$value_main]; $dmy3 = $below[$value_main];
-				foreach ($menus[$value_main] as $key=>$value)
+				foreach ($menus[$value_main] as $key => $value)
 				{
 					if ($value == $prev)
 					{
@@ -139,14 +139,14 @@ if (!isset($_POST['ok']))
 
 	$OUT = "<SELECT class=\"admin_select\" name=\"sort\" size=\"1\">
       <OPTION value=\"\">".IS_FIRST_MENU."</OPTION>";
-  	foreach ($below as $key=>$m)
+  	foreach ($below as $key => $m)
 	{
 		if (is_array($m))
 		{
-			foreach ($m as $key2=>$m2)
+			foreach ($m as $key2 => $m2)
 			{
 				$OUT .= "      <OPTION value=\"".$m2."\">".$titles[$key][$key2];
-				foreach ($menus as $k=>$v)
+				foreach ($menus as $k => $v)
 				{
 					if (($v == $key) && (!is_array($v)))
 					{
diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php
index b63cc39445..c89ebba365 100644
--- a/inc/modules/admin/what-memedit.php
+++ b/inc/modules/admin/what-memedit.php
@@ -60,7 +60,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
 	define('__SUB_VALUE', $SUB);
 	define('__CHK_VALUE', $chk);
 	$SW = 2; $cnt = 0; $OUT = "";
-	foreach ($_POST['sel'] as $sel=>$confirm)
+	foreach ($_POST['sel'] as $sel => $confirm)
 	{
 		if ($confirm == 1)
 		{
@@ -107,7 +107,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
 	define('__SUB_VALUE', $SUB);
 	define('__CHK_VALUE', $chk);
 	$SW = 2; $cnt = 0; $OUT = "";
-	foreach ($_POST['sel'] as $sel=>$confirm)
+	foreach ($_POST['sel'] as $sel => $confirm)
 	{
 		if ($confirm == 1)
 		{
@@ -149,7 +149,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
 	define('__SUB_VALUE', $SUB);
 	define('__CHK_VALUE', $chk);
 	$SW = 2; $cnt = 0; $OUT = "";
-	foreach ($_POST['sel'] as $sel=>$confirm)
+	foreach ($_POST['sel'] as $sel => $confirm)
 	{
 		if ($confirm == 1)
 		{
@@ -193,7 +193,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
  elseif ((isset($_POST['ok'])) && (!IS_DEMO()))
 {
 	// An act is done...
-	foreach ($_POST['sel'] as $sel=>$menu)
+	foreach ($_POST['sel'] as $sel => $menu)
 	{
 		$AND = "what = ''";
 		$sel = bigintval($sel);
diff --git a/inc/modules/admin/what-overview.php b/inc/modules/admin/what-overview.php
index 799cae84f1..93a1b4b18f 100644
--- a/inc/modules/admin/what-overview.php
+++ b/inc/modules/admin/what-overview.php
@@ -65,7 +65,7 @@ if ($JOBS_DONE) {
 	global $menuDesription, $FATAL;
 	if ((is_array($menuDesription)) && (sizeof($menuDesription) > 0)) {
 		$OUT = "";
-		foreach ($menuDesription as $key=>$value)
+		foreach ($menuDesription as $key => $value)
 		{
 			// Prepare content
 			$content = array(
diff --git a/inc/modules/admin/what-payments.php b/inc/modules/admin/what-payments.php
index 9e00245416..372032b16d 100644
--- a/inc/modules/admin/what-payments.php
+++ b/inc/modules/admin/what-payments.php
@@ -64,14 +64,14 @@ if (isset($_POST['ok']))
 		break;
 
 	case "edit":
-		foreach ($_POST['time'] as $id=>$value)
+		foreach ($_POST['time'] as $id => $value)
 		{
 			$SQL[] = "UPDATE "._MYSQL_PREFIX."_payments SET time='".$value."', payment='".$_POST['pay'][$id]."', price='".$_POST['price'][$id]."', mail_title='".$_POST['title'][$id]."' WHERE id='".$id."' LIMIT 1";
 		}
 		break;
 
 	case "del":
-		foreach ($_POST['id'] as $id=>$value)
+		foreach ($_POST['id'] as $id => $value)
 		{
 			$SQL[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_payments WHERE id='".$id."' LIMIT 1";
 		}
@@ -110,7 +110,7 @@ if (isset($_POST['ok']))
 {
 	// Delete entries here
 	$SW = 2; $OUT = "";
-	foreach ($_POST['sel'] as $id=>$value)
+	foreach ($_POST['sel'] as $id => $value)
 	{
 		$result = SQL_QUERY_ESC("SELECT time, mail_title FROM "._MYSQL_PREFIX."_payments WHERE id=%s LIMIT 1",
 		 array(bigintval($id)), __FILE__, __LINE__);
@@ -138,7 +138,7 @@ if (isset($_POST['ok']))
 {
 	// Edit entries
 	$SW = 2; $OUT = "";
-	foreach ($_POST['sel'] as $id=>$value)
+	foreach ($_POST['sel'] as $id => $value)
 	{
 		$result = SQL_QUERY_ESC("SELECT time, payment, mail_title, price FROM "._MYSQL_PREFIX."_payments WHERE id=%s LIMIT 1",
 		 array(bigintval($id)), __FILE__, __LINE__);
diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php
index 80c0588efb..93a3f9ee9e 100644
--- a/inc/modules/admin/what-refbanner.php
+++ b/inc/modules/admin/what-refbanner.php
@@ -73,7 +73,7 @@ VALUES ('%s', '%s', '%s')",
 		break;
 
 	case "edit": // Update banner
-		foreach ($_POST['sel'] as $id=>$sel)
+		foreach ($_POST['sel'] as $id => $sel)
 		{
 			// Secure ID
 			$id = bigintval($id);
@@ -98,7 +98,7 @@ VALUES ('%s', '%s', '%s')",
 {
 	// Edit banner
 	$SW = ""; $OUT = "";
-	foreach ($_POST['sel'] as $id=>$sel)
+	foreach ($_POST['sel'] as $id => $sel)
 	{
 		// Load data
 		$result = SQL_QUERY_ESC("SELECT url, alternate, visible FROM "._MYSQL_PREFIX."_refbanner WHERE id=%s LIMIT 1",
@@ -129,7 +129,7 @@ VALUES ('%s', '%s', '%s')",
 	if (($SEL > 0) && (isset($_POST['del'])))
 	{
 		// Delete banner
-		foreach ($_POST['sel'] as $id=>$sel)
+		foreach ($_POST['sel'] as $id => $sel)
 		{
 			$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_refbanner WHERE id=%s LIMIT 1",
 			 array(bigintval($id)), __FILE__, __LINE__);
diff --git a/inc/modules/admin/what-send_bonus.php b/inc/modules/admin/what-send_bonus.php
index 3bd840b305..345a7bdaf7 100644
--- a/inc/modules/admin/what-send_bonus.php
+++ b/inc/modules/admin/what-send_bonus.php
@@ -207,7 +207,7 @@ WHERE userid=%s AND status='CONFIRMED' AND receive_mails > 0".$MORE." LIMIT 1",
 
 		// Generate options
 		$OUT = "";
-		foreach ($CATS['id'] as $key=>$value)
+		foreach ($CATS['id'] as $key => $value)
 		{
 			if (strlen($CATS['name'][$key]) > 20) $CATS['name'][$key] = substr($CATS['name'][$key], 0, 17)."...";
 			$OUT .= "      <OPTION value=\"".$value."\">".$CATS['name'][$key]." (".$CATS['uids'][$key]." ".USER_IN_CAT.")</OPTION>\n";
diff --git a/inc/modules/admin/what-theme_check.php b/inc/modules/admin/what-theme_check.php
index f416bd3115..e266ccb632 100644
--- a/inc/modules/admin/what-theme_check.php
+++ b/inc/modules/admin/what-theme_check.php
@@ -64,7 +64,7 @@ if (($response[sizeof($response) - 1] == "[EOF]") && ($response[0] != "[EOF]"))
 
 	// Get count of theme_check for validation
 	$count = trim($response[sizeof($response) - 2]);
-	foreach ($response as $idx=>$value)
+	foreach ($response as $idx => $value)
 	{
 		$value = str_replace("\n", "", $value); $ver = "";
 
@@ -95,7 +95,7 @@ if (($response[sizeof($response) - 1] == "[EOF]") && ($response[0] != "[EOF]"))
 				$INFO = ADMIN_EXT_NO_INFO_FOUND;
 
 				// Trim every data line
-				foreach ($LANG_DUMMY as $k=>$v) {
+				foreach ($LANG_DUMMY as $k => $v) {
 					$v = trim($v);
 					if (substr($v, 3) == "") $v = "---";
 					$LANG_DUMMY[$k] = $v;
@@ -121,7 +121,7 @@ if (($response[sizeof($response) - 1] == "[EOF]") && ($response[0] != "[EOF]"))
 
 		// Extensions where found which are not downloaded and installed
 		$SW = 2; $OUT = ""; $TSIZE = 0;
-		foreach ($THEMES['fname'] as $idx=>$name) {
+		foreach ($THEMES['fname'] as $idx => $name) {
 			// Generate download link
 			$LINK = SERVER_URL."/themes/theme-".$name.".zip";
 			$OUT .= "<TR>
diff --git a/inc/modules/admin/what-theme_edit.php b/inc/modules/admin/what-theme_edit.php
index 4c8efdaf4c..71a9296528 100644
--- a/inc/modules/admin/what-theme_edit.php
+++ b/inc/modules/admin/what-theme_edit.php
@@ -47,7 +47,7 @@ $SEL = 0;
 if (!empty($_POST['sel'])) $SEL = SELECTION_COUNT($_POST['sel']);
 if ($SEL > 0) {
 	$OUT = "";
-	foreach ($_POST['sel'] as $id=>$sel) {
+	foreach ($_POST['sel'] as $id => $sel) {
 		$SQL = "";
 		// Shall I de-/activate or delete themes?
 		if (isset($_POST['status'])) {
diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php
index 270fd49de8..1d79858caa 100644
--- a/inc/modules/admin/what-unlock_emails.php
+++ b/inc/modules/admin/what-unlock_emails.php
@@ -116,7 +116,7 @@ LIMIT 1",
 		if ($SEL > 0) {
 			// Reject mail orders
 			$SW = 2; $OUT = "";
-			foreach ($_POST['sel'] as $id=>$value) {
+			foreach ($_POST['sel'] as $id => $value) {
 				// Secure ID number
 				$id = bigintval($id);
 
@@ -163,7 +163,7 @@ LIMIT 1",
 	} elseif ((isset($_POST['lock'])) || ($SEL > 0)) {
 		if ($SEL > 0) {
 			// Lock URLs
-			foreach ($_POST['sel'] as $id=>$url) {
+			foreach ($_POST['sel'] as $id => $url) {
 				// Lookup in blacklist
 				$result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_url_blist WHERE url='%s' LIMIT 1",
 				 array($url), __FILE__, __LINE__);
diff --git a/inc/modules/admin/what-unlock_sponsor.php b/inc/modules/admin/what-unlock_sponsor.php
index 2b41ae775c..d11c12855f 100644
--- a/inc/modules/admin/what-unlock_sponsor.php
+++ b/inc/modules/admin/what-unlock_sponsor.php
@@ -34,7 +34,7 @@ if (isset($_POST['ok'])) {
 	// Does he have selected at least one sponsor?
 	if (SELECTION_COUNT($_POST['id']) > 0) {
 		// At least one entry selected
-		foreach ($_POST['id'] as $id=>$sel) {
+		foreach ($_POST['id'] as $id => $sel) {
 			// Secure ID number
 			$id = bigintval($id);
 
diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php
index 2a984934ed..9b5d88cd04 100644
--- a/inc/modules/guest/what-register.php
+++ b/inc/modules/guest/what-register.php
@@ -127,7 +127,7 @@ if (isset($_POST['ok']))
 	if (!IS_ADMIN())
 	{
 		// Do this check only when no admin is logged in
-		foreach ($_POST['cat'] as $id=>$answer)
+		foreach ($_POST['cat'] as $id => $answer)
 		{
 			if ($answer == "Y") $cats++;
 		}
@@ -281,7 +281,7 @@ array(
 
 	// Write catgories
 	if ((is_array($_POST['cat'])) && (count($_POST['cat']))) {
-		foreach ($_POST['cat'] as $cat=>$joined) {
+		foreach ($_POST['cat'] as $cat => $joined) {
 			if ($joined == "Y") {
 				// Insert category entry
 				$result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_cats (userid, cat_id) VALUES (%s, %s)",
diff --git a/inc/modules/guest/what-sponsor_login.php b/inc/modules/guest/what-sponsor_login.php
index 09f1ff1095..12584c5fe2 100644
--- a/inc/modules/guest/what-sponsor_login.php
+++ b/inc/modules/guest/what-sponsor_login.php
@@ -136,19 +136,19 @@ WHERE id='%s' AND hash='%s' AND status='EMAIL' LIMIT 1",
  elseif ($MODE == "activate")
 {
 	// Send activation link again
-	if (isset($HTTP_POST_VARS['ok']))
+	if (isset($_POST['ok']))
 	{
 		// Check submitted data
-		if (empty($HTTP_POST_VARS['email'])) unset($HTTP_POST_VARS['ok']);
+		if (empty($_POST['email'])) unset($_POST['ok']);
 	}
 
-	if (isset($HTTP_POST_VARS['ok']))
+	if (isset($_POST['ok']))
 	{
 		// Check email
 		$result = SQL_QUERY_ESC("SELECT id, hash, status, remote_addr, salut, surname, family, sponsor_created
 FROM "._MYSQL_PREFIX."_sponsor_data
 WHERE email='%s' AND (status='UNCONFIRMED' OR status='EMAIL') LIMIT 1",
- array($HTTP_POST_VARS['email']), __FILE__, __LINE__);
+ array($_POST['email']), __FILE__, __LINE__);
 		if (SQL_NUMROWS($result) == 1)
 		{
 			// Unconfirmed sponsor account found so let's load the requested data
@@ -169,7 +169,7 @@ WHERE email='%s' AND (status='UNCONFIRMED' OR status='EMAIL') LIMIT 1",
 				// Confirmed email address
 				$msg_sponsor = LOAD_EMAIL_TEMPLATE("sponsor_email", $SPONSOR);
 			}
-			SEND_EMAIL($HTTP_POST_VARS['email'], SPONSOR_ACTIVATION_LINK_SUBJ, $msg_sponsor);
+			SEND_EMAIL($_POST['email'], SPONSOR_ACTIVATION_LINK_SUBJ, $msg_sponsor);
 
 			// Output message
 			LOAD_TEMPLATE("admin_settings_saved", false, SPONSOR_ACTIVATION_LINK_SENT);
@@ -192,19 +192,19 @@ WHERE email='%s' AND (status='UNCONFIRMED' OR status='EMAIL') LIMIT 1",
  elseif ($MODE == "lost_pass")
 {
 	// Send new password
-	if (isset($HTTP_POST_VARS['ok']))
+	if (isset($_POST['ok']))
 	{
 		// Check submitted data
-		if (empty($HTTP_POST_VARS['email'])) unset($HTTP_POST_VARS['ok']);
+		if (empty($_POST['email'])) unset($_POST['ok']);
 	}
 
-	if (isset($HTTP_POST_VARS['ok']))
+	if (isset($_POST['ok']))
 	{
 		// Check email
 		$result = SQL_QUERY_ESC("SELECT id, hash, remote_addr, salut, surname, family, sponsor_created
 FROM "._MYSQL_PREFIX."_sponsor_data
 WHERE email='%s' AND id='%s' AND status='CONFIRMED' LIMIT 1",
- array($HTTP_POST_VARS['email'], bigintval($HTTP_POST_VARS['id'])), __FILE__, __LINE__);
+ array($_POST['email'], bigintval($_POST['id'])), __FILE__, __LINE__);
 		if (SQL_NUMROWS($result) == 1)
 		{
 			// Unconfirmed sponsor account found so let's load the requested data
@@ -219,7 +219,7 @@ WHERE email='%s' AND id='%s' AND status='CONFIRMED' LIMIT 1",
 
 			// Prepare email and send it to the sponsor
 			$msg_sponsor = LOAD_EMAIL_TEMPLATE("sponsor_lost", $SPONSOR);
-			SEND_EMAIL($HTTP_POST_VARS['email'], SPONSOR_LOST_PASSWORD_SUBJ, $msg_sponsor);
+			SEND_EMAIL($_POST['email'], SPONSOR_LOST_PASSWORD_SUBJ, $msg_sponsor);
 
 			// Update password
 			$result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET password='%s'
@@ -244,12 +244,12 @@ WHERE id='%s' LIMIT 1",
 		LOAD_TEMPLATE("guest_sponsor_lost");
 	}
 }
- elseif (isset($HTTP_POST_VARS['ok']))
+ elseif (isset($_POST['ok']))
 {
 	// Check status and login data ...
 	$result = SQL_QUERY_ESC("SELECT status FROM "._MYSQL_PREFIX."_sponsor_data
 WHERE id='%s' AND password='%s' LIMIT 1",
- array(bigintval($HTTP_POST_VARS['sponsorid']), md5($HTTP_POST_VARS['pass'])), __FILE__, __LINE__);
+ array(bigintval($_POST['sponsorid']), md5($_POST['pass'])), __FILE__, __LINE__);
 	if (SQL_NUMROWS($result) == 1)
 	{
 		// Okay, first login data check passed, now has he/she an approved (CONFIRMED) account?
@@ -261,8 +261,8 @@ WHERE id='%s' AND password='%s' LIMIT 1",
 			$life = (time() + $CONFIG['online_timeout']);
 
 			// Is confirmed so both is fine and we can continue with login procedure
-			$login = ((setcookie("sponsorid"  , bigintval($HTTP_POST_VARS['sponsorid']), $life, COOKIE_PATH)) &&
-			          (setcookie("sponsorpass", md5($HTTP_POST_VARS['pass'])           , $life, COOKIE_PATH)));
+			$login = ((setcookie("sponsorid"  , bigintval($_POST['sponsorid']), $life, COOKIE_PATH)) &&
+			          (setcookie("sponsorpass", md5($_POST['pass'])           , $life, COOKIE_PATH)));
 
 			if ($login)
 			{
diff --git a/inc/modules/guest/what-stats.php b/inc/modules/guest/what-stats.php
index d7f0aa5e9d..e5a89e273d 100644
--- a/inc/modules/guest/what-stats.php
+++ b/inc/modules/guest/what-stats.php
@@ -90,7 +90,7 @@ case "MEMBERS": // Statistics about your members
 	}
 
 	// Now we have all categories loaded, count members
-	foreach ($cats as $id=>$dummy)
+	foreach ($cats as $id => $dummy)
 	{
 		// We only need id and nothing more to count...
 		$cat_cnt[$id] = SQL_NUMROWS(SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_cats WHERE cat_id=%s",
@@ -111,7 +111,7 @@ case "MEMBERS": // Statistics about your members
 
 	// Generate monthly stats
 	$SW = 2; $r2 = " right2"; $l = "ll"; $r = "lr"; $OUT = "";
-	foreach ($months as $month=>$cnt)
+	foreach ($months as $month => $cnt)
 	{
 		if ($SW == 2) $OUT .= "<TR>\n";
 
@@ -144,7 +144,7 @@ case "MEMBERS": // Statistics about your members
 
 	// Generate category stats
 	$SW = 2; $OUT = "";
-	foreach ($cat_cnt as $id=>$cnt)
+	foreach ($cat_cnt as $id => $cnt)
 	{
 		// Prepare data for the template
 		$content = array(
diff --git a/inc/modules/member/what-categories.php b/inc/modules/member/what-categories.php
index a415828007..8873da7c1f 100644
--- a/inc/modules/member/what-categories.php
+++ b/inc/modules/member/what-categories.php
@@ -58,7 +58,7 @@ if ($cats > 0)
 	if (isset($_POST['ok']))
 	{
 		$cnt = 0;
-		foreach ($_POST['cat'] as $cat=>$joined)
+		foreach ($_POST['cat'] as $cat => $joined)
 		{
 			if ($joined == "N") $cnt++;
 		}
@@ -70,7 +70,7 @@ if ($cats > 0)
 	}
 	if (isset($_POST['ok']))
 	{
-		foreach ($_POST['cat'] as $cat=>$joined)
+		foreach ($_POST['cat'] as $cat => $joined)
 		{
 			switch ($joined)
 			{
diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php
index 077f0c91e6..fd02c9f0d6 100644
--- a/inc/modules/member/what-mydata.php
+++ b/inc/modules/member/what-mydata.php
@@ -220,7 +220,7 @@ case "save": // Save entered data
 	 else
 	{
 		// Secure every submitted variable
-		foreach ($_POST as $key=>$value)
+		foreach ($_POST as $key => $value)
 		{
 			$_POST[$key] = addslashes($value);
 		}
diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php
index b3e19cf892..b4c2f9a8cb 100644
--- a/inc/modules/member/what-order.php
+++ b/inc/modules/member/what-order.php
@@ -61,7 +61,7 @@ if (empty($_POST['receiver'])) $_POST['receiver'] = "";
 if (is_admin()) $whereStatement = "";
 
 // Add slashes to every value
-foreach($_POST as $key=>$value)
+foreach($_POST as $key => $value)
 {
 	// Skip submit buttons
 	if (($key != "data") && ($key != "frametester")) $_POST[$key] = addslashes($value);
@@ -692,7 +692,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
 				{
 					// Pre-output categories
 					$CAT = "";
-					foreach ($CATS['id'] as $key=>$value)
+					foreach ($CATS['id'] as $key => $value)
 					{
 						$CAT .= "      <OPTION value=\"".$value."\"";
 						if (($OLD_ORDER) && ($cat == $value)) $CAT .= " selected=\"selected\"";
@@ -700,7 +700,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
 					}
 					// Mail type
 					$type = "";
-		 			foreach ($typeS as $key=>$value)
+		 			foreach ($typeS as $key => $value)
 					{
 						$P = TRANSLATE_COMMA($typeS[$key][1]);
 						if (is_array($value))
diff --git a/inc/modules/member/what-themes.php b/inc/modules/member/what-themes.php
index d58dd5bbb7..849768d04d 100644
--- a/inc/modules/member/what-themes.php
+++ b/inc/modules/member/what-themes.php
@@ -106,7 +106,7 @@ array_pk_sort($THEMES, array("theme_name"));
 
 // Generate output lines for the template
 $OUT = ""; $SW = 2;
-foreach ($THEMES['theme_unix'] as $key=>$unix)
+foreach ($THEMES['theme_unix'] as $key => $unix)
 {
 	$default = "";
 	if (get_session('mxchange_theme') == $unix) $default = " checked selected";
diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php
index f4fa13aec4..8ddbea29c9 100644
--- a/inc/mysql-manager.php
+++ b/inc/mysql-manager.php
@@ -1355,7 +1355,7 @@ function ADD_OPTION_LINES($table, $id, $name, $default="",$special="",$where="")
 		// Selection from array
 		if (is_array($id) && is_array($name) && sizeof($id) == sizeof($name)) {
 			// Both are arrays
-			foreach ($id as $idx=>$value) {
+			foreach ($id as $idx => $value) {
 				$ret .= "<OPTION value=\"".$value."\"";
 				if ($default == $value) $ret .= " selected checked";
 				$ret .= ">".$name[$idx]."</OPTION>\n";
@@ -1531,7 +1531,7 @@ function LOAD_CONFIG($no="0") {
 	if ((is_array($cacheArray)) && (isset($cacheArray['config'][$no])) && (is_array($cacheArray['config'][$no]))) {
 		// Load config from cache
 		//* DEBUG: */ echo gettype($cacheArray['config'][$no])."<br />\n";
-		foreach ($cacheArray['config'][$no] as $key=>$value) {
+		foreach ($cacheArray['config'][$no] as $key => $value) {
 			$CFG_DUMMY[$key] = $value;
 		} // END - foreach
 
diff --git a/inc/pool-update.php b/inc/pool-update.php
index 5d054ef6ab..592ef3b5fc 100644
--- a/inc/pool-update.php
+++ b/inc/pool-update.php
@@ -90,7 +90,7 @@ if (SQL_NUMROWS($result_main) > 0)
 
 			// Now, if we are good little boys and girls Santa left us some user-ids.
 			// We can now send mails to them...
-			foreach ($RECEIVERS as $key=>$uid)
+			foreach ($RECEIVERS as $key => $uid)
 			{
 				// Lookup user ID
 				$result_user = SQL_QUERY_ESC("SELECT sex, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
@@ -278,7 +278,7 @@ if (SQL_NUMROWS($result_main) > 0)
 	}
 	if ((sizeof($points_BACK) > 0) && (!empty($points_BACK[0])))
 	{
-		foreach ($points_BACK as $uid=>$PB)
+		foreach ($points_BACK as $uid => $PB)
 		{
 			// Add points only when we have points left to add and a valid user ID
 			if (($PB > 0) && ($uid > 0))
@@ -362,7 +362,7 @@ if ((EXT_IS_ACTIVE("bonus") && ($cnt < $_CONFIG['max_send'])))
 
 			// Now, if we are good little boys and girls Santa left us some user-ids.
 			// We can now send mails to them...
-			foreach ($RECEIVERS as $key=>$uid)
+			foreach ($RECEIVERS as $key => $uid)
 			{
 				// Load personal data
 				//* DEBUG: */ echo "*L:".__LINE__."/".$uid."*<br />";
diff --git a/templates/de/emails/admin/admin_del_surfbar_urls.tpl b/templates/de/emails/admin/admin_del_surfbar_urls.tpl
index 357b944ac9..b27cb31f25 100644
--- a/templates/de/emails/admin/admin_del_surfbar_urls.tpl
+++ b/templates/de/emails/admin/admin_del_surfbar_urls.tpl
@@ -1,6 +1,6 @@
 {--HELLO_ADMIN--},
 
-Es wurde eine URL aus der Surfbar geloescht.
+Es wurde eine URL aus der Surfbar gel&ouml;scht.
 
 Hier sind alle dazu:
 ------------------------------------------
diff --git a/templates/de/emails/admin/admin_edit_surfbar_urls.tpl b/templates/de/emails/admin/admin_edit_surfbar_urls.tpl
new file mode 100644
index 0000000000..f04fdcb9e4
--- /dev/null
+++ b/templates/de/emails/admin/admin_edit_surfbar_urls.tpl
@@ -0,0 +1,30 @@
+{--HELLO_ADMIN--},
+
+Es wurde eine URL aus der Surfbar ge&auml;ndert.
+
+Hier sind alle dazu:
+------------------------------------------
+Gebuchte URL: $DATA[url]
+Neue URL: $content[url]
+------------------------------------------
+Framekiller-Test:
+$content[frametester]
+------------------------------------------
+Alte User-ID: $DATA[userid]
+Neue User-ID: $content[userid]
+------------------------------------------
+Alte Kosten/Aufruf: $DATA[costs] {!POINTS!}
+Neue Kosten/Aufruf: $content[costs] {!POINTS!}
+------------------------------------------
+Alte Verg&uuml;tung/Aufruf: $DATA[reward] {!POINTS!}
+Neue Verg&uuml;tung/Aufruf: $content[reward] {!POINTS!}
+------------------------------------------
+Angemeldet: $DATA[registered]
+------------------------------------------
+ID in der Surfbar: $DATA[id]
+------------------------------------------
+
+{--ADMIN_THANX--}
+  {--YOUR--} {!MAIN_TITLE!} {--SCRIPT--}
+
+{!URL!}/admin.php
diff --git a/templates/de/emails/member/member_edit_surfbar_urls.tpl b/templates/de/emails/member/member_edit_surfbar_urls.tpl
new file mode 100644
index 0000000000..99d4881131
--- /dev/null
+++ b/templates/de/emails/member/member_edit_surfbar_urls.tpl
@@ -0,0 +1,25 @@
+Hallo Mitglied,
+
+wir haben soeben Ihre in unserer Surfbar gebuchte URL ge&auml;ndert.
+
+Hier sind alle Daten dazu:
+------------------------------------------
+Gebuchte URL: $DATA[url]
+------------------------------------------
+Neue Verg&uuml;tung/Aufruf: $content[reward] {!POINTS!}
+------------------------------------------
+Neue Kosten/Aufruf: $content[costs] {!POINTS!}
+------------------------------------------
+Aufrufe gesamt: $DATA[views_total]
+------------------------------------------
+Angemeldet: $DATA[registered]
+------------------------------------------
+Ihre User-ID: $DATA[userid]
+------------------------------------------
+ID in der Surfbar: $DATA[id]
+------------------------------------------
+
+Mit freundlichem Gruss,
+  Ihr {!MAIN_TITLE!} Team
+
+{!URL!} ({!WEBMASTER!})
diff --git a/templates/de/html/admin/admin_edit_surfbar_urls.tpl b/templates/de/html/admin/admin_edit_surfbar_urls.tpl
new file mode 100644
index 0000000000..e625a71421
--- /dev/null
+++ b/templates/de/html/admin/admin_edit_surfbar_urls.tpl
@@ -0,0 +1,22 @@
+<form action="{!URL!}/modules.php?module=admin&amp;what=list_surfbar_urls" method="POST">
+<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
+<tr>
+	<td align="center" colspan="4" class="admin_title" height="30">
+		<strong>{--ADMIN_SURFBAR_EDIT_URLS_TITLE--}</strong>
+	</td>
+</tr>
+<tr>
+	<td class="admin_title bottom2 right2" align="center"><strong>{--_UID--}</strong></td>
+	<td class="admin_title bottom2 right2" align="center"><strong>{--ADMIN_TEST_URL--}</strong></td>
+	<td class="admin_title bottom2 right2" align="center"><strong>{--ADMIN_SURFBAR_REWARD--}</strong></td>
+	<td class="admin_title bottom2" align="center"><strong>{--ADMIN_SURFBAR_COSTS--}</strong></td>
+</tr>
+$content
+<tr>
+	<td class="admin_footer" colspan="4">
+		<input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}">&nbsp;*
+		<input type="submit" name="do_edit" class="admin_submit" value="{--ADMIN_SURFBAR_EDIT_URL_NOW--}">
+	</td>
+</tr>
+</table>
+</form>
diff --git a/templates/de/html/admin/admin_edit_surfbar_urls_row.tpl b/templates/de/html/admin/admin_edit_surfbar_urls_row.tpl
new file mode 100644
index 0000000000..5864657bdb
--- /dev/null
+++ b/templates/de/html/admin/admin_edit_surfbar_urls_row.tpl
@@ -0,0 +1,16 @@
+<tr>
+	<td style="padding:2px" align="center" class="bottom2 right2 switch_sw$content[sw]">
+		<input type="hidden" name="id[$content[id]]" value="1" />
+		<input type="hidden" name="uid_raw[$content[id]]" value="$content[uid]" />
+		$content[userid]
+	</td>
+	<td style="padding:2px" align="center" class="bottom2 right2 switch_sw$content[sw]">
+		<input type="text" name="url[$content[id]]" size="20" maxlength="255" value="$content[url]" />
+	</td>
+	<td style="padding:2px" align="center" class="bottom2 right2 switch_sw$content[sw]">
+		<input type="text" name="reward[$content[id]]" size="5" maxlength="20" value="$content[reward]" /> {!POINTS!}
+	</td>
+	<td style="padding:2px" align="center" class="bottom2 switch_sw$content[sw]">
+		<input type="text" name="costs[$content[id]]" size="5" maxlength="20" value="$content[costs]" /> {!POINTS!}
+	</td>
+</tr>