www.pudn.com > coolchat.zip > chatlog.pl
sub Chat_log
{
print "Content-type: text/html\n\n";
print qq~
日志文件
聊天日志
~;
print "| 时间 | 房间 | 大小 |
\n";
if(opendir (DIR, "$chatdatadir/day"))
{
while ($file = readdir DIR)
{
next if ($file eq "." || $file eq "..");
next if (-d ("$chatdatadir/day/" . $file));
($filename,$ext) = split(/\./,$file);
($month,$day,$year,$room) = split(/-/,$filename);
next if(($room ne $UserData{'Room'})&&($UserData{'Group'} ne 99));
$size = -s "$chatdatadir/day/$file";
if($size > 1000)
{
$size = int(($size*10)/1000);
$size = $size/10;
$size = $size."K";
}
print qq{| $month-$day-$year | $room | $size |
};
}
closedir DIR;
}
print "
NET638 主题聊天室, (c) 1999-2002 苏州网通,程序制作:花无缺";
}
1;