Parašė WantedBoy· 2008 Gru. 17 14:12:25
#1
Pakūriau kažkokio nario prašymu, tačiau apgavikas buvo, tai todėl įdedu čia :D
openside("TOP 5 NARIAI");
if (iMEMBER) {
if (!isset($sortby) || !preg_match("/^[0-9A-Z]$/", $sortby)) $sortby = "all";
$orderby = ($sortby == "all" ? "" : " WHERE user_name LIKE '".stripinput($sortby)."%'");
$result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby."");
$rows = dbrows($result);
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
$i = 0;
echo "<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>
<tr>
<td class='tbl2'><b>Vartotojas</b></td>
<td class='tbl2'><b>Taskai</b></td>
</tr>\n";
$result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby." ORDER BY user_points DESC LIMIT 0,5 ");
while ($data = dbarray($result)) {
$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<tr>\n\n";
echo "<td class='$cell_color'>\n<a href='profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a></td>\n";
echo "<td class='$cell_color'>\n<a href='profile.php?lookup=".$data['user_id']."'>".$data['user_points']."</a></td>\n";
echo "\n";
}
echo "</table>\n";
} else {
}
}
closeside();