Rewrites of more constants
authorRoland Häder <roland@mxchange.org>
Wed, 4 Mar 2009 05:29:57 +0000 (05:29 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 4 Mar 2009 05:29:57 +0000 (05:29 +0000)
32 files changed:
inc/check-reset.php
inc/databases.php
inc/db/lib-mysql3.php
inc/extensions/ext-autopurge.php
inc/extensions/ext-birthday.php
inc/extensions/ext-bonus.php
inc/extensions/ext-doubler.php
inc/extensions/ext-newsletter.php
inc/extensions/ext-order.php
inc/extensions/ext-profile.php
inc/extensions/ext-transfer.php
inc/functions.php
inc/mails/_mails.php
inc/mails/birthday_mails.php
inc/monthly/monthly_
inc/monthly/monthly_beg.php
inc/monthly/monthly_bonus.php
inc/monthly/monthly_newsletter.php
inc/monthly/monthly_surfbar.php
inc/pool-update.php
inc/pool/pool-bonus.php
inc/pool/pool-user.php
inc/reset/reset_
inc/reset/reset_beg.php
inc/reset/reset_bonus.php
inc/reset/reset_daily.php
inc/reset/reset_engine.php
inc/reset/reset_holiday.php
inc/reset/reset_surfbar.php
inc/reset/reset_yoomedia.php
inc/weekly/weekly_
inc/weekly/weekly_surfbar.php

index 98e515afb74699e6c0a50b82bf587cc6fbed9a01..db958c863310efef7efc3459c73bb6ae9b2ff074 100644 (file)
@@ -37,17 +37,14 @@ if (!defined('__SECURITY')) {
        require($INC);
 }
 
        require($INC);
 }
 
-// 01    2              3             32        2         3321    12        3                     32    2                    21    1                        2                    21    1                        2                  21    1                  23          321    1                            10
-if ((date("d", getConfig('last_update')) != date("d", time())) && ((!defined('mxchange_installing')) || (!mxchange_installing)) && (isInstalled()) && (isAdminRegistered()) && (!REQUEST_ISSET_GET(('register'))) && ($GLOBALS['output_mode'] != 1)) {
-       // Do daily things in external PHP file but only when script is completely setup
-       // Daily reset was run!
-       define('__DAILY_RESET', true);
+// Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D
+// 01    2              3             32        2         3321    1             221    1           221    1                 221    1                  23          321    1                            10
+if ((date("d", getConfig('last_update')) != date("d", time())) && (!isInstalling()) && (isInstalled()) && (isAdminRegistered()) && (!REQUEST_ISSET_GET(('register'))) && ($GLOBALS['output_mode'] != 1)) {
+       // Tell every module we are in reset-mode!
+       enableResetMode();
 
 
-       // Add more includes
-       $INC_POOL = RESET_ADD_INCLUDES();
-
-       // Run the filter
-       runFilterChain('load_includes', $INC_POOL);
+       // Run all includes
+       runResetIncludes();
 } // END - if
 
 //
 } // END - if
 
 //
index 1d69f84613566d40e09d4dd5edbb8eae4aca1637..1f7f7d767d0e91f7c95d3646ed6f5513c9b5996c 100644 (file)
@@ -98,7 +98,7 @@ define('SERVER_URL', "http://www.mxchange.org");
 
 // Current SVN revision
 //define('CURR_SVN_REVISION', getActualVersion(0));
 
 // Current SVN revision
 //define('CURR_SVN_REVISION', getActualVersion(0));
-define('CURR_SVN_REVISION', "810");
+define('CURR_SVN_REVISION', "811");
 define('CURR_SVN_DATE'    , getActualVersion(1));
 define('CURR_SVN_VERSION' , getActualVersion(2));
 
 define('CURR_SVN_DATE'    , getActualVersion(1));
 define('CURR_SVN_VERSION' , getActualVersion(2));
 
index a9485c6070aa87e2cdd87b2fbe4e205def5326bb..2e8799d9c60dde95b38409806475de94bb47108e 100644 (file)
@@ -73,7 +73,7 @@ Query string:<br />
        // Debug output
        //* DEBUG: */ print "Query=<pre>".$sql_string."</pre>, affected=<strong>".SQL_AFFECTEDROWS()."</strong>, numrows=<strong>".SQL_NUMROWS($result)."</strong><br />\n";
 
        // Debug output
        //* DEBUG: */ print "Query=<pre>".$sql_string."</pre>, affected=<strong>".SQL_AFFECTEDROWS()."</strong>, numrows=<strong>".SQL_NUMROWS($result)."</strong><br />\n";
 
-       if (($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1") && (isBooleanConstantAndTrue('DEBUG_MODE')) && (isBooleanConstantAndTrue('DEBUG_SQL'))) {
+       if (($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1") && (isDebugModeEnabled()) && (isBooleanConstantAndTrue('DEBUG_SQL'))) {
                //
                // Debugging stuff...
                //
                //
                // Debugging stuff...
                //
index cfee1ba5fb21c9b6689d8445e93e222585f0111a..006c3c8351e033e1615e0741ae1763e71059bbbd 100644 (file)
@@ -251,7 +251,7 @@ case "test": // For testing purposes. For details see file inc/modules/admin/wha
 
 default: // Do stuff when extension is loaded
        // Do we have a daily-reset-run?
 
 default: // Do stuff when extension is loaded
        // Do we have a daily-reset-run?
-       if (isBooleanConstantAndTrue('__DAILY_RESET') && (!isBooleanConstantAndTrue('DEBUG_MODE')) && ($GLOBALS['output_mode'] != 1)) {
+       if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
                // Yes, we have. So let's auto-purge some campaigns, inactive users and unconfirmed accounts
                $INC_POOL[] = sprintf("%sinc/autopurge.php", constant('PATH'));
        }
                // Yes, we have. So let's auto-purge some campaigns, inactive users and unconfirmed accounts
                $INC_POOL[] = sprintf("%sinc/autopurge.php", constant('PATH'));
        }
index 8440fbe9c5cc5f4dd817d3d837b254d545622873..99761ac17abdbea9e92b95d0fe5fc68a886aeffb 100644 (file)
@@ -190,7 +190,7 @@ case "test": // For testing purposes. For details see file inc/modules/admin/wha
        break;
 
 default: // Do stuff when extension is loaded
        break;
 
 default: // Do stuff when extension is loaded
-       if ((isBooleanConstantAndTrue('__DAILY_RESET')) && (getConfig('birthday_points') > 0)) {
+       if ((isResetModeEnabled()) && (getConfig('birthday_points') > 0)) {
                // Daily reset was run and we shall pay points so we start checking for members who
                // has a birthday for today
                $INC_POOL[] = sprintf("%sinc/mails/birthday_mails.php", constant('PATH'));
                // Daily reset was run and we shall pay points so we start checking for members who
                // has a birthday for today
                $INC_POOL[] = sprintf("%sinc/mails/birthday_mails.php", constant('PATH'));
index 5cd454cb4eefec8607092f097726d34f4cbc4ae6..0594eb1601cbe442e9de16878947016044dd6a87 100644 (file)
@@ -543,7 +543,7 @@ case "test": // For testing purposes. For details see file inc/modules/admin/wha
        break;
 
 default: // Do stuff when extension is loaded
        break;
 
 default: // Do stuff when extension is loaded
-       if (isBooleanConstantAndTrue('__DAILY_RESET') && (!isBooleanConstantAndTrue('DEBUG_MODE')) && ($GLOBALS['output_mode'] != 1)) {
+       if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
                // Daily reset was run so let's check if active rallye is activated
                if (getConfig('bonus_active') == "Y") {
                        // Run active rallye
                // Daily reset was run so let's check if active rallye is activated
                if (getConfig('bonus_active') == "Y") {
                        // Run active rallye
index 7168680756b3354fc7463d895e4abce023293857..3e1b249ca704c2a10dd5917f18452d32bee3a464 100644 (file)
@@ -235,7 +235,7 @@ case "test": // For testing purposes. For details see file inc/modules/admin/wha
        break;
 
 default: // Do stuff when extension is loaded
        break;
 
 default: // Do stuff when extension is loaded
-       if ((isBooleanConstantAndTrue('__DAILY_RESET')) && (getConfig('doubler_send_mode') == "RESET")) {
+       if ((isResetModeEnabled()) && (getConfig('doubler_send_mode') == "RESET")) {
                // So let's check for points
                $INC_POOL[] = sprintf("%sinc/doubler_send.php", constant('PATH'));
        }
                // So let's check for points
                $INC_POOL[] = sprintf("%sinc/doubler_send.php", constant('PATH'));
        }
index d1cfa7c924df1addd0b28e1ecc757b095d92d1f3..176d0c9d9bdbfab72edd98f9f55788d8abefd6ed 100644 (file)
@@ -164,7 +164,7 @@ default: // Do stuff when extension is loaded
                '2','3','4','5','6','7','8','9'
        );
 
                '2','3','4','5','6','7','8','9'
        );
 
-       if (isBooleanConstantAndTrue('__DAILY_RESET') && (!isBooleanConstantAndTrue('DEBUG_MODE')) && ($GLOBALS['output_mode'] != 1)) {
+       if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
                // Daily reset was run so let's check out for expired newsletter orders
                $INC_POOL[] = sprintf("%sinc/monthly/monthly_newsletter.php", constant('PATH'));
        }
                // Daily reset was run so let's check out for expired newsletter orders
                $INC_POOL[] = sprintf("%sinc/monthly/monthly_newsletter.php", constant('PATH'));
        }
index 69385eec0a1a7f2915ea829e4e24561bec59da70..a3b21b78cc3aa900ccf2e0658e24ac7aa01374dd 100644 (file)
@@ -317,7 +317,7 @@ case "test": // For testing purposes. For details see file inc/modules/admin/wha
 
 default: // Do stuff when extension is loaded
        // Do daily reset only when installed and extension version is at least 0.1.1
 
 default: // Do stuff when extension is loaded
        // Do daily reset only when installed and extension version is at least 0.1.1
-       if ((isBooleanConstantAndTrue('__DAILY_RESET')) && (isInstalled()) && (isAdminRegistered()) && (GET_EXT_VERSION("order") >= "0.1.1")) {
+       if ((isResetModeEnabled()) && (isInstalled()) && (isAdminRegistered()) && (GET_EXT_VERSION("order") >= "0.1.1")) {
                // Reset mail order values
                $result_ext = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET mail_orders=0 WHERE mail_orders > 0", __FILE__, __LINE__);
        } // END - if
                // Reset mail order values
                $result_ext = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET mail_orders=0 WHERE mail_orders > 0", __FILE__, __LINE__);
        } // END - if
index 44cd9f70e08a427583a2981eb089da3b116378ea..55c69a7b2931db67e2b1d3e16cc90323ff548824 100644 (file)
@@ -120,7 +120,7 @@ case "test": // For testing purposes. For details see file inc/modules/admin/wha
 
 default: // Do stuff when extension is loaded
        // Do we have a daily-reset-run?
 
 default: // Do stuff when extension is loaded
        // Do we have a daily-reset-run?
-       if (isBooleanConstantAndTrue('__DAILY_RESET') && (!isBooleanConstantAndTrue('DEBUG_MODE')) && ($GLOBALS['output_mode'] != 1)) {
+       if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
                // So let's check for profiles which needs an update
                $INC_POOL[] = sprintf("%sinc/profile-updte.php", constant('PATH'));
        }
                // So let's check for profiles which needs an update
                $INC_POOL[] = sprintf("%sinc/profile-updte.php", constant('PATH'));
        }
index d32958f0372b6562617fe231b22b24fdb189f308..911997a132bb56eafb51a8acc413ffc075a3d909 100644 (file)
@@ -277,7 +277,7 @@ case "test": // For testing purposes. For details see file inc/modules/admin/wha
        break;
 
 default: // Do stuff when extension is loaded
        break;
 
 default: // Do stuff when extension is loaded
-       if ((isBooleanConstantAndTrue('__DAILY_RESET')) && (getConfig('ap_transfer') == "Y")) {
+       if ((isResetModeEnabled()) && (getConfig('ap_transfer') == "Y")) {
                // Automatically remove outdated or not displayed transactions
                TRANSFER_AUTPPURGE(getConfig('transfer_max'), getConfig('transfer_age'));
        }
                // Automatically remove outdated or not displayed transactions
                TRANSFER_AUTPPURGE(getConfig('transfer_max'), getConfig('transfer_age'));
        }
index e9196a01fd848bc86b79f00f939c16e5353f617c..d10e1f844d0a7b2f33fa5b379f7453d90486bc03 100644 (file)
@@ -382,7 +382,7 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) {
                        // Output direct
                        OUTPUT_HTML($ret);
                }
                        // Output direct
                        OUTPUT_HTML($ret);
                }
-       } elseif (isBooleanConstantAndTrue('DEBUG_MODE')) {
+       } elseif (isDebugModeEnabled()) {
                // Warning, empty output!
                return "E:".$template."<br />\n";
        }
                // Warning, empty output!
                return "E:".$template."<br />\n";
        }
@@ -435,7 +435,7 @@ function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML = "N", $FROM = "") {
                        // Append header
                        $FROM .= LOAD_EMAIL_TEMPLATE("header");
                }
                        // Append header
                        $FROM .= LOAD_EMAIL_TEMPLATE("header");
                }
-       } elseif (isBooleanConstantAndTrue('DEBUG_MODE')) {
+       } elseif (isDebugModeEnabled()) {
                if (empty($FROM)) {
                        // Load email header template
                        $FROM = LOAD_EMAIL_TEMPLATE("header");
                if (empty($FROM)) {
                        // Load email header template
                        $FROM = LOAD_EMAIL_TEMPLATE("header");
@@ -455,7 +455,7 @@ function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML = "N", $FROM = "") {
 
        // Fix HTML parameter (default is no!)
        if (empty($HTML)) $HTML = "N";
 
        // Fix HTML parameter (default is no!)
        if (empty($HTML)) $HTML = "N";
-       if (isBooleanConstantAndTrue('DEBUG_MODE')) {
+       if (isDebugModeEnabled()) {
                // In debug mode we want to display the mail instead of sending it away so we can debug this part
                print("<pre>
 ".htmlentities(trim($FROM))."
                // In debug mode we want to display the mail instead of sending it away so we can debug this part
                print("<pre>
 ".htmlentities(trim($FROM))."
@@ -882,7 +882,7 @@ function LOAD_EMAIL_TEMPLATE($template, $content=array(), $UID="0") {
 <br /><br />";
 
                // Debug mode not active? Then remove the HTML tags
 <br /><br />";
 
                // Debug mode not active? Then remove the HTML tags
-               if (!isBooleanConstantAndTrue('DEBUG_MODE')) $newContent = strip_tags($newContent);
+               if (!isDebugModeEnabled()) $newContent = strip_tags($newContent);
        } else {
                // No template name supplied!
                $newContent = getMessage('NO_TEMPLATE_SUPPLIED');
        } else {
                // No template name supplied!
                $newContent = getMessage('NO_TEMPLATE_SUPPLIED');
@@ -2961,7 +2961,7 @@ function merge_array ($array1, $array2) {
 // Debug message logger
 function DEBUG_LOG ($funcFile, $line, $message, $force=true) {
        // Is debug mode enabled?
 // Debug message logger
 function DEBUG_LOG ($funcFile, $line, $message, $force=true) {
        // Is debug mode enabled?
-       if ((isBooleanConstantAndTrue('DEBUG_MODE')) || ($force === true)) {
+       if ((isDebugModeEnabled()) || ($force === true)) {
                // Log this message away
                $fp = fopen(constant('PATH')."inc/cache/debug.log", 'a') or mxchange_die("Cannot write logfile debug.log!");
                fwrite($fp, date("d.m.Y|H:i:s", time())."|".basename($funcFile)."|".$line."|".strip_tags($message)."\n");
                // Log this message away
                $fp = fopen(constant('PATH')."inc/cache/debug.log", 'a') or mxchange_die("Cannot write logfile debug.log!");
                fwrite($fp, date("d.m.Y|H:i:s", time())."|".basename($funcFile)."|".$line."|".strip_tags($message)."\n");
@@ -3013,11 +3013,11 @@ function GET_DIR_AS_ARRAY ($baseDir, $prefix) {
 }
 
 // Load more reset scripts
 }
 
 // Load more reset scripts
-function RESET_ADD_INCLUDES () {
+function runResetIncludes () {
        // Is the reset set or old sql_patches?
        // Is the reset set or old sql_patches?
-       if ((!defined('__DAILY_RESET')) || (EXT_VERSION_IS_OLDER("sql_patches", "0.4.5"))) {
+       if ((!isResetModeEnabled()) || (EXT_VERSION_IS_OLDER("sql_patches", "0.4.5"))) {
                // Then abort here
                // Then abort here
-               return array();
+               DEBUG_LOG(__FUNCTION__, __LINE__, "Cannot run reset! Please report this bug. Thanks");
        } // END - if
 
        // Get more daily reset scripts
        } // END - if
 
        // Get more daily reset scripts
@@ -3050,8 +3050,8 @@ function RESET_ADD_INCLUDES () {
                if (!defined('DEBUG_MONTHLY')) UPDATE_CONFIG("last_month", $currMonth);
        } // END - if
 
                if (!defined('DEBUG_MONTHLY')) UPDATE_CONFIG("last_month", $currMonth);
        } // END - if
 
-       // Return array
-       return $INC_POOL;
+       // Run the filter
+       runFilterChain('load_includes', $INC_POOL);
 }
 
 // Handle extra values
 }
 
 // Handle extra values
@@ -3120,7 +3120,8 @@ function CONVERT_SELECTIONS_TO_TIMESTAMP(&$POST, &$DATA, &$id, &$skip) {
                } // END - if
        } else {
                // Process this entry
                } // END - if
        } else {
                // Process this entry
-               $skip = false; $test2 = "";
+               $skip = false;
+               $test2 = "";
        }
 }
 
        }
 }
 
@@ -3394,6 +3395,28 @@ function isAdminRegistered () {
        return isBooleanConstantAndTrue('admin_registered');
 }
 
        return isBooleanConstantAndTrue('admin_registered');
 }
 
+// Enables the reset mode. Only call this function if you really want the
+// reset to be run!
+function enableResetMode () {
+       // Enable the reset mode
+       $GLOBALS['reset_enabled'] = true;
+
+       // Run filters
+       runFilterChain('reset_enabled');
+}
+
+// Checks wether the reset mode is active
+function isResetEnabled () {
+       // Now simply check it
+       return ((isset($GLOBALS['reset_enabled'])) && ($GLOBALS['reset_enabled'] === true));
+}
+
+// Checks wether the debug mode is enabled
+function isDebugModeEnabled () {
+       // Simply check it
+       return isBooleanConstantAndTrue('DEBUG_MODE');
+}
+
 //////////////////////////////////////////////////
 // AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS //
 //////////////////////////////////////////////////
 //////////////////////////////////////////////////
 // AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS //
 //////////////////////////////////////////////////
index d5a098a42b84ab34d768ea2a4db5e3244d8a9ec3..2bc6aa08a2682da8c4d67248f55e72b1afb03c4a 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode
 }
 
 // Do not execute when script is in CSS mode
-if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return;
+if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
 
 //
 ?>
 
 //
 ?>
index c67e0ee25ee324c718f1a875fac2129aa0fb0c47..80a1f06a9e269f535b50544c370cfd4fbac99a3a 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode
 }
 
 // Do not execute when script is in CSS mode
-if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return;
+if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
 
 // Get current day (01 to 31), month (01 to 12) and year (4-digits year)
 $DAY   = date("d", time());
 
 // Get current day (01 to 31), month (01 to 12) and year (4-digits year)
 $DAY   = date("d", time());
index 729b3b8b4edb280204ce27111626b190da6c454e..02665ce10b36c33ce0dbf618afd303a4ae04d2df 100644 (file)
@@ -41,7 +41,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($CSS == 1) || (defined('__DAILY_RESET'))) return;
+if (($CSS == 1) || (isResetModeEnabled())) return;
 
 //
 ?>
 
 //
 ?>
index f73fab7f71dca342914d4c3b03a2ba4d09ab5726..e4c4e8e7b9b6836dcc83adde986be4bca9dde1f6 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET')) || (getConfig('beg_rallye') != "Y")) return;
+if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled()) || (getConfig('beg_rallye') != "Y")) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Get current month (2 digits)
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Get current month (2 digits)
index de78e488c7219697f8157d216938b45da5326fd4..c4c7e8d0c791b96c9da28ebbe56dc41b1f8b061f 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return;
+if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Get current month (2 digits)
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Get current month (2 digits)
index b640715803ba368de26ba1fdceaafaaa0ee02868..235bbdf8a0f1196c811953795a1455279682e7bc 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return;
+if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Get current month (2 digits)
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Get current month (2 digits)
index 826250915b183d12211c25383908374d7e77f5ae..025d04875b372ad291b1e966e3ce3e5652b161e0 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return;
+if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Reset surfbar counter
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Reset surfbar counter
index cb2aefe1d6a6729f36c26492e255ee2d8d3e6115..ac66385eb898089920bafbc0f839a3fee68f810d 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Don't run on daily reset
 }
 
 // Don't run on daily reset
-if (defined('__DAILY_RESET')) {
+if (isResetModeEnabled()) {
        // Skip here
        return false;
 } // END - if
        // Skip here
        return false;
 } // END - if
index e385882fb297c25f65ab357a86702d47655a6842..d52b7a64b173590884d410ab7a5c13dd1e055212 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Don't run on daily reset
 }
 
 // Don't run on daily reset
-if (defined('__DAILY_RESET')) {
+if (isResetModeEnabled()) {
        // Skip here
        return false;
 } elseif (!EXT_IS_ACTIVE("bonus")) {
        // Skip here
        return false;
 } elseif (!EXT_IS_ACTIVE("bonus")) {
index 224595067631be5c3cfbc823fb8cf59710e84f36..8c8e53fd4e94c4b3f24679073b60288a9b39adfd 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Don't run on daily reset
 }
 
 // Don't run on daily reset
-if (defined('__DAILY_RESET')) {
+if (isResetModeEnabled()) {
        // Skip here
        return false;
 } elseif (!EXT_IS_ACTIVE("user")) {
        // Skip here
        return false;
 } elseif (!EXT_IS_ACTIVE("user")) {
index f9a56e2bf32a59f5c38b167298a04f15e0a23b15..9c5420ef9f0d6bb267e3dabb127b20f8be8e46c4 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($CSS == 1) || (!defined('__DAILY_RESET'))) return;
+if (($CSS == 1) || (!isResetModeEnabled())) return;
 
 //
 ?>
 
 //
 ?>
index 2f18ab954ec8b0ea71ff8c5c16b31b3a3050acd8..332205253ead601c7d2685a9e97ece07030c5c80 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET')) || (getConfig('beg_rallye') == "Y")) return;
+if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled()) || (getConfig('beg_rallye') == "Y")) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Reset accounts
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Reset accounts
index 0942e4b506827a55e6c5fc4d6b01751fb972544a..a19cb882934b8cb86152437fb6d636cc27bcbe1b 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return;
+if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Purge expired entries in _bonus_turbo
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Purge expired entries in _bonus_turbo
index 4862ed3d16abd20562d4ebd9db5f53be6395cf2e..293a6bf05b4a8c1b61c95745e2d5e0ac767a6f4a 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return;
+if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Update user profiles
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Update user profiles
index f606f1dad1bca19485a246f28de0afdb9b08f1e6..cddf64392ab8974ff4a153822b7fe28cd31e17cc 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return;
+if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 //
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 //
index bd197bfabbbdeefd5a486c70b3b75fe01884b70b..741ebe3110a3d0d92f7ca7ba2f2e0ece6440db35 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || ((!defined('__DAILY_RESET')) && (getConfig('holiday_mode') == "RESET"))) return;
+if (($GLOBALS['output_mode'] == 1) || ((!isResetModeEnabled()) && (getConfig('holiday_mode') == "RESET"))) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Check for holidays we need to enable and send email to user
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Check for holidays we need to enable and send email to user
index fc73f486c36762a17be662088c5470930269f60a..ba109acdbba53a8fe98e1cb0f3f063074f3920a7 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return;
+if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Reset surfbar counter
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Reset surfbar counter
index a63aa1d0e364a615a2cca50be1451a82079322c4..06d9a2c4f103c478edcbe08c710675fed29a8e9c 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return;
+if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
 
 // Simply reset the requests here
 UPDATE_CONFIG("yoomedia_requests_remain", getConfig('yoomedia_requests_total'));
 
 // Simply reset the requests here
 UPDATE_CONFIG("yoomedia_requests_remain", getConfig('yoomedia_requests_total'));
index aeed2d5a78663f0ba21bcfb09f65014105c371d3..2f0694281671bbc597ed2f6aac6a4e007f77c555 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($CSS == 1) || (!defined('__DAILY_RESET'))) return;
+if (($CSS == 1) || (!isResetModeEnabled())) return;
 
 //
 ?>
 
 //
 ?>
index af40c37c9c8bb70d291c46b87888a964460b0835..67fa973d113a6bd6ce9003e037e7fe53ae55d577 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return;
+if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Reset the surfbar counter
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Reset the surfbar counter