[ Index ]
 

Code source de PHP NUKE 7.9

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

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

   1  <?php
   2  
   3  /************************************************************************/

   4  /* PHP-NUKE: Web Portal System                                          */

   5  /* ===========================                                          */

   6  /*                                                                      */

   7  /* Copyright (c) 2005 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  
  15  /* Block to fit perfectly in the center of the site, remember that not all

  16     blocks looks good on Center, just try and see yourself what fits your needs */
  17  
  18  if ( !defined('BLOCK_FILE') ) {
  19      Header("Location: ../index.php");
  20      die();
  21  }
  22  
  23  global $prefix, $multilingual, $currentlang, $db;
  24  
  25  if ($multilingual == 1) {
  26      $querylang = "WHERE (alanguage='$currentlang' OR alanguage='')";
  27  } else {
  28      $querylang = "";
  29  }
  30  $content = "<table width=\"100%\" border=\"0\">";
  31  $result = $db->sql_query("SELECT sid, title, comments, counter FROM " . $prefix . "_stories $querylang ORDER BY sid DESC LIMIT 0,5");
  32  while ($row = $db->sql_fetchrow($result)) {
  33      $sid = intval($row['sid']);
  34      $title = filter($row['title'], "nohtml");
  35      $comtotal = intval($row['comments']);
  36      $counter = intval($row['counter']);
  37      $content .= "<tr><td align=\"left\"><strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?name=News&amp;file=article&amp;sid=$sid\">$title</a></td><td align=\"right\">[ $comtotal "._COMMENTS." - $counter "._READS." ]</td></tr>";
  38  }
  39  $content .= "</table>";
  40  $content .= "<br><center>[ <a href=\"modules.php?name=News\">"._MORENEWS."</a> ]</center>";
  41  
  42  ?>


Généré le : Sun Apr 1 11:11:59 2007 par Balluche grâce à PHPXref 0.7