-
Notifications
You must be signed in to change notification settings - Fork 44
/
settingsCore.php
778 lines (726 loc) · 45.7 KB
/
settingsCore.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
<!doctype html>
<html>
<meta charset="UTF-8">
<title>HRCLoud2 | Application Settings</title>
<script type="text/javascript" src="/HRProprietary/HRCloud2/Applications/jquery-3.1.0.min.js"></script>
<script type="text/javascript" src="/HRProprietary/HRCloud2/Resources/HRC2-Lib.js"></script>
<script type="text/javascript">
function selectChanged(id1, id2) {
var x = document.getElementById(id1).value;
document.getElementById(id2).disabled = (x == 0); }
selectChanged();
</script>
<?php
// / -----------------------------------------------------------------------------------a
// / The follwoing code checks for the required core filesand terminates if they are missing.
if (!file_exists(realpath(dirname(__FILE__)).'/securityCore.php')) die ('</head><body>ERROR!!! HRC2SettingsCore107, Cannot process the HRCloud2 Compatibility Core file (securityCore.php)!<br /></body></html>');
else require(realpath(dirname(__FILE__)).'/securityCore.php');
if (!file_exists(realpath(dirname(__FILE__)).'/compatibilityCore.php')) die ('</head><body>ERROR!!! HRC2SettingsCore107, Cannot process the HRCloud2 Compatibility Core file (compatibilityCore.php)!<br /></body></html>');
else require(realpath(dirname(__FILE__)).'/compatibilityCore.php');
$BackupToken = hash('ripemd160', $Salts.$BackupLoc.$Date.$UserID.$UserIDRAW);
// / -----------------------------------------------------------------------------------
?>
<div style="font-family:<?php echo $Font; ?>;">
<div align="center">
<h3>HRCloud2 Settings</h3>
<hr />
</div>
<div style="float:center; padding-left:10%;">
<?php
// / -----------------------------------------------------------------------------------
// / The following code is performed whenever a user selects to save new settings to their user cache file.
// / We must run this code before loading the rest of the core files so as to avoid a required refresh before
// / displaying the latest settings.
if (isset($saveSettings)) {
// / The following code is sets the users color scheme.
if (isset($NEWColorScheme)) {
$txt = ('$ColorScheme = \''.$NEWColorScheme.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$txt = ('OP-Act: Saved "Color Scheme" setting: "'.$NEWColorScheme.'" to the user cache file on '.$Time.'!');
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
echo('Saved New Color-Scheme Settings.'.$br); }
else $NEWColorScheme = $ColorScheme;
// / The following code sets the users HRAI display preference.
if (isset($NEWShowHRAI)) {
$txt = ('$ShowHRAI = \''.$NEWShowHRAI.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$txt = ('OP-Act: Saved "Show HRAI" setting: "'.$NEWShowHRAI.'" to the user cache file on '.$Time.'!');
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
echo('Saved New HRAI Display Settings.'.$br); }
else $NEWShowHRAI = $ShowHRAI;
// / The following code sets the users HRAI audio preference.
if (isset($NEWHRAIAudio)) {
$txt = ('$HRAIAudio = \''.$NEWHRAIAudio.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$txt = ('OP-Act: Saved "HRAI Audio" setting: "'.$NEWHRAIAudio.'" to the user cache file on '.$Time.'!');
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
echo('Saved New HRAI Audio Settings.'.$br); }
else $NEWHRAIAudio = $HRAIAudio;
// / The following code sets the users Tipa display preference.
if (isset($NEWShowTips)) {
$txt = ('$ShowTips = \''.$NEWShowTips.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$txt = ('OP-Act: Saved "Show Tips" setting: "'.$NEWShowTips.'" to the user cache file on '.$Time.'!');
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
echo('Saved New Tips Settings.'.$br); }
else $NEWShowTips = $ShowTips;
// / The following code sets the current user timezone.
if (isset($NEWTimezone)) {
$txt = ('$Timezone = \''.$NEWTimezone.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$txt = ('OP-Act: Saved "Timezone" setting: "'.$NEWTimezone.'" to the user cache file on '.$Time.'!');
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
echo('Saved New Timezone Settings.'.$br); }
else $NEWTimezone = $Timezone;
// / The following code sets the current user nickname.
if (isset($NEWNickname)) {
$txt = ('$nickname = \''.$NEWNickname.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$txt = ('OP-Act: Saved "Nickname" setting: "'.$NEWNickname.'" to the user cache file on '.$Time.'!');
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
echo('Saved New Nickname Settings.'.$br); }
else $NEWNickname = $Nickname;
// / The following code sets the current user font.
if (isset($NEWFont)) {
$txt = ('$Font = \''.$NEWFont.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$txt = ('OP-Act: Saved "Font" setting: "'.$NEWFont.'" to the user cache file on '.$Time.'!');
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
echo('Saved New Font Settings.'.$br); }
else $NEWFont = $Font;
// / The following settings area only set or displayed when the user is an authentiacted administrator.
if ($UserIDRAW == 1) {
// / The following code is sets the server's Data Compression settings.
if (isset($NEWDataCompression)) {
$txt = ('$DataCompression = \''.$NEWDataCompression.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$txt = ('OP-Act: Saved "Data Compression" setting: "'.$NEWDataCompression.'" to the user cache file on '.$Time.'!');
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
echo ('Saved New Data Compression Settings.'.$br); }
else $NEWDataCompression = $DataCompression;
// / The following code is sets the server's Virus Scanning setting.
if (isset($NEWVirusScan)) {
$txt = ('$VirusScan = \''.$NEWVirusScan.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$txt = ('OP-Act: Saved "Virus Scan" setting: "'.$NEWVirusScan.'" to the user cache file on '.$Time.'!');
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
echo ('Saved New Anti-Virus Settings.'.$br); }
else $NEWVirusScan = $VirusScan;
// / The following code is sets the server's High Performance AV setting.
if (isset($NEWHighPerformanceAV)) {
$txt = ('$HighPerformanceAV = \''.$NEWHighPerformanceAV.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$txt = ('OP-Act: Saved "High Performance AV" setting: "'.$NEWHighPerformanceAV.'" to the user cache file on '.$Time.'!');
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
echo ('Saved New High Performance AV Settings.'.$br); }
else $NEWHighPerformanceAV = $HighPerformanceAV;
// / The following code is sets the server's High Performance AV setting.
if (isset($NEWThoroughAV)) {
$txt = ('$ThoroughAV = \''.$NEWThoroughAV.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$txt = ('OP-Act: Saved "Thorough AV" setting: "'.$NEWThoroughAV.'" to the user cache file on '.$Time.'!');
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
echo ('Saved New Thorough AV Settings.'.$br); }
else $NEWThoroughAV = $ThoroughAV;
// / The following code is sets the server's Persistence AV setting.
if (isset($NEWPersistentAV)) {
$txt = ('$PersistentAV = \''.$NEWPersistentAV.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$txt = ('OP-Act: Saved "Persistent AV" setting: "'.$NEWPersistentAV.'" to the user cache file on '.$Time.'!');
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
echo ('Saved New Persistent AV Settings.'.$br); }
else $NEWPersistentAV = $PersistentAV;
// / The following code is sets the server's Apache User setting.
if (isset($NEWApacheUser)) {
$txt = ('$ApacheUser = \''.$NEWApacheUser.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$txt = ('OP-Act: Saved "Apache User" setting: "'.$NEWApacheUser.'" to the user cache file on '.$Time.'!');
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
echo ('Saved New Apache User Settings.'.$br); }
else $NEWApacheUser = $ApacheUser;
// / The following code is sets the server's Apache Group setting.
if (isset($NEWApacheGroup)) {
$txt = ('$ApacheGroup = \''.$NEWApacheGroup.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$txt = ('OP-Act: Saved "Apache Group" setting: "'.$NEWApacheGroup.'" to the user cache file on '.$Time.'!');
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
echo ('Saved New Apache Group Settings.'.$br); }
else $NEWApacheGroup = $ApacheGroup;
// / The following code is sets the enablement of Privacy Policy modifications in the GUI.
if (isset($NEWPPEnableURL)) {
$txt = ('$PPEnableURL = \''.$NEWPPEnableURL.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$txt = ('OP-Act: Saved "Enable Privacy Policy" setting: "'.$NEWPPEnableURL.'" to the user cache file on '.$Time.'!');
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
echo('Saved New Enable Privacy Policy Settings.'.$br); }
else $NEWPPEnableURL = $PPEnableURL;
// / The following code is sets the Privacy Policy URL in the GUI.
if (isset($NEWPrivacyPolicyURL)) {
$txt = ('$PrivacyPolicyURL = \''.$NEWPrivacyPolicyURL.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$txt = ('OP-Act: Saved "Privacy Policy" setting: "'.$NEWPrivacyPolicyURL.'" to the user cache file on '.$Time.'!');
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
echo('Saved New Privacy Policy Settings.'.$br); }
else $NEWPrivacyPolicyURL = $PrivacyPolicyURL;
// / The following code is sets the enablement of Terms Of Service modifications in the GUI.
if (isset($NEWTOSEnableURL)) {
$txt = ('$TOSEnableURL = \''.$NEWTOSEnableURL.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$txt = ('OP-Act: Saved "Enable Terms Of Service" setting: "'.$NEWTOSEnableURL.'" to the user cache file on '.$Time.'!');
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
echo('Saved New Enable Terms Of Service Settings.'.$br); }
else $NEWTOSEnableURL = $TOSEnableURL;
// / The following code is sets the Terms Of Service URL in the GUI.
if (isset($NEWTermsOfServiceURL)) {
$txt = ('$TermsOfServiceURL = \''.$NEWTermsOfServiceURL.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$txt = ('OP-Act: Saved "Terms Of Service" setting: "'.$NEWTermsOfServiceURL.'" to the user cache file on '.$Time.'!');
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
echo('Saved New Terms Of Service Settings.'.$br); }
else $NEWTermsOfServiceURL = $TermsOfServiceURL; }
// / The following code applies settings that have just been submitted so they appear immediately.
$ShowHRAI = $NEWShowHRAI;
$HRAIAudio = $NEWHRAIAudio;
$nickname = $NEWNickname;
$Timezone = $NEWTimezone;
$Font = $NEWFont;
$ColorScheme = $NEWColorScheme;
$ShowTips = $NEWShowTips;
$ApacheUser = $NEWApacheUser;
$ApacheGroup = $NEWApacheGroup;
$VirusScan = $NEWVirusScan;
$ThoroughAV = $NEWThoroughAV;
$PersistentAV = $NEWPersistentAV;
$HighPerformanceAV = $NEWHighPerformanceAV;
$PPEnableURL = $NEWPPEnableURL;
$PPEnableURL = $NEWPPEnableURL;
$TOSEnableURL = $NEWTOSEnableURL;
$TOSEnableURL = $NEWTOSEnableURL;
$PrivacyPolicyURL = $NEWPrivacyPolicyURL;
$TermsOfServiceURL = $NEWTermsOfServiceURL;
?>
<hr />
<?php
echo($br.'All settings were saved & applied on '.$Time.'.'.$br);
?></div>
<div align="center">
<hr /></div>
<?php }
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / The following code is performed whenever a user selects to reset their settings to the defaults set in
// / the servers main config.php file.
if (isset($loadDefaultSettings)) {
require('config.php');
$NEWColorScheme = $ColorScheme;
$txt = ('$ColorScheme = \''.$NEWColorScheme.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$NEWShowHRAI = $ShowHRAI;
$txt = ('$ShowHRAI = \''.$NEWShowHRAI.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$NEWHRAIAudio = $HRAIAudio;
$txt = ('$HRAIAudio = \''.$NEWHRAIAudio.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$NEWTimezone = $defaultTimezone;
$txt = ('$Timezone = \''.$NEWTimezone.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$NEWShowTips = $ShowTips;
$txt = ('$ShowTips = \''.$NEWShowTips.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$NEWNickname = $defaultNickname;
$txt = ('$nickname = \''.$NEWNickname.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
$NEWFont = $defaultFont;
$txt = ('$Font = \''.$NEWFont.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND);
if ($UserIDRAW == 1) {
if (!isset($NEWVirusScan)) {
$NEWVirusScan = $VirusScan;
$txt = ('$VirusScan = \''.$NEWVirusScan.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND); }
if (!isset($HighPerformanceAV)) {
$NEWHighPerformanceAV = $HighPerformanceAV;
$txt = ('$HighPerformanceAV = \''.$NEWHighPerformanceAV.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND); }
if (!isset($ThoroughAV)) {
$NEWThoroughAV = $ThoroughAV;
$txt = ('$ThoroughAV = \''.$NEWThoroughAV.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND); }
if (!isset($ThoroughAV)) {
$NEWPersistentAV = $PersistentAV;
$txt = ('$PersistentAV = \''.$NEWPersistentAV.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND); }
if (!isset($NEWApacheUser)) {
$NEWApacheUser = $ApacheUser;
$txt = ('$ApacheUser = \''.$NEWApacheUser.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND); }
if (!isset($NEWApacheGroup)) {
$NEWApacheGroup = $ApacheGroup;
$txt = ('$ApacheGroup = \''.$NEWApacheGroup.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND); }
if (!isset($NEWPPEnableURL)) {
$NEWPPEnableURL = $PPEnableURL;
$txt = ('$PPEnableURL = \''.$NEWPPEnableURL.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND); }
if (!isset($NEWPrivacyPolicyURL)) {
$NEWPrivacyPolicyURL = $PrivacyPolicyURL;
$txt = ('$PrivacyPolicyURL = \''.$NEWPrivacyPolicyURL.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND); }
if (!isset($NEWTOSEnableURL)) {
$NEWTOSEnableURL = $TOSEnableURL;
$txt = ('$TOSEnableURL = \''.$NEWTOSEnableURL.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND); }
if (!isset($NEWTermsOfServiceURL)) {
$NEWTermsOfServiceURL = $TermsOfServiceURL;
$txt = ('$TermsOfServiceURL = \''.$NEWTermsOfServiceURL.'\';');
$WriteSetting = file_put_contents($UserConfig, $txt.PHP_EOL, FILE_APPEND); }
// / The following code applies settings that have just been submitted so they appear immediately.
$ShowHRAI = $NEWShowHRAI;
$HRAIAudio = $NEWHRAIAudio;
$nickname = $NEWNickname;
$Timezone = $NEWTimezone;
$Font = $NEWFont;
$ColorScheme = $NEWColorScheme;
$ShowTips = $NEWShowTips;
$ApacheUser = $NEWApacheUser;
$ApacheGroup = $NEWApacheGroup;
$ThoroughAV = $NEWThoroughAV;
$PersistentAV = $NEWPersistentAV;
$HighPerformanceAV = $NEWHighPerformanceAV;
$PPEnableURL = $NEWPPEnableURL;
$PPEnableURL = $NEWPPEnableURL;
$TOSEnableURL = $NEWTOSEnableURL;
$TOSEnableURL = $NEWTOSEnableURL;
$PrivacyPolicyURL = $NEWPrivacyPolicyURL;
$TermsOfServiceURL = $NEWTermsOfServiceURL; }
?><div align="center"><?php echo($br.'Reset "Application Settings" to default values on '.$Time.'.'.$br);
?>
<hr /></div>
<?php
sleep(1); } ?>
</div>
<?php
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Prepare the $SaltHash.
$SaltHash = $SaltHash = hash('ripemd160', $Date.$Salts.$UserIDRAW);
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Generate a client installer package using user supplied specifications.
if (isset($GenerateClient) && isset($GenClientOS) && isset($GenClientCPU) && isset($GenClientHomepage)) {
$GenClientURL = $URL;
$GenClientHomepage = trim($GenClientHomepage, '/');
$SupportedClientOS = array('windows', 'linux', 'osx');
$SupportedClientCPU = array('ia32', 'x64', 'armv71');
$GenClientPre = 'HRCloud2-Client-';
if ($GenClientHomepage == 'home') $GenClientHomepage = '/HRProprietary/HRCloud2/index2.php';
if (in_array($GenClientOS, $SupportedClientOS) && in_array($GenClientCPU, $SupportedClientCPU)) {
$GenClientDir = $ClientInstallDir.'/'.$GenClientOS;
$GenClientZip = $CloudUsrDir.'HRCloud2-Client_'.$GenClientOS.'_'.$GenClientCPU.'_'.$Date.'.zip';
$GenClientTempZip = $CloudTmpDir.'HRCloud2-Client_'.$GenClientOS.'_'.$GenClientCPU.'_'.$Date.'.zip';
$txt = 'OP-Act: Executing "nativefier -n "HRCloud2-Client" -a "'.$GenClientCPU.'" -p "'.$GenClientOS.'" "'.$GenClientURL.$GenClientHomepage.'" "'.$GenClientDir.'"" on '.$Time.'.';
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
shell_exec('nativefier -n "HRCloud2-Client" -a "'.$GenClientCPU.'" -p "'.$GenClientOS.'" "'.$GenClientURL.$GenClientHomepage.'" "'.$GenClientDir.'"');
@copy ('index.html', $ClientInstallDir.'/'.$GenClientOS.'/index.html');
if (file_exists($GenClientDir)) {
foreach ($iterator = new \RecursiveIteratorIterator (
new \RecursiveDirectoryIterator ($GenClientDir, \RecursiveDirectoryIterator::SKIP_DOTS),
\RecursiveIteratorIterator::SELF_FIRST) as $item) {
@chmod($item, 0755);
if ($item->isDir()) copy('index.html', $item.'/index.html'); }
if (is_dir($GenClientDir)) {
if ($GenClientOS == 'windows') {
$GenClientOS1 = 'win32';
@copy($ClientInstallDirWin.'/setup.bat', $GenClientDir.'/HRCloud2-Client-win32-'.$GenClientCPU.'/setup.bat'); }
if ($GenClientOS == 'linux') {
$GenClientOS1 = 'linux';
$GenClientPre = 'hr-cloud-2-client-'; }
if ($GenClientOS == 'osx') $GenClientOS1 = 'darwin';
$txt = 'OP-Act: Executing "'.'cd '.$GenClientDir.'; zip -r -o '.$GenClientZip.' '.$GenClientPre.$GenClientOS1.'-'.$GenClientCPU.'" on '.$Time.'.';
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
if (!file_exists($GenClientDir.'/'.$GenClientPre.$GenClientOS1.'-'.$GenClientCPU)) {
$txt = 'ERROR!!! HRC2SettingsCore347, Could not create the Client App build directory on '.$Time.'!';
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
die($txt); }
exec('cd '.$GenClientDir.'; zip -r -o '.$GenClientZip.' '.$GenClientPre.$GenClientOS1.'-'.$GenClientCPU);
if (!file_exists($GenClientZip)) {
$txt = 'ERROR!!! HRC2SettingsCore197, Could not create the Client App zip file on '.$Time.'!';
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
die($txt); }
if (!is_dir($GenClientDir)) {
$txt = 'ERROR!!! HRC2SettingsCore201, Could not create the Client App build folder on '.$Time.'!';
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
die($txt); } }
if (!in_array($GenClientOS, $SupportedClientOS) or !in_array($GenClientCPU, $SupportedClientCPU)) {
$txt = 'ERROR!!! HRC2SettingsCore189, Invalid Client App Settings specified on '.$Time.'!';
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND); } }
@copy($GenClientZip, $GenClientTempZip);
echo('Generated a Client App Installation package to your Cloud Drive! | <a href="'.$URL.'/HRProprietary/HRCloud2/DATA/'.$UserID.'/HRCloud2-Client_'.$GenClientOS.'_'.$GenClientCPU.'_'.$Date.'.zip"><strong>Download Now</strong></a>.'.$br.'</hr>'); } }
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / The following code generates a copy of the users AppData directory to their cloud drive in .zip format.
if (isset($DownloadAppData)) {
if (is_dir($LogLoc) && strpos($LogLoc, $UserID) !== FALSE && strpos($CloudUsrDir, $UserID) !== FALSE && strpos($CloudTmpDir, $UserID) !== FALSE) {
$archDst = $CloudUsrDir.'User-Data_'.$Date.'.zip';
$archTempDst = $CloudTmpDir.'User-Data_'.$Date.'.zip';
$txt = 'OP-Act: Executing "zip -j '.$archDst.' '.$LogLoc.' -x *Shared*" on '.$Time.'.';
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
exec('cd '.$CloudUsrDir.'; zip -r '.$archDst.' .AppData -x *Shared*');
@copy($archDst, $archTempDst);
echo('Generated a copy of your User Data to your Cloud Drive! | <a href="'.$URL.'/HRProprietary/HRCloud2/DATA/'.$UserID.'/User-Data_'.$Date.'.zip"><strong>Download Now</strong></a>.'.$br.'</hr>'); }
else {
$txt = 'ERROR!!! HRC2SettingsCore360, Could not generate a User Data package on '.$Time.'!';
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
die($txt); } }
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / The following code loads the backupCore to perform an admin on-demand backup
if (isset($BackupUserDataNow)) {
if (!file_exists(realpath(dirname(__FILE__)).'/backupCore.php')) die ('</head><body>ERROR!!! HRC2SettingsCore355, Cannot process the HRCloud2 Backup Core file (backupCore.php)!<br /></body></html>');
else require(realpath(dirname(__FILE__)).'/backupCore.php');
echo('Backup Complete!'.$br);
echo('Cloud Items Scanned: '.$BackupScannedFilesCloud.$br);
echo('Backup Items Scanned: '.$BackupScannedFilesBackup.$br);
echo('Files Created: '.$BackupCreatedFiles.$br);
echo('Directories Created: '.$BackupCreatedFolders.$br);
echo('Files Removed: '.$BackupRemovedFiles.$br);
echo('Directories Removed: '.$BackupRemovedFolders.$br);
echo('Modified Files Replaced: '.$BackupReplacedFiles.$hr); }
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Set the echo value for the "Data Comrpession" option.
if ($DataCompression == '0' or $DataCompression == '' or !isset($DataCompression)) $DCURL = 'Disabled';
if ($DataCompression == '1') $DCURL = 'Enabled (Automatic)';
if ($DataCompression == '2') $DCURL = 'Enabled (High Performance)';
if ($DataCompression == '3') $DCURL = 'Enabled (High Capacity)';
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Set the echo value for the "Color Scheme" option.
if ($ColorScheme == '1') $CSURL = 'Blue (Default)';
if ($ColorScheme == '2') $CSURL = 'Red';
if ($ColorScheme == '3') $CSURL = 'Green';
if ($ColorScheme == '4') $CSURL = 'Orange';
if ($ColorScheme == '5') $CSURL = 'Black';
if ($ColorScheme == '6') $CSURL = 'Purple';
if ($ColorScheme == '7') $CSURL = 'Green (2)';
if ($ColorScheme == '8') $CSURL = 'Grey';
if ($ColorScheme == '9') $CSURL = 'Yellow';
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Prepare the echo value for the show HRAI input field.
if ($ShowHRAI == '1') $SHRAIURL = 'Enabled';
if ($ShowHRAI !== '1') $SHRAIURL = 'Disabled';
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Prepare the echo value for the HRAI audio input field.
if ($HRAIAudio == '1') $AHRAIURL = 'Enabled';
if ($HRAIAudio !== '1') $AHRAIURL = 'Disabled';
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Prepare the echo value for the Anti-Virus input field.
if ($VirusScan == '1') $VSURL = 'Enabled';
if ($VirusScan !== '1') $VSURL = 'Disabled';
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Prepare the echo value for the High Performance AV input field.
if ($HighPerformanceAV == '1') $HPAVURL = 'Enabled';
if ($HighPerformanceAV !== '1') $HPAVURL = 'Disabled';
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Prepare the echo value for the Thorough AV input field.
if ($ThoroughAV == '1') $TAVURL = 'Enabled';
if ($ThoroughAV !== '1') $TAVURL = 'Disabled';
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Prepare the echo value for the Persistent AV input field.
if ($PersistentAV == '1') $PAVURL = 'Enabled';
if ($PersistentAV !== '1') $PAVURL = 'Disabled';
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Prepare the echo value for the Timezone input field.
if (isset($Timezone)) $TZURL = $Timezone;
if (!isset($Timezone)) $TZURL = $defaultTimezone;
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Prepare the echo value for the Nickname input field.
if (isset($nickname)) $NNURL = $nickname;
if (!isset($nickname)) $NNURL = $defaultNickname;
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Prepare the echo value for the Nickname input field.
if (isset($Font)) $FURL = $Font;
if (!isset($Font)) $FURL = $defaultFont;
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Prepare the echo value for the Tips input field.
if ($ShowTips == '1') $STipsURL = 'Enabled';
if ($ShowTips !== '1') $STipsURL = 'Disabled';
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Prepare the echo value for the Apache User input field.
if (isset($ApacheUser)) $AUURL = $ApacheUser;
if (!isset($ApacheUser)) $AUURL = 'www-data';
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Prepare the echo value for the Apache Group input field.
if (isset($ApacheGroup)) $AGURL = $ApacheGroup;
if (!isset($ApacheGroup)) $AGURL = 'www-data';
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Prepare the echo value to enable the Privacy Policy URL input field.
if ($PPEnableURL == '1') {
$PPEURL = 'Enabled';
$PPDisabledAtt = ''; }
if ($PPEnableURL == '0') {
$PPEURL = 'Disabled';
$PPDisabledAtt = ' disabled'; }
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Prepare the echo value for the Privacy Policy URL input field.
$PPURL = $PrivacyPolicyURL;
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Prepare the echo value to enable the Terms Of Service URL input field.
if ($TOSEnableURL == '1') {
$TOSEURL = 'Enabled';
$TOSDisabledAtt = ''; }
if ($TOSEnableURL == '0') {
$TOSEURL = 'Disabled';
$TOSDisabledAtt = ' disabled'; }
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Prepare the echo value for the Terms Of Service URL input field.
$TOSURL = $TermsOfServiceURL;
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / The following is displayed to all users.
?>
<div align='left'>
<form action="settingsCore.php" method="post" name='NEWAppSettings' id='NEWAppSettings'>
<p alt="Generate an archive of my user specific data." title="Generate an archive of my user specific data." style="padding-left:15px;"> Export User Data: </p>
<p style="float:center; padding-left:10%;"><input type='submit' name='downloadAppData' id='downloadAppData' value=' Export User Data' style="padding-left:30px; padding: 2px; border: 1px solid black" onclick="toggle_visibility('loading');"/></p>
<p alt="Generate a Desktop client App for your device." title="Generate a client App for your device." style="padding-left:15px;"><strong></strong> Desktop App: </p>
<p>
<select id="GenClientOS" name="GenClientOS" style="float:left; padding-left:30px; width:30%;">
<option value="">Select your OS</option>
<option value="windows">Windows</option>
<option value="linux">Linux</option>
<option value="osx">OSX</option>
</select>
<select id="GenClientCPU" name="GenClientCPU" style="float:left; padding-left:30px; width:30%;">
<option value="">Select your CPU</option>
<option value="x64">64-Bit (x64)</option>
<option value="ia32">32-Bit (x32)</option>
<option value="armv71">ARMv71</option>
</select>
<select id="GenClientHomepage" name="GenClientHomepage" style="float:left; padding-left:30px; width:30%;">
<option value="">Select your Homepage</option>
<option value="">URL Home</option>
<option value="home">Cloud Home</option>
</select>
</p>
<br />
<p style="float:center; padding-left:10%;"><input type='submit' name='GenerateClient' id='GenerateClient' value='Build Client' style="padding: 2px; border: 1px solid black" onclick="toggle_visibility('loading');"/></p>
<p alt="Change what HRAI and HRCloud2 calls you." title="Change what HRAI and HRCloud calls you." style="padding-left:15px;"><strong></strong> Nickname: </p>
<p><input type='text' id="NEWNickname" name="NEWNickname" style="padding-left:30px; width:100%;" value="<?php echo $NNURL; ?>"></p>
<p alt="Change the HRCloud2 color scheme." title="Change the HRCloud2 color scheme." style="padding-left:15px;"><strong></strong> Color Scheme: </p>
<p>
<select id="NEWColorScheme" name="NEWColorScheme" style="padding-left:30px; width:100%;">
<option value="<?php echo $ColorScheme; ?>">Current (<?php echo $CSURL; ?>)</option>
<option value="1">Blue (Default)</option>
<option value="2">Red</option>
<option value="3">Green</option>
<option value="7">Green (2)</option>
<option value="4">Orange</option>
<option value="5">Black</option>
<option value="6">Purple</option>
<?php // GREEN2 IS #7, OUT OF ORDER. CHECK ORDER CAREFULLY!!! ?>
<option value="8">Grey</option>
<option value="9">Yellow</option>
</select>
</p>
<p alt="Change the HRCloud2 font." title="Change the HRCloud2 font." style="padding-left:15px;"><strong></strong> Font: </p>
<p>
<select id="NEWFont" name="NEWFont" style="padding-left:30px; width:100%;">
<option value="<?php echo $Font; ?>">Current (<?php echo $FURL; ?>)</option>
<option value="Helvetica">Helvetica (Default)</option>
<option value="Arial">Arial</option>
<option value="Arial Black">Arial Black</option>
<option value="Times">Times</option>
<option value="Times New Roman">Times New Roman</option>
<option value="Courier New">Courier New</option>
<option value="Courier ">Courier</option>
<option value="Verdana">Verdana</option>
<option value="Georgia">Georgia</option>
<option value="Palatino">Palatino</option>
<option value="Garamond">Garamond</option>
<option value="Bookman">Bookman</option>
<option value="Comic Sans MS">Comic Sans MS</option>
<option value="Trebuchet MS">Trebuchet MS</option>
<option value="Impact">Impact</option>
</select>
</p>
<p alt="Show or Hide HRAI at the top of most windows." title="Show or Hide HRAI at the top of most windows." style="padding-left:15px;"><strong></strong> HRAI Personal Assistant: </p>
<p>
<select id="NEWShowHRAI" name="NEWShowHRAI" style="padding-left:30px; width:100%;">
<option value="<?php echo $ShowHRAI; ?>">Current (<?php echo $SHRAIURL; ?>)</option>
<option value="1">Enabled</option>
<option value="0">Disabled</option>
</select>
</p>
<p alt="Enable or disable HRAI Audio reading most HRAI outputs out loud." title="Enable or disable HRAI Audio reading most HRAI outputs out loud." style="padding-left:15px;"><strong></strong> Enable HRAI Audio: </p>
<p>
<select id="NEWHRAIAudio" name="NEWHRAIAudio" style="padding-left:30px; width:100%;">
<option value="<?php echo $HRAIAudio; ?>">Current (<?php echo $AHRAIURL; ?>)</option>
<option value="1">Enabled</option>
<option value="0">Disabled</option>
</select>
</p>
<p alt="Show or Hide Tips at the top of most windows." title="Show or Hide Tips at the top of most windows." style="padding-left:15px;"><strong></strong> Tips: </p>
<p>
<select id="NEWShowTips" name="NEWShowTips" style="padding-left:30px; width:100%;">
<option value="<?php echo $ShowTips; ?>">Current (<?php echo $STipsURL; ?>)</option>
<option value="1">Enabled</option>
<option value="0">Disabled</option>
</select>
</p>
<?php
$regions = array(
'America' => DateTimeZone::AMERICA,
'Africa' => DateTimeZone::AFRICA,
'Antarctica' => DateTimeZone::ANTARCTICA,
'Aisa' => DateTimeZone::ASIA,
'Atlantic' => DateTimeZone::ATLANTIC,
'Europe' => DateTimeZone::EUROPE,
'Indian' => DateTimeZone::INDIAN,
'Pacific' => DateTimeZone::PACIFIC);
$timezones = array();
foreach ($regions as $name => $mask) {
$zones = DateTimeZone::listIdentifiers($mask);
foreach($zones as $timezone) {
$time = new DateTime(NULL, new DateTimeZone($timezone));
$ampm = $time->format('H') > 12 ? ' ('. $time->format('g:i a'). ')' : '';
$timezones[$name][$timezone] = substr($timezone, strlen($name) + 1) . ' - ' . $time->format('H:i') . $ampm; } }
print '<p alt="Adjust the timezone so that logs and GUI elements match your local time." title="Adjust the timezone so that logs and GUI elements match your local time." style="padding-left:15px;"><strong></strong> Timezone:</p>
<p><select id="NEWTimezone" name="NEWTimezone" style="padding-left:30px; width:100%;">';
print '<option name="'.$TZURL.'" value="'.$TZURL.'">Current ('.$TZURL.')</option>'.$br;
foreach($timezones as $region => $list) {
print '<optgroup label="' . $region . '">' . $br;
foreach($list as $timezone => $name) {
$explode1 = explode(' - ', $timezone);
$tzexplode = trim($explode1[0]);
print '<option name="' . $timezone . '" value="'.$tzexplode.'">' . $name . '</option>' . $br; }
print '<optgroup>' . $br; }
print '</select></p>';
// / -----------------------------------------------------------------------------------
?>
<p alt="Delete cache and temporary data related to your HRCloud2 user account. (Will NOT delete uploaded data or user content)" title="Delete cache and temporary data related to your user account." style="padding-left:15px;"> Clear User Cache Files: </p>
<p style="float:center; padding-left:10%;"><input type='submit' name='ClearCache' id='ClearCache' value='Clear User Cache' style="padding-left:30px; padding: 2px; border: 1px solid black" onclick="toggle_visibility('loading');"/></p>
<p alt="Delete your favorites cache. (Will NOT delete uploaded data or user content)" title="Delete your favorites cache." style="padding-left:15px;"> Clear Favorites Cache: </p>
<p style="float:center; padding-left:10%;"><input type='submit' name='ClearFavorites' id='ClearFavorites' value='Clear Favorites' style="padding-left:30px; padding: 2px; border: 1px solid black" onclick="toggle_visibility('loading');"/></p>
<?php
// / -----------------------------------------------------------------------------------
// / The following is displayed if the user is an administrator.
if ($UserIDRAW == 1) { ?>
<div align="center"><h3>Admin Settings</h3></div>
<hr />
<p alt="Options for updating and maintainging HRCloud2." title="Options for updating and maintainging HRCloud2." style="padding-left:15px;"> System Update:</p>
<p style="float:center; padding-left:10%;">Automatic Update Options: </p>
<p style="float:center; padding-left:10%;"><input type='submit' name='AutoUpdate' id='AutoUpdate' value='Automatic Update' style="padding: 2px; border: 1px solid black" onclick="toggle_visibility('loading');"/></p>
<p style="float:center; padding-left:10%;">Manual Update Options: </p>
<p style="float:center; padding-left:10%;">
<input type='submit' name='AutoDownload' id='AutoDownload' value='Download Update' style="padding: 2px; border: 1px solid black" onclick="toggle_visibility('loading');"/>
<input type='submit' name='AutoInstall' id='AutoInstall' value='Install Update' style="padding: 2px; border: 1px solid black" onclick="toggle_visibility('loading');"/>
<input type='submit' name='AutoClean' id='AutoClean' value='Clean Update' style="padding: 2px; border: 1px solid black" onclick="toggle_visibility('loading');"/>
<input type='submit' name='CheckCompatibility' id='CheckCompatibility' value='Compat Check' style="padding: 2px; border: 1px solid black" onclick="toggle_visibility('loading');"/>
</p>
<?php
if ($EnableBackups == '1') { ?>
<p alt="Backup all user submitted data." title="Backup all user submitted data." style="padding-left:15px;"> Backup User Data: </p>
<p style="float:center; padding-left:10%;"><input type='submit' name='backupUserDataNow' id='backupUserDataNow' value='Backup Now' style="padding-left:30px; padding: 2px; border: 1px solid black" onclick="toggle_visibility('loading');"/></p>
<input type='hidden' id='backupNowToken' name='backupNowToken' value='<?php echo $BackupToken; ?>'/>
<?php } ?>
<p alt="Verify the permissions level, owner, and group of HRCloud2 controlled directories." title="Verify the permissions level, owner, and group of HRCloud2 controlled directories." style="padding-left:15px;"> Permissions Check:</p>
<p style="float:center; padding-left:10%;">
<input type='submit' name='CheckPermissions' id='CheckPermissions' value='Perms Check' style="padding: 2px; border: 1px solid black" onclick="toggle_visibility('loading');"/>
</p>
<p alt="Set the Apache User. (Default: www-data)" title="Set the Apache User. WARNING!!! Do not change unless you are confident your input is accurate. (Default: www-data)" style="padding-left:15px;"><strong></strong> Apache User: WARNING!!! Custom installations only. (Default: www-data)</p>
<p><input type='text' id="NEWApacheUser" name="NEWApacheUser" style="padding-left:30px; width:100%;" value="<?php echo $AUURL; ?>"></p>
<p alt="Set the Apache Group. (Default: www-data)" title="Set the Apache Group. WARNING!!! Do not change unless you are confident your input is accurate. (Default: www-data)" style="padding-left:15px;"><strong></strong> Apache Group: WARNING!!! Custom installations only. (Default: www-data)</p>
<p><input type='text' id="NEWApacheGroup" name="NEWApacheGroup" style="padding-left:30px; width:100%;" value="<?php echo $AGURL; ?>"></p>
<p alt="Options for performing virus scans on the server with ClamAV." title="Options for performing virus scans on the server with ClamAV." style="padding-left:15px;"> Virus Scanning (Requires ClamAV on server): </p>
<p style="float:center; padding-left:10%;"><input type='submit' name='Scan' id='Scan' value='Scan Cloud' style="padding-left:30px; padding: 2px; border: 1px solid black" onclick="toggle_visibility('loading');"/></p>
<p>
<select id="NEWVirusScan" name="NEWVirusScan" style="padding-left:30px; width:100%;">
<option value="<?php echo $VirusScan; ?>">Current (<?php echo $VSURL; ?>)</option>
<option value="1">Enabled</option>
<option value="0">Disabled</option>
</select>
</p>
<p alt="Options to enable high performance (Multithreaded) A/V scanning." title="Options to enable high performance (Multithreaded) A/V scanning." style="padding-left:15px; width:100%;"> High Performance A/V Scanning (Multi-threading): </p>
<p>
<select id="NEWHighPerformanceAV" name="NEWHighPerformanceAV" style="padding-left:30px; width:100%;">
<option value="<?php echo $HighPerformanceAV; ?>">Current (<?php echo $HPAVURL; ?>)</option>
<option value="1">Enabled</option>
<option value="0">Disabled</option>
</select>
</p>
<p alt="Options to enable thorough A/V scanning (May require advanced ClamAV permission configuration)." title="Options to enable thorough A/V scanning (May require advanced ClamAV permission configuration)." style="padding-left:15px;"> Thorough A/V Scanning: </p>
<p>
<select id="NEWThoroughAV" name="NEWThoroughAV" style="padding-left:30px; width:100%;">
<option value="<?php echo $ThoroughAV; ?>">Current (<?php echo $TAVURL; ?>)</option>
<option value="1">Enabled</option>
<option value="0">Disabled</option>
</select>
</p>
<p alt="Options to enable persistent A/V scanning (Will attempt to be as aggressive as possible without causing errors)." title="Options to enable persistent A/V scanning (Will attempt to be as aggressive as possible without causing errors)." style="padding-left:15px;"> Persistent A/V Scanning: </p>
<p>
<select id="NEWPersistentAV" name="NEWPersistentAV" style="padding-left:30px; width:100%;">
<option value="<?php echo $PersistentAV; ?>">Current (<?php echo $PAVURL; ?>)</option>
<option value="1">Enabled</option>
<option value="0">Disabled</option>
</select>
</p>
<p alt="Options to enable a Privacy Policy button on the Help page." title="Options to enable a Privacy Policy button that links to an admin supplied URL." style="padding-left:15px;"> Privacy Policy URL: </p>
<p>
<select id="NEWEnablePrivacyPolicyURL" name="NEWEnablePrivacyPolicyURL" style="padding-left:30px; width:100%;" onchange="selectChanged('NEWEnablePrivacyPolicyURL', 'NEWPrivacyPolicyURL');">
<option value="<?php echo $PPEnableURL; ?>">Current (<?php echo $PPEURL; ?>)</option>
<option value="1">Enabled</option>
<option value="0">Disabled</option>
</select>
</p>
<p><input type='text' id="NEWPrivacyPolicyURL" name="NEWPrivacyPolicyURL" style="padding-left:30px; width:100%;" value="<?php echo $PrivacyPolicyURL; ?>"<?php echo $PPDisabledAtt; ?>></p>
<p alt="Options to enable a Terms Of Service button on the Help page." title="Options to enable a Terms Of Service button that links to an admin supplied URL." style="padding-left:15px;"> Terms Of Service URL: </p>
<p>
<select id="NEWEnableTermsOfServiceURL" name="NEWEnableTermsOfServiceURL" style="padding-left:30px; width:100%;" onchange="selectChanged('NEWEnableTermsOfServiceURL', 'NEWTermsOfServiceURL');">
<option value="<?php echo $TOSEnableURL; ?>">Current (<?php echo $TOSEURL; ?>)</option>
<option value="1">Enabled</option>
<option value="0">Disabled</option>
</select>
</p>
<p><input type='text' id="NEWTermsOfServiceURL" name="NEWTermsOfServiceURL" style="padding-left:30px; width:100%;" value="<?php echo $TermsOfServiceURL; ?>"<?php echo $TOSDisabledAtt; ?>></p>
<?php }
// / -----------------------------------------------------------------------------------
?>
<div align="center" id="loading" name="loading" style="display:none;"><p><img src="Resources/logosmall.gif" /></p></div>
<hr />
<div align='center'>
<p><input type='submit' name='Save' id='Save' value='Save Changes' style="padding: 2px; border: 1px solid black" onclick="toggle_visibility('loading');"/>
<input type='submit' name='LoadDefaults' id='LoadDefaults' value='Load Defaults' style="padding: 2px; border: 1px solid black" onclick="toggle_visibility('loading');"/>
<input type="hidden" name='YUMMYSaltHash' id='YUMMYSaltHash' value="<?php echo $SaltHash; ?>"></p>
</div>
</form>
<div align='center'>
<form action="settingsCore.php">
<p><input type='submit' name='Clear' id='Clear' value='Clear Changes' style="padding: 2px; border: 1px solid black"></p>
</form>
</div>
<div id='end' name='end' class='end'>
</div>
</div>
<hr />
<p id="verisoninfo" name="versioninfo" onclick="window.open('http://www.HonestRepair.net/')" align="center"><small><i>HRCloud2 <?php echo $Version; ?> by <u>HonestRepair</u></small></i></p>
<hr />
</div>
</body>
</html>