1 | <?php |
||
2 | /** |
||
3 | * |
||
4 | * @package admin.settings.php |
||
5 | * @author Nils Laumaillé <[email protected]> |
||
6 | * @version 2.1.27 |
||
7 | * @copyright 2009-2018 Nils Laumaillé |
||
8 | * @license GNU GPL-3.0 |
||
9 | * @link https://www.teampass.net |
||
10 | * |
||
11 | * This library is distributed in the hope that it will be useful, |
||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||
14 | */ |
||
15 | |||
16 | if (!isset($_SESSION['CPM']) || $_SESSION['CPM'] != 1 || |
||
17 | !isset($_SESSION['user_id']) || empty($_SESSION['user_id']) || |
||
18 | !isset($_SESSION['key']) || empty($_SESSION['key']) |
||
19 | ) { |
||
20 | die('Hacking attempt...'); |
||
21 | } |
||
22 | |||
23 | // Load config |
||
24 | if (file_exists('../includes/config/tp.config.php')) { |
||
25 | include_once '../includes/config/tp.config.php'; |
||
26 | } elseif (file_exists('./includes/config/tp.config.php')) { |
||
27 | include_once './includes/config/tp.config.php'; |
||
28 | } else { |
||
29 | throw new Exception("Error file '/includes/config/tp.config.php' not exists", 1); |
||
30 | } |
||
31 | |||
32 | /* do checks */ |
||
33 | require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
||
34 | if (!checkUser($_SESSION['user_id'], $_SESSION['key'], curPage())) { |
||
35 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page |
||
36 | include $SETTINGS['cpassman_dir'].'/error.php'; |
||
37 | exit(); |
||
38 | } |
||
39 | |||
40 | echo ' |
||
41 | <input type="hidden" id="user_token" value="" /> |
||
42 | <div style="margin-top:10px;"> |
||
43 | <form name="form_settings" method="post" action="">'; |
||
44 | // Main div for TABS |
||
45 | echo ' |
||
46 | <div style="width:900px;margin:auto; line-height:20px; padding:10px;" id="tabs">'; |
||
47 | // Tabs menu |
||
48 | echo ' |
||
49 | <ul> |
||
50 | <li><a href="#tabs-1">'.$LANG['admin_settings_title'].'</a></li> |
||
51 | <li><a href="#tabs-3">'.$LANG['admin_misc_title'].'</a></li> |
||
52 | <li><a href="#tabs-7">'.$LANG['admin_upload_title'].'</a></li> |
||
53 | <li><a href="#tabs-2">'.$LANG['admin_actions_title'].'</a></li> |
||
54 | <li><a href="#tabs-4">'.$LANG['admin_ldap_menu'].'</a></li> |
||
55 | <li><a href="#tabs-5">'.$LANG['admin_backups'].'</a></li> |
||
56 | <li><a href="#tabs-6">'.$LANG['admin_emails'].'</a></li> |
||
57 | <li><a href="admin.settings_categories.php">'.$LANG['categories'].'</a></li> |
||
58 | <li><a href="admin.settings_api.php">'.$LANG['admin_api'].'</a></li> |
||
59 | <li><a href="admin.settings_duo.php">'.$LANG['admin_2factor_authentication_tab'].'</a></li> |
||
60 | </ul>'; |
||
61 | // -------------------------------------------------------------------------------- |
||
62 | // TAB Né1 |
||
63 | echo ' |
||
64 | <div id="tabs-1"> |
||
65 | <table border="0">'; |
||
66 | // cpassman_dir |
||
67 | echo ' |
||
68 | <tr style="margin-bottom:3px"> |
||
69 | <td> |
||
70 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
71 | <label for="cpassman_dir">'.$LANG['admin_misc_cpassman_dir'].'</label> |
||
72 | </td> |
||
73 | <td> |
||
74 | <input type="text" size="80" id="cpassman_dir" name="cpassman_dir" value="', isset($SETTINGS['cpassman_dir']) ? $SETTINGS['cpassman_dir'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
75 | </td> |
||
76 | </tr>'; |
||
77 | // cpassman_url |
||
78 | echo ' |
||
79 | <tr style="margin-bottom:3px"> |
||
80 | <td> |
||
81 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
82 | <label for="cpassman_url">'.$LANG['admin_misc_cpassman_url'].'</label> |
||
83 | </td> |
||
84 | <td> |
||
85 | <input type="text" size="80" id="cpassman_url" name="cpassman_url" value="', isset($SETTINGS['cpassman_url']) ? $SETTINGS['cpassman_url'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
86 | </td> |
||
87 | </tr>'; |
||
88 | // path_to_upload_folder |
||
89 | echo ' |
||
90 | <tr style="margin-bottom:3px"> |
||
91 | <td> |
||
92 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
93 | <label for="path_to_upload_folder">'.$LANG['admin_path_to_upload_folder'].'</label> |
||
94 | <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_path_to_upload_folder_tip']), ENT_QUOTES).'"></i> |
||
95 | </td> |
||
96 | <td> |
||
97 | <input type="text" size="80" id="path_to_upload_folder" name="path_to_upload_folder" value="', isset($SETTINGS['path_to_upload_folder']) ? $SETTINGS['path_to_upload_folder'] : $SETTINGS['cpassman_dir'].'/upload', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
98 | </td> |
||
99 | </tr>'; |
||
100 | // url_to_upload_folder |
||
101 | echo ' |
||
102 | <tr style="margin-bottom:3px"> |
||
103 | <td> |
||
104 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
105 | <label for="url_to_upload_folder">'.$LANG['admin_url_to_upload_folder'].'</label> |
||
106 | </td> |
||
107 | <td> |
||
108 | <input type="text" size="80" id="url_to_upload_folder" name="url_to_upload_folder" value="', isset($SETTINGS['url_to_upload_folder']) ? $SETTINGS['url_to_upload_folder'] : $SETTINGS['cpassman_url'].'/upload', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
109 | </td> |
||
110 | </tr>'; |
||
111 | // path_to_files_folder |
||
112 | echo ' |
||
113 | <tr style="margin-bottom:3px"> |
||
114 | <td> |
||
115 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
116 | <label for="path_to_files_folder">'.$LANG['admin_path_to_files_folder'].'</label> |
||
117 | <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_path_to_files_folder_tip']), ENT_QUOTES).'"></i> |
||
118 | </td> |
||
119 | <td> |
||
120 | <input type="text" size="80" id="path_to_files_folder" name="path_to_files_folder" value="', isset($SETTINGS['path_to_files_folder']) ? $SETTINGS['path_to_files_folder'] : $SETTINGS['cpassman_dir'].'/files', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
121 | </td> |
||
122 | </tr>'; |
||
123 | // url_to_files_folder |
||
124 | echo ' |
||
125 | <tr style="margin-bottom:3px"> |
||
126 | <td> |
||
127 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
128 | <label for="url_to_files_folder">'.$LANG['admin_url_to_files_folder'].'</label> |
||
129 | </td> |
||
130 | <td> |
||
131 | <input type="text" size="80" id="url_to_files_folder" name="url_to_files_folder" value="', isset($SETTINGS['url_to_files_folder']) ? $SETTINGS['url_to_files_folder'] : $SETTINGS['cpassman_url'].'/files', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
132 | </td> |
||
133 | </tr>'; |
||
134 | // Favicon |
||
135 | echo ' |
||
136 | <tr style="margin-bottom:3px"> |
||
137 | <td> |
||
138 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
139 | <label for="favicon">'.$LANG['admin_misc_favicon'].'</label> |
||
140 | </td> |
||
141 | <td> |
||
142 | <input type="text" size="80" id="favicon" name="favicon" value="', isset($SETTINGS['favicon']) ? $SETTINGS['favicon'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
143 | </td> |
||
144 | </tr>'; |
||
145 | // custom_logo |
||
146 | echo ' |
||
147 | <tr style="margin-bottom:3px"> |
||
148 | <td> |
||
149 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
150 | <label for="cpassman_dir">'.$LANG['admin_misc_custom_logo'].'</label> |
||
151 | </td> |
||
152 | <td> |
||
153 | <input type="text" size="80" id="custom_logo" name="custom_logo" value="', isset($SETTINGS['custom_logo']) ? $SETTINGS['custom_logo'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
154 | </td> |
||
155 | </tr>'; |
||
156 | // custom_login_text |
||
157 | echo ' |
||
158 | <tr style="margin-bottom:3px"> |
||
159 | <td> |
||
160 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
161 | <label for="cpassman_dir">'.$LANG['admin_misc_custom_login_text'].'</label> |
||
162 | </td> |
||
163 | <td> |
||
164 | <input type="text" size="80" id="custom_login_text" name="custom_login_text" value="', isset($SETTINGS['custom_login_text']) ? $SETTINGS['custom_login_text'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
165 | </td> |
||
166 | </tr>'; |
||
167 | |||
168 | echo ' |
||
169 | </table>'; |
||
170 | |||
171 | echo ' |
||
172 | <table>'; |
||
173 | |||
174 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
175 | // Maintenance mode |
||
176 | echo ' |
||
177 | <tr style="margin-bottom:3px"> |
||
178 | <td> |
||
179 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
180 | <label>' . |
||
181 | $LANG['settings_maintenance_mode'].' |
||
182 | <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_maintenance_mode_tip']), ENT_QUOTES).'"></i> |
||
183 | </label> |
||
184 | </td> |
||
185 | <td> |
||
186 | <div class="toggle toggle-modern" id="maintenance_mode" data-toggle-on="', isset($SETTINGS['maintenance_mode']) && $SETTINGS['maintenance_mode'] == 1 ? 'true' : 'false', '"></div><input type="hidden" name="maintenance_mode_input" id="maintenance_mode_input" value="', isset($SETTINGS['maintenance_mode']) && $SETTINGS['maintenance_mode'] == 1 ? '1' : '0', '" /> |
||
187 | </td> |
||
188 | </tr>'; |
||
189 | // default_session_expiration_time |
||
190 | echo ' |
||
191 | <tr style="margin-bottom:3px"> |
||
192 | <td> |
||
193 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
194 | <label>'.$LANG['settings_default_session_expiration_time'].'</label> |
||
195 | </td> |
||
196 | <td> |
||
197 | <input type="text" size="15" id="default_session_expiration_time" name="default_session_expiration_time" value="', isset($SETTINGS['default_session_expiration_time']) ? $SETTINGS['default_session_expiration_time'] : "60", '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
198 | </td> |
||
199 | </tr>'; |
||
200 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
201 | // Use authentication information in HTTP header |
||
202 | echo ' |
||
203 | <tr style="margin-bottom:3px"> |
||
204 | <td> |
||
205 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
206 | <label>' . $LANG['enable_http_request_login'].'</label> |
||
207 | </td> |
||
208 | <td> |
||
209 | <div class="toggle toggle-modern" id="use_http_request_login" data-toggle-on="', isset($SETTINGS['enable_http_request_login']) && $SETTINGS['enable_http_request_login'] == 1 ? 'true' : 'false', '"></div><input type="hidden" name="enable_http_request_login_input" id="use_http_request_login_input" value="', isset($SETTINGS['enable_http_request_login']) && $SETTINGS['enable_http_request_login'] == 1 ? '1' : '0', '" /> |
||
210 | </td> |
||
211 | </tr>'; |
||
212 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
213 | //Enable SSL STS |
||
214 | echo ' |
||
215 | <tr style="margin-bottom:3px"> |
||
216 | <td> |
||
217 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
218 | <label>' . |
||
219 | $LANG['settings_enable_sts'].' |
||
220 | <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_enable_sts_tip']), ENT_QUOTES).'"></i> |
||
221 | </label> |
||
222 | </td> |
||
223 | <td> |
||
224 | <div class="toggle toggle-modern" id="enable_sts" data-toggle-on="', isset($SETTINGS['enable_sts']) && $SETTINGS['enable_sts'] == 1 ? 'true' : 'false', '"></div><input type="hidden" name="enable_sts_input" id="enable_sts_input" value="', isset($SETTINGS['enable_sts']) && $SETTINGS['enable_sts'] == 1 ? '1' : '0', '" /> |
||
225 | </td> |
||
226 | </tr>'; |
||
227 | |||
228 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
229 | //Proxy |
||
230 | echo ' |
||
231 | <tr style="margin-bottom:3px"> |
||
232 | <td> |
||
233 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
234 | <label for="proxy_ip">'.$LANG['admin_proxy_ip'].'</label> |
||
235 | <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_proxy_ip_tip']), ENT_QUOTES).'"></i> |
||
236 | </td> |
||
237 | <td> |
||
238 | <input type="text" size="15" id="proxy_ip" name="proxy_ip" value="', isset($SETTINGS['proxy_ip']) ? $SETTINGS['proxy_ip'] : "", '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
239 | </td> |
||
240 | </tr> |
||
241 | <tr style="margin-bottom:3px"> |
||
242 | <td> |
||
243 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
244 | <label for="proxy_port">'.$LANG['admin_proxy_port'].'</label> |
||
245 | <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_proxy_port_tip']), ENT_QUOTES).'"></i> |
||
246 | </td> |
||
247 | <td> |
||
248 | <input type="text" size="10" id="proxy_port" name="proxy_port" value="', isset($SETTINGS['proxy_port']) ? $SETTINGS['proxy_port'] : "", '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
249 | </td> |
||
250 | </tr>'; |
||
251 | |||
252 | |||
253 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
254 | // pwd_maximum_length |
||
255 | echo ' |
||
256 | <tr style="margin-bottom:3px"> |
||
257 | <td> |
||
258 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
259 | <label for="pwd_maximum_length">'.$LANG['admin_pwd_maximum_length'].'</label> |
||
260 | <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_pwd_maximum_length_tip']), ENT_QUOTES).'"></i> |
||
261 | </td> |
||
262 | <td> |
||
263 | <input type="text" size="10" id="pwd_maximum_length" name="pwd_maximum_length" value="', isset($SETTINGS['pwd_maximum_length']) ? $SETTINGS['pwd_maximum_length'] : 40, '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
264 | </td> |
||
265 | </tr>'; |
||
266 | |||
267 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
268 | // TIMEZONE |
||
269 | // get list of all timezones |
||
270 | $zones = timezone_identifiers_list(); |
||
271 | echo ' |
||
272 | <tr style="margin-bottom:3px"> |
||
273 | <td> |
||
274 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
275 | <label for="timezone">'.$LANG['timezone_selection'].'</label> |
||
276 | </td> |
||
277 | <td> |
||
278 | <select id="timezone" name="timezone" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));"> |
||
279 | <option value="">-- '.$LANG['select'].' --</option>'; |
||
280 | foreach ($zones as $zone) { |
||
281 | echo ' |
||
282 | <option value="'.$zone.'"', isset($SETTINGS['timezone']) && $SETTINGS['timezone'] == $zone ? ' selected="selected"' : '', '>'.$zone.'</option>'; |
||
283 | } |
||
284 | echo ' |
||
285 | </select> |
||
286 | </td> |
||
287 | </tr>'; |
||
288 | // DATE format |
||
289 | echo ' |
||
290 | <tr style="margin-bottom:3px"> |
||
291 | <td> |
||
292 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
293 | <label for="date_format">'.$LANG['date_format'].'</label> |
||
294 | </td> |
||
295 | <td> |
||
296 | <select id="date_format" name="date_format" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));"> |
||
297 | <option value="d/m/Y"', !isset($SETTINGS['date_format']) || $SETTINGS['date_format'] == "d/m/Y" ? ' selected="selected"' : "", '>d/m/Y</option> |
||
298 | <option value="m/d/Y"', $SETTINGS['date_format'] == "m/d/Y" ? ' selected="selected"' : "", '>m/d/Y</option> |
||
299 | <option value="d-M-Y"', $SETTINGS['date_format'] == "d-M-Y" ? ' selected="selected"' : "", '>d-M-Y</option> |
||
300 | <option value="d/m/y"', $SETTINGS['date_format'] == "d/m/y" ? ' selected="selected"' : "", '>d/m/y</option> |
||
301 | <option value="m/d/y"', $SETTINGS['date_format'] == "m/d/y" ? ' selected="selected"' : "", '>m/d/y</option> |
||
302 | <option value="d-M-y"', $SETTINGS['date_format'] == "d-M-y" ? ' selected="selected"' : "", '>d-M-y</option> |
||
303 | <option value="d-m-y"', $SETTINGS['date_format'] == "d-m-y" ? ' selected="selected"' : "", '>d-m-y</option> |
||
304 | <option value="Y-m-d"', $SETTINGS['date_format'] == "Y-m-d" ? ' selected="selected"' : "", '>Y-m-d</option> |
||
305 | </select> |
||
306 | </td> |
||
307 | </tr>'; |
||
308 | // TIME format |
||
309 | echo ' |
||
310 | <tr style="margin-bottom:3px"> |
||
311 | <td> |
||
312 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
313 | <label for="time_format">'.$LANG['time_format'].'</label> |
||
314 | </td> |
||
315 | <td> |
||
316 | <select id="time_format" name="time_format" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));"> |
||
317 | <option value="H:i:s"', !isset($SETTINGS['time_format']) || $SETTINGS['time_format'] == "H:i:s" ? ' selected="selected"' : "", '>H:i:s</option> |
||
318 | <option value="h:m:s a"', $SETTINGS['time_format'] == "h:i:s a" ? ' selected="selected"' : "", '>h:i:s a</option> |
||
319 | <option value="g:i:s a"', $SETTINGS['time_format'] == "g:i:s a" ? ' selected="selected"' : "", '>g:i:s a</option> |
||
320 | <option value="G:i:s"', $SETTINGS['time_format'] == "G:i:s" ? ' selected="selected"' : "", '>G:i:s</option> |
||
321 | </select> |
||
322 | </td> |
||
323 | </tr>'; |
||
324 | |||
325 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
326 | // LANGUAGES |
||
327 | $zones = timezone_identifiers_list(); |
||
328 | echo ' |
||
329 | <tr style="margin-bottom:3px"> |
||
330 | <td> |
||
331 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
332 | <label for="default_language">'.$LANG['settings_default_language'].'</label> |
||
333 | </td> |
||
334 | <td> |
||
335 | <select id="default_language" name="default_language" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));"> |
||
336 | <option value="">-- '.$LANG['select'].' --</option>'; |
||
337 | foreach ($languagesList as $lang) { |
||
338 | echo ' |
||
339 | <option value="'.$lang.'"', isset($SETTINGS['default_language']) && $SETTINGS['default_language'] == $lang ? ' selected="selected"' : '', '>'.$lang.'</option>'; |
||
340 | } |
||
341 | echo ' |
||
342 | </select> |
||
343 | </td> |
||
344 | </tr>'; |
||
345 | |||
346 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
347 | // Number of used pw |
||
348 | echo ' |
||
349 | <tr style="margin-bottom:3px"> |
||
350 | <td> |
||
351 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
352 | <label for="number_of_used_pw">'.$LANG['number_of_used_pw'].'</label> |
||
353 | </td> |
||
354 | <td> |
||
355 | <input type="text" size="10" id="number_of_used_pw" name="number_of_used_pw" value="', isset($SETTINGS['number_of_used_pw']) ? $SETTINGS['number_of_used_pw'] : '5', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
356 | </td> |
||
357 | </tr>'; |
||
358 | // Number days before changing pw |
||
359 | echo ' |
||
360 | <tr style="margin-bottom:3px"> |
||
361 | <td> |
||
362 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
363 | <label for="pw_life_duration">'.$LANG['pw_life_duration'].'</label> |
||
364 | </td> |
||
365 | <td> |
||
366 | <input type="text" size="10" id="pw_life_duration" name="pw_life_duration" value="', isset($SETTINGS['pw_life_duration']) ? $SETTINGS['pw_life_duration'] : '5', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
367 | </td> |
||
368 | </tr>'; |
||
369 | // Number of bad authentication tentations before disabling user |
||
370 | echo ' |
||
371 | <tr style="margin-bottom:3px"> |
||
372 | <td> |
||
373 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
374 | <label for="nb_bad_authentication">'.$LANG['nb_false_login_attempts'].'</label> |
||
375 | </td> |
||
376 | <td> |
||
377 | <input type="text" size="10" id="nb_bad_authentication" name="nb_bad_authentication" value="', isset($SETTINGS['nb_bad_authentication']) ? $SETTINGS['nb_bad_authentication'] : '0', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
378 | </td> |
||
379 | </tr>'; |
||
380 | |||
381 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
382 | // Enable log connections |
||
383 | echo ' |
||
384 | <tr><td> |
||
385 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
386 | <label>'.$LANG['settings_log_connections'].'</label> |
||
387 | </td> |
||
388 | <td> |
||
389 | <div class="toggle toggle-modern" id="log_connections" data-toggle-on="', isset($SETTINGS['log_connections']) && $SETTINGS['log_connections'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="log_connections_input" name="log_connections_input" value="', isset($SETTINGS['log_connections']) && $SETTINGS['log_connections'] == 1 ? '1' : '0', '" /> |
||
390 | </td> |
||
391 | </tr>'; |
||
392 | // Enable log accessed |
||
393 | echo ' |
||
394 | <tr><td> |
||
395 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
396 | <label>'.$LANG['settings_log_accessed'].'</label> |
||
397 | </td><td> |
||
398 | <div class="toggle toggle-modern" id="log_accessed" data-toggle-on="', isset($SETTINGS['log_accessed']) && $SETTINGS['log_accessed'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="log_accessed_input" name="log_accessed_input" value="', isset($SETTINGS['log_accessed']) && $SETTINGS['log_accessed'] == 1 ? '1' : '0', '" /> |
||
399 | </td> |
||
400 | </tr>'; |
||
401 | |||
402 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
403 | // enable PF |
||
404 | echo ' |
||
405 | <tr><td> |
||
406 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
407 | <label>'.$LANG['enable_personal_folder_feature'].'</label> |
||
408 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['enable_personal_folder_feature_tip']), ENT_QUOTES).'"></i></span> |
||
409 | </td><td> |
||
410 | <div class="toggle toggle-modern" id="enable_pf_feature" data-toggle-on="', isset($SETTINGS['enable_pf_feature']) && $SETTINGS['enable_pf_feature'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="enable_pf_feature_input" name="enable_pf_feature_input" value="', isset($SETTINGS['enable_pf_feature']) && $SETTINGS['enable_pf_feature'] == 1 ? '1' : '0', '" /> |
||
411 | </td></tr>'; |
||
412 | |||
413 | // enable PF cookie for Personal SALTKEY |
||
414 | echo ' |
||
415 | <tr><td> |
||
416 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
417 | <label>'.$LANG['enable_personal_saltkey_cookie'].'</label> |
||
418 | </td><td> |
||
419 | <div class="toggle toggle-modern" id="enable_personal_saltkey_cookie" data-toggle-on="', isset($SETTINGS['enable_personal_saltkey_cookie']) && $SETTINGS['enable_personal_saltkey_cookie'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="enable_personal_saltkey_cookie_input" name="enable_personal_saltkey_cookie_input" value="', isset($SETTINGS['enable_personal_saltkey_cookie']) && $SETTINGS['enable_personal_saltkey_cookie'] == 1 ? '1' : '0', '" /> |
||
420 | </td></tr>'; |
||
421 | // PF cookie for Personal SALTKEY duration |
||
422 | echo ' |
||
423 | <tr><td> |
||
424 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
425 | <label>'.$LANG['personal_saltkey_cookie_duration'].'</label> |
||
426 | </td><td> |
||
427 | <div class="div_radio"> |
||
428 | <input type="text" size="10" id="personal_saltkey_cookie_duration" name="personal_saltkey_cookie_duration" value="', isset($SETTINGS['personal_saltkey_cookie_duration']) ? $SETTINGS['personal_saltkey_cookie_duration'] : '31', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
429 | </div> |
||
430 | </td></tr>'; |
||
431 | |||
432 | // Personal SALTKEY level |
||
433 | echo ' |
||
434 | <tr><td> |
||
435 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
436 | <label>'.$LANG['personal_saltkey_security_level'].'</label> |
||
437 | </td><td> |
||
438 | <div class="div_radio"> |
||
439 | <select id="personal_saltkey_security_level" name="personal_saltkey_security_level" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));">'; |
||
440 | foreach ($SETTINGS_EXT['pwComplexity'] as $complex) { |
||
441 | echo '<option value="'.$complex[0].'"', isset($SETTINGS['personal_saltkey_security_level']) && $SETTINGS['personal_saltkey_security_level'] == $complex[0] ? ' selected="selected"' : '', '>'.$complex[1].'</option>'; |
||
442 | } |
||
443 | echo ' |
||
444 | </select> |
||
445 | </div> |
||
446 | </td></tr>'; |
||
447 | |||
448 | |||
449 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
450 | // Attachments encryption strategy |
||
451 | |||
452 | echo ' |
||
453 | <tr><td> |
||
454 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
455 | <label> |
||
456 | '.$LANG['settings_attachments_encryption'].' |
||
457 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_attachments_encryption_tip']), ENT_QUOTES).'"></i> </span> |
||
458 | </label> |
||
459 | </td><td> |
||
460 | <div class="toggle toggle-modern" id="enable_attachment_encryption" data-toggle-on="', isset($SETTINGS['enable_attachment_encryption']) && $SETTINGS['enable_attachment_encryption'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="enable_attachment_encryption_input" name="enable_attachment_encryption_input" value="', isset($SETTINGS['enable_attachment_encryption']) && $SETTINGS['enable_attachment_encryption'] == 1 ? '1' : '0', '" /> |
||
461 | </td></tr>'; |
||
462 | |||
463 | // Attachments image display secure_display_image |
||
464 | |||
465 | echo ' |
||
466 | <tr><td> |
||
467 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
468 | <label> |
||
469 | '.$LANG['settings_secure_display_image'].' |
||
470 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_secure_display_image_tip']), ENT_QUOTES).'"></i> </span> |
||
471 | </label> |
||
472 | </td><td> |
||
473 | <div class="toggle toggle-modern" id="secure_display_image" data-toggle-on="', isset($SETTINGS['secure_display_image']) && $SETTINGS['secure_display_image'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="secure_display_image_input" name="secure_display_image_input" value="', isset($SETTINGS['secure_display_image']) && $SETTINGS['secure_display_image'] == 1 ? '1' : '0', '" /> |
||
474 | </td></tr>'; |
||
475 | |||
476 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
477 | // Enable KB |
||
478 | echo ' |
||
479 | <tr><td> |
||
480 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
481 | <label> |
||
482 | '.$LANG['settings_kb'].' |
||
483 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_kb_tip']), ENT_QUOTES).'"></i></span> |
||
484 | </label> |
||
485 | </td><td> |
||
486 | <div class="toggle toggle-modern" id="enable_kb" data-toggle-on="', isset($SETTINGS['enable_kb']) && $SETTINGS['enable_kb'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="enable_kb_input" name="enable_kb_input" value="', isset($SETTINGS['enable_kb']) && $SETTINGS['enable_kb'] == 1 ? '1' : '0', '" /> |
||
487 | </td></tr>'; |
||
488 | |||
489 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
490 | // Enable SUGGESTION |
||
491 | echo ' |
||
492 | <tr><td> |
||
493 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
494 | <label> |
||
495 | '.$LANG['settings_suggestion'].' |
||
496 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_suggestion_tip']), ENT_QUOTES).'"></i></span> |
||
497 | </label> |
||
498 | </td><td> |
||
499 | <div class="toggle toggle-modern" id="enable_suggestion" data-toggle-on="', isset($SETTINGS['enable_suggestion']) && $SETTINGS['enable_suggestion'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="enable_suggestion_input" name="enable_suggestion_input" value="', isset($SETTINGS['enable_suggestion']) && $SETTINGS['enable_suggestion'] == 1 ? '1' : '0', '" /> |
||
500 | </td></tr>'; |
||
501 | |||
502 | // Enable GET TP Information |
||
503 | echo ' |
||
504 | <tr><td> |
||
505 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
506 | <label> |
||
507 | '.$LANG['settings_get_tp_info'].' |
||
508 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_get_tp_info_tip']), ENT_QUOTES).'"></i></span> |
||
509 | </label> |
||
510 | </td><td> |
||
511 | <div class="toggle toggle-modern" id="get_tp_info" data-toggle-on="', isset($SETTINGS['get_tp_info']) && $SETTINGS['get_tp_info'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="get_tp_info_input" name="get_tp_info_input" value="', isset($SETTINGS['get_tp_info']) && $SETTINGS['get_tp_info'] == 1 ? '1' : '0', '" /> |
||
512 | </td></tr>'; |
||
513 | |||
514 | echo ' |
||
515 | <tr><td colspan="3"><hr /></td></tr> |
||
516 | </table> |
||
517 | </div>'; |
||
518 | // -------------------------------------------------------------------------------- |
||
519 | // -------------------------------------------------------------------------------- |
||
520 | // TAB Né2 |
||
521 | echo ' |
||
522 | <div id="tabs-2">'; |
||
523 | // Rebuild Config file |
||
524 | echo ' |
||
525 | <div style="margin-bottom:3px"> |
||
526 | <span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_start_tip']), ENT_QUOTES).'" onclick="LaunchAdminActions(\'admin_action_rebuild_config_file\')" style="cursor:pointer;"> |
||
527 | <i class="fa fa-square fa-stack-2x"></i> |
||
528 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
529 | </span> |
||
530 | <label>'.$LANG['rebuild_config_file'].'</label> |
||
531 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['rebuild_config_file_tip']), ENT_QUOTES).'"></i></span> |
||
532 | <span id="result_admin_rebuild_config_file" style="margin-left:10px;display:none;"></span> |
||
533 | </div>'; |
||
534 | // Update Personal folders for users |
||
535 | echo ' |
||
536 | <div style="margin-bottom:3px"> |
||
537 | <span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_start_tip']), ENT_QUOTES).'" onclick="LaunchAdminActions(\'admin_action_check_pf\')" style="cursor:pointer;"> |
||
538 | <i class="fa fa-square fa-stack-2x"></i> |
||
539 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
540 | </span> |
||
541 | <label>'.$LANG['admin_action_check_pf'].'</label> |
||
542 | <span id="result_admin_action_check_pf" style="margin-left:10px;display:none;"></span> |
||
543 | </div>'; |
||
544 | // Clean DB with orphan items |
||
545 | echo ' |
||
546 | <div style="margin-bottom:3px"> |
||
547 | <span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_start_tip']), ENT_QUOTES).'" onclick="LaunchAdminActions(\'admin_action_db_clean_items\')" style="cursor:pointer;"> |
||
548 | <i class="fa fa-square fa-stack-2x"></i> |
||
549 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
550 | </span> |
||
551 | <label>'.$LANG['admin_action_db_clean_items'].'</label> |
||
552 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_clean_items_tip']), ENT_QUOTES).'"></i></span> |
||
553 | <span id="result_admin_action_db_clean_items" style="margin-left:10px;"></span> |
||
554 | </div>'; |
||
555 | // Optimize the DB |
||
556 | echo ' |
||
557 | <div style="margin-bottom:3px"> |
||
558 | <span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_start_tip']), ENT_QUOTES).'" onclick="LaunchAdminActions(\'admin_action_db_optimize\')" style="cursor:pointer;"> |
||
559 | <i class="fa fa-square fa-stack-2x"></i> |
||
560 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
561 | </span> |
||
562 | <label>'.$LANG['admin_action_db_optimize'].'</label> |
||
563 | <span id="result_admin_action_db_optimize" style="margin-left:10px;"></span> |
||
564 | </div>'; |
||
565 | // Purge old files |
||
566 | echo ' |
||
567 | <div style="margin-bottom:3px"> |
||
568 | <span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_start_tip']), ENT_QUOTES).'" onclick="LaunchAdminActions(\'admin_action_purge_old_files\')" style="cursor:pointer;"> |
||
569 | <i class="fa fa-square fa-stack-2x"></i> |
||
570 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
571 | </span> |
||
572 | <label>'.$LANG['admin_action_purge_old_files'].'</label> |
||
573 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_action_purge_old_files_tip']), ENT_QUOTES).'"></i></span> |
||
574 | <span id="result_admin_action_purge_old_files" style="margin-left:10px;"></span> |
||
575 | </div>'; |
||
576 | // Reload Cache Table |
||
577 | echo ' |
||
578 | <div style="margin-bottom:3px"> |
||
579 | <span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_start_tip']), ENT_QUOTES).'" onclick="LaunchAdminActions(\'admin_action_reload_cache_table\')" style="cursor:pointer;"> |
||
580 | <i class="fa fa-square fa-stack-2x"></i> |
||
581 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
582 | </span> |
||
583 | <label>'.$LANG['admin_action_reload_cache_table'].'</label> |
||
584 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_action_reload_cache_table_tip']), ENT_QUOTES).'"></i></span> |
||
585 | <span id="result_admin_action_reload_cache_table" style="margin-left:10px;"></span> |
||
586 | </div>'; |
||
587 | // Change main SALT key |
||
588 | echo ' |
||
589 | <div style="margin-bottom:3px"> |
||
590 | <span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_start_tip']), ENT_QUOTES).'" onclick="confirmChangingSk()" style="cursor:pointer;"> |
||
591 | <i class="fa fa-square fa-stack-2x"></i> |
||
592 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
593 | </span> |
||
594 | <label>'.$LANG['admin_action_change_salt_key'].'</label> |
||
595 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_action_change_salt_key_tip']), ENT_QUOTES).'"></i></span> |
||
596 | <br/> |
||
597 | <div id="changeMainSaltKey_message" class="ui-widget-content ui-state-focus ui-corner-all" style="padding:10px; display:none; margin-left:30px; text-align:center;"></div> |
||
598 | </span> |
||
599 | <input type="hidden" id="changeMainSaltKey_itemsCount" /> |
||
600 | </div>'; |
||
601 | |||
602 | // Encrypt / decrypt attachments |
||
603 | echo ' |
||
604 | <div style="margin-bottom:3px"> |
||
605 | <span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_start_tip']), ENT_QUOTES).'" onclick="startFileEncDecyption()" style="cursor:pointer;"> |
||
606 | <i class="fa fa-square fa-stack-2x"></i> |
||
607 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
608 | </span> |
||
609 | '.$LANG['admin_action_attachments_cryption'].' |
||
610 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_action_attachments_cryption_tip']), ENT_QUOTES).'"></i></span> |
||
611 | <br/> |
||
612 | <div id="admin_action_attachments_cryption_selection" class="ui-widget-content ui-state-focus ui-corner-all" style="padding:10px; display:none; margin-left:30px; text-align:center;"> |
||
613 | '.$LANG['what_action_to_perform'].': |
||
614 | <span class="div_radio" style=""> |
||
615 | <input type="radio" id="attachments_cryption_radio1" name="attachments_cryption" value="encrypt" /><label for="attachments_cryption_radio1">'.$LANG['encrypt'].'</label> |
||
616 | <input type="radio" id="attachments_cryption_radio2" name="attachments_cryption" value="decrypt" /><label for="attachments_cryption_radio2">'.$LANG['decrypt'].'</label> |
||
617 | </span> |
||
618 | <a href="#" onclick="LaunchAdminActions(\'admin_action_attachments_cryption\')">'.addslashes($LANG['admin_action_db_backup_start_tip']).'</a> |
||
619 | <div id="result_admin_action_attachments_cryption" class="" style="padding:10px; display:none; margin-left:30px; text-align:center;"></div> |
||
620 | </div> |
||
621 | </div>'; |
||
622 | |||
623 | echo ' |
||
624 | </div>'; |
||
625 | // -------------------------------------------------------------------------------- |
||
626 | // -------------------------------------------------------------------------------- |
||
627 | // TAB N°3 |
||
628 | echo ' |
||
629 | <div id="tabs-3"> |
||
630 | <table width="100%">'; |
||
631 | // After how long, edition is considered as failed or finished |
||
632 | echo ' |
||
633 | <tr><td> |
||
634 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
635 | <label>'.$LANG['settings_delay_for_item_edition']. |
||
636 | '<span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_delay_for_item_edition_tip']), ENT_QUOTES).'"></i></span> |
||
637 | </label> |
||
638 | </td><td> |
||
639 | <input type="text" size="5" id="delay_item_edition" name="delay_item_edition" value="', isset($SETTINGS['delay_item_edition']) ? $SETTINGS['delay_item_edition'] : '0', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
640 | </td></tr>'; |
||
641 | // OTV - otv_is_enabled |
||
642 | echo ' |
||
643 | <tr><td> |
||
644 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
645 | <label>'.$LANG['otv_is_enabled'].'</label> |
||
646 | </td><td> |
||
647 | <div class="toggle toggle-modern" id="otv_is_enabled" data-toggle-on="', isset($SETTINGS['otv_is_enabled']) && $SETTINGS['otv_is_enabled'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="otv_is_enabled_input" name="otv_is_enabled_input" value="', isset($SETTINGS['otv_is_enabled']) && $SETTINGS['otv_is_enabled'] == 1 ? '1' : '0', '" /> |
||
648 | </td></tr>'; |
||
649 | // Expired time for OTV - otv_expiration_period |
||
650 | echo ' |
||
651 | <tr><td> |
||
652 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
653 | <label>'.$LANG['settings_otv_expiration_period'].'</label> |
||
654 | </td><td> |
||
655 | <input type="text" size="5" id="otv_expiration_period" name="otv_expiration_period" value="', isset($SETTINGS['otv_expiration_period']) ? $SETTINGS['otv_expiration_period'] : '7', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
656 | </td></tr>'; |
||
657 | |||
658 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
659 | // Managers can edit & delete items they are allowed to see |
||
660 | echo ' |
||
661 | <tr><td> |
||
662 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
663 | <label>'.$LANG['settings_manager_edit'].'</label> |
||
664 | </td><td> |
||
665 | <div class="toggle toggle-modern" id="manager_edit" data-toggle-on="', isset($SETTINGS['manager_edit']) && $SETTINGS['manager_edit'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="manager_edit_input" name="manager_edit_input" value="', isset($SETTINGS['manager_edit']) && $SETTINGS['manager_edit'] == 1 ? '1' : '0', '" /> |
||
666 | </td></tr>'; |
||
667 | |||
668 | // Managers can move items they are allowed to see |
||
669 | echo ' |
||
670 | <tr><td> |
||
671 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
672 | <label>'.$LANG['settings_manager_move_item'].'</label> |
||
673 | </td><td> |
||
674 | <div class="toggle toggle-modern" id="manager_move_item" data-toggle-on="', isset($SETTINGS['manager_move_item']) && $SETTINGS['manager_move_item'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="manager_move_item_input" name="manager_move_item_input" value="', isset($SETTINGS['manager_move_item']) && $SETTINGS['manager_move_item'] == 1 ? '1' : '0', '" /> |
||
675 | </td></tr>'; |
||
676 | |||
677 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
678 | // max items |
||
679 | echo ' |
||
680 | <tr><td> |
||
681 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
682 | <label for="max_last_items">'.$LANG['max_last_items'].'</label> |
||
683 | </td><td> |
||
684 | <input type="text" size="4" id="max_last_items" name="max_last_items" value="', isset($SETTINGS['max_latest_items']) ? $SETTINGS['max_latest_items'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
685 | </td></tr>'; |
||
686 | |||
687 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
688 | // Duplicate folder |
||
689 | echo ' |
||
690 | <tr><td> |
||
691 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
692 | <label>'.$LANG['duplicate_folder'].'</label> |
||
693 | </td><td> |
||
694 | <div class="toggle toggle-modern" id="duplicate_folder" data-toggle-on="', isset($SETTINGS['duplicate_folder']) && $SETTINGS['duplicate_folder'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="duplicate_folder_input" name="duplicate_folder_input" value="', isset($SETTINGS['duplicate_folder']) && $SETTINGS['duplicate_folder'] == 1 ? '1' : '0', '" /> |
||
695 | </td></tr>'; |
||
696 | // Duplicate item name |
||
697 | echo ' |
||
698 | <tr><td> |
||
699 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
700 | <label>'.$LANG['duplicate_item'].'</label> |
||
701 | </td><td> |
||
702 | <div class="toggle toggle-modern" id="duplicate_item" data-toggle-on="', isset($SETTINGS['duplicate_item']) && $SETTINGS['duplicate_item'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="duplicate_item_input" name="duplicate_item_input" value="', isset($SETTINGS['duplicate_item']) && $SETTINGS['duplicate_item'] == 1 ? '1' : '0', '" /> |
||
703 | </td></tr>'; |
||
704 | // Duplicate item name in same folder - item_duplicate_in_same_folder |
||
705 | echo ' |
||
706 | <tr><td> |
||
707 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
708 | <label>'.$LANG['duplicate_item_in_folder'].'</label> |
||
709 | </td><td> |
||
710 | <div class="toggle toggle-modern" id="item_duplicate_in_same_folder" data-toggle-on="', isset($SETTINGS['item_duplicate_in_same_folder']) && $SETTINGS['item_duplicate_in_same_folder'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="item_duplicate_in_same_folder_input" name="item_duplicate_in_same_folder_input" value="', isset($SETTINGS['item_duplicate_in_same_folder']) && $SETTINGS['item_duplicate_in_same_folder'] == 1 ? '1' : '0', '" /> |
||
711 | </td></tr>'; |
||
712 | // Enable show_only_accessible_folders |
||
713 | echo ' |
||
714 | <tr><td> |
||
715 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
716 | <label> |
||
717 | '.$LANG['show_only_accessible_folders'].' |
||
718 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['show_only_accessible_folders_tip']), ENT_QUOTES).'"></i></span> |
||
719 | </label> |
||
720 | </td><td> |
||
721 | <div class="toggle toggle-modern" id="show_only_accessible_folders" data-toggle-on="', isset($SETTINGS['show_only_accessible_folders']) && $SETTINGS['show_only_accessible_folders'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="show_only_accessible_folders_input" name="show_only_accessible_folders_input" value="', isset($SETTINGS['show_only_accessible_folders']) && $SETTINGS['show_only_accessible_folders'] == 1 ? '1' : '0', '" /> |
||
722 | </td></tr>'; |
||
723 | // Enable subfolder_rights_as_parent |
||
724 | echo ' |
||
725 | <tr><td> |
||
726 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
727 | <label> |
||
728 | '.$LANG['subfolder_rights_as_parent'].' |
||
729 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['subfolder_rights_as_parent_tip']), ENT_QUOTES).'"></i></span> |
||
730 | </label> |
||
731 | </td><td> |
||
732 | <div class="toggle toggle-modern" id="subfolder_rights_as_parent" data-toggle-on="', isset($SETTINGS['subfolder_rights_as_parent']) && $SETTINGS['subfolder_rights_as_parent'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="subfolder_rights_as_parent_input" name="subfolder_rights_as_parent_input" value="', isset($SETTINGS['subfolder_rights_as_parent']) && $SETTINGS['subfolder_rights_as_parent'] == 1 ? '1' : '0', '" /> |
||
733 | </td></tr>'; |
||
734 | // Enable create_item_without_password |
||
735 | echo ' |
||
736 | <tr><td> |
||
737 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
738 | <label> |
||
739 | '.$LANG['create_item_without_password'].' |
||
740 | </label> |
||
741 | </td><td> |
||
742 | <div class="toggle toggle-modern" id="create_item_without_password" data-toggle-on="', isset($SETTINGS['create_item_without_password']) && $SETTINGS['create_item_without_password'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="create_item_without_password_input" name="create_item_without_password_input" value="', isset($SETTINGS['create_item_without_password']) && $SETTINGS['create_item_without_password'] == 1 ? '1' : '0', '" /> |
||
743 | </td></tr>'; |
||
744 | |||
745 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
746 | // enable FAVOURITES |
||
747 | echo ' |
||
748 | <tr><td> |
||
749 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
750 | <label>'.$LANG['enable_favourites'].'</label> |
||
751 | </td><td> |
||
752 | <div class="toggle toggle-modern" id="enable_favourites" data-toggle-on="', isset($SETTINGS['enable_favourites']) && $SETTINGS['enable_favourites'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="enable_favourites_input" name="enable_favourites_input" value="', isset($SETTINGS['enable_favourites']) && $SETTINGS['enable_favourites'] == 1 ? '1' : '0', '" /> |
||
753 | </td></tr>'; |
||
754 | // enable USER can create folders |
||
755 | echo ' |
||
756 | <tr><td> |
||
757 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
758 | <label>'.$LANG['enable_user_can_create_folders'].'</label> |
||
759 | </td><td> |
||
760 | <div class="toggle toggle-modern" id="enable_user_can_create_folders" data-toggle-on="', isset($SETTINGS['enable_user_can_create_folders']) && $SETTINGS['enable_user_can_create_folders'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="enable_user_can_create_folders_input" name="enable_user_can_create_folders_input" value="', isset($SETTINGS['enable_user_can_create_folders']) && $SETTINGS['enable_user_can_create_folders'] == 1 ? '1' : '0', '" /> |
||
761 | </td></tr>'; |
||
762 | // enable can_create_root_folder |
||
763 | echo ' |
||
764 | <tr><td> |
||
765 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
766 | <label>'.$LANG['setting_can_create_root_folder'].'</label> |
||
767 | </td><td> |
||
768 | <div class="toggle toggle-modern" id="can_create_root_folder" data-toggle-on="', isset($SETTINGS['can_create_root_folder']) && $SETTINGS['can_create_root_folder'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="can_create_root_folder_input" name="can_create_root_folder_input" value="', isset($SETTINGS['can_create_root_folder']) && $SETTINGS['can_create_root_folder'] == 1 ? '1' : '0', '" /> |
||
769 | </td></tr>'; |
||
770 | // enable enable_massive_move_delete |
||
771 | echo ' |
||
772 | <tr><td> |
||
773 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
774 | <label>'.$LANG['enable_massive_move_delete'].' |
||
775 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['enable_massive_move_delete_tip']), ENT_QUOTES).'"></i></span> |
||
776 | </label> |
||
777 | </td><td> |
||
778 | <div class="toggle toggle-modern" id="enable_massive_move_delete" data-toggle-on="', isset($SETTINGS['enable_massive_move_delete']) && $SETTINGS['enable_massive_move_delete'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="enable_massive_move_delete_input" name="enable_massive_move_delete_input" value="', isset($SETTINGS['enable_massive_move_delete']) && $SETTINGS['enable_massive_move_delete'] == 1 ? '1' : '0', '" /> |
||
779 | </td></tr>'; |
||
780 | |||
781 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
782 | // Enable activate_expiration |
||
783 | echo ' |
||
784 | <tr><td> |
||
785 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
786 | <label> |
||
787 | '.$LANG['admin_setting_activate_expiration'].' |
||
788 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_setting_activate_expiration_tip']), ENT_QUOTES).'"></i></span> |
||
789 | </label> |
||
790 | </td><td> |
||
791 | <div class="toggle toggle-modern" id="activate_expiration" data-toggle-on="', isset($SETTINGS['activate_expiration']) && $SETTINGS['activate_expiration'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="activate_expiration_input" name="activate_expiration_input" value="', isset($SETTINGS['activate_expiration']) && $SETTINGS['activate_expiration'] == 1 ? '1' : '0', '" /> |
||
792 | </td></tr>'; |
||
793 | // Enable enable_delete_after_consultation |
||
794 | echo ' |
||
795 | <tr><td> |
||
796 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
797 | <label> |
||
798 | '.$LANG['admin_setting_enable_delete_after_consultation'].' |
||
799 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_setting_enable_delete_after_consultation_tip']), ENT_QUOTES).'"></i></span> |
||
800 | </label> |
||
801 | </td><td> |
||
802 | <div class="toggle toggle-modern" id="enable_delete_after_consultation" data-toggle-on="', isset($SETTINGS['enable_delete_after_consultation']) && $SETTINGS['enable_delete_after_consultation'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="enable_delete_after_consultation_input" name="enable_delete_after_consultation_input" value="', isset($SETTINGS['enable_delete_after_consultation']) && $SETTINGS['enable_delete_after_consultation'] == 1 ? '1' : '0', '" /> |
||
803 | </td></tr>'; |
||
804 | |||
805 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
806 | // Enable Printing |
||
807 | echo ' |
||
808 | <tr><td> |
||
809 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
810 | <label> |
||
811 | '.$LANG['settings_printing'].' |
||
812 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_printing_tip']), ENT_QUOTES).'"></i></span> |
||
813 | </label> |
||
814 | </td><td> |
||
815 | <div class="toggle toggle-modern" id="allow_print" data-toggle-on="', isset($SETTINGS['allow_print']) && $SETTINGS['allow_print'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="allow_print_input" name="allow_print_input" value="', isset($SETTINGS['allow_print']) && $SETTINGS['allow_print'] == 1 ? '1' : '0', '" /> |
||
816 | </td></tr>'; |
||
817 | |||
818 | // Enable Printing Groups - roles_allowed_to_print |
||
819 | echo ' |
||
820 | <tr><td> |
||
821 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
822 | <label> |
||
823 | '.$LANG['settings_roles_allowed_to_print'].' |
||
824 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_roles_allowed_to_print_tip']), ENT_QUOTES).'"></i></span> |
||
825 | </label> |
||
826 | </td><td> |
||
827 | <input type="hidden" id="roles_allowed_to_print" name="roles_allowed_to_print" value="', isset($SETTINGS['roles_allowed_to_print']) ? $SETTINGS['roles_allowed_to_print'] : '', '" /> |
||
828 | <select id="roles_allowed_to_print_select" name="roles_allowed_to_print_select" class="text ui-widget-content" multiple="multiple" onchange="refreshInput()">'; |
||
829 | if (!isset($SETTINGS['roles_allowed_to_print']) || empty($SETTINGS['roles_allowed_to_print'])) { |
||
830 | $arrRolesToPrint = array(); |
||
831 | } else { |
||
832 | $arrRolesToPrint = explode(";", $SETTINGS['roles_allowed_to_print']); |
||
833 | } |
||
834 | $roles = DB::query("SELECT id, title FROM ".prefix_table("roles_title")); |
||
835 | foreach ($roles as $role) { |
||
836 | echo '<option value="'.$role['id'].'"', in_array($role['id'], $arrRolesToPrint) ? ' selected="selected"' : '', '>'.addslashes($role['title']).'</option>'; |
||
837 | } |
||
838 | echo ' |
||
839 | </select> |
||
840 | </td></tr>'; |
||
841 | // Enable IMPORT |
||
842 | echo ' |
||
843 | <tr><td> |
||
844 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
845 | <label> |
||
846 | '.$LANG['settings_importing'].' |
||
847 | </label> |
||
848 | </td><td> |
||
849 | <div class="toggle toggle-modern" id="allow_import" data-toggle-on="', isset($SETTINGS['allow_import']) && $SETTINGS['allow_import'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="allow_import_input" name="allow_import_input" value="', isset($SETTINGS['allow_import']) && $SETTINGS['allow_import'] == 1 ? '1' : '0', '" /> |
||
850 | </td></tr>'; |
||
851 | |||
852 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
853 | // Enable Item modification by anyone |
||
854 | echo ' |
||
855 | <tr><td> |
||
856 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
857 | <label> |
||
858 | '.$LANG['settings_anyone_can_modify'].' |
||
859 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_anyone_can_modify_tip']), ENT_QUOTES).'"></i></span> |
||
860 | </label> |
||
861 | </td><td> |
||
862 | <div class="toggle toggle-modern" id="anyone_can_modify" data-toggle-on="', isset($SETTINGS['anyone_can_modify']) && $SETTINGS['anyone_can_modify'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="anyone_can_modify_input" name="anyone_can_modify_input" value="', isset($SETTINGS['anyone_can_modify']) && $SETTINGS['anyone_can_modify'] == 1 ? '1' : '0', '" /> |
||
863 | </td></tr>'; |
||
864 | // Enable Item modification by anyone by default |
||
865 | echo ' |
||
866 | <tr id="tr_option_anyone_can_modify_bydefault"', isset($SETTINGS['anyone_can_modify']) && $SETTINGS['anyone_can_modify'] == 1 ? '' : ' style="display:none;"', '><td> |
||
867 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
868 | <label>'.htmlentities(strip_tags($LANG['settings_anyone_can_modify_bydefault'])).'</label> |
||
869 | </td><td> |
||
870 | <div class="toggle toggle-modern" id="anyone_can_modify_bydefault" data-toggle-on="', isset($SETTINGS['anyone_can_modify_bydefault']) && $SETTINGS['anyone_can_modify_bydefault'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="anyone_can_modify_bydefault_input" name="anyone_can_modify_bydefault_input" value="', isset($SETTINGS['anyone_can_modify_bydefault']) && $SETTINGS['anyone_can_modify_bydefault'] == 1 ? '1' : '0', '" /> |
||
871 | </td></tr>'; |
||
872 | // enable restricted_to option |
||
873 | echo ' |
||
874 | <tr><td> |
||
875 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
876 | <label>'.$LANG['settings_restricted_to'].'</label> |
||
877 | </td><td> |
||
878 | <div class="toggle toggle-modern" id="restricted_to" data-toggle-on="', isset($SETTINGS['restricted_to']) && $SETTINGS['restricted_to'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="restricted_to_input" name="restricted_to_input" value="', isset($SETTINGS['restricted_to']) && $SETTINGS['restricted_to'] == 1 ? '1' : '0', '" /> |
||
879 | </td></tr>'; |
||
880 | // enable restricted_to_roles |
||
881 | echo ' |
||
882 | <tr id="tr_option_restricted_to_roles" style="display:', isset($SETTINGS['restricted_to']) && $SETTINGS['restricted_to'] == 1 ? 'inline' : 'none', ';"><td> |
||
883 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
884 | <label>'.$LANG['restricted_to_roles'].'</label> |
||
885 | </td><td> |
||
886 | <div class="toggle toggle-modern" id="restricted_to_roles" data-toggle-on="', isset($SETTINGS['restricted_to_roles']) && $SETTINGS['restricted_to_roles'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="restricted_to_roles_input" name="restricted_to_roles_input" value="', isset($SETTINGS['restricted_to_roles']) && $SETTINGS['restricted_to_roles'] == 1 ? '1' : '0', '" /> |
||
887 | </td></tr>'; |
||
888 | |||
889 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
890 | // enable show copy to clipboard small icons |
||
891 | echo ' |
||
892 | <tr><td> |
||
893 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
894 | <label> |
||
895 | '.$LANG['copy_to_clipboard_small_icons'].' |
||
896 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['copy_to_clipboard_small_icons_tip']), ENT_QUOTES).'"></i></span> |
||
897 | </label> |
||
898 | </td><td> |
||
899 | <div class="toggle toggle-modern" id="copy_to_clipboard_small_icons" data-toggle-on="', isset($SETTINGS['copy_to_clipboard_small_icons']) && $SETTINGS['copy_to_clipboard_small_icons'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="copy_to_clipboard_small_icons_input" name="copy_to_clipboard_small_icons_input" value="', isset($SETTINGS['copy_to_clipboard_small_icons']) && $SETTINGS['copy_to_clipboard_small_icons'] == 1 ? '1' : '0', '" /> |
||
900 | </td></tr>'; |
||
901 | // Enable Show description in items list |
||
902 | echo ' |
||
903 | <tr><td> |
||
904 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
905 | <label> |
||
906 | '.$LANG['settings_show_description'].' |
||
907 | </label> |
||
908 | </td><td> |
||
909 | <div class="toggle toggle-modern" id="show_description" data-toggle-on="', isset($SETTINGS['show_description']) && $SETTINGS['show_description'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="show_description_input" name="show_description_input" value="', isset($SETTINGS['show_description']) && $SETTINGS['show_description'] == 1 ? '1' : '0', '" /> |
||
910 | </td></tr>'; |
||
911 | // In Tree, display number of Items in subfolders and number of subfolders - tree_counters |
||
912 | echo ' |
||
913 | <tr><td> |
||
914 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
915 | <label> |
||
916 | '.$LANG['settings_tree_counters'].' |
||
917 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_tree_counters_tip']), ENT_QUOTES).'"></i></span> |
||
918 | </label> |
||
919 | </td><td> |
||
920 | <div class="toggle toggle-modern" id="tree_counters" data-toggle-on="', isset($SETTINGS['tree_counters']) && $SETTINGS['tree_counters'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="tree_counters_input" name="tree_counters_input" value="', isset($SETTINGS['tree_counters']) && $SETTINGS['tree_counters'] == 1 ? '1' : '0', '" /> |
||
921 | </td></tr>'; |
||
922 | // nb of items to display by ajax query |
||
923 | echo ' |
||
924 | <tr><td> |
||
925 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
926 | <label>'.$LANG['nb_items_by_query'].'</label> |
||
927 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['nb_items_by_query_tip']), ENT_QUOTES).'"></i></span> |
||
928 | </td><td> |
||
929 | <input type="text" size="4" id="nb_items_by_query" name="nb_items_by_query" value="', isset($SETTINGS['nb_items_by_query']) ? $SETTINGS['nb_items_by_query'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
930 | </td></tr>'; |
||
931 | |||
932 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
933 | // enable sending email on USER login |
||
934 | echo ' |
||
935 | <tr><td> |
||
936 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
937 | <label>'.$LANG['enable_send_email_on_user_login'].'</label> |
||
938 | </td><td> |
||
939 | <div class="toggle toggle-modern" id="enable_send_email_on_user_login" data-toggle-on="', isset($SETTINGS['enable_send_email_on_user_login']) && $SETTINGS['enable_send_email_on_user_login'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="enable_send_email_on_user_login_input" name="enable_send_email_on_user_login_input" value="', isset($SETTINGS['enable_send_email_on_user_login']) && $SETTINGS['enable_send_email_on_user_login'] == 1 ? '1' : '0', '" /> |
||
940 | </td></tr>'; |
||
941 | // enable email notification on item shown |
||
942 | echo ' |
||
943 | <tr><td> |
||
944 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
945 | <label>'.$LANG['enable_email_notification_on_item_shown'].'</label> |
||
946 | </td><td> |
||
947 | <div class="toggle toggle-modern" id="enable_email_notification_on_item_shown" data-toggle-on="', isset($SETTINGS['enable_email_notification_on_item_shown']) && $SETTINGS['enable_email_notification_on_item_shown'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="enable_email_notification_on_item_shown_input" name="enable_email_notification_on_item_shown_input" value="', isset($SETTINGS['enable_email_notification_on_item_shown']) && $SETTINGS['enable_email_notification_on_item_shown'] == 1 ? '1' : '0', '" /> |
||
948 | </td></tr>'; |
||
949 | // enable email notification when user password is changed |
||
950 | echo ' |
||
951 | <tr><td> |
||
952 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
953 | <label>'.$LANG['enable_email_notification_on_user_pw_change'].'</label> |
||
954 | </td><td> |
||
955 | <div class="toggle toggle-modern" id="enable_email_notification_on_user_pw_change" data-toggle-on="', isset($SETTINGS['enable_email_notification_on_user_pw_change']) && $SETTINGS['enable_email_notification_on_user_pw_change'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="enable_email_notification_on_user_pw_change_input" name="enable_email_notification_on_user_pw_change_input" value="', isset($SETTINGS['enable_email_notification_on_user_pw_change']) && $SETTINGS['enable_email_notification_on_user_pw_change'] == 1 ? '1' : '0', '" /> |
||
956 | </td></tr>'; |
||
957 | |||
958 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
959 | // enable add manual entries in History |
||
960 | echo ' |
||
961 | <tr><td> |
||
962 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
963 | <label> |
||
964 | '.$LANG['settings_insert_manual_entry_item_history'].' |
||
965 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_insert_manual_entry_item_history_tip']), ENT_QUOTES).'"></i></span> |
||
966 | </label> |
||
967 | </td><td> |
||
968 | <div class="toggle toggle-modern" id="insert_manual_entry_item_history" data-toggle-on="', isset($SETTINGS['insert_manual_entry_item_history']) && $SETTINGS['insert_manual_entry_item_history'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="insert_manual_entry_item_history_input" name="insert_manual_entry_item_history_input" value="', isset($SETTINGS['insert_manual_entry_item_history']) && $SETTINGS['insert_manual_entry_item_history'] == 1 ? '1' : '0', '" /> |
||
969 | </td></tr>'; |
||
970 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
971 | // OffLine mode options |
||
972 | echo ' |
||
973 | <tr><td> |
||
974 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
975 | <label> |
||
976 | '.$LANG['settings_offline_mode'].' |
||
977 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_offline_mode_tip']), ENT_QUOTES).'"></i></span> |
||
978 | </label> |
||
979 | </td><td> |
||
980 | <div class="toggle toggle-modern" id="settings_offline_mode" data-toggle-on="', isset($SETTINGS['settings_offline_mode']) && $SETTINGS['settings_offline_mode'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="settings_offline_mode_input" name="settings_offline_mode_input" value="', isset($SETTINGS['settings_offline_mode']) && $SETTINGS['settings_offline_mode'] == 1 ? '1' : '0', '" /> |
||
981 | </td></tr>'; |
||
982 | // OffLne KEy Level |
||
983 | echo ' |
||
984 | <tr style="margin-bottom:3px"> |
||
985 | <td> |
||
986 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
987 | <label for="offline_key_level">'.$LANG['offline_mode_key_level'].'</label> |
||
988 | </td> |
||
989 | <td> |
||
990 | <select id="offline_key_level" name="offline_key_level" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));">'; |
||
991 | foreach ($SETTINGS_EXT['pwComplexity'] as $complex) { |
||
992 | echo '<option value="'.$complex[0].'"', isset($SETTINGS['offline_key_level']) && $SETTINGS['offline_key_level'] == $complex[0] ? ' selected="selected"' : '', '>'.$complex[1].'</option>'; |
||
993 | } |
||
994 | echo ' |
||
995 | </select> |
||
996 | </td> |
||
997 | </tr>'; |
||
998 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
999 | // SYSLOG ENABLE |
||
1000 | echo ' |
||
1001 | <tr><td> |
||
1002 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1003 | <label>'.$LANG['syslog_enable'].'</label> |
||
1004 | </td><td> |
||
1005 | <div class="toggle toggle-modern" id="syslog_enable" data-toggle-on="', isset($SETTINGS['syslog_enable']) && $SETTINGS['syslog_enable'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="syslog_enable_input" name="syslog_enable_input" value="', isset($SETTINGS['syslog_enable']) && $SETTINGS['syslog_enable'] == 1 ? '1' : '0', '" /> |
||
1006 | </td></tr>'; |
||
1007 | // SYSLOG Host |
||
1008 | echo ' |
||
1009 | <tr style="margin-bottom:3px"> |
||
1010 | <td> |
||
1011 | <i class="fa fa-long-arrow-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1012 | '.$LANG['syslog_host'].' |
||
1013 | </td> |
||
1014 | <td> |
||
1015 | <input id="syslog_host" name="syslog_host" type="text" size="40px" value="', !isset($SETTINGS['syslog_host']) ? 'localhost' : $SETTINGS['syslog_host'], '" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1016 | </td> |
||
1017 | </tr>'; |
||
1018 | // SYSLOG port |
||
1019 | echo ' |
||
1020 | <tr style="margin-bottom:3px"> |
||
1021 | <td> |
||
1022 | <i class="fa fa-long-arrow-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1023 | '.$LANG['syslog_port'].' |
||
1024 | </td> |
||
1025 | <td> |
||
1026 | <input id="syslog_port" name="syslog_port" type="text" size="40px" value="', !isset($SETTINGS['syslog_port']) ? '514' : $SETTINGS['syslog_port'], '" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1027 | </td> |
||
1028 | </tr>'; |
||
1029 | |||
1030 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
1031 | |||
1032 | // Automatic server password change |
||
1033 | echo ' |
||
1034 | <tr><td> |
||
1035 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1036 | <label>'.$LANG['server_password_change_enable'].' |
||
1037 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['server_password_change_enable_tip']), ENT_QUOTES).'"></i> </span> |
||
1038 | </label> |
||
1039 | </td><td> |
||
1040 | <div class="toggle toggle-modern" id="enable_server_password_change" data-toggle-on="', isset($SETTINGS['enable_server_password_change']) && $SETTINGS['enable_server_password_change'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="enable_server_password_change_input" name="enable_server_password_change_input" value="', isset($SETTINGS['enable_server_password_change']) && $SETTINGS['enable_server_password_change'] == 1 ? '1' : '0', '" /> |
||
1041 | </td></tr>'; |
||
1042 | |||
1043 | echo ' |
||
1044 | </table> |
||
1045 | </div>'; |
||
1046 | // -------------------------------------------------------------------------------- |
||
1047 | // -------------------------------------------------------------------------------- |
||
1048 | // TAB Né4 |
||
1049 | echo ' |
||
1050 | <div id="tabs-4">'; |
||
1051 | // Check if LDAP extension is loaded |
||
1052 | if (!extension_loaded('ldap')) { |
||
1053 | echo ' |
||
1054 | <div style="margin-bottom:3px;"> |
||
1055 | <div class="ui-widget-content ui-corner-all" style="padding:10px;"> |
||
1056 | <i class="fa fa-warning fa-2x"></i> '.$LANG['ldap_extension_not_loaded'].' |
||
1057 | </div> |
||
1058 | </div>'; |
||
1059 | } else { |
||
1060 | // Enable LDAP mode |
||
1061 | echo ' |
||
1062 | <div style="margin-bottom:3px;"> |
||
1063 | <table><tr> |
||
1064 | <td><label for="ldap_mode">'.$LANG['settings_ldap_mode'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_mode_tip']), ENT_QUOTES).'"></i></label></td> |
||
1065 | <td><div class="toggle toggle-modern" id="ldap_mode" data-toggle-on="', isset($SETTINGS['ldap_mode']) && $SETTINGS['ldap_mode'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="ldap_mode_input" name="ldap_mode_input" value="', isset($SETTINGS['ldap_mode']) && $SETTINGS['ldap_mode'] == 1 ? '1' : '0', '" /></td> |
||
1066 | </tr></table> |
||
1067 | </div>'; |
||
1068 | } |
||
1069 | // LDAP inputs |
||
1070 | echo ' |
||
1071 | <div id="div_ldap_configuration" ', (isset($SETTINGS['ldap_mode']) && $SETTINGS['ldap_mode'] == 1) ? '' : ' style="display:none;"', '> |
||
1072 | <div style="font-weight:bold;font-size:14px;margin:15px 0px 8px 0px;">'.$LANG['admin_ldap_configuration'].'</div> |
||
1073 | <table id="ldap_config_values">'; |
||
1074 | // Type |
||
1075 | $ldap_type = isset($SETTINGS['ldap_type']) ? $SETTINGS['ldap_type'] : ''; |
||
1076 | echo ' |
||
1077 | <tr> |
||
1078 | <td><label for="ldap_type">'.$LANG['settings_ldap_type'].'</label></td> |
||
1079 | <td> |
||
1080 | <select id="ldap_type" name="ldap_type" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\')); showLdapFields($(this).val());"> |
||
1081 | <option value="0">-- '.$LANG['select'].' --</option> |
||
1082 | <option value="windows"', $ldap_type === 'windows' ? ' selected="selected"' : '', '>Windows / Active Directory</option> |
||
1083 | <option value="posix"', $ldap_type === 'posix' ? ' selected="selected"' : '', '>Posix / OpenLDAP (RFC2307)</option> |
||
1084 | <option value="posix-search"', $ldap_type === 'posix-search' ? ' selected="selected"' : '', '>Posix / OpenLDAP (RFC2307) Search Based</option> |
||
1085 | </select> |
||
1086 | </td> |
||
1087 | </tr>'; |
||
1088 | // Domain |
||
1089 | echo ' |
||
1090 | <tr style="display:', (isset($ldap_type)) ? '' : 'none', '" class="tr-windows tr-ldap tr-posix tr-posix-search"> |
||
1091 | <td><label for="ldap_suffix">'.$LANG['settings_ldap_domain'].'</label></td> |
||
1092 | <td><input type="text" size="50" id="ldap_suffix" name="ldap_suffix" class="text ui-widget-content" title="dc=example,dc=com" value="', isset($SETTINGS['ldap_suffix']) ? $SETTINGS['ldap_suffix'] : '', '" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
||
1093 | </tr>'; |
||
1094 | |||
1095 | // Domain DN |
||
1096 | echo ' |
||
1097 | <tr style="display:', (isset($ldap_type) && $ldap_type != 'posix-search') ? '' : 'none', '" class="tr-windows tr-posix tr-ldap"> |
||
1098 | <td><label for="ldap_domain_dn">'.$LANG['settings_ldap_domain_dn'].'</label></td> |
||
1099 | <td><input type="text" size="50" id="ldap_domain_dn" name="ldap_domain_dn" class="text ui-widget-content" title="dc=example,dc=com" value="', isset($SETTINGS['ldap_domain_dn']) ? $SETTINGS['ldap_domain_dn'] : '', '" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
||
1100 | </tr>'; |
||
1101 | /* |
||
0 ignored issues
–
show
|
|||
1102 | // Subtree for posix / openldap |
||
1103 | echo ' |
||
1104 | <tr> |
||
1105 | <td><label for="ldap_suffix">'.$LANG['settings_ldap_domain_posix'].'</label></td> |
||
1106 | <td><input type="text" size="50" id="ldap_suffix" name="ldap_suffix" class="text ui-widget-content" title="@dc=example,dc=com" value="', isset($SETTINGS['ldap_suffix']) ? $SETTINGS['ldap_suffix'] : '', '" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
||
1107 | </tr>'; |
||
1108 | */ |
||
1109 | // LDAP username attribute |
||
1110 | // LDAP Object Class |
||
1111 | echo ' |
||
1112 | <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none', '" class="tr-posix-search tr-ldap"> |
||
1113 | <td><label for="ldap_object_class">'.$LANG['settings_ldap_object_class'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_object_class_tip']), ENT_QUOTES).'"></i></label></td> |
||
1114 | <td><input type="text" size="50" id="ldap_object_class" name="ldap_object_class" class="text ui-widget-content" title="Person" value="', |
||
1115 | isset($SETTINGS['ldap_object_class']) ? $SETTINGS['ldap_object_class'] : 'posixAccount', '" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
||
1116 | </tr>'; |
||
1117 | echo ' |
||
1118 | <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none', '" class="tr-posix-search tr-ldap"> |
||
1119 | <td><label for="ldap_user_attribute">'.$LANG['settings_ldap_user_attribute'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_user_attribute_tip']), ENT_QUOTES).'"></i></label></td> |
||
1120 | <td><input type="text" size="50" id="ldap_user_attribute" name="ldap_user_attribute" class="text ui-widget-content" title="uid" value="', |
||
1121 | isset($SETTINGS['ldap_user_attribute']) ? $SETTINGS['ldap_user_attribute'] : 'uid', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
||
1122 | </tr>'; |
||
1123 | // LDAP |
||
1124 | echo ' |
||
1125 | <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none', '" class="tr-posix-search tr-ldap"> |
||
1126 | <td><label for="ldap_usergroup">'.$LANG['settings_ldap_usergroup'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_usergroup_tip']), ENT_QUOTES).'"></i></label></td> |
||
1127 | <td><input type="text" size="50" id="ldap_usergroup" name="ldap_usergroup" class="text ui-widget-content" title="usergroupname" value="', |
||
1128 | isset($SETTINGS['ldap_usergroup']) ? $SETTINGS['ldap_usergroup'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
||
1129 | </tr>'; |
||
1130 | // LDAP BIND DN for search |
||
1131 | echo ' |
||
1132 | <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none', '" class="tr-posix-search tr-ldap"> |
||
1133 | <td><label for="ldap_bind_dn">'.$LANG['settings_ldap_bind_dn'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_bind_dn_tip']), ENT_QUOTES).'"></i></label></td> |
||
1134 | <td><input type="text" size="50" id="ldap_bind_dn" name="ldap_bind_dn" class="text ui-widget-content" title="uid=teampass,ou=people,dc=mydomain,dc=local" value="', isset($SETTINGS['ldap_bind_dn']) ? $SETTINGS['ldap_bind_dn'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
||
1135 | </tr>'; |
||
1136 | // LDAP BIND PASSWD for search |
||
1137 | echo ' |
||
1138 | <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none', '" class="tr-posix-search tr-ldap"> |
||
1139 | <td><label for="ldap_bind_passwd">'.$LANG['settings_ldap_bind_passwd'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_bind_passwd_tip']), ENT_QUOTES).'"></i></label></td> |
||
1140 | <td><input type="text" size="50" id="ldap_bind_passwd" name="ldap_bind_passwd" class="text ui-widget-content" title="123password456" value="', isset($SETTINGS['ldap_bind_passwd']) ? $SETTINGS['ldap_bind_passwd'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
||
1141 | </tr>'; |
||
1142 | // LDAP BASE for search |
||
1143 | echo ' |
||
1144 | <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none', '" class="tr-posix-search tr-ldap"> |
||
1145 | <td><label for="ldap_search_base">'.$LANG['settings_ldap_search_base'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_search_base_tip']), ENT_QUOTES).'"></i></label></td> |
||
1146 | <td><input type="text" size="50" id="ldap_search_base" name="ldap_search_base" class="text ui-widget-content" title="ou=people,dc=octopoos,dc=local" value="', isset($SETTINGS['ldap_search_base']) ? $SETTINGS['ldap_search_base'] : '', '" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
||
1147 | </tr>'; |
||
1148 | |||
1149 | // AD allowed UserGroup |
||
1150 | echo ' |
||
1151 | <tr style="display:', (isset($ldap_type) && $ldap_type === 'windows') ? '' : 'none', '" class="tr-windows tr-ldap"> |
||
1152 | <td><label for="ldap_allowed_usergroup">'.$LANG['settings_ldap_allowed_usergroup'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_allowed_usergroup_tip']), ENT_QUOTES).'"></i></label></td> |
||
1153 | <td><input type="text" size="50" id="ldap_allowed_usergroup" name="ldap_allowed_usergroup" class="text ui-widget-content" value="', isset($SETTINGS['ldap_allowed_usergroup']) ? $SETTINGS['ldap_allowed_usergroup'] : '', '" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
||
1154 | </tr>'; |
||
1155 | |||
1156 | // Domain controler |
||
1157 | echo ' |
||
1158 | <tr> |
||
1159 | <td><label for="ldap_domain_controler">'.$LANG['settings_ldap_domain_controler'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_domain_controler_tip']), ENT_QUOTES).'"></i></label></td> |
||
1160 | <td><input type="text" size="50" id="ldap_domain_controler" name="ldap_domain_controler" class="text ui-widget-content" title="dc01.mydomain.local,dc02.mydomain.local" value="', isset($SETTINGS['ldap_domain_controler']) ? $SETTINGS['ldap_domain_controler'] : '', '" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
||
1161 | </tr>'; |
||
1162 | |||
1163 | // AD Port |
||
1164 | echo ' |
||
1165 | <tr> |
||
1166 | <td><label for="ldap_port">'.$LANG['settings_ldap_port'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_port_tip']), ENT_QUOTES).'"></i></label></td> |
||
1167 | <td><input type="text" size="50" id="ldap_port" name="ldap_port" class="text ui-widget-content" title="389" value="', isset($SETTINGS['ldap_port']) ? $SETTINGS['ldap_port'] : '389', '" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
||
1168 | </tr>'; |
||
1169 | |||
1170 | // AD SSL |
||
1171 | echo ' |
||
1172 | <tr> |
||
1173 | <td><label>'.$LANG['settings_ldap_ssl'].'</label></td> |
||
1174 | <td> |
||
1175 | <div class="toggle toggle-modern" id="ldap_ssl" data-toggle-on="', isset($SETTINGS['ldap_ssl']) && $SETTINGS['ldap_ssl'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="ldap_ssl_input" name="ldap_ssl_input" value="', isset($SETTINGS['ldap_ssl']) && $SETTINGS['ldap_ssl'] == 1 ? '1' : '0', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1176 | </td> |
||
1177 | </tr>'; |
||
1178 | |||
1179 | // AD TLS |
||
1180 | echo ' |
||
1181 | <tr> |
||
1182 | <td><label>'.$LANG['settings_ldap_tls'].'</label></td> |
||
1183 | <td> |
||
1184 | <div class="toggle toggle-modern" id="ldap_tls" data-toggle-on="', isset($SETTINGS['ldap_tls']) && $SETTINGS['ldap_tls'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="ldap_tls_input" name="ldap_tls_input" value="', isset($SETTINGS['ldap_tls']) && $SETTINGS['ldap_tls'] == 1 ? '1' : '0', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1185 | </td> |
||
1186 | </tr>'; |
||
1187 | |||
1188 | // Enable only localy declared users with tips help |
||
1189 | echo ' |
||
1190 | <tr> |
||
1191 | <td><label>'.$LANG['settings_ldap_elusers'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_elusers_tip']), ENT_QUOTES).'"></i></label></td> |
||
1192 | <td> |
||
1193 | <div class="toggle toggle-modern" id="ldap_elusers" data-toggle-on="', isset($SETTINGS['ldap_elusers']) && $SETTINGS['ldap_elusers'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="ldap_elusers_input" name="ldap_elusers_input" value="', isset($SETTINGS['ldap_elusers']) && $SETTINGS['ldap_elusers'] == 1 ? '1' : '0', '" /> |
||
1194 | </td> |
||
1195 | </tr>'; |
||
1196 | |||
1197 | // Enable local and LDAP users |
||
1198 | echo ' |
||
1199 | <tr> |
||
1200 | <td><label>'.$LANG['settings_ldap_and_local_authentication'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_and_local_authentication_tip']), ENT_QUOTES).'"></i></label></td> |
||
1201 | <td> |
||
1202 | <div class="toggle toggle-modern" id="ldap_and_local_authentication" data-toggle-on="', isset($SETTINGS['ldap_and_local_authentication']) && $SETTINGS['ldap_and_local_authentication'] === '1' ? 'true' : 'false', '"></div><input type="hidden" id="ldap_and_local_authentication_input" name="ldap_and_local_authentication_input" value="', isset($SETTINGS['ldap_and_local_authentication']) && $SETTINGS['ldap_and_local_authentication'] === '1' ? '1' : '0', '" /> |
||
1203 | </td> |
||
1204 | </tr>'; |
||
1205 | |||
1206 | // Enable Forgot password link on login page |
||
1207 | echo ' |
||
1208 | <tr> |
||
1209 | <td><label>'.$LANG['settings_disable_forgot_password_link'].'</label></td> |
||
1210 | <td> |
||
1211 | <div class="toggle toggle-modern" id="disable_show_forgot_pwd_link" data-toggle-on="', isset($SETTINGS['disable_show_forgot_pwd_link']) && $SETTINGS['disable_show_forgot_pwd_link'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="disable_show_forgot_pwd_link_input" name="disable_show_forgot_pwd_link_input" value="', isset($SETTINGS['disable_show_forgot_pwd_link']) && $SETTINGS['disable_show_forgot_pwd_link'] == 1 ? '1' : '0', '" /> |
||
1212 | </td> |
||
1213 | </tr>'; |
||
1214 | // Enable newly_created_user_is_administrated_by |
||
1215 | echo ' |
||
1216 | <tr> |
||
1217 | <td><label for="ldap_type">'.$LANG['newly_created_user_is_administrated_by'].'</label></td> |
||
1218 | <td> |
||
1219 | <select id="ldap_new_user_is_administrated_by" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));"> |
||
1220 | </select> |
||
1221 | </td> |
||
1222 | </tr>'; |
||
1223 | // Enable newly_created_user_role |
||
1224 | echo ' |
||
1225 | <tr> |
||
1226 | <td><label for="ldap_type">'.$LANG['newly_created_user_role'].'</label></td> |
||
1227 | <td> |
||
1228 | <select id="ldap_new_user_role" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));"> |
||
1229 | </select> |
||
1230 | </td> |
||
1231 | </tr>'; |
||
1232 | echo ' |
||
1233 | </table>'; |
||
1234 | |||
1235 | // Test LDAP configuration |
||
1236 | echo ' |
||
1237 | <div style="font-weight:bold;font-size:14px;margin:15px 0px 8px 0px;"> |
||
1238 | '.$LANG['ldap_test_config'].' |
||
1239 | </div> |
||
1240 | <table> |
||
1241 | <tr> |
||
1242 | <td><label>'.htmlentities($LANG['ldap_test_username']).'</label></td> |
||
1243 | <td><input type="text" size="50" id="ldap_test_username" class="text ui-widget-content" value="" class="text ui-widget-content" /></td> |
||
1244 | </tr> |
||
1245 | <tr> |
||
1246 | <td><label>'.htmlentities($LANG['ldap_test_username_pwd']).'</label></td> |
||
1247 | <td><input type="password" size="50" id="ldap_test_pwd" class="text ui-widget-content" value="" class="text ui-widget-content" /></td> |
||
1248 | </tr> |
||
1249 | <tr> |
||
1250 | <td><label for="ldap_test_no_username">'.htmlentities($LANG['no_username_needed']).'</label></td> |
||
1251 | <td><input type="checkbox" size="50" id="ldap_test_no_username" /></td> |
||
1252 | </tr> |
||
1253 | <tr> |
||
1254 | <td colspan="2"> |
||
1255 | <div id="ldap_test_msg" class="ui-widget-content ui-state-focus ui-corner-all" style="padding:10px; display:none;"></div> |
||
1256 | </td> |
||
1257 | </tr> |
||
1258 | <tr> |
||
1259 | <td><b>'.htmlentities($LANG['admin_action_db_backup_start_tip']).'</b></td> |
||
1260 | <td><span class="fa-stack" onclick="LaunchAdminActions(\'admin_ldap_test_configuration\')" style="cursor:pointer;"> |
||
1261 | <i class="fa fa-square fa-stack-2x"></i> |
||
1262 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
1263 | </span></td> |
||
1264 | </tr> |
||
1265 | </table>'; |
||
1266 | |||
1267 | echo ' |
||
1268 | </div> |
||
1269 | </div>'; |
||
1270 | // -------------------------------------------------------------------------------- |
||
1271 | // -------------------------------------------------------------------------------- |
||
1272 | // TAB Né5 |
||
1273 | echo ' |
||
1274 | <div id="tabs-5"> |
||
1275 | <div class="" style="padding: 0 .7em;"> |
||
1276 | <i class="fa fa-chevron-circle-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1277 | <b>'.$LANG['admin_one_shot_backup'].'</b> |
||
1278 | </div> |
||
1279 | <div style="margin:0 0 5px 20px;"> |
||
1280 | <table width="100%">'; |
||
1281 | // Backup the DB |
||
1282 | echo ' |
||
1283 | <tr style="margin-bottom:3px"> |
||
1284 | <td width="35%"> |
||
1285 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1286 | '.$LANG['admin_action_db_backup'].' |
||
1287 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_tip']), ENT_QUOTES).'"></i></span> |
||
1288 | </td> |
||
1289 | <td> |
||
1290 | <span id="result_admin_action_db_backup_get_key" style="margin-left:10px; text-align:left;"> |
||
1291 | '.$LANG['encrypt_key'].'<input type="password" size="20" id="result_admin_action_db_backup_key" /> |
||
1292 | <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_key_tip']), ENT_QUOTES).'"></i> |
||
1293 | <span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_start_tip']), ENT_QUOTES).'" onclick="LaunchAdminActions(\'admin_action_db_backup\')" style="cursor:pointer;"> |
||
1294 | <i class="fa fa-square fa-stack-2x"></i> |
||
1295 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
1296 | </span> |
||
1297 | </span> |
||
1298 | <span id="result_admin_action_db_backup" style="margin-left:10px;"></span> |
||
1299 | </td> |
||
1300 | </tr>'; |
||
1301 | // Restore the DB |
||
1302 | echo ' |
||
1303 | <tr style="margin-bottom:3px"> |
||
1304 | <td> |
||
1305 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1306 | '.$LANG['admin_action_db_restore'].' |
||
1307 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_restore_tip']), ENT_QUOTES).'"></i></span> |
||
1308 | </td> |
||
1309 | <td> |
||
1310 | <span id="result_admin_action_db_restore" style="margin-left:10px;"></span> |
||
1311 | <div id="upload_container_restoreDB"> |
||
1312 | <div id="filelist_restoreDB"></div><br /> |
||
1313 | <span id="pickfiles_restoreDB" class="fa-stack tip" title="'.htmlentities($LANG['select'], ENT_QUOTES).'" style="cursor:pointer;"> |
||
1314 | <i class="fa fa-square fa-stack-2x"></i> |
||
1315 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
1316 | </span> |
||
1317 | </div> |
||
1318 | </td> |
||
1319 | </tr>'; |
||
1320 | |||
1321 | echo ' |
||
1322 | </table> |
||
1323 | </div>'; |
||
1324 | |||
1325 | echo ' |
||
1326 | <div class="" style="0padding: 0 .7em;"> |
||
1327 | <i class="fa fa-chevron-circle-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1328 | <b>'.$LANG['admin_script_backups'].'</b> |
||
1329 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_script_backups_tip']), ENT_QUOTES).'"></i></span> |
||
1330 | </div> |
||
1331 | <div style="margin:0 0 5px 20px;"> |
||
1332 | <table width="100%">'; |
||
1333 | // Backups script path |
||
1334 | echo ' |
||
1335 | <tr style="margin-bottom:3px"> |
||
1336 | <td width="35%"> |
||
1337 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1338 | '.$LANG['admin_script_backup_path'].' |
||
1339 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_script_backup_path_tip']), ENT_QUOTES).'"></i></span> |
||
1340 | </td> |
||
1341 | <td> |
||
1342 | <input id="bck_script_path" name="bck_script_path" type="text" size="60px" value="', isset($SETTINGS['bck_script_path']) ? $SETTINGS['bck_script_path'] : $SETTINGS['cpassman_dir'].'/backups', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1343 | </td> |
||
1344 | </tr>'; |
||
1345 | // Backups script name |
||
1346 | echo ' |
||
1347 | <tr style="margin-bottom:3px"> |
||
1348 | <td> |
||
1349 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1350 | '.$LANG['admin_script_backup_filename'].' |
||
1351 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_script_backup_filename_tip']), ENT_QUOTES).'"></i></span> |
||
1352 | </td> |
||
1353 | <td> |
||
1354 | <input id="bck_script_filename" name="bck_script_filename" type="text" size="50px" value="', isset($SETTINGS['bck_script_filename']) ? $SETTINGS['bck_script_filename'] : 'bck_teampass', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1355 | </td> |
||
1356 | </tr>'; |
||
1357 | // Backup key |
||
1358 | if (isset($SETTINGS['bck_script_passkey']) === true) { |
||
1359 | require_once './sources/main.functions.php'; |
||
1360 | $currentKey = cryption( |
||
1361 | $SETTINGS['bck_script_passkey'], |
||
1362 | "", |
||
1363 | "decrypt" |
||
1364 | )['string']; |
||
1365 | } else { |
||
1366 | $currentKey = ""; |
||
1367 | } |
||
1368 | echo ' |
||
1369 | <tr style="margin-bottom:3px"> |
||
1370 | <td> |
||
1371 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1372 | '.$LANG['admin_script_backup_secret'].' |
||
1373 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_script_backup_secret_tip']), ENT_QUOTES).'"></i></span> |
||
1374 | </td> |
||
1375 | <td> |
||
1376 | <input id="bck_script_passkey" name="bck_script_passkey" type="text" size="50px" value="', isset($SETTINGS['bck_script_passkey']) ? $currentKey : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1377 | |
||
1378 | <span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['pw_generate']), ENT_QUOTES).'" onclick="generateAndStoreBackupPass();" style="cursor:pointer;"> |
||
1379 | <i class="fa fa-square fa-stack-2x"></i> |
||
1380 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
1381 | </span> |
||
1382 | </td> |
||
1383 | </tr>'; |
||
1384 | // Backups script encryption |
||
1385 | echo ' |
||
1386 | <tr style="margin-bottom:3px"> |
||
1387 | <td> |
||
1388 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1389 | '.$LANG['admin_script_backup_encryption'].' |
||
1390 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_script_backup_encryption_tip']), ENT_QUOTES).'"></i></span> |
||
1391 | </td> |
||
1392 | <td> |
||
1393 | <input id="bck_script_key" name="bck_script_key" type="password" size="50px" value="', isset($SETTINGS['bck_script_key']) ? $SETTINGS['bck_script_key'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1394 | </td> |
||
1395 | </tr>'; |
||
1396 | // Decrypt SQL file |
||
1397 | echo ' |
||
1398 | <tr style="margin-bottom:3px"> |
||
1399 | <td> |
||
1400 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1401 | '.$LANG['admin_script_backup_decrypt'].' |
||
1402 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_script_backup_decrypt_tip']), ENT_QUOTES).'"></i></span> |
||
1403 | </td> |
||
1404 | <td> |
||
1405 | <input id="bck_script_decrypt_file" name="bck_script_decrypt_file" type="text" size="50px" value="" /> |
||
1406 | |
||
1407 | <span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_start_tip']), ENT_QUOTES).'" onclick="LaunchAdminActions(\'admin_action_backup_decrypt\')" style="cursor:pointer;"> |
||
1408 | <i class="fa fa-square fa-stack-2x"></i> |
||
1409 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
1410 | </span> |
||
1411 | </td> |
||
1412 | </tr>'; |
||
1413 | |||
1414 | echo ' |
||
1415 | <tr> |
||
1416 | <td></td> |
||
1417 | <td> |
||
1418 | <div id="result_admin_script_backup" class="ui-state-focus ui-corner-all" style="padding:3px; display:none;"></div> |
||
1419 | </td> |
||
1420 | </tr>'; |
||
1421 | |||
1422 | echo ' |
||
1423 | </table> |
||
1424 | </div> |
||
1425 | </div>'; |
||
1426 | // -------------------------------------------------------------------------------- |
||
1427 | // -------------------------------------------------------------------------------- |
||
1428 | // TAB Né6 |
||
1429 | echo ' |
||
1430 | <div id="tabs-6"> |
||
1431 | <div class="" style="padding: 0 .7em;"> |
||
1432 | <i class="fa fa-chevron-circle-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1433 | <b>'.$LANG['admin_emails_configuration'].'</b> |
||
1434 | </div> |
||
1435 | <div style="margin:0 0 5px 20px;"> |
||
1436 | <table>'; |
||
1437 | // SMTP server |
||
1438 | echo ' |
||
1439 | <tr style="margin-bottom:3px"> |
||
1440 | <td> |
||
1441 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1442 | '.$LANG['admin_email_smtp_server'].' |
||
1443 | </td> |
||
1444 | <td> |
||
1445 | <input type="text" size="80" id="email_smtp_server" name="email_smtp_server" value="', !isset($SETTINGS['email_smtp_server']) ? $smtp_server : $SETTINGS['email_smtp_server'], '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1446 | </td> |
||
1447 | </tr>'; |
||
1448 | // SMTP auth |
||
1449 | echo ' |
||
1450 | <tr style="margin-bottom:3px"> |
||
1451 | <td> |
||
1452 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1453 | '.$LANG['admin_email_auth'].' |
||
1454 | </td> |
||
1455 | <td> |
||
1456 | <div class="toggle toggle-modern" id="email_smtp_auth" data-toggle-on="', isset($SETTINGS['email_smtp_auth']) && $SETTINGS['email_smtp_auth'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="email_smtp_auth_input" name="email_smtp_auth_input" value="', isset($SETTINGS['email_smtp_auth']) && $SETTINGS['email_smtp_auth'] == 1 ? '1' : '0', '" /> |
||
1457 | </td> |
||
1458 | </tr>'; |
||
1459 | // SMTP auth username |
||
1460 | echo ' |
||
1461 | <tr style="margin-bottom:3px"> |
||
1462 | <td> |
||
1463 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1464 | '.$LANG['admin_email_auth_username'].' |
||
1465 | </td> |
||
1466 | <td> |
||
1467 | <input id="email_auth_username" name="email_auth_username" type="text" size="40px" value="', !isset($SETTINGS['email_auth_username']) ? $smtp_auth_username : $SETTINGS['email_auth_username'], '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1468 | </td> |
||
1469 | </tr>'; |
||
1470 | // SMTP auth pwd |
||
1471 | echo ' |
||
1472 | <tr style="margin-bottom:3px"> |
||
1473 | <td> |
||
1474 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1475 | '.$LANG['admin_email_auth_pwd'].' |
||
1476 | </td> |
||
1477 | <td> |
||
1478 | <input id="email_auth_pwd" name="email_auth_pwd" type="password" size="40px" value="', !isset($SETTINGS['email_auth_pwd']) ? $smtp_auth_password : $SETTINGS['email_auth_pwd'], '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1479 | </td> |
||
1480 | </tr>'; |
||
1481 | // SMTP server url |
||
1482 | echo ' |
||
1483 | <tr style="margin-bottom:3px"> |
||
1484 | <td> |
||
1485 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1486 | '.$LANG['admin_email_server_url'].' |
||
1487 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_email_server_url_tip']), ENT_QUOTES).'"></i></span> |
||
1488 | </td> |
||
1489 | <td> |
||
1490 | <input id="email_server_url" name="email_server_url" type="text" size="40px" value="', !isset($SETTINGS['email_server_url']) ? $SETTINGS['cpassman_url'] : $SETTINGS['email_server_url'], '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1491 | </td> |
||
1492 | </tr>'; |
||
1493 | // SMTP port |
||
1494 | echo ' |
||
1495 | <tr style="margin-bottom:3px"> |
||
1496 | <td> |
||
1497 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1498 | '.$LANG['admin_email_port'].' |
||
1499 | </td> |
||
1500 | <td> |
||
1501 | <input id="email_port" name="email_port" type="text" size="40px" value="', !isset($SETTINGS['email_port']) ? '25' : $SETTINGS['email_port'], '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1502 | </td> |
||
1503 | </tr>'; |
||
1504 | // SMTP security |
||
1505 | echo ' |
||
1506 | <tr style="margin-bottom:3px"> |
||
1507 | <td> |
||
1508 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1509 | '.$LANG['admin_email_security'].' |
||
1510 | </td> |
||
1511 | <td> |
||
1512 | <select id="email_security" name="email_security" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));"> |
||
1513 | <option value="none"', !isset($SETTINGS['email_security']) || $SETTINGS['email_security'] == "none" ? ' selected="selected"' : "", '>None</option> |
||
1514 | <option value="ssl"', isset($SETTINGS['email_security']) && $SETTINGS['email_security'] == "ssl" ? ' selected="selected"' : "", '>SSL</option> |
||
1515 | <option value="tls"', isset($SETTINGS['email_security']) && $SETTINGS['email_security'] == "tls" ? ' selected="selected"' : "", '>TLS</option> |
||
1516 | </select> |
||
1517 | </td> |
||
1518 | </tr>'; |
||
1519 | // SMTP from |
||
1520 | echo ' |
||
1521 | <tr style="margin-bottom:3px"> |
||
1522 | <td> |
||
1523 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1524 | '.$LANG['admin_email_from'].' |
||
1525 | </td> |
||
1526 | <td> |
||
1527 | <input id="email_from" name="email_from" type="text" size="40px" value="', !isset($SETTINGS['email_from']) ? $email_from : $SETTINGS['email_from'], '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1528 | </td> |
||
1529 | </tr>'; |
||
1530 | // SMTP from name |
||
1531 | echo ' |
||
1532 | <tr style="margin-bottom:3px"> |
||
1533 | <td> |
||
1534 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1535 | '.$LANG['admin_email_from_name'].' |
||
1536 | </td> |
||
1537 | <td> |
||
1538 | <input id="email_from_name" name="email_from_name" type="text" size="40px" value="', !isset($SETTINGS['email_from_name']) ? $email_from_name : $SETTINGS['email_from_name'], '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1539 | </td> |
||
1540 | </tr>'; |
||
1541 | |||
1542 | echo ' |
||
1543 | </table> |
||
1544 | </div>'; |
||
1545 | |||
1546 | echo ' |
||
1547 | <div class="" style="0padding: 0 .7em;"> |
||
1548 | <i class="fa fa-chevron-circle-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1549 | <b>'.$LANG['admin_emails_configuration_testing'].'</b> |
||
1550 | </div> |
||
1551 | <div id="email_testing_results" class="ui-state-error ui-corner-all" style="padding:5px;display:none;margin:2px;"></div> |
||
1552 | <div style="margin:0 0 5px 20px;"> |
||
1553 | <table>'; |
||
1554 | // Test email configuration |
||
1555 | echo ' |
||
1556 | <tr style="margin-bottom:3px"> |
||
1557 | <td> |
||
1558 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1559 | '.$LANG['admin_email_test_configuration'].' |
||
1560 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_email_test_configuration_tip']), ENT_QUOTES).'"></i></span> |
||
1561 | </td> |
||
1562 | <td> |
||
1563 | <span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_start_tip']), ENT_QUOTES).'" onclick="LaunchAdminActions(\'admin_email_test_configuration\')" style="cursor:pointer;"> |
||
1564 | <i class="fa fa-square fa-stack-2x"></i> |
||
1565 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
1566 | </span> |
||
1567 | </td> |
||
1568 | </tr>'; |
||
1569 | // Send emails backlog |
||
1570 | DB::query("SELECT * FROM ".prefix_table("emails")." WHERE status = %s OR status = %s", 'not_sent', ''); |
||
1571 | $nb_emails = DB::count(); |
||
1572 | echo ' |
||
1573 | <tr style="margin-bottom:3px"> |
||
1574 | <td> |
||
1575 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1576 | '.str_replace("#nb_emails#", $nb_emails, $LANG['admin_email_send_backlog']).' |
||
1577 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_email_send_backlog_tip']), ENT_QUOTES).'"></i></span> |
||
1578 | </td> |
||
1579 | <td> |
||
1580 | <span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_start_tip']), ENT_QUOTES).'" onclick="LaunchAdminActions(\'admin_email_send_backlog\')" style="cursor:pointer;"> |
||
1581 | <i class="fa fa-square fa-stack-2x"></i> |
||
1582 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
1583 | </span> |
||
1584 | </td> |
||
1585 | </tr>'; |
||
1586 | |||
1587 | echo ' |
||
1588 | </table> |
||
1589 | </div> |
||
1590 | </div>'; |
||
1591 | // -------------------------------------------------------------------------------- |
||
1592 | // TAB N°7 |
||
1593 | echo ' |
||
1594 | <div id="tabs-7"> |
||
1595 | <table width="100%">'; |
||
1596 | // Max file size |
||
1597 | echo ' |
||
1598 | <tr><td> |
||
1599 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1600 | <label>'.$LANG['settings_upload_maxfilesize']. |
||
1601 | '<span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_upload_maxfilesize_tip']), ENT_QUOTES).'"></i></span> |
||
1602 | </label> |
||
1603 | </td><td> |
||
1604 | <input type="text" size="5" id="upload_maxfilesize" name="upload_maxfilesize" value="', isset($SETTINGS['upload_maxfilesize']) ? $SETTINGS['upload_maxfilesize'] : '10', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1605 | </td></tr>'; |
||
1606 | |||
1607 | // upload_zero_byte_file |
||
1608 | echo ' |
||
1609 | <tr style="margin-bottom:3px"> |
||
1610 | <td> |
||
1611 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1612 | <label>' . |
||
1613 | $LANG['upload_empty_file'].' |
||
1614 | </label> |
||
1615 | </td> |
||
1616 | <td> |
||
1617 | <div class="toggle toggle-modern" id="upload_zero_byte_file" data-toggle-on="', isset($SETTINGS['upload_zero_byte_file']) && $SETTINGS['upload_zero_byte_file'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="upload_zero_byte_file_input" name="upload_zero_byte_file_input" value="', isset($SETTINGS['upload_zero_byte_file']) && $SETTINGS['upload_zero_byte_file'] == 1 ? '1' : '0', '" /> |
||
1618 | </td> |
||
1619 | </tr>'; |
||
1620 | |||
1621 | // upload_all_extensions_file |
||
1622 | echo ' |
||
1623 | <tr style="margin-bottom:3px"> |
||
1624 | <td> |
||
1625 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1626 | <label>' . |
||
1627 | $LANG['upload_any_extension_file'].' |
||
1628 | <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['upload_any_extension_file_tip']), ENT_QUOTES).'"></i> |
||
1629 | </label> |
||
1630 | </td> |
||
1631 | <td> |
||
1632 | <div class="toggle toggle-modern" id="upload_all_extensions_file" data-toggle-on="', isset($SETTINGS['upload_all_extensions_file']) && $SETTINGS['upload_all_extensions_file'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="upload_all_extensions_file_input" name="upload_all_extensions_file_input" value="', isset($SETTINGS['upload_all_extensions_file']) && $SETTINGS['upload_all_extensions_file'] == 1 ? '1' : '0', '" /> |
||
1633 | </td> |
||
1634 | </tr>'; |
||
1635 | |||
1636 | // Extension for Documents |
||
1637 | echo ' |
||
1638 | <tr><td> |
||
1639 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1640 | <label>'.$LANG['settings_upload_docext']. |
||
1641 | '<span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_upload_docext_tip']), ENT_QUOTES).'"></i></span> |
||
1642 | </label> |
||
1643 | </td><td> |
||
1644 | <input type="text" size="70" id="upload_docext" name="upload_docext" value="', isset($SETTINGS['upload_docext']) ? $SETTINGS['upload_docext'] : 'doc,docx,dotx,xls,xlsx,xltx,rtf,csv,txt,pdf,ppt,pptx,pot,dotx,xltx', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1645 | </td></tr>'; |
||
1646 | // Extension for Images |
||
1647 | echo ' |
||
1648 | <tr><td> |
||
1649 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1650 | <label>'.$LANG['settings_upload_imagesext']. |
||
1651 | '<span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_upload_imagesext_tip']), ENT_QUOTES).'"></i></span> |
||
1652 | </label> |
||
1653 | </td><td> |
||
1654 | <input type="text" size="70" id="upload_imagesext" name="upload_imagesext" value="', isset($SETTINGS['upload_imagesext']) ? $SETTINGS['upload_imagesext'] : 'jpg,jpeg,gif,png', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1655 | </td></tr>'; |
||
1656 | // Extension for Packages |
||
1657 | echo ' |
||
1658 | <tr><td> |
||
1659 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1660 | <label>'.$LANG['settings_upload_pkgext']. |
||
1661 | '<span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_upload_pkgext_tip']), ENT_QUOTES).'"></i></span> |
||
1662 | </label> |
||
1663 | </td><td> |
||
1664 | <input type="text" size="70" id="upload_pkgext" name="upload_pkgext" value="', isset($SETTINGS['upload_pkgext']) ? $SETTINGS['upload_pkgext'] : '7z,rar,tar,zip', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1665 | </td></tr>'; |
||
1666 | // Extension for Other |
||
1667 | echo ' |
||
1668 | <tr><td> |
||
1669 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1670 | <label>'.$LANG['settings_upload_otherext']. |
||
1671 | '<span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_upload_otherext_tip']), ENT_QUOTES).'"></i></span> |
||
1672 | </label> |
||
1673 | </td><td> |
||
1674 | <input type="text" size="70" id="upload_otherext" name="upload_otherext" value="', isset($SETTINGS['upload_otherext']) ? $SETTINGS['upload_otherext'] : 'sql,xml', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1675 | </td></tr>'; |
||
1676 | |||
1677 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
1678 | // Image resize width / height / quality |
||
1679 | echo ' |
||
1680 | <tr style="margin-bottom:3px"> |
||
1681 | <td> |
||
1682 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1683 | <label>' . |
||
1684 | $LANG['settings_upload_imageresize_options'].' |
||
1685 | <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_upload_imageresize_options_tip']), ENT_QUOTES).'"></i> |
||
1686 | </label> |
||
1687 | </td> |
||
1688 | <td> |
||
1689 | <div class="toggle toggle-modern" id="upload_imageresize_options" data-toggle-on="', isset($SETTINGS['upload_imageresize_options']) && $SETTINGS['upload_imageresize_options'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="upload_imageresize_options_input" name="upload_imageresize_options_input" value="', isset($SETTINGS['upload_imageresize_options']) && $SETTINGS['upload_imageresize_options'] == 1 ? '1' : '0', '" /> |
||
1690 | </td> |
||
1691 | </tr> |
||
1692 | <tr><td> |
||
1693 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1694 | <label>'.$LANG['settings_upload_imageresize_options_w']. |
||
1695 | '</label> |
||
1696 | </td><td> |
||
1697 | <input type="text" size="5" id="upload_imageresize_width" name="upload_imageresize_width" value="', |
||
1698 | isset($SETTINGS['upload_imageresize_width']) ? $SETTINGS['upload_imageresize_width'] : '800', '" class="text ui-widget-content upl_img_opt" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1699 | </td> |
||
1700 | </tr> |
||
1701 | <tr><td> |
||
1702 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1703 | <label>'.$LANG['settings_upload_imageresize_options_h']. |
||
1704 | '</label> |
||
1705 | </td><td> |
||
1706 | <input type="text" size="5" id="upload_imageresize_height" name="upload_imageresize_height" value="', |
||
1707 | isset($SETTINGS['upload_imageresize_height']) ? $SETTINGS['upload_imageresize_height'] : '600', '" class="text ui-widget-content upl_img_opt" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1708 | </td> |
||
1709 | </tr> |
||
1710 | <tr><td> |
||
1711 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
1712 | <label>'.$LANG['settings_upload_imageresize_options_q']. |
||
1713 | '</label> |
||
1714 | </td><td> |
||
1715 | <input type="text" size="5" id="upload_imageresize_quality" name="upload_imageresize_quality" value="', |
||
1716 | isset($SETTINGS['upload_imageresize_quality']) ? $SETTINGS['upload_imageresize_quality'] : '90', '" class="text ui-widget-content upl_img_opt" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
1717 | </td></tr>'; |
||
1718 | echo ' |
||
1719 | <tr><td colspan="3"><hr /></td></tr>'; |
||
1720 | echo ' |
||
1721 | </table> |
||
1722 | </div>'; |
||
1723 | // -------------------------------------------------------------------------------- |
||
1724 | |||
1725 | echo ' |
||
1726 | </div>'; |
||
1727 | |||
1728 | echo ' |
||
1729 | </form> |
||
1730 | </div>'; |
||
1731 | |||
1732 | echo ' |
||
1733 | <input id="restore_bck_fileObj" name="restore_bck_fileObj" type="hidden" value="" /> |
||
1734 | <div id="restore_bck_encryption_key_dialog" style="display:none; text-align:center;"> |
||
1735 | <input id="restore_bck_encryption_key" name="restore_bck_encryption_key" type="text" value="" /> |
||
1736 | <br> |
||
1737 | <div class="ui-state-error ui-corner-all" style="display:none;padding:5px;display:none;margin:2px;" id="restore_bck_encryption_key_dialog_error"></div> |
||
1738 | </div>'; |
||
1739 | include "admin.settings.load.php"; |
||
1740 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.