[ Index ]

PHP Cross Reference of Nuke-Evolution v2.0.5

title

Body

[close]

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

   1  <?php
   2  /*=======================================================================
   3   Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System
   4   =======================================================================*/
   5  
   6  /************************************************************************/
   7  /* PHP-NUKE: Web Portal System                                          */
   8  /* ===========================                                          */
   9  /*                                                                      */
  10  /* Copyright (c) 2002 by Francisco Burzi                                */
  11  /* http://phpnuke.org                                                   */
  12  /*                                                                      */
  13  /* This program is free software. You can redistribute it and/or modify */
  14  /* it under the terms of the GNU General Public License as published by */
  15  /* the Free Software Foundation; either version 2 of the License.       */
  16  /************************************************************************/
  17  /*         Additional security & Abstraction layer conversion           */
  18  /*                           2003 chatserv                              */
  19  /*      http://www.nukefixes.com -- http://www.nukeresources.com        */
  20  /************************************************************************/
  21  
  22  /*****[CHANGES]**********************************************************
  23  -=[Base]=-
  24        Nuke Patched                             v3.1.0       06/26/2005
  25   ************************************************************************/
  26  
  27  /* Block to fit perfectly in the center of the site, remember that not all
  28     blocks looks good on Center, just try and see yourself what fits your needs */
  29  
  30  if(!defined('NUKE_EVO')) exit;
  31  
  32  global $prefix, $multilingual, $currentlang, $db;
  33  
  34  if ($multilingual == 1) {
  35      $querylang = "WHERE (alanguage='$currentlang' OR alanguage='')";
  36  } else {
  37      $querylang = '';
  38  }
  39  $content = "<table width=\"100%\" border=\"0\">";
  40  $sql = "SELECT sid, title, comments, counter FROM ".$prefix."_stories $querylang ORDER BY sid DESC LIMIT 0,5";
  41  $result = $db->sql_query($sql);
  42  while (list($sid, $title, $comments, $counter) = $db->sql_fetchrow($result)) {
  43      $title = stripslashes($title);
  44      $content .= "<tr><td align=\"left\">";
  45      $content .= "<strong><big>&middot;</big></strong>";
  46      $content .= " <a href=\"modules.php?name=News&amp;file=article&amp;sid=".$sid."\">$title</a>";
  47      $content .= "</td><td align=\"right\">";
  48      $content .= "[ $comtotal "._COMMENTS." - $counter "._READS." ]";
  49      $content .= "</td></tr>";
  50  }
  51  $db->sql_freeresult($result);
  52  $content .= "</table>";
  53  $content .= "<br /><center>[ <a href=\"modules.php?name=News\">"._MORENEWS."</a> ]</center>";
  54  
  55  ?>


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