inc/extensions/ext-rallye.php -text
inc/extensions/ext-refback.php -text
inc/extensions/ext-register.php -text
+inc/extensions/ext-removeip.php -text
inc/extensions/ext-repair.php -text
inc/extensions/ext-rewrite.php -text
inc/extensions/ext-safe.php -text
inc/language/rallye_de.php -text
inc/language/refback_de.php -text
inc/language/register_de.php -text
+inc/language/removeip_de.php -text
inc/language/repair_de.php -text
inc/language/rewrite_de.php -text
inc/language/sponsor_de.php -text
inc/libs/rallye_functions.php -text
inc/libs/refback_functions.php -text
inc/libs/register_functions.php -text
+inc/libs/removeip_functions.php -text
inc/libs/rewrite_functions.php -text
inc/libs/security_functions.php -text
inc/libs/sponsor_functions.php -text
inc/modules/admin/what-config_reg.php -text
inc/modules/admin/what-config_register.php -text
inc/modules/admin/what-config_register2.php -text
+inc/modules/admin/what-config_removeip.php -text
inc/modules/admin/what-config_rewrite.php -text
inc/modules/admin/what-config_secure.php -text
inc/modules/admin/what-config_session.php -text
templates/de/html/admin/admin_config_reg_pro.tpl -text
templates/de/html/admin/admin_config_register.tpl -text
templates/de/html/admin/admin_config_register2.tpl -text
+templates/de/html/admin/admin_config_removeip.tpl -text
templates/de/html/admin/admin_config_rewrite.tpl -text
templates/de/html/admin/admin_config_rewrite_rows.tpl -text
templates/de/html/admin/admin_config_secure.tpl -text
templates/de/html/ext/ext_rallye.tpl -text
templates/de/html/ext/ext_refback.tpl -text
templates/de/html/ext/ext_register.tpl -text
+templates/de/html/ext/ext_removeip.tpl -text
templates/de/html/ext/ext_repair.tpl -text
templates/de/html/ext/ext_rewrite.tpl -text
templates/de/html/ext/ext_safe.tpl -text
templates/de/html/rallye/rallye_test.tpl -text
templates/de/html/redirect_url.tpl -text
templates/de/html/register_header.tpl -text
+templates/de/html/removeip_level.tpl -text
templates/de/html/runtime_fatal_row.tpl -text
templates/de/html/runtime_fatal_table.tpl -text
templates/de/html/show_bonus.tpl -text
// Check for last entry for userid w/o IP number
$result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_beg_ips WHERE (timeout > (UNIX_TIMESTAMP() - ".$_CONFIG['beg_timeout'].") OR (timeout > (UNIX_TIMESTAMP() - ".$_CONFIG['beg_uid_timeout'].") AND userid=%s)) AND remote_ip='%s' LIMIT 1",
- array($uid, getenv('REMOTE_ADDR')), __FILE__, __LINE__);
+ array($uid, GET_REMOTE_ADDR()), __FILE__, __LINE__);
if ((SQL_NUMROWS($result) == 0) && ($points > 0) && (!$login)) {
// Free memory
SQL_FREERESULT($result);
// but only when there is no admin begging.
// Admins shall be able to test it!
$result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_beg_ips (userid, remote_ip, timeout) VALUES('%s','%s', UNIX_TIMESTAMP())",
- array($uid, getenv('REMOTE_ADDR')), __FILE__, __LINE__);
+ array($uid, GET_REMOTE_ADDR()), __FILE__, __LINE__);
}
// Set mode depending on how many mails the member has to confirm
{
// Enough points are left so let's continue with the doubling process
// Create doubling "account" width *DOUBLED* points
- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s','%s','%s','".$_SERVER['REMOTE_ADDR']."', UNIX_TIMESTAMP(), 'N','N')",
+ $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s','%s','%s','".GET_REMOTE_ADDR()."', UNIX_TIMESTAMP(), 'N','N')",
array($uid, bigintval($GLOBALS['refid']), bigintval($_POST['points'] * 2)), __FILE__, __LINE__);
// Subtract entered points
// Add second line for the referral but only when uid != refid
if (($GLOBALS['refid'] > 0) && ($GLOBALS['refid'] != $uid)) {
// Okay add a refid line and apply refid percents
- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid,refid,points,remote_ip,timemark,completed,is_ref) VALUES ('%s',0,'%s','".$_SERVER['REMOTE_ADDR']."',UNIX_TIMESTAMP(),'N','Y')",
+ $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid,refid,points,remote_ip,timemark,completed,is_ref) VALUES ('%s',0,'%s','".GET_REMOTE_ADDR()."',UNIX_TIMESTAMP(),'N','Y')",
array(bigintval($GLOBALS['refid']), bigintval($_POST['points'] * 2 * $_CONFIG['doubler_ref'])), __FILE__, __LINE__);
// And that's why we dont't want to you more than one referral level of doubler-points. ^^^
define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "428");
+define('CURR_SVN_REVISION', "429");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):mode={$EXT_LOAD_MODE}<br />\n";
- // Remove cache file(s) if extension is active
- if (((EXT_IS_ACTIVE("cache")) || (GET_EXT_VERSION("cache") != "")) && (((SQL_AFFECTEDROWS() == 1) && ($EXT_LOAD_MODE == "remove")) || ($sqlRan === true))) {
- //* DEBUG: */ echo __LINE__.": DESTROY!<br />\n";
- // Remove cache files
- if ($cacheInstance->cache_file("extensions", true)) $cacheInstance->cache_destroy();
- if ($cacheInstance->cache_file("mod_reg", true)) $cacheInstance->cache_destroy();
- if ($cacheInstance->cache_file("config", true)) $cacheInstance->cache_destroy();
-
- // @TODO This causes the whole (!) menu cache being purged
- CACHE_PURGE_ADMIN_MENU();
- } // END - if
-
// Is this the sql_patches?
//* DEBUG: */ echo __LINE__.": {$id}/{$ext_name}/{$EXT_LOAD_MODE}<br />\n";
if (($ext_name == "sql_patches") && (($EXT_LOAD_MODE == "register") || ($EXT_LOAD_MODE == "remove"))) {
LOAD_URL("modules.php?module=admin&logout=1&".$EXT_LOAD_MODE."=sql_patches");
} // END - if
} // END - if
+
+ // Remove cache file(s) if extension is active
+ if (((EXT_IS_ACTIVE("cache")) || (GET_EXT_VERSION("cache") != "")) && (((SQL_AFFECTEDROWS() == 1)) || ($sqlRan === true) || ($EXT_LOAD_MODE == "activate") || ($EXT_LOAD_MODE == "deactivate"))) {
+ //* DEBUG: */ echo __LINE__.": DESTROY!<br />\n";
+ // Remove cache files
+ if ($cacheInstance->cache_file("extensions", true)) $cacheInstance->cache_destroy();
+ if ($cacheInstance->cache_file("mod_reg", true)) $cacheInstance->cache_destroy();
+ if ($cacheInstance->cache_file("config", true)) $cacheInstance->cache_destroy();
+
+ // @TODO This causes the whole (!) menu cache being purged
+ CACHE_PURGE_ADMIN_MENU();
+ } // END - if
}
// Check if given extension is active
function EXT_IS_ACTIVE ($ext_name) {
// Extension was not found!
return false;
}
+
+ // Load entry
list($active) = SQL_FETCHROW($result);
- //* DEBUG: */ echo $ext_name."[DB]: {$active}<br />\n";
+
+ // Free result
SQL_FREERESULT($result);
+
// Write cache array
+ //* DEBUG: */ echo $ext_name."[DB]: {$active}<br />\n";
$cacheArray['extensions']['ext_active'][$ext_name] = $active;
} else {
// Extension not active!
// Language file prefix
$EXT_LANG_PREFIX = "xxx";
-// Extension is always active?
-$EXT_ALWAYS_ACTIVE = 'N';
-
//
?>
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 09/30/2008 *
+ * ================ Last change: 09/30/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : ext-removeip.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Anonymizes the IP number of your visitors *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Anomymiziert die IP-Nummer Ihrer Besucher *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * 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 (!defined('__SECURITY')) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+}
+
+// Version number
+$EXT_VERSION = "0.0";
+
+// Auto-set extension version
+if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;
+
+// Version history array (add more with , "0.1" and so on)
+$EXT_VER_HISTORY = array("0.0");
+
+switch ($EXT_LOAD_MODE)
+{
+case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `removeip_anon_ip` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `removeip_anon_host` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `removeip_anon_ua` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `removeip_anon_ref` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `removeip_admin_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `removeip_guest_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `removeip_member_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `removeip_sponsor_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `anonymous_ip` ENUM('127.0.0.1','0.0.0.0','RANDOM') NOT NULL DEFAULT '127.0.0.1'";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES('setup','config_removeip','Anonymität/Privatsphähre','Stellen Sie hier ein, ob die IP-Nummer, User-Agent und/oder Referer-Adresse anonymisiert im gesamten Script verwendet werden soll.',15)";
+ break;
+
+case "remove": // Do stuff when removing extension
+ // SQL commands to run
+ $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_removeip' LIMIT 1";
+ break;
+
+case "activate": // Do stuff when admin activates this extension
+ // SQL commands to run
+ break;
+
+case "deactivate": // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ break;
+
+case "update": // Update an extension
+ switch ($EXT_VER)
+ {
+ case "0.0.1": // SQL queries for v0.0.1
+ $SQLs[] = "";
+
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "";
+ break;
+ }
+ break;
+
+default: // Do stuff when extension is loaded
+ break;
+}
+
+// Language file prefix
+$EXT_LANG_PREFIX = "removeip";
+
+//
+?>
// No longer used: $MAIN_TITLE = MAIN_TITLE; $URL = URL; $WEBMASTER = WEBMASTER;
// Prepare IP number and User Agent
- $REMOTE_ADDR = getenv('REMOTE_ADDR');
- $HTTP_USER_AGENT = getenv('HTTP_USER_AGENT');
+ $REMOTE_ADDR = GET_REMOTE_ADDR();
+ $HTTP_USER_AGENT = GET_USER_AGENT();
// Default admin
$ADMIN = MAIN_TITLE;
if (((!defined('__COOKIES')) || (!__COOKIES)) && ($addUrlData)) $URL = ADD_URL_DATA($URL);
// Probe for bot from search engine
- if ((eregi("spider", getenv('HTTP_USER_AGENT'))) || (eregi("bot", getenv('HTTP_USER_AGENT'))) || (eregi("spider", getenv('HTTP_USER_AGENT')))) {
+ if ((eregi("spider", GET_USER_AGENT())) || (eregi("bot", GET_USER_AGENT())) || (eregi("spider", GET_USER_AGENT()))) {
// Search engine bot detected so let's rewrite many chars for the link
$URL = htmlentities(strip_tags($URL), ENT_QUOTES);
if (!defined('_MAX')) define('_MAX', 15235);
// Build server string
- $server = $_SERVER['PHP_SELF'].":".getenv('HTTP_USER_AGENT').":".getenv('SERVER_SOFTWARE').":".getenv('REMOTE_ADDR').":".":".filemtime(PATH."inc/databases.php");
+ $server = $_SERVER['PHP_SELF'].":".GET_USER_AGENT().":".getenv('SERVER_SOFTWARE').":".GET_REMOTE_ADDR().":".":".filemtime(PATH."inc/databases.php");
// Build key string
$keys = SITE_KEY.":".DATE_KEY;
// When the salt is empty build a new one, else use the first x configured characters as the salt
if (empty($salt)) {
// Build server string
- $server = $_SERVER['PHP_SELF'].":".getenv('HTTP_USER_AGENT').":".getenv('SERVER_SOFTWARE').":".getenv('REMOTE_ADDR').":".":".filemtime(PATH."inc/databases.php");
+ $server = $_SERVER['PHP_SELF'].":".GET_USER_AGENT().":".getenv('SERVER_SOFTWARE').":".GET_REMOTE_ADDR().":".":".filemtime(PATH."inc/databases.php");
// Build key string
$keys = SITE_KEY.":".DATE_KEY.":".$_CONFIG['secret_key'].":".$_CONFIG['file_hash'].":".date("d-m-Y (l-F-T)", bigintval($_CONFIG['patch_ctime'])).":".$_CONFIG['master_salt'];
}
// Rebuild cache
function REBUILD_CACHE ($cache, $inc="") {
- global $cacheInstance;
+ global $cacheInstance, $_CONFIG, $CSS;
// Shall I remove the cache file?
if ((EXT_IS_ACTIVE("cache")) && (is_object($cacheInstance))) {
if ($cacheInstance->cache_file($cache, true)) {
// Destroy it
$cacheInstance->cache_destroy();
+ } // END - if
- // Include file given?
- if (!empty($inc)) {
- // Construct FQFN
- $fqfn = sprintf("%sinc/loader/load_cache-%s.php", PATH, $inc);
-
- // Is the include there?
- if (FILE_READABLE($fqfn)) {
- // And rebuild it from scratch
- require_once($fqfn);
- } else {
- // Include not found!
- DEBUG_LOG(__FUNCTION__.":Include {$inc} not found. cache={$cache}");
- }
- } // END - if
+ // Include file given?
+ if (!empty($inc)) {
+ // Construct FQFN
+ $fqfn = sprintf("%sinc/loader/load_cache-%s.php", PATH, $inc);
+
+ // Is the include there?
+ if (FILE_READABLE($fqfn)) {
+ // And rebuild it from scratch
+ require($fqfn);
+ } else {
+ // Include not found!
+ DEBUG_LOG(__FUNCTION__.":Include {$inc} not found. cache={$cache}");
+ }
} // END - if
} // END - if
}
// Return "translation"
return $translated;
}
+// "Getter" for remote IP number
+function GET_REMOTE_ADDR () {
+ // Get remote ip from environment
+ $remoteAddr = getenv('REMOTE_ADDR');
+
+ // Is removeip installed?
+ if (EXT_IS_ACTIVE("removeip")) {
+ // Then anonymize it
+ $remoteAddr = GET_ANONYMOUS_REMOTE_ADDR($remoteAddr);
+ } // END - if
+
+ // Return it
+ return $remoteAddr;
+}
+// "Getter" for remote hostname
+function GET_REMOTE_HOST () {
+ // Get remote ip from environment
+ $remoteHost = getenv('REMOTE_HOST');
+
+ // Is removeip installed?
+ if (EXT_IS_ACTIVE("removeip")) {
+ // Then anonymize it
+ $remoteHost = GET_ANONYMOUS_REMOTE_HOST($remoteHost);
+ } // END - if
+
+ // Return it
+ return $remoteHost;
+}
+// "Getter" for user agent
+function GET_USER_AGENT () {
+ // Get remote ip from environment
+ $userAgent = getenv('HTTP_USER_AGENT');
+
+ // Is removeip installed?
+ if (EXT_IS_ACTIVE("removeip")) {
+ // Then anonymize it
+ $userAgent = GET_ANONYMOUS_USER_AGENT($userAgent);
+ } // END - if
+
+ // Return it
+ return $userAgent;
+}
+// "Getter" for referer
+function GET_REFERER () {
+ // Get remote ip from environment
+ $referer = getenv('HTTP_REFERER');
+
+ // Is removeip installed?
+ if (EXT_IS_ACTIVE("removeip")) {
+ // Then anonymize it
+ $referer = GET_ANONYMOUS_REFERER($referer);
+ } // END - if
+
+ // Return it
+ return $referer;
+}
//
//////////////////////////////////////////////////
// //
define('HIGHER', "Höher");
define('LOWER', "Niedriger");
define('MEMBER_SETTINGS_SAVED', "Einstellungen gespeichert.");
-define('REMOTE_ADDR_TIMEOUT', "Ein Mitglied ist mit Ihrer IP-Nummer <U>".getenv('REMOTE_ADDR')."</U> bereits registriert! Bitte kontaktieren Sie uns, wenn dies ein Fehler sein sollte!");
+define('REMOTE_ADDR_TIMEOUT', "Ein Mitglied ist mit Ihrer IP-Nummer <U>".GET_REMOTE_ADDR()."</U> bereits registriert! Bitte kontaktieren Sie uns, wenn dies ein Fehler sein sollte!");
define('IP_TIMEOUT', "IP-Zeitsperre");
define('ADMIN_PAYOUT_NOT_INSTALLED', "payout-Erweiterung nicht installiert!");
define('ADMIN_WERNIS_NOT_INSTALLED', "wernis-Erweiterung nicht installiert!");
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 10/01/2008 *
+ * =============== Last change: 10/01/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : removeip_de.php *
+ * -------------------------------------------------------------------- *
+ * Short description : German langugage support *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Deutsche Sprachunterstuetzung *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * 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 (!defined('__SECURITY')) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+}
+
+// Language definitions
+define('ADMIN_CONFIG_REMOVEIP_TITLE', "Konfiguration zur Anonymität/Privatsphähre");
+define('ADMIN_CONFIG_REMOVEIP_ANON_IP', "IP-Nummer anonymisieren?<br /><span class=\"admin_note\">(Siehe dazu weiter unten)</span>");
+define('ADMIN_CONFIG_REMOVEIP_ANON_HOST', "Hostname anonymisieren?<br /><span class=\"admin_note\">(Dieser wird als <strong>localhost.localnet</strong> ausgegeben.)</span>");
+define('ADMIN_CONFIG_REMOVEIP_ANON_UA', "User-Agent anonymisieren?<br /><span class=\"admin_note\">(Dieser wird als Strich ausgegeben.)</span>");
+define('ADMIN_CONFIG_REMOVEIP_ANON_REF', "Referer anonymisieren?<br /><span class=\"admin_note\">(Dieser wird als Strich ausgegeben.)</span>");
+define('ADMIN_CONFIG_REMOVEIP_ANONYMOUS_IP', "Als was soll die anonymisierte IP-Nummer ausgegeben werden?");
+define('ADMIN_CONFIG_REMOVEIP_LOCAL', "127.0.0.1 (Lokal)");
+define('ADMIN_CONFIG_REMOVEIP_ZERO', "0.0.0.0 (Nicht existierend)");
+define('ADMIN_CONFIG_REMOVEIP_RANDOM', "???.???.???.??? (Pseudozufall)");
+define('ADMIN_CONFIG_REMOVEIP_ADMIN_SHOW', "Im Adminbereich Anonymitätslevel zeigen?");
+define('ADMIN_CONFIG_REMOVEIP_GUEST_SHOW', "Im Gastbereich Anonymitätslevel zeigen?");
+define('ADMIN_CONFIG_REMOVEIP_MEMBER_SHOW', "Im Mitgliedsbereich Anonymitätslevel zeigen?");
+define('ADMIN_CONFIG_REMOVEIP_SPONSOR_SHOW', "Im Sponsorbereich Anonymitätslevel zeigen?");
+
+// Anonymity levels
+define('REMOVEIP_UNKNOWN_LEVEL', "Unbekannte Anonymitätslevel <u>%s</u>");
+define('REMOVEIP_LEVEL_NONE', "Keine Anonymität");
+define('REMOVEIP_LEVEL_LOW', "Niedrige Anonymität");
+define('REMOVEIP_LEVEL_MEDIUM', "Mittlere Anonymität");
+define('REMOVEIP_LEVEL_HIGH', "Hohe Anonymität");
+
+//
+?>
}
}
- function cache_destroy()
- {
- if (FILE_READABLE($this->cache_inc))
- {
+ // Destroy an existing cache file
+ function cache_destroy() {
+ // Is the cache file there?
+ if (FILE_READABLE($this->cache_inc)) {
// Remove cache file from system
@unlink($this->cache_inc);
- if (!FILE_READABLE($this->cache_inc))
- {
+ if (!FILE_READABLE($this->cache_inc)) {
// Close cache automatically (we don't need it anymore!)
$this->cache_close();
- }
- else
- {
+ } else {
// Not removed!
ADD_FATAL(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_UNLINK_1.$this->cache_inc.CACHE_CANNOT_UNLINK_2);
}
- }
- else
- {
+ } else {
// Does not exist!
ADD_FATAL(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_UNLINK_1.$this->cache_inc.CACHE_CANNOT_UNLINK_2);
}
'id' => $id,
);
- if (($_POST['cat'][$id] == "Y") || (($_CONFIG['register_default'] == "Y") && (empty($_POST['cat'][$id]))))
- {
- $content['def_y'] = " checked";
- }
- else
- {
- $content['def_n'] = " checked";
+ if (($_POST['cat'][$id] == "Y") || (($_CONFIG['register_default'] == "Y") && (empty($_POST['cat'][$id])))) {
+ $content['def_y'] = " checked=\"checked\"";
+ } else {
+ $content['def_n'] = " checked=\"checked\"";
}
// Load template and switch color
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 10/01/2008 *
+ * =============== Last change: 10/01/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : removeip_functions.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Special functions for removeip extension *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Spezielle Funktion fuer removeip-Erweiterung *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * 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 (!defined('__SECURITY')) {
+ $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) {
+ global $_CONFIG;
+
+ // Is config enabled?
+ if ($_CONFIG['removeip_anon_ip'] == "Y") {
+ // Switch way do we like?
+ switch ($_CONFIG['anonymous_ip']) {
+ case "127.0.0.1": // mod_removeip style
+ case "0.0.0.0": // Some people may prefer this...
+ $remoteAddr = $_CONFIG['anonymous_ip'];
+ break;
+
+ case "RANDOM": // Pseudo-random IP number
+ $remoteAddr = mt_rand(1,254).".".mt_rand(0,254).".".mt_rand(0,254).".".mt_rand(1,254);
+ break;
+ } // END - switch
+ } // END - if
+
+ // Return it
+ return $remoteAddr;
+}
+// "Getter" for anonymous remote hostname
+function GET_ANONYMOUS_REMOTE_HOST ($remoteHost) {
+ global $_CONFIG;
+
+ // Is config enabled?
+ if ($_CONFIG['removeip_anon_host'] == "Y") {
+ // Set anon hostname
+ $remoteHost = "localhost.localnet";
+ } // END - if
+
+ // Return it
+ return $remoteHost;
+}
+// "Getter" for anonymous user agent
+function GET_ANONYMOUS_USER_AGENT ($userAgent) {
+ global $_CONFIG;
+
+ // Is config enabled?
+ if ($_CONFIG['removeip_anon_ua'] == "Y") {
+ // Set anon user agent
+ $userAgent = "-";
+ } // END - if
+
+ // Return it
+ return $userAgent;
+}
+// "Getter" for anonymous referer
+function GET_ANONYMOUS_REFERER ($referer) {
+ global $_CONFIG;
+
+ // Is config enabled?
+ if ($_CONFIG['removeip_anon_ref'] == "Y") {
+ // Set anon user agent
+ $referer = "-";
+ } // END - if
+
+ // Return it
+ return $referer;
+}
+// Adds informations about anonymity/privacy to the menu
+function REMOVEIP_ADD_INFOS () {
+ global $_CONFIG;
+
+ // "Base-privacy" is by default low (we add more later)
+ $anonymity = 0;
+
+ // Is some data anonymized?
+ if ($_CONFIG['removeip_anon_ip'] == "Y") $anonymity++;
+ if ($_CONFIG['removeip_anon_host'] == "Y") $anonymity++;
+ if ($_CONFIG['removeip_anon_ua'] == "Y") $anonymity++;
+ if ($_CONFIG['removeip_anon_ref'] == "Y") $anonymity++;
+
+ // Calculate anonymity level
+ $level = round($anonymity / 4 * 3);
+
+ // Set constant name suffix depending on that level
+ $suffix = "unsupported_{$level}";
+ switch ($level) {
+ case 0:
+ $suffix = "none";
+ break;
+
+ case 1:
+ $suffix = "low";
+ break;
+
+ case 2:
+ $suffix = "medium";
+ break;
+
+ case 3: // High level
+ $suffix = "high";
+ break;
+ } // END - while
+
+ // Construct constant name
+ $constantName = strtoupper(sprintf("REMOVEIP_LEVEL_%s", $suffix));
+
+ // Default message
+ $message = sprintf(REMOVEIP_UNKNOWN_LEVEL, $suffix);
+
+ // Is that constant there?
+ if (defined($constantName)) {
+ // Use that string
+ $message = constant($constantName);
+ } // END - if
+
+ // Output message in template
+ return LOAD_TEMPLATE("removeip_level", true, $message);
+}
+
+//
+?>
// Generate hash code
$DATA['keys'][] = "hash";
- $DATA['values'][] = md5($_COOKIE['PHPSESSID'].":".$POST['email'].":".$_SERVER['REMOTE_ADDR'].":".$_SERVER['HTTP_USER_AGENT'].":".time());
+ $DATA['values'][] = md5($_COOKIE['PHPSESSID'].":".$POST['email'].":".GET_REMOTE_ADDR().":".GET_USER_AGENT().":".time());
$DATA['keys'][] = "remote_addr";
- $DATA['values'][] = $_SERVER['REMOTE_ADDR'];
+ $DATA['values'][] = GET_REMOTE_ADDR();
}
// Implode all data into strings
$SQL .= " status='EMAIL', hash='%s',";
// Generate hash code
- $HASH = md5($_COOKIE['PHPSESSID'].":".$POST['email'].":".$_SERVER['REMOTE_ADDR'].":".$_SERVER['HTTP_USER_AGENT'].":".time());
+ $HASH = md5($_COOKIE['PHPSESSID'].":".$POST['email'].":".GET_REMOTE_ADDR().":".GET_USER_AGENT().":".time());
$DATA[] = $HASH;
}
}
if (empty($_CONFIG['admin_menu'])) $_CONFIG['admin_menu'] = "OLD";
// Check for version and switch between old menu system and new "intelligent menu system"
- if ((ADMIN_CHECK_MENU_MODE() == "NEW") && (FILE_READABLE(PATH."inc/modules/admin/la_sys-inc.php"))) {
+ if ((ADMIN_CHECK_MENU_MODE() == "NEW") && (FILE_READABLE(PATH."inc/modules/admin/lasys-inc.php"))) {
// Default area is the entrance, of course
$area = "entrance";
// Check for similar URL variable
- if (!empty($_GET['area'])) $area = $_GET['area'];
+ if (!empty($_GET['area'])) $area = SQL_ESCAPE($_GET['area']);
// Load "logical-area menu-system" file
- require_once(PATH."inc/modules/admin/la_sys-inc.php");
+ require_once(PATH."inc/modules/admin/lasys-inc.php");
// Create new-style menu system will "logical areas"
ADMIN_LOGICAL_AREA_SYSTEM($area, $act, $GLOBALS['what']);
}
}
-if (isBooleanConstantAndTrue('admin_registered')) {
- // Check config.php and inc directory for right access rights
- // DEPRECATED: if (is_INCWritable("config")) ADD_FATAL(FATAL_CONFIG_WRITABLE);
- // DEPRECATED: if (is_INCWritable("dummy")) ADD_FATAL(FATAL_INC_WRITABLE);
-}
//
?>
}
//
-function ADMIN_DO_ACTION($wht)
-{
+function ADMIN_DO_ACTION($wht) {
global $menuDesription, $menuTitle, $_CONFIG, $cacheArray, $DATA, $DEPTH;
+
//* DEBUG: */ echo __LINE__."*".$wht."/".$GLOBALS['module']."/".$GLOBALS['action']."/".$GLOBALS['what']."*<br />\n";
- if (EXT_IS_ACTIVE("cache"))
- {
+ if (EXT_IS_ACTIVE("cache")) {
// Include cache instance
global $cacheInstance;
}
// Remove any spaces from variable
- if (empty($wht))
- {
+ if (empty($wht)) {
// Default admin action is the overview page
$wht = "overview";
- }
- else
- {
+ } else {
// Compile out some chars
$wht = COMPILE_CODE($wht, false, false, false);
}
LOAD_TEMPLATE("admin_main_header");
// Check if action/what pair is valid
- $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_admin_menu
+ $result_action = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_admin_menu
WHERE action='%s' AND ((what='%s' AND what != 'overview') OR ((what='' OR what IS NULL) AND '%s'='overview'))
LIMIT 1", array($act, $wht, $wht), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1)
- {
- // Free memory
- SQL_FREERESULT($result);
+ if (SQL_NUMROWS($result_action) == 1) {
// Is valid but does the inlcude file exists?
$INC = sprintf("%sinc/modules/admin/action-%s.php", PATH, $act);
- if ((FILE_READABLE($INC)) && (VALIDATE_MENU_ACTION("admin", $act, $wht)) && (__ACL_ALLOW == true))
- {
+ if ((FILE_READABLE($INC)) && (VALIDATE_MENU_ACTION("admin", $act, $wht)) && (__ACL_ALLOW == true)) {
// Ok, we finally load the admin action module
include($INC);
- }
- elseif (__ACL_ALLOW == false)
- {
+ } elseif (__ACL_ALLOW == false) {
// Access denied
LOAD_TEMPLATE("admin_menu_failed", false, ADMINS_ACCESS_DENIED);
ADD_FATAL(ADMINS_ACCESS_DENIED);
- }
- else
- {
+ } else {
// Include file not found! :-(
LOAD_TEMPLATE("admin_menu_failed", false, ADMIN_404_ACTION);
ADD_FATAL(ADMIN_404_ACTION_1.$act.ADMIN_404_ACTION_2);
ADD_FATAL(ADMIN_INVALID_ACTION_1.$act."/".$wht.ADMIN_INVALID_ACTION_2);
}
+ // Free memory
+ SQL_FREERESULT($result_action);
+
// Tableset footer
LOAD_TEMPLATE("admin_main_footer");
}
ADMIN_SAVE_SETTINGS($_POST);
} else {
// Setup constants for the template
- switch ($_CONFIG['autopurge_inactive'])
- {
- case 'Y': define('__YES_IN', " checked"); define('__NO_IN', ""); break;
- case 'N': define('__YES_IN', ""); define('__NO_IN', " checked"); break;
+ switch ($_CONFIG['autopurge_inactive']) {
+ case 'Y':
+ define('__YES_IN', " checked=\"checked\"");
+ define('__NO_IN' , "");
+ break;
+
+ case 'N':
+ define('__YES_IN', "");
+ define('__NO_IN' , " checked=\"checked\"");
+ break;
}
- switch ($_CONFIG['autopurge_unconfirmed'])
- {
- case 'Y': define('__YES_UN', " checked"); define('__NO_UN', ""); break;
- case 'N': define('__YES_UN', ""); define('__NO_UN', " checked"); break;
+
+ switch ($_CONFIG['autopurge_unconfirmed']) {
+ case 'Y':
+ define('__YES_UN', " checked=\"checked\"");
+ define('__NO_UN' , "");
+ break;
+
+ case 'N':
+ define('__YES_UN', "");
+ define('__NO_UN' , " checked=\"checked\"");
+ break;
}
+
define('__AP_IN_SINCE', $_CONFIG['ap_inactive_since']);
define('__AP_IN_TIME' , $_CONFIG['ap_in_time']);
define('__AP_UN_TIME' , $_CONFIG['ap_un_time']);
switch ($_CONFIG['admin_menu'])
{
case "NEW":
- define('__ADMIN_MENU_NEW', " checked");
+ define('__ADMIN_MENU_NEW', " checked=\"checked\"");
define('__ADMIN_MENU_OLD' , "");
break;
case "OLD":
define('__ADMIN_MENU_NEW', "");
- define('__ADMIN_MENU_OLD' , " checked");
+ define('__ADMIN_MENU_OLD' , " checked=\"checked\"");
break;
}
// Mail confirmation links
define('_CFG_AUTO_PURGE', CREATE_TIME_SELECTIONS($_CONFIG['auto_purge'], "auto_purge", "MWD"));
if ($_CONFIG['auto_purge_active'] == "N") {
- define('_CFG_AP_ACTIVE_N', " checked");
+ define('_CFG_AP_ACTIVE_N', " checked=\"checked\"");
define('_CFG_AP_ACTIVE_Y', "");
} else {
define('_CFG_AP_ACTIVE_N', "");
- define('_CFG_AP_ACTIVE_Y', " checked");
+ define('_CFG_AP_ACTIVE_Y', " checked=\"checked\"");
}
// Output template
switch ($_CONFIG['beg_rallye'])
{
case 'Y':
- define('__BEG_RALLYE_Y', " checked");
+ define('__BEG_RALLYE_Y', " checked=\"checked\"");
define('__BEG_RALLYE_N', "");
break;
case 'N':
define('__BEG_RALLYE_Y', "");
- define('__BEG_RALLYE_N', " checked");
+ define('__BEG_RALLYE_N', " checked=\"checked\"");
break;
}
switch ($_CONFIG['beg_active'])
{
case 'Y':
- define('__BEG_ACTIVE_Y', " checked");
+ define('__BEG_ACTIVE_Y', " checked=\"checked\"");
define('__BEG_ACTIVE_N', "");
break;
case 'N':
define('__BEG_ACTIVE_Y', "");
- define('__BEG_ACTIVE_N', " checked");
+ define('__BEG_ACTIVE_N', " checked=\"checked\"");
break;
}
switch ($_CONFIG['beg_mode'])
{
case "DIRECT":
- define('__BEG_MODE_DIRECT', " checked");
+ define('__BEG_MODE_DIRECT', " checked=\"checked\"");
define('__BEG_MODE_REF' , "");
break;
case "REF":
define('__BEG_MODE_DIRECT', "");
- define('__BEG_MODE_REF' , " checked");
+ define('__BEG_MODE_REF' , " checked=\"checked\"");
break;
}
switch ($_CONFIG['beg_ral_en_notify'])
{
case 'Y':
- define('__BEG_RAL_EN_NOTIFY_Y', " checked");
+ define('__BEG_RAL_EN_NOTIFY_Y', " checked=\"checked\"");
define('__BEG_RAL_EN_NOTIFY_N', "");
break;
case 'N':
define('__BEG_RAL_EN_NOTIFY_Y', "");
- define('__BEG_RAL_EN_NOTIFY_N', " checked");
+ define('__BEG_RAL_EN_NOTIFY_N', " checked=\"checked\"");
break;
}
switch ($_CONFIG['beg_ral_di_notify'])
{
case 'Y':
- define('__BEG_RAL_DI_NOTIFY_Y', " checked");
+ define('__BEG_RAL_DI_NOTIFY_Y', " checked=\"checked\"");
define('__BEG_RAL_DI_NOTIFY_N', "");
break;
case 'N':
define('__BEG_RAL_DI_NOTIFY_Y', "");
- define('__BEG_RAL_DI_NOTIFY_N', " checked");
+ define('__BEG_RAL_DI_NOTIFY_N', " checked=\"checked\"");
break;
}
switch ($_CONFIG['beg_new_mem_notify'])
{
case 'Y':
- define('__BEG_NEW_MEMBER_NOTIFY_Y', " checked");
+ define('__BEG_NEW_MEMBER_NOTIFY_Y', " checked=\"checked\"");
define('__BEG_NEW_MEMBER_NOTIFY_N', "");
break;
case 'N':
define('__BEG_NEW_MEMBER_NOTIFY_Y', "");
- define('__BEG_NEW_MEMBER_NOTIFY_N', " checked");
+ define('__BEG_NEW_MEMBER_NOTIFY_N', " checked=\"checked\"");
break;
}
switch ($_CONFIG['beg_include_own'])
{
case 'Y':
- define('__BEG_INCLUDE_OWN_Y', " checked");
+ define('__BEG_INCLUDE_OWN_Y', " checked=\"checked\"");
define('__BEG_INCLUDE_OWN_N', "");
break;
case 'N':
define('__BEG_INCLUDE_OWN_Y', "");
- define('__BEG_INCLUDE_OWN_N', " checked");
+ define('__BEG_INCLUDE_OWN_N', " checked=\"checked\"");
break;
}
switch ($_CONFIG['birthday_active'])
{
case 'Y':
- define('__BIRTHDAY_ACTIVE_Y', " checked");
+ define('__BIRTHDAY_ACTIVE_Y', " checked=\"checked\"");
define('__BIRTHDAY_ACTIVE_N', "");
break;
case 'N':
define('__BIRTHDAY_ACTIVE_Y', "");
- define('__BIRTHDAY_ACTIVE_N', " checked");
+ define('__BIRTHDAY_ACTIVE_N', " checked=\"checked\"");
break;
}
switch ($_CONFIG['birthday_mode'])
{
case "DIRECT":
- define('__BIRTHDAY_MODE_DIRECT', " checked");
+ define('__BIRTHDAY_MODE_DIRECT', " checked=\"checked\"");
define('__BIRTHDAY_MODE_REF' , "");
break;
case "REF":
define('__BIRTHDAY_MODE_DIRECT', "");
- define('__BIRTHDAY_MODE_REF' , " checked");
+ define('__BIRTHDAY_MODE_REF' , " checked=\"checked\"");
break;
}
switch ($_CONFIG['bonus_active'])
{
case 'Y':
- define('__BONUS_ACTIVE_Y', " checked");
+ define('__BONUS_ACTIVE_Y', " checked=\"checked\"");
define('__BONUS_ACTIVE_N', "");
break;
case 'N':
define('__BONUS_ACTIVE_Y', "");
- define('__BONUS_ACTIVE_N', " checked");
+ define('__BONUS_ACTIVE_N', " checked=\"checked\"");
break;
}
// Other bonus to de-/activate
switch ($_CONFIG['bonus_login_yn'])
{
case 'Y':
- define('__BONUS_LOGIN_Y', " checked");
+ define('__BONUS_LOGIN_Y', " checked=\"checked\"");
define('__BONUS_LOGIN_N', "");
break;
case 'N':
define('__BONUS_LOGIN_Y', "");
- define('__BONUS_LOGIN_N', " checked");
+ define('__BONUS_LOGIN_N', " checked=\"checked\"");
break;
}
switch ($_CONFIG['bonus_stats_yn'])
{
case 'Y':
- define('__BONUS_STATS_Y', " checked");
+ define('__BONUS_STATS_Y', " checked=\"checked\"");
define('__BONUS_STATS_N', "");
break;
case 'N':
define('__BONUS_STATS_Y', "");
- define('__BONUS_STATS_N', " checked");
+ define('__BONUS_STATS_N', " checked=\"checked\"");
break;
}
switch ($_CONFIG['bonus_order_yn'])
{
case 'Y':
- define('__BONUS_ORDER_Y', " checked");
+ define('__BONUS_ORDER_Y', " checked=\"checked\"");
define('__BONUS_ORDER_N', "");
break;
case 'N':
define('__BONUS_ORDER_Y', "");
- define('__BONUS_ORDER_N', " checked");
+ define('__BONUS_ORDER_N', " checked=\"checked\"");
break;
}
switch ($_CONFIG['bonus_ref_yn'])
{
case 'Y':
- define('__BONUS_REF_Y', " checked");
+ define('__BONUS_REF_Y', " checked=\"checked\"");
define('__BONUS_REF_N', "");
break;
case 'N':
define('__BONUS_REF_Y', "");
- define('__BONUS_REF_N', " checked");
+ define('__BONUS_REF_N', " checked=\"checked\"");
break;
}
switch ($_CONFIG['bonus_click_yn'])
{
case 'Y':
- define('__BONUS_CLICK_Y', " checked");
+ define('__BONUS_CLICK_Y', " checked=\"checked\"");
define('__BONUS_CLICK_N', "");
break;
case 'N':
define('__BONUS_CLICK_Y', "");
- define('__BONUS_CLICK_N', " checked");
+ define('__BONUS_CLICK_N', " checked=\"checked\"");
break;
}
switch ($_CONFIG['bonus_en_notify'])
{
case 'Y':
- define('__BONUS_EN_NOTIFY_Y', " checked");
+ define('__BONUS_EN_NOTIFY_Y', " checked=\"checked\"");
define('__BONUS_EN_NOTIFY_N', "");
break;
case 'N':
define('__BONUS_EN_NOTIFY_Y', "");
- define('__BONUS_EN_NOTIFY_N', " checked");
+ define('__BONUS_EN_NOTIFY_N', " checked=\"checked\"");
break;
}
switch ($_CONFIG['bonus_di_notify'])
{
case 'Y':
- define('__BONUS_DI_NOTIFY_Y', " checked");
+ define('__BONUS_DI_NOTIFY_Y', " checked=\"checked\"");
define('__BONUS_DI_NOTIFY_N', "");
break;
case 'N':
define('__BONUS_DI_NOTIFY_Y', "");
- define('__BONUS_DI_NOTIFY_N', " checked");
+ define('__BONUS_DI_NOTIFY_N', " checked=\"checked\"");
break;
}
switch ($_CONFIG['bonus_new_mem_notify'])
{
case 'Y':
- define('__BONUS_NEW_MEMBER_NOTIFY_Y', " checked");
+ define('__BONUS_NEW_MEMBER_NOTIFY_Y', " checked=\"checked\"");
define('__BONUS_NEW_MEMBER_NOTIFY_N', "");
break;
case 'N':
define('__BONUS_NEW_MEMBER_NOTIFY_Y', "");
- define('__BONUS_NEW_MEMBER_NOTIFY_N', " checked");
+ define('__BONUS_NEW_MEMBER_NOTIFY_N', " checked=\"checked\"");
break;
}
switch ($_CONFIG['bonus_include_own'])
{
case 'Y':
- define('__BONUS_INCLUDE_OWN_Y', " checked");
+ define('__BONUS_INCLUDE_OWN_Y', " checked=\"checked\"");
define('__BONUS_INCLUDE_OWN_N', "");
break;
case 'N':
define('__BONUS_INCLUDE_OWN_Y', "");
- define('__BONUS_INCLUDE_OWN_N', " checked");
+ define('__BONUS_INCLUDE_OWN_N', " checked=\"checked\"");
break;
}
// Add description as navigation point
ADD_DESCR("admin", basename(__FILE__));
-if (isset($_POST['ok']))
-{
+if (isset($_POST['ok'])) {
// Cache path has been not changed by default so don't test it again
$_POST['cache_tested'] = "N";
// Check if path has been changed
- if ($_POST['cache_path'] != $_CONFIG['cache_path'])
- {
+ if ($_POST['cache_path'] != $_CONFIG['cache_path']) {
// Okay, cache path has been altered so we have to test it again!
$_POST['cache_tested'] = "Y";
}
// Delete deactivated cache files
- if (($_POST['cache_admins'] == "N") && ($cacheInstance->cache_file("admins", true)))
- {
+ if (($_POST['cache_admins'] == "N") && ($cacheInstance->cache_file("admins", true))) {
$cacheInstance->cache_destroy();
}
- if (($_POST['cache_acls'] == "N") && ($cacheInstance->cache_file("acls", true)))
- {
+ if (($_POST['cache_acls'] == "N") && ($cacheInstance->cache_file("acls", true))) {
$cacheInstance->cache_destroy();
}
- if (($_POST['cache_exts'] == "N") && ($cacheInstance->cache_file("extensions", true)))
- {
+ if (($_POST['cache_exts'] == "N") && ($cacheInstance->cache_file("extensions", true))) {
$cacheInstance->cache_destroy();
}
- if (($_POST['cache_config'] == "N") && ($cacheInstance->cache_file("config", true)))
- {
+ if (($_POST['cache_config'] == "N") && ($cacheInstance->cache_file("config", true))) {
$cacheInstance->cache_destroy();
}
- if (($_POST['cache_modreg'] == "N") && ($cacheInstance->cache_file("modreg", true)))
- {
+ if (($_POST['cache_modreg'] == "N") && ($cacheInstance->cache_file("modreg", true))) {
$cacheInstance->cache_destroy();
}
- if (($_POST['cache_refdepth'] == "N") && ($cacheInstance->cache_file("refdepth", true)))
- {
+ if (($_POST['cache_refdepth'] == "N") && ($cacheInstance->cache_file("refdepth", true))) {
$cacheInstance->cache_destroy();
}
- if (($_POST['cache_refsys'] == "N") && ($cacheInstance->cache_file("refsys", true)))
- {
+ if (($_POST['cache_refsys'] == "N") && ($cacheInstance->cache_file("refsys", true))) {
$cacheInstance->cache_destroy();
}
// Save configuration
ADMIN_SAVE_SETTINGS($_POST);
-}
- else
-{
+} else {
// Prepare data
switch ($_CONFIG['cache_admins']) {
- case 'Y': define('__ADMINS_Y', " checked"); define('__ADMINS_N', ""); break;
- case 'N': define('__ADMINS_Y', ""); define('__ADMINS_N', " checked"); break;
+ case 'Y':
+ define('__ADMINS_Y', " checked=\"checked\"");
+ define('__ADMINS_N', "");
+ break;
+
+ case 'N':
+ define('__ADMINS_Y', "");
+ define('__ADMINS_N', " checked=\"checked\"");
+ break;
}
+
switch ($_CONFIG['cache_acls']) {
- case 'Y': define('__ACLS_Y', " checked"); define('__ACLS_N', ""); break;
- case 'N': define('__ACLS_Y', ""); define('__ACLS_N', " checked"); break;
+ case 'Y':
+ define('__ACLS_Y', " checked=\"checked\"");
+ define('__ACLS_N', "");
+ break;
+
+ case 'N':
+ define('__ACLS_Y', "");
+ define('__ACLS_N', " checked=\"checked\"");
+ break;
}
+
switch ($_CONFIG['cache_exts']) {
- case 'Y': define('__EXTS_Y', " checked"); define('__EXTS_N', ""); break;
- case 'N': define('__EXTS_Y', ""); define('__EXTS_N', " checked"); break;
+ case 'Y':
+ define('__EXTS_Y', " checked=\"checked\"");
+ define('__EXTS_N', "");
+ break;
+
+ case 'N':
+ define('__EXTS_Y', "");
+ define('__EXTS_N', " checked=\"checked\"");
+ break;
}
+
switch ($_CONFIG['cache_config']) {
- case 'Y': define('__CONFIG_Y', " checked"); define('__CONFIG_N', ""); break;
- case 'N': define('__CONFIG_Y', ""); define('__CONFIG_N', " checked"); break;
+ case 'Y':
+ define('__CONFIG_Y', " checked=\"checked\"");
+ define('__CONFIG_N', "");
+ break;
+
+ case 'N':
+ define('__CONFIG_Y', "");
+ define('__CONFIG_N', " checked=\"checked\"");
+ break;
}
+
switch ($_CONFIG['cache_modreg']) {
- case 'Y': define('__MODREG_Y', " checked"); define('__MODREG_N', ""); break;
- case 'N': define('__MODREG_Y', ""); define('__MODREG_N', " checked"); break;
+ case 'Y':
+ define('__MODREG_Y', " checked=\"checked\"");
+ define('__MODREG_N', "");
+ break;
+
+ case 'N':
+ define('__MODREG_Y', "");
+ define('__MODREG_N', " checked=\"checked\"");
+ break;
}
+
switch ($_CONFIG['cache_refdepth']) {
- case 'Y': define('__REFDEPTH_Y', " checked"); define('__REFDEPTH_N', ""); break;
- case 'N': define('__REFDEPTH_Y', ""); define('__REFDEPTH_N', " checked"); break;
+ case 'Y':
+ define('__REFDEPTH_Y', " checked=\"checked\"");
+ define('__REFDEPTH_N', "");
+ break;
+
+ case 'N':
+ define('__REFDEPTH_Y', "");
+ define('__REFDEPTH_N', " checked=\"checked\"");
+ break;
}
+
switch ($_CONFIG['cache_refsys']) {
- case 'Y': define('__REFSYS_Y', " checked"); define('__REFSYS_N', ""); break;
- case 'N': define('__REFSYS_Y', ""); define('__REFSYS_N', " checked"); break;
+ case 'Y':
+ define('__REFSYS_Y', " checked=\"checked\"");
+ define('__REFSYS_N', "");
+ break;
+
+ case 'N':
+ define('__REFSYS_Y', "");
+ define('__REFSYS_N', " checked=\"checked\"");
+ break;
}
+
switch ($_CONFIG['cache_themes']) {
- case 'Y': define('__THEMES_Y', " checked"); define('__THEMES_N', ""); break;
- case 'N': define('__THEMES_Y', ""); define('__THEMES_N', " checked"); break;
+ case 'Y':
+ define('__THEMES_Y', " checked=\"checked\"");
+ define('__THEMES_N', "");
+ break;
+
+ case 'N':
+ define('__THEMES_Y', "");
+ define('__THEMES_N', " checked=\"checked\"");
+ break;
}
+
switch ($_CONFIG['cache_admin_menu']) {
- case 'Y': define('__ADMIN_MENU_Y', " checked"); define('__ADMIN_MENU_N', ""); break;
- case 'N': define('__ADMIN_MENU_Y', ""); define('__ADMIN_MENU_N', " checked"); break;
+ case 'Y':
+ define('__ADMIN_MENU_Y', " checked=\"checked\"");
+ define('__ADMIN_MENU_N', "");
+ break;
+
+ case 'N':
+ define('__ADMIN_MENU_Y', "");
+ define('__ADMIN_MENU_N', " checked=\"checked\"");
+ break;
}
+
define('__PATH', $_CONFIG['cache_path']);
// Load template
LOAD_TEMPLATE("admin_config_cache");
}
+
//
?>
switch ($_CONFIG['doubler_jackpot'])
{
case 'Y':
- define('__DOUBLER_JACKPOT_Y', " checked");
+ define('__DOUBLER_JACKPOT_Y', " checked=\"checked\"");
define('__DOUBLER_JACKPOT_N', "");
break;
case 'N':
define('__DOUBLER_JACKPOT_Y', "");
- define('__DOUBLER_JACKPOT_N', " checked");
+ define('__DOUBLER_JACKPOT_N', " checked=\"checked\"");
break;
}
switch ($_CONFIG['doubler_own'])
{
case 'Y':
- define('__DOUBLER_OWN_Y', " checked");
+ define('__DOUBLER_OWN_Y', " checked=\"checked\"");
define('__DOUBLER_OWN_N', "");
break;
case 'N':
define('__DOUBLER_OWN_Y', "");
- define('__DOUBLER_OWN_N', " checked");
+ define('__DOUBLER_OWN_N', " checked=\"checked\"");
break;
}
switch ($_CONFIG['doubler_send_mode'])
{
case "DIRECT":
- define('__DOUBLER_SEND_DIRECT', " checked");
+ define('__DOUBLER_SEND_DIRECT', " checked=\"checked\"");
define('__DOUBLER_SEND_RESET' , "");
break;
case "RESET":
define('__DOUBLER_SEND_DIRECT', "");
- define('__DOUBLER_SEND_RESET' , " checked");
+ define('__DOUBLER_SEND_RESET' , " checked=\"checked\"");
break;
}
switch ($_CONFIG['doubler_sent_all'])
{
case 'Y':
- define('__DOUBLER_SENT_ALL_Y', " checked");
+ define('__DOUBLER_SENT_ALL_Y', " checked=\"checked\"");
define('__DOUBLER_SENT_ALL_N', "");
break;
case 'N':
define('__DOUBLER_SENT_ALL_Y', "");
- define('__DOUBLER_SENT_ALL_N', " checked");
+ define('__DOUBLER_SENT_ALL_N', " checked=\"checked\"");
break;
}
} else {
// Prepare data
switch ($_CONFIG['verbose_sql']) {
- case 'Y': define('__VERBOSE_Y', " checked"); define('__VERBOSE_N', ""); break;
- case 'N': define('__VERBOSE_Y', ""); define('__VERBOSE_N', " checked"); break;
+ case 'Y':
+ define('__VERBOSE_Y', " checked=\"checked\"");
+ define('__VERBOSE_N', "");
+ break;
+
+ case 'N':
+ define('__VERBOSE_Y', "");
+ define('__VERBOSE_N', " checked=\"checked\"");
+ break;
}
// Load template
// Prepare constants for the template
define('__MAX_VALUE', $_CONFIG['holiday_max']);
define('__LOCKED' , CREATE_TIME_SELECTIONS($_CONFIG['holiday_lock'] , "holiday_lock" , "WDh"));
- switch ($_CONFIG['holiday_mode'])
- {
+
+ switch ($_CONFIG['holiday_mode']) {
case "RESET":
- define('__RESET_DEFAULT' , " checked");
+ define('__RESET_DEFAULT' , " checked=\"checked\"");
define('__DIRECT_DEFAULT', "");
break;
case "DIRECT":
define('__RESET_DEFAULT' , "");
- define('__DIRECT_DEFAULT', " checked");
+ define('__DIRECT_DEFAULT', " checked=\"checked\"");
break;
}
switch ($_CONFIG['order_max_full'])
{
case "ORDER":
- define('__ORDER_DEFAULT', " checked");
+ define('__ORDER_DEFAULT', " checked=\"checked\"");
define('__MAX_DEFAULT' , "");
break;
case "MAX":
define('__ORDER_DEFAULT', "");
- define('__MAX_DEFAULT' , " checked");
+ define('__MAX_DEFAULT' , " checked=\"checked\"");
break;
}
define('_CFG_MAX_TLENGTH' , $_CONFIG['max_tlength']);
if ($_CONFIG['test_text'] == "N") {
- define('_CFG_TEST_TEXT_N', " checked");
+ define('_CFG_TEST_TEXT_N', " checked=\"checked\"");
define('_CFG_TEST_TEXT_Y', "");
} else {
define('_CFG_TEST_TEXT_N', "");
- define('_CFG_TEST_TEXT_Y', " checked");
+ define('_CFG_TEST_TEXT_Y', " checked=\"checked\"");
}
switch ($_CONFIG['repay_deleted_mails']) {
}
if ($_CONFIG['test_subj'] == "N") {
- define('_CFG_TEST_SUBJ_N', " checked");
+ define('_CFG_TEST_SUBJ_N', " checked=\"checked\"");
define('_CFG_TEST_SUBJ_Y', "");
} else {
define('_CFG_TEST_SUBJ_N', "");
- define('_CFG_TEST_SUBJ_Y', " checked");
+ define('_CFG_TEST_SUBJ_Y', " checked=\"checked\"");
}
if ($_CONFIG['url_blacklist'] == "N") {
- define('_CFG_URL_BLIST_N', " checked");
+ define('_CFG_URL_BLIST_N', " checked=\"checked\"");
define('_CFG_URL_BLIST_Y', "");
} else {
define('_CFG_URL_BLIST_N', "");
- define('_CFG_URL_BLIST_Y', " checked");
+ define('_CFG_URL_BLIST_Y', " checked=\"checked\"");
}
// Selection list
}
if ($_CONFIG['order_multi_page'] == "N") {
- define('_CFG_ORDER_MULTI_N', " checked");
+ define('_CFG_ORDER_MULTI_N', " checked=\"checked\"");
define('_CFG_ORDER_MULTI_Y', "");
} else {
define('_CFG_ORDER_MULTI_N', "");
- define('_CFG_ORDER_MULTI_Y', " checked");
+ define('_CFG_ORDER_MULTI_Y', " checked=\"checked\"");
}
if ($_CONFIG['autosend_active'] == "N") {
- define('_CFG_AUTOSEND_ACTIVE_N', " checked");
+ define('_CFG_AUTOSEND_ACTIVE_N', " checked=\"checked\"");
define('_CFG_AUTOSEND_ACTIVE_Y', "");
} else {
define('_CFG_AUTOSEND_ACTIVE_N', "");
- define('_CFG_AUTOSEND_ACTIVE_Y', " checked");
+ define('_CFG_AUTOSEND_ACTIVE_Y', " checked=\"checked\"");
}
if ($_CONFIG['send_prof_update'] == "N") {
- define('_CFG_SEND_UPDATE_N', " checked");
+ define('_CFG_SEND_UPDATE_N', " checked=\"checked\"");
define('_CFG_SEND_UPDATE_Y', "");
} else {
define('_CFG_SEND_UPDATE_N', "");
- define('_CFG_SEND_UPDATE_Y', " checked");
+ define('_CFG_SEND_UPDATE_Y', " checked=\"checked\"");
}
if ($_CONFIG['admin_notify'] == "N") {
- define('_CFG_ADMIN_NOTIFY_N', " checked");
+ define('_CFG_ADMIN_NOTIFY_N', " checked=\"checked\"");
define('_CFG_ADMIN_NOTIFY_Y', "");
} else {
define('_CFG_ADMIN_NOTIFY_N', "");
- define('_CFG_ADMIN_NOTIFY_Y', " checked");
+ define('_CFG_ADMIN_NOTIFY_Y', " checked=\"checked\"");
}
if ($_CONFIG['css_php'] == "DIRECT") {
- define('_CFG_CSS_PHP_DIRECT', " checked");
+ define('_CFG_CSS_PHP_DIRECT', " checked=\"checked\"");
define('_CFG_CSS_PHP_FILE', "");
} else {
define('_CFG_CSS_PHP_DIRECT', "");
- define('_CFG_CSS_PHP_FILE', " checked");
+ define('_CFG_CSS_PHP_FILE', " checked=\"checked\"");
}
if ($_CONFIG['guest_menu'] == "Y") {
- define('_CFG_GUEST_MENU_ACTIVE', " checked");
+ define('_CFG_GUEST_MENU_ACTIVE', " checked=\"checked\"");
define('_CFG_GUEST_MENU_INACTIVE', "");
} else {
define('_CFG_GUEST_MENU_ACTIVE', "");
- define('_CFG_GUEST_MENU_INACTIVE', " checked");
+ define('_CFG_GUEST_MENU_INACTIVE', " checked=\"checked\"");
}
if ($_CONFIG['member_menu'] == "Y") {
- define('_CFG_MEMBER_MENU_ACTIVE', " checked");
+ define('_CFG_MEMBER_MENU_ACTIVE', " checked=\"checked\"");
define('_CFG_MEMBER_MENU_INACTIVE', "");
} else {
define('_CFG_MEMBER_MENU_ACTIVE', "");
- define('_CFG_MEMBER_MENU_INACTIVE', " checked");
+ define('_CFG_MEMBER_MENU_INACTIVE', " checked=\"checked\"");
}
if ($_CONFIG['youre_here'] == "Y") {
- define('_CFG_YOURE_HERE_ACTIVE', " checked");
+ define('_CFG_YOURE_HERE_ACTIVE', " checked=\"checked\"");
define('_CFG_YOURE_HERE_INACTIVE', "");
} else {
define('_CFG_YOURE_HERE_ACTIVE', "");
- define('_CFG_YOURE_HERE_INACTIVE', " checked");
+ define('_CFG_YOURE_HERE_INACTIVE', " checked=\"checked\"");
}
if ($_CONFIG['show_timings'] == "Y") {
- define('_CFG_SHOW_TIMINGS_Y', " checked");
+ define('_CFG_SHOW_TIMINGS_Y', " checked=\"checked\"");
define('_CFG_SHOW_TIMINGS_N', "");
} else {
define('_CFG_SHOW_TIMINGS_Y', "");
- define('_CFG_SHOW_TIMINGS_N', " checked");
+ define('_CFG_SHOW_TIMINGS_N', " checked=\"checked\"");
}
if ($_CONFIG['mailid_error_redirect'] == 'INDEX') {
- define('_CFG_MAILID_REDIRECT_INDEX', " checked");
+ define('_CFG_MAILID_REDIRECT_INDEX', " checked=\"checked\"");
define('_CFG_MAILID_REDIRECT_REJECT', "");
} else {
define('_CFG_MAILID_REDIRECT_INDEX', "");
- define('_CFG_MAILID_REDIRECT_REJECT', " checked");
+ define('_CFG_MAILID_REDIRECT_REJECT', " checked=\"checked\"");
}
for ($i = 0; $i <= 5; $i++) {
switch ($_CONFIG['allow_direct_pay'])
{
case 'Y':
- define('__DIRECT_Y', " checked");
+ define('__DIRECT_Y', " checked=\"checked\"");
define('__DIRECT_N', "");
break;
case 'N':
define('__DIRECT_Y', "");
- define('__DIRECT_N', " checked");
+ define('__DIRECT_N', " checked=\"checked\"");
break;
}
// One-time referral bonus add-mode
switch ($_CONFIG['reg_points_mode'])
{
- case "ref" : define('__MODE_REF', " checked"); define('__MODE_DIRECT', ""); break;
- case "direct": define('__MODE_REF', ""); define('__MODE_DIRECT', " checked"); break;
+ case "ref" : define('__MODE_REF', " checked=\"checked\""); define('__MODE_DIRECT', ""); break;
+ case "direct": define('__MODE_REF', ""); define('__MODE_DIRECT', " checked=\"checked\""); break;
}
// Referral payout value
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 10/01/2008 *
+ * ================ Last change: 10/01/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : what-config_removeip.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Configuration for the caching system *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Konfiguration des Caching-Systems *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * 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 ((!defined('__SECURITY')) || (!IS_ADMIN())) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+}
+
+// Add description as navigation point
+ADD_DESCR("admin", basename(__FILE__));
+
+if (isset($_POST['ok'])) {
+ // Save configuration
+ ADMIN_SAVE_SETTINGS($_POST);
+} else {
+ // Prepare data
+ switch ($_CONFIG['removeip_anon_ip']) {
+ case 'Y':
+ define('__CFG_REMOVEIP_ANON_IP_Y', " checked=\"checked\"");
+ define('__CFG_REMOVEIP_ANON_IP_N', "");
+ break;
+
+ case 'N':
+ define('__CFG_REMOVEIP_ANON_IP_Y', "");
+ define('__CFG_REMOVEIP_ANON_IP_N', " checked=\"checked\"");
+ break;
+ } // END - switch
+
+ switch ($_CONFIG['removeip_anon_host']) {
+ case 'Y':
+ define('__CFG_REMOVEIP_ANON_HOST_Y', " checked=\"checked\"");
+ define('__CFG_REMOVEIP_ANON_HOST_N', "");
+ break;
+
+ case 'N':
+ define('__CFG_REMOVEIP_ANON_HOST_Y', "");
+ define('__CFG_REMOVEIP_ANON_HOST_N', " checked=\"checked\"");
+ break;
+ } // END - switch
+
+ switch ($_CONFIG['removeip_anon_ua']) {
+ case 'Y':
+ define('__CFG_REMOVEIP_ANON_UA_Y', " checked=\"checked\"");
+ define('__CFG_REMOVEIP_ANON_UA_N', "");
+ break;
+
+ case 'N':
+ define('__CFG_REMOVEIP_ANON_UA_Y', "");
+ define('__CFG_REMOVEIP_ANON_UA_N', " checked=\"checked\"");
+ break;
+ } // END - switch
+
+ switch ($_CONFIG['removeip_anon_ref']) {
+ case 'Y':
+ define('__CFG_REMOVEIP_ANON_REF_Y', " checked=\"checked\"");
+ define('__CFG_REMOVEIP_ANON_REF_N', "");
+ break;
+
+ case 'N':
+ define('__CFG_REMOVEIP_ANON_REF_Y', "");
+ define('__CFG_REMOVEIP_ANON_REF_N', " checked=\"checked\"");
+ break;
+ } // END - switch
+
+ switch ($_CONFIG['removeip_admin_show']) {
+ case 'Y':
+ define('__CFG_REMOVEIP_ADMIN_SHOW_Y', " checked=\"checked\"");
+ define('__CFG_REMOVEIP_ADMIN_SHOW_N', "");
+ break;
+
+ case 'N':
+ define('__CFG_REMOVEIP_ADMIN_SHOW_Y', "");
+ define('__CFG_REMOVEIP_ADMIN_SHOW_N', " checked=\"checked\"");
+ break;
+ } // END - switch
+
+ switch ($_CONFIG['removeip_guest_show']) {
+ case 'Y':
+ define('__CFG_REMOVEIP_GUEST_SHOW_Y', " checked=\"checked\"");
+ define('__CFG_REMOVEIP_GUEST_SHOW_N', "");
+ break;
+
+ case 'N':
+ define('__CFG_REMOVEIP_GUEST_SHOW_Y', "");
+ define('__CFG_REMOVEIP_GUEST_SHOW_N', " checked=\"checked\"");
+ break;
+ } // END - switch
+
+ switch ($_CONFIG['removeip_member_show']) {
+ case 'Y':
+ define('__CFG_REMOVEIP_MEMBER_SHOW_Y', " checked=\"checked\"");
+ define('__CFG_REMOVEIP_MEMBER_SHOW_N', "");
+ break;
+
+ case 'N':
+ define('__CFG_REMOVEIP_MEMBER_SHOW_Y', "");
+ define('__CFG_REMOVEIP_MEMBER_SHOW_N', " checked=\"checked\"");
+ break;
+ } // END - switch
+
+ switch ($_CONFIG['removeip_sponsor_show']) {
+ case 'Y':
+ define('__CFG_REMOVEIP_SPONSOR_SHOW_Y', " checked=\"checked\"");
+ define('__CFG_REMOVEIP_SPONSOR_SHOW_N', "");
+ break;
+
+ case 'N':
+ define('__CFG_REMOVEIP_SPONSOR_SHOW_Y', "");
+ define('__CFG_REMOVEIP_SPONSOR_SHOW_N', " checked=\"checked\"");
+ break;
+ } // END - switch
+
+ switch ($_CONFIG['anonymous_ip']) {
+ case "127.0.0.1":
+ define('__CFG_ANONYMOUS_IP_LOCAL' , " selected=\"selected\"");
+ define('__CFG_ANONYMOUS_IP_ZERO' , "");
+ define('__CFG_ANONYMOUS_IP_RANDOM', "");
+ break;
+
+ case "0.0.0.0":
+ define('__CFG_ANONYMOUS_IP_LOCAL' , "");
+ define('__CFG_ANONYMOUS_IP_ZERO' , " selected=\"selected\"");
+ define('__CFG_ANONYMOUS_IP_RANDOM', "");
+ break;
+
+ case "RANDOM":
+ define('__CFG_ANONYMOUS_IP_LOCAL' , "");
+ define('__CFG_ANONYMOUS_IP_ZERO' , "");
+ define('__CFG_ANONYMOUS_IP_RANDOM', " selected=\"selected\"");
+ break;
+ } // END - switch
+
+ // Load template
+ LOAD_TEMPLATE("admin_config_removeip");
+}
+//
+?>
// Add description as navigation point
ADD_DESCR("admin", basename(__FILE__));
-if (isset($_POST['ok']))
-{
+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"))
- {
+ if (($sel == "Y") || ($mod == "admin")) {
// Add module to queue
$MODs[] = $mod;
}
// Save settings
ADMIN_SAVE_SETTINGS($_POST);
-}
- else
-{
+} else {
// Load existing modules and generate TR rows for the template
$result = SQL_QUERY("SELECT module, title FROM "._MYSQL_PREFIX."_mod_reg ORDER BY module", __FILE__, __LINE__);
$SW = 2; $OUT = "";
- while(list($mod, $title) = SQL_FETCHROW($result))
- {
+ while(list($mod, $title) = SQL_FETCHROW($result)) {
// Set title to three dashes when no title is supplied
if (empty($title)) $title = "---";
// Already registered module?
- if (ereg($mod, $_CONFIG['rewrite_skip']))
- {
+ if (ereg($mod, $_CONFIG['rewrite_skip'])) {
// Found
- $y = " checked";
+ $y = " checked=\"checked\"";
$n = "";
- }
- else
- {
+ } else {
// Not found
$y = "";
- $n = " checked";
+ $n = " checked=\"checked\"";
}
// Remember data in array for the dynamic row template
// Add description as navigation point
ADD_DESCR("admin", basename(__FILE__));
-if (isset($_POST['ok']))
-{
+if (isset($_POST['ok'])) {
// Save settings...
ADMIN_SAVE_SETTINGS($_POST);
}
define('__TRANS_CODE_VALUE' , $_CONFIG['transfer_code']);
// Autppurge expired transfer entries?
-switch ($_CONFIG['autopurge_inactive'])
-{
- case 'Y': define('__YES_AP', " selected=\"selected\""); define('__NO_AP', ""); break;
- case 'N': define('__YES_AP', ""); define('__NO_AP', " selected=\"selected\""); break;
+switch ($_CONFIG['autopurge_inactive']) {
+ case 'Y':
+ define('__YES_AP', " selected=\"selected\"");
+ define('__NO_AP', "");
+ break;
+
+ case 'N':
+ define('__YES_AP', "");
+ define('__NO_AP', " selected=\"selected\"");
+ break;
}
// Time selection box
switch ($DATA['gender'])
{
case "M":
- define('__GENDER_M', " selected");
+ define('__GENDER_M', " selected=\"selected\"");
define('__GENDER_F', "");
define('__GENDER_C', "");
break;
case "F":
define('__GENDER_M', "");
- define('__GENDER_F', " selected");
+ define('__GENDER_F', " selected=\"selected\"");
define('__GENDER_C', "");
break;
case "C":
define('__GENDER_M', "");
define('__GENDER_F', "");
- define('__GENDER_C', " selected");
+ define('__GENDER_C', " selected=\"selected\"");
break;
}
define('__SURNAME' , $DATA['surname']);
$ext_name = GET_EXT_NAME($id);
$ext_ver = GET_EXT_VERSION($ext_name);
- // Free the result
- SQL_FREERESULT($result);
-
if ($_CONFIG['verbose_sql']) {
// Load SQL commands in remove mode
$EXT_LOAD_MODE = "remove";
// Check his IP number
$result = SQL_QUERY_ESC("SELECT joined, last_update FROM "._MYSQL_PREFIX."_user_data WHERE REMOTE_ADDR='%s' AND (joined > (UNIX_TIMESTAMP() - %s) OR last_update > (UNIX_TIMESTAMP() - %s)) LIMIT 1",
- array(getenv('REMOTE_ADDR'), $_CONFIG['ip_timeout'], $_CONFIG['ip_timeout']), __FILE__, __LINE__);
+ array(GET_REMOTE_ADDR(), $_CONFIG['ip_timeout'], $_CONFIG['ip_timeout']), __FILE__, __LINE__);
if ((SQL_NUMROWS($result) == 1) && (!IS_ADMIN()))
{
// Same IP in timeout range and different email address entered... Eat this, faker! ;-)
$totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true);
// Hash = MM-DD-YYYY:IP:USER_AGENT:TIMEMARK
- $hash = generateHash(sha1($totalUsers.":".$_POST['month']."-".$_POST['day']."-".$_POST['year'].":".getenv('SERVER_NAME').":".getenv('REMOTE_ADDR').":".getenv('HTTP_USER_AGENT')."-".time())."/".RAND_NUMBER);
+ $hash = generateHash(sha1($totalUsers.":".$_POST['month']."-".$_POST['day']."-".$_POST['year'].":".getenv('SERVER_NAME').":".GET_REMOTE_ADDR().":".GET_USER_AGENT()."-".time())."/".RAND_NUMBER);
// Add design when extension sql_patches is v0.2.7 or greater
$ADD1 = ""; $ADD2 = "";
bigintval($_POST['max_mails']),
bigintval($_POST['refid']),
$hash,
- getenv('REMOTE_ADDR'),
+ GET_REMOTE_ADDR(),
), __FILE__, __LINE__);
// Get his userid
switch ($_POST['gender'])
{
case "M": // Male
- define('__GENDER_M' , " selected");
+ define('__GENDER_M' , " selected=\"selected\"");
define('__GENDER_F' , "");
define('__GENDER_C' , "");
break;
case "F": // Female
define('__GENDER_M' , "");
- define('__GENDER_F' , " selected");
+ define('__GENDER_F' , " selected=\"selected\"");
define('__GENDER_C' , "");
break;
case "C": // Company
define('__GENDER_M' , "");
define('__GENDER_F' , "");
- define('__GENDER_C' , " selected");
+ define('__GENDER_C' , " selected=\"selected\"");
break;
}
switch ($_POST['receive_warnings'])
{
case "Y":
- define('__REC_Y' , " selected");
+ define('__REC_Y' , " selected=\"selected\"");
define('__REC_N' , "");
break;
case "N":
define('__REC_Y' , "");
- define('__REC_N' , " selected");
+ define('__REC_N' , " selected=\"selected\"");
break;
}
while (list($id, $cat) = SQL_FETCHROW($result))
{
// Default he has not joined
- $JOINED_N = " checked"; $JOINED_Y = "";
+ $JOINED_N = " checked=\"checked\""; $JOINED_Y = "";
// Check category selection
$result_user = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_cats WHERE userid=%s AND cat_id=%s LIMIT 1",
// When we found an entry don't read it, just change the JOINED_x variables
if (isset($_POST['cat']))
{
- if ($_POST['cat'][$id] =='Y') { $JOINED_Y = " checked"; $JOINED_N = ""; }
+ if ($_POST['cat'][$id] =='Y') { $JOINED_Y = " checked=\"checked\""; $JOINED_N = ""; }
}
else
{
if (SQL_NUMROWS($result_user) == 1)
{
- $JOINED_Y = " checked"; $JOINED_N = "";
+ $JOINED_Y = " checked=\"checked\""; $JOINED_N = "";
}
// Free memory
if ($mode == "Y")
{
- define('HTML_Y', " checked");
+ define('HTML_Y', " checked=\"checked\"");
define('HTML_N', "");
}
else
{
- define('HTML_N', " checked");
+ define('HTML_N', " checked=\"checked\"");
define('HTML_Y', "");
}
LOAD_TEMPLATE("member_html_mail_settings");
switch ($opt_in)
{
case 'Y':
- define('__TRANSFER_ALLOW_Y', " checked");
+ define('__TRANSFER_ALLOW_Y', " checked=\"checked\"");
define('__TRANSFER_ALLOW_N', "");
define('__TRANSFER_NEW_LINK', "<A href=\"".URL."/modules.php?module=login&what=transfer&mode=new\">".TRANSFER_NOW_LINK."</A>");
break;
case 'N':
define('__TRANSFER_ALLOW_Y', "");
- define('__TRANSFER_ALLOW_N', " checked");
+ define('__TRANSFER_ALLOW_N', " checked=\"checked\"");
define('__TRANSFER_NEW_LINK', TRANSFER_PLEASE_ALLOW_OPT_IN);
break;
}
switch ($content['gender'])
{
case "M": // Male
- define('__GENDER_M', " selected");
+ define('__GENDER_M', " selected=\"selected\"");
define('__GENDER_F', "");
define('__GENDER_C', "");
break;
case "F": // Female
define('__GENDER_M', "");
- define('__GENDER_F', " selected");
+ define('__GENDER_F', " selected=\"selected\"");
define('__GENDER_C', "");
break;
case "C": // Company
define('__GENDER_M', "");
define('__GENDER_F', "");
- define('__GENDER_C', " selected");
+ define('__GENDER_C', " selected=\"selected\"");
break;
}
} else {
// Make yes/no selection
switch ($content['receive_warnings']) {
- case "Y": define('__YES', " checked"); define('__NO', ""); break;
- case "N": define('__YES', ""); define('__NO', " checked"); break;
+ case "Y":
+ define('__YES', " checked=\"checked\"");
+ define('__NO', "");
+ break;
+
+ case "N":
+ define('__YES', "");
+ define('__NO', " checked=\"checked\"");
+ break;
}
// Translate current interval into fancy string
// Load extensions and language
require_once(PATH."inc/extensions.php");
-require_once(PATH."inc/language.php");
// Init error handler
function __errorHandler ($errno, $errstr, $errfile, $errline) {
//* DEBUG: */ die("<pre>".print_r($_CONFIG, true)."</pre>");
if (($type == "what") || (($type == "action") && ((!isset($GLOBALS['what'])) || ($GLOBALS['what'] == "overview")))) {
//* DEBUG: */ echo __LINE__."+".$type."+<br />\n";
- $OUT .= "</DIV><br />\n";
- $DEPTH="0";
+ $OUT .= "</div>\n";
+
+ // Extension removeip activated?
+ if ((EXT_IS_ACTIVE("removeip")) && (isset($_CONFIG['removeip_'.strtolower($ACC_LVL).'_show'])) && ($_CONFIG['removeip_'.strtolower($ACC_LVL).'_show'] == "Y")) {
+ // Add anoymity/privacy infos
+ $OUT .= REMOVEIP_ADD_INFOS();
+ } // END - if
+
+ // Add line-break tag
+ $OUT .= "<br />\n";
+ $DEPTH = "0";
// Handle failed logins here if not in guest
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):type={$type},action={$GLOBALS['action']},what={$GLOBALS['what']},lvl={$ACC_LVL}<br />\n";
} else {
// No entry does exists so we simply add it!
SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_online (module, action, what, userid, refid, is_member, is_admin, timestamp, sid, ip) VALUES ('%s','%s','%s', %s, %s, '%s','%s', UNIX_TIMESTAMP(), '%s','%s')",
- array($mod, $act, $wht, $uid, $rid, $MEM, $ADMIN, $SID, getenv('REMOTE_ADDR')), __FILE__, __LINE__
+ array($mod, $act, $wht, $uid, $rid, $MEM, $ADMIN, $SID, GET_REMOTE_ADDR()), __FILE__, __LINE__
);
}
<TR><TD height=\"10\"></TD></TR>
<TR>
<TD align=\"center\">
- <STRONG>".getenv('REMOTE_ADDR')."</STRONG>
+ <STRONG>".GET_REMOTE_ADDR()."</STRONG>
</TD>
</TR>
</TABLE>
global $PHPSESSID;
$PHPSESSID = @session_id();
-// Store language code in cookie
-set_session("mx_lang", $mx_lang);
-
// Load extensions here
require_once(PATH."inc/load_extensions.php");
+// Load language system
+require_once(PATH."inc/language.php");
+
// Check if refid is set
if ((!empty($_GET['user'])) && ($CLICK == 1) && (basename($_SERVER['PHP_SELF']) == "click.php")) {
// The variable user comes from the click-counter script click.php and we only accept this here
--- /dev/null
+<form action="{!URL!}/modules.php?module=admin&what=config_removeip" method="POST">
+<table border="0" cellspacing="0" cellpadding="0" align="center" class="admin_table dashed" width="500">
+<tr>
+ <td colspan="2" align="center" class="admin_title bottom2" height="30">
+ <strong>{--ADMIN_CONFIG_REMOVEIP_TITLE--}</strong>
+ </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" width="350" height="20">
+ {--ADMIN_CONFIG_REMOVEIP_ANON_IP--}
+ </td>
+ <td width="150" style="padding-left: 10px">
+ <input type="radio" name="removeip_anon_ip" value="Y" class="admin_normal"{!__CFG_REMOVEIP_ANON_IP_Y!} /> {--YES--}
+ <input type="radio" name="removeip_anon_ip" value="N" class="admin_normal"{!__CFG_REMOVEIP_ANON_IP_N!} /> {--NO--}
+ </td>
+</tr>
+<tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" width="350" height="20">
+ {--ADMIN_CONFIG_REMOVEIP_ANON_HOST--}
+ </td>
+ <td width="150" style="padding-left: 10px">
+ <input type="radio" name="removeip_anon_host" value="Y" class="admin_normal"{!__CFG_REMOVEIP_ANON_HOST_Y!} /> {--YES--}
+ <input type="radio" name="removeip_anon_host" value="N" class="admin_normal"{!__CFG_REMOVEIP_ANON_HOST_N!} /> {--NO--}
+ </td>
+</tr>
+<tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" width="350" height="20">
+ {--ADMIN_CONFIG_REMOVEIP_ANON_UA--}
+ </td>
+ <td width="150" style="padding-left: 10px">
+ <input type="radio" name="removeip_anon_ua" value="Y" class="admin_normal"{!__CFG_REMOVEIP_ANON_UA_Y!} /> {--YES--}
+ <input type="radio" name="removeip_anon_ua" value="N" class="admin_normal"{!__CFG_REMOVEIP_ANON_UA_N!} /> {--NO--}
+ </td>
+</tr>
+<tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" width="350" height="20">
+ {--ADMIN_CONFIG_REMOVEIP_ANON_REF--}
+ </td>
+ <td width="150" style="padding-left: 10px">
+ <input type="radio" name="removeip_anon_ref" value="Y" class="admin_normal"{!__CFG_REMOVEIP_ANON_REF_Y!} /> {--YES--}
+ <input type="radio" name="removeip_anon_ref" value="N" class="admin_normal"{!__CFG_REMOVEIP_ANON_REF_N!} /> {--NO--}
+ </td>
+</tr>
+<tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" width="350" height="20">
+ {--ADMIN_CONFIG_REMOVEIP_ANONYMOUS_IP--}
+ </td>
+ <td width="150" style="padding-left: 10px">
+ <select name="anonymous_ip" class="admin_selexc" size="1">
+ <option value="127.0.0.1"{!__CFG_ANONYMOUS_IP_LOCAL!}>{--ADMIN_CONFIG_REMOVEIP_LOCAL--}</option>
+ <option value="0.0.0.0"{!__CFG_ANONYMOUS_IP_ZERO!}>{--ADMIN_CONFIG_REMOVEIP_ZERO--}</option>
+ <option value="RANDOM"{!__CFG_ANONYMOUS_IP_RANDOM!}>{--ADMIN_CONFIG_REMOVEIP_RANDOM--}</option>
+ </select>
+ </td>
+</tr>
+<tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" width="350" height="20">
+ {--ADMIN_CONFIG_REMOVEIP_ADMIN_SHOW--}
+ </td>
+ <td width="150" style="padding-left: 10px">
+ <input type="radio" name="removeip_admin_show" value="Y" class="admin_normal"{!__CFG_REMOVEIP_ADMIN_SHOW_Y!} /> {--YES--}
+ <input type="radio" name="removeip_admin_show" value="N" class="admin_normal"{!__CFG_REMOVEIP_ADMIN_SHOW_N!} /> {--NO--}
+ </td>
+</tr>
+<tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" width="350" height="20">
+ {--ADMIN_CONFIG_REMOVEIP_GUEST_SHOW--}
+ </td>
+ <td width="150" style="padding-left: 10px">
+ <input type="radio" name="removeip_guest_show" value="Y" class="admin_normal"{!__CFG_REMOVEIP_GUEST_SHOW_Y!} /> {--YES--}
+ <input type="radio" name="removeip_guest_show" value="N" class="admin_normal"{!__CFG_REMOVEIP_GUEST_SHOW_N!} /> {--NO--}
+ </td>
+</tr>
+<tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" width="350" height="20">
+ {--ADMIN_CONFIG_REMOVEIP_MEMBER_SHOW--}
+ </td>
+ <td width="150" style="padding-left: 10px">
+ <input type="radio" name="removeip_member_show" value="Y" class="admin_normal"{!__CFG_REMOVEIP_MEMBER_SHOW_Y!} /> {--YES--}
+ <input type="radio" name="removeip_member_show" value="N" class="admin_normal"{!__CFG_REMOVEIP_MEMBER_SHOW_N!} /> {--NO--}
+ </td>
+</tr>
+<tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" width="350" height="20">
+ {--ADMIN_CONFIG_REMOVEIP_SPONSOR_SHOW--}
+ </td>
+ <td width="150" style="padding-left: 10px">
+ <input type="radio" name="removeip_sponsor_show" value="Y" class="admin_normal"{!__CFG_REMOVEIP_SPONSOR_SHOW_Y!} /> {--YES--}
+ <input type="radio" name="removeip_sponsor_show" value="N" class="admin_normal"{!__CFG_REMOVEIP_SPONSOR_SHOW_N!} /> {--NO--}
+ </td>
+</tr>
+<tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr>
+<tr>
+ <td colspan="2" class="admin_footer">
+ <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> *
+ <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" />
+ </td>
+</tr>
+</table>
+</form>
--- /dev/null
+Anonymisierungserweiterung, die derzeit die IP-Nummer in
+<strong>127.0.0.1</strong>, <strong>0.0.0.0</strong> oder Pseudo-Zufalls-IP,
+je nach Einstellung, umwandelt, den User-Agent in eine anonyme Form bringt
+und den Referer entfernt. Auch sollten Sie über das Verlangen von
+personenbezogenen Daten im Anmeldeformular nachdenken, welche *wirklich*
+für Ihren {!MT_WORD!} erforderlich sind. Sobald diese Erweiterung in Ihrem
+{!MT_WORD!} installiert ist, wird im Gast-, Mitglieds- und Adminbereich der
+Hinweis eingeblendet, unter welcher IP-Nummer Ihre Aktivität gespeichert
+wird, falls sich Ihre Besucher anmelden oder Mitglieder einloggen sollten.<br />
+<br />
+Mehr zum Thema "Anonymes Internet" finden Sie [<a target="_blank"
+ href="http://www.wirspeichernnicht.de" title="Wir speichern nicht!">hier</a>].<br />
+<br />
+Auch sollten Sie über den Einsatz der Apache-Erweiterung [<a target="_blank"
+ href="http://packages.debian.org/sid/libapache2-mod-removeip"
+ title="Debian Sid Package">mod-removeip</a>] auf Ihrem Server nachdenken.
--- /dev/null
+<table border="0" cellspacing="0" cellpadding="0" align="center" class="admin_table dashed" width="350">
+<tr>
+ <td class="admin_title bottom2">
+ Anonymitätslevel in diesem {!MT_WORD!}:
+ </td>
+</tr>
+<tr>
+ <td align="center">
+ <strong>$content</strong>
+ </td>
+</tr>
+</table>