Создаем файл block-heroes.php и закидываем в папку blocks своего трекера, активируем в админке.
Код:
<?php if (!defined('BLOCK_FILE')) { Header("Location: ../index.php"); exit; } $content .= "<table width=\"100%\" class=\"main\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\"><td align=\"center\"> <table class=\"main\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\"> <table width=\"100%\" class=\"main\" border=\"0\" cellspacing=\"0\" cellpadding=\"10\"> <tr> <td width=\"33%\" align=\"center\" style=\"border: none;\"> <table class=\"main\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\"><tr><td class=colhead colspan=3 align=\"center\">Спасибо</td></tr><tr><td align=\"center\">№</td><td align=\"left\">Пользователь</td><td align=\"center\">Кол-во</td></tr>"; $thx = sql_query("SELECT *, (SELECT COUNT(*) FROM thanks WHERE users.id = thanks.touid) AS num_thanks FROM users WHERE class < 6 ORDER BY num_thanks DESC LIMIT 5") or sqlerr(__FILE__, __LINE__); $num = 0; while ($thx2 = mysql_fetch_array($thx)) { ++$num; $id = $thx2["id"]; $thx3 = $thx2["num_thanks"]; $content .= "<tr><td>$num.</td><td class=\"row3\" width=100%><a href=\"userdetails.php?id=$id\">".get_user_class_color($thx2["class"], $thx2["username"])."</a></td><td align=\"center\" class=\"row3\">$thx3</td></tr>"; } $content .= "</table></td><td width=\"33%\" align=\"center\" valign=\"top\" style=\"border: none;\"><table class=main border=1 cellspacing=0 cellpadding=5><tr><td class=colhead colspan=3 align=\"center\">Бонусы</td></tr><tr><td align=\"center\">№</td><td align=\"left\">Пользователь</td><td align=\"center\">Кол-во</td></tr>"; $bonus = sql_query("SELECT bonus, id, class, username FROM users WHERE bonus > 1 AND class < 6 ORDER BY bonus DESC LIMIT 5") or sqlerr(__FILE__, __LINE__); $num = 0; while ($bonus2 = mysql_fetch_array($bonus)) { ++$num; $id = $bonus2["id"]; $bonus3 = $bonus2["bonus"]; $content .= "<tr><td>$num.</td><td class=\"row3\" width=100%><a href=\"userdetails.php?id=$id\">".get_user_class_color($bonus2["class"], $bonus2["username"])."</a></td><td align=\"center\" class=\"row3\">$bonus3</td></tr>"; } $content .= "</table></td><td width=\"33%\" align=\"center\" valign=\"top\" style=\"border: none;\"><table class=main border=1 cellspacing=0 cellpadding=5><tr><td class=colhead colspan=3 align=\"center\">Респекты</td></tr><tr><td align=\"center\">№</td><td align=\"left\">Пользователь</td><td align=\"center\">Кол-во</td></tr>"; $sym = sql_query("SELECT * FROM users WHERE class < 6 ORDER BY simpaty DESC LIMIT 5") or sqlerr(__FILE__, __LINE__); $num = 0; while ($sym2 = mysql_fetch_array($sym)) { ++$num; $id = $sym2["id"]; $sym3 = $sym2["simpaty"]; $content .= "<tr><td>$num.</td><td class=\"row3\" width=100%><a href=\"userdetails.php?id=$id\">".get_user_class_color($sym2["class"], $sym2["username"])."</a></td><td align=\"center\" class=\"row3\">$sym3</td></tr>"; } $content .= "</table></td>"; $content .="</table> </td></tr></table>"; $blocktitle = "Наши герои"; ?>