Code
<?php
// Datu norādīšana
$platums = "200"; // platums pikseļos
$forums = "/forums/"; // pilna adrese uz forumu
$limits = "5"; // tēmu limits
$host = "localhost"; // db hosts
$dbname = "forums"; // DB
$dbuser = "root"; // db lietotājs
$dbpass = "pw"; // db parole
?>
<?php
error_reporting(E_ALL);
ini_set("display_erors", 1);
$url = "/forums/index.php?showuser=";
$con = mysql_connect($host,$dbuser,$dbpass);
if (!$con)
{
die('Neizdevās piekonektēties datubāzei' . mysql_error());
}
mysql_select_db($dbname, $con);
$result = mysql_query("SELECT * from ibf_members order by posts desc LIMIT 0, 5 ");
while($row = mysql_fetch_array($result))
{
echo "<center><table width=\"130\" cellpadding=\"0\" cellspacing=\"0\"><a href=\"/forums/index.php?showuser=".$row['id']."\" title=\"\"><img src='http://www.2manuals.com/images/icons/users_total.gif' border='0'></img>".$row['members_display_name']."</a> <img src='http://www.13thingsthatdontmakesense.com/images/nav/post.gif' border='0'></img> ".$row['posts'] ."</table></a></center>";
echo "</b>";
}
mysql_close($con);
?>