forked from nilsteampassnet/TeamPass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin.settings.php
1565 lines (1517 loc) · 109 KB
/
admin.settings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
/**
*
* @file admin.settings.php
* @author Nils Laumaillé
* @version 2.1.26
* @copyright (c) 2009-2016 Nils Laumaillé
* @licensing GNU AFFERO GPL 3.0
* @link http://www.teampass.net
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
if (
!isset($_SESSION['CPM']) || $_SESSION['CPM'] != 1 ||
!isset($_SESSION['user_id']) || empty($_SESSION['user_id']) ||
!isset($_SESSION['key']) || empty($_SESSION['key']))
{
die('Hacking attempt...');
}
/* do checks */
require_once $_SESSION['settings']['cpassman_dir'].'/sources/checks.php';
if (!checkUser($_SESSION['user_id'], $_SESSION['key'], curPage())) {
$_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page
include $_SESSION['settings']['cpassman_dir'].'/error.php';
exit();
}
echo '
<input type="hidden" id="user_token" value="" />
<div style="margin-top:10px;">
<form name="form_settings" method="post" action="">';
// Main div for TABS
echo '
<div style="width:900px;margin:auto; line-height:20px; padding:10px;" id="tabs">';
// Tabs menu
echo '
<ul>
<li><a href="#tabs-1">'.$LANG['admin_settings_title'].'</a></li>
<li><a href="#tabs-3">'.$LANG['admin_misc_title'].'</a></li>
<li><a href="#tabs-7">'.$LANG['admin_upload_title'].'</a></li>
<li><a href="#tabs-2">'.$LANG['admin_actions_title'].'</a></li>
<li><a href="#tabs-4">'.$LANG['admin_ldap_menu'].'</a></li>
<li><a href="#tabs-5">'.$LANG['admin_backups'].'</a></li>
<li><a href="#tabs-6">'.$LANG['admin_emails'].'</a></li>
<li><a href="admin.settings_categories.php">'.$LANG['categories'].'</a></li>
<li><a href="admin.settings_api.php">'.$LANG['admin_api'].'</a></li>
<li><a href="admin.settings_duo.php">2FA Options</a></li>
</ul>';
// --------------------------------------------------------------------------------
// TAB Né1
echo '
<div id="tabs-1">
<table border="0">';
// cpassman_dir
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="cpassman_dir">'.$LANG['admin_misc_cpassman_dir'].'</label>
</td>
<td>
<input type="text" size="80" id="cpassman_dir" name="cpassman_dir" value="', isset($_SESSION['settings']['cpassman_dir']) ? $_SESSION['settings']['cpassman_dir'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td>
</tr>';
// cpassman_url
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="cpassman_url">'.$LANG['admin_misc_cpassman_url'].'</label>
</td>
<td>
<input type="text" size="80" id="cpassman_url" name="cpassman_url" value="', isset($_SESSION['settings']['cpassman_url']) ? $_SESSION['settings']['cpassman_url'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td>
</tr>';
// path_to_upload_folder
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="path_to_upload_folder">'.$LANG['admin_path_to_upload_folder'].'</label>
<i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_path_to_upload_folder_tip']), ENT_QUOTES).'"></i>
</td>
<td>
<input type="text" size="80" id="path_to_upload_folder" name="path_to_upload_folder" value="', isset($_SESSION['settings']['path_to_upload_folder']) ? $_SESSION['settings']['path_to_upload_folder'] : $_SESSION['settings']['cpassman_dir'].'/upload', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td>
</tr>';
// url_to_upload_folder
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="url_to_upload_folder">'.$LANG['admin_url_to_upload_folder'].'</label>
</td>
<td>
<input type="text" size="80" id="url_to_upload_folder" name="url_to_upload_folder" value="', isset($_SESSION['settings']['url_to_upload_folder']) ? $_SESSION['settings']['url_to_upload_folder'] : $_SESSION['settings']['cpassman_url'].'/upload', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td>
</tr>';
// path_to_files_folder
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="path_to_files_folder">'.$LANG['admin_path_to_files_folder'].'</label>
<i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_path_to_files_folder_tip']), ENT_QUOTES).'"></i>
</td>
<td>
<input type="text" size="80" id="path_to_files_folder" name="path_to_files_folder" value="', isset($_SESSION['settings']['path_to_files_folder']) ? $_SESSION['settings']['path_to_files_folder'] : $_SESSION['settings']['cpassman_dir'].'/files', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td>
</tr>';
// url_to_files_folder
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="url_to_files_folder">'.$LANG['admin_url_to_files_folder'].'</label>
</td>
<td>
<input type="text" size="80" id="url_to_files_folder" name="url_to_files_folder" value="', isset($_SESSION['settings']['url_to_files_folder']) ? $_SESSION['settings']['url_to_files_folder'] : $_SESSION['settings']['cpassman_url'].'/files', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td>
</tr>';
// Favicon
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="favicon">'.$LANG['admin_misc_favicon'].'</label>
</td>
<td>
<input type="text" size="80" id="favicon" name="favicon" value="', isset($_SESSION['settings']['favicon']) ? $_SESSION['settings']['favicon'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td>
</tr>';
// custom_logo
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="cpassman_dir">'.$LANG['admin_misc_custom_logo'].'</label>
</td>
<td>
<input type="text" size="80" id="custom_logo" name="custom_logo" value="', isset($_SESSION['settings']['custom_logo']) ? $_SESSION['settings']['custom_logo'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td>
</tr>';
// custom_login_text
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="cpassman_dir">'.$LANG['admin_misc_custom_login_text'].'</label>
</td>
<td>
<input type="text" size="80" id="custom_login_text" name="custom_login_text" value="', isset($_SESSION['settings']['custom_login_text']) ? $_SESSION['settings']['custom_login_text'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td>
</tr>';
echo '
</table>';
echo '
<table>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// Maintenance mode
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>' .
$LANG['settings_maintenance_mode'].'
<i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_maintenance_mode_tip']), ENT_QUOTES).'"></i>
</label>
</td>
<td>
<div class="toggle toggle-modern" id="maintenance_mode" data-toggle-on="', isset($_SESSION['settings']['maintenance_mode']) && $_SESSION['settings']['maintenance_mode'] == 1 ? 'true' : 'false', '"></div><input type="hidden" name="maintenance_mode_input" id="maintenance_mode_input" value="', isset($_SESSION['settings']['maintenance_mode']) && $_SESSION['settings']['maintenance_mode'] == 1 ? '1' : '0', '" />
</td>
</tr>';
// default_session_expiration_time
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['settings_default_session_expiration_time'].'</label>
</td>
<td>
<input type="text" size="15" id="default_session_expiration_time" name="default_session_expiration_time" value="', isset($_SESSION['settings']['default_session_expiration_time']) ? $_SESSION['settings']['default_session_expiration_time'] : "60", '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td>
</tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
//Enable SSL STS
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>' .
$LANG['settings_enable_sts'] . '
<i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_enable_sts_tip']), ENT_QUOTES).'"></i>
</label>
</td>
<td>
<div class="toggle toggle-modern" id="enable_sts" data-toggle-on="', isset($_SESSION['settings']['enable_sts']) && $_SESSION['settings']['enable_sts'] == 1 ? 'true' : 'false', '"></div><input type="hidden" name="enable_sts_input" id="enable_sts_input" value="', isset($_SESSION['settings']['enable_sts']) && $_SESSION['settings']['enable_sts'] == 1 ? '1' : '0', '" />
</td>
</tr>';
//Enable data exchange encryption
/*
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>' .
$LANG['settings_encryptClientServer'] . '
<i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_encryptClientServer_tip']), ENT_QUOTES).'"></i>
</label>
</td>
<td>
<div class="toggle toggle-modern" id="encryptClientServer" data-toggle-on="', isset($_SESSION['settings']['encryptClientServer']) && $_SESSION['settings']['encryptClientServer'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="encryptClientServer_input" name="encryptClientServer_input" value="', isset($_SESSION['settings']['encryptClientServer']) && $_SESSION['settings']['encryptClientServer'] == 1 ? '1' : '0', '" />
</td>
</tr>';
*/
echo '<tr><td colspan="3"><hr /></td></tr>';
//Proxy
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="proxy_ip">'.$LANG['admin_proxy_ip'].'</label>
<i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_proxy_ip_tip']), ENT_QUOTES).'"></i>
</td>
<td>
<input type="text" size="15" id="proxy_ip" name="proxy_ip" value="', isset($_SESSION['settings']['proxy_ip']) ? $_SESSION['settings']['proxy_ip'] : "", '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td>
</tr>
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="proxy_port">'.$LANG['admin_proxy_port'].'</label>
<i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_proxy_port_tip']), ENT_QUOTES).'"></i>
</td>
<td>
<input type="text" size="10" id="proxy_port" name="proxy_port" value="', isset($_SESSION['settings']['proxy_port']) ? $_SESSION['settings']['proxy_port'] : "", '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td>
</tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// pwd_maximum_length
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="pwd_maximum_length">'.$LANG['admin_pwd_maximum_length'].'</label>
<i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_pwd_maximum_length_tip']), ENT_QUOTES).'"></i>
</td>
<td>
<input type="text" size="10" id="pwd_maximum_length" name="pwd_maximum_length" value="', isset($_SESSION['settings']['pwd_maximum_length']) ? $_SESSION['settings']['pwd_maximum_length'] : 40, '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td>
</tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// TIMEZONE
// get list of all timezones
$zones = timezone_identifiers_list();
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="timezone">'.$LANG['timezone_selection'].'</label>
</td>
<td>
<select id="timezone" name="timezone" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));">
<option value="">-- '.$LANG['select'].' --</option>';
foreach ($zones as $zone) {
echo '
<option value="'.$zone.'"', isset($_SESSION['settings']['timezone']) && $_SESSION['settings']['timezone'] == $zone ? ' selected="selected"' : '', '>'.$zone.'</option>';
}
echo '
</select>
</td>
</tr>';
// DATE format
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="date_format">'.$LANG['date_format'].'</label>
</td>
<td>
<select id="date_format" name="date_format" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));">
<option value="d/m/Y"', !isset($_SESSION['settings']['date_format']) || $_SESSION['settings']['date_format'] == "d/m/Y" ? ' selected="selected"':"", '>d/m/Y</option>
<option value="m/d/Y"', $_SESSION['settings']['date_format'] == "m/d/Y" ? ' selected="selected"':"", '>m/d/Y</option>
<option value="d-M-Y"', $_SESSION['settings']['date_format'] == "d-M-Y" ? ' selected="selected"':"", '>d-M-Y</option>
<option value="d/m/y"', $_SESSION['settings']['date_format'] == "d/m/y" ? ' selected="selected"':"", '>d/m/y</option>
<option value="m/d/y"', $_SESSION['settings']['date_format'] == "m/d/y" ? ' selected="selected"':"", '>m/d/y</option>
<option value="d-M-y"', $_SESSION['settings']['date_format'] == "d-M-y" ? ' selected="selected"':"", '>d-M-y</option>
<option value="d-m-y"', $_SESSION['settings']['date_format'] == "d-m-y" ? ' selected="selected"':"", '>d-m-y</option>
<option value="Y-m-d"', $_SESSION['settings']['date_format'] == "Y-m-d" ? ' selected="selected"':"", '>Y-m-d</option>
</select>
</td>
</tr>';
// TIME format
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="time_format">'.$LANG['time_format'].'</label>
</td>
<td>
<select id="time_format" name="time_format" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));">
<option value="H:i:s"', !isset($_SESSION['settings']['time_format']) || $_SESSION['settings']['time_format'] == "H:i:s" ? ' selected="selected"':"", '>H:i:s</option>
<option value="h:m:s a"', $_SESSION['settings']['time_format'] == "h:i:s a" ? ' selected="selected"':"", '>h:i:s a</option>
<option value="g:i:s a"', $_SESSION['settings']['time_format'] == "g:i:s a" ? ' selected="selected"':"", '>g:i:s a</option>
<option value="G:i:s"', $_SESSION['settings']['time_format'] == "G:i:s" ? ' selected="selected"':"", '>G:i:s</option>
</select>
</td>
</tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// LANGUAGES
$zones = timezone_identifiers_list();
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="default_language">'.$LANG['settings_default_language'].'</label>
</td>
<td>
<select id="default_language" name="default_language" class="text ui-widget-content">
<option value="">-- '.$LANG['select'].' --</option>';
foreach ($languagesList as $lang) {
echo '
<option value="'.$lang.'"', isset($_SESSION['settings']['default_language']) && $_SESSION['settings']['default_language'] == $lang ? ' selected="selected"' : '', '>'.$lang.'</option>';
}
echo '
</select>
</td>
</tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// Number of used pw
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="number_of_used_pw">'.$LANG['number_of_used_pw'].'</label>
</td>
<td>
<input type="text" size="10" id="number_of_used_pw" name="number_of_used_pw" value="', isset($_SESSION['settings']['number_of_used_pw']) ? $_SESSION['settings']['number_of_used_pw'] : '5', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td>
</tr>';
// Number days before changing pw
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="pw_life_duration">'.$LANG['pw_life_duration'].'</label>
</td>
<td>
<input type="text" size="10" id="pw_life_duration" name="pw_life_duration" value="', isset($_SESSION['settings']['pw_life_duration']) ? $_SESSION['settings']['pw_life_duration'] : '5', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td>
</tr>';
// Number of bad authentication tentations before disabling user
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="nb_bad_authentication">'.$LANG['nb_false_login_attempts'].'</label>
</td>
<td>
<input type="text" size="10" id="nb_bad_authentication" name="nb_bad_authentication" value="', isset($_SESSION['settings']['nb_bad_authentication']) ? $_SESSION['settings']['nb_bad_authentication'] : '0', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td>
</tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// Enable log connections
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['settings_log_connections'].'</label>
</td>
<td>
<div class="toggle toggle-modern" id="log_connections" data-toggle-on="', isset($_SESSION['settings']['log_connections']) && $_SESSION['settings']['log_connections'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="log_connections_input" name="log_connections_input" value="', isset($_SESSION['settings']['log_connections']) && $_SESSION['settings']['log_connections'] == 1 ? '1' : '0', '" />
</td>
</tr>';
// Enable log accessed
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['settings_log_accessed'].'</label>
</td><td>
<div class="toggle toggle-modern" id="log_accessed" data-toggle-on="', isset($_SESSION['settings']['log_accessed']) && $_SESSION['settings']['log_accessed'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="log_accessed_input" name="log_accessed_input" value="', isset($_SESSION['settings']['log_accessed']) && $_SESSION['settings']['log_accessed'] == 1 ? '1' : '0', '" />
</td>
</tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// enable PF
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['enable_personal_folder_feature'].'</label>
<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>
</td><td>
<div class="toggle toggle-modern" id="enable_pf_feature" data-toggle-on="', isset($_SESSION['settings']['enable_pf_feature']) && $_SESSION['settings']['enable_pf_feature'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="enable_pf_feature_input" name="enable_pf_feature_input" value="', isset($_SESSION['settings']['enable_pf_feature']) && $_SESSION['settings']['enable_pf_feature'] == 1 ? '1' : '0', '" />
</td></tr>';
// enable Use MD5 passowrd as Personal SALTKEY
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['use_md5_password_as_salt'].'</label>
</td><td>
<div class="toggle toggle-modern" id="use_md5_password_as_salt" data-toggle-on="', isset($_SESSION['settings']['use_md5_password_as_salt']) && $_SESSION['settings']['use_md5_password_as_salt'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="use_md5_password_as_salt_input" name="use_md5_password_as_salt_input" value="', isset($_SESSION['settings']['use_md5_password_as_salt']) && $_SESSION['settings']['use_md5_password_as_salt'] == 1 ? '1' : '0', '" />
</td></tr>';
// enable PF cookie for Personal SALTKEY
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['enable_personal_saltkey_cookie'].'</label>
</td><td>
<div class="toggle toggle-modern" id="enable_personal_saltkey_cookie" data-toggle-on="', isset($_SESSION['settings']['enable_personal_saltkey_cookie']) && $_SESSION['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($_SESSION['settings']['enable_personal_saltkey_cookie']) && $_SESSION['settings']['enable_personal_saltkey_cookie'] == 1 ? '1' : '0', '" />
</td></tr>';
// PF cookie for Personal SALTKEY duration
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['personal_saltkey_cookie_duration'].'</label>
</td><td>
<div class="div_radio">
<input type="text" size="10" id="personal_saltkey_cookie_duration" name="personal_saltkey_cookie_duration" value="', isset($_SESSION['settings']['personal_saltkey_cookie_duration']) ? $_SESSION['settings']['personal_saltkey_cookie_duration'] : '31', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</div>
</td></tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// Attachments encryption strategy
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>
'.$LANG['settings_attachments_encryption'].'
<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>
</label>
</td><td>
<div class="toggle toggle-modern" id="enable_attachment_encryption" data-toggle-on="', isset($_SESSION['settings']['enable_attachment_encryption']) && $_SESSION['settings']['enable_attachment_encryption'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="enable_attachment_encryption_input" name="enable_attachment_encryption_input" value="', isset($_SESSION['settings']['enable_attachment_encryption']) && $_SESSION['settings']['enable_attachment_encryption'] == 1 ? '1' : '0', '" />
</td></tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// Enable KB
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>
'.$LANG['settings_kb'].'
<span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_kb_tip']), ENT_QUOTES).'"></i></span>
</label>
</td><td>
<div class="toggle toggle-modern" id="enable_kb" data-toggle-on="', isset($_SESSION['settings']['enable_kb']) && $_SESSION['settings']['enable_kb'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="enable_kb_input" name="enable_kb_input" value="', isset($_SESSION['settings']['enable_kb']) && $_SESSION['settings']['enable_kb'] == 1 ? '1' : '0', '" />
</td></tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// Enable SUGGESTION
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>
'.$LANG['settings_suggestion'].'
<span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_suggestion_tip']), ENT_QUOTES).'"></i></span>
</label>
</td><td>
<div class="toggle toggle-modern" id="enable_suggestion" data-toggle-on="', isset($_SESSION['settings']['enable_suggestion']) && $_SESSION['settings']['enable_suggestion'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="enable_suggestion_input" name="enable_suggestion_input" value="', isset($_SESSION['settings']['enable_suggestion']) && $_SESSION['settings']['enable_suggestion'] == 1 ? '1' : '0', '" />
</td></tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// Enable send_stats
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>' .
$LANG['settings_send_stats'].'
<i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_send_stats_tip']), ENT_QUOTES).'"></i>
</label>
</td>
<td>
<div class="toggle toggle-modern" id="send_stats" data-toggle-on="', isset($_SESSION['settings']['send_stats']) && $_SESSION['settings']['send_stats'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="send_stats_input" name="send_stats_input" value="', isset($_SESSION['settings']['send_stats']) && $_SESSION['settings']['send_stats'] == 1 ? '1' : '0', '" />
</td>
</tr>';
// Enable GET TP Information
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>
'.$LANG['settings_get_tp_info'].'
<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>
</label>
</td><td>
<div class="toggle toggle-modern" id="get_tp_info" data-toggle-on="', isset($_SESSION['settings']['get_tp_info']) && $_SESSION['settings']['get_tp_info'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="get_tp_info_input" name="get_tp_info_input" value="', isset($_SESSION['settings']['get_tp_info']) && $_SESSION['settings']['get_tp_info'] == 1 ? '1' : '0', '" />
</td></tr>';
echo '
<tr><td colspan="3"><hr /></td></tr>
</table>
</div>';
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// TAB Né2
echo '
<div id="tabs-2">';
// Rebuild Config file
echo '
<div style="margin-bottom:3px">
<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;">
<i class="fa fa-square fa-stack-2x"></i>
<i class="fa fa-cogs fa-stack-1x fa-inverse"></i>
</span>
<label>'.$LANG['rebuild_config_file'].'</label>
<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>
<span id="result_admin_rebuild_config_file" style="margin-left:10px;display:none;"></span>
</div>';
// Update Personal folders for users
echo '
<div style="margin-bottom:3px">
<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;">
<i class="fa fa-square fa-stack-2x"></i>
<i class="fa fa-cogs fa-stack-1x fa-inverse"></i>
</span>
<label>'.$LANG['admin_action_check_pf'].'</label>
<span id="result_admin_action_check_pf" style="margin-left:10px;display:none;"></span>
</div>';
// Clean DB with orphan items
echo '
<div style="margin-bottom:3px">
<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;">
<i class="fa fa-square fa-stack-2x"></i>
<i class="fa fa-cogs fa-stack-1x fa-inverse"></i>
</span>
<label>'.$LANG['admin_action_db_clean_items'].'</label>
<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>
<span id="result_admin_action_db_clean_items" style="margin-left:10px;"></span>
</div>';
// Optimize the DB
echo '
<div style="margin-bottom:3px">
<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;">
<i class="fa fa-square fa-stack-2x"></i>
<i class="fa fa-cogs fa-stack-1x fa-inverse"></i>
</span>
<label>'.$LANG['admin_action_db_optimize'].'</label>
<span id="result_admin_action_db_optimize" style="margin-left:10px;"></span>
</div>';
// Purge old files
echo '
<div style="margin-bottom:3px">
<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;">
<i class="fa fa-square fa-stack-2x"></i>
<i class="fa fa-cogs fa-stack-1x fa-inverse"></i>
</span>
<label>'.$LANG['admin_action_purge_old_files'].'</label>
<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>
<span id="result_admin_action_purge_old_files" style="margin-left:10px;"></span>
</div>';
// Reload Cache Table
echo '
<div style="margin-bottom:3px">
<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;">
<i class="fa fa-square fa-stack-2x"></i>
<i class="fa fa-cogs fa-stack-1x fa-inverse"></i>
</span>
<label>'.$LANG['admin_action_reload_cache_table'].'</label>
<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>
<span id="result_admin_action_reload_cache_table" style="margin-left:10px;"></span>
</div>';
// Change main SALT key
echo '
<div style="margin-bottom:3px">
<span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_start_tip']), ENT_QUOTES).'" onclick="LaunchAdminActions(\'div_change_salt_key\')" style="cursor:pointer;">
<i class="fa fa-square fa-stack-2x"></i>
<i class="fa fa-cogs fa-stack-1x fa-inverse"></i>
</span>
<label>'.$LANG['admin_action_change_salt_key'].'</label>
<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>
<span id="div_change_salt_key" style="margin-left:10px;display:none;">
<input type="text" id="new_salt_key" size="50" value="'.SALT.'" /><span id="change_salt_key_image"></span>
<span class="fa fa-asterisk" style="cursor:pointer;display:none;" onclick="changeMainSaltKey(\'starting\')" id="change_salt_key_but"></span>
<span id="changeMainSaltKey_message"></span>
</span>
<input type="hidden" id="changeMainSaltKey_itemsCount" />
</div>';
// Correct passwords prefix
echo '
<div style="margin-bottom:3px">
<span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_start_tip']), ENT_QUOTES).'" onclick="LaunchAdminActions(\'admin_action_pw_prefix_correct\')" style="cursor:pointer;">
<i class="fa fa-square fa-stack-2x"></i>
<i class="fa fa-cogs fa-stack-1x fa-inverse"></i>
</span>
<label>'.$LANG['admin_action_pw_prefix_correct'].'</label>
<span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['admin_action_pw_prefix_correct_tip']), ENT_QUOTES).'"></i></span>
<span id="result_admin_action_pw_prefix_correct" style="margin-left:10px;"></span>
</div>';
// Encrypt / decrypt attachments
echo '
<div style="margin-bottom:3px">
<span class="fa-stack tip" title="'.htmlentities(strip_tags($LANG['admin_action_db_backup_start_tip']), ENT_QUOTES).'" onclick="LaunchAdminActions(\'admin_action_attachments_cryption\')" style="cursor:pointer;">
<i class="fa fa-square fa-stack-2x"></i>
<i class="fa fa-cogs fa-stack-1x fa-inverse"></i>
</span>
<div class="div_radio" style="float:left;">
<input type="radio" id="attachments_cryption_radio1" name="attachments_cryption" value="encrypt" /><label for="attachments_cryption_radio1">'.$LANG['encrypt'].'</label>
<input type="radio" id="attachments_cryption_radio2" name="attachments_cryption" value="decrypt" /><label for="attachments_cryption_radio2">'.$LANG['decrypt'].'</label>
</div>
'.$LANG['admin_action_attachments_cryption'].'
<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>
<span id="result_admin_action_attachments_cryption" style="margin-left:10px;"></span>
</div>';
echo '
</div>';
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// TAB N°3
echo '
<div id="tabs-3">
<table width="100%">';
// After how long, edition is considered as failed or finished
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['settings_delay_for_item_edition'].
'<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>
</label>
</td><td>
<input type="text" size="5" id="delay_item_edition" name="delay_item_edition" value="', isset($_SESSION['settings']['delay_item_edition']) ? $_SESSION['settings']['delay_item_edition'] : '0', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td></tr>';
// Expired time for OTV - otv_expiration_period
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['settings_otv_expiration_period'].'</label>
</td><td>
<input type="text" size="5" id="otv_expiration_period" name="otv_expiration_period" value="', isset($_SESSION['settings']['otv_expiration_period']) ? $_SESSION['settings']['otv_expiration_period'] : '7', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td></tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// Managers can edit & delete items they are allowed to see
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['settings_manager_edit'].'</label>
</td><td>
<div class="toggle toggle-modern" id="manager_edit" data-toggle-on="', isset($_SESSION['settings']['manager_edit']) && $_SESSION['settings']['manager_edit'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="manager_edit_input" name="manager_edit_input" value="', isset($_SESSION['settings']['manager_edit']) && $_SESSION['settings']['manager_edit'] == 1 ? '1' : '0', '" />
</td></tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// max items
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="max_last_items">'.$LANG['max_last_items'].'</label>
</td><td>
<input type="text" size="4" id="max_last_items" name="max_last_items" value="', isset($_SESSION['settings']['max_latest_items']) ? $_SESSION['settings']['max_latest_items'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td></tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// Duplicate folder
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['duplicate_folder'].'</label>
</td><td>
<div class="toggle toggle-modern" id="duplicate_folder" data-toggle-on="', isset($_SESSION['settings']['duplicate_folder']) && $_SESSION['settings']['duplicate_folder'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="duplicate_folder_input" name="duplicate_folder_input" value="', isset($_SESSION['settings']['duplicate_folder']) && $_SESSION['settings']['duplicate_folder'] == 1 ? '1' : '0', '" />
</td></tr>';
// Duplicate item name
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['duplicate_item'].'</label>
</td><td>
<div class="toggle toggle-modern" id="duplicate_item" data-toggle-on="', isset($_SESSION['settings']['duplicate_item']) && $_SESSION['settings']['duplicate_item'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="duplicate_item_input" name="duplicate_item_input" value="', isset($_SESSION['settings']['duplicate_item']) && $_SESSION['settings']['duplicate_item'] == 1 ? '1' : '0', '" />
</td></tr>';
// Duplicate item name in same folder - item_duplicate_in_same_folder
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['duplicate_item_in_folder'].'</label>
</td><td>
<div class="toggle toggle-modern" id="item_duplicate_in_same_folder" data-toggle-on="', isset($_SESSION['settings']['item_duplicate_in_same_folder']) && $_SESSION['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($_SESSION['settings']['item_duplicate_in_same_folder']) && $_SESSION['settings']['item_duplicate_in_same_folder'] == 1 ? '1' : '0', '" />
</td></tr>';
// Enable show_only_accessible_folders
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>
'.$LANG['show_only_accessible_folders'].'
<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>
</label>
</td><td>
<div class="toggle toggle-modern" id="show_only_accessible_folders" data-toggle-on="', isset($_SESSION['settings']['show_only_accessible_folders']) && $_SESSION['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($_SESSION['settings']['show_only_accessible_folders']) && $_SESSION['settings']['show_only_accessible_folders'] == 1 ? '1' : '0', '" />
</td></tr>';
// Enable subfolder_rights_as_parent
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>
'.$LANG['subfolder_rights_as_parent'].'
<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>
</label>
</td><td>
<div class="toggle toggle-modern" id="subfolder_rights_as_parent" data-toggle-on="', isset($_SESSION['settings']['subfolder_rights_as_parent']) && $_SESSION['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($_SESSION['settings']['subfolder_rights_as_parent']) && $_SESSION['settings']['subfolder_rights_as_parent'] == 1 ? '1' : '0', '" />
</td></tr>';
// Enable extra fields for each Item
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>
'.$LANG['settings_item_extra_fields'].'
<span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_item_extra_fields_tip']), ENT_QUOTES).'"></i></span>
</label>
</td><td>
<div class="toggle toggle-modern" id="item_extra_fields" data-toggle-on="', isset($_SESSION['settings']['item_extra_fields']) && $_SESSION['settings']['item_extra_fields'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="item_extra_fields_input" name="item_extra_fields_input" value="', isset($_SESSION['settings']['item_extra_fields']) && $_SESSION['settings']['item_extra_fields'] == 1 ? '1' : '0', '" />
</td></tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// enable FAVOURITES
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['enable_favourites'].'</label>
</td><td>
<div class="toggle toggle-modern" id="enable_favourites" data-toggle-on="', isset($_SESSION['settings']['enable_favourites']) && $_SESSION['settings']['enable_favourites'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="enable_favourites_input" name="enable_favourites_input" value="', isset($_SESSION['settings']['enable_favourites']) && $_SESSION['settings']['enable_favourites'] == 1 ? '1' : '0', '" />
</td></tr>';
// enable USER can create folders
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['enable_user_can_create_folders'].'</label>
</td><td>
<div class="toggle toggle-modern" id="enable_user_can_create_folders" data-toggle-on="', isset($_SESSION['settings']['enable_user_can_create_folders']) && $_SESSION['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($_SESSION['settings']['enable_user_can_create_folders']) && $_SESSION['settings']['enable_user_can_create_folders'] == 1 ? '1' : '0', '" />
</td></tr>';
// enable can_create_root_folder
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['setting_can_create_root_folder'].'</label>
</td><td>
<div class="toggle toggle-modern" id="can_create_root_folder" data-toggle-on="', isset($_SESSION['settings']['can_create_root_folder']) && $_SESSION['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($_SESSION['settings']['can_create_root_folder']) && $_SESSION['settings']['can_create_root_folder'] == 1 ? '1' : '0', '" />
</td></tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// Enable activate_expiration
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>
'.$LANG['admin_setting_activate_expiration'].'
<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>
</label>
</td><td>
<div class="toggle toggle-modern" id="activate_expiration" data-toggle-on="', isset($_SESSION['settings']['activate_expiration']) && $_SESSION['settings']['activate_expiration'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="activate_expiration_input" name="activate_expiration_input" value="', isset($_SESSION['settings']['activate_expiration']) && $_SESSION['settings']['activate_expiration'] == 1 ? '1' : '0', '" />
</td></tr>';
// Enable enable_delete_after_consultation
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>
'.$LANG['admin_setting_enable_delete_after_consultation'].'
<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>
</label>
</td><td>
<div class="toggle toggle-modern" id="enable_delete_after_consultation" data-toggle-on="', isset($_SESSION['settings']['enable_delete_after_consultation']) && $_SESSION['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($_SESSION['settings']['enable_delete_after_consultation']) && $_SESSION['settings']['enable_delete_after_consultation'] == 1 ? '1' : '0', '" />
</td></tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// Enable Printing
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>
'.$LANG['settings_printing'].'
<span style="margin-left:0px;"> <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_printing_tip']), ENT_QUOTES).'"></i></span>
</label>
</td><td>
<div class="toggle toggle-modern" id="allow_print" data-toggle-on="', isset($_SESSION['settings']['allow_print']) && $_SESSION['settings']['allow_print'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="allow_print_input" name="allow_print_input" value="', isset($_SESSION['settings']['allow_print']) && $_SESSION['settings']['allow_print'] == 1 ? '1' : '0', '" />
</td></tr>';
// Enable Printing Groups - roles_allowed_to_print
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>
'.$LANG['settings_roles_allowed_to_print'].'
<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>
</label>
</td><td>
<input type="hidden" id="roles_allowed_to_print" name="roles_allowed_to_print" value="', isset($_SESSION['settings']['roles_allowed_to_print']) ? $_SESSION['settings']['roles_allowed_to_print'] : '', '" />
<select id="roles_allowed_to_print_select" name="roles_allowed_to_print_select" class="text ui-widget-content" multiple="multiple" onchange="refreshInput()">';
if (!isset($_SESSION['settings']['roles_allowed_to_print']) || empty($_SESSION['settings']['roles_allowed_to_print'])) {
$arrRolesToPrint = array();
} else {
$arrRolesToPrint = explode(";", $_SESSION['settings']['roles_allowed_to_print']);
}
$roles = DB::query("SELECT id, title FROM ".prefix_table("roles_title"));
foreach ($roles as $role) {
echo '<option value="'.$role['id'].'"', in_array($role['id'], $arrRolesToPrint) ? ' selected="selected"' : '', '>'.addslashes($role['title']).'</option>';
}
echo '
</select>
</td></tr>';
// Enable IMPORT
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>
'.$LANG['settings_importing'].'
</label>
</td><td>
<div class="toggle toggle-modern" id="allow_import" data-toggle-on="', isset($_SESSION['settings']['allow_import']) && $_SESSION['settings']['allow_import'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="allow_import_input" name="allow_import_input" value="', isset($_SESSION['settings']['allow_import']) && $_SESSION['settings']['allow_import'] == 1 ? '1' : '0', '" />
</td></tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// Enable Item modification by anyone
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>
'.$LANG['settings_anyone_can_modify'].'
<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>
</label>
</td><td>
<div class="toggle toggle-modern" id="anyone_can_modify" data-toggle-on="', isset($_SESSION['settings']['anyone_can_modify']) && $_SESSION['settings']['anyone_can_modify'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="anyone_can_modify_input" name="anyone_can_modify_input" value="', isset($_SESSION['settings']['anyone_can_modify']) && $_SESSION['settings']['anyone_can_modify'] == 1 ? '1' : '0', '" />
</td></tr>';
// Enable Item modification by anyone by default
echo '
<tr id="tr_option_anyone_can_modify_bydefault"', isset($_SESSION['settings']['anyone_can_modify']) && $_SESSION['settings']['anyone_can_modify'] == 1 ? '':' style="display:none;"', '><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.htmlentities(strip_tags($LANG['settings_anyone_can_modify_bydefault'])).'</label>
</td><td>
<div class="toggle toggle-modern" id="anyone_can_modify_bydefault" data-toggle-on="', isset($_SESSION['settings']['anyone_can_modify_bydefault']) && $_SESSION['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($_SESSION['settings']['anyone_can_modify_bydefault']) && $_SESSION['settings']['anyone_can_modify_bydefault'] == 1 ? '1' : '0', '" />
</td></tr>';
// enable restricted_to option
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['settings_restricted_to'].'</label>
</td><td>
<div class="toggle toggle-modern" id="restricted_to" data-toggle-on="', isset($_SESSION['settings']['restricted_to']) && $_SESSION['settings']['restricted_to'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="restricted_to_input" name="restricted_to_input" value="', isset($_SESSION['settings']['restricted_to']) && $_SESSION['settings']['restricted_to'] == 1 ? '1' : '0', '" />
</td></tr>';
// enable restricted_to_roles
echo '
<tr id="tr_option_restricted_to_roles" style="display:', isset($_SESSION['settings']['restricted_to']) && $_SESSION['settings']['restricted_to'] == 1 ? 'inline':'none', ';"><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['restricted_to_roles'].'</label>
</td><td>
<div class="toggle toggle-modern" id="restricted_to_roles" data-toggle-on="', isset($_SESSION['settings']['restricted_to_roles']) && $_SESSION['settings']['restricted_to_roles'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="restricted_to_roles_input" name="restricted_to_roles_input" value="', isset($_SESSION['settings']['restricted_to_roles']) && $_SESSION['settings']['restricted_to_roles'] == 1 ? '1' : '0', '" />
</td></tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// enable show copy to clipboard small icons
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>
'.$LANG['copy_to_clipboard_small_icons'].'
<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>
</label>
</td><td>
<div class="toggle toggle-modern" id="copy_to_clipboard_small_icons" data-toggle-on="', isset($_SESSION['settings']['copy_to_clipboard_small_icons']) && $_SESSION['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($_SESSION['settings']['copy_to_clipboard_small_icons']) && $_SESSION['settings']['copy_to_clipboard_small_icons'] == 1 ? '1' : '0', '" />
</td></tr>';
// Enable Show description in items list
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>
'.$LANG['settings_show_description'].'
</label>
</td><td>
<div class="toggle toggle-modern" id="show_description" data-toggle-on="', isset($_SESSION['settings']['show_description']) && $_SESSION['settings']['show_description'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="show_description_input" name="show_description_input" value="', isset($_SESSION['settings']['show_description']) && $_SESSION['settings']['show_description'] == 1 ? '1' : '0', '" />
</td></tr>';
// In Tree, display number of Items in subfolders and number of subfolders - tree_counters
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>
'.$LANG['settings_tree_counters'].'
<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>
</label>
</td><td>
<div class="toggle toggle-modern" id="tree_counters" data-toggle-on="', isset($_SESSION['settings']['tree_counters']) && $_SESSION['settings']['tree_counters'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="tree_counters_input" name="tree_counters_input" value="', isset($_SESSION['settings']['tree_counters']) && $_SESSION['settings']['tree_counters'] == 1 ? '1' : '0', '" />
</td></tr>';
// nb of items to display by ajax query
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['nb_items_by_query'].'</label>
<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>
</td><td>
<input type="text" size="4" id="nb_items_by_query" name="nb_items_by_query" value="', isset($_SESSION['settings']['nb_items_by_query']) ? $_SESSION['settings']['nb_items_by_query'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
</td></tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// enable sending email on USER login
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['enable_send_email_on_user_login'].'</label>
</td><td>
<div class="toggle toggle-modern" id="enable_send_email_on_user_login" data-toggle-on="', isset($_SESSION['settings']['enable_send_email_on_user_login']) && $_SESSION['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($_SESSION['settings']['enable_send_email_on_user_login']) && $_SESSION['settings']['enable_send_email_on_user_login'] == 1 ? '1' : '0', '" />
</td></tr>';
// enable email notification on item shown
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['enable_email_notification_on_item_shown'].'</label>
</td><td>
<div class="toggle toggle-modern" id="enable_email_notification_on_item_shown" data-toggle-on="', isset($_SESSION['settings']['enable_email_notification_on_item_shown']) && $_SESSION['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($_SESSION['settings']['enable_email_notification_on_item_shown']) && $_SESSION['settings']['enable_email_notification_on_item_shown'] == 1 ? '1' : '0', '" />
</td></tr>';
// enable email notification when user password is changed
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['enable_email_notification_on_user_pw_change'].'</label>
</td><td>
<div class="toggle toggle-modern" id="enable_email_notification_on_user_pw_change" data-toggle-on="', isset($_SESSION['settings']['enable_email_notification_on_user_pw_change']) && $_SESSION['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($_SESSION['settings']['enable_email_notification_on_user_pw_change']) && $_SESSION['settings']['enable_email_notification_on_user_pw_change'] == 1 ? '1' : '0', '" />
</td></tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// enable add manual entries in History
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>
'.$LANG['settings_insert_manual_entry_item_history'].'
<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>
</label>
</td><td>
<div class="toggle toggle-modern" id="insert_manual_entry_item_history" data-toggle-on="', isset($_SESSION['settings']['insert_manual_entry_item_history']) && $_SESSION['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($_SESSION['settings']['insert_manual_entry_item_history']) && $_SESSION['settings']['insert_manual_entry_item_history'] == 1 ? '1' : '0', '" />
</td></tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// OffLine mode options
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>
'.$LANG['settings_offline_mode'].'
<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>
</label>
</td><td>
<div class="toggle toggle-modern" id="settings_offline_mode" data-toggle-on="', isset($_SESSION['settings']['settings_offline_mode']) && $_SESSION['settings']['settings_offline_mode'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="settings_offline_mode_input" name="settings_offline_mode_input" value="', isset($_SESSION['settings']['settings_offline_mode']) && $_SESSION['settings']['settings_offline_mode'] == 1 ? '1' : '0', '" />
</td></tr>';
// OffLne KEy Level
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label for="offline_key_level">'.$LANG['offline_mode_key_level'].'</label>
</td>
<td>
<select id="offline_key_level" name="offline_key_level" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));">';
foreach ($_SESSION['settings']['pwComplexity'] as $complex) {
echo '<option value="'.$complex[0].'"', isset($_SESSION['settings']['offline_key_level']) && $_SESSION['settings']['offline_key_level'] == $complex[0] ? ' selected="selected"' : '', '>'.$complex[1].'</option>';
}
echo '
</select>
</td>
</tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// SYSLOG ENABLE
echo '
<tr><td>
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i>
<label>'.$LANG['syslog_enable'].'</label>
</td><td>
<div class="toggle toggle-modern" id="syslog_enable" data-toggle-on="', isset($_SESSION['settings']['syslog_enable']) && $_SESSION['settings']['syslog_enable'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="syslog_enable_input" name="syslog_enable_input" value="', isset($_SESSION['settings']['syslog_enable']) && $_SESSION['settings']['syslog_enable'] == 1 ? '1' : '0', '" />
</td></tr>';
// SYSLOG Host
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-long-arrow-right mi-grey-1" style="margin-right: .3em;"> </i>
'.$LANG['syslog_host'].'
</td>
<td>
<input id="syslog_host" name="syslog_host" type="text" size="40px" value="', !isset($_SESSION['settings']['syslog_host']) ? 'localhost' : $_SESSION['settings']['syslog_host'], '" onchange="updateSetting($(this).attr(\'id\'));" />
</td>
</tr>';
// SYSLOG port
echo '
<tr style="margin-bottom:3px">
<td>
<i class="fa fa-long-arrow-right mi-grey-1" style="margin-right: .3em;"> </i>
'.$LANG['syslog_port'].'
</td>
<td>
<input id="syslog_port" name="syslog_port" type="text" size="40px" value="', !isset($_SESSION['settings']['syslog_port']) ? '514' : $_SESSION['settings']['syslog_port'], '" onchange="updateSetting($(this).attr(\'id\'));" />
</td>
</tr>';
echo '<tr><td colspan="3"><hr /></td></tr>';
// Automatic server password change
echo '
<tr><td>