Файл: statistics.php
Строк: 41
<?php
include('common.php');
if(islogged()){
echo theader($lang['statistics']);
echo '<div class="list2">' . $lang['statistics'] . '</div>';
echo '<div class="list2">' . "rn";
$query = mysql_query('SELECT COUNT(*) FROM `users`;');
$result = intval(mysql_result($query, 0));
echo $lang['numusers'] . ': <b>' . $result . '</b><br />';
$query = mysql_query('SELECT COUNT(*) FROM `private`;');
$result = intval(mysql_result($query, 0));
echo $lang['numprivate'] . ': <b>' . $result . '</b><br />';
$query = mysql_query('SELECT COUNT(*) FROM `forums`;');
$result = intval(mysql_result($query, 0));
echo $lang['numforums'] . ': <b>' . $result . '</b><br />';
$query = mysql_query('SELECT COUNT(*) FROM `threads`;');
$result = intval(mysql_result($query, 0));
echo $lang['snumthreads'] . ': <b>' . $result . '</b><br />';
$query = mysql_query('SELECT COUNT(*) FROM `posts`;');
$result = intval(mysql_result($query, 0));
echo $lang['numposts'] . ': <b>' . $result . '</b><br />';
$query = mysql_query('SELECT COUNT(*) FROM `shoutbox`;');
$result = intval(mysql_result($query, 0));
echo $lang['shouts'] . ': <b>' . $result . '</b><br />';
$query = mysql_query('SELECT COUNT(*) FROM `users` WHERE `status` = '2';');
$result = intval(mysql_result($query, 0));
echo $lang['nummods'] . ': <b>' . $result . '</b><br />';
$query = mysql_query('SELECT COUNT(*) FROM `users` WHERE `status` = '3';');
$result = intval(mysql_result($query, 0));
echo $lang['numadmins'] . ': <b>' . $result . '</b><br />';
$query = mysql_query('SELECT COUNT(*) FROM `users` WHERE `banned` = '1';');
$result = intval(mysql_result($query, 0));
echo $lang['numbanned'] . ': <b>' . $result . '</b><br />';
echo '</div>';
echo '<div class="list2"><a href="/index.php">' . $lang['back'] . '</a></div>';
echo tfooter();
}else{
header('Location: /index.php');
}
exit();
?>