Subversion Repositories oidplus

Rev

Rev 1116 | Rev 1321 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1116 Rev 1143
1
<?php
1
<?php
2
 
2
 
3
/*
3
/*
4
 * OIDplus 2.0
4
 * OIDplus 2.0
5
 * Copyright 2019 - 2022 Daniel Marschall, ViaThinkSoft
5
 * Copyright 2019 - 2022 Daniel Marschall, ViaThinkSoft
6
 *
6
 *
7
 * Licensed under the Apache License, Version 2.0 (the "License");
7
 * Licensed under the Apache License, Version 2.0 (the "License");
8
 * you may not use this file except in compliance with the License.
8
 * you may not use this file except in compliance with the License.
9
 * You may obtain a copy of the License at
9
 * You may obtain a copy of the License at
10
 *
10
 *
11
 *     http://www.apache.org/licenses/LICENSE-2.0
11
 *     http://www.apache.org/licenses/LICENSE-2.0
12
 *
12
 *
13
 * Unless required by applicable law or agreed to in writing, software
13
 * Unless required by applicable law or agreed to in writing, software
14
 * distributed under the License is distributed on an "AS IS" BASIS,
14
 * distributed under the License is distributed on an "AS IS" BASIS,
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
 * See the License for the specific language governing permissions and
16
 * See the License for the specific language governing permissions and
17
 * limitations under the License.
17
 * limitations under the License.
18
 */
18
 */
19
 
19
 
20
use ViaThinkSoft\OIDplus\OIDplus;
20
use ViaThinkSoft\OIDplus\OIDplus;
21
use ViaThinkSoft\OIDplus\OIDplusDatabasePlugin;
21
use ViaThinkSoft\OIDplus\OIDplusDatabasePlugin;
22
use ViaThinkSoft\OIDplus\OIDplusSqlSlangPlugin;
22
use ViaThinkSoft\OIDplus\OIDplusSqlSlangPlugin;
23
use ViaThinkSoft\OIDplus\OIDplusCaptchaPlugin;
23
use ViaThinkSoft\OIDplus\OIDplusCaptchaPlugin;
24
 
24
 
25
require_once __DIR__ . '/../includes/oidplus.inc.php';
25
require_once __DIR__ . '/../includes/oidplus.inc.php';
26
 
26
 
27
const BASECONFIG_FILE_OLD = 'includes/config.inc.php';
27
const BASECONFIG_FILE_OLD = 'includes/config.inc.php';
28
const BASECONFIG_FILE_NEW = 'userdata/baseconfig/config.inc.php';
28
const BASECONFIG_FILE_NEW = 'userdata/baseconfig/config.inc.php';
29
$existing_config = '';
29
$existing_config = '';
30
if (file_exists(__DIR__.'/../'.BASECONFIG_FILE_OLD)) $existing_config = BASECONFIG_FILE_OLD;
30
if (file_exists(__DIR__.'/../'.BASECONFIG_FILE_OLD)) $existing_config = BASECONFIG_FILE_OLD;
31
if (file_exists(__DIR__.'/../'.BASECONFIG_FILE_NEW)) $existing_config = BASECONFIG_FILE_NEW;
31
if (file_exists(__DIR__.'/../'.BASECONFIG_FILE_NEW)) $existing_config = BASECONFIG_FILE_NEW;
32
$already_setup = $existing_config != '';
32
$already_setup = $existing_config != '';
33
 
33
 
34
OIDplus::handleLangArgument();
34
OIDplus::handleLangArgument();
35
 
35
 
36
ob_start();
36
ob_start();
37
 
37
 
38
echo '<noscript>';
38
echo '<noscript>';
39
echo '<h2>'._L('Please enable JavaScript in order to use setup!').'</h2>';
39
echo '<h2>'._L('Please enable JavaScript in order to use setup!').'</h2>';
40
echo '</noscript>';
40
echo '</noscript>';
41
 
41
 
42
echo '<span id="setupPageContent" style="display:None">';
42
echo '<span id="setupPageContent" style="display:None">';
43
 
43
 
44
echo '<p>';
44
echo '<p>';
45
if ($already_setup) {
45
if ($already_setup) {
46
        echo _L('This assistant will help you updating the file <b>%1</b>.',$existing_config);
46
        echo _L('This assistant will help you updating the file <b>%1</b>.',$existing_config);
47
} else {
47
} else {
48
        echo _L('Thank you very much for choosing OIDplus!');
48
        echo _L('Thank you very much for choosing OIDplus!');
49
        echo ' ';
49
        echo ' ';
50
        echo _L('This setup assistant will help you creating the file <b>%1</b>.',$existing_config);
50
        echo _L('This setup assistant will help you creating the file <b>%1</b>.',$existing_config);
51
}
51
}
52
echo ' ';
52
echo ' ';
53
echo _L('However, it does not automatically write to this file. Instead, you need to copy-paste the contents into the file.');
53
echo _L('However, it does not automatically write to this file. Instead, you need to copy-paste the contents into the file.');
54
echo ' ';
54
echo ' ';
55
if ($already_setup) {
55
if ($already_setup) {
56
        echo _L('Later, you can change the config file by hand, or run this assistant again.');
56
        echo _L('Later, you can change the config file by hand, or run this assistant again.');
57
} else {
57
} else {
58
        echo _L('Once OIDplus setup is finished, you can change the config file by hand, or run this setup assistant again.');
58
        echo _L('Once OIDplus setup is finished, you can change the config file by hand, or run this setup assistant again.');
59
}
59
}
60
echo '</p>';
60
echo '</p>';
61
 
61
 
62
echo '<h2 id="systemCheckCaption" style="display:none">'._L('System check').'</h2>';
62
echo '<h2 id="systemCheckCaption" style="display:none">'._L('System check').'</h2>';
63
echo '<div id="dirAccessWarning"></div>';
63
echo '<div id="dirAccessWarning"></div>';
64
 
64
 
65
echo '<div id="step1">';
65
echo '<div id="step1">';
66
echo '<h2>'._L('Step %1: Enter setup information',1).'</h2>';
66
echo '<h2>'._L('Step %1: Enter setup information',1).'</h2>';
67
 
67
 
68
// ----------------------------------------
68
// ----------------------------------------
69
 
69
 
70
echo '<h3>'._L('Administrator password').'</h3>';
70
echo '<h3>'._L('Administrator password').'</h3>';
71
 
71
 
72
echo '<form id="step1_form">';
72
echo '<form id="step1_form">';
73
echo '<p>'._L('Which admin password do you want?').'<br><input id="admin_password" type="password" autocomplete="new-password" onkeypress="rebuild()" onkeyup="rebuild()"> <span id="password_warn"></span></p>';
73
echo '<p>'._L('Which admin password do you want?').'<br><input id="admin_password" type="password" autocomplete="new-password" onkeypress="rebuild()" onkeyup="rebuild()"> <span id="password_warn"></span></p>';
74
echo '<p>'._L('Please repeat the password input:').'<br><input id="admin_password2" type="password" autocomplete="new-password" onkeypress="rebuild()" onkeyup="rebuild()"> <span id="password_warn2"></span></p>';
74
echo '<p>'._L('Please repeat the password input:').'<br><input id="admin_password2" type="password" autocomplete="new-password" onkeypress="rebuild()" onkeyup="rebuild()"> <span id="password_warn2"></span></p>';
75
 
75
 
76
// ----------------------------------------
76
// ----------------------------------------
77
 
77
 
78
echo '<h3>'._L('Database connectivity').'</h3>';
78
echo '<h3>'._L('Database connectivity').'</h3>';
79
 
79
 
80
if (file_exists(__DIR__ . '/../doc/database_connectivity_diagram.png')) {
80
if (file_exists(__DIR__ . '/../doc/database_connectivity_diagram.png')) {
81
        echo '<p><a href="../doc/database_connectivity_diagram.png" target="_blank"><img src="../doc/database_connectivity_diagram.png" width="20%" alt="'._L('Database connectivity diagram').'" title="'._L('Database connectivity diagram').'"></a></p>';
81
        echo '<p><a href="../doc/database_connectivity_diagram.png" target="_blank"><img src="../doc/database_connectivity_diagram.png" width="20%" alt="'._L('Database connectivity diagram').'" title="'._L('Database connectivity diagram').'"></a></p>';
82
}
82
}
83
 
83
 
84
echo _L('Database plugin').': <select name="db_plugin" onChange="dbplugin_changed()" id="db_plugin">';
84
echo _L('Database plugin').': <select name="db_plugin" onChange="dbplugin_changed()" id="db_plugin">';
85
 
85
 
86
OIDplus::registerAllPlugins('database', OIDplusDatabasePlugin::class, array(OIDplus::class,'registerDatabasePlugin'));
86
OIDplus::registerAllPlugins('database', OIDplusDatabasePlugin::class, array(OIDplus::class,'registerDatabasePlugin'));
87
foreach (OIDplus::getDatabasePlugins() as $plugin) {
87
foreach (OIDplus::getDatabasePlugins() as $plugin) {
88
        $selected = $plugin::id() == 'MySQL' ? ' selected="true"' : '';
88
        $selected = $plugin::id() == 'MySQL' ? ' selected="true"' : '';
89
        echo '<option value="'.htmlentities($plugin::id()).'"'.$selected.'>'.htmlentities($plugin::id()).'</option>';
89
        echo '<option value="'.htmlentities($plugin::id()).'"'.$selected.'>'.htmlentities($plugin::id()).'</option>';
90
}
90
}
91
 
91
 
92
echo '</select>';
92
echo '</select>';
93
 
93
 
94
echo '<div style="margin-left:50px">';
94
echo '<div style="margin-left:50px">';
95
 
95
 
96
OIDplus::registerAllPlugins('sqlSlang', OIDplusSqlSlangPlugin::class, array(OIDplus::class,'registerSqlSlangPlugin'));
96
OIDplus::registerAllPlugins('sqlSlang', OIDplusSqlSlangPlugin::class, array(OIDplus::class,'registerSqlSlangPlugin'));
97
$sql_slang_selection = array();
97
$sql_slang_selection = array();
98
foreach (OIDplus::getSqlSlangPlugins() as $plugin) {
98
foreach (OIDplus::getSqlSlangPlugins() as $plugin) {
99
        $slang_id = $plugin::id();
99
        $slang_id = $plugin::id();
100
        $pluginManifest = $plugin->getManifest();
100
        $pluginManifest = $plugin->getManifest();
101
        $human_friendly_name = empty($pluginManifest->getName()) ? get_class($plugin) : $pluginManifest->getName();
101
        $human_friendly_name = empty($pluginManifest->getName()) ? get_class($plugin) : $pluginManifest->getName();
102
        $sql_slang_selection[] = '<option value="'.$slang_id.'">'.$human_friendly_name.'</option>';
102
        $sql_slang_selection[] = '<option value="'.$slang_id.'">'.$human_friendly_name.'</option>';
103
}
103
}
104
$sql_slang_selection = implode("\n", $sql_slang_selection);
104
$sql_slang_selection = implode("\n", $sql_slang_selection);
105
 
105
 
106
$found_db_plugins = 0;
106
$found_db_plugins = 0;
107
//OIDplus::registerAllPlugins('database', OIDplusDatabasePlugin::class, array(OIDplus::class,'registerDatabasePlugin'));
107
//OIDplus::registerAllPlugins('database', OIDplusDatabasePlugin::class, array(OIDplus::class,'registerDatabasePlugin'));
108
foreach (OIDplus::getDatabasePlugins() as $plugin) {
108
foreach (OIDplus::getDatabasePlugins() as $plugin) {
109
        $found_db_plugins++;
109
        $found_db_plugins++;
110
        $cont = $plugin->setupHTML();
110
        $cont = $plugin->setupHTML();
111
        $cont = str_replace('<!-- %SQL_SLANG_SELECTION% -->', $sql_slang_selection, $cont);
111
        $cont = str_replace('<!-- %SQL_SLANG_SELECTION% -->', $sql_slang_selection, $cont);
112
        echo $cont;
112
        echo $cont;
113
}
113
}
114
 
114
 
115
if ($found_db_plugins == 0) {
115
if ($found_db_plugins == 0) {
116
        echo '<p><font color="red">'._L('ERROR: No database plugins were found! You CANNOT use OIDplus without database connection.').'</font></p>';
116
        echo '<p><font color="red">'._L('ERROR: No database plugins were found! You CANNOT use OIDplus without database connection.').'</font></p>';
117
}
117
}
118
 
118
 
119
echo '</div>';
119
echo '</div>';
120
 
120
 
121
echo '<p>'._L('Table name prefix (e.g. <b>oidplus_</b>)').':<br><input id="tablename_prefix" type="text" value="oidplus_" onkeypress="rebuild()" onkeyup="rebuild()"></p>';
121
echo '<p>'._L('Table name prefix (e.g. <b>oidplus_</b>)').':<br><input id="tablename_prefix" type="text" value="oidplus_" onkeypress="rebuild()" onkeyup="rebuild()"></p>';
122
 
122
 
123
// ----------------------------------------
123
// ----------------------------------------
124
 
124
 
125
echo '<h3>'._L('CAPTCHA').'</h3>';
125
echo '<h3>'._L('CAPTCHA').'</h3>';
126
 
126
 
127
// TODO: Add a small explanation here, in case somebody does not know what CAPTCHA is
127
// TODO: Add a small explanation here, in case somebody does not know what CAPTCHA is
128
 
128
 
129
echo _L('CAPTCHA plugin').': <select name="captcha_plugin" onChange="captchaplugin_changed()" id="captcha_plugin">';
129
echo _L('CAPTCHA plugin').': <select name="captcha_plugin" onChange="captchaplugin_changed()" id="captcha_plugin">';
130
 
130
 
131
OIDplus::registerAllPlugins('captcha', OIDplusCaptchaPlugin::class, array(OIDplus::class,'registerCaptchaPlugin'));
131
OIDplus::registerAllPlugins('captcha', OIDplusCaptchaPlugin::class, array(OIDplus::class,'registerCaptchaPlugin'));
132
foreach (OIDplus::getCaptchaPlugins() as $plugin) {
132
foreach (OIDplus::getCaptchaPlugins() as $plugin) {
133
        $selected = strtolower($plugin::id()) === strtolower('None') ? ' selected="true"' : ''; // select "None" by default
133
        $selected = strtolower($plugin::id()) === strtolower('None') ? ' selected="true"' : ''; // select "None" by default
134
        echo '<option value="'.htmlentities($plugin::id()).'"'.$selected.'>'.htmlentities($plugin::id()).'</option>';
134
        echo '<option value="'.htmlentities($plugin::id()).'"'.$selected.'>'.htmlentities($plugin::id()).'</option>';
135
}
135
}
136
 
136
 
137
echo '</select>';
137
echo '</select>';
138
 
138
 
139
echo '<div style="margin-left:50px">';
139
echo '<div style="margin-left:50px">';
140
 
140
 
141
$found_captcha_plugins = 0;
141
$found_captcha_plugins = 0;
142
foreach (OIDplus::getCaptchaPlugins() as $plugin) {
142
foreach (OIDplus::getCaptchaPlugins() as $plugin) {
143
        $found_captcha_plugins++;
143
        $found_captcha_plugins++;
144
        $cont = $plugin->setupHTML();
144
        $cont = $plugin->setupHTML();
145
        echo $cont;
145
        echo $cont;
146
}
146
}
147
 
147
 
148
if ($found_captcha_plugins == 0) {
148
if ($found_captcha_plugins == 0) {
149
        echo '<p><font color="red">'._L('ERROR: No CAPTCHA plugins were found! You CANNOT use OIDplus without the "%1" CAPTCHA plugin.','None').'</font></p>';
149
        echo '<p><font color="red">'._L('ERROR: No CAPTCHA plugins were found! You CANNOT use OIDplus without the "%1" CAPTCHA plugin.','None').'</font></p>';
150
}
150
}
151
 
151
 
152
echo '</div>';
152
echo '</div>';
153
 
153
 
154
// ----------------------------------------
154
// ----------------------------------------
155
 
155
 
156
$is_ssl = OIDplus::isSSL();
156
$is_ssl = OIDplus::isSSL();
157
echo '<h3>'._L('Secure connection (HTTPS)').'</h3>';
157
echo '<h3>'._L('Secure connection (HTTPS)').'</h3>';
158
echo '<p>'._L('Enforcement of a secure connection:').'<br><select name="enforce_ssl" id="enforce_ssl" onchange="rebuild()">';
158
echo '<p>'._L('Enforcement of a secure connection:').'<br><select name="enforce_ssl" id="enforce_ssl" onchange="rebuild()">';
159
echo '<option value="OIDplus::ENFORCE_SSL_NO">'._L('No SSL available (don\'t redirect)').'</option>';
159
echo '<option value="OIDplus::ENFORCE_SSL_NO">'._L('No SSL available (don\'t redirect)').'</option>';
160
echo '<option value="OIDplus::ENFORCE_SSL_YES"'.($is_ssl ? ' selected' : '').'>'._L('Enforce SSL (always redirect)').'</option>';
160
echo '<option value="OIDplus::ENFORCE_SSL_YES"'.($is_ssl ? ' selected' : '').'>'._L('Enforce SSL (always redirect)').'</option>';
161
echo '<option value="OIDplus::ENFORCE_SSL_AUTO"'.(!$is_ssl ? ' selected' : '').'>'._L('Intelligent SSL detection (redirect if port 443 is open)').'</option>';
161
echo '<option value="OIDplus::ENFORCE_SSL_AUTO"'.(!$is_ssl ? ' selected' : '').'>'._L('Intelligent SSL detection (redirect if port 443 is open)').'</option>';
162
echo '</select></p>';
162
echo '</select></p>';
163
 
163
 
164
// ----------------------------------------
164
// ----------------------------------------
165
 
165
 
166
echo '<h3>'._L('Public URL of this system (Canonical URL)').'</h3>';
166
echo '<h3>'._L('Public URL of this system (Canonical URL)').'</h3>';
167
 
167
 
168
echo '<p><input id="canonical_url" type="text" value="'.htmlentities(OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL)).'" onkeypress="rebuild()" onkeyup="rebuild()" style="width:550px"></p>';
168
echo '<p><input id="canonical_url" type="text" value="'.htmlentities(OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL)).'" onkeypress="rebuild()" onkeyup="rebuild()" style="width:550px"></p>';
169
 
169
 
170
// ----------------------------------------
170
// ----------------------------------------
171
 
171
 
172
echo '</form>';
172
echo '</form>';
173
echo '</div>';
173
echo '</div>';
174
 
174
 
175
echo '<div id="step2">';
175
echo '<div id="step2">';
176
echo '<h2>'._L('Step %1: Initialize database',2).'</h2>';
176
echo '<h2>'._L('Step %1: Initialize database',2).'</h2>';
177
if ($already_setup) {
177
if ($already_setup) {
178
        echo '<p><input type="checkbox" id="step2_enable"> <label for="step2_enable"><font color="red">'._L('Re-Install database (all data will be deleted)').'</font></label></p>';
178
        echo '<p><input type="checkbox" id="step2_enable"> <label for="step2_enable"><font color="red">'._L('Re-Install database (all data will be deleted)').'</font></label></p>';
179
}
179
}
180
echo '<div id="step2_inner">';
180
echo '<div id="step2_inner">';
181
echo '<p>'._L('Please import one of the following SQL dumps in your database:').'</p>';
181
echo '<p>'._L('Please import one of the following SQL dumps in your database:').'</p>';
182
echo '<p><ul>';
182
echo '<p><ul>';
183
echo '  <li><a href="struct_empty.sql.php" id="struct_1" target="_blank">'._L('Empty OIDplus database without example data').'</a><span id="struct_cli_1"></span><br><br></li>';
183
echo '  <li><a href="struct_empty.sql.php" id="struct_1" target="_blank">'._L('Empty OIDplus database without example data').'</a><span id="struct_cli_1"></span><br><br></li>';
184
echo '  <li><a href="struct_with_examples.sql.php" id="struct_2" target="_blank">'._L('OIDplus database with example data').'</a><span id="struct_cli_2"></span><br><br></li>';
184
echo '  <li><a href="struct_with_examples.sql.php" id="struct_2" target="_blank">'._L('OIDplus database with example data').'</a><span id="struct_cli_2"></span><br><br></li>';
185
echo '</ul></p>';
185
echo '</ul></p>';
186
echo '<p><font color="red">'._L('Warning: Existing OIDplus data will be deleted during the initialization of the database.').'</font></p>';
186
echo '<p><font color="red">'._L('Warning: Existing OIDplus data will be deleted during the initialization of the database.').'</font></p>';
187
echo '</div>';
187
echo '</div>';
188
if ($already_setup) {
188
if ($already_setup) {
189
        echo '<script>';
189
        echo '<script>';
190
        echo '$("#step2_enable").click(function() {';
190
        echo '$("#step2_enable").click(function() {';
191
        echo '    if ($(this).is(":checked")) {';
191
        echo '    if ($(this).is(":checked")) {';
192
        echo '        $("#step2_inner").show();';
192
        echo '        $("#step2_inner").show();';
193
        echo '    } else {';
193
        echo '    } else {';
194
        echo '        $("#step2_inner").hide();';
194
        echo '        $("#step2_inner").hide();';
195
        echo '    }';
195
        echo '    }';
196
        echo '});';
196
        echo '});';
197
        echo '$("#step2_inner").hide();';
197
        echo '$("#step2_inner").hide();';
198
        echo '</script>';
198
        echo '</script>';
199
}
199
}
200
echo '</div>';
200
echo '</div>';
201
 
201
 
202
// ----------------------------------------
202
// ----------------------------------------
203
 
203
 
204
echo '<div id="step3">';
204
echo '<div id="step3">';
205
echo '<h2>'._L('Step %1: Save %2 file',3,$existing_config).'</h2>';
205
echo '<h2>'._L('Step %1: Save %2 file',3,$existing_config).'</h2>';
206
echo '<p>'._L('Save following contents into the file <b>%1</b>',$existing_config).'</p>';
206
echo '<p>'._L('Save following contents into the file <b>%1</b>',$existing_config).'</p>';
207
echo '<code><font color="darkblue"><div id="config"></div></font></code><br>';
207
echo '<code><font color="darkblue"><div id="config"></div></font></code><br>';
208
echo '<p><input type="button" value="'._L('Copy to clipboard').'" onClick="copyToClipboard(config)"></p>';
208
echo '<p><input type="button" value="'._L('Copy to clipboard').'" onClick="copyToClipboard(config)"></p>';
209
echo '</div>';
209
echo '</div>';
210
 
210
 
211
// ----------------------------------------
211
// ----------------------------------------
212
 
212
 
213
echo '<div id="step4">';
213
echo '<div id="step4">';
214
echo '<h2>'._L('Step %1: After you have updated the file...',4).'</h2>';
214
echo '<h2>'._L('Step %1: After you have updated the file...',4).'</h2>';
215
if (is_dir(__DIR__.'/../plugins/viathinksoft/adminPages/050_oobe/')) {
215
if (is_dir(__DIR__.'/../plugins/viathinksoft/adminPages/050_oobe/')) {
216
        if ($already_setup) {
216
        if ($already_setup) {
217
                echo '<p><input type="button" onclick="window.location.href=\'../plugins/viathinksoft/adminPages/050_oobe/oobe.php\'" value="'._L('Check connection and modify initial settings').'"></p>';
217
                echo '<p><input type="button" onclick="window.location.href=\'../plugins/viathinksoft/adminPages/050_oobe/oobe.php\'" value="'._L('Check connection and modify initial settings').'"></p>';
218
                echo '<p><input type="button" onclick="window.location.href=\'../\'" value="'._L('Check connection and start OIDplus').'"></p>';
218
                echo '<p><input type="button" onclick="window.location.href=\'../\'" value="'._L('Check connection and start OIDplus').'"></p>';
219
        } else {
219
        } else {
220
                echo '<p><input type="button" onclick="window.location.href=\'../plugins/viathinksoft/adminPages/050_oobe/oobe.php\'" value="'._L('Check connection and go to initial settings').'"></p>';
220
                echo '<p><input type="button" onclick="window.location.href=\'../plugins/viathinksoft/adminPages/050_oobe/oobe.php\'" value="'._L('Check connection and go to initial settings').'"></p>';
221
        }
221
        }
222
} else {
222
} else {
223
        echo '<p><input type="button" onclick="window.location.href=\'../\'" value="'._L('Check connection and start OIDplus').'"></p>';
223
        echo '<p><input type="button" onclick="window.location.href=\'../\'" value="'._L('Check connection and start OIDplus').'"></p>';
224
}
224
}
225
echo '</div>';
225
echo '</div>';
226
 
226
 
227
echo '<span id="footer_warn"></span>';
227
echo '<span id="footer_warn"></span>';
228
 
228
 
229
echo '<br><br>'; // because of iPhone Safari
229
echo '<br><br>'; // because of iPhone Safari
230
 
230
 
231
echo '</span>';
231
echo '</span>';
232
 
232
 
233
echo '<script> $("#setupPageContent")[0].style.display = "Block"; </script>';
233
echo '<script> $("#setupPageContent")[0].style.display = "Block"; </script>';
234
 
234
 
235
# ---
235
# ---
236
 
236
 
237
$page_title_1 = _L('OIDplus Setup');
237
$page_title_1 = _L('OIDplus Setup');
238
$page_title_2 = _L('Configuration File Generator');
238
$page_title_2 = _L('Configuration File Generator');
239
$static_icon = 'img/main_icon.png';
239
$static_icon = 'img/main_icon.png';
240
$static_content = ob_get_contents();
240
$static_content = ob_get_contents();
-
 
241
if (!$static_content) $static_content = '';
241
$extra_head_tags = array();
242
$extra_head_tags = array();
242
$extra_head_tags[] = '<meta name="robots" content="noindex">';
243
$extra_head_tags[] = '<meta name="robots" content="noindex">';
243
$extra_head_tags[] = '<link rel="stylesheet" href="setup.min.css.php">';
244
$extra_head_tags[] = '<link rel="stylesheet" href="setup.min.css.php">';
244
$extra_head_tags[] = '<script src="setup.min.js.php" type="text/javascript"></script>';
245
$extra_head_tags[] = '<script src="setup.min.js.php" type="text/javascript"></script>';
245
ob_end_clean();
246
ob_end_clean();
246
 
247
 
247
$cont = OIDplus::gui()->showSimplePage($page_title_1, $page_title_2, $static_icon, $static_content, $extra_head_tags);
248
$cont = OIDplus::gui()->showSimplePage($page_title_1, $page_title_2, $static_icon, $static_content, $extra_head_tags);
248
 
249
 
249
OIDplus::invoke_shutdown();
250
OIDplus::invoke_shutdown();
250
 
251
 
251
echo $cont;
252
echo $cont;
252
 
253