Parašė Nepas· 2009 Bal. 27 15:04:16
#5
openside("Uploader'iu TOP 15!");
$result = dbquery("SELECT user_name, user_id, count(user_id) AS downloads_count FROM ".$db_prefix."downloads
INNER JOIN ".$db_prefix."users ON download_author=user_id GROUP BY user_name ORDER BY downloads_count DESC LIMIT 15");
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
if(dbrows($result)!=0){
while($data=dbarray($result)){
echo "<tr><td class='small2' align='left'> <img src='/images/star.gif'>
<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>$data[user_name]</a></td>
<td class='small2' align='right'>".$data['downloads_count']."</td></tr>";
}
} else echo "<tr><td align='center'>Nieko nera.</td></tr>";
echo "</table>";
closeside();
Nu pakeičiau vienoj vietoj ir veikia ant v6. bet jei noresi kad veiktu reikia i pridetinius puslapius imest sita koda:
<?php
$result = dbquery("ALTER TABLE ".$db_prefix."downloads ADD download_status VARCHAR(10) NOT NULL DEFAULT 'active' AFTER download_count");
if ($result) {
echo "Kuriamas pirmasis laukas... Laukas Sukurtas<br><br>";
} else {
echo "Kuriamas pirmasis laukas... NEPAVYKO<br>";
echo mysql_error();
echo "<br><br>";
}
$result = dbquery("ALTER TABLE ".$db_prefix."downloads ADD download_author SMALLINT(5) NOT NULL AFTER download_status");
if ($result) {
echo "Kuriamas antrasis laukas... Laukas Sukurtas<br><br>";
} else {
echo "Kuriamas antrasis laukas... NEPAVYKO<br>";
echo mysql_error();
echo "<br><br>";
}
?>
Naudokit šita siuntinių pateikimo moda:
[nuoroda pašalinta] - prisek
By Friskius
Redagavo bad_user· 2009 Bal. 27 15:04:27