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 * -------------------------------------------------------------------- *
16 * $Tag:: 0.2.1-FINAL $ *
18 * -------------------------------------------------------------------- *
19 * Copyright (c) 2003 - 2009 by Roland Haeder *
20 * Copyright (c) 2009 - 2012 by Mailer Developer Team *
21 * For more information visit: http://mxchange.org *
23 * This program is free software; you can redistribute it and/or modify *
24 * it under the terms of the GNU General Public License as published by *
25 * the Free Software Foundation; either version 2 of the License, or *
26 * (at your option) any later version. *
28 * This program is distributed in the hope that it will be useful, *
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
31 * GNU General Public License for more details. *
33 * You should have received a copy of the GNU General Public License *
34 * along with this program; if not, write to the Free Software *
35 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
37 ************************************************************************/
40 //* DEBUG: */ xdebug_start_trace();
42 // Load security stuff here
43 require('inc/libs/security_functions.php');
46 $GLOBALS['__start_time'] = microtime(TRUE);
48 // Set module/what and output mode
49 $GLOBALS['__module'] = 'index';
50 $GLOBALS['__what'] = 'welcome';
51 $GLOBALS['__output_mode'] = '0';
54 require('inc/config-global.php');
57 setWhat(getIndexHome());
59 // Shall we display 'home' in index.php?
60 if ((isExtensionInstalledAndNewer('sql_patches', '0.8.3')) && (isDisplayHomeInIndexEnabled())) {
61 // Include module (and exit in inc/footer.php)
65 //////////////////////////////////////////////////
66 // Display regular index 'front' page from here
67 //////////////////////////////////////////////////
70 if ((isSessionVariableSet('visited')) || (getConfig('index_delay') > -1)) {
72 setContentType('text/html');
75 loadIncludeOnce('inc/header.php');
77 // Is the index page configured for redirect pr not?
78 if (getConfig('index_cookie') > 0) {
79 // Set cookie and remeber it for specified time
80 setSession('visited', 'true');
81 } elseif (isSessionVariableSet('visited')) {
82 // Remove cookie when admin set 0 in setup
83 setSession('visited', '');
87 loadTemplate('index');
89 // Shall I insert an automated forward?
90 if (getConfig('index_delay') > 0) {
91 // This will be a JavaScript-redirect!
92 $content['delay'] = (getConfig('index_delay') * 1000 + 500);
93 $content['module'] = 'index';
96 loadTemplate('index_forward', FALSE, $content);
99 // Footer (which will call doShutdown() for us)
100 loadIncludeOnce('inc/footer.php');
102 // Redirect to main page
103 redirectToUrl('modules.php?module=index');