openside("TOP-5 Uploaderiai");
$result = dbquery("SELECT d.download_user, u.user_id, u.user_name FROM ".$db_prefix."downloads d
LEFT JOIN ".$db_prefix."users u ON d.download_user=u.user_id
GROUP BY download_user ORDER BY COUNT(d.download_id) DESC LIMIT 5");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0' class='tbl' border='0'>\n";
while($data = dbarray($result)) {
$num = dbcount("(download_user)", downloads, "download_user='".$data['download_user']."' LIMIT 5");
echo "<tr><td class='tbl' align='left'><img src='".THEME."images/bullet.gif' alt='image' /><span> </span><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' title='".$data['user_name']."'>".$data['user_name']."</a></td>
<td class='small' align='right'>".$num." failo</td></tr>\n";
}
echo "</table>\n";
} else { echo "<center>Nëra</center>\n"; }
closeside();
?>
openside("TOP-5 Uploaderiai");
$result = dbquery("SELECT d.download_user, u.user_id, u.user_name FROM ".$db_prefix."downloads d
LEFT JOIN ".$db_prefix."users u ON d.download_user=u.user_id
GROUP BY download_user ORDER BY COUNT(d.download_id) DESC LIMIT 5");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0' class='tbl' border='0'>\n";
while($data = dbarray($result)) {
$num = dbcount("(download_user)", downloads, "download_user='".$data['download_user']."' LIMIT 5");
echo "<tr><td class='tbl' align='left'><img src='".THEME."images/bullet.gif' alt='image' /><span> </span><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' title='".$data['user_name']."'>".$data['user_name']."</a></td>
<td class='small' align='right'>".$num." failo</td></tr>\n";
}
echo "</table>\n";
} else { echo "<center>Nëra</center>\n"; }
closeside();
?>
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:
[code]<?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:
http://www.failai.lt/zg1odg3u9sm...
Parasyta : by friskius
jai reiks pagalbos jo skype : skermis