X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fremoveip_functions.php;h=84cf2ce3ae04d2b9a90e62d7bb77767636725e5f;hb=83ffd5a3c526a1119e9db6dfd98199f72f5788d5;hp=e3b69e9e8b0a34cbffebf638a538d4ae684f0ef2;hpb=f9a9c09e1ae257449bfd98f8854e321efba1dc3c;p=mailer.git diff --git a/inc/libs/removeip_functions.php b/inc/libs/removeip_functions.php index e3b69e9e8b..84cf2ce3ae 100644 --- a/inc/libs/removeip_functions.php +++ b/inc/libs/removeip_functions.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Spezielle Funktion fuer removeip-Erweiterung * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -33,14 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); } // "Getter" for anonymous remote IP number function GET_ANONYMOUS_REMOTE_ADDR ($remoteAddr) { // Is config enabled? - if (getConfig('removeip_anon_ip') == "Y") { + if (getConfig('removeip_anon_ip') == 'Y') { // Switch way do we like? switch (getConfig('anonymous_ip')) { case "127.0.0.1": // mod_removeip style @@ -49,7 +54,7 @@ function GET_ANONYMOUS_REMOTE_ADDR ($remoteAddr) { break; case "RANDOM": // Pseudo-random IP number - $remoteAddr = mt_rand(1,254).".".mt_rand(0,254).".".mt_rand(0,254).".".mt_rand(1,254); + $remoteAddr = mt_rand(1,254).'.'.mt_rand(0,254).'.'.mt_rand(0,254).'.'.mt_rand(1,254); break; } // END - switch } // END - if @@ -60,7 +65,7 @@ function GET_ANONYMOUS_REMOTE_ADDR ($remoteAddr) { // "Getter" for anonymous remote hostname function GET_ANONYMOUS_REMOTE_HOST ($remoteHost) { // Is config enabled? - if (getConfig('removeip_anon_host') == "Y") { + if (getConfig('removeip_anon_host') == 'Y') { // Set anon hostname $remoteHost = "localhost.localnet"; } // END - if @@ -71,9 +76,9 @@ function GET_ANONYMOUS_REMOTE_HOST ($remoteHost) { // "Getter" for anonymous user agent function GET_ANONYMOUS_USER_AGENT ($userAgent) { // Is config enabled? - if (getConfig('removeip_anon_ua') == "Y") { + if (getConfig('removeip_anon_ua') == 'Y') { // Set anon user agent - $userAgent = "-"; + $userAgent = '-'; } // END - if // Return it @@ -82,9 +87,9 @@ function GET_ANONYMOUS_USER_AGENT ($userAgent) { // "Getter" for anonymous referer function GET_ANONYMOUS_REFERER ($referer) { // Is config enabled? - if (getConfig('removeip_anon_ref') == "Y") { + if (getConfig('removeip_anon_ref') == 'Y') { // Set anon user agent - $referer = "-"; + $referer = '-'; } // END - if // Return it @@ -96,10 +101,10 @@ function REMOVEIP_ADD_INFOS () { $anonymity = 0; // Is some data anonymized? - if (getConfig('removeip_anon_ip') == "Y") $anonymity++; - if (getConfig('removeip_anon_host') == "Y") $anonymity++; - if (getConfig('removeip_anon_ua') == "Y") $anonymity++; - if (getConfig('removeip_anon_ref') == "Y") $anonymity++; + if (getConfig('removeip_anon_ip') == 'Y') $anonymity++; + if (getConfig('removeip_anon_host') == 'Y') $anonymity++; + if (getConfig('removeip_anon_ua') == 'Y') $anonymity++; + if (getConfig('removeip_anon_ref') == 'Y') $anonymity++; // Calculate anonymity level $level = round($anonymity / 4 * 3); @@ -140,5 +145,20 @@ function REMOVEIP_ADD_INFOS () { return LOAD_TEMPLATE("removeip_level", true, $message); } +// Filter for adding anonymity notice to the output stream +function FILTER_ADD_ANONYMITY_NOTICE ($data) { + // Init content + $content = $data; + + // Extension removeip activated? + if ((EXT_IS_ACTIVE('removeip')) && (getConfig('removeip_'.strtolower($data['access_level']).'_show') == 'Y')) { + // Add anoymity/privacy infos + $content['content'] .= REMOVEIP_ADD_INFOS()."
\n"; + } // END - if + + // Return it + return $content; +} + // ?>