-
Notifications
You must be signed in to change notification settings - Fork 24
/
vc_chatlog.php
38 lines (33 loc) · 922 Bytes
/
vc_chatlog.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
<?php
//Public and private chat logs
$private=$_POST['private']; //private chat username, blank if public chat
$username=$_POST['u'];
$session=$_POST['s'];
$room=$_POST['r'];
$message=$_POST['msg'];
$time=$_POST['msgtime'];
//do not allow uploads to other folders
include_once("incsan.php");
sanV($room);
sanV($private);
sanV($session);
if (!$room) exit;
//generate same private room folder for both users
if ($private)
{
if ($private>$session) $proom=$session ."_". $private; else $proom=$private ."_". $session;
}
$dir="uploads";
if (!file_exists($dir)) mkdir($dir);
@chmod($dir, 0777);
$dir.="/$room";
if (!file_exists($dir)) mkdir($dir);
@chmod($dir, 0777);
if ($proom) $dir.="/$proom";
if (!file_exists($dir)) mkdir($dir);
@chmod($dir, 0777);
$day=date("y-M-j",time());
$dfile = fopen($dir."/Log$day.html","a");
fputs($dfile,$message."<BR>");
fclose($dfile);
?>loadstatus=1