templates/de/html/copyright.tpl svneol=native#text/plain
templates/de/html/copyright_backlink.tpl svneol=native#text/plain
templates/de/html/css_inline.tpl svneol=native#text/plain
+templates/de/html/display_email.tpl svneol=native#text/plain
templates/de/html/doubler/.htaccess svneol=native#text/plain
templates/de/html/doubler/doubler_banner.tpl svneol=native#text/plain
templates/de/html/doubler/doubler_footer.tpl svneol=native#text/plain
templates/de/html/guest/guest_top10_row_earner.tpl svneol=native#text/plain
templates/de/html/guest/guest_top10_row_login.tpl svneol=native#text/plain
templates/de/html/guest/guest_top10_row_refs.tpl svneol=native#text/plain
+templates/de/html/guest/guest_wernis_news.tpl svneol=native#text/plain
templates/de/html/impressum.tpl svneol=native#text/plain
templates/de/html/index.tpl svneol=native#text/plain
templates/de/html/index_forward.tpl svneol=native#text/plain
// Debug mode enabled?
if (isDebugModeEnabled()) {
- // In debug mode we want to display the mail instead of sending it away so we can debug this part
- outputHtml('<pre>
-<strong>Headers</strong> : ' . htmlentities(trim($mailHeader)) . '
-<strong>To</strong> : ' . htmlentities($toEmail) . '
-<strong>Subject</strong> : ' . htmlentities($subject) . '
-<strong>Message(' . strlen($message) . ')</strong> : ' . htmlentities($message) . '
-</pre>');
+ // Init content array
+ $content = array(
+ 'headers' => htmlentities(trim($mailHeader)),
+ 'to' => htmlentities($toEmail),
+ 'subject' => htmlentities($subject),
+ 'message' => htmlentities($message),
+ 'length' => strlen($message)
+ );
+
+ // In debug mode display the mail instead of sending it away so it can be debugged
+ loadTemplate('display_email', FALSE, $content);
// This is always fine
return TRUE;
// Filter for flushing the output
function FILTER_FLUSH_OUTPUT () {
// Simple, he?
- outputHtml('');
+ outputHtml();
}
// Prepares an SQL statement part for HTML mail and/or holiday dependency
// Wtites data to a config.php-style file
// @TODO Rewrite this function to use readFromFile() and writeToFile()
-function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $inserted, $seek=0) {
+function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $inserted, $seek = 0) {
// Initialize some variables
$done = FALSE;
$seek++;
// Start reading
while (!feof($fp)) {
// Read from source file
- $line = fgets ($fp, 1024);
+ $line = fgets($fp, 1024);
if (isInString($search, $line)) {
$next = '0';
fclose($fp);
if (($done === TRUE) && ($found === TRUE)) {
- // Copy back tmp file and delete tmp :-)
+ // Copy back temporary->FQFN file and ...
copyFileVerified($tmp, $FQFN, 0644);
+
+ // ... delete temporay file :-)
return removeFile($tmp);
} elseif ($found === FALSE) {
- outputHtml('<strong>CHANGE:</strong> 404!');
+ // Entry not found
+ logDebugMessage(__FUNCTION__, __LINE__, 'File ' . basename($FQFN) . ' cannot be changed: comment=' . $comment . ',prefix=' . $prefix . ',inserted=' . $inserted . ',seek=' . $seek . ' - 404!');
} else {
- outputHtml('<strong>TMP:</strong> UNDONE!');
+ // Temporary file not fully written
+ logDebugMessage(__FUNCTION__, __LINE__, 'File ' . basename($FQFN) . ' cannot be changed: comment=' . $comment . ',prefix=' . $prefix . ',inserted=' . $inserted . ',seek=' . $seek . ' - Temporary file unfinished!');
}
}
} else {
// File not found, not readable or writeable
- reportBug(__FUNCTION__, __LINE__, 'File not readable/writeable. file=' . basename($FQFN));
+ reportBug(__FUNCTION__, __LINE__, 'File not readable/writeable. file=' . basename($FQFN) . ',comment=' . $comment . ',prefix=' . $prefix . ',inserted=' . $inserted . ',seek=' . $seek);
}
// An error was detected!
'ADMIN_USER_AMOUNT_PERCENTS' => "Prozentualer Anteil",
'ADMIN_TOTAL_POINTS_AMOUNT' => "Gesamtanzahl {?POINTS?}",
'ADMIN_LIST_USER_AMOUNTS_NOTICE' => "Diese Auflistung zeigt das Gesamtguthaben aller Mitglieder einzelnt und in der Gesamtsumme an. Dabei ist der Abzug bereits mit eingerechnet.",
+
+ // Displaying email if in debug mode
+ 'EMAIL_DISPLAY_HEADERS' => "Kopfzeilen:",
+ 'EMAIL_DISPLAY_TO_ADDRESS' => "An:",
+ 'EMAIL_DISPLAY_SUBJECT_LINE' => "Betreffzeile:",
+ 'EMAIL_DISPLAY_MESSAGE_LENGTH' => "Nachricht(Länge):",
));
// Description of all months
} // END - if
if (isset($GLOBALS['cache_array']['always_active'][$ext_name])) {
- // Maybe we want to keept the current extension active?
+ // Shall the current extension kept activated?
if (($GLOBALS['cache_array']['always_active'][$ext_name] == 'Y') && (!isExtensionActive($ext_name))) {
// Reactivate this extension!
doActivateExtension($ext_name);
// Add description as navigation point
addYouAreHereLink('admin', __FILE__);
-// Do we want to save changes?
+// Save changes?
if (isFormSent('save_config')) {
// Begin counting
$count = 0;
foreach (postRequestElement('sel') as $id => $value) {
// Update database
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__);
+ array(
+ $value,
+ bigintval($id),
+ $value
+ ),__FILE__, __LINE__);
// Get affected rows
$count += SQL_AFFECTEDROWS();
// Add description as navigation point
addYouAreHereLink('admin', __FILE__);
-// Normally we want the overview of all registered extensions
+// By default generate overview of all installed extensions
$do = 'overview';
if (isGetRequestElementSet('register_ext')) {
// Update database
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_active`='%s' WHERE `id`=%s AND `ext_active`='%s' LIMIT 1",
- array($active, bigintval($ext_id), $ext_active), __FILE__, __LINE__);
+ array(
+ $active,
+ bigintval($ext_id),
+ $ext_active
+ ), __FILE__, __LINE__);
// Run embeded SQL commands
doExtensionSqls($ext_id, getExtensionMode());
// Look for a unique id
while (!$isUnique) {
/*
- * Add a coupon for this user, first we need to create a
- * table-unique "id". The function generatePassword() can do
- * this job for us but we want to exclude some characters.
+ * Add a coupon for this user, first generate a
+ * "table-unique" id number. generatePassword() can do this
+ * but with some characters excluded.
*/
$couponCode = generatePassword(30, array('-', '+', '_', '/', '.'));
return;
} // END - if
-// Determine which stats we want and set mode and title for the link below stats block
-if (!isGetRequestElementSet('do')) {
- setGetRequestElement('do', strtolower(getConfig('guest_stats')));
-} // END - if
+// Default mode is from config
+$do = getConfig('guest_stats');
-// Set config temporarily
-setConfigEntry('guest_stats', strtoupper(getRequestElement('do')));
+// Determine which stats are wanted and set mode and title for the link below stats block
+if (isGetRequestElementSet('do')) {
+ // Use it from get value
+ $do = getRequestElement('do');
+} // END - if
-switch (getRequestElement('do')) {
+switch ($do) {
case 'members' :
$lmode = 'modules';
break;
default:
// Unsupported mode
- reportBug(__FILE__, __LINE__, sprintf("Unsupported mode <span class=\"data\">%s</span> detected.", getRequestElement('do')));
+ reportBug(__FILE__, __LINE__, sprintf("Unsupported mode <span class=\"data\">%s</span> detected.", SQL_ESCAPE($do)));
break;
} // END - switch
$ltitle = '{--GUEST_STATS_' . strtoupper($lmode) . '--}';
// @TODO This can be rewritten in a dynamic include
-switch (getConfig('guest_stats')) {
+switch (strtoupper($do)) {
case 'MEMBERS': // Statistics about your members
// Only males / females
$male = countSumTotalData('M', 'user_data', 'userid', 'gender', TRUE, runFilterChain('user_exclusion_sql', " AND `status`='CONFIRMED'"));
return;
} // END - if
-outputHtml('<div style="padding-left: 10px; padding-right: 10px">');
+// Init PDF/RDF parser class
$rdf = new fase4_rdf();
$rdf->_use_nl2br = FALSE;
$rdf->use_dynamic_display(FALSE);
$rdf->parse_RDF('http://www.wds66.com/rss.xml');
-// Fix to avoid 'headers already sent' bug. Thanks to Profi-Concept
-outputHtml($rdf->finish(TRUE));
-outputHtml('</div>');
+// Load template
+loadTemplate('guest_wernis_news', FALSE, $rdf->finish(TRUE));
// [EOF]
?>
// Default is no ZIP code
$content['zip_content'] = '';
- // Do we want ZIP code or not?
+ // Is sending to ZIP code enabled? (logged-in admin can always send to it)
if ((isOrderMultiPageEnabled()) || (isAdmin())) {
// Yes
if (postRequestElement('zip') > 0) {
// Default is we don't want to change password!
$PASS_AND = ''; $PASS_DATA = '';
- // Check if we want to change password or not
+ // Check if the sponsor wants to change his/her password
if ((postRequestElement('pass1') == postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (postRequestElement('pass1') != postRequestElement('pass_old'))) {
// Change current password
$PASS_AND = ",`password`='%s'";
// Now load all userids for one big query!
$userids = array();
while ($data = SQL_FETCHARRAY($result)) {
- // By default we want to reduce and have no mails found
+ // By default reduce and found no emails
$num = 0;
// We must now look if he has already confirmed this mail, so might sound double, but it may resolve problems
// Free memory
SQL_FREERESULT($result_inactive);
- // Now let's have a look for inactive accounts we want to delete we newly use the same exclude list
- // here for e.g. excluding holiday users
+ /*
+ * Now let's have a look for inactive accounts for deletion. Use the newly
+ * added exclude list here for e.g. excluding holiday users, test users et
+ * cetera.
+ */
$result_inactive = SQL_QUERY("SELECT
`userid`,
`email`,
}
// Output HTML code directly or 'render' it. You addionally switch the new-line character off
-function outputHtml ($htmlCode, $newLine = TRUE) {
+function outputHtml ($htmlCode = NULL, $newLine = TRUE) {
// Init output
if (!isset($GLOBALS['__output'])) {
$GLOBALS['__output'] = '';
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getOutputMode()=' . getOutputMode() . ',htmlCode(length)=' . strlen($htmlCode) . ',output(length)=' . strlen($GLOBALS['__output']));
// Is there HTML-Code here?
- if (!empty($htmlCode)) {
+ if ((!is_null($htmlCode)) && (!empty($htmlCode))) {
// Yes, so we handle it as you have configured
switch (getOutputMode()) {
case 'render':
--- /dev/null
+<pre>
+ <strong>{--EMAIL_DISPLAY_HEADERS--}</strong> $content[headers]
+ <strong>{--EMAIL_DISPLAY_TO_ADDRESS--}</strong> $content[to]
+ <strong>{--EMAIL_DISPLAY_SUBJECT_LINE--}</strong> $content[subject]
+ <strong>{--EMAIL_DISPLAY_MESSAGE_LENGTH--}($content[length])</strong> $content[message]
+</pre>
--- /dev/null
+<div style="padding-left: 10px; padding-right: 10px">
+$content
+</div>