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 * -------------------------------------------------------------------- *
16 * $Tag:: 0.2.1-FINAL $ *
18 * Needs to be in all Files and every File needs "svn propset *
19 * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
20 * -------------------------------------------------------------------- *
21 * Copyright (c) 2003 - 2008 by Roland Haeder *
22 * For more information visit: http://www.mxchange.org *
24 * This program is free software; you can redistribute it and/or modify *
25 * it under the terms of the GNU General Public License as published by *
26 * the Free Software Foundation; either version 2 of the License, or *
27 * (at your option) any later version. *
29 * This program is distributed in the hope that it will be useful, *
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
32 * GNU General Public License for more details. *
34 * You should have received a copy of the GNU General Public License *
35 * along with this program; if not, write to the Free Software *
36 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
38 ************************************************************************/
40 // Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
41 require("inc/libs/security_functions.php");
43 // Init "action" and "what"
44 $GLOBALS['what'] = "";
45 $GLOBALS['action'] = "";
48 $GLOBALS['module'] = "index";
51 $GLOBALS['output_mode'] = "0";
54 require("inc/config.php");
56 // Is the script installed?
59 LOAD_INC("inc/header.php");
61 // Fix missing array elements here
62 if (!isConfigEntrySet('index_delay')) setConfigEntry('index_delay' , 0);
63 if (!isConfigEntrySet('index_cookie')) setConfigEntry('index_cookie', 0);
66 if ((isSessionVariableSet('visited')) || (getConfig('index_delay') == 0) || (getConfig('index_cookie') == 0)) {
67 // Is the index page configured for redirect pr not?
68 if (getConfig('index_cookie') > 0) {
69 // Set cookie and remeber it for specified time
70 set_session('visited', "true");
71 } elseif (isSessionVariableSet('visited')) {
72 // Remove cookie when admin set 0 in setup
73 set_session('visited', "");
77 LOAD_TEMPLATE("index", false, ADD_URL_DATA(""));
79 // Shall I insert an automated forward?
80 if (getConfig('index_delay') > 0) {
81 // This will be a JavaScript-redirect!
82 define('__DELAY_VALUE', (getConfig('index_delay') * 1000 + 500));
83 define('__MOD_VALUE' , ADD_URL_DATA("index"));
84 LOAD_TEMPLATE("index_forward");
87 // Redirect to main page
88 LOAD_URL("modules.php?module=index");
92 LOAD_INC("inc/footer.php");
94 // You have to install first!
95 LOAD_URL("install.php");