if ($_CONFIG['autopurge_inactive'] == "Y") {
// Ok, let's have a look...
$since = bigintval($_CONFIG['ap_inactive_since']);
- $EXCLUDE_LIST = " AND d.userid != ".$_CONFIG['def_refid'];
+
+ // Init exclusion list
+ $EXCLUDE_LIST = "";
+ if ($_CONFIG['def_refid'] > 0) {
+ $EXCLUDE_LIST = " AND d.userid != ".$_CONFIG['def_refid'];
+ } // END - if
// Check for more extensions
- if (EXT_IS_ACTIVE("beg")) $EXCLUDE_LIST .= " AND d.userid != c.beg_uid";
- if (EXT_IS_ACTIVE("bonus")) $EXCLUDE_LIST .= " AND d.userid != c.bonus_uid";
- if (EXT_IS_ACTIVE("doubler")) $EXCLUDE_LIST .= " AND d.userid != c.doubler_uid";
+ if (EXT_IS_ACTIVE("beg")) $EXCLUDE_LIST .= " AND d.userid != ".$_CONFIG['beg_uid']."";
+ if (EXT_IS_ACTIVE("bonus")) $EXCLUDE_LIST .= " AND d.userid != ".$_CONFIG['bonus_uid']."";
+ if (EXT_IS_ACTIVE("doubler")) $EXCLUDE_LIST .= " AND d.userid != ".$_CONFIG['doubler_uid']."";
// Check for new holiday extension
if (GET_EXT_VERSION("holiday") >= "0.1.3") {
define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "523");
+define('CURR_SVN_REVISION', "524");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
if (!empty($POST['pass1'][$id])) $ADD = sprintf(", password='%s'", SQL_ESCAPE($hash));
// Get admin's ID
- $salt = substr(GET_ADMIN_HASH(get_session('admin_login')), 0, -40);
$aid = GET_ADMIN_ID(get_session('admin_login'));
+ $salt = substr(GET_ADMIN_HASH($aid), 0, -40);
// Rewrite cookie when it's own account
if ($aid == $id) {
if (EXT_IS_ACTIVE("autopurge")) {
// Start finding them...
$since = $_CONFIG['ap_inactive_since'];
- $EXCLUDE_LIST = " AND d.userid != ".$_CONFIG['def_refid']."";
+ $EXCLUDE_LIST = "";
+ if ($_CONFIG['def_refid'] > 0) {
+ $EXCLUDE_LIST = " AND d.userid != ".$_CONFIG['def_refid']."";
+ } // END - if
// Check for more extensions
if (EXT_IS_ACTIVE("beg")) $EXCLUDE_LIST .= " AND d.userid != ".$_CONFIG['beg_uid']."";
// Check for all accounts
$SQLs[] = "SELECT DISTINCT d.userid, d.email, d.last_online
FROM "._MYSQL_PREFIX."_user_data AS d
-WHERE d.status='CONFIRMED' AND d.joined < (UNIX_TIMESTAMP() - ".$since.") AND d.last_online < ".$since." AND d.ap_notified < ".$since."
+WHERE d.status='CONFIRMED' AND d.joined < (UNIX_TIMESTAMP() - ".$since.") AND d.last_online < (UNIX_TIMESTAMP() - ".$since.") AND d.ap_notified < (UNIX_TIMESTAMP() - ".$since.")
".$EXCLUDE_LIST."
ORDER BY d.userid";
$WHATs[] = "list_autopurge";
} // END - if
// Check for more extensions
-if (EXT_IS_ACTIVE("beg")) $EXCLUDE_LIST .= " AND d.userid != c.beg_uid";
-if (EXT_IS_ACTIVE("bonus")) $EXCLUDE_LIST .= " AND d.userid != c.bonus_uid";
-if (EXT_IS_ACTIVE("doubler")) $EXCLUDE_LIST .= " AND d.userid != c.doubler_uid";
+if (EXT_IS_ACTIVE("beg")) $EXCLUDE_LIST .= " AND d.userid != ".$_CONFIG['beg_uid']."";
+if (EXT_IS_ACTIVE("bonus")) $EXCLUDE_LIST .= " AND d.userid != ".$_CONFIG['bonus_uid']."";
+if (EXT_IS_ACTIVE("doubler")) $EXCLUDE_LIST .= " AND d.userid != ".$_CONFIG['doubler_uid']."";
+if (GET_EXT_VERSION("holiday") >= "0.1.3") $EXCLUDE_LIST .= " AND d.holiday_active='N'";
// Check for all accounts
$result = SQL_QUERY_ESC("SELECT DISTINCT d.userid, d.gender, d.surname, d.family, d.email, d.joined, d.last_online, d.ap_notified
$taskExt = false; // Default is that "task" is not installed
// When the admin is logging in check several things first (new jobs to complete and so on)
-if ($GLOBALS['action'] == "login")
-{
+if ($GLOBALS['action'] == "login") {
if ((EXT_IS_ACTIVE("task")) && (function_exists('OUTPUT_ADVANCED_OVERVIEW'))) {
// When task extension is registered output advanced overview page
$JOBS_DONE = OUTPUT_ADVANCED_OVERVIEW($result_tasks); // This function is provided by the extension 'task'
// Output standart overview (provided by overview-inc.php)
$JOBS_DONE = OUTPUT_STANDARD_OVERVIEW($result_tasks);
}
-}
+} // END - if
// Are there jobs to be done?
if ($JOBS_DONE) {