2 /************************************************************************
3 * Mailer v0.2.1-FINAL Start: 08/25/2003 *
4 * =================== Last change: 11/23/2004 *
6 * -------------------------------------------------------------------- *
8 * -------------------------------------------------------------------- *
9 * Short description : Index page. A simple redirection to modules.php *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Index-Seite. Eine simple Weiterleitung auf die *
13 * -------------------------------------------------------------------- *
14 * Copyright (c) 2003 - 2009 by Roland Haeder *
15 * Copyright (c) 2009 - 2016 by Mailer Developer Team *
16 * For more information visit: http://mxchange.org *
18 * This program is free software; you can redistribute it and/or modify *
19 * it under the terms of the GNU General Public License as published by *
20 * the Free Software Foundation; either version 2 of the License, or *
21 * (at your option) any later version. *
23 * This program is distributed in the hope that it will be useful, *
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
26 * GNU General Public License for more details. *
28 * You should have received a copy of the GNU General Public License *
29 * along with this program; if not, write to the Free Software *
30 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
32 ************************************************************************/
35 //* DEBUG: */ xdebug_start_trace();
37 // Load security stuff here
38 require('inc/libs/security_functions.php');
41 $GLOBALS['__start_time'] = microtime(TRUE);
43 // Set module/what and output mode
44 $GLOBALS['__module'] = 'index';
45 $GLOBALS['__what'] = 'welcome';
46 $GLOBALS['__output_mode'] = '0';
49 require('inc/config-global.php');
52 setWhat(getIndexHome());
54 // Shall we display 'home' in index.php?
55 if ((isExtensionInstalledAndNewer('sql_patches', '0.8.3')) && (isDisplayHomeInIndexEnabled())) {
60 //////////////////////////////////////////////////
61 // Display regular index 'front' page from here
62 //////////////////////////////////////////////////
65 if ((isSessionVariableSet('visited')) || (getIndexDelay() > -1)) {
67 setContentType('text/html');
72 // Is the index page configured for redirect pr not?
73 if (getConfig('index_cookie') > 0) {
74 // Set cookie and remeber it for specified time
75 setSession('visited', 'true');
76 } elseif (isSessionVariableSet('visited')) {
77 // Remove cookie when admin set 0 in setup
78 setSession('visited', '');
82 loadTemplate('index');
84 // Shall I insert an automated forward?
85 if (getIndexDelay() > 0) {
86 // This will be a JavaScript-redirect!
87 $content['delay'] = (getIndexDelay() * 1000 + 500);
88 $content['module'] = 'index';
91 loadTemplate('index_forward', FALSE, $content);
94 // Footer (which will call doShutdown() for us)
97 // Redirect to main page
98 redirectToUrl('modules.php?module=index');