Просмотр файла include/online.php

Размер файла: 2.05Kb
<?
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>');
}
if($version == "xhtml")
{
echo('<tr bgcolor="'.$style['bottom'].'"><td>');
}
$ar = array();
list($ar['max'], $ar['mdate']) = explode("<>", file_get_contents("online.txt"));
echo('Максимум онлайн: <b>'.$ar['max'].'</b> ('.$ar['mdate'].')');
if($version == "xhtml")
{
echo('</td></tr>');
echo('<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&amp;v='.$version.'&amp;sid='.$sid.'&amp;uid='.username2id($online['nickname']).'&amp;d=1">'.$online['nickname'].'</a>');
			}
			if($status == "moderator" || $status == "admin" && $version == "xhtml")
					{
					echo(' <a href="./?p=27&amp;mode=kick&amp;v='.$version.'&amp;sid='.$sid.'&amp;ids='.username2id($online['nickname']).'">[kick]</a>');
					}
			echo('<br />');
		$on++;
	}
  if($version == "wml")
  {
  	if($authorize)
{
echo('<a href="./?p=0&amp;v=wml&amp;sid='.$sid.'">В форум</a>');
}
else
{
echo('<a href="./?p=0&amp;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&amp;v=xhtml&amp;sid='.$sid.'">В форум</a>');
}
else
{
echo('<a href="./?p=0&amp;v=xhtml">В форум</a>');
}
echo(''.$tagC.'</td></tr>
</table>
</body></html>');
	}
?>