Last Downloads, Top Downloads und Hit Downloads
Code von denen ist so:
last downloads
<?php
# Copyright by: DjGeCk0
# Support: www.djgecko.kilu.de und ilch-forum
# Version: 1.0
# Getestet und Entwickelt für Ilch 1.1 Update M
###################################################
# EINSTELLUNGEN #
###################################################
# Trage hier die Anzahl der X meisten Downloads ein
$xlastdowns = '10';
###################################################
# ab hier bitte nichts mehr ändern #
###################################################
#error_reporting(E_ALL); ini_set('display_errors', 1);
defined ('main') or die ( 'no direct access' );
$tpl = new tpl ( 'lastdownloads.htm', 0 );
###################################################
# START ABFRAGEN #
###################################################
$mostdowns = db_query ("SELECT * FROM prefix_downloads ORDER BY id DESC LIMIT ".$xlastdowns."");
$postlastdowns = '';
while($row = db_fetch_assoc ($mostdowns)) {
$postlastdowns .= '
<tr>
<td width="5%" class="CnormF" align="center"><span style="color: #f6f6f6;font-family: Arial, Helvetica, sans-serif;font-size: 11px">'.$row['id'].'</span></td>
<td width="65%"><a class="topdownloads" style="color:#999999;" href="?downloads-show-'.$row['id'].'"> '.$row['name'].'</a></td>
<td width="15%" class="CnormF" align="right" style="padding-right:5px;font-weight:bold;font-size: 10px;color:#999999">'.$row['hits'].'</td>
<td width="15%" align="right" style="padding-right:5px;font-weight:bold;font-size: 10px;color:#999999">'.$row['downs'].'</td>
</tr>';
}
####################################################
# TEMPLATE ERSTELLEN #
####################################################
$tpl->set('POSTLASTDOWNS', $postlastdowns);
$tpl->out(0);
?>
top downloads
<?php
# Copyright by: DjGeCk0
# Support: www.djgecko.kilu.de und ilch-forum
# Version: 1.0
# Getestet und Entwickelt für Ilch 1.1 Update M
###################################################
# EINSTELLUNGEN #
###################################################
# Trage hier die Anzahl der X meisten Downloads ein
$xtopdowns = '10';
###################################################
# ab hier bitte nichts mehr ändern #
###################################################
#error_reporting(E_ALL); ini_set('display_errors', 1);
defined ('main') or die ( 'no direct access' );
$tpl = new tpl ( 'topdowns.htm', 0 );
###################################################
# START ABFRAGEN #
###################################################
$mostdowns = db_query ("SELECT * FROM prefix_downloads ORDER BY downs DESC LIMIT ".$xtopdowns."");
$posttopdowns = '';
while($row = db_fetch_assoc ($mostdowns)) {
$posttopdowns .= '
<tr>
<td width="5%" class="CnormF" align="center"><span style="color: #f6f6f6;font-family: Arial, Helvetica, sans-serif;font-size: 11px">'.$row['id'].'</span></td>
<td width="65%"><a class="topdownloads" style="color:#999999;" href="?downloads-show-'.$row['id'].'"> '.$row['name'].'</a></td>
<td width="15%" class="CnormF" align="right" style="padding-right:5px;font-weight:bold;font-size: 10px;color:#999999">'.$row['downs'].'</td>
<td width="15%" align="right" style="padding-right:5px;font-weight:bold;font-size: 10px;color:#999999">'.$row['hits'].'</td>
</tr>';
}
####################################################
# TEMPLATE ERSTELLEN #
####################################################
$tpl->set('POSTBESTDOWNS', $posttopdowns);
$tpl->out(0);
?>
und hit downloads
<?php
# Copyright by: DjGeCk0
# Support: www.djgecko.kilu.de und ilch-forum
# Version: 1.0
# Getestet und Entwickelt für Ilch 1.1 Update M
###################################################
# EINSTELLUNGEN #
###################################################
# Trage hier die Anzahl der X meisten Downloads ein
$xtophits = '10';
###################################################
# ab hier bitte nichts mehr ändern #
###################################################
#error_reporting(E_ALL); ini_set('display_errors', 1);
defined ('main') or die ( 'no direct access' );
$tpl = new tpl ( 'tophits.htm', 0 );
###################################################
# START ABFRAGEN #
###################################################
$mosthits = db_query ("SELECT * FROM prefix_downloads ORDER BY hits DESC LIMIT ".$xtophits."");
$posttophits = '';
while($row = db_fetch_assoc ($mosthits)) {
$posttophits .= '
<tr>
<td width="5%" class="CnormF" align="center"><span style="color: #f6f6f6;font-family: Arial, Helvetica, sans-serif;font-size: 11px">'.$row['id'].'</span></td>
<td width="65%"><a class="topdownloads" style="color:#999999;" href="?downloads-show-'.$row['id'].'"> '.$row['name'].'</a></td>
<td width="15%" class="CnormF" align="right" style="padding-right:5px;font-weight:bold;font-size: 10px;color:#999999">'.$row['hits'].'</td>
<td width="15%" align="right" style="padding-right:5px;font-weight:bold;font-size: 10px;color:#999999">'.$row['downs'].'</td>
</tr>';
}
####################################################
# TEMPLATE ERSTELLEN #
####################################################
$tpl->set('POSTBESTHITS', $posttophits);
$tpl->out(0);
?>
und jetzt habe ich das problem, dass ich am anfang nicht die id haben möchte, sondern zahlen von 1-10 von oben absteigend...
(tpl wollt ich j net noch posten aber aufbau ist ca gleich
<table class="borderF" width="340" cellspacing="1" cellpadding="3">
{der entsprechende name}
</table>)
wie soll ich das machen, weil durch die id immer unterschiedliche zahlen vorne stehen, aber nie die geordnet von 1-10 absteigend...
betroffene Homepage: patrickvz.kilu.de/index.php


