require($INC);
} // END - if
-// Load all includes
-$INC_POOL = GET_DIR_AS_ARRAY("inc/autopurge/", "purge-");
-
// Run the filter
-runFilterChain('load_includes', $INC_POOL);
+runFilterChain('load_includes', GET_DIR_AS_ARRAY("inc/autopurge/", "purge-"));
// Run filters for extra autopurge
runFilterChain('extra_autopurge');
// Shall I look for inactive accounts and autopurge inactive accounts?
if (getConfig('autopurge_inactive') == "Y") {
// Ok, let's have a look...
- $since = bigintval(getConfig('ap_inactive_since'));
+ $since = getConfig(('ap_inactive_since'));
// Init exclusion list
$EXCLUDE_LIST = "";
// Now let's have a look for inactive accounts we want to delete we newly use the same exclude list
// here for e.g. excluding holiday users
- $time = bigintval(getConfig('ap_in_time'));
+ $time = getConfig(('ap_in_time'));
$result_inactive = SQL_QUERY_ESC("SELECT d.userid, d.email, d.last_online
FROM `{!_MYSQL_PREFIX!}_user_data` AS d
WHERE `status`='CONFIRMED' AND joined < (UNIX_TIMESTAMP() - %s) AND last_online < (UNIX_TIMESTAMP() - %s) AND ap_notified < (UNIX_TIMESTAMP() - %s)
// Search for mails from deleted members?
if (getConfig('ap_del_mails') == "Y") {
// Okay, let's check for them...
- $since = bigintval(getConfig('ap_dm_timeout'));
+ $since = getConfig(('ap_dm_timeout'));
$result_mails = SQL_QUERY_ESC("SELECT sender\
FROM `{!_MYSQL_PREFIX!}_pool`
WHERE data_type='DELETED' AND timestamp <= (UNIX_TIMESTAMP() - %s)
$DELETED += SQL_AFFECTEDROWS();
// Reset query (to prevent possible errors) ...
- $since = bigintval(getConfig('ap_dm_timeout'));
+ $since = getConfig(('ap_dm_timeout'));
$result_mails = SQL_QUERY_ESC("SELECT sender
FROM `{!_MYSQL_PREFIX!}_pool`
WHERE data_type='DELETED' AND timestamp <= (UNIX_TIMESTAMP() - %s)
SQL_FREERESULT($result_mails);
// Now let's check for stats entries as well
- $since = bigintval(getConfig('ap_dm_timeout'));
+ $since = getConfig(('ap_dm_timeout'));
$result_mails = SQL_QUERY_ESC("SELECT sender
FROM `{!_MYSQL_PREFIX!}_user_stats`
WHERE data_type='DELETED' AND timestamp_send <= (UNIX_TIMESTAMP() - %s)
$DELETED += SQL_AFFECTEDROWS();
// Reset query (to prevent possible errors) ...
- $since = bigintval(getConfig('ap_dm_timeout'));
+ $since = getConfig(('ap_dm_timeout'));
$result_mails = SQL_QUERY_ESC("SELECT sender
FROM `{!_MYSQL_PREFIX!}_user_stats`
WHERE data_type='DELETED' AND timestamp_send <= (UNIX_TIMESTAMP() - %s)
// Check version (must be > 0.0)
if ((GET_EXT_VERSION("task") > "0.0") && (getConfig('ap_tasks') == "Y")) {
// Since when shall we purge?
- $since = bigintval(getConfig('ap_tasks_time'));
+ $since = getConfig(('ap_tasks_time'));
// Purge deleted tasks (no notification to admin)
SQL_QUERY_ESC("DELETE LOW_PRIORITY
// Shall I auto-purge unconfirmed accounts?
if (getConfig('autopurge_unconfirmed') == "Y") {
// Init variables and find unconfirmed accounts which I shall auto-purge
- $time = bigintval(getConfig('ap_un_time'));
+ $time = getConfig(('ap_un_time'));
$result_uncon = SQL_QUERY_ESC("SELECT userid, email, joined
FROM `{!_MYSQL_PREFIX!}_user_data`
WHERE `status`='UNCONFIRMED' AND joined < (UNIX_TIMESTAMP() - %s)
// Current SVN revision
//define('CURR_SVN_REVISION', getActualVersion(0));
-define('CURR_SVN_REVISION', "817");
+define('CURR_SVN_REVISION', "818");
define('CURR_SVN_DATE' , getActualVersion(1));
define('CURR_SVN_VERSION' , getActualVersion(2));
// Do we need to update cache/db counter?
//* DEBUG: */ echo "DB=".getConfig('db_hits').",CACHE=".getConfig('cache_hits')."<br />\n";
- if ((GET_EXT_VERSION("cache") >= "0.0.7") && (getConfig('db_hits') > 0) && (getConfig('cache_hits') > 0) && (is_object($GLOBALS['cache_instance']))) {
+ if ((GET_EXT_VERSION("cache") >= "0.0.7") && (getConfig('db_hits') > 0) && (getConfig('cache_hits') > 0) && (isCacheInstanceValid())) {
// Add new hits
incrementConfigEntry('db_hits', getConfig('db_hits_run'));
// Update counter for db/cache
- UPDATE_CONFIG(array("db_hits", "cache_hits"), array(bigintval(getConfig('db_hits')), bigintval(getConfig('cache_hits'))));
+ UPDATE_CONFIG(array("db_hits", "cache_hits"), array(getConfig(('db_hits')), getConfig(('cache_hits'))));
} // END - if
// Close database link and forget the link
if (empty($DOUBLER_UID)) $DOUBLER_UID = 0;
// Check for doubles which we can pay out
-$min = bigintval(getConfig('doubler_min') * 2);
+$min = getConfig(('doubler_min') * 2);
$result_total = SQL_QUERY_ESC("SELECT DISTINCT d.id, d.userid, d.points, d.remote_ip, d.timemark
FROM `{!_MYSQL_PREFIX!}_doubler` AS d
LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS u
// Count cache hits
incrementConfigEntry('cache_hits');
- } elseif ((!isset($GLOBALS['cache_instance'])) || (!is_object($GLOBALS['cache_instance']))) {
+ } elseif (!isCacheInstanceValid()) {
// Load from database
$result = SQL_QUERY_ESC("SELECT ext_version FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name='%s' LIMIT 1",
array($ext_name), __FILE__, __LINE__);
// Create instance on class
if ($GLOBALS['cacheMode'] != "init") {
// Initialize cache system only when it's needed
- $GLOBALS['cache_instance'] = new CacheSystem(getConfig('cache_update'), constant('PATH')."inc/".getConfig('cache_path'), getConfig('cache_tested'));
+ $GLOBALS['cache_instance'] = new CacheSystem(getConfig('cache_update'), "inc/".getConfig('cache_path'), getConfig('cache_tested'));
if ($GLOBALS['cache_instance']->getStatus() != "done") {
// Failed to initialize cache sustem
- addFatalMessage(__FILE__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_INITIALIZE);
+ addFatalMessage(__FILE__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_CANNOT_INITIALIZE'));
} // END - if
} // END - if
break;
LOAD_INC_ONCE("inc/gen_sql_patches.php");
// @TODO Rewrite this to a filter!
- if ((GET_EXT_VERSION("cache") >= "0.1.2") && (isset($GLOBALS['cache_instance'])) && (is_object($GLOBALS['cache_instance']))) {
+ if ((GET_EXT_VERSION("cache") >= "0.1.2") && (isCacheInstanceValid())) {
// Remove extensions and mod_reg cache file
LOAD_INC_ONCE("inc/libs/cache_functions.php");
require(sprintf("%sinc/extensions/ext-cache.php", constant('PATH')));
$keys = constant('SITE_KEY').":".constant('DATE_KEY');
if (isConfigEntrySet('secret_key')) $keys .= ":".getConfig('secret_key');
if (isConfigEntrySet('file_hash')) $keys .= ":".getConfig('file_hash');
- $keys .= ":".date("d-m-Y (l-F-T)", bigintval(getConfig('patch_ctime')));
+ $keys .= ":".date("d-m-Y (l-F-T)", getConfig(('patch_ctime')));
if (isConfigEntrySet('master_salt')) $keys .= ":".getConfig('master_salt');
// Build string from misc data
$server = $_SERVER['PHP_SELF'].":".GET_USER_AGENT().":".getenv('SERVER_SOFTWARE').":".GET_REMOTE_ADDR().":".":".filemtime(constant('PATH')."inc/databases.php");
// Build key string
- $keys = constant('SITE_KEY').":".constant('DATE_KEY').":".getConfig('secret_key').":".getConfig('file_hash').":".date("d-m-Y (l-F-T)", bigintval(getConfig('patch_ctime'))).":".getConfig('master_salt');
+ $keys = constant('SITE_KEY').":".constant('DATE_KEY').":".getConfig('secret_key').":".getConfig('file_hash').":".date("d-m-Y (l-F-T)", getConfig(('patch_ctime'))).":".getConfig('master_salt');
// Additional data
$data = $plainText.":".uniqid(mt_rand(), true).":".time();
// Is the include file there?
if (!FILE_READABLE($FQFN)) {
// Not there so log it
- DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Include file %s not found.", basename($INC)));
+ debug_report_bug(sprintf("Include file %s not found.", $INC));
return false;
} // END - if
// Rebuild cache
function rebuildCacheFiles ($cache, $inc="") {
// Shall I remove the cache file?
- if ((EXT_IS_ACTIVE("cache")) && (is_object($GLOBALS['cache_instance']))) {
+ if ((EXT_IS_ACTIVE("cache")) && (isCacheInstanceValid())) {
// Rebuild cache
if ($GLOBALS['cache_instance']->loadCacheFile($cache)) {
// Destroy it
if (!EXT_IS_ACTIVE("cache")) {
// Cache extension not active
return false;
- } elseif (!is_object($GLOBALS['cache_instance'])) {
+ } elseif (!isCacheInstanceValid()) {
// No cache instance!
DEBUG_LOG(__FUNCTION__, __LINE__, " No cache instance found.");
return false;
$GLOBALS['refid'] = bigintval(get_session('refid'));
} elseif ((GET_EXT_VERSION("sql_patches") != "") && (getConfig('def_refid') > 0)) {
// Set default refid as refid in URL
- $GLOBALS['refid'] = bigintval(getConfig('def_refid'));
+ $GLOBALS['refid'] = getConfig(('def_refid'));
} elseif ((GET_EXT_VERSION("user") >= "0.3.4") && (getConfig('select_user_zero_refid')) == "Y") {
// Select a random user which has confirmed enougth mails
$GLOBALS['refid'] = SELECT_RANDOM_REFID();
return isBooleanConstantAndTrue('DEBUG_MODE');
}
+// Checks wether the cache instance is valid
+function isCacheInstanceValid () {
+ return ((isset($GLOBALS['cache_instance'])) && (is_object($GLOBALS['cache_instance'])));
+}
+
//////////////////////////////////////////////////
// AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS //
//////////////////////////////////////////////////
var $ret = "init";
var $path = "";
var $inc = "";
+ var $fqfn = "";
var $pointer = false;
var $data = array();
var $version = array();
// Remember cache file
$this->name = $cacheName;
- // Construct FQFN (full qualified file name)
+ // COnstruct include filename for LOAD_INC_ONCE() call
$this->inc = $this->path . $cacheName . ".cache";
+ // Construct FQFN (full qualified file name)
+ $this->fqfn = constant('PATH') . $this->inc;
+
// Check if file exists and if version matches
- $status = (FILE_READABLE($this->inc) && (is_writeable($this->inc)) && ($this->extensionVersionMatches("cache")));
+ $status = ($this->isCacheReadable() && (is_writeable($this->fqfn)) && ($this->extensionVersionMatches("cache")));
// Return status
return $status;
}
+ // Initializes the cache file
function init () {
// This will destory an existing cache file!
if ($this->ret == "done") {
// Create file
- if (FILE_READABLE($this->inc)) chmod($this->inc, 0666);
- $this->pointer = fopen($this->inc, 'w') or mxchange_die("Cannot write to cache ".$this->inc." !");
+ if ($this->isCacheReadable()) chmod($this->fqfn, 0666);
+ $this->pointer = fopen($this->fqfn, 'w') or mxchange_die("Cannot write to cache ".$this->fqfn." !");
// Add open PHP tag
fwrite($this->pointer, "<?php\n");
$this->storeExtensionVersion("cache");
} else {
// Cannot create file
- addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+ addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
}
}
}
} else {
// Cannot create file
- addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+ addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
}
}
fclose($this->pointer);
// Set rights
- if (FILE_READABLE($this->inc)) chmod($this->inc, 0666);
+ if ($this->isCacheReadable()) chmod($this->fqfn, 0666);
// Remove pointer
$this->pointer = false;
} // END - if
// Is the cache file there?
- if (FILE_READABLE($this->inc)) {
+ if ($this->isCacheReadable()) {
// Prepare temporary array
$data = array();
$cache_version = null;
// Load cache file
- LOAD_INC_ONCE($this->inc);
+ require($this->inc);
// Is there an array?
if (is_array($data)) {
}
} else {
// Cache file not found or not readable
- addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_LOAD_1.$this->inc.CACHE_CANNOT_LOAD_2);
+ addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_LOAD_1.$this->fqfn.CACHE_CANNOT_LOAD_2);
}
}
// Destroy an existing cache file
function destroyCacheFile () {
// Is the cache file there?
- if ((!isset($this->rebuilt[$this->name])) && (FILE_READABLE($this->inc))) {
+ if ((!isset($this->rebuilt[$this->name])) && ($this->isCacheReadable())) {
// Close cache
$this->finalize();
// Remove cache file from system
//* DEBUG: */ print __METHOD__."(<font color=\"#0000aa\">".__LINE__."</font>): {$this->name} - DESTROYED!<br />\n";
- unlink($this->inc);
+ unlink($this->fqfn);
// Is the file there?
- if (!FILE_READABLE($this->inc)) {
+ if (!$this->isCacheReadable()) {
// The cache does no longer exist so kill the content
unset($this->data[$this->name]);
unset($this->version[$this->name]);
$this->rebuilt[$this->name] = true;
} else {
// Not removed!
- addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_UNLINK_1.$this->inc.CACHE_CANNOT_UNLINK_2);
+ addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_UNLINK_1.$this->fqfn.CACHE_CANNOT_UNLINK_2);
}
} // END - if
}
// Unused method:
function removeEntry ($search, $data, $array) {
- if ((FILE_READABLE($this->inc)) && (is_writeable($this->inc))) {
+ if (($this->isCacheReadable()) && (is_writeable($this->fqfn))) {
// Load cache into dummy array
$dummy = $this->getArrayFromCache();
}
} else {
// Cannot write to cache!
- addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+ addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
}
}
} // END - foreach
} else {
// Cannot write array!
- addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+ addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
}
}
// Unused method
function replaceEntry ($search, $replace, $search_key, $array) {
- if ((FILE_READABLE($this->inc)) && (is_writeable($this->inc))) {
+ if (($this->isCacheReadable()) && (is_writeable($this->fqfn))) {
// Load cache into dummy array
$dummy = $this->getArrayFromCache();
} // END - if
} else {
// Cannot write to cache!
- addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+ addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
}
}
+ // Writes the version of given extension to the cache file
function storeExtensionVersion ($ext_name) {
// Valid cache pointer?
if (is_resource($this->pointer)) {
//* DEBUG: */ print __METHOD__."(<font color=\"#0000aa\">".__LINE__."</font>): {$this->name} - {$ext_name}={$ext_ver}<br />\n";
} else {
// Cannot create file
- addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+ addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
}
}
+ // Checks wether versions from cache and extension matches
function extensionVersionMatches ($ext_name) {
// Load cache (dummy)
$this->getArrayFromCache();
//* DEBUG: */ print __METHOD__."(<font color=\"#0000aa\">".__LINE__."</font>): cache={$this->name},ext_name={$ext_name} - {$ext_ver}/{$this->version[$this->name][$ext_name]}<br />\n";
} else {
// No cache version found!
- DEBUG_LOG(__METHOD__, __LINE__, "Cache {$this->name} has missing entry for extension {$ext_name}!");
+ DEBUG_LOG(__METHOD__, __LINE__, "Cache {$this->name} has missing version entry for extension {$ext_name}!");
}
// Compare both
return ((isset($this->version[$this->name][$ext_name])) && ($this->version[$this->name][$ext_name] == $ext_ver));
}
+ // Rewrit the entry so it can be stored in cache file
+ // @TODO Add support for more types which break in last else-block
function rewriteEntry ($key, $value) {
// Init line
$line = "";
} elseif (is_bool($value)) {
// Boolean value
if ($value === true) {
+ // True
$line = "\$data['".$key."'][] = true;\n";
} else {
+ // False
$line = "\$data['".$key."'][] = false;\n";
}
} else {
return $line;
}
+ // Getter for cache status
function getStatus () {
return $this->ret;
}
-}
+
+ // Checks wether the current cache file is readable
+ function isCacheReadable () {
+ return INCLUDE_READABLE($this->inc);
+ }
+} // END - class
// Destroy the cache on extension changes
function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($data) {
return $nextId;
}
// -----------------------------------------------------------------------------
-// PLEASE DO NOT ADD ANY OTHER FUNCTIONS BELOW THIS LINE ELSE THEY "WRAP" THE
-// $GLOBALS['cache_array']['surfbar'] ARRAY!
+// PLEASE DO NOT ADD ANY OTHER FUNCTIONS BELOW THIS LINE IF THEY DON'T "WRAP"
+// THE $GLOBALS['cache_array']['surfbar'] ARRAY!
// -----------------------------------------------------------------------------
// Private getter for data elements
function SURFBAR_GET_DATA ($element) {
} // END - if
// Add more request data
- $requestData['api_id'] = bigintval(getConfig('wernis_api_id'));
+ $requestData['api_id'] = getConfig(('wernis_api_id'));
$requestData['api_key'] = getConfig('wernis_api_md5');
// Construct the request string
// Prepare the low-level request
$requestString = sprintf("http://www.yoomedia.de/interface_2.0/%s?id=%s&sid=%s&pw=%s&reload=%s&ma=%s&uebrig=%s&verguetung=%s&erotik=%s",
$script,
- bigintval(getConfig('yoomedia_id')),
- bigintval(getConfig('yoomedia_sid')),
+ getConfig(('yoomedia_id')),
+ getConfig(('yoomedia_sid')),
getConfig('yoomedia_passwd'),
- bigintval(getConfig('yoomedia_tm_max_reload')),
- bigintval(getConfig('yoomedia_tm_min_wait')),
- bigintval(getConfig('yoomedia_tm_clicks_remain')),
- bigintval(getConfig('yoomedia_tm_min_pay')),
- bigintval(getConfig('yoomedia_erotic_allowed'))
+ getConfig(('yoomedia_tm_max_reload')),
+ getConfig(('yoomedia_tm_min_wait')),
+ getConfig(('yoomedia_tm_clicks_remain')),
+ getConfig(('yoomedia_tm_min_pay')),
+ getConfig(('yoomedia_erotic_allowed'))
);
// Run the query
require($INC);
}
-// Load more cache includes
-$INC_POOL = GET_DIR_AS_ARRAY("inc/loader/", "load_cache-");
-
// Run the filter
-runFilterChain('load_includes', $INC_POOL);
+runFilterChain('load_includes', GET_DIR_AS_ARRAY("inc/loader/", "load_cache-"));
//
?>
* -------------------------------------------------------------------- *
* Kurzbeschreibung : Alle Erweiterungen laden *
* -------------------------------------------------------------------- *
+ * @TODO Rewrite this whole file to load_cache-extensions.php *
+ * -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2008 by Roland Haeder *
$GLOBALS['cache_instance']->destroyCacheFile();
// Retry it
- LOAD_INC(__FILE__);
+ require(__FILE__);
return;
} // END - if
// Close cache
$GLOBALS['cache_instance']->finalize();
- // Reload the cache
- LOAD_INC(__FILE__);
+ // Include loader again
+ require(__FILE__);
}
// Next cached table are the admins_acls...
// Close cache
$GLOBALS['cache_instance']->finalize();
- // Reload the cache
- LOAD_INC(__FILE__);
+ // Include loader again
+ require(__FILE__);
}
} // END - if
// Close the cache
$GLOBALS['cache_instance']->finalize();
- // Reload the cache
- LOAD_INC(__FILE__);
+ // Include loader again
+ require(__FILE__);
}
//
// Close the cache
$GLOBALS['cache_instance']->finalize();
- // Reload the cache
- LOAD_INC(__FILE__);
+ // Include loader again
+ require(__FILE__);
}
//
// Close the cache
$GLOBALS['cache_instance']->finalize();
- // Reload the cache
- LOAD_INC(__FILE__);
+ // Include loader again
+ require(__FILE__);
}
//
// Close the cache
$GLOBALS['cache_instance']->finalize();
- // Reload the cache
- LOAD_INC(__FILE__);
+ // Include loader again
+ require(__FILE__);
}
//
// Close the cache
$GLOBALS['cache_instance']->finalize();
- // Reload the cache
- LOAD_INC(__FILE__);
+ // Include loader again
+ require(__FILE__);
}
//
$GLOBALS['menu']['title'] = array();
// Is there a cache instance?
- if ((isset($GLOBALS['cache_instance'])) && (is_object($GLOBALS['cache_instance'])) && (getConfig('cache_admin_menu') == "Y")) {
+ if ((isCacheInstanceValid()) && (getConfig('cache_admin_menu') == "Y")) {
// Create cache name
$cacheName = "admin_".$act."_".$wht."_".GET_LANGUAGE()."_".strtolower(get_session('admin_login'));
eval($eval);
// Is there a cache instance again?
- if ((isset($GLOBALS['cache_instance'])) && (is_object($GLOBALS['cache_instance'])) && (getConfig('cache_admin_menu') == "Y")) {
+ if ((isCacheInstanceValid()) && (getConfig('cache_admin_menu') == "Y")) {
// Init cache
$GLOBALS['cache_instance']->init($cacheName);
} else {
// Prepare data for template output
$content = array(
- 'min_payout' => bigintval(getConfig('primera_min_payout')),
- 'min_withdraw' => bigintval(getConfig('primera_min_withdraw')),
+ 'min_payout' => getConfig(('primera_min_payout')),
+ 'min_withdraw' => getConfig(('primera_min_withdraw')),
'api_name' => getConfig('primera_api_name'),
'api_md5' => getConfig('primera_api_md5'),
'refid' => getConfig('primera_refid')
} else {
// Prepare content
$content = array(
- 'refback_min_perc' => bigintval(getConfig('refback_min_perc')),
- 'refback_max_perc' => bigintval(getConfig('refback_max_perc'))
+ 'refback_min_perc' => getConfig(('refback_min_perc')),
+ 'refback_max_perc' => getConfig(('refback_max_perc'))
);
// Add more content
}
// Prepare constants for template
-define('__TRANS_MAX_VALUE' , bigintval(getConfig('transfer_max')));
-define('__TRANS_BALANCE_VALUE', bigintval(getConfig('transfer_balance')));
-define('__TRANS_CODE_VALUE' , bigintval(getConfig('transfer_code')));
+define('__TRANS_MAX_VALUE' , getConfig(('transfer_max')));
+define('__TRANS_BALANCE_VALUE', getConfig(('transfer_balance')));
+define('__TRANS_CODE_VALUE' , getConfig(('transfer_code')));
// Autppurge expired transfer entries?
switch (getConfig('ap_transfer')) {
} else {
// Prepare data for template output
$content = array(
- 'min_payout' => bigintval(getConfig('wernis_min_payout')),
- 'min_withdraw' => bigintval(getConfig('wernis_min_withdraw')),
- 'api_id' => bigintval(getConfig('wernis_api_id')),
+ 'min_payout' => getConfig(('wernis_min_payout')),
+ 'min_withdraw' => getConfig(('wernis_min_withdraw')),
+ 'api_id' => getConfig(('wernis_api_id')),
'api_md5' => getConfig('wernis_api_md5'),
'api_url' => getConfig('wernis_api_url'),
- 'refid' => bigintval(getConfig('wernis_refid')),
+ 'refid' => getConfig(('wernis_refid')),
'payout_factor' => TRANSLATE_COMMA(getConfig('wernis_payout_factor')),
'withdraw_factor' => TRANSLATE_COMMA(getConfig('wernis_withdraw_factor')),
'payout_fee_percent' => TRANSLATE_COMMA(getConfig('wernis_payout_fee_percent')),
'withdraw_fee_percent' => TRANSLATE_COMMA(getConfig('wernis_withdraw_fee_percent')),
- 'payout_fee_fix' => bigintval(getConfig('wernis_payout_fee_fix')),
- 'withdraw_fee_fix' => bigintval(getConfig('wernis_withdraw_fee_fix'))
+ 'payout_fee_fix' => getConfig(('wernis_payout_fee_fix')),
+ 'withdraw_fee_fix' => getConfig(('wernis_withdraw_fee_fix'))
);
// Prepare payout Y/N selection
} else {
// Prepare content
$content = array(
- 'yoomedia_id' => bigintval(getConfig('yoomedia_id')),
- 'yoomedia_sid' => bigintval(getConfig('yoomedia_sid')),
+ 'yoomedia_id' => getConfig(('yoomedia_id')),
+ 'yoomedia_sid' => getConfig(('yoomedia_sid')),
'yoomedia_passwd' => getConfig('yoomedia_passwd'),
- 'yoomedia_tm_max_reload' => bigintval(getConfig('yoomedia_tm_max_reload')),
- 'yoomedia_tm_min_wait' => bigintval(getConfig('yoomedia_tm_min_wait')),
- 'yoomedia_tm_clicks_remain' => bigintval(getConfig('yoomedia_tm_clicks_remain')),
- 'yoomedia_tm_min_pay' => bigintval(getConfig('yoomedia_tm_min_pay'))
+ 'yoomedia_tm_max_reload' => getConfig(('yoomedia_tm_max_reload')),
+ 'yoomedia_tm_min_wait' => getConfig(('yoomedia_tm_min_wait')),
+ 'yoomedia_tm_clicks_remain' => getConfig(('yoomedia_tm_clicks_remain')),
+ 'yoomedia_tm_min_pay' => getConfig(('yoomedia_tm_min_pay'))
);
// Erotic?
// I have removed the addional test for the stored timemark in database or you cannot find
// new updates on my server when you haven't installed it before I upload a patch... :-(
- if (bigintval($TEST) > bigintval(getConfig('patch_level'))) {
+ if (bigintval($TEST) > getConfig(('patch_level'))) {
// Copy every data from the response array
$PATCHES['fname'][] = str_replace("\n", "", $response[$idx * 5 + 2]);
$PATCHES['fsize'][] = str_replace("\n", "", $response[$idx * 5 + 3]);
// Is the mode set (payout only)
if (!REQUEST_ISSET_GET(('mode'))) {
// Get referal id
- $content['refid'] = bigintval(getConfig('primera_refid'));
+ $content['refid'] = getConfig(('primera_refid'));
// Get Primus id
$result = SQL_QUERY_ESC("SELECT primera_userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PRIMERA_MEMBER_INVALID_AMOUNT'));
} elseif (REQUEST_POST('amount') < getConfig('primera_min_payout')) {
// Not enougth entered!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('PRIMERA_MEMBER_AMOUNT_SMALLER_MIN'), bigintval(getConfig('primera_min_payout'))));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('PRIMERA_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('primera_min_payout'))));
} elseif (REQUEST_POST('amount') > $points) {
// Not enougth points left!
LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('PRIMERA_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(REQUEST_POST('amount')), bigintval($points)));
// Is the mode set (withdraw or payout)
if ((!REQUEST_ISSET_GET(('mode'))) || (REQUEST_GET('mode') == "choose")) {
// Let the user choose what he wants to do
- $content['refid'] = bigintval(getConfig('wernis_refid'));
+ $content['refid'] = getConfig(('wernis_refid'));
$content['wds66_id'] = 0;
// Get WDS66 id
case "withdraw": // Widthdraws WDS66 -> This exchange
if (REQUEST_POST('amount') < getConfig('wernis_min_withdraw')) {
// Not enougth entered!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), bigintval(getConfig('wernis_min_withdraw'))));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('wernis_min_withdraw'))));
} else {
// All is fine here so do the withdraw
$success = WERNIS_EXECUTE_WITHDRAW(REQUEST_POST('wds66_id'), md5(REQUEST_POST('wds66_password')), REQUEST_POST('amount'));
case "payout": // Payout this exchange -> WDS66
if (REQUEST_POST('amount') < getConfig('wernis_min_payout')) {
// Not enougth entered!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), bigintval(getConfig('wernis_min_payout'))));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('wernis_min_payout'))));
} elseif (REQUEST_POST('amount') > $points) {
// Not enougth points left!
LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(REQUEST_POST('amount')), bigintval($points)));
if (($curr != getConfig('last_month')) && (getConfig('last_month') > 0) && (getConfig('beg_ranks') > 0) && ($GLOBALS['output_mode'] != 1)) {
// Extension "autopurge" is inactive or purging of inactive accounts is deactivated
$whereStatement1 = "";
- $whereStatement2 = bigintval(getConfig('beg_ranks'));
+ $whereStatement2 = getConfig(('beg_ranks'));
// Shall we exclude webmaster's own userid?
if ((getConfig('beg_include_own') != "Y") && (getConfig('beg_uid') > 0)) {
// Exclude it
- $whereStatement1 = sprintf(" AND userid != %s", bigintval(getConfig('beg_uid')));
+ $whereStatement1 = sprintf(" AND userid != %s", getConfig(('beg_uid')));
} // END - if
// Let's check if there are some points left we can "pay"...
// Use last online stamp only when autopurge for inactive members is activated
if ((getConfig('ap_inactive_since') > 0) && (getConfig('beg_active') == "Y")) {
// Okay, include last online timestamp
- $whereStatement1 .= sprintf(" AND last_online >= (UNIX_TIMESTAMP() - %s)", bigintval(getConfig('ap_inactive_since')));;
+ $whereStatement1 .= sprintf(" AND last_online >= (UNIX_TIMESTAMP() - %s)", getConfig(('ap_inactive_since')));;
} // END - if
} // END - if
if (($curr != getConfig('last_month')) && (getConfig('bonus_ranks') > 0) && ($GLOBALS['output_mode'] != 1)) {
// Extension "autopurge" is inactive or purging of inactive accounts is deactivated
$whereStatement1 = "WHERE `status`='CONFIRMED'";
- $whereStatement2 = bigintval(getConfig('bonus_ranks'));
+ $whereStatement2 = getConfig(('bonus_ranks'));
// Shall I keep inactive members away from here? (mostly wanted in an "active-rallye" ...)
if (EXT_IS_ACTIVE("autopurge")) {
if (getConfig('ap_inactive_since') > 0) {
// Okay, include last online timestamp
$whereStatement1 = sprintf("WHERE `status`='CONFIRMED' AND last_online >= (UNIX_TIMESTAMP() - %s)", getConfig('ap_inactive_since'));
- $whereStatement2 = bigintval(getConfig('bonus_ranks'));
+ $whereStatement2 = getConfig(('bonus_ranks'));
} // END - if
} // END - if
// Init counter
$GLOBALS['pool_cnt'] = 0;
-// Load more cache includes
-$INC_POOL = GET_DIR_AS_ARRAY("inc/pool/", "pool-");
-
// Run the filter
-runFilterChain('load_includes', $INC_POOL);
+runFilterChain('load_includes', GET_DIR_AS_ARRAY("inc/pool/", "pool-"));
// Remove counter again
unset($GLOBALS['pool_cnt']);