From 0a69b4e17157eda9b6e1c70ff494292ccf8cbbd0 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Roland=20H=C3=A4der?= <roland@mxchange.org>
Date: Fri, 4 Dec 2009 01:52:44 +0000
Subject: [PATCH] More double quotes to single rewritten, CSS/HTML cleanups

---
 inc/functions.php                             |  8 +--
 inc/libs/task_functions.php                   |  6 +-
 inc/modules/admin/what-config_email.php       |  2 +-
 inc/modules/admin/what-config_points.php      |  2 +-
 inc/modules/admin/what-edit_emails.php        |  4 +-
 inc/modules/admin/what-payments.php           |  4 +-
 inc/modules/admin/what-refbanner.php          |  7 ++-
 inc/modules/member/what-order.php             | 16 +++---
 show_bonus.php                                |  6 +-
 .../de/html/member/member_cats_header.tpl     |  2 +-
 .../de/html/member/member_mydata_overview.tpl | 57 +++----------------
 .../de/html/member/member_order-zip2.tpl      | 21 +++----
 .../de/html/member/member_order_points.tpl    |  2 +-
 13 files changed, 46 insertions(+), 91 deletions(-)

diff --git a/inc/functions.php b/inc/functions.php
index 3b95accab0..9131865c19 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -3818,21 +3818,21 @@ function sendModeMails ($mod, $modes) {
 					$sub_mem = getMessage('MEMBER_CHANGED_DATA');
 
 					// Output success message
-					$content = "<span class=\"member_done\">{--MYDATA_MAIL_SENT--}</span>";
+					$content = '<span class="member_done">{--MYDATA_MAIL_SENT--}</span>';
 					break;
 
 				default: // Unsupported module!
 					logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unsupported module %s detected.", $mod));
-					$content = "<span class=\"member_failed\">{--UNKNOWN_MODULE--}</span>";
+					$content = '<span class="member_failed">{--UNKNOWN_MODULE--}</span>';
 					break;
 			} // END - switch
 		} else {
 			// Passwords mismatch
-			$content = "<span class=\"member_failed\">{--MEMBER_PASSWORD_ERROR--}</span>";
+			$content = '<span class="member_failed">{--MEMBER_PASSWORD_ERROR--}</span>';
 		}
 	} else {
 		// Could not load profile
-		$content = "<span class=\"member_failed\">{--MEMBER_CANNOT_LOAD_PROFILE--}</span>";
+		$content = '<span class="member_failed">{--MEMBER_CANNOT_LOAD_PROFILE--}</span>';
 	}
 
 	// Send email to user if required
diff --git a/inc/libs/task_functions.php b/inc/libs/task_functions.php
index fb8fd95c23..27e73d663e 100644
--- a/inc/libs/task_functions.php
+++ b/inc/libs/task_functions.php
@@ -209,11 +209,11 @@ function outputAdvancedOverview (&$result_main) {
 		} elseif (isExtensionActive('bonus')) {
 			$content['purged_bonus_mails'] = getMaskedMessage('ADMIN_EXT_BONUS_OUTDATED', '0.1.8');
 		} else {
-			$content['purged_bonus_mails'] = "<span class=\"admin_note\">{--ADMIN_EXT_BONUS_404--}</span>";
+			$content['purged_bonus_mails'] = '<span class="admin_note">{--ADMIN_EXT_BONUS_404--}</span>';
 		}
 	} else {
-		$content['purged_bonus_mails'] = "<span class=\"admin_note\">{--ADMIN_EXT_AUTOPURGE_404--}</span>";
-		$content['purged_mails'] = "<span class=\"admin_note\">{--ADMIN_EXT_AUTOPURGE_404--}</span>";
+		$content['purged_bonus_mails'] = '<span class="admin_note">{--ADMIN_EXT_AUTOPURGE_404--}</span>';
+		$content['purged_mails'] = '<span class="admin_note">{--ADMIN_EXT_AUTOPURGE_404--}</span>';
 	}
 
 	//
diff --git a/inc/modules/admin/what-config_email.php b/inc/modules/admin/what-config_email.php
index 789a1ec484..9a93ae5e03 100644
--- a/inc/modules/admin/what-config_email.php
+++ b/inc/modules/admin/what-config_email.php
@@ -58,7 +58,7 @@ if (isPostRequestParameterSet(('add_max'))) {
 		$content = getMessage('MAX_VALUE_SAVED');
 	} else {
 		// Value does alread exists!
-		$content = "<span class=\"admin_failed\">{--MAX_VALUE_ALREADY--}</span>";
+		$content = '<span class="admin_failed">{--MAX_VALUE_ALREADY--}</span>';
 	}
 
 	// Free memory
diff --git a/inc/modules/admin/what-config_points.php b/inc/modules/admin/what-config_points.php
index 8c36a0770b..92845f6c65 100644
--- a/inc/modules/admin/what-config_points.php
+++ b/inc/modules/admin/what-config_points.php
@@ -151,7 +151,7 @@ WHERE `mails_confirmed` < %s", $REF, $REF));
 			rebuildCacheFile('config', 'config');
 		} else {
 			// Prepare failed-message
-			$message = "<span class=\"admin_failed\">{--SETTINGS_NOT_SAVED--}</span>";
+			$message = '<span class="admin_failed">{--SETTINGS_NOT_SAVED--}</span>';
 		}
 
 		// Remove SQL queries
diff --git a/inc/modules/admin/what-edit_emails.php b/inc/modules/admin/what-edit_emails.php
index 187d3c8a30..7a730e3d1a 100644
--- a/inc/modules/admin/what-edit_emails.php
+++ b/inc/modules/admin/what-edit_emails.php
@@ -86,7 +86,7 @@ LIMIT 1",
 		if (SQL_AFFECTEDROWS() == 1) {
 			$content = getMessage('SETTINGS_SAVED');
 		} else {
-			$content = "<span class=\"admin_failed\">{--SETTINGS_NOT_SAVED--}</span>";
+			$content = '<span class="admin_failed">{--SETTINGS_NOT_SAVED--}</span>';
 		}
 
 		// Display message
@@ -118,7 +118,7 @@ LIMIT 1",
 	}
 } else {
 	// No mail orders left in pool
-	loadTemplate('admin_settings_saved', false, "<span class=\"admin_failed\">{--ADMIN_NO_MAILS_IN_POOL--}</span>");
+	loadTemplate('admin_settings_saved', false, '<span class="admin_failed">{--ADMIN_NO_MAILS_IN_POOL--}</span>');
 }
 
 // [EOF]
diff --git a/inc/modules/admin/what-payments.php b/inc/modules/admin/what-payments.php
index 3424bf9a0a..ec61516298 100644
--- a/inc/modules/admin/what-payments.php
+++ b/inc/modules/admin/what-payments.php
@@ -80,10 +80,10 @@ if (isFormSent()) {
 	if (countSqls() > 0) {
 		// Run all queries
 		runFilterChain('run_sqls');
-		$content = "<span class=\"admin_failed\">{--SETTINGS_SAVED--}</span>";
+		$content = '<span class="admin_failed">{--SETTINGS_SAVED--}</span>';
 	} else {
 		// Nothing has changed!
-		$content = "<span class=\"admin_failed\">{--SETTINGS_NOT_SAVED--}</span>";
+		$content = '<span class="admin_failed">{--SETTINGS_NOT_SAVED--}</span>';
 	}
 
 	// Output template
diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php
index 1d0171b880..174f837e97 100644
--- a/inc/modules/admin/what-refbanner.php
+++ b/inc/modules/admin/what-refbanner.php
@@ -86,11 +86,16 @@ VALUES ('%s','%s','%s')",
 			break;
 	}
 
+	// Check if we have saved (updated)
 	if (SQL_AFFECTEDROWS() == 1) {
+		// Updated!
 		$content = getMessage('SETTINGS_SAVED');
 	} else {
-		$content = "<span class=\"admin_failed\">{--SETTINGS_NOT_SAVED--}</span>";
+		// Nothing has been updated
+		$content = '<span class="admin_failed">{--SETTINGS_NOT_SAVED--}</span>';
 	}
+
+	// Display message
 	loadTemplate('admin_settings_saved', false, $content);
 } elseif ((countPostSelection() > 0) && (isPostRequestParameterSet('edit'))) {
 	// Edit banner
diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php
index a51cf0f7ea..d85b9fea81 100644
--- a/inc/modules/member/what-order.php
+++ b/inc/modules/member/what-order.php
@@ -628,9 +628,9 @@ LIMIT 1",
 
 					if (isPostRequestParameterSet('zip')) {
 						// Output entered ZIP code
-						$content['zip_content'] = loadTemplate('member_order-zip', true, postRequestParameter('zip'));
+						$content['zip_content'] = loadTemplate('member_order-zip2', true, postRequestParameter('zip'));
 					} else {
-						$content['zip_content'] = "<tr><td colspan=\"5\" height=\"5\" class=\"seperator\">&nbsp;</td></tr>";
+						$content['zip_content'] = '<tr><td colspan="3" height="5" class="seperator">&nbsp;</td></tr>';
 					}
 
 					// HTML extension
@@ -639,7 +639,7 @@ LIMIT 1",
 						$content['html_extension'] = loadTemplate('member_order-html_ext', true, addValidHtmlTags());
 					} else {
 						// Extension not active and/or class not uploaded
-						$content['html_extension'] = "<tr><td colspan=\"5\"><input type=\"hidden\" name=\"html\" value=\"N\" /></td></tr>";
+						$content['html_extension'] = '<tr><td colspan="3"><input type="hidden" name="html" value="N" /></td></tr>';
 					}
 
 					// Output form for page 2
@@ -649,11 +649,11 @@ LIMIT 1",
 					$add = '';
 					if (isExtensionActive('html_mail')) {
 						// Add some content when html extension is active
-						if ((getConfig('order_multi_page') == 'Y') || (isAdmin())) $add = "<tr><td colspan=\"2\" class=\"seperator bottom\" height=\"5\">&nbsp;</td></tr>\n";
+						if ((getConfig('order_multi_page') == 'Y') || (isAdmin())) $add = '<tr><td colspan="3" class="seperator bottom" height="5">&nbsp;</td></tr>';
 						$content['html_extension'] = loadTemplate('member_order-html_intro', true);
 					} else {
 						// No HTML extension installed
-						$content['html_extension'] = "<tr><td colspan=\"2\"><input type=\"hidden\" name=\"html\" value=\"N\" /></td></tr>";
+						$content['html_extension'] = '<tr><td colspan="3"><input type="hidden" name="html" value="N" /></td></tr>';
 					}
 
 					// Default is no ZIP code
@@ -681,15 +681,15 @@ LIMIT 1",
 				}
 			} else {
 				// No mail types defined
-				loadTemplate('admin_settings_saved', false, "<span class=\"member_failed\">{--MEMBER_NO_PAYMENTS--}</span>");
+				loadTemplate('admin_settings_saved', false, '<span class="member_failed">{--MEMBER_NO_PAYMENTS--}</span>');
 			}
 		} else {
 			// No points left
-			loadTemplate('admin_settings_saved', false, "<span class=\"member_failed\">{--MEMBER_NO_POINTS--}</span>");
+			loadTemplate('admin_settings_saved', false, '<span class="member_failed">{--MEMBER_NO_POINTS--}</span>');
 		}
 	} else {
 		// No cateogries are defined yet
-		loadTemplate('admin_settings_saved', false, "<span class=\"member_failed\">{--MEMBER_NO_CATS--}</span>");
+		loadTemplate('admin_settings_saved', false, '<span class="member_failed">{--MEMBER_NO_CATS--}</span>');
 	}
 } elseif ($mmails == '0') {
 	// Please set more than 0 mails per day
diff --git a/show_bonus.php b/show_bonus.php
index d8c15a6df4..0a633f1e77 100644
--- a/show_bonus.php
+++ b/show_bonus.php
@@ -112,18 +112,18 @@ LIMIT 1",
 			$content['message'] = loadTemplate('show_bonus_msg', true, $content);
 		} else {
 			// No data found
-			$content['message'] = "<span class=\"guest_failed\">{--BONUS_SHOW_NO_DATA--}</span>";
+			$content['message'] = '<span class="guest_failed">{--BONUS_SHOW_NO_DATA--}</span>';
 		}
 
 		// Free memory
 		SQL_FREERESULT($result);
 	} else {
 		// Wrong type entered
-		$content['message'] = "<span class=\"guest_failed\">{--BONUS_SHOW_WRONG_TYPE--}</span>";
+		$content['message'] = '<span class="guest_failed">{--BONUS_SHOW_WRONG_TYPE--}</span>';
 	}
 } else {
 	// Wrong call!
-	$content['message'] = "<span class=\"guest_failed\">{--BONUS_SHOW_WRONG_CALL--}</span>";
+	$content['message'] = '<span class="guest_failed">{--BONUS_SHOW_WRONG_CALL--}</span>';
 }
 
 // Load send_bonus header template (for your banners, e.g.?)
diff --git a/templates/de/html/member/member_cats_header.tpl b/templates/de/html/member/member_cats_header.tpl
index f5aeab88f2..af20590378 100644
--- a/templates/de/html/member/member_cats_header.tpl
+++ b/templates/de/html/member/member_cats_header.tpl
@@ -1,6 +1,6 @@
 <div align="center">
 <form accept-charset="utf-8" action="{%url=modules.php?module=login&amp;what=categories%}" method="post">
-<table border="0" cellspacing="0" cellpadding="0" class="member_main dashed">
+<table border="0" cellspacing="0" cellpadding="0" class="member_table dashed">
 <tr>
 	<td align="center" class="header_column bottom" width="408"><strong>{--CATNAME--}</strong></td>
 	<td align="center" class="header_column bottom" width="180"><strong>{--SELECT_CAT--}</strong></td>
diff --git a/templates/de/html/member/member_mydata_overview.tpl b/templates/de/html/member/member_mydata_overview.tpl
index 5566492011..af98d904e3 100644
--- a/templates/de/html/member/member_mydata_overview.tpl
+++ b/templates/de/html/member/member_mydata_overview.tpl
@@ -1,116 +1,73 @@
-<table border="0" cellspacing="0" cellpadding="0" width="480" class="member_main dashed" align="center">
+<div align="center">
+<table border="0" cellspacing="0" cellpadding="0" width="480" class="member_table dashed" align="center">
 	<tr>
-		<td colspan="5" height="7" class="seperator">&nbsp;</td>
-	</tr>
-	<tr>
-		<td width="10" rowspan="27" class="seperator">&nbsp;</td>
 		<td colspan="3" align="center">$content[change]</td>
-		<td width="10" rowspan="27" class="seperator">&nbsp;</td>
-	</tr>
-	<tr>
-		<td colspan="3" height="7" class="seperator">&nbsp;</td>
 	</tr>
 	<tr>
 		<td width="225" align="right">{--YOUR_LOGIN--}:</td>
 		<td width="10" class="seperator">&nbsp;</td>
 		<td width="225"><strong>$content[userid]</strong></td>
 	</tr>
-	<tr>
-		<td colspan="3" height="7" class="seperator">&nbsp;</td>
-	</tr>
 	<tr>
 		<td width="225" align="right">{--GENDER--}:</td>
 		<td width="10" class="seperator">&nbsp;</td>
 		<td width="225"><strong>$content[gender]</strong></td>
 	</tr>
-	<tr>
-		<td colspan="3" height="3" class="seperator">&nbsp;</td>
-	</tr>
 	<tr>
 		<td width="225" align="right">{--SURNAME--}:</td>
 		<td width="10" class="seperator">&nbsp;</td>
 		<td width="225"><strong>$content[surname]</strong></td>
 	</tr>
-	<tr>
-		<td colspan="3" height="3" class="seperator">&nbsp;</td>
-	</tr>
 	<tr>
 		<td align="right">{--FAMILY--}:</td>
 		<td width="10" class="seperator">&nbsp;</td>
 		<td><strong>$content[family]</strong></td>
 	</tr>
-	<tr>
-		<td colspan="3" height="3" class="seperator">&nbsp;</td>
-	</tr>
 	<tr>
 		<td align="right">{--STREET_NR--}:</td>
 		<td width="10" class="seperator">&nbsp;</td>
 		<td><strong>$content[street_nr]</strong></td>
 	</tr>
-	<tr>
-		<td colspan="3" height="3" class="seperator">&nbsp;</td>
-	</tr>
 	<tr>
 		<td align="right">{--COUNTRY--}:</td>
 		<td width="10" class="seperator">&nbsp;</td>
 		<td><strong>$content[country]</strong></td>
 	</tr>
-	<tr>
-		<td colspan="3" height="3" class="seperator">&nbsp;</td>
-	</tr>
 	<tr>
 		<td align="right">{--ZIP--}:</td>
 		<td width="10" class="seperator">&nbsp;</td>
 		<td><strong>$content[zip]</strong></td>
 	</tr>
-	<tr>
-		<td colspan="3" height="3" class="seperator">&nbsp;</td>
-	</tr>
 	<tr>
 		<td align="right">{--CITY--}:</td>
 		<td width="10" class="seperator">&nbsp;</td>
 		<td><strong>$content[city]</strong></td>
 	</tr>
-	<tr>
-		<td colspan="3" height="3" class="seperator">&nbsp;</td>
-	</tr>
 	<tr>
 		<td align="right">{--EMAIL--}:</td>
 		<td width="10" class="seperator">&nbsp;</td>
 		<td><strong>$content[email]</strong></td>
 	</tr>
-	<tr>
-		<td colspan="3" height="3" class="seperator">&nbsp;</td>
-	</tr>
 	<tr>
 		<td align="right">{--BIRTHDAY--}:</td>
 		<td width="10" class="seperator">&nbsp;</td>
 		<td><strong>$content[dob]</strong></td>
 	</tr>
-	<tr>
-		<td colspan="3" height="3" class="seperator">&nbsp;</td>
-	</tr>
 	<tr>
 		<td align="right">{--MAILS_PER_DAY--}:</td>
 		<td width="10" class="seperator">&nbsp;</td>
-		<td><strong>$content[max_mails]</strong>&nbsp;({--TODAY--}: <strong>$content[receive_mails]</strong>)
+		<td>
+			<strong>$content[max_mails]</strong>
+			({--TODAY--}: <strong>$content[receive_mails]</strong>)
 		</td>
 	</tr>
-	<tr>
-		<td colspan="3" height="3" class="seperator">&nbsp;</td>
-	</tr>
 	<tr>
 		<td align="right">{--PROFILE_LAST_CHANGE--}:</td>
 		<td width="10" class="seperator">&nbsp;</td>
 		<td><strong>$content[last_update]</strong></td>
 	</tr>
-	<tr>
-		<td colspan="3" height="7" class="seperator">&nbsp;</td>
-	</tr>
 	<tr>
 		<td colspan="3" align="center">$content[change]</td>
 	</tr>
-	<tr>
-		<td colspan="5" height="7" class="seperator">&nbsp;</td>
-	</tr>
-</table>
\ No newline at end of file
+</table>
+</div>
diff --git a/templates/de/html/member/member_order-zip2.tpl b/templates/de/html/member/member_order-zip2.tpl
index 6fc0671b99..f55e068ef7 100644
--- a/templates/de/html/member/member_order-zip2.tpl
+++ b/templates/de/html/member/member_order-zip2.tpl
@@ -1,24 +1,17 @@
 <tr>
-	<td colspan="5" align="center" class="member_title2 bottom"
-		height="30"><strong>{--MEMBER_ORDER_PAGE2_INTRO--}</strong></td>
-</tr>
-<tr>
-	<td colspan="5" height="5" class="seperator">&nbsp;</td>
+	<td colspan="3" align="center" class="member_title2 bottom" height="30">
+		<strong>{--MEMBER_ORDER_PAGE2_INTRO--}</strong>
+	</td>
 </tr>
 <tr>
-	<td width="10" class="seperator">&nbsp;</td>
 	<td align="center" colspan="3">
-	<table border="0" cellspacing="0" cellpadding="0"
-		class="member_main dashed">
+	<table border="0" cellspacing="0" cellpadding="0" class="member_table dashed">
 		<tr>
-			<td width="10" class="seperator">&nbsp;</td>
 			<td align="right">{--MEMBER_ENTER_ZIP_CODE--}</td>
-			<td width="10" class="seperator">&nbsp;</td>
-			<td><input type="text" name="zip" class="member_normal" size="5"
-				maxlength="6" value="$content">
-			<td width="10" class="seperator">&nbsp;</td>
+			<td>
+				<input type="text" name="zip" class="member_normal" size="5" maxlength="6" value="$content" />
+			</td>
 		</tr>
 	</table>
 	</td>
-	<td width="10" class="seperator">&nbsp;</td>
 </tr>
\ No newline at end of file
diff --git a/templates/de/html/member/member_order_points.tpl b/templates/de/html/member/member_order_points.tpl
index dea7095dbd..5bb2161428 100644
--- a/templates/de/html/member/member_order_points.tpl
+++ b/templates/de/html/member/member_order_points.tpl
@@ -1,5 +1,5 @@
 <div class="para" align="center">
-<table border="0" cellspacing="0" cellpadding="0" class="member_main dashed">
+<table border="0" cellspacing="0" cellpadding="0" class="member_table dashed">
 	<tr>
 		<td align="center" height="50" class="member_main" style="padding-left: 5px; padding-right: 5px">
 			<div class="para">
-- 
2.39.5