Rev 564 | Rev 703 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 564 | Rev 702 | ||
---|---|---|---|
Line 51... | Line 51... | ||
51 | echo '<div id="dirAccessWarning"></div>'; |
51 | echo '<div id="dirAccessWarning"></div>'; |
52 | 52 | ||
53 | echo '<div id="step1">'; |
53 | echo '<div id="step1">'; |
54 | echo '<h2>'._L('Step %1: Enter setup information',1).'</h2>'; |
54 | echo '<h2>'._L('Step %1: Enter setup information',1).'</h2>'; |
55 | 55 | ||
- | 56 | // ---------------------------------------- |
|
- | 57 | ||
56 | echo '<h3>'._L('Administrator password').'</h3>'; |
58 | echo '<h3>'._L('Administrator password').'</h3>'; |
57 | 59 | ||
58 | echo '<form id="step1_form">'; |
60 | echo '<form id="step1_form">'; |
59 | 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>'; |
61 | 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>'; |
60 | 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>'; |
62 | 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>'; |
61 | 63 | ||
- | 64 | // ---------------------------------------- |
|
- | 65 | ||
62 | echo '<h3>'._L('Database connectivity').'</h3>'; |
66 | echo '<h3>'._L('Database connectivity').'</h3>'; |
63 | 67 | ||
64 | if (file_exists(__DIR__ . '/../doc/database_connectivity_diagram.png')) { |
68 | if (file_exists(__DIR__ . '/../doc/database_connectivity_diagram.png')) { |
65 | 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>'; |
69 | 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>'; |
66 | } |
70 | } |
Line 102... | Line 106... | ||
102 | 106 | ||
103 | echo '</div>'; |
107 | echo '</div>'; |
104 | 108 | ||
105 | 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>'; |
109 | 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>'; |
106 | 110 | ||
- | 111 | // ---------------------------------------- |
|
- | 112 | ||
107 | echo '<h3>'._L('ReCAPTCHA').'</h3>'; |
113 | echo '<h3>'._L('CAPTCHA').'</h3>'; |
108 | echo '<p><input id="recaptcha_enabled" type="checkbox" onclick="rebuild()"> <label for="recaptcha_enabled">'._L('reCAPTCHA enabled').'</label> (<a href="https://developers.google.com/recaptcha/intro" target="_blank">'._L('more information and obtain key').'</a>)</p>'; |
114 | |
109 | echo '<p>'._L('reCAPTCHA Public key').'<br><input id="recaptcha_public" type="text" onkeypress="rebuild()" onkeyup="rebuild()"></p>'; |
115 | echo _L('CAPTCHA plugin').': <select name="captcha_plugin" onChange="captchaplugin_changed()" id="captcha_plugin">'; |
- | 116 | ||
- | 117 | OIDplus::registerAllPlugins('captcha', 'OIDplusCaptchaPlugin', array('OIDplus','registerCaptchaPlugin')); |
|
- | 118 | foreach (OIDplus::getCaptchaPlugins() as $plugin) { |
|
- | 119 | $selected = $plugin::id() === 'None' ? ' selected="true"' : ''; |
|
- | 120 | echo '<option value="'.htmlentities($plugin::id()).'"'.$selected.'>'.htmlentities($plugin::id()).'</option>'; |
|
- | 121 | } |
|
- | 122 | ||
- | 123 | echo '</select>'; |
|
- | 124 | ||
- | 125 | echo '<div style="margin-left:50px">'; |
|
- | 126 | ||
- | 127 | $found_captcha_plugins = 0; |
|
- | 128 | foreach (OIDplus::getCaptchaPlugins() as $plugin) { |
|
- | 129 | $found_captcha_plugins++; |
|
- | 130 | $cont = $plugin->setupHTML(); |
|
- | 131 | echo $cont; |
|
- | 132 | } |
|
- | 133 | ||
- | 134 | if ($found_captcha_plugins == 0) { |
|
- | 135 | echo '<p><font color="red">'._L('ERROR: No CAPTCHA plugins were found! You CANNOT use OIDplus without the "%1" CAPTCHA plugin.','None').'</font></p>'; |
|
- | 136 | } |
|
- | 137 | ||
- | 138 | echo '</div>'; |
|
- | 139 | ||
- | 140 | // Commented out, because it might confuse people during the OOBE |
|
110 | echo '<p>'._L('reCAPTCHA Private key').'<br><input id="recaptcha_private" type="text" onkeypress="rebuild()" onkeyup="rebuild()"></p>'; |
141 | //echo '<p>'._L('Note: In case you are already operating a system, the users need to reload the webpage in order to receive the new CAPTCHA settings.').'</p>'; |
- | 142 | ||
- | 143 | // ---------------------------------------- |
|
111 | 144 | ||
112 | echo '<h3>'._L('TLS').'</h3>'; |
145 | echo '<h3>'._L('TLS').'</h3>'; |
113 | echo '<p>'._L('SSL enforcement').'<br><select name="enforce_ssl" id="enforce_ssl" onclick="rebuild()">'; |
146 | echo '<p>'._L('SSL enforcement').'<br><select name="enforce_ssl" id="enforce_ssl" onclick="rebuild()">'; |
114 | echo '<option value="0">'._L('No SSL available (don\'t redirect)').'</option>'; |
147 | echo '<option value="0">'._L('No SSL available (don\'t redirect)').'</option>'; |
115 | echo '<option value="1">'._L('Enforce SSL (always redirect)').'</option>'; |
148 | echo '<option value="1">'._L('Enforce SSL (always redirect)').'</option>'; |
116 | echo '<option value="2" selected>'._L('Intelligent SSL detection (redirect if port 443 is open)').'</option>'; |
149 | echo '<option value="2" selected>'._L('Intelligent SSL detection (redirect if port 443 is open)').'</option>'; |
117 | echo '</select></p>'; |
150 | echo '</select></p>'; |
118 | echo '</form>'; |
151 | echo '</form>'; |
119 | echo '</div>'; |
152 | echo '</div>'; |
120 | 153 | ||
- | 154 | // ---------------------------------------- |
|
- | 155 | ||
121 | echo '<div id="step2">'; |
156 | echo '<div id="step2">'; |
122 | echo '<h2>'._L('Step %1: Initialize database',2).'</h2>'; |
157 | echo '<h2>'._L('Step %1: Initialize database',2).'</h2>'; |
123 | echo '<p><font color="red"><b>'._L('If you already have an OIDplus database and just want to rebuild the config file, please skip this step.').'</b></font></p>'; |
158 | echo '<p><font color="red"><b>'._L('If you already have an OIDplus database and just want to rebuild the config file, please skip this step.').'</b></font></p>'; |
124 | echo '<p>'._L('Otherwise, import one of the following SQL dumps in your database:').'</p>'; |
159 | echo '<p>'._L('Otherwise, import one of the following SQL dumps in your database:').'</p>'; |
125 | echo '<p><ul>'; |
160 | echo '<p><ul>'; |
Line 127... | Line 162... | ||
127 | 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>'; |
162 | 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>'; |
128 | echo '</ul></p>'; |
163 | echo '</ul></p>'; |
129 | echo '<p><font color="red">'._L('Warning: All data from the previous OIDplus instance will be deleted during the import.<br>If you already have an OIDplus database, skip to Step 3.').'</font></p>'; |
164 | echo '<p><font color="red">'._L('Warning: All data from the previous OIDplus instance will be deleted during the import.<br>If you already have an OIDplus database, skip to Step 3.').'</font></p>'; |
130 | echo '</div>'; |
165 | echo '</div>'; |
131 | 166 | ||
- | 167 | // ---------------------------------------- |
|
- | 168 | ||
132 | echo '<div id="step3">'; |
169 | echo '<div id="step3">'; |
133 | echo '<h2>'._L('Step %1: Save %2 file',3,'userdata/baseconfig/config.inc.php').'</h2>'; |
170 | echo '<h2>'._L('Step %1: Save %2 file',3,'userdata/baseconfig/config.inc.php').'</h2>'; |
134 | echo '<p>'._L('Save following contents into the file <b>%1</b>','userdata/baseconfig/config.inc.php').'</p>'; |
171 | echo '<p>'._L('Save following contents into the file <b>%1</b>','userdata/baseconfig/config.inc.php').'</p>'; |
135 | echo '<code><font color="darkblue"><div id="config"></div></font></code>'; |
172 | echo '<code><font color="darkblue"><div id="config"></div></font></code>'; |
136 | echo '</div>'; |
173 | echo '</div>'; |
137 | 174 | ||
- | 175 | // ---------------------------------------- |
|
- | 176 | ||
138 | echo '<div id="step4">'; |
177 | echo '<div id="step4">'; |
139 | echo '<h2>'._L('Step %1: Continue to next step',4).'</h2>'; |
178 | echo '<h2>'._L('Step %1: Continue to next step',4).'</h2>'; |
140 | echo '<p><input type="button" onclick="window.location.href=\'../\'" value="'._L('Continue').'"></p>'; |
179 | echo '<p><input type="button" onclick="window.location.href=\'../\'" value="'._L('Continue').'"></p>'; |
141 | // echo '<p><a href="../">Run the OIDplus system</a></p>'; |
180 | // echo '<p><a href="../">Run the OIDplus system</a></p>'; |
142 | echo '</div>'; |
181 | echo '</div>'; |