File size: 1.6Kb
<?
if($version == "wml")
{
header("Content-type: text/vnd.wap.wml; charset=utf-8");
echo(doctype("Онлайн").$tag);
}
elseif($version == "xhtml")
{
header("Content-type: text/html; charset=utf-8");
echo('<html>
<head>
<title>Online</title>
</head>
<body bgcolor="'.$style['background'].'" link="'.$style['link'].'" vlink="'.$style['link'].'" text="#000000">
<table align="center" border="0" cellspacing="1" cellpadding="5" width="350">
<tr align="center" bgcolor="'.$style['title'].'"><td colspan="2">
<font color="#FFFFFF"><b>Online</b></font>
</td></tr>
<tr bgcolor="'.$style['bottom'].'"><td></td></tr>
<tr bgcolor="'.$style['text'].'"><td>'.$tag);
}
$on = 1;
$onl = mysql_query("SELECT nickname FROM `session` WHERE `time` > ".(time() - (10 * 60)));
while($online = mysql_fetch_array($onl))
{
echo($on.'. ');
if($authorize)
{
echo('<a href="./?p=24&v='.$version.'&sid='.$sid.'&uid='.username2id($online['nickname']).'&d=1">'.$online['nickname'].'</a><br />');
}
$on++;
}
if($version == "wml")
{
if($authorize)
{
echo('<a href="./?p=0&v=wml&sid='.$sid.'">В форум</a>');
}
else
{
echo('<a href="./?p=0&v=wml">В форум</a>');
}
echo(''.$tagC.'</p></card></wml>');
} elseif($version == "xhtml")
{
echo($tagC.'</td></tr>
<tr bgcolor="'.$style['bottom'].'"><td>'.$tag.'');
if($authorize)
{
echo('<a href="./?p=0&v=xhtml&sid='.$sid.'">В форум</a>');
}
else
{
echo('<a href="./?p=0&v=xhtml">В форум</a>');
}
echo(''.$tagC.'</td></tr>
</table>
</body></html>');
}
?>