6 |
kaklik |
1 |
<?php
|
|
|
2 |
include "config.php";
|
|
|
3 |
include "incl/header.inc";
|
|
|
4 |
check_user();
|
|
|
5 |
|
|
|
6 |
$online_users='';
|
|
|
7 |
$added=0;$sound=0;
|
|
|
8 |
if(!isset($last)){$last=0;}
|
|
|
9 |
|
|
|
10 |
$fs=refresh_online($name,0);
|
|
|
11 |
$array_length=count($fs);
|
|
|
12 |
$fs[$array_length]="$name:|:$timestamp:|:$REMOTE_ADDR";
|
|
|
13 |
sort($fs);
|
|
|
14 |
|
|
|
15 |
for($i=0;$i<($array_length+1);$i++){
|
|
|
16 |
if(isset($fs[$i])&&strlen($fs[$i])>9){
|
|
|
17 |
$row=explode(":|:",$fs[$i]);
|
|
|
18 |
$show_ip=explode('.',$row[2]);
|
|
|
19 |
$title="*.*.$show_ip[2].$show_ip[3]";
|
|
|
20 |
$online_users=$online_users."usr('$row[0]','$title');";
|
|
|
21 |
}}
|
|
|
22 |
|
|
|
23 |
$fs=implode("\n",$fs);
|
|
|
24 |
save_file($usr_file,$fs,0);
|
|
|
25 |
|
|
|
26 |
if(isset($entry)&&strlen($entry)>0&&strlen($entry)<$entry_length+1){
|
|
|
27 |
include "incl/format_entry.inc";
|
|
|
28 |
$line="$timestamp:|:-:|:$name:|:$entry:|:$REMOTE_ADDR\n";
|
|
|
29 |
$fs=open_file($log_file,0);$fs=$line.$fs;
|
|
|
30 |
save_file($log_file,$fs,0);$added=1;
|
|
|
31 |
}
|
|
|
32 |
?>
|
|
|
33 |
</head><body class="y" onload="set_rtime()" onunload="clear_rtime()">
|
|
|
34 |
<table align="center" width="95%" class="t" cellpadding="0" cellspacing="0"><tr><td>
|
|
|
35 |
<table width="99%" cellpadding="0" cellspacing="0"><tr><td class="f">
|
|
|
36 |
<table width="100%" cellpadding="8" cellspacing="1">
|
|
|
37 |
<tr><td colspan="4" align="center" class="c"><?php print $room_name;?></td></tr>
|
|
|
38 |
<tr><td class="d" width="10%"> <?php print $lang[31];?> </td><td class="d" width="10%"> <?php print $lang[32];?> </td><td class="d" width="65%"> <?php print $lang[33];?> </td><td class="d" width="15%"> <?php print $lang[27];?> </td></tr>
|
|
|
39 |
<?php
|
|
|
40 |
if($added==0){
|
|
|
41 |
$fs=open_file($log_file,1);}
|
|
|
42 |
else{$fs=explode("\n",$fs);}
|
|
|
43 |
|
|
|
44 |
$print_lines=array();$j=0;
|
|
|
45 |
$array_length=count($fs);
|
|
|
46 |
|
|
|
47 |
if($array_length<$chat_lines){
|
|
|
48 |
$chat_lines=$array_length;}
|
|
|
49 |
|
|
|
50 |
$no_messages="<tr class=\"$row_bg\"><td colspan=\"3\" class=\"l\">$lang[36]</td>";
|
|
|
51 |
$online_users="<td rowspan=\"$chat_lines\" class=\"e\"><script type=\"text/javascript\">$online_users</script></td>";
|
|
|
52 |
|
|
|
53 |
for($i=0;$i<$array_length;$i++){
|
|
|
54 |
if($j==$chat_lines){break;}
|
|
|
55 |
|
|
|
56 |
if(isset($fs[$i])&&strlen($fs[$i])>9){
|
|
|
57 |
$row=explode(":|:",$fs[$i]);
|
|
|
58 |
|
|
|
59 |
$pop_user=$row[2];
|
|
|
60 |
|
|
|
61 |
if($j==0&&$last!=0&&$last<$row[0]&&$added==0){$sound=1;}
|
|
|
62 |
if($j==0){$last=$row[0];}
|
|
|
63 |
$user_time=show_time($row[0]);
|
|
|
64 |
$print_lines[$j]="<tr class=\"$row_bg\"><td class=\"l\">$user_time</td><td class=\"l\"><b>$pop_user</b></td><td>$row[3]</td>";
|
|
|
65 |
$j++;change_row_color();}
|
|
|
66 |
}
|
|
|
67 |
|
|
|
68 |
for($i=count($print_lines);$i>=0;$i--){
|
|
|
69 |
if(isset($print_lines[$i])&&strlen($print_lines[$i])>9){
|
|
|
70 |
print $print_lines[$i];
|
|
|
71 |
if($i==count($print_lines)-1){print $online_users;}
|
|
|
72 |
print "</tr>\n";}
|
|
|
73 |
elseif(count($print_lines)==0){print $no_messages.$online_users."</tr>\n";}
|
|
|
74 |
}
|
|
|
75 |
|
|
|
76 |
?></table></td></tr></table><table width="99%" cellpadding="0" cellspacing="0"><tr>
|
|
|
77 |
<td class="k"><?php $end_time=time_to_run();$total_time=substr(($end_time-$start_time),0,5);print $total_time.' '.$lang[19];?>
|
|
|
78 |
<script type="text/javascript"><?php print "set_last($last);";if($sound==1){print 'snd();';}?></script></td>
|
|
|
79 |
<td align="right" class="k"><a href="info.php?why=link" style="text-decoration:none" onclick="return time_win(<?php print $time_offset;?>)" title="<?php print $lang[24]?>"><?php print $local_time;?></a></td></tr></table>
|
|
|
80 |
</td></tr></table></body></html>
|