<? require'header.php';
require ('konkurscontrol.php');
$sql_online = mysql_query("SELECT * FROM users_online WHERE user!=''");
$sql_guests = mysql_query("SELECT * FROM users_online WHERE user=''");
?>
<div class="menucenter">
<center><b>Пользователи: </B></FONT><FONT color=#ff0000><B><?=mysql_num_rows($sql_online)?></B></FONT> чел.</b></center>

<table class='reyt' width='100%' border='0' cellpadding='0' cellspacing='0'>
<thead><tr>
<th align="center" width='33%'>IP</th>
<th align="center" width='33%'>Имя</th>
<th align="center" width='33%'>Страница</th>
</tr></thead>
<?php
while ($row = mysql_fetch_assoc($sql_online)) {
$user=$row["user"];
$ip=$row["visitor"];
$pageurl=$row["urlpage"];

print"<tbody><tr>
<td class='value' align='center' >$ip</td>
<td class='value' align='center' >$user</td>
<td class='value' align='center' >$pageurl</td>
</tr>";
}
?>
</tbody></table>
<br>
<center>
<center><b>Гости: </B></FONT><FONT color=#ff0000><B><?=mysql_num_rows($sql_guests)?></B></FONT> чел.</b></center>
<table class='reyt' width='100%' border='0' cellpadding='0' cellspacing='0'>
<thead><tr>
<th align="center" width='33%'>IP</th>
<th align="center" width='33%'>Имя</th>
<th align="center" width='33%'>Страница</th>
</tr></thead>
<?
while ($row = mysql_fetch_assoc($sql_guests)) {
$ip=$row["visitor"];
$pageurl=$row["urlpage"];

print"<tbody><tr>
<td class='value' align='center' >$ip</td>
<td class='value' align='center' >*Неизвестно*</td>
<td class='value' align='center' >$pageurl</td>
</tr>";
}
?>
</tbody></table>
</div>
<p>&nbsp;</p>
<? require 'footer.php'; ?>