[ Index ]

PHP Cross Reference of Nuke-Evolution v2.0.5

title

Body

[close]

/blocks/ -> block-Last_5_Reviews.php (source)

   1  <?php
   2  /*=======================================================================
   3   Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System
   4   =======================================================================*/
   5  /*****[CHANGES]**********************************************************
   6  -=[Base]=-
   7        Nuke Patched                             v3.1.0       06/26/2005
   8        Caching System                           v1.0.0       10/31/2005
   9  -=[Block]=-
  10        Last 5 Reviews                           v1.0.0       06/10/2005
  11   ************************************************************************/
  12  
  13  if(!defined('NUKE_EVO')) exit;
  14  
  15  global $prefix, $db;
  16  
  17  # Number of reviews to display
  18  $number_of_reviews = 5;
  19  $image_height = 100;
  20  $image_width = 100;
  21  
  22  $sql = "SELECT id, title, text, cover, date FROM ".$prefix."_reviews ORDER BY id DESC LIMIT 0,$number_of_reviews ";
  23  
  24  $result = $db->sql_query($sql);
  25  
  26  while (list($id, $title, $text, $cover, $date) = $db->sql_fetchrow($result)) {
  27      $id = intval($id);
  28      $title = stripslashes($title);
  29      $cover = wordwrap($cover);
  30      $content .= "<table width=\"100%\" border=\"0\"><tr><td><strong><big>&middot;</big></strong>&nbsp; ";
  31      $content .= "<a href=\"modules.php?name=Reviews&amp;rop=showcontent&amp;id=$id\"><span style=\"color: white\"><strong>$title</strong></span></a><br /></td></tr></table>";
  32      $content .= "<table width=\"100%\" border=\"0\"><a href=\"modules.php?name=Reviews&amp;rop=showcontent&amp;id=$id\">";
  33      $content .= "<img src=\"images/reviews/$cover\" width=\"$image_width\" height=\"$image_height\" /></a></td></tr></table>";
  34  }
  35  $db->sql_freeresult($result);
  36  ?>


Generated: Wed Jun 6 11:38:01 2007 Cross-referenced by PHPXref 0.7