- New extension ext-cprping introduced (I had that idea of reactivating the code
at http://cpr-stats.mxchange.org
- Some functions moved above note for auto-recreated functions
- Directory 'install' excluded from GNU GPL
- TODOs.txt updated
inc/extensions/ext-clickbanner.php svneol=native#text/plain
inc/extensions/ext-country.php svneol=native#text/plain
inc/extensions/ext-coupon.php svneol=native#text/plain
+inc/extensions/ext-cprping.php svneol=native#text/plain
inc/extensions/ext-debug.php svneol=native#text/plain
inc/extensions/ext-demo.php svneol=native#text/plain
inc/extensions/ext-doubler.php svneol=native#text/plain
templates/de/html/ext/ext_clickbanner.tpl svneol=native#text/plain
templates/de/html/ext/ext_country.tpl svneol=native#text/plain
templates/de/html/ext/ext_coupon.tpl svneol=native#text/plain
+templates/de/html/ext/ext_cprping.tpl svneol=native#text/plain
templates/de/html/ext/ext_debug.tpl svneol=native#text/plain
templates/de/html/ext/ext_demo.tpl svneol=native#text/plain
templates/de/html/ext/ext_doubler.tpl svneol=native#text/plain
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-This applies to all files from root directory except DOCS, img and templates
-directories.
+This applies to all files from root directory except DOCS, img, install and
+templates directories.
./inc/mysql-manager.php:44:// @TODO Can we cache this?
./inc/purge/purge-inact.php:55: // @TODO Rewrite these if() blocks to a filter
./inc/revision-functions.php:169:// @TODO This function does also set and get in 'cache_array'
-./inc/template-functions.php:1080: // @TODO Deprecate this thing
-./inc/template-functions.php:1091: // @TODO Deprecate this thing
-./inc/template-functions.php:1181: // @TODO This can be easily moved out after the merge from EL branch to this is complete
-./inc/template-functions.php:1214: // @TODO Add a little more infos here
-./inc/template-functions.php:1543:// @TODO Lame description for this function
-./inc/template-functions.php:1565: // @TODO Move this in a filter
+./inc/template-functions.php:1083: // @TODO Deprecate this thing
+./inc/template-functions.php:1094: // @TODO Deprecate this thing
+./inc/template-functions.php:1184: // @TODO This can be easily moved out after the merge from EL branch to this is complete
+./inc/template-functions.php:1217: // @TODO Add a little more infos here
+./inc/template-functions.php:1546:// @TODO Lame description for this function
+./inc/template-functions.php:1568: // @TODO Move this in a filter
./inc/template-functions.php:193: * @TODO On some pages this is buggy
./inc/template-functions.php:281: // @TODO Remove these sanity checks if all is fine
-./inc/template-functions.php:608:// @TODO $simple/$constants are deprecated
-./inc/wrapper-functions.php:512:// @TODO Do some more sanity check here
+./inc/template-functions.php:611:// @TODO $simple/$constants are deprecated
+./inc/wrapper-functions.php:485:// @TODO Do some more sanity check here
./inc/xml-functions.php:189: // @TODO Handle characters
./mailid.php:139: // @TODO Rewrite this to a filter
./mailid.php:96: // @TODO Rewrite this to a filter
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 09/25/2004 *
+ * =================== Last change: 09/25/2004 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : ext- *
+ * -------------------------------------------------------------------- *
+ * Short description : *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * For more information visit: http://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 (!defined('__SECURITY')) {
+ die();
+} // END - if
+
+// Version number
+setThisExtensionVersion('0.0.0');
+
+// Version history array (add more with , '0.0.1' and so on)
+setExtensionVersionHistory(array('0.0.0'));
+
+// This extension is in development (non-productive)
+enableExtensionProductive(false);
+
+switch (getExtensionMode()) {
+ case 'register': // Do stuff when installation is running
+ // SQL commands to run
+
+ // Register module
+ //addModuleSql('foo','Y','Y','N','N');
+ break;
+
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ break;
+
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='foo' LIMIT 1");
+ break;
+
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='Y' WHERE `module`='foo' LIMIT 1");
+ break;
+
+ case 'update': // Update an extension
+ switch (getCurrentExtensionVersion()) {
+ case '0.0.1': // SQL queries for v0.0.1
+ addExtensionSql('');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes('');
+ break;
+ } // END - switch
+ break;
+
+ case 'modify': // When the extension got modified
+ break;
+
+ case 'test': // For testing purposes
+ break;
+
+ case 'init': // Do stuff when extension is initialized
+ break;
+
+ default: // Unknown extension mode
+ logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
+ break;
+} // END - switch
+
+// [EOF]
+?>
$mail->Subject = $subject;
if ((isExtensionActive('html_mail')) && (secureString($message) != $message)) {
$mail->Body = $message;
- $mail->AltBody = 'Your mail program required HTML support to read this mail!';
+ $mail->AltBody = decodeEntities($message);
$mail->WordWrap = 70;
$mail->IsHTML(true);
} else {
- $mail->Body = decodeEntities($message);
+ $mail->Body = decodeEntities(strip_tags($message));
}
$mail->AddAddress($toEmail, '');
return $isBroken;
}
+// Extract host from script name
+function extractHostnameFromUrl (&$script) {
+ // Use default SERVER_URL by default... ;) So?
+ $url = getServerUrl();
+
+ // Is this URL valid?
+ if (substr($script, 0, 7) == 'http://') {
+ // Use the hostname from script URL as new hostname
+ $url = substr($script, 7);
+ $extract = explode('/', $url);
+ $url = $extract[0];
+ // Done extracting the URL :)
+ } // END - if
+
+ // Extract host name
+ $host = str_replace('http://', '', $url);
+ if (isInString('/', $host)) {
+ $host = substr($host, 0, strpos($host, '/'));
+ } // END - if
+
+ // Generate relative URL
+ //* DEBUG: */ debugOutput('SCRIPT=' . $script);
+ if (substr(strtolower($script), 0, 7) == 'http://') {
+ // But only if http:// is in front!
+ $script = substr($script, (strlen($url) + 7));
+ } elseif (substr(strtolower($script), 0, 8) == 'https://') {
+ // Does this work?!
+ $script = substr($script, (strlen($url) + 8));
+ }
+
+ //* DEBUG: */ debugOutput('SCRIPT=' . $script);
+ if (substr($script, 0, 1) == '/') {
+ $script = substr($script, 1);
+ } // END - if
+
+ // Return host name
+ return $host;
+}
+
+// Adds a HTTP header to array
+function addHttpHeader ($header) {
+ // Send the header
+ //* DEBUG: */ logDebugMessage(__FUNCTION__ . ': header=' . $header);
+ $GLOBALS['http_header'][] = trim($header);
+}
+
+// Flushes all HTTP headers
+function flushHttpHeaders () {
+ // Is the header already sent?
+ if (headers_sent()) {
+ // Then abort here
+ debug_report_bug(__FUNCTION__, __LINE__, 'Headers already sent!');
+ } // END - if
+
+ // Flush all headers if found
+ if ((isset($GLOBALS['http_header'])) && (is_array($GLOBALS['http_header']))) {
+ foreach ($GLOBALS['http_header'] as $header) {
+ header($header);
+ } // END - foreach
+ } // END - if
+
+ // Mark them as flushed
+ $GLOBALS['http_header'] = array();
+}
+
//-----------------------------------------------------------------------------
// Automatically re-created functions, all taken from user comments on www.php.net
//-----------------------------------------------------------------------------
}
} // END - if
-// Extract host from script name
-function extractHostnameFromUrl (&$script) {
- // Use default SERVER_URL by default... ;) So?
- $url = getServerUrl();
-
- // Is this URL valid?
- if (substr($script, 0, 7) == 'http://') {
- // Use the hostname from script URL as new hostname
- $url = substr($script, 7);
- $extract = explode('/', $url);
- $url = $extract[0];
- // Done extracting the URL :)
- } // END - if
-
- // Extract host name
- $host = str_replace('http://', '', $url);
- if (isInString('/', $host)) {
- $host = substr($host, 0, strpos($host, '/'));
- } // END - if
-
- // Generate relative URL
- //* DEBUG: */ debugOutput('SCRIPT=' . $script);
- if (substr(strtolower($script), 0, 7) == 'http://') {
- // But only if http:// is in front!
- $script = substr($script, (strlen($url) + 7));
- } elseif (substr(strtolower($script), 0, 8) == 'https://') {
- // Does this work?!
- $script = substr($script, (strlen($url) + 8));
- }
-
- //* DEBUG: */ debugOutput('SCRIPT=' . $script);
- if (substr($script, 0, 1) == '/') {
- $script = substr($script, 1);
- } // END - if
-
- // Return host name
- return $host;
-}
-
-// Adds a HTTP header to array
-function addHttpHeader ($header) {
- // Send the header
- //* DEBUG: */ logDebugMessage(__FUNCTION__ . ': header=' . $header);
- $GLOBALS['http_header'][] = trim($header);
-}
-
-// Flushes all HTTP headers
-function flushHttpHeaders () {
- // Is the header already sent?
- if (headers_sent()) {
- // Then abort here
- debug_report_bug(__FUNCTION__, __LINE__, 'Headers already sent!');
- } // END - if
-
- // Flush all headers if found
- if ((isset($GLOBALS['http_header'])) && (is_array($GLOBALS['http_header']))) {
- foreach ($GLOBALS['http_header'] as $header) {
- header($header);
- } // END - foreach
- } // END - if
-
- // Mark them as flushed
- $GLOBALS['http_header'] = array();
-}
-
// [EOF]
?>
* @link http://de.php.net/manual/en/function.floatval.php#92563
*/
function parseFloat ($floatString){
- $LocaleInfo = localeconv();
- $floatString = str_replace($LocaleInfo['mon_thousands_sep'] , '', $floatString);
- $floatString = str_replace($LocaleInfo['mon_decimal_point'] , '.', $floatString);
- return floatval($floatString);
+ // Load locale info
+ $LocaleInfo = localeconv();
+
+ // Remove thousand separators
+ $floatString = str_replace($LocaleInfo['mon_thousands_sep'] , '' , $floatString);
+
+ // Convert decimal point
+ $floatString = str_replace($LocaleInfo['mon_decimal_point'] , '.', $floatString);
+
+ // Return float value of converted string
+ return floatval($floatString);
}
// Generates a YES/NO option list from given default
--- /dev/null
+<div class="para">
+ Diese Erweiterung schickt per "Ping" (HTTP-POST) an ein Script
+ von meinem <a href="http://blog.mxchange.org/" rel="external"
+ title="Mein vom Netz gegangener Blog">ehemaligen Blog</a> die anfragende
+ IP-Nummer, die Browserbezeichnung und ein verdecktes Feld in der Anmeldung,
+ das per Filter hinzugefügt wurde, wenn das verdeckte Feld
+ ausgefüllt sein sollte.
+</div>
+
+<div class="para">
+ Das verdeckte Feld hat im Gegensatz zum CPR-Plugin (<u>C/<u>omments
+ <u>P</u>ost <u>R</u>ewriter) einen Zufallsanteil, um dem Spambot das
+ Erkennen des Feldes durch Mustererkennung zu erschweren. Da für das
+ sich anmeldende Mitglied das verdeckte Feld nicht sichtbar ist (dies ist
+ durch per Zufall ausgewählte Möglichkeit realisiert und somit dem
+ Spambot dies weiter erschwert), kann mit hoher Wahrscheinlichkeit erkannt
+ werden, dass die IP-Nummer einem Spammer gehört.
+</div>
+
+<div class="para">
+ Sollten die spam-erkannten Zugriffe durch die IP-Nummer einen einstellbaren
+ Schwellwert überschritten haben, wird diese IP-Nummer ganz blockiert.
+</div>
+
+<div class="para">
+ Das "Ping-Script" selbst liefert nur eine neutrale Antwort und
+ Zusatzkopfzeilen HTTP-konform zurück bzw. diverse Fehlercodes. Mehr
+ dazu und alle vom Ping-Script zurückgegebenen Fehlercodes entnehmen Sie
+ bitte der beigefügten README.txt Datei unter
+ <strong>DOCS/de/cprping/README.txt</strong> (diese ist noch nicht vorhanden,
+ ich weis).
+</div>