| Server IP : 61.19.30.66 / Your IP : 216.73.216.59 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /var/www/gpa/chat/ |
Upload File : |
<?
//ไม่ได้กำหนด user มาแสดงว่าไม่ได้ผ่านการ login ไป login
if (empty($user) || $user=="") {
echo "<META HTTP-EQUIV=refresh CONTENT=\"0; URL=index.php\">";
exit();
}
$timedat="$data$roomname.time"; //ไฟล์บันทึกเวลา cache usertime|contenttime
$contentdat="$data$roomname.dat"; //ไฟล์ข้อมูล sender|id|reciver|event|content
$usersfile="$data$roomname.user"; //ไฟล์บันทึกรายชื่อ user ในห้อง user|ip|id|time
//สร้างไฟล์เปล่าๆ ถ้าติดตั้งครั้งแรก
if (!file_exists($timedat)) {
$f=fopen($timedat, "w");
fputs($f, "0\n0");
fclose($f);
}
if (!file_exists($contentdat)) {
$f=fopen($contentdat, "w");
fclose($f);
}
if (!file_exists($usersfile)) {
$f=fopen($usersfile, "w");
fclose($f);
}
?>
<html>
<head>
<title><?="$title [".$room[$roomname]."]";?></title>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<link href=skin/style.css rel=stylesheet type=text/css>
</head>
<body background=skin/img/bkg.jpg>
<div id=user class=hidden><?=$user?></div>
<div id=id class=hidden>0</div>
<div id=refreshtime class=hidden><?=$refreshtime?></div>
<div id=room class=hidden><?=$roomname?></div>
<div id=time class=hidden>0</div>
<div id=data class=hidden>0</div>
<!--ตาราง พื้นที่แสดงผล เพื่อปรับขนาดพื้นที่ให้อยู่ตรงกลางจอภาพ-->
<table border=0 cellpadding=0 cellspacing=0 width=100% height=100%>
<tr><td> </td></tr>
<tr><td align=center><font face=tahoma size=2 color=#666666>ยินดีต้อนรับสู่ <font face="Comic Sans MS"><font color=red size=5>gpa</font> Chat Room</font> <font color=#CCCCCC size=1>(beta)</font></font></td></tr>
<tr><td> </td></tr>
<td align=center valign=top>
<table border=0 cellpadding=0 cellspacing=1 bgcolor=#808080><tr><td>
<!--รูปร่างหน้าตาของ Chat Room-->
<?include("skin/index.php");?>
</td></tr></table>
</td></tr></table>
<script language='JavaScript' src=chat.js></script>
</body>
</html>
<?
$browser=$_SERVER['HTTP_USER_AGENT'];
if (strstr($browser, "Firefox") || strstr($browser, "Netscap")) { //Firefox, Netscap
echo "<embed name=online src=skin/online.wav autostart=false hidden=true loop=false volume=100 type=audio/midi></embed>\n";
echo "<embed name=logout src=skin/logout.wav autostart=false hidden=true loop=false volume=100 type=audio/midi></embed>\n";
echo "<embed name=type src=skin/type.wav autostart=false hidden=true loop=false volume=100 type=audio/midi></embed>\n";
} else echo "<span id=sound></span>\n";
?>