-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
816 lines (616 loc) · 24.9 KB
/
index.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
<?php
/**
* Copyright 2021, 2024 5 Mode
*
* This file is part of Msnger.
*
* Msnger is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Msnger 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. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Msnger. If not, see <https://www.gnu.org/licenses/>.
*
* index.php
*
* Msnger home page.
*
* @author Daniele Bonini <my25mb@aol.com>
* @copyrights (c) 2021, 2024, 5 Mode
*/
require "init.inc";
$contextType = PUBLIC_CONTEXT_TYPE;
$signHistory = [];
$cmd = PHP_STR;
$opt = PHP_STR;
$param1 = PHP_STR;
$param2 = PHP_STR;
$param3 = PHP_STR;
$curLocale = APP_LOCALE;
$lastSign = PHP_STR;
function showHistory() {
global $signHistory;
global $curPath;
global $CONFIG;
global $curLocale;
global $LOCALE;
global $lastSign;
global $password;
global $contextType;
$signHistoryCopy = $signHistory;
rsort($signHistoryCopy);
$m = 1;
foreach($signHistoryCopy as $val) {
$val = rtrim($val, "\n");
$ipos=mb_stripos($val, "|");
$mydate = left($val,$ipos);
$lenmydate = strlen($mydate);
if ($lenmydate > 15) {
$mydate = left($mydate,15);
$lenmydate = 10;
}
$filling = str_repeat(" ", 15 - $lenmydate);
$mydate = $filling . $mydate;
$ipos2=mb_strripos($val, "|");
$mydesc = substr($val, $ipos+1, (($ipos2 - $ipos) - 1));
$mydesc = enableLinks($mydesc);
$aflag = substr($val, $ipos2+1, 1);
// If I'm in admin
if ($contextType === PERSONAL_CONTEXT_TYPE) {
$adminFnc = PHP_STR;
if ($aflag === "u") {
$adminFnc = "<a href='#' onclick=\"confSign('" . $val . "')\"><img src='/MSN_res/confirm.png' style='width:36px;'></a>";
} else {
$adminFnc = "<a href='#' onclick=\"delSign('" . $val . "')\"><img src='/MSN_res/del.png' style='width:36px;'></a>";
}
// Display event list
echo("<table style='width:95%; border:0;' align='center'>");
echo("<tr>");
echo("<td style='width:24%; text-align:right; vertical-align:top; padding-top:4px; padding-right:12px; white-space:nowrap;'>");
echo("<span style='font-family:".DISPLAY_DATE_FONT.";font-size:11px; font-weight:900; white-space:nowrap;'>".$mydate."</span>");
echo("</td>");
echo("<td style='width:66%; text-align:left; vertical-align:top; padding-top:5px; padding-left:1px; border-bottom: 1px dashed gray; font-size:11px;'>");
echo($mydesc);
echo("</td>");
echo("<td style='width:10%; text-align:center;padding-left:8px;padding-top:2px'>");
echo($adminFnc);
echo("</td>");
echo("</tr>");
echo("</table>");
// If I'm not in admin
} else {
if ($aflag !== "u") {
// Display event list
echo("<table style='width:95%; border:0;' align='center'>");
echo("<tr>");
echo("<td style='width:24%; text-align:right; vertical-align:top; padding-top:4px; padding-right:12px; white-space:nowrap;'>");
echo("<span style='font-family:".DISPLAY_DATE_FONT.";font-size:11px; font-weight:900; white-space:nowrap;'>".$mydate."</span>");
echo("</td>");
echo("<td style='width:76%; text-align:left; vertical-align:top; padding-top:5px; padding-left:15px; font-size:11px;'>");
echo($mydesc);
echo("</td>");
echo("</tr>");
echo("</table>");
//echo("<span style='font-family:".DISPLAY_DATE_FONT.";font-size:38px;'>".$mydate."</span>,".PHP_SPACE.$mydesc."<br>");
}
}
$m++;
}
}
function updateHistory(&$update, $maxItems) {
global $signHistory;
global $curPath;
// Making enough space in $signHistory for the update..
$shift = (count($signHistory) + count($update)) - $maxItems;
if ($shift > 0) {
$signHistory = array_slice($signHistory, $shift, $maxItems);
}
// Adding $signHistory update..
if (count($update) > $maxItems) {
$beginUpd = count($update) - ($maxItems-1);
} else {
$beginUpd = 0;
}
$update = array_slice($update, $beginUpd, $maxItems);
foreach($update as $val) {
$signHistory[] = $val;
}
// Writing out $signHistory on disk..
$filepath = $curPath . DIRECTORY_SEPARATOR . ".MSN_history";
file_put_contents($filepath, implode('', $signHistory));
}
function updatecaptchaHistory(&$update) {
global $captchaHistory;
global $curPath;
foreach($update as $val) {
$captchaHistory[] = $val;
}
// Writing out $captchaHistory on disk..
$filepath = $curPath . DIRECTORY_SEPARATOR . ".MSN_captchahistory";
file_put_contents($filepath, implode('', $captchaHistory));
}
function parseCommand() {
global $command;
global $cmd;
global $opt;
global $param1;
global $param2;
global $param3;
$str = trim($command);
$ipos = stripos($str, PHP_SPACE);
if ($ipos > 0) {
$cmd = left($str, $ipos);
$str = substr($str, $ipos+1);
} else {
$cmd = $str;
return;
}
if (left($str, 1) === "-") {
$ipos = stripos($str, PHP_SPACE);
if ($ipos > 0) {
$opt = left($str, $ipos);
$str = substr($str, $ipos+1);
} else {
$opt = $str;
return;
}
}
if (left($str, 1) === "'") {
$ipos = stripos($str, "'", 1);
if ($ipos > 0) {
$param1 = substr($str, 0, $ipos+1);
$str = substr($str, $ipos+1);
} else {
$param1 = $str;
return;
}
} else {
$ipos = stripos($str, PHP_SPACE);
if ($ipos > 0) {
$param1 = left($str, $ipos);
$str = substr($str, $ipos+1);
} else {
$param1 = $str;
return;
}
}
$ipos = stripos($str, PHP_SPACE);
if ($ipos > 0) {
$param2 = left($str, $ipos);
$str = substr($str, $ipos+1);
} else {
$param2 = $str;
return;
}
$ipos = stripos($str, PHP_SPACE);
if ($ipos > 0) {
$param3 = left($str, $ipos);
$str = substr($str, $ipos+1);
} else {
$param3 = $str;
return;
}
}
function msgParamValidation() {
global $opt;
global $param1;
global $param2;
global $param3;
global $date;
global $desc;
global $captchacount;
global $captchasign;
global $captchaHistory;
//opt!=""
if ($opt!==PHP_STR) {
echo("WARNING: invalid options<br>");
return false;
}
//param1==""
if ($param1!==PHP_STR) {
echo("WARNING: invalid parameters<br>");
return false;
}
//param2==""
if ($param2!==PHP_STR) {
echo("WARNING: invalid parameters<br>");
return false;
}
//param3==""
if ($param3!==PHP_STR) {
echo("WARNING: invalid parameters<br>");
return false;
}
//date!=""
if ($date===PHP_STR || strlen($date)<4) {
//echo("WARNING: invalid date<br>");
return false;
}
//place!=""
if ($desc===PHP_STR || strlen($desc)<4) {
//echo("WARNING: invalid desc<br>");
return false;
}
$rescaptcha1=$captchacount>=4;
$rescaptcha2=count(array_filter($captchaHistory, "odd")) > (APP_MAX_FROM_IP - 1);
//if ($rescaptcha1) {
// echo("WARNING: captcha expired #1<br>");
//}
//if ($rescaptcha2) {
// echo("WARNING: captcha expired #2<br>");
//}
///if ($rescaptcha1 || $rescaptcha2) {
//if ($rescaptcha1) {
// return false;
//}
return true;
}
function odd($val) {
global $captchasign;
return rtrim($val,"\n") == $captchasign;
}
function myExecMsgCommand() {
global $date;
global $desc;
global $curPath;
global $lastMessage;
global $captchacount;
global $captchasign;
global $captchaHistory;
$newSign = HTMLencodeF($date,false) . "|" . HTMLencodeF($desc,false) . "|u";
//echo("array_filter=".count(array_filter($captchaHistory, "odd"))."<br>");
//echo("new_sign?=".((hash("sha256", $newSign . APP_SALT, false) !== $lastMessage)?"true":"false")."<br>");
if (hash("sha256", $newSign . APP_SALT, false) !== $lastMessage) {
// Updating message history..
$output = [];
$output[] = $newSign . "\n";
updateHistory($output, HISTORY_MAX_ITEMS);
// Updating captcha history..
$output = [];
$output[] = $captchasign . "\n";
updatecaptchaHistory($output);
$lastMessage = hash("sha256", $newSign . APP_SALT, false);
}
}
function confParamValidation() {
global $opt;
global $param1;
global $param2;
global $param3;
global $signHistory;
//opt!=""
if ($opt!==PHP_STR) {
echo("WARNING: invalid options<br>");
return false;
}
$myval = trim($param1,"'");
//param1!=""
if ($myval===PHP_STR) {
echo("WARNING: invalid parameters<br>");
return false;
}
//param1 in $signHistory
if (!in_array($myval."\n",$signHistory)) {
echo("WARNING: invalid parameters<br>");
return false;
}
//param2==""
if ($param2!==PHP_STR) {
echo("WARNING: invalid parameters<br>");
return false;
}
//param3==""
if ($param3!==PHP_STR) {
echo("WARNING: invalid parameters<br>");
return false;
}
return true;
}
function myExecConfSignCommand() {
global $param1;
global $signHistory;
global $curPath;
$mysign = trim($param1,"'");
if ($signHistory) {
//echo("inside myExecConfSignCommand()");
$newval = left($mysign, strlen($mysign)-2) . "|v";
$key = array_search($mysign."\n", $signHistory);
if ($key !== false) {
$signHistory[$key] = $newval . "\n";
// Writing out $signHistory on disk..
$filepath = $curPath . DIRECTORY_SEPARATOR . ".MSN_history";
file_put_contents($filepath, implode('', $signHistory));
}
}
}
function delParamValidation() {
global $opt;
global $param1;
global $param2;
global $param3;
global $signHistory;
//opt!=""
if ($opt!==PHP_STR) {
echo("WARNING: invalid options<br>");
return false;
}
$myval = trim($param1,"'");
//param1!=""
if ($myval===PHP_STR) {
echo("WARNING: invalid parameters<br>");
return false;
}
//param1 in $signHistory
if (!in_array($myval."\n",$signHistory)) {
echo("WARNING: invalid parameters<br>");
return false;
}
//param2==""
if ($param2!==PHP_STR) {
echo("WARNING: invalid parameters<br>");
return false;
}
//param3==""
if ($param3!==PHP_STR) {
echo("WARNING: invalid parameters<br>");
return false;
}
return true;
}
function myExecDelSignCommand() {
global $param1;
global $signHistory;
global $curPath;
$mysign = trim($param1,"'");
if ($signHistory) {
//echo("inside myExecDelSignCommand()");
$newval = left($mysign, strlen($mysign)-2) . "|u";
$key = array_search($mysign."\n", $signHistory);
if ($key !== false) {
$signHistory[$key] = $newval . "\n";
// Writing out $signHistory on disk..
$filepath = $curPath . DIRECTORY_SEPARATOR . ".MSN_history";
file_put_contents($filepath, implode('', $signHistory));
}
}
}
$curPath = APP_DATA_PATH;
chdir($curPath);
$signHistory = file($curPath . DIRECTORY_SEPARATOR . ".MSN_history");
$captchaHistory = file($curPath . DIRECTORY_SEPARATOR . ".MSN_captchahistory");
$password = filter_input(INPUT_POST, "Password")??"";
$password = strip_tags($password);
if ($password==PHP_STR) {
$password = filter_input(INPUT_POST, "Password2")??"";
$password = strip_tags($password);
}
$command = filter_input(INPUT_POST, "CommandLine")??"";
$command = strip_tags($command);
//$pwd = filter_input(INPUT_POST, "pwd");
$hideSplash = filter_input(INPUT_POST, "hideSplash")??"";
$hideSplash = strip_tags($hideSplash);
$hideHCSplash = filter_input(INPUT_POST, "hideHCSplash")??"";
$hideHCSplash = strip_tags($hideHCSplash);
$date = filter_input(INPUT_POST, "date")??"";
$desc = filter_input(INPUT_POST, "desc")??"";
$captchasign = hash("sha256", $_SERVER["REMOTE_ADDR"] . date("Y") . APP_SALT, false);
$lastMessage = filter_input(INPUT_POST, "last_message")??"";
$lastMessage = strip_tags($lastMessage);
$totsigns = count($signHistory);
//print_r($totsigns);
//exit(0);
if ($totsigns > 0) {
$lastMessage = hash("sha256", rtrim($signHistory[$totsigns-1],"\n") . APP_SALT, false);
}
$captchacount = (int)filter_input(INPUT_POST, "captcha_count")??"";
$captchacount = strip_tags($captchacount);
//if ($captchacount === 0) {
// $captchacount = 1;
//}
if ($password !== PHP_STR) {
$hash = hash("sha256", $password . APP_SALT, false);
if ($hash !== APP_HASH) {
$password=PHP_STR;
}
}
parseCommand($command);
//echo("cmd=" . $cmd . "<br>");
//echo("opt=" . $opt . "<br>");
//echo("param1=" . $param1 . "<br>");
//echo("param2=" . $param2 . "<br>");
if ($password !== PHP_STR) {
if (mb_stripos(CMDLINE_VALIDCMDS, "|" . $command . "|")) {
if ($cmd === "msg") {
$captchacount = $captchacount + 1;
if (msgParamValidation()) {
myExecMsgCommand();
}
} else if ($command === "refresh") {
// refreshing Msg Board..
}
} else if (mb_stripos(CMDLINE_VALIDCMDS, "|" . $cmd . "|")) {
if ($cmd === "del") {
if (delParamValidation()) {
myExecDelSignCommand();
}
} else if ($cmd === "conf") {
if (confParamValidation()) {
myExecConfSignCommand();
}
}
} else {
}
$contextType = PERSONAL_CONTEXT_TYPE;
} else {
/*
if (mb_stripos(CMDLINE_VALIDCMDS, "|" . $command . "|")) {
if ($cmd === "sign") {
$captchacount = $captchacount + 1;
if (msgParamValidation()) {
myExecMsgCommand();
}
}
}*/
}
?>
<!DOCTYPE html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!--
Copyright 2021, 2024 5 Mode
This file is part of Msnger.
Msnger is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Msnger 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Msnger. If not, see <https://www.gnu.org/licenses/>.
-->
<title><?php echo(APP_TITLE); ?></title>
<link rel="shortcut icon" href="/favicon.ico?v=<?php echo(time()); ?>>" />
<meta name="description" content="<?php echo(APP_DESCRIPTION); ?>"/>
<meta name="keywords" content="<?php echo(APP_KEYWORDS); ?>"/>
<meta name="author" content="5 Mode"/>
<meta name="robots" content="index,follow"/>
<script src="/MSN_js/jquery-3.6.0.min.js" type="text/javascript"></script>
<script src="/MSN_js/common.js" type="text/javascript"></script>
<script src="/MSN_js/bootstrap.min.js" type="text/javascript"></script>
<script src="/MSN_js/index.js" type="text/javascript" defer></script>
<link href="/MSN_css/bootstrap.min.css" type="text/css" rel="stylesheet">
<link href="/MSN_css/style.css" type="text/css" rel="stylesheet">
<style>
@import url('https://fonts.googleapis.com/css2?family=<?php echo(str_ireplace(" ","+",DISPLAY_DATE_FONT));?>');
</style>
</head>
<body style="<?php echo(DISPLAY_BODY_CSS);?>">
<form id="frmHC" method="POST" action="/" target="_self" enctype="multipart/form-data">
<?php if(APP_USE === "PRIVATE"): ?>
<div class="header" style="background-color:#ffffff;z-index:90;">
<a id="burger-menu" href="#" style="display:none;"><img src="/MSN_res/burger-menu2.png" style="width:58px;"></a><a id="ahome" href="https://par7133.github.io/Msnger/" target="_blank" style="color:black; text-decoration: none;"><img id="logo-hmm" src="/MSN_res/HLlogo.png" style="width:48px;"> Homolog</a> <a id="agithub" href="https://github.com/par7133/Msnger" style="color:#000000"><span style="color:#119fe2">on</span> github</a> <a id="afeedback" href="mailto:posta@elettronica.lol" style="color:#000000"><span style="color:#119fe2">for</span> feedback</a> <a id="asupport" href="tel:+39-331-4029415" style="font-size:13px;background-color:#15c60b;border:2px solid #15c60b;color:black;height:27px;text-decoration:none;"> get support </a><div id="pwd2" style="float:right;position:relative;top:+13px;display:none"><input type="password" id="Password2" name="Password2" placeholder="password" style="font-size:13px; background:#393939; color:#ffffff; width: 125px; border-radius:3px;" value="" autocomplete="off"></div>
</div>
<?php else: ?>
<div class="header2" style="margin:0;padding:0;border-bottom:0px;text-align:center;">
<?php echo(APP_CUSTOM_HEADER); ?>
</div>
<?php endif; ?>
<div style="clear:both;margin:auto"> </div>
<?php
$callSideBarTOP = 1;
if(APP_USE === "PRIVATE") {
$callSideBarTOP = 65;
}
?>
<div id="call-sidebar" style="position:absolute; top:<?php echo($callSideBarTOP);?>px; left:1px; clear:both; float:left; width:1.5%; max-width:5px; height:100%; min-height:1900px; text-align:center; border-right: 1px solid #2c2f34;z-index:1;">
</div>
<div id="sidebar" style="position:absolute; left:6px; top:0px; clear:both; background-color:#FFFFFF; padding:8px; width:25%; max-width:250px; height:100%; text-align:center; border-right: 1px solid #2c2f34; display:none;z-index:91;">
<button type="button" class="close" aria-label="Close" onclick="closeSideBar();" style="position:relative; left:-10px;">
<span aria-hidden="true">×</span>
</button>
<br><br>
<img src="/MSN_res/MSNgenius.png" alt="MSN Genius" title="MSN Genius" style="position:relative; left:+1px; width:90%; border: 1px dashed #EEEEEE;">
<br><br>
<div style="text-align:left;white-space:nowrap;">
<input type="password" id="Password" name="Password" class="sidebarcontrol" placeholder="password" style="font-size:13px; width: 60%; border-radius:3px;" value="<?php echo($password);?>" autocomplete="off"> <input type="submit" class="sidebarcontrol" value="<?php echo(getResource("Go", $curLocale));?>" style="width:24%; height: 25px;background-color:lightgray;color:#000000;"><br>
<input type="text" id="Salt" class="sidebarcontrol" placeholder="salt" style="position:relative; top:+5px; font-size:13px; width: 90%; border-radius:3px;" autocomplete="off"><br>
<div style="text-align:center;">
<a href="#" onclick="showEncodedPassword();" style="position:relative; left:-2px; top:+5px; color:#000000; font-size:12px;"><?php echo(getResource("Hash Me", $curLocale));?>!</a>
<br><br><br>
</div>
</div>
</div>
<div id="contentbar" style="width:100%;float:left;">
<?php if (APP_SPLASH): ?>
<?php if ($hideSplash !== PHP_STR): ?>
<div id="splash" style="color:black; border-radius:20px; position:relative; left:+3px; width:98%; background-color: #33aced; padding: 20px; margin-bottom:8px;">
<button type="button" class="close" aria-label="Close" onclick="closeSplash();" style="position:relative; left:-10px;">
<span aria-hidden="true">×</span>
</button>
Hello and welcome to Msnger!<br><br>
Msnger is a light and simple software on premise to twit short/long messages.<br><br>
Msnger is released under GPLv3 license, it is supplied AS-IS and we do not take any responsibility for its misusage.<br><br>
First step, use the left side panel password and salt fields to create the hash to insert in the config file. Remember to manually set there also the salt value.<br><br>
As you are going to run Msnger in the PHP process context, using a limited web server or phpfpm user, you must follow some simple directives for an optimal first setup:<br>
<ol>
<li>Check the permissions of your "data" folder in your web app private path; and set its path in the config file.</li>
<li>In the data path create a ".MSN_history" and ".MSN_captchahistory" files and give them the write permission.</li>
<li>Finish to setup the configuration file apporpriately, in the specific:</li>
<ul>
<li>Configure the APP_USE appropriately.</li>
<li>Configure the DISPLAY attributes as required.</li>
<li>Configure the max history items as required (default: 100).</li>
</ul>
</ol>
<br>
Hope you can enjoy it and let us know about any feedback: <a href="mailto:info@msnger.org" style="color:#e6d236;">info@msnger.org</a>
</div>
<?php endif; ?>
<?php endif; ?>
<div style="width:100%; padding: 1px; text-align:center; font-size:11px; border:0px solid red;">
<br>
<?php if (APP_DEFAULT_CONTEXT === "PRIVATE"): ?>
<?php if ($contextType === PUBLIC_CONTEXT_TYPE): ?>
<div style="padding:30px; font-size:14px;margin-bottom:13px;font-weight:900;"><?php echo(APP_GUEST_MSG??" "); ?></div>
<?php else: ?>
<div style="font-size:14px;margin-bottom:13px;font-weight:900;"><?php echo(APP_WELCOME_MSG??" "); ?></div>
<br>
<input type="text" id="date" name="date" class="standardcontrol" placeholder="Date" value="<?php echo(date("Y-m-d"));?>" style="min-width:90px;max-width:170px;width:15%;"> <input type="text" id="desc" name="desc" class="standardfield" placeholder="Message" style="width:55%;max-width:630px;" maxlength="300"><br>
<input type="button" id="send" name="send" value=" <?php echo(DISPLAY_SUBMIT_BUTTON);?> " title="<?php echo(DISPLAY_SUBMIT_BUTTON);?>" style="position:relative;top:+18px;margin-top:5px;height:33px;background-color:red;border:1px solid black;color:white;font-size:medium;">
<br><br>
<hr style="color:black; margin-top:30px;">
<br>
<?php showHistory(); ?>
<?php endif; ?>
<?php else: ?>
<?php if ($contextType === PUBLIC_CONTEXT_TYPE): ?>
<div style="font-size:14px;margin-bottom:3px;font-weight:900;"><?php echo(APP_WELCOME_MSG??" "); ?></div>
<hr style="color:black; margin-top:30px;">
<br>
<?php showHistory(); ?>
<?php else: ?>
<div style="font-size:14px;margin-bottom:13px;font-weight:900;"><?php echo(APP_WELCOME_MSG??" "); ?></div>
<br>
<input type="text" id="date" name="date" class="standardcontrol" placeholder="Date" value="<?php echo(date("Y-m-d"));?>" style="min-width:90px;max-width:170px;width:15%;"> <input type="text" id="desc" name="desc" class="standardcontrol" placeholder="Message" style="width:55%;max-width:630px;" maxlength="300"><br>
<input type="button" id="send" name="send" value=" <?php echo(DISPLAY_SUBMIT_BUTTON);?> " title="<?php echo(DISPLAY_SUBMIT_BUTTON);?>" style="position:relative;top:+18px;margin-top:5px;height:33px;background-color:red;border:1px solid black;color:white;font-size:medium;">
<br><br>
<hr style="color:black; margin-top:30px;">
<br>
<?php showHistory(); ?>
<?php endif; ?>
<?php endif; ?>
<br><br><br>
<?php if(APP_USE === "BUSINESS"): ?>
<div style="font-size:23px">
<a id="ahome" href="https://github.com/par7133/Msnger" target="_blank" style="color:black;"><img id="logo-hl" src="/MSN_res/MSNlogo.png" style="position:relative;top:-25px;width:48px;margin:5px;">Powered by Msnger</a>
</div>
<?php endif; ?>
</div>
</div>
<input type="hidden" id="CommandLine" name="CommandLine">
<input type="hidden" name="hideSplash" value="<?php echo($hideSplash); ?>">
<input type="hidden" name="hideHCSplash" value="1">
<input type="hidden" name="captcha_count" value="<?php echo($captchacount); ?>">
<input type="hidden" name="last_message" value="<?php echo($lastMessage); ?>">
</form>
<!--
<div class="footer">
<div id="footerCont"> </div>
<div id="footer"><span style="background:#FFFFFF;opacity:1.0;margin-right:10px;"> A <a href="http://5mode.com">5 Mode</a> project <span class="no-sm">and <a href="http://wysiwyg.systems">WYSIWYG</a> system</span>. Some rights reserved.</span></div>
</div>
-->
<?php if (file_exists(APP_PATH . DIRECTORY_SEPARATOR . "metrics.html")): ?>
<?php include("metrics.html"); ?>
<?php endif; ?>
</body>
</html>