File size: 2.94Kb
<?
$all_topics = mysql_result(mysql_query("SELECT COUNT(*) FROM themes"), 0);
$all_posts = mysql_result(mysql_query("SELECT COUNT(*) FROM posts"), 0);
$users = mysql_result(mysql_query("SELECT COUNT(*) FROM users"), 0);
$admin = mysql_result(mysql_query("SELECT COUNT(*) FROM users where `status`='admin'"), 0);
$moder = mysql_result(mysql_query("SELECT COUNT(*) FROM users where `status`='moderator'"), 0);
$ban = mysql_result(mysql_query("SELECT COUNT(*) FROM `ban`"), 0);
if($version == "wml")
{
header("Content-type: text/vnd.wap.wml; charset=utf-8");
echo(doctype("Статистика форума").$tag);
if($status == "admin")
{
echo("Хостов/Хитов: <b>(".$host."/".$hit.")</b><br />");
}
echo("
Зарегистрировано: ".$users."<br/>
Тем/Сообщений: ".$all_topics."/".$all_posts."<br/>
Забаненных: ".$ban."<br/>
Админов: ".$admin."<br/>
Модераторов: ".$moder."<br/>");
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")
{
header("Content-type: text/html; charset=utf-8");
echo('<html>
<head>
<title>Статистика форума</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>Статистика форума</b></font>
</td></tr>
<tr bgcolor="'.$style['bottom'].'"><td colspan="2"></td></tr>');
if($status == "admin")
{
echo('<tr bgcolor="'.$style['text'].'"><td>
'.$tag.'Хостов/Хитов:'.$tagC.'</td><td><b>('.$tag.$host.'/'.$hit.$tagC.')</b></td></tr>');
}
echo('<tr bgcolor="'.$style['text'].'"><td>
'.$tag.'Зарегистрировано:'.$tagC.'</td><td><b>'.$tag.$users.$tagC.'</b></td></tr>
<tr bgcolor="'.$style['text'].'"><td>
'.$tag.'Тем/Сообщений:'.$tagC.'</td><td><b>'.$tag.$all_topics.$tagC.'/'.$tag.$all_posts.$tag.'</b></td></tr>
<tr bgcolor="'.$style['text'].'"><td>
'.$tag.'Админов:'.$tagC.'</td><td><b>'.$tag.$admin.$tagC.'</b></td></tr>
<tr bgcolor="'.$style['text'].'"><td>
'.$tag.'Модераторов:'.$tagC.'</td><td><b>'.$tag.$moder.$tagC.'</b></td></tr>
<tr bgcolor="'.$style['text'].'"><td>
'.$tag.'Забаненных:'.$tagC.' </td><td><b>'.$tag.$ban.$tagC.'</b></td></tr>');
$maxonline = explode('<>', file_get_contents('online.txt'));
echo('
<tr bgcolor="'.$style['bottom'].'"><td colspan="2">');
if($authorize)
{
echo(''.$tag.'<a href="./?p=0&v=xhtml&sid='.$sid.'">В форум</a>'.$tagC.'');
}
else
{
echo(''.$tag.'<a href="./?p=0&v=xhtml">В форум</a>'.$tagC.'');
}
echo('</td></tr>
</table>
</body></html>');
}
break;
?>