-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmessage.php
43 lines (34 loc) · 824 Bytes
/
message.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
<?php
header('Content-type: text/html; charset=utf-8');
if(!@file_exists('config.php') ) {
$links = array();
} else {
include_once('config.php');
}
$maxlines = 40;
require("chatlib.php");
if (isset($_GET['msg'])){
if (trim($_GET['msg'])!='')
{
writetolog('msg');
if (isset($_GET['msg']) and (strtolower(trim($_GET['msg'])) == 'clear')) {
unlink("msg.html");
}
$nick = isset($_GET['nick']) ? $_GET['nick'] : "Hidden";
$line = buildline($nick, $_GET['msg']);
addline2file($line);
echo "one," . stripslashes($line);
} else
{
echo "nul,nul";
}
} else if (isset($_GET['all'])) {
$flag = file('msg.html');
$content = "";
foreach ($flag as $value) {
$content .= stripslashes($value);
}
echo "all," . $content;
writetolog();
}
?>