/
step.php
211 lines (168 loc) · 5.77 KB
/
step.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<?php
/* ----------------------------------------------------------------------
$Id: step.php,v 1.1 2007/06/13 16:41:18 r23 Exp $
MyOOS [Shopsystem]
https://www.oos-shop.de
Copyright (c) 2003 - 2021 by the MyOOS Development Team
----------------------------------------------------------------------
Based on:
File: install.php,v 1.91 2002/02/05 11:09:04 jgm
----------------------------------------------------------------------
POST-NUKE Content Management System
Copyright (C) 2001 by the Post-Nuke Development Team.
http://www.postnuke.com/
----------------------------------------------------------------------
Based on:
PHP-NUKE Web Portal System - http://phpnuke.org/
Thatware - http://thatware.org/
----------------------------------------------------------------------
LICENSE
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License (GPL)
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To read the license please visit http://www.gnu.org/copyleft/gpl.html
----------------------------------------------------------------------
Original Author of file:
Purpose of file:
---------------------------------------------------------------------- */
/**
* PostNuke Install Script.
*
* This script will set the database up, and do the basic configurations of the script.
* Once this script has run, please delete this file from your root directory.
* There is a security risk if you keep this file around.
*
* This module of the PostNuke project was inspired by the myPHPNuke project.
*
* The PostNuke project is free software released under the GNU License.
* Please read the credits file for more information on who has made this project possible.
*/
// Set the level of error reporting
error_reporting(E_ALL & ~E_NOTICE);
/**
* Test to make sure that MyOOS is running on PHP 5.5.9 or newer. Once you are
* sure that your environment is compatible with MyOOS, you can comment this
* line out. When running an application on a new server, uncomment this line
* to check the PHP version quickly.
*/
if (version_compare(PHP_VERSION, '7.2.0', '<')) {
header('Content-type: text/html; charset=utf-8', true, 503);
echo '<h2>Fehler</h2>';
echo 'Auf Ihrem Server läuft PHP version ' . PHP_VERSION . ', MyOOS benötigt mindestens PHP 7.2.0';
echo '<h2>Error</h2>';
echo 'Your server is running PHP version ' . PHP_VERSION . ' but MyOOS requires at least PHP 7.2.0';
return;
}
define('OOS_VALID_MOD', true);
// Version information
define('OOS_VERSION', 'MyOOS 2.4.20 -dev');
require_once '../includes/functions/function_global.php';
require_once '../includes/functions/function_kernel.php';
require_once '../includes/lib/phpass/PasswordHash.php';
require_once '../includes/functions/function_password.php';
require_once '../includes/lib/adodb/adodb.inc.php';
include_once 'modify_configure.php';
include_once 'upgrade.php';
include_once 'newinstall.php';
include_once 'gui.php';
include_once 'db.php';
include_once 'check.php';
include_once 'language.php';
if (isset($_POST)) {
foreach ($_POST as $k=>$v) {
$$k = oos_prepare_input($v);
}
}
if (isset($alanguage)) {
$currentlang = $alanguage;
}
if (isset($aupdate)) {
$update = $aupdate;
}
if (!empty($encoded)) {
$dbuname = base64_decode($dbuname);
$dbpass = base64_decode($dbpass);
}
installer_get_language();
include_once 'header.php';
/* This starts the switch statement that filters through the form options.
* the @ is in front of $op to suppress error messages if $op is unset and E_ALL
* is on
*/
switch (@$op) {
case "Finish":
print_oosFinish();
break;
case 'Set Login':
oosDBInit($dbhost, $dbuname, $dbpass, $dbname, $dbtype);
$update = isset($_POST['update']) ? oos_prepare_input($_POST['update']) : NULL;
oosInputData($gender, $firstname, $name, $pwd, $repeatpwd, $email, $phone, $prefix_table, $update);
oosUpdateConfigShop(true); // Scott - added
print_SetLogin();
break;
case 'Change Login':
print_ChangeLogin();
break;
case 'Login':
if ( ($pwd == '') || ($email == '') || ($pwd != $repeatpwd) ) {
print_ChangeLogin();
} else {
print_Login();
}
break;
case 'Start':
$dbmake = isset($_POST['dbmake']) ? oos_prepare_input($_POST['dbmake']) : NULL;
make_db($dbhost, $dbuname, $dbpass, $dbname, $prefix_table, $dbtype, $dbmake);
print_Start();
break;
case 'Admin':
print_Admin();
break;
case 'Submit':
print_Submit();
break;
case 'CHM_check':
print_CHMcheck();
break;
case 'ChangeServer':
print_ChangeServer();
break;
case 'ConfigServer':
print_ConfigServerInfo();
break;
case 'Confirm':
print_Confirm();
break;
case 'Change_Info':
print_ChangeInfo();
break;
case 'New_Install':
print_NewInstall();
break;
case 'DBSubmit':
print_DBSubmit();
break;
case 'PHP_Check':
if (isset($_POST['agreecheck'])) {
writeable_oosConfigure();
oosCheckPHP();
} else {
print_select_language();
}
break;
case 'UpgardeOrInstall':
print_oosUpgardeOrInstall();
break;
case 'Set Language':
print_oosDefault();
break;
default:
print_select_language();
break;
}
include_once 'footer.php';