X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmysql-connect.php;h=59921655d456eb81294f022e6db0667f7e444fe2;hp=49b40d35824e07f7bd2e82a3526a1c4b43820c56;hb=360c95a5bfa12df5434ed421bd3abd26b42bb211;hpb=3299d3eba008bfd2450d0f19d072126f98c78e1e diff --git a/inc/mysql-connect.php b/inc/mysql-connect.php index 49b40d3582..59921655d4 100644 --- a/inc/mysql-connect.php +++ b/inc/mysql-connect.php @@ -40,6 +40,10 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { // CFG: DEBUG-SQL (if enabled and DEBUG_MODE is enabled all SQL queries will be logged to debug.log) define('DEBUG_SQL', false); +// Default is not a frameset +global $isFrameset; +$isFrameset = false; + // Load library require_once(PATH."inc/db/lib.php"); @@ -102,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)); @@ -110,18 +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[] = PATH."inc/reset/reset_daily.php"; - - // Daily reset was run! - define('__DAILY_RESET', "1"); - } - - // Load all extensions - require_once(PATH."inc/load_extensions.php"); - // Load "databases" aka static arrays require_once(PATH."inc/databases.php"); @@ -131,11 +123,30 @@ LIMIT 1", __FILE__, __LINE__); // Functions which are related to themes require_once(PATH."inc/theme-manager.php"); + // Run daily reset + // 01 2 2 2 3321 1 2 21 1 2 21 1 2 21 1 2 21 1 10 + if ((date("d", $_CONFIG['last_update']) != date("d", time())) && (!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 = array(); + $INC_POOL[] = sprintf("%sinc/reset/reset_daily.php", PATH); + + // Daily reset was run! + define('__DAILY_RESET', true); + + // Add more includes + RESET_ADD_INCLUDES(); + + // Run the full reset scripts + foreach ($INC_POOL as $incFile) { + require_once($incFile); + } // END - foreach + } // END - if + // 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)) { @@ -155,7 +166,7 @@ LIMIT 1", __FILE__, __LINE__); UPDATE_ONLINE_LIST(get_session('PHPSESSID'), $GLOBALS['module'], $GLOBALS['action'], $GLOBALS['what']); // Load theme name - $CurrTheme = GET_CURR_THEME(); + $currTheme = GET_CURR_THEME(); // Set default 'what' value //* DEBUG */ echo "-".$GLOBALS['module']."/".$GLOBALS['what']."-
\n"; @@ -233,7 +244,6 @@ LIMIT 1", __FILE__, __LINE__); // Include required files require_once(PATH."inc/databases.php"); require_once(PATH."inc/theme-manager.php"); - require_once(PATH."inc/load_extensions.php"); // Check if we are in installation routine $installPhp = basename($_SERVER['PHP_SELF']);