]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-connect.php
- Major change in LOAD_EMAIL_TEMPLATE(). The deprecated switch() block has
[mailer.git] / inc / mysql-connect.php
index 9cd96c8fa492f27b5bdde675b4488abe42986120..1f2fefc671e73cfa5b11c68aaa3dca6228c5f419 100644 (file)
@@ -106,7 +106,7 @@ LIMIT 1", __FILE__, __LINE__);
                                                // Something went wrong
                                                ADD_FATAL(FATAL_CANNOT_LOAD_CONFIG);
                                                return;
-                                       }
+                                       } // END - if
 
                                        // Load the configuration
                                        $_CONFIG = array_merge($_CONFIG, SQL_FETCHARRAY($result));
@@ -114,15 +114,6 @@ LIMIT 1", __FILE__, __LINE__);
                                        // Initialize include-file-pool
                                        $INC_POOL = array();
 
-                                       // Run daily reset
-                                       if ((date("d", $_CONFIG['last_update']) != date("d", time()) || ((isBooleanConstantAndTrue('DEBUG_MODE')))) && (!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered')) && (!isset($_GET['register'])) && ($CSS != 1)) {
-                                               // Do daily things in external PHP file but only when script is completely setup
-                                               $INC_POOL[] = sprintf("%sinc/reset/reset_daily.php", PATH);
-
-                                               // Daily reset was run!
-                                               define('__DAILY_RESET', "1");
-                                       }
-
                                        // Load "databases" aka static arrays
                                        require_once(PATH."inc/databases.php");
 
@@ -132,11 +123,14 @@ LIMIT 1", __FILE__, __LINE__);
                                        // Functions which are related to themes
                                        require_once(PATH."inc/theme-manager.php");
 
+                                       // Run daily reset
+                                       require_once(PATH."inc/check-reset.php");
+
                                        // Load admin include file if he is admin
                                        if (IS_ADMIN()) {
                                                // Administrative functions
                                                require_once(PATH."inc/modules/admin/admin-inc.php");
-                                       }
+                                       } // END - if
 
                                        // Get all values
                                        if (($CSS != 1) && ($CSS != -1)) {
@@ -153,7 +147,7 @@ LIMIT 1", __FILE__, __LINE__);
                                        UPDATE_LOGIN_DATA();
 
                                        // Update online list
-                                       UPDATE_ONLINE_LIST(get_session('PHPSESSID'), $GLOBALS['module'], $GLOBALS['action'], $GLOBALS['what']);
+                                       UPDATE_ONLINE_LIST($PHPSESSID, $GLOBALS['module'], $GLOBALS['action'], $GLOBALS['what']);
 
                                        // Load theme name
                                        $currTheme = GET_CURR_THEME();
@@ -172,7 +166,7 @@ LIMIT 1", __FILE__, __LINE__);
                                                        // Anything else like begging link
                                                        $GLOBALS['what'] = "";
                                                }
-                                       }
+                                       } // END - if
 
                                        // Update sending pool
                                        if (($CSS != "1") && ($CSS != "-1")) require_once(PATH."inc/pool-update.php"); // Sends out mails in configureable steps