Fixes for reset
[mailer.git] / install.php
1 <?php
2 /************************************************************************
3  * MXChange v0.2.1                                    Start: 08/25/2003 *
4  * ===============                              Last change: 04/26/2004 *
5  *                                                                      *
6  * -------------------------------------------------------------------- *
7  * File              : install.php                                      *
8  * -------------------------------------------------------------------- *
9  *                                                                      *
10  *          ------------------------------------------------            *
11  *         / PLEASE READ THIS!  /  BITTE LESEN SIE DIESES! /            *
12  *        -------------------------------------------------             *
13  *                                                                      *
14  * -------------------------------------------------------------------- *
15  * Short description : Installation script. Please delete this file     *
16  *           after successfully installation or ANYONE can re-setup     *
17  *           your mail exchange script!!!                               *
18  * -------------------------------------------------------------------- *
19  * Kurzbeschreibung  : Installationsscript. Bitte loeschen Sie diese    *
20  *           Datei nach der fertiggestellten Installation oder JEDER    *
21  *           kann Ihr Mailtausch-Script eventuell neu einstellen.       *
22  * -------------------------------------------------------------------- *
23  * $Revision::                                                        $ *
24  * $Date::                                                            $ *
25  * $Tag:: 0.2.1-FINAL                                                 $ *
26  * $Author::                                                          $ *
27  * Needs to be in all Files and every File needs "svn propset           *
28  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
29  * -------------------------------------------------------------------- *
30  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
31  * For more information visit: http://www.mxchange.org                  *
32  *                                                                      *
33  * This program is free software; you can redistribute it and/or modify *
34  * it under the terms of the GNU General Public License as published by *
35  * the Free Software Foundation; either version 2 of the License, or    *
36  * (at your option) any later version.                                  *
37  *                                                                      *
38  * This program is distributed in the hope that it will be useful,      *
39  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
40  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
41  * GNU General Public License for more details.                         *
42  *                                                                      *
43  * You should have received a copy of the GNU General Public License    *
44  * along with this program; if not, write to the Free Software          *
45  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
46  * MA  02110-1301  USA                                                  *
47  ************************************************************************/
48
49 // XDEBUG call
50 //* DEBUG: */ xdebug_start_trace();
51
52 // Load security system
53 require('inc/libs/security_functions.php');
54
55 // Init start time
56 $GLOBALS['startTime'] = microtime(true);
57
58 // Tell every module / include file we are installing
59 $GLOBALS['mxchange_installing'] = true;
60
61 // Set CSS variable for "normal mode"
62 $GLOBALS['output_mode'] = 0;
63
64 // Set module
65 $GLOBALS['module'] = 'install';
66
67 // Load config file
68 require('inc/config-global.php');
69
70 // Set content type
71 setContentType('text/html');
72
73 // Reload page to page=welcome when it is not specified
74 if (!isGetRequestElementSet('page')) {
75         redirectToUrl('install.php?page=welcome');
76 } // END - if
77
78 // Set username
79 setUsername('{--USERNAME_INSTALLER--}');
80
81 // Already installed?
82 if ((isInstalled()) && (getRequestElement('page' != 'finished'))) {
83         // Add fatal message
84         addFatalMessage(__FILE__, __LINE__, getMessage('ALREADY_INSTALLED'));
85 } // END - if
86
87 // Load header here
88 loadIncludeOnce('inc/header.php');
89
90 // Handle fatal errors
91 runFilterChain('handle_fatal_errors');
92
93 // Here start's our installtion stuff
94 loadIncludeOnce('inc/install-inc.php');
95
96 // Handle fatal errors again
97 runFilterChain('handle_fatal_errors');
98
99 // Load main installation table
100 loadTemplate('install_main', false, $GLOBALS['install_content']);
101
102 // Footer
103 loadIncludeOnce('inc/footer.php');
104
105 // [EOF]
106 ?>