Код:
<?php include"forum/config.php";
$con=mysql_connect($dbhost,$dbuser,$dbpasswd)or die(mysql_error());
mysql_select_db($dbname,$con)or die(mysql_error());
$chars="set character set utf8";mysql_query($chars);
$sql="select * from `phpbb_users` order by user_id desc limit 1"or die(mysql_error());
$result=mysql_query($sql)or die(mysql_error());
while($r=mysql_fetch_array($result)){ $last_user=$r['username']; }
$zaqvka1=mysql_query("select count(topic_id) as total_topics from `phpbb_topics`");
while($rw=mysql_fetch_array($zaqvka1)){ $total_topics=$rw['total_topics']; }
$zaqvka2=mysql_query("select count(post_id) as total_posts from `phpbb_posts`");
while($rw=mysql_fetch_array($zaqvka2)){ $total_posts=$rw['total_posts']; }
$zaqvka3=mysql_query("select count(user_id) as total_users from `phpbb_users` where username!='anonymous'");
while($rw=mysql_fetch_array($zaqvka3)){ $total_users=$rw['total_users']; }
$zaqvka7=mysql_query("select count(ban_id) as total_banned from `phpbb_banlist`");
while($rw=mysql_fetch_array($zaqvka7)){ $total_banned=$rw['total_banned']; }
echo
"<font color='#00B2EE'>
Общо регистрирани: <b>$total_users</b><br />
Най-нов: <b>$last_user</b><br />
Общо мнения: <b>$total_posts</b><br />
Общо теми: <b>$total_topics</b><br />
Баннати: <b>$total_banned</b></font>";
?>
То на практика, проблем няма, но има едно нещо което ме нервира много, виждате "Общо регистрираните" Как са извадени $total_user, но вместо потребителите, вади и ботовете и във форума като има 1 регистриран (в момента) показва 52 (тост и ботовете) как ще трябва да стане за да не ги показва и тях ?
ПП: същото важи и за $last_user