| Code: |
/* Top 10 downloads */
$result13 = $db->sql_query('SELECT lid, cid, title, hits FROM '.$prefix.'_downloads_downloads ORDER BY hits DESC LIMIT 0,'.$top);
if ($db->sql_numrows($result13) > 0) {
echo '<table border="0" cellpadding="10" width="100%"><tr><td align="left">'
.'<font class="option"><b>'.$top.' '._DOWNLOADEDFILES.'</b></font><br /><br />';
$lugar=1;
while ($row13 = $db->sql_fetchrow($result13)) {
$lid = intval($row13['lid']);
$cid = intval($row13['cid']);
$title = stripslashes(check_html($row13['title'], 'nohtml'));
$hits = intval($row13['hits']);
if($hits>0) {
$row_res = $db->sql_fetchrow($db->sql_query('SELECT title FROM '.$prefix.'_downloads_categories WHERE cid=\''.$cid.'\''));
$ctitle = stripslashes(check_html($row_res['title'], 'nohtml'));
$utitle = ereg_replace(' ', '_', $title);
echo '<strong><big>·</big></strong> '.$lugar.': <a href="modules.php?name=Downloads&d_op=viewdownloaddetails&lid='.$lid.'&ttitle='.$utitle.'">'.$title.'</a> ('._CATEGORY.': '.$ctitle.') - ('.$hits.' '._LDOWNLOADS.')<br />';
$lugar++;
}
}
echo '</td></tr></table>';
}
|
| Code: |
/* Top 10 downloads - for NSN GR Downloads */
$result13 = $db->sql_query('SELECT lid, cid, title, hits FROM '.$prefix.'_nsngd_downloads ORDER BY hits DESC LIMIT 0,'.$top);
if ($db->sql_numrows($result13) > 0) {
echo '<table border="0" cellpadding="10" width="100%"><tr><td align="left">'
.'<font class="option"><b>'.$top.' '._DOWNLOADEDFILES.'</b></font><br /><br />';
$lugar=1;
while ($row13 = $db->sql_fetchrow($result13)) {
$lid = intval($row13['lid']);
$cid = intval($row13['cid']);
$title = stripslashes(check_html($row13['title'], 'nohtml'));
$hits = intval($row13['hits']);
if($hits>0) {
$row_res = $db->sql_fetchrow($db->sql_query('SELECT title FROM '.$prefix.'_nsngd_categories WHERE cid=\''.$cid.'\''));
$ctitle = stripslashes(check_html($row_res['title'], 'nohtml'));
$utitle = ereg_replace(' ', '_', $title);
echo '<strong><big>·</big></strong> '.$lugar.': <a href="modules.php?name=Downloads&op=getit&lid='.$lid.'">'.$title.'</a> ('._CATEGORY.': '.$ctitle.') - ('.$hits.' '._LDOWNLOADS.')<br />';
$lugar++;
}
}
echo '</td></tr></table>';
}
|