2 /************************************************************************
3 * MXChange v0.2.1 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 * -------------------------------------------------------------------- *
15 * -------------------------------------------------------------------- *
16 * Copyright (c) 2003 - 2008 by Roland Haeder *
17 * For more information visit: http://www.mxchange.org *
19 * This program is free software; you can redistribute it and/or modify *
20 * it under the terms of the GNU General Public License as published by *
21 * the Free Software Foundation; either version 2 of the License, or *
22 * (at your option) any later version. *
24 * This program is distributed in the hope that it will be useful, *
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
27 * GNU General Public License for more details. *
29 * You should have received a copy of the GNU General Public License *
30 * along with this program; if not, write to the Free Software *
31 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
33 ************************************************************************/
35 // Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
36 require_once("inc/libs/security_functions.php");
38 // Init "action" and "what"
39 global $what, $action;
40 $GLOBALS['what'] = ""; $GLOBALS['action'] = "";
43 $GLOBALS['module'] = "index";
46 require ("inc/config.php");
48 // Is the script installed?
49 if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed'))) {
51 require(PATH."inc/header.php");
53 // Fix missing array elements here
54 if (!isset($_CONFIG['index_delay'])) $_CONFIG['index_delay'] = 0;
55 if (!isset($_CONFIG['index_cookie'])) $_CONFIG['index_cookie'] = 0;
58 if ((isSessionVariableSet('visited')) || ($_CONFIG['index_delay'] == 0) || ($_CONFIG['index_cookie'] == 0)) {
59 // Is the index page configured for redirect pr not?
60 if ($_CONFIG['index_cookie'] > 0) {
61 // Set cookie and remeber it for specified time
62 set_session("visited", "true");
63 } elseif (isSessionVariableSet('visited')) {
64 // Remove cookie when admin set 0 in setup
65 set_session("visited", "");
69 LOAD_TEMPLATE("index", false, ADD_URL_DATA(""));
71 // Shall I insert an automated forward?
72 if ($_CONFIG['index_delay'] > 0) {
73 // This will be a JavaScript-redirect!
74 define('__DELAY_VALUE', ($_CONFIG['index_delay'] * 1000 + 500));
75 define('__MOD_VALUE' , ADD_URL_DATA("index"));
76 LOAD_TEMPLATE("index_forward");
79 // Redirect to main page
80 LOAD_URL("modules.php?module=index");
84 require(PATH."inc/footer.php");
86 // You have to configure first!
87 LOAD_URL("install.php");