='00' and $h<='04') {
echo 'Chúc 1 đêm yên bình!
';
}
if ($h>='05' and $h<='10') {
echo 'Chào buổi sáng!
';
}
if ($h>='11' and $h<='17') {
echo 'Chúc một ngày tốt lành!
';
}
if ($h>='18' and $h<='23') {
$title="Chào buổi tối!
";
}
echo '
';
if ($file=@file_get_contents('data/names.dat')) {
$array=explode('||',$file);
$all=count($array);
} else { $all=0; }
echo '
Thành viên: '.$all.'
';
echo '
';
} else {
$title='Phòng chat | '.$url.'™ ('.date("H:i | d.m.Y",time()).')';
include 'head.php';
if (!empty($_GET['i'])) {
$str=$_GET['i'];
$file=file("data/$id.dat");
$count=count($file);
$str=$count-$str;
$str=trim($file[$str]);
$arr=explode('||',$str);
$num=$arr[6];
$name=$arr[0];
$text='[quote]Trả lời [red]'.$name.'[/red] ('.$num.'):[/quote]
';
}
if (!empty($_COOKIE['name'])) {
$user_name=htmlspecialchars($_COOKIE['name']);
} else {
$user_name='';
}
$rand=rand(1111,9999);
$_SESSION['rand']=$rand;
echo '
';
echo '
';
$file=file('data/'.$id.'.dat');
$file=array_reverse($file);
$count=count($file);
$vsego=10;
$page_nav=ceil($count/$vsego);
$page=@$_GET['page']?$_GET['page']:1;
$end=$page*$vsego;
$start=$end-$vsego;
for ($i=$start; $i<$end; $i++) {
if (!empty($file[$i])) {
if ($i%2==0) {
echo '
';
} else {
echo '
';
}
$str=trim($file[$i]);
$array=explode('||',$str);
$name=$array[0];
$name=stripslashes($name);
$name=htmlspecialchars($name);
$time=$array[1];
$time=date("(H:i | d.m.y)", $time);
$text=$array[2];
$text=stripslashes($text);
$text=htmlspecialchars($text);
$text=str_replace('##$$##', '
',$text);
$text=smile($text);
$ip=$array[4];
$agent=$array[5];
$num=$array[6];
echo '
'.online_user($ip,$agent).' '.$time.'
'.$text.'
';
echo '
';
if (!empty($array[3])) {
echo '
Tệp tin: '.preg_replace('|^([0-9\_]{4})|','',$array[3]).' ('.ceil(filesize('upload/'.$array[3])/1024).'kb)
';
}
echo '
';
}}
if ($page_nav>1) {
echo '
';
}
if (!empty($url)) {
echo '
';
}
include 'foot.php';
?>