nilsteampassnet /
TeamPass
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * |
||
| 4 | * @file admin.settings.php |
||
| 5 | * @author Nils Laumaillé |
||
| 6 | * @version 2.1.27 |
||
| 7 | * @copyright (c) 2009-2017 Nils Laumaillé |
||
| 8 | * @licensing GNU AFFERO GPL 3.0 |
||
| 9 | * @link http://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 | View Code Duplication | if (file_exists('../includes/config/tp.config.php')) { |
|
| 25 | require_once '../includes/config/tp.config.php'; |
||
| 26 | } elseif (file_exists('./includes/config/tp.config.php')) { |
||
| 27 | require_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 | View Code Duplication | 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 | View Code Duplication | 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 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
| 464 | // Enable KB |
||
| 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_kb'].' |
||
| 470 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_kb_tip']), ENT_QUOTES).'"></i></span> |
||
| 471 | </label> |
||
| 472 | </td><td> |
||
| 473 | <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', '" /> |
||
| 474 | </td></tr>'; |
||
| 475 | |||
| 476 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
| 477 | // Enable SUGGESTION |
||
| 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_suggestion'].' |
||
| 483 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_suggestion_tip']), ENT_QUOTES).'"></i></span> |
||
| 484 | </label> |
||
| 485 | </td><td> |
||
| 486 | <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', '" /> |
||
| 487 | </td></tr>'; |
||
| 488 | |||
| 489 | // Enable GET TP Information |
||
| 490 | echo ' |
||
| 491 | <tr><td> |
||
| 492 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 493 | <label> |
||
| 494 | '.$LANG['settings_get_tp_info'].' |
||
| 495 | <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> |
||
| 496 | </label> |
||
| 497 | </td><td> |
||
| 498 | <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', '" /> |
||
| 499 | </td></tr>'; |
||
| 500 | |||
| 501 | echo ' |
||
| 502 | <tr><td colspan="3"><hr /></td></tr> |
||
| 503 | </table> |
||
| 504 | </div>'; |
||
| 505 | // -------------------------------------------------------------------------------- |
||
| 506 | // -------------------------------------------------------------------------------- |
||
| 507 | // TAB Né2 |
||
| 508 | echo ' |
||
| 509 | <div id="tabs-2">'; |
||
| 510 | // Rebuild Config file |
||
| 511 | echo ' |
||
| 512 | <div style="margin-bottom:3px"> |
||
| 513 | <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;"> |
||
| 514 | <i class="fa fa-square fa-stack-2x"></i> |
||
| 515 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
| 516 | </span> |
||
| 517 | <label>'.$LANG['rebuild_config_file'].'</label> |
||
| 518 | <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> |
||
| 519 | <span id="result_admin_rebuild_config_file" style="margin-left:10px;display:none;"></span> |
||
| 520 | </div>'; |
||
| 521 | // Update Personal folders for users |
||
| 522 | echo ' |
||
| 523 | <div style="margin-bottom:3px"> |
||
| 524 | <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;"> |
||
| 525 | <i class="fa fa-square fa-stack-2x"></i> |
||
| 526 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
| 527 | </span> |
||
| 528 | <label>'.$LANG['admin_action_check_pf'].'</label> |
||
| 529 | <span id="result_admin_action_check_pf" style="margin-left:10px;display:none;"></span> |
||
| 530 | </div>'; |
||
| 531 | // Clean DB with orphan items |
||
| 532 | echo ' |
||
| 533 | <div style="margin-bottom:3px"> |
||
| 534 | <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;"> |
||
| 535 | <i class="fa fa-square fa-stack-2x"></i> |
||
| 536 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
| 537 | </span> |
||
| 538 | <label>'.$LANG['admin_action_db_clean_items'].'</label> |
||
| 539 | <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> |
||
| 540 | <span id="result_admin_action_db_clean_items" style="margin-left:10px;"></span> |
||
| 541 | </div>'; |
||
| 542 | // Optimize the DB |
||
| 543 | echo ' |
||
| 544 | <div style="margin-bottom:3px"> |
||
| 545 | <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;"> |
||
| 546 | <i class="fa fa-square fa-stack-2x"></i> |
||
| 547 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
| 548 | </span> |
||
| 549 | <label>'.$LANG['admin_action_db_optimize'].'</label> |
||
| 550 | <span id="result_admin_action_db_optimize" style="margin-left:10px;"></span> |
||
| 551 | </div>'; |
||
| 552 | // Purge old files |
||
| 553 | echo ' |
||
| 554 | <div style="margin-bottom:3px"> |
||
| 555 | <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;"> |
||
| 556 | <i class="fa fa-square fa-stack-2x"></i> |
||
| 557 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
| 558 | </span> |
||
| 559 | <label>'.$LANG['admin_action_purge_old_files'].'</label> |
||
| 560 | <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> |
||
| 561 | <span id="result_admin_action_purge_old_files" style="margin-left:10px;"></span> |
||
| 562 | </div>'; |
||
| 563 | // Reload Cache Table |
||
| 564 | echo ' |
||
| 565 | <div style="margin-bottom:3px"> |
||
| 566 | <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;"> |
||
| 567 | <i class="fa fa-square fa-stack-2x"></i> |
||
| 568 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
| 569 | </span> |
||
| 570 | <label>'.$LANG['admin_action_reload_cache_table'].'</label> |
||
| 571 | <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> |
||
| 572 | <span id="result_admin_action_reload_cache_table" style="margin-left:10px;"></span> |
||
| 573 | </div>'; |
||
| 574 | // Change main SALT key |
||
| 575 | echo ' |
||
| 576 | <div style="margin-bottom:3px"> |
||
| 577 | <span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_start_tip']), ENT_QUOTES).'" onclick="confirmChangingSk()" style="cursor:pointer;"> |
||
| 578 | <i class="fa fa-square fa-stack-2x"></i> |
||
| 579 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
| 580 | </span> |
||
| 581 | <label>'.$LANG['admin_action_change_salt_key'].'</label> |
||
| 582 | <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> |
||
| 583 | <br/> |
||
| 584 | <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> |
||
| 585 | </span> |
||
| 586 | <input type="hidden" id="changeMainSaltKey_itemsCount" /> |
||
| 587 | </div>'; |
||
| 588 | |||
| 589 | // Encrypt / decrypt attachments |
||
| 590 | echo ' |
||
| 591 | <div style="margin-bottom:3px"> |
||
| 592 | <span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_start_tip']), ENT_QUOTES).'" onclick="startFileEncDecyption()" style="cursor:pointer;"> |
||
| 593 | <i class="fa fa-square fa-stack-2x"></i> |
||
| 594 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
| 595 | </span> |
||
| 596 | '.$LANG['admin_action_attachments_cryption'].' |
||
| 597 | <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> |
||
| 598 | <br/> |
||
| 599 | <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;"> |
||
| 600 | '.$LANG['what_action_to_perform'].': |
||
| 601 | <span class="div_radio" style=""> |
||
| 602 | <input type="radio" id="attachments_cryption_radio1" name="attachments_cryption" value="encrypt" /><label for="attachments_cryption_radio1">'.$LANG['encrypt'].'</label> |
||
| 603 | <input type="radio" id="attachments_cryption_radio2" name="attachments_cryption" value="decrypt" /><label for="attachments_cryption_radio2">'.$LANG['decrypt'].'</label> |
||
| 604 | </span> |
||
| 605 | <a href="#" onclick="LaunchAdminActions(\'admin_action_attachments_cryption\')">'.addslashes($LANG['admin_action_db_backup_start_tip']).'</a> |
||
| 606 | <div id="result_admin_action_attachments_cryption" class="" style="padding:10px; display:none; margin-left:30px; text-align:center;"></div> |
||
| 607 | </div> |
||
| 608 | </div>'; |
||
| 609 | |||
| 610 | echo ' |
||
| 611 | </div>'; |
||
| 612 | // -------------------------------------------------------------------------------- |
||
| 613 | // -------------------------------------------------------------------------------- |
||
| 614 | // TAB N°3 |
||
| 615 | echo ' |
||
| 616 | <div id="tabs-3"> |
||
| 617 | <table width="100%">'; |
||
| 618 | // After how long, edition is considered as failed or finished |
||
| 619 | echo ' |
||
| 620 | <tr><td> |
||
| 621 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 622 | <label>'.$LANG['settings_delay_for_item_edition']. |
||
| 623 | '<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> |
||
| 624 | </label> |
||
| 625 | </td><td> |
||
| 626 | <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\'));" /> |
||
| 627 | </td></tr>'; |
||
| 628 | // OTV - otv_is_enabled |
||
| 629 | echo ' |
||
| 630 | <tr><td> |
||
| 631 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 632 | <label>'.$LANG['otv_is_enabled'].'</label> |
||
| 633 | </td><td> |
||
| 634 | <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', '" /> |
||
| 635 | </td></tr>'; |
||
| 636 | // Expired time for OTV - otv_expiration_period |
||
| 637 | echo ' |
||
| 638 | <tr><td> |
||
| 639 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 640 | <label>'.$LANG['settings_otv_expiration_period'].'</label> |
||
| 641 | </td><td> |
||
| 642 | <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\'));" /> |
||
| 643 | </td></tr>'; |
||
| 644 | |||
| 645 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
| 646 | // Managers can edit & delete items they are allowed to see |
||
| 647 | echo ' |
||
| 648 | <tr><td> |
||
| 649 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 650 | <label>'.$LANG['settings_manager_edit'].'</label> |
||
| 651 | </td><td> |
||
| 652 | <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', '" /> |
||
| 653 | </td></tr>'; |
||
| 654 | |||
| 655 | // Managers can move items they are allowed to see |
||
| 656 | echo ' |
||
| 657 | <tr><td> |
||
| 658 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 659 | <label>'.$LANG['settings_manager_move_item'].'</label> |
||
| 660 | </td><td> |
||
| 661 | <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', '" /> |
||
| 662 | </td></tr>'; |
||
| 663 | |||
| 664 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
| 665 | // max items |
||
| 666 | echo ' |
||
| 667 | <tr><td> |
||
| 668 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 669 | <label for="max_last_items">'.$LANG['max_last_items'].'</label> |
||
| 670 | </td><td> |
||
| 671 | <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\'));" /> |
||
| 672 | </td></tr>'; |
||
| 673 | |||
| 674 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
| 675 | // Duplicate folder |
||
| 676 | echo ' |
||
| 677 | <tr><td> |
||
| 678 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 679 | <label>'.$LANG['duplicate_folder'].'</label> |
||
| 680 | </td><td> |
||
| 681 | <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', '" /> |
||
| 682 | </td></tr>'; |
||
| 683 | // Duplicate item name |
||
| 684 | echo ' |
||
| 685 | <tr><td> |
||
| 686 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 687 | <label>'.$LANG['duplicate_item'].'</label> |
||
| 688 | </td><td> |
||
| 689 | <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', '" /> |
||
| 690 | </td></tr>'; |
||
| 691 | // Duplicate item name in same folder - item_duplicate_in_same_folder |
||
| 692 | echo ' |
||
| 693 | <tr><td> |
||
| 694 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 695 | <label>'.$LANG['duplicate_item_in_folder'].'</label> |
||
| 696 | </td><td> |
||
| 697 | <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', '" /> |
||
| 698 | </td></tr>'; |
||
| 699 | // Enable show_only_accessible_folders |
||
| 700 | echo ' |
||
| 701 | <tr><td> |
||
| 702 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 703 | <label> |
||
| 704 | '.$LANG['show_only_accessible_folders'].' |
||
| 705 | <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> |
||
| 706 | </label> |
||
| 707 | </td><td> |
||
| 708 | <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', '" /> |
||
| 709 | </td></tr>'; |
||
| 710 | // Enable subfolder_rights_as_parent |
||
| 711 | echo ' |
||
| 712 | <tr><td> |
||
| 713 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 714 | <label> |
||
| 715 | '.$LANG['subfolder_rights_as_parent'].' |
||
| 716 | <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> |
||
| 717 | </label> |
||
| 718 | </td><td> |
||
| 719 | <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', '" /> |
||
| 720 | </td></tr>'; |
||
| 721 | // Enable create_item_without_password |
||
| 722 | echo ' |
||
| 723 | <tr><td> |
||
| 724 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 725 | <label> |
||
| 726 | '.$LANG['create_item_without_password'].' |
||
| 727 | </label> |
||
| 728 | </td><td> |
||
| 729 | <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', '" /> |
||
| 730 | </td></tr>'; |
||
| 731 | |||
| 732 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
| 733 | // enable FAVOURITES |
||
| 734 | echo ' |
||
| 735 | <tr><td> |
||
| 736 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 737 | <label>'.$LANG['enable_favourites'].'</label> |
||
| 738 | </td><td> |
||
| 739 | <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', '" /> |
||
| 740 | </td></tr>'; |
||
| 741 | // enable USER can create folders |
||
| 742 | echo ' |
||
| 743 | <tr><td> |
||
| 744 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 745 | <label>'.$LANG['enable_user_can_create_folders'].'</label> |
||
| 746 | </td><td> |
||
| 747 | <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', '" /> |
||
| 748 | </td></tr>'; |
||
| 749 | // enable can_create_root_folder |
||
| 750 | echo ' |
||
| 751 | <tr><td> |
||
| 752 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 753 | <label>'.$LANG['setting_can_create_root_folder'].'</label> |
||
| 754 | </td><td> |
||
| 755 | <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', '" /> |
||
| 756 | </td></tr>'; |
||
| 757 | // enable enable_massive_move_delete |
||
| 758 | echo ' |
||
| 759 | <tr><td> |
||
| 760 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 761 | <label>'.$LANG['enable_massive_move_delete'].' |
||
| 762 | <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> |
||
| 763 | </label> |
||
| 764 | </td><td> |
||
| 765 | <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', '" /> |
||
| 766 | </td></tr>'; |
||
| 767 | |||
| 768 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
| 769 | // Enable activate_expiration |
||
| 770 | echo ' |
||
| 771 | <tr><td> |
||
| 772 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 773 | <label> |
||
| 774 | '.$LANG['admin_setting_activate_expiration'].' |
||
| 775 | <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> |
||
| 776 | </label> |
||
| 777 | </td><td> |
||
| 778 | <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', '" /> |
||
| 779 | </td></tr>'; |
||
| 780 | // Enable enable_delete_after_consultation |
||
| 781 | echo ' |
||
| 782 | <tr><td> |
||
| 783 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 784 | <label> |
||
| 785 | '.$LANG['admin_setting_enable_delete_after_consultation'].' |
||
| 786 | <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> |
||
| 787 | </label> |
||
| 788 | </td><td> |
||
| 789 | <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', '" /> |
||
| 790 | </td></tr>'; |
||
| 791 | |||
| 792 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
| 793 | // Enable Printing |
||
| 794 | echo ' |
||
| 795 | <tr><td> |
||
| 796 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 797 | <label> |
||
| 798 | '.$LANG['settings_printing'].' |
||
| 799 | <span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_printing_tip']), ENT_QUOTES).'"></i></span> |
||
| 800 | </label> |
||
| 801 | </td><td> |
||
| 802 | <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', '" /> |
||
| 803 | </td></tr>'; |
||
| 804 | |||
| 805 | // Enable Printing Groups - roles_allowed_to_print |
||
| 806 | echo ' |
||
| 807 | <tr><td> |
||
| 808 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 809 | <label> |
||
| 810 | '.$LANG['settings_roles_allowed_to_print'].' |
||
| 811 | <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> |
||
| 812 | </label> |
||
| 813 | </td><td> |
||
| 814 | <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'] : '', '" /> |
||
| 815 | <select id="roles_allowed_to_print_select" name="roles_allowed_to_print_select" class="text ui-widget-content" multiple="multiple" onchange="refreshInput()">'; |
||
| 816 | View Code Duplication | if (!isset($SETTINGS['roles_allowed_to_print']) || empty($SETTINGS['roles_allowed_to_print'])) { |
|
| 817 | $arrRolesToPrint = array(); |
||
| 818 | } else { |
||
| 819 | $arrRolesToPrint = explode(";", $SETTINGS['roles_allowed_to_print']); |
||
| 820 | } |
||
| 821 | $roles = DB::query("SELECT id, title FROM ".prefix_table("roles_title")); |
||
| 822 | foreach ($roles as $role) { |
||
| 823 | echo '<option value="'.$role['id'].'"', in_array($role['id'], $arrRolesToPrint) ? ' selected="selected"' : '', '>'.addslashes($role['title']).'</option>'; |
||
| 824 | } |
||
| 825 | echo ' |
||
| 826 | </select> |
||
| 827 | </td></tr>'; |
||
| 828 | // Enable IMPORT |
||
| 829 | echo ' |
||
| 830 | <tr><td> |
||
| 831 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 832 | <label> |
||
| 833 | '.$LANG['settings_importing'].' |
||
| 834 | </label> |
||
| 835 | </td><td> |
||
| 836 | <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', '" /> |
||
| 837 | </td></tr>'; |
||
| 838 | |||
| 839 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
| 840 | // Enable Item modification by anyone |
||
| 841 | echo ' |
||
| 842 | <tr><td> |
||
| 843 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 844 | <label> |
||
| 845 | '.$LANG['settings_anyone_can_modify'].' |
||
| 846 | <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> |
||
| 847 | </label> |
||
| 848 | </td><td> |
||
| 849 | <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', '" /> |
||
| 850 | </td></tr>'; |
||
| 851 | // Enable Item modification by anyone by default |
||
| 852 | echo ' |
||
| 853 | <tr id="tr_option_anyone_can_modify_bydefault"', isset($SETTINGS['anyone_can_modify']) && $SETTINGS['anyone_can_modify'] == 1 ? '' : ' style="display:none;"', '><td> |
||
| 854 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 855 | <label>'.htmlentities(strip_tags($LANG['settings_anyone_can_modify_bydefault'])).'</label> |
||
| 856 | </td><td> |
||
| 857 | <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', '" /> |
||
| 858 | </td></tr>'; |
||
| 859 | // enable restricted_to option |
||
| 860 | echo ' |
||
| 861 | <tr><td> |
||
| 862 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 863 | <label>'.$LANG['settings_restricted_to'].'</label> |
||
| 864 | </td><td> |
||
| 865 | <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', '" /> |
||
| 866 | </td></tr>'; |
||
| 867 | // enable restricted_to_roles |
||
| 868 | echo ' |
||
| 869 | <tr id="tr_option_restricted_to_roles" style="display:', isset($SETTINGS['restricted_to']) && $SETTINGS['restricted_to'] == 1 ? 'inline' : 'none', ';"><td> |
||
| 870 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 871 | <label>'.$LANG['restricted_to_roles'].'</label> |
||
| 872 | </td><td> |
||
| 873 | <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', '" /> |
||
| 874 | </td></tr>'; |
||
| 875 | |||
| 876 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
| 877 | // enable show copy to clipboard small icons |
||
| 878 | echo ' |
||
| 879 | <tr><td> |
||
| 880 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 881 | <label> |
||
| 882 | '.$LANG['copy_to_clipboard_small_icons'].' |
||
| 883 | <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> |
||
| 884 | </label> |
||
| 885 | </td><td> |
||
| 886 | <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', '" /> |
||
| 887 | </td></tr>'; |
||
| 888 | // Enable Show description in items list |
||
| 889 | echo ' |
||
| 890 | <tr><td> |
||
| 891 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 892 | <label> |
||
| 893 | '.$LANG['settings_show_description'].' |
||
| 894 | </label> |
||
| 895 | </td><td> |
||
| 896 | <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', '" /> |
||
| 897 | </td></tr>'; |
||
| 898 | // In Tree, display number of Items in subfolders and number of subfolders - tree_counters |
||
| 899 | echo ' |
||
| 900 | <tr><td> |
||
| 901 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 902 | <label> |
||
| 903 | '.$LANG['settings_tree_counters'].' |
||
| 904 | <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> |
||
| 905 | </label> |
||
| 906 | </td><td> |
||
| 907 | <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', '" /> |
||
| 908 | </td></tr>'; |
||
| 909 | // nb of items to display by ajax query |
||
| 910 | echo ' |
||
| 911 | <tr><td> |
||
| 912 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 913 | <label>'.$LANG['nb_items_by_query'].'</label> |
||
| 914 | <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> |
||
| 915 | </td><td> |
||
| 916 | <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\'));" /> |
||
| 917 | </td></tr>'; |
||
| 918 | |||
| 919 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
| 920 | // enable sending email on USER login |
||
| 921 | echo ' |
||
| 922 | <tr><td> |
||
| 923 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 924 | <label>'.$LANG['enable_send_email_on_user_login'].'</label> |
||
| 925 | </td><td> |
||
| 926 | <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', '" /> |
||
| 927 | </td></tr>'; |
||
| 928 | // enable email notification on item shown |
||
| 929 | echo ' |
||
| 930 | <tr><td> |
||
| 931 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 932 | <label>'.$LANG['enable_email_notification_on_item_shown'].'</label> |
||
| 933 | </td><td> |
||
| 934 | <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', '" /> |
||
| 935 | </td></tr>'; |
||
| 936 | // enable email notification when user password is changed |
||
| 937 | echo ' |
||
| 938 | <tr><td> |
||
| 939 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 940 | <label>'.$LANG['enable_email_notification_on_user_pw_change'].'</label> |
||
| 941 | </td><td> |
||
| 942 | <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', '" /> |
||
| 943 | </td></tr>'; |
||
| 944 | |||
| 945 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
| 946 | // enable add manual entries in History |
||
| 947 | echo ' |
||
| 948 | <tr><td> |
||
| 949 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 950 | <label> |
||
| 951 | '.$LANG['settings_insert_manual_entry_item_history'].' |
||
| 952 | <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> |
||
| 953 | </label> |
||
| 954 | </td><td> |
||
| 955 | <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', '" /> |
||
| 956 | </td></tr>'; |
||
| 957 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
| 958 | // OffLine mode options |
||
| 959 | echo ' |
||
| 960 | <tr><td> |
||
| 961 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 962 | <label> |
||
| 963 | '.$LANG['settings_offline_mode'].' |
||
| 964 | <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> |
||
| 965 | </label> |
||
| 966 | </td><td> |
||
| 967 | <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', '" /> |
||
| 968 | </td></tr>'; |
||
| 969 | // OffLne KEy Level |
||
| 970 | echo ' |
||
| 971 | <tr style="margin-bottom:3px"> |
||
| 972 | <td> |
||
| 973 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 974 | <label for="offline_key_level">'.$LANG['offline_mode_key_level'].'</label> |
||
| 975 | </td> |
||
| 976 | <td> |
||
| 977 | <select id="offline_key_level" name="offline_key_level" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));">'; |
||
| 978 | View Code Duplication | foreach ($SETTINGS_EXT['pwComplexity'] as $complex) { |
|
| 979 | echo '<option value="'.$complex[0].'"', isset($SETTINGS['offline_key_level']) && $SETTINGS['offline_key_level'] == $complex[0] ? ' selected="selected"' : '', '>'.$complex[1].'</option>'; |
||
| 980 | } |
||
| 981 | echo ' |
||
| 982 | </select> |
||
| 983 | </td> |
||
| 984 | </tr>'; |
||
| 985 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
| 986 | // SYSLOG ENABLE |
||
| 987 | echo ' |
||
| 988 | <tr><td> |
||
| 989 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 990 | <label>'.$LANG['syslog_enable'].'</label> |
||
| 991 | </td><td> |
||
| 992 | <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', '" /> |
||
| 993 | </td></tr>'; |
||
| 994 | // SYSLOG Host |
||
| 995 | echo ' |
||
| 996 | <tr style="margin-bottom:3px"> |
||
| 997 | <td> |
||
| 998 | <i class="fa fa-long-arrow-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 999 | '.$LANG['syslog_host'].' |
||
| 1000 | </td> |
||
| 1001 | <td> |
||
| 1002 | <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\'));" /> |
||
| 1003 | </td> |
||
| 1004 | </tr>'; |
||
| 1005 | // SYSLOG port |
||
| 1006 | echo ' |
||
| 1007 | <tr style="margin-bottom:3px"> |
||
| 1008 | <td> |
||
| 1009 | <i class="fa fa-long-arrow-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1010 | '.$LANG['syslog_port'].' |
||
| 1011 | </td> |
||
| 1012 | <td> |
||
| 1013 | <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\'));" /> |
||
| 1014 | </td> |
||
| 1015 | </tr>'; |
||
| 1016 | |||
| 1017 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
| 1018 | |||
| 1019 | // Automatic server password change |
||
| 1020 | echo ' |
||
| 1021 | <tr><td> |
||
| 1022 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1023 | <label>'.$LANG['server_password_change_enable'].' |
||
| 1024 | <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> |
||
| 1025 | </label> |
||
| 1026 | </td><td> |
||
| 1027 | <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', '" /> |
||
| 1028 | </td></tr>'; |
||
| 1029 | |||
| 1030 | echo ' |
||
| 1031 | </table> |
||
| 1032 | </div>'; |
||
| 1033 | // -------------------------------------------------------------------------------- |
||
| 1034 | // -------------------------------------------------------------------------------- |
||
| 1035 | // TAB Né4 |
||
| 1036 | echo ' |
||
| 1037 | <div id="tabs-4">'; |
||
| 1038 | // Check if LDAP extension is loaded |
||
| 1039 | if (!extension_loaded('ldap')) { |
||
| 1040 | echo ' |
||
| 1041 | <div style="margin-bottom:3px;"> |
||
| 1042 | <div class="ui-widget-content ui-corner-all" style="padding:10px;"> |
||
| 1043 | <i class="fa fa-warning fa-2x"></i> '.$LANG['ldap_extension_not_loaded'].' |
||
| 1044 | </div> |
||
| 1045 | </div>'; |
||
| 1046 | } else { |
||
| 1047 | // Enable LDAP mode |
||
| 1048 | echo ' |
||
| 1049 | <div style="margin-bottom:3px;"> |
||
| 1050 | <table><tr> |
||
| 1051 | <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> |
||
| 1052 | <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> |
||
| 1053 | </tr></table> |
||
| 1054 | </div>'; |
||
| 1055 | } |
||
| 1056 | // LDAP inputs |
||
| 1057 | echo ' |
||
| 1058 | <div id="div_ldap_configuration" ', (isset($SETTINGS['ldap_mode']) && $SETTINGS['ldap_mode'] == 1) ? '' : ' style="display:none;"', '> |
||
| 1059 | <div style="font-weight:bold;font-size:14px;margin:15px 0px 8px 0px;">'.$LANG['admin_ldap_configuration'].'</div> |
||
| 1060 | <table id="ldap_config_values">'; |
||
| 1061 | // Type |
||
| 1062 | $ldap_type = isset($SETTINGS['ldap_type']) ? $SETTINGS['ldap_type'] : ''; |
||
| 1063 | echo ' |
||
| 1064 | <tr> |
||
| 1065 | <td><label for="ldap_type">'.$LANG['settings_ldap_type'].'</label></td> |
||
| 1066 | <td> |
||
| 1067 | <select id="ldap_type" name="ldap_type" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\')); showLdapFields($(this).val());"> |
||
| 1068 | <option value="0">-- '.$LANG['select'].' --</option> |
||
| 1069 | <option value="windows"', $ldap_type === 'windows' ? ' selected="selected"' : '', '>Windows / Active Directory</option> |
||
| 1070 | <option value="posix"', $ldap_type === 'posix' ? ' selected="selected"' : '', '>Posix / OpenLDAP (RFC2307)</option> |
||
| 1071 | <option value="posix-search"', $ldap_type === 'posix-search' ? ' selected="selected"' : '', '>Posix / OpenLDAP (RFC2307) Search Based</option> |
||
| 1072 | </select> |
||
| 1073 | </td> |
||
| 1074 | </tr>'; |
||
| 1075 | // Domain |
||
| 1076 | echo ' |
||
| 1077 | <tr style="display:', (isset($ldap_type)) ? '' : 'none', '" class="tr-windows tr-ldap tr-posix tr-posix-search"> |
||
| 1078 | <td><label for="ldap_suffix">'.$LANG['settings_ldap_domain'].'</label></td> |
||
| 1079 | <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> |
||
| 1080 | </tr>'; |
||
| 1081 | |||
| 1082 | // Domain DN |
||
| 1083 | echo ' |
||
| 1084 | <tr style="display:', (isset($ldap_type) && $ldap_type != 'posix-search') ? '' : 'none', '" class="tr-windows tr-posix tr-ldap"> |
||
| 1085 | <td><label for="ldap_domain_dn">'.$LANG['settings_ldap_domain_dn'].'</label></td> |
||
| 1086 | <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> |
||
| 1087 | </tr>'; |
||
| 1088 | /* |
||
|
0 ignored issues
–
show
|
|||
| 1089 | // Subtree for posix / openldap |
||
| 1090 | echo ' |
||
| 1091 | <tr> |
||
| 1092 | <td><label for="ldap_suffix">'.$LANG['settings_ldap_domain_posix'].'</label></td> |
||
| 1093 | <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> |
||
| 1094 | </tr>'; |
||
| 1095 | */ |
||
| 1096 | // LDAP username attribute |
||
| 1097 | // LDAP Object Class |
||
| 1098 | echo ' |
||
| 1099 | <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none', '" class="tr-posix-search tr-ldap"> |
||
| 1100 | <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> |
||
| 1101 | <td><input type="text" size="50" id="ldap_object_class" name="ldap_object_class" class="text ui-widget-content" title="Person" value="', |
||
| 1102 | isset($SETTINGS['ldap_object_class']) ? $SETTINGS['ldap_object_class'] : 'posixAccount', '" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
||
| 1103 | </tr>'; |
||
| 1104 | echo ' |
||
| 1105 | <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none', '" class="tr-posix-search tr-ldap"> |
||
| 1106 | <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> |
||
| 1107 | <td><input type="text" size="50" id="ldap_user_attribute" name="ldap_user_attribute" class="text ui-widget-content" title="uid" value="', |
||
| 1108 | isset($SETTINGS['ldap_user_attribute']) ? $SETTINGS['ldap_user_attribute'] : 'uid', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
||
| 1109 | </tr>'; |
||
| 1110 | // LDAP |
||
| 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_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> |
||
| 1114 | <td><input type="text" size="50" id="ldap_usergroup" name="ldap_usergroup" class="text ui-widget-content" title="uid" value="', |
||
| 1115 | isset($SETTINGS['ldap_usergroup']) ? $SETTINGS['ldap_usergroup'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
||
| 1116 | </tr>'; |
||
| 1117 | // LDAP BIND DN for search |
||
| 1118 | echo ' |
||
| 1119 | <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none', '" class="tr-posix-search tr-ldap"> |
||
| 1120 | <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> |
||
| 1121 | <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> |
||
| 1122 | </tr>'; |
||
| 1123 | // LDAP BIND PASSWD for search |
||
| 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_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> |
||
| 1127 | <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> |
||
| 1128 | </tr>'; |
||
| 1129 | // LDAP BASE for search |
||
| 1130 | echo ' |
||
| 1131 | <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none', '" class="tr-posix-search tr-ldap"> |
||
| 1132 | <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> |
||
| 1133 | <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> |
||
| 1134 | </tr>'; |
||
| 1135 | |||
| 1136 | // AD allowed UserGroup |
||
| 1137 | echo ' |
||
| 1138 | <tr style="display:', (isset($ldap_type) && $ldap_type === 'windows') ? '' : 'none', '" class="tr-windows tr-ldap"> |
||
| 1139 | <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> |
||
| 1140 | <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> |
||
| 1141 | </tr>'; |
||
| 1142 | |||
| 1143 | // Domain controler |
||
| 1144 | echo ' |
||
| 1145 | <tr> |
||
| 1146 | <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> |
||
| 1147 | <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> |
||
| 1148 | </tr>'; |
||
| 1149 | |||
| 1150 | // AD Port |
||
| 1151 | echo ' |
||
| 1152 | <tr> |
||
| 1153 | <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> |
||
| 1154 | <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> |
||
| 1155 | </tr>'; |
||
| 1156 | |||
| 1157 | // AD SSL |
||
| 1158 | echo ' |
||
| 1159 | <tr> |
||
| 1160 | <td><label>'.$LANG['settings_ldap_ssl'].'</label></td> |
||
| 1161 | <td> |
||
| 1162 | <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\'));" /> |
||
| 1163 | </td> |
||
| 1164 | </tr>'; |
||
| 1165 | |||
| 1166 | // AD TLS |
||
| 1167 | echo ' |
||
| 1168 | <tr> |
||
| 1169 | <td><label>'.$LANG['settings_ldap_tls'].'</label></td> |
||
| 1170 | <td> |
||
| 1171 | <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\'));" /> |
||
| 1172 | </td> |
||
| 1173 | </tr>'; |
||
| 1174 | |||
| 1175 | // Enable only localy declared users with tips help |
||
| 1176 | echo ' |
||
| 1177 | <tr> |
||
| 1178 | <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> |
||
| 1179 | <td> |
||
| 1180 | <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', '" /> |
||
| 1181 | </td> |
||
| 1182 | </tr>'; |
||
| 1183 | |||
| 1184 | // Enable Forgot password link on login page |
||
| 1185 | echo ' |
||
| 1186 | <tr> |
||
| 1187 | <td><label>'.$LANG['settings_disable_forgot_password_link'].'</label></td> |
||
| 1188 | <td> |
||
| 1189 | <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', '" /> |
||
| 1190 | </td> |
||
| 1191 | </tr>'; |
||
| 1192 | // Enable newly_created_user_is_administrated_by |
||
| 1193 | echo ' |
||
| 1194 | <tr> |
||
| 1195 | <td><label for="ldap_type">'.$LANG['newly_created_user_is_administrated_by'].'</label></td> |
||
| 1196 | <td> |
||
| 1197 | <select id="ldap_new_user_is_administrated_by" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));"> |
||
| 1198 | </select> |
||
| 1199 | </td> |
||
| 1200 | </tr>'; |
||
| 1201 | // Enable newly_created_user_role |
||
| 1202 | echo ' |
||
| 1203 | <tr> |
||
| 1204 | <td><label for="ldap_type">'.$LANG['newly_created_user_role'].'</label></td> |
||
| 1205 | <td> |
||
| 1206 | <select id="ldap_new_user_role" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));"> |
||
| 1207 | </select> |
||
| 1208 | </td> |
||
| 1209 | </tr>'; |
||
| 1210 | echo ' |
||
| 1211 | </table>'; |
||
| 1212 | |||
| 1213 | // Test LDAP configuration |
||
| 1214 | echo ' |
||
| 1215 | <div style="font-weight:bold;font-size:14px;margin:15px 0px 8px 0px;"> |
||
| 1216 | '.$LANG['ldap_test_config'].' |
||
| 1217 | </div> |
||
| 1218 | <table> |
||
| 1219 | <tr> |
||
| 1220 | <td><label>'.htmlentities($LANG['ldap_test_username']).'</label></td> |
||
| 1221 | <td><input type="text" size="50" id="ldap_test_username" class="text ui-widget-content" value="" class="text ui-widget-content" /></td> |
||
| 1222 | </tr> |
||
| 1223 | <tr> |
||
| 1224 | <td><label>'.htmlentities($LANG['ldap_test_username_pwd']).'</label></td> |
||
| 1225 | <td><input type="password" size="50" id="ldap_test_pwd" class="text ui-widget-content" value="" class="text ui-widget-content" /></td> |
||
| 1226 | </tr> |
||
| 1227 | <tr> |
||
| 1228 | <td><label for="ldap_test_no_username">'.htmlentities($LANG['no_username_needed']).'</label></td> |
||
| 1229 | <td><input type="checkbox" size="50" id="ldap_test_no_username" /></td> |
||
| 1230 | </tr> |
||
| 1231 | <tr> |
||
| 1232 | <td colspan="2"> |
||
| 1233 | <div id="ldap_test_msg" class="ui-widget-content ui-state-focus ui-corner-all" style="padding:10px; display:none;"></div> |
||
| 1234 | </td> |
||
| 1235 | </tr> |
||
| 1236 | <tr> |
||
| 1237 | <td><b>'.htmlentities($LANG['admin_action_db_backup_start_tip']).'</b></td> |
||
| 1238 | <td><span class="fa-stack" onclick="LaunchAdminActions(\'admin_ldap_test_configuration\')" style="cursor:pointer;"> |
||
| 1239 | <i class="fa fa-square fa-stack-2x"></i> |
||
| 1240 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
| 1241 | </span></td> |
||
| 1242 | </tr> |
||
| 1243 | </table>'; |
||
| 1244 | |||
| 1245 | echo ' |
||
| 1246 | </div> |
||
| 1247 | </div>'; |
||
| 1248 | // -------------------------------------------------------------------------------- |
||
| 1249 | // -------------------------------------------------------------------------------- |
||
| 1250 | // TAB Né5 |
||
| 1251 | echo ' |
||
| 1252 | <div id="tabs-5"> |
||
| 1253 | <div class="" style="padding: 0 .7em;"> |
||
| 1254 | <i class="fa fa-chevron-circle-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1255 | <b>'.$LANG['admin_one_shot_backup'].'</b> |
||
| 1256 | </div> |
||
| 1257 | <div style="margin:0 0 5px 20px;"> |
||
| 1258 | <table width="100%">'; |
||
| 1259 | // Backup the DB |
||
| 1260 | echo ' |
||
| 1261 | <tr style="margin-bottom:3px"> |
||
| 1262 | <td width="35%"> |
||
| 1263 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1264 | '.$LANG['admin_action_db_backup'].' |
||
| 1265 | <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> |
||
| 1266 | </td> |
||
| 1267 | <td> |
||
| 1268 | <span id="result_admin_action_db_backup_get_key" style="margin-left:10px; text-align:left;"> |
||
| 1269 | '.$LANG['encrypt_key'].'<input type="password" size="20" id="result_admin_action_db_backup_key" /> |
||
| 1270 | <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_key_tip']), ENT_QUOTES).'"></i> |
||
| 1271 | <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;"> |
||
| 1272 | <i class="fa fa-square fa-stack-2x"></i> |
||
| 1273 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
| 1274 | </span> |
||
| 1275 | </span> |
||
| 1276 | <span id="result_admin_action_db_backup" style="margin-left:10px;"></span> |
||
| 1277 | </td> |
||
| 1278 | </tr>'; |
||
| 1279 | // Restore the DB |
||
| 1280 | echo ' |
||
| 1281 | <tr style="margin-bottom:3px"> |
||
| 1282 | <td> |
||
| 1283 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1284 | '.$LANG['admin_action_db_restore'].' |
||
| 1285 | <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> |
||
| 1286 | </td> |
||
| 1287 | <td> |
||
| 1288 | <span id="result_admin_action_db_restore" style="margin-left:10px;"></span> |
||
| 1289 | <div id="upload_container_restoreDB"> |
||
| 1290 | <div id="filelist_restoreDB"></div><br /> |
||
| 1291 | <span id="pickfiles_restoreDB" class="fa-stack tip" title="'.htmlentities($LANG['select'], ENT_QUOTES).'" style="cursor:pointer;"> |
||
| 1292 | <i class="fa fa-square fa-stack-2x"></i> |
||
| 1293 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
| 1294 | </span> |
||
| 1295 | </div> |
||
| 1296 | </td> |
||
| 1297 | </tr>'; |
||
| 1298 | |||
| 1299 | echo ' |
||
| 1300 | </table> |
||
| 1301 | </div>'; |
||
| 1302 | |||
| 1303 | echo ' |
||
| 1304 | <div class="" style="0padding: 0 .7em;"> |
||
| 1305 | <i class="fa fa-chevron-circle-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1306 | <b>'.$LANG['admin_script_backups'].'</b> |
||
| 1307 | <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> |
||
| 1308 | </div> |
||
| 1309 | <div style="margin:0 0 5px 20px;"> |
||
| 1310 | <table width="100%">'; |
||
| 1311 | // Backups script path |
||
| 1312 | echo ' |
||
| 1313 | <tr style="margin-bottom:3px"> |
||
| 1314 | <td width="35%"> |
||
| 1315 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1316 | '.$LANG['admin_script_backup_path'].' |
||
| 1317 | <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> |
||
| 1318 | </td> |
||
| 1319 | <td> |
||
| 1320 | <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\'));" /> |
||
| 1321 | </td> |
||
| 1322 | </tr>'; |
||
| 1323 | // Backups script name |
||
| 1324 | echo ' |
||
| 1325 | <tr style="margin-bottom:3px"> |
||
| 1326 | <td> |
||
| 1327 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1328 | '.$LANG['admin_script_backup_filename'].' |
||
| 1329 | <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> |
||
| 1330 | </td> |
||
| 1331 | <td> |
||
| 1332 | <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\'));" /> |
||
| 1333 | </td> |
||
| 1334 | </tr>'; |
||
| 1335 | // Backup key |
||
| 1336 | View Code Duplication | if (isset($SETTINGS['bck_script_passkey']) === true) { |
|
| 1337 | require_once './sources/main.functions.php'; |
||
| 1338 | $currentKey = cryption( |
||
| 1339 | $SETTINGS['bck_script_passkey'], |
||
| 1340 | "", |
||
| 1341 | "decrypt" |
||
| 1342 | )['string']; |
||
| 1343 | } else { |
||
| 1344 | $currentKey = ""; |
||
| 1345 | } |
||
| 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_secret'].' |
||
| 1351 | <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> |
||
| 1352 | </td> |
||
| 1353 | <td> |
||
| 1354 | <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\'));" /> |
||
| 1355 | |
||
| 1356 | <span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['pw_generate']), ENT_QUOTES).'" onclick="generateAndStoreBackupPass();" style="cursor:pointer;"> |
||
| 1357 | <i class="fa fa-square fa-stack-2x"></i> |
||
| 1358 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
| 1359 | </span> |
||
| 1360 | </td> |
||
| 1361 | </tr>'; |
||
| 1362 | // Backups script encryption |
||
| 1363 | echo ' |
||
| 1364 | <tr style="margin-bottom:3px"> |
||
| 1365 | <td> |
||
| 1366 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1367 | '.$LANG['admin_script_backup_encryption'].' |
||
| 1368 | <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> |
||
| 1369 | </td> |
||
| 1370 | <td> |
||
| 1371 | <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\'));" /> |
||
| 1372 | </td> |
||
| 1373 | </tr>'; |
||
| 1374 | // Decrypt SQL file |
||
| 1375 | echo ' |
||
| 1376 | <tr style="margin-bottom:3px"> |
||
| 1377 | <td> |
||
| 1378 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1379 | '.$LANG['admin_script_backup_decrypt'].' |
||
| 1380 | <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> |
||
| 1381 | </td> |
||
| 1382 | <td> |
||
| 1383 | <input id="bck_script_decrypt_file" name="bck_script_decrypt_file" type="text" size="50px" value="" /> |
||
| 1384 | |
||
| 1385 | <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;"> |
||
| 1386 | <i class="fa fa-square fa-stack-2x"></i> |
||
| 1387 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
| 1388 | </span> |
||
| 1389 | </td> |
||
| 1390 | </tr>'; |
||
| 1391 | |||
| 1392 | echo ' |
||
| 1393 | <tr> |
||
| 1394 | <td></td> |
||
| 1395 | <td> |
||
| 1396 | <div id="result_admin_script_backup" class="ui-state-focus ui-corner-all" style="padding:3px; display:none;"></div> |
||
| 1397 | </td> |
||
| 1398 | </tr>'; |
||
| 1399 | |||
| 1400 | echo ' |
||
| 1401 | </table> |
||
| 1402 | </div> |
||
| 1403 | </div>'; |
||
| 1404 | // -------------------------------------------------------------------------------- |
||
| 1405 | // -------------------------------------------------------------------------------- |
||
| 1406 | // TAB Né6 |
||
| 1407 | echo ' |
||
| 1408 | <div id="tabs-6"> |
||
| 1409 | <div class="" style="padding: 0 .7em;"> |
||
| 1410 | <i class="fa fa-chevron-circle-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1411 | <b>'.$LANG['admin_emails_configuration'].'</b> |
||
| 1412 | </div> |
||
| 1413 | <div style="margin:0 0 5px 20px;"> |
||
| 1414 | <table>'; |
||
| 1415 | // SMTP server |
||
| 1416 | echo ' |
||
| 1417 | <tr style="margin-bottom:3px"> |
||
| 1418 | <td> |
||
| 1419 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1420 | '.$LANG['admin_email_smtp_server'].' |
||
| 1421 | </td> |
||
| 1422 | <td> |
||
| 1423 | <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\'));" /> |
||
| 1424 | </td> |
||
| 1425 | </tr>'; |
||
| 1426 | // SMTP auth |
||
| 1427 | echo ' |
||
| 1428 | <tr style="margin-bottom:3px"> |
||
| 1429 | <td> |
||
| 1430 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1431 | '.$LANG['admin_email_auth'].' |
||
| 1432 | </td> |
||
| 1433 | <td> |
||
| 1434 | <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', '" /> |
||
| 1435 | </td> |
||
| 1436 | </tr>'; |
||
| 1437 | // SMTP auth username |
||
| 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_auth_username'].' |
||
| 1443 | </td> |
||
| 1444 | <td> |
||
| 1445 | <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\'));" /> |
||
| 1446 | </td> |
||
| 1447 | </tr>'; |
||
| 1448 | // SMTP auth pwd |
||
| 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_pwd'].' |
||
| 1454 | </td> |
||
| 1455 | <td> |
||
| 1456 | <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\'));" /> |
||
| 1457 | </td> |
||
| 1458 | </tr>'; |
||
| 1459 | // SMTP server url |
||
| 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_server_url'].' |
||
| 1465 | <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> |
||
| 1466 | </td> |
||
| 1467 | <td> |
||
| 1468 | <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\'));" /> |
||
| 1469 | </td> |
||
| 1470 | </tr>'; |
||
| 1471 | // SMTP port |
||
| 1472 | echo ' |
||
| 1473 | <tr style="margin-bottom:3px"> |
||
| 1474 | <td> |
||
| 1475 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1476 | '.$LANG['admin_email_port'].' |
||
| 1477 | </td> |
||
| 1478 | <td> |
||
| 1479 | <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\'));" /> |
||
| 1480 | </td> |
||
| 1481 | </tr>'; |
||
| 1482 | // SMTP security |
||
| 1483 | echo ' |
||
| 1484 | <tr style="margin-bottom:3px"> |
||
| 1485 | <td> |
||
| 1486 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1487 | '.$LANG['admin_email_security'].' |
||
| 1488 | </td> |
||
| 1489 | <td> |
||
| 1490 | <select id="email_security" name="email_security" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));"> |
||
| 1491 | <option value="none"', !isset($SETTINGS['email_security']) || $SETTINGS['email_security'] == "none" ? ' selected="selected"' : "", '>None</option> |
||
| 1492 | <option value="ssl"', isset($SETTINGS['email_security']) && $SETTINGS['email_security'] == "ssl" ? ' selected="selected"' : "", '>SSL</option> |
||
| 1493 | <option value="tls"', isset($SETTINGS['email_security']) && $SETTINGS['email_security'] == "tls" ? ' selected="selected"' : "", '>TLS</option> |
||
| 1494 | </select> |
||
| 1495 | </td> |
||
| 1496 | </tr>'; |
||
| 1497 | // SMTP from |
||
| 1498 | echo ' |
||
| 1499 | <tr style="margin-bottom:3px"> |
||
| 1500 | <td> |
||
| 1501 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1502 | '.$LANG['admin_email_from'].' |
||
| 1503 | </td> |
||
| 1504 | <td> |
||
| 1505 | <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\'));" /> |
||
| 1506 | </td> |
||
| 1507 | </tr>'; |
||
| 1508 | // SMTP from name |
||
| 1509 | echo ' |
||
| 1510 | <tr style="margin-bottom:3px"> |
||
| 1511 | <td> |
||
| 1512 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1513 | '.$LANG['admin_email_from_name'].' |
||
| 1514 | </td> |
||
| 1515 | <td> |
||
| 1516 | <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\'));" /> |
||
| 1517 | </td> |
||
| 1518 | </tr>'; |
||
| 1519 | |||
| 1520 | echo ' |
||
| 1521 | </table> |
||
| 1522 | </div>'; |
||
| 1523 | |||
| 1524 | echo ' |
||
| 1525 | <div class="" style="0padding: 0 .7em;"> |
||
| 1526 | <i class="fa fa-chevron-circle-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1527 | <b>'.$LANG['admin_emails_configuration_testing'].'</b> |
||
| 1528 | </div> |
||
| 1529 | <div id="email_testing_results" class="ui-state-error ui-corner-all" style="padding:5px;display:none;margin:2px;"></div> |
||
| 1530 | <div style="margin:0 0 5px 20px;"> |
||
| 1531 | <table>'; |
||
| 1532 | // Test email configuration |
||
| 1533 | echo ' |
||
| 1534 | <tr style="margin-bottom:3px"> |
||
| 1535 | <td> |
||
| 1536 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1537 | '.$LANG['admin_email_test_configuration'].' |
||
| 1538 | <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> |
||
| 1539 | </td> |
||
| 1540 | <td> |
||
| 1541 | <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;"> |
||
| 1542 | <i class="fa fa-square fa-stack-2x"></i> |
||
| 1543 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
| 1544 | </span> |
||
| 1545 | </td> |
||
| 1546 | </tr>'; |
||
| 1547 | // Send emails backlog |
||
| 1548 | DB::query("SELECT * FROM ".prefix_table("emails")." WHERE status = %s OR status = %s", 'not_sent', ''); |
||
| 1549 | $nb_emails = DB::count(); |
||
| 1550 | echo ' |
||
| 1551 | <tr style="margin-bottom:3px"> |
||
| 1552 | <td> |
||
| 1553 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1554 | '.str_replace("#nb_emails#", $nb_emails, $LANG['admin_email_send_backlog']).' |
||
| 1555 | <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> |
||
| 1556 | </td> |
||
| 1557 | <td> |
||
| 1558 | <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;"> |
||
| 1559 | <i class="fa fa-square fa-stack-2x"></i> |
||
| 1560 | <i class="fa fa-cogs fa-stack-1x fa-inverse"></i> |
||
| 1561 | </span> |
||
| 1562 | </td> |
||
| 1563 | </tr>'; |
||
| 1564 | |||
| 1565 | echo ' |
||
| 1566 | </table> |
||
| 1567 | </div> |
||
| 1568 | </div>'; |
||
| 1569 | // -------------------------------------------------------------------------------- |
||
| 1570 | // TAB N°7 |
||
| 1571 | echo ' |
||
| 1572 | <div id="tabs-7"> |
||
| 1573 | <table width="100%">'; |
||
| 1574 | // Max file size |
||
| 1575 | echo ' |
||
| 1576 | <tr><td> |
||
| 1577 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1578 | <label>'.$LANG['settings_upload_maxfilesize']. |
||
| 1579 | '<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> |
||
| 1580 | </label> |
||
| 1581 | </td><td> |
||
| 1582 | <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\'));" /> |
||
| 1583 | </td></tr>'; |
||
| 1584 | // Extension for Documents |
||
| 1585 | echo ' |
||
| 1586 | <tr><td> |
||
| 1587 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1588 | <label>'.$LANG['settings_upload_docext']. |
||
| 1589 | '<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> |
||
| 1590 | </label> |
||
| 1591 | </td><td> |
||
| 1592 | <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\'));" /> |
||
| 1593 | </td></tr>'; |
||
| 1594 | // Extension for Images |
||
| 1595 | echo ' |
||
| 1596 | <tr><td> |
||
| 1597 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1598 | <label>'.$LANG['settings_upload_imagesext']. |
||
| 1599 | '<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> |
||
| 1600 | </label> |
||
| 1601 | </td><td> |
||
| 1602 | <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\'));" /> |
||
| 1603 | </td></tr>'; |
||
| 1604 | // Extension for Packages |
||
| 1605 | echo ' |
||
| 1606 | <tr><td> |
||
| 1607 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1608 | <label>'.$LANG['settings_upload_pkgext']. |
||
| 1609 | '<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> |
||
| 1610 | </label> |
||
| 1611 | </td><td> |
||
| 1612 | <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\'));" /> |
||
| 1613 | </td></tr>'; |
||
| 1614 | // Extension for Other |
||
| 1615 | echo ' |
||
| 1616 | <tr><td> |
||
| 1617 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1618 | <label>'.$LANG['settings_upload_otherext']. |
||
| 1619 | '<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> |
||
| 1620 | </label> |
||
| 1621 | </td><td> |
||
| 1622 | <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\'));" /> |
||
| 1623 | </td></tr>'; |
||
| 1624 | echo '<tr><td colspan="3"><hr /></td></tr>'; |
||
| 1625 | // Image resize width / height / quality |
||
| 1626 | echo ' |
||
| 1627 | <tr style="margin-bottom:3px"> |
||
| 1628 | <td> |
||
| 1629 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1630 | <label>' . |
||
| 1631 | $LANG['settings_upload_imageresize_options'].' |
||
| 1632 | <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_upload_imageresize_options_tip']), ENT_QUOTES).'"></i> |
||
| 1633 | </label> |
||
| 1634 | </td> |
||
| 1635 | <td> |
||
| 1636 | <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', '" /> |
||
| 1637 | </td> |
||
| 1638 | </tr> |
||
| 1639 | <tr><td> |
||
| 1640 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1641 | <label>'.$LANG['settings_upload_imageresize_options_w']. |
||
| 1642 | '</label> |
||
| 1643 | </td><td> |
||
| 1644 | <input type="text" size="5" id="upload_imageresize_width" name="upload_imageresize_width" value="', |
||
| 1645 | isset($SETTINGS['upload_imageresize_width']) ? $SETTINGS['upload_imageresize_width'] : '800', '" class="text ui-widget-content upl_img_opt" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
| 1646 | </td> |
||
| 1647 | </tr> |
||
| 1648 | <tr><td> |
||
| 1649 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1650 | <label>'.$LANG['settings_upload_imageresize_options_h']. |
||
| 1651 | '</label> |
||
| 1652 | </td><td> |
||
| 1653 | <input type="text" size="5" id="upload_imageresize_height" name="upload_imageresize_height" value="', |
||
| 1654 | isset($SETTINGS['upload_imageresize_height']) ? $SETTINGS['upload_imageresize_height'] : '600', '" class="text ui-widget-content upl_img_opt" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
| 1655 | </td> |
||
| 1656 | </tr> |
||
| 1657 | <tr><td> |
||
| 1658 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
||
| 1659 | <label>'.$LANG['settings_upload_imageresize_options_q']. |
||
| 1660 | '</label> |
||
| 1661 | </td><td> |
||
| 1662 | <input type="text" size="5" id="upload_imageresize_quality" name="upload_imageresize_quality" value="', |
||
| 1663 | isset($SETTINGS['upload_imageresize_quality']) ? $SETTINGS['upload_imageresize_quality'] : '90', '" class="text ui-widget-content upl_img_opt" onchange="updateSetting($(this).attr(\'id\'));" /> |
||
| 1664 | </td></tr>'; |
||
| 1665 | echo ' |
||
| 1666 | <tr><td colspan="3"><hr /></td></tr>'; |
||
| 1667 | echo ' |
||
| 1668 | </table> |
||
| 1669 | </div>'; |
||
| 1670 | // -------------------------------------------------------------------------------- |
||
| 1671 | |||
| 1672 | echo ' |
||
| 1673 | </div>'; |
||
| 1674 | |||
| 1675 | echo ' |
||
| 1676 | </form> |
||
| 1677 | </div>'; |
||
| 1678 | |||
| 1679 | echo ' |
||
| 1680 | <input id="restore_bck_fileObj" name="restore_bck_fileObj" type="hidden" value="" /> |
||
| 1681 | <div id="restore_bck_encryption_key_dialog" style="display:none; text-align:center;"> |
||
| 1682 | <input id="restore_bck_encryption_key" name="restore_bck_encryption_key" type="text" value="" /> |
||
| 1683 | <br> |
||
| 1684 | <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> |
||
| 1685 | </div>'; |
||
| 1686 | include "admin.settings.load.php"; |
||
| 1687 |
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.