crazykilla
09-06-2005, 04:29 PM
if (eregi("block-LatestDownloads.php", $_SERVER['SCRIPT_NAME'])) {
Header("Location: index.php");
die();
}
global $prefix, $db, $admin;
// Set up some default vars
// change as necessary
$how_many_downloads = 5;
$download_module_name = "Downloads";
// Don't change below unless you know what you're doing
$sql = "SELECT d.*
FROM `${prefix}_downloads_downloads` AS d
ORDER BY d.`lid` DESC
LIMIT $how_many_downloads";
$link_index = 1;
$content = "";
if($res = $db->sql_query($sql)) {
$content = "<table border='0' width='100%' cellpadding='2' cellspacing='0'>";
while($row = $db->sql_fetchrow($res)) {
$link_view = "modules.php?name=$download_module_name&d_op=viewdownloaddetails&lid=" . $row['lid'] . "&ttitle=" . $row['title'];
$content .= "<tr valign='top'><td>$link_index:</td><td><a href='$link_view'>" . $row['title'] . "</a> </td></tr>";
$link_index++;
}
$content .= "</table>";
}
?>
I'm trying to get my downloads to scroll through the block instead of just sitting there. If anyone knows how to do this I would appreciate it.
Header("Location: index.php");
die();
}
global $prefix, $db, $admin;
// Set up some default vars
// change as necessary
$how_many_downloads = 5;
$download_module_name = "Downloads";
// Don't change below unless you know what you're doing
$sql = "SELECT d.*
FROM `${prefix}_downloads_downloads` AS d
ORDER BY d.`lid` DESC
LIMIT $how_many_downloads";
$link_index = 1;
$content = "";
if($res = $db->sql_query($sql)) {
$content = "<table border='0' width='100%' cellpadding='2' cellspacing='0'>";
while($row = $db->sql_fetchrow($res)) {
$link_view = "modules.php?name=$download_module_name&d_op=viewdownloaddetails&lid=" . $row['lid'] . "&ttitle=" . $row['title'];
$content .= "<tr valign='top'><td>$link_index:</td><td><a href='$link_view'>" . $row['title'] . "</a> </td></tr>";
$link_index++;
}
$content .= "</table>";
}
?>
I'm trying to get my downloads to scroll through the block instead of just sitting there. If anyone knows how to do this I would appreciate it.