X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=index.php;h=4f8022b89a52dad4956cff57e1ae32761b232f5b;hp=486b6321d53307e470f689040466f73118157cba;hb=20741b93fd58620af677a7f1039ffd16ea6ec689;hpb=9afd6ec5878544a7982c50ed9c0dd7de37606d5b diff --git a/index.php b/index.php index 486b6321d5..4f8022b89a 100644 --- a/index.php +++ b/index.php @@ -1,7 +1,7 @@ -1)) { + // Set content type + setContentType('text/html'); -// Fix missing array elements here -if (!isConfigEntrySet('index_delay')) setConfigEntry('index_delay' , 0); -if (!isConfigEntrySet('index_cookie')) setConfigEntry('index_cookie', 0); + // Header + loadIncludeOnce('inc/header.php'); -// Check for cookies -if ((isSessionVariableSet('visited')) || (getConfig('index_delay') == '0')) { - // Is the index page configured for redirect pr not? - if (getConfig('index_cookie') > 0) { - // Set cookie and remeber it for specified time - setSession('visited', 'true'); - } elseif (isSessionVariableSet('visited')) { - // Remove cookie when admin set 0 in setup - setSession('visited', ''); - } + // Is the index page configured for redirect pr not? + if (getConfig('index_cookie') > 0) { + // Set cookie and remeber it for specified time + setSession('visited', 'true'); + } elseif (isSessionVariableSet('visited')) { + // Remove cookie when admin set 0 in setup + setSession('visited', ''); + } - // Template laden - loadTemplate('index'); + // Template laden + loadTemplate('index'); - // Shall I insert an automated forward? - if (getConfig('index_delay') > 0) { - // This will be a JavaScript-redirect! - $content['delay'] = (getConfig('index_delay') * 1000 + 500); - $content['mod'] = 'index'; + // Shall I insert an automated forward? + if (getConfig('index_delay') > 0) { + // This will be a JavaScript-redirect! + $content['delay'] = (getConfig('index_delay') * 1000 + 500); + $content['module'] = 'index'; - // Load template - loadTemplate('index_forward', false, $content); - } // END - if -} else { - // Redirect to main page - redirectToUrl('modules.php?module=index'); -} + // Load template + loadTemplate('index_forward', false, $content); + } // END - if -// Footer -loadIncludeOnce('inc/footer.php'); + // Footer (which will call shutdown() for us) + loadIncludeOnce('inc/footer.php'); + } else { + // Redirect to main page + redirectToUrl('modules.php?module=index'); + } +} // [EOF] ?>