Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Prasau padekit, dėl populiariausiu dainu.Kad dingtu daina nuo tam tikro skaiciaus

Parašė egisss· 2009 Lap. 14 17:11:04
#1

Turiu muzikos tinklapi,
jame ir populiariausios dainos. Ir beda tame kad ten rodo tas dainas kurios daugiausia kartu parsiustos, bet esme tame kad jos nepasikeicia stovi tos senos kiek laiko jau, noreciau kad tarkim nustates tam tikra skaiciu tai butu limitas. PVz 40 kartu parsisiuncia daina ir ji dingsta is saraso.

Parašė egisss· 2009 Lap. 14 17:11:21
#2

cia koda kuri manau reikia redaguoti
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,10");
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 30);
echo "<tr>\n<td class='small'><img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a></td>\n
<td align='right'>".$data['download_count']."</td>\n</tr>\n";
}
} else {
echo "<center>Siuntini&#65533; n&#65533;ra !</center>\n";
}

echo "
</table></td>
</tr>
</table>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td height='5'></td>
</tr>

</table>
</td>
<td width='22'></td>
</tr>
</table>";








Parašė maxas66· 2009 Lap. 14 17:11:42
#3

$result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_count < 40 ORDER BY download_count DESC LIMIT 0,40");
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 30);
echo "<tr>\n<td class='small'><img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a></td>\n
<td align='right'>".$data['download_count']."</td>\n</tr>\n";
}
} else {
echo "<center>Siuntini&#65533; n&#65533;ra !</center>\n";
}

echo "
</table></td>
</tr>
</table>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td height='5'></td>
</tr>

</table>
</td>
<td width='22'></td>
</tr>
</table>";




Enjoy ;]

Redagavo maxas66· 2009 Lap. 14 17:11:31

Parašė egisss· 2009 Lap. 14 17:11:24
#4

Dėkui tau labai veikia,
ten tik truputuka vienoje vietoje kai ka dar pakeisti tereikejo tavo sitam, va teisingas jau :);););)

$result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_count < 25 ORDER BY download_count DESC LIMIT 0,10");
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 30);
echo "<tr>\n<td class='small'><img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a></td>\n
<td align='right'>".$data['download_count']."</td>\n</tr>\n";
}
} else {
echo "<center>Siuntini&#65533; n&#65533;ra !</center>\n";
}

echo "
</table></td>
</tr>
</table>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td height='5'></td>
</tr>

</table>
</td>
<td width='22'></td>
</tr>
</table>";




Parašė maxas66· 2009 Lap. 14 18:11:05
#5

+10 jei negaila ;D
Beja sakej 40, tai ir parašiau 40 ;]