/doubler.php -text
/img.php -text
inc/.htaccess -text
+inc/.secret/.htaccess -text
inc/autopurge.php -text
inc/autopurge/.htaccess -text
inc/autopurge/purge- -text
--- /dev/null
+Deny from all
\ No newline at end of file
define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "474");
+define('CURR_SVN_REVISION', "475");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
$ret = $cacheArray['extensions']['ext_name'][$id];
// Count cache hits
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
} elseif (!EXT_IS_ACTIVE("cache")) {
// Load from database
$result = SQL_QUERY_ESC("SELECT ext_name FROM "._MYSQL_PREFIX."_extensions WHERE id=%s LIMIT 1",
$ret = $cacheArray['extensions']['ext_id'][$name];
// Count cache hits
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
} elseif (!EXT_IS_ACTIVE("cache")) {
// Load from database
$result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1",
//$_CONFIG['verbose_sql'] = "N";
define('MT_WORD' , DEFAULT_MT_WORD );
define('MT_WORD2', DEFAULT_MT_WORD2);
+ define('MT_WORD3', DEFAULT_MT_WORD3);
define('POINTS' , DEFAULT_POINTS);
}
break;
// Check if our config file is writeable or not
function is_INCWritable($inc) {
- $fp = @fopen(PATH."inc/".$inc.".php", 'a');
+ // Generate FQFN
+ $fqfn = sprintf("%sinc/%s.php", PATH, $inc);
+
+ // Abort by simple test
+ if ((FILE_READABLE($fqfn)) && (!is_writeable($fqfn))) {
+ return false;
+ } // END - if
+
+ // Test if we can append data
+ $fp = @fopen($fqfn, 'a');
if ($inc == "dummy") {
// Remove dummy file
@fclose($fp);
- return @unlink(PATH."inc/dummy.php");
+ return @unlink($fqfn);
} else {
// Close all other files
return @fclose($fp);
}
}
}
- if ((sizeof($FATAL) > 0) || ($FATAL[0] != ''))
+ if ((sizeof($FATAL) > 0) || ((isset($FATAL[0])) && ($FATAL[0] != '')))
{
$OUT = "";
foreach ($FATAL as $value)
define('LOGIN_FAILED_GENERAL', "Genereller Loginfehler! Bitte kontaktieren Sie den Webmaster!");
define('DEFAULT_MT_WORD', "Mailtausch");
define('DEFAULT_MT_WORD2', "Mailtausches");
+define('DEFAULT_MT_WORD3', "Mailtauscher");
define('DEFAULT_POINTS', "Punkte");
define('EXTENSION_PROBLEM_NOT_INSTALLED', "Erweiterung <u>%s</u> nicht installiert.");
define('PROBLEM_POINTS_OVERVIEW_UNAVAILABLE', "{!POINTS!}-Übersicht derzeit nicht verfügbar.");
$default = $cacheArray['admins']['def_acl'][get_session('admin_login')];
// Count cache hits
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
} elseif (!is_object($cacheInstance)) {
// Load from database
$default = GET_ADMIN_DEFAULT_ACL(get_session('admin_login'));
}
if ($lines == 1) {
// Count cache hits
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
break;
}
}
foreach ($cacheArray['ref_system']['userid'] as $id => $u_id) {
// Do we have a ref for this user?
//* DEBUG: */ echo "id={$id},u_id={$u_id},uid={$uid},old={$old},level={$cacheArray['ref_system']['level'][$id]}<br />\n";
- if (($u_id == $uid) && (($cacheArray['ref_system']['level'][$id] == 1 && GET_EXT_VERSION("refback") != "") || ($cacheArray['ref_system']['level'][$id] == 0 && GET_EXT_VERSION("refback") == ""))) {
+ if (($u_id == $uid) && ($cacheArray['ref_system']['level'][$id] == 1)) {
//* DEBUG: */ echo "uid matches!<br />\n";
- // Entry found!
- $cnt = $cacheArray['ref_system']['counter'][$id];
- break;
- } // END - if
- } // END - foreach
+ foreach ($cacheArray['ref_depths']['level'] as $level) {
+ if (($level == $cacheArray['ref_system']['level'][$id]) && ($level == 1)) {
+ // Level does exist so abort here
+ $cnt = $cacheArray['ref_system']['counter'][$id];
+ //* DEBUG: */ echo "*".$uid."/".$cnt."*<br />";
+ break;
+ } elseif ($level > 1) {
+ // Not interesting here...
+ break;
+ }
+ }
+ // Abort also here!
+ if ($cnt > 0) break;
+ }
+ }
//* DEBUG: */ echo "<PRE>";
//* DEBUG: */ print_r($cacheArray['ref_system']);
//* DEBUG: */ echo "</PRE>";
if ($cnt > 0) {
// Count cache hits
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
// Remove old refs
//* DEBUG: */ echo "+".$cnt."/".$old."+<br />";
$cnt -= $old;
- } // END - if
+ }
} else {
// Load current refs from database
$result_ref = SQL_QUERY_ESC("SELECT DISTINCT SUM(s.counter) AS cnt
// Get password from cache
$data['password'] = $cacheArray['admins']['password'][$admin_login];
$ret = "pass";
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
// Include more admins data?
if (GET_EXT_VERSION("admins") >= "0.7.0") {
$data['login_failtures'] = $cacheArray['admins']['login_failtures'][$admin_login];
$data['last_failture'] = $cacheArray['admins']['last_failture'][$admin_login];
} // END - if
- } elseif (EXT_IS_ACTIVE("cache")) {
+ } elseif (!EXT_IS_ACTIVE("cache")) {
$ADD = "";
if (GET_EXT_VERSION("admins") >= "0.7.0") {
// Load them here
// Initialize some variables
$done = false;
$seek++;
+ $next=-1;
$found = false;
// Is the file there and read-/write-able?
if (strpos($line, $search) > -1) { $next = 0; $found = true; }
if ($next > -1) {
- if ($next == $seek) {
+ if ($next === $seek) {
$next = -1;
$line = $prefix . $DATA . $suffix."\n";
} else {
if (isset($cacheArray['admins']['la_mode'][get_session('admin_login')])) {
// Load from cache
$ADMIN = $cacheArray['admins']['la_mode'][get_session('admin_login')];
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
} elseif (GET_EXT_VERSION("admins") >= "0.6.7") {
// Load from database when version of "admins" is enough
$result = SQL_QUERY_ESC("SELECT la_mode FROM "._MYSQL_PREFIX."_admins WHERE login='%s' LIMIT 1",
$name = $cacheArray['modules']['title'][$mod];
// Update cache hits
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
} else {
// Load from database
$result = SQL_QUERY_ESC("SELECT title FROM "._MYSQL_PREFIX."_mod_reg WHERE module='%s' LIMIT 1", array($mod), __FILE__, __LINE__);
$mem = $cacheArray['modules']['mem_only'][$mod_chk];
// Update cache hits
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
$found = true;
} else {
// No, then we have to update it!
$valPass = $cacheArray['admin_hash'];
} elseif ((!empty($passCookie)) && (isset($cacheArray['admins']['password'][$admin])) && (!empty($admin))) {
// Count cache hits
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
// Login data is valid or not?
$valPass = generatePassString($cacheArray['admins']['password'][$admin]);
$per = $cacheArray['ref_depths']['percents'][$key];
// Count cache hit
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
}
} else {
// Get referal data
$ret = $cacheArray['admins']['aid'][$login];
// Update cache hits
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
} elseif (!EXT_IS_ACTIVE("cache")) {
// Load from database
$result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_admins WHERE login='%s' LIMIT 1",
$ret = $cacheArray['admins']['password'][$login];
// Update cache hits
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
} elseif (!EXT_IS_ACTIVE("cache")) {
// Load from database
$result = SQL_QUERY_ESC("SELECT password FROM "._MYSQL_PREFIX."_admins WHERE login='%s' LIMIT 1",
$ret = $cacheArray['admins']['login'][$aid];
// Update cache hits
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
} elseif (!EXT_IS_ACTIVE("cache")) {
// Load from database
$result = SQL_QUERY_ESC("SELECT login FROM "._MYSQL_PREFIX."_admins WHERE id=%s LIMIT 1",
$ret = $cacheArray['admins']['email'][$aid];
// Update cache hits
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
} elseif (!EXT_IS_ACTIVE("cache")) {
// Load from database
$result_aid = SQL_QUERY_ESC("SELECT email FROM "._MYSQL_PREFIX."_admins WHERE id=%s LIMIT 1",
$ret = $cacheArray['admins']['def_acl'][$aid];
// Update cache hits
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
} else {
// Load from database
$result_aid = SQL_QUERY_ESC("SELECT default_acl FROM "._MYSQL_PREFIX."_admins WHERE id=%s LIMIT 1",
if (isset($cacheArray['modules']['has_menu'][$mod])) {
// Check module cache and count hit
$ret = ($cacheArray['modules']['has_menu'][$mod] == "Y");
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
} elseif (isset($cacheArray['extensions']['ext_menu'][$mod])) {
// Check cache and count hit
$ret = ($cacheArray['extensions']['ext_menu'][$mod] == "Y");
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
}
} elseif ((GET_EXT_VERSION("sql_patches") >= "0.3.6") && ((!EXT_IS_ACTIVE("cache")) || ($forceDb === true))) {
// Check database for entry
$cver = $cacheArray['themes']['theme_ver'][$name];
// Count up
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
} elseif (GET_EXT_VERSION("cache") != "0.1.8") {
// Load version from database
$result = SQL_QUERY_ESC("SELECT theme_ver FROM "._MYSQL_PREFIX."_themes WHERE theme_path='%s' LIMIT 1",
$id = $cacheArray['themes']['id'][$name];
// Count up
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
} elseif (GET_EXT_VERSION("cache") != "0.1.8") {
// Check if current theme is already imported or not
$result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_themes WHERE theme_path='%s' LIMIT 1",
$active = ($cacheArray['themes']['theme_active'][$name] == "Y");
// Count up
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
} elseif (GET_EXT_VERSION("cache") != "0.1.8") {
// Check if current theme is already imported or not
$result = SQL_QUERY_ESC("SELECT theme_active FROM "._MYSQL_PREFIX."_themes WHERE theme_path='%s' AND theme_active='Y' LIMIT 1",
$name = $cacheArray['themes']['theme_name'][$name];
// Count up
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
} elseif (GET_EXT_VERSION("cache") != "0.1.8") {
// Check if current theme is already imported or not
$result = SQL_QUERY_ESC("SELECT theme_name FROM "._MYSQL_PREFIX."_themes WHERE theme_path='%s' AND theme_name='Y' LIMIT 1",
CREATE TABLE `mxchange_admin_menu` (\r
`id` BIGINT(22) NOT NULL AUTO_INCREMENT,\r
`action` VARCHAR(255) NOT NULL DEFAULT '',\r
- `what` VARCHAR(255) NOT NULL DEFAULT '',\r
+ `what` VARCHAR(255) NULL DEFAULT NULL,\r
`title` VARCHAR(50) NOT NULL DEFAULT '',\r
`sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
`descr` blob NOT NULL,\r
DROP TABLE IF EXISTS `mxchange_guest_menu`;\r
CREATE TABLE `mxchange_guest_menu` (\r
`id` BIGINT(22) NOT NULL AUTO_INCREMENT,\r
- `action` VARCHAR(20) NOT NULL DEFAULT '',\r
- `what` VARCHAR(20) NOT NULL DEFAULT '',\r
+ `action` VARCHAR(255) NOT NULL DEFAULT '',\r
+ `what` VARCHAR(255) NULL DEFAULT NULL,\r
`title` VARCHAR(50) NOT NULL DEFAULT '',\r
`sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
`visible` ENUM('Y','N') NOT NULL DEFAULT 'Y',\r
DROP TABLE IF EXISTS `mxchange_member_menu`;\r
CREATE TABLE `mxchange_member_menu` (\r
`id` BIGINT(22) NOT NULL AUTO_INCREMENT,\r
- `action` VARCHAR(20) NOT NULL DEFAULT '',\r
- `what` VARCHAR(20) NOT NULL DEFAULT '',\r
+ `action` VARCHAR(255) NOT NULL DEFAULT '',\r
+ `what` VARCHAR(255) NULL DEFAULT NULL,\r
`title` VARCHAR(50) NOT NULL DEFAULT '',\r
`sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
`visible` ENUM('Y','N') NOT NULL DEFAULT 'Y',\r
ALTER TABLE `mxchange_user_data` ADD `joined` VARCHAR(10) NOT NULL DEFAULT 0;\r
ALTER TABLE `mxchange_config` ADD `last_update` VARCHAR(10) NOT NULL DEFAULT 0;\r
\r
-UPDATE `mxchange_member_menu` SET `locked` = 'N' WHERE 'id'='12' OR 'id'='11' LIMIT 1;\r
-\r
-UPDATE `mxchange_guest_menu` SET `counter`=0;\r
-UPDATE `mxchange_member_menu` SET `counter`=0;\r
-\r
INSERT INTO `mxchange_mod_reg` VALUES (NULL,'chk_login','N','N','N','','N',0);\r
ALTER TABLE `mxchange_pool` MODIFY `data_type` ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP';\r
ALTER TABLE `mxchange_config` ADD `unconfirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT '100';\r
\r
ALTER TABLE `mxchange_task_system` CHANGE `task_type` `task_type` VARCHAR(255) NOT NULL DEFAULT 'FIRST_USER';\r
ALTER TABLE `mxchange_user_data` MODIFY `zip` VARCHAR(6) NOT NULL DEFAULT '';\r
-ALTER TABLE `mxchange_admin_menu` MODIFY `action` VARCHAR(255) NOT NULL DEFAULT '';\r
-ALTER TABLE `mxchange_admin_menu` MODIFY `what` VARCHAR(255) NOT NULL DEFAULT '';\r
ALTER TABLE `mxchange_user_data` MODIFY `last_module` VARCHAR(255) NOT NULL DEFAULT '';\r
ALTER TABLE `mxchange_config` ADD `allow_direct_pay` ENUM('Y','N') NOT NULL DEFAULT 'N';\r
ALTER TABLE `mxchange_user_data` MODIFY `last_profile_sent` VARCHAR(10) NOT NULL DEFAULT 0;\r