home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 April / PCWorld_2005-04_cd.bin / akce / web / phpnuke / PHP-Nuke-7.5.exe / html / blocks / block-Reviews.php < prev    next >
PHP Script  |  2004-03-26  |  2KB  |  33 lines

  1. <?php
  2.  
  3. /************************************************************************/
  4. /* PHP-NUKE: Web Portal System                                          */
  5. /* ===========================                                          */
  6. /*                                                                      */
  7. /* Copyright (c) 2002 by Francisco Burzi                                */
  8. /* http://phpnuke.org                                                   */
  9. /*                                                                      */
  10. /* This program is free software. You can redistribute it and/or modify */
  11. /* it under the terms of the GNU General Public License as published by */
  12. /* the Free Software Foundation; either version 2 of the License.       */
  13. /************************************************************************/
  14. /*         Additional security & Abstraction layer conversion           */
  15. /*                           2003 chatserv                              */
  16. /*      http://www.nukefixes.com -- http://www.nukeresources.com        */
  17. /************************************************************************/
  18.  
  19. if (eregi("block-Reviews.php", $_SERVER['PHP_SELF'])) {
  20.     Header("Location: index.php");
  21.     die();
  22. }
  23.  
  24. global $prefix, $db;
  25.  
  26. $result = $db->sql_query("SELECT id, title FROM ".$prefix."_reviews ORDER BY id DESC LIMIT 0,10");
  27. while ($row = $db->sql_fetchrow($result)) {
  28. $id = intval($row['id']);
  29. $title = stripslashes($row['title']);
  30.     $content .= "<strong><big>·</big></strong> <a href=\"modules.php?name=Reviews&rop=showcontent&id=$id\">$title</a><br>";
  31. }
  32.  
  33. ?>