View Single Post
Old
  (#4 (permalink))
dar63
Moderator
 
dar63's Avatar
 
Status: Offline
Posts: 473
Join Date: Oct 2002
Location: UK
11-08-2002, 12:28 PM

Code:
<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2001 by Francisco Burzi (fbc@mandrakesoft.com)         */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/*                                                                      */
/* PHP-Nuke Version: 5.4                                                */
/************************************************************************/

if (eregi("block-Downloads_10New.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}

$modname = "Downloads";
global $prefix, $dbi;

$a = 1;
$result = sql_query("select lid, title from $prefix"._downloads_downloads." order by date DESC limit 0,10", $dbi);
while(list($lid, $title) = sql_fetch_row($result, $dbi)) {
    $title2 = ereg_replace(" ", "_", $title);
    $content .= "$a<big>&middot;</big> <a href=\"modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid=$lid&amp;ttitle=$title2\">$title</a>
";
    $a++;
}

?>
Save as block-Downloads_10New.php and put it in your blocks dir.
   
Reply With Quote