[ Index ]
 

Code source de PHP NUKE 7.9

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

title

Body

[fermer]

/blocks/ -> block-Forums.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  if ( !defined('BLOCK_FILE') ) {
  16      Header("Location: ../index.php");
  17      die();
  18  }
  19  
  20  global $prefix, $db, $sitename;
  21  
  22  $sql = "SELECT t.forum_id, topic_id, topic_title, auth_view, auth_read FROM ".$prefix."_bbtopics AS t, ".$prefix."_bbforums AS f WHERE f.forum_id=t.forum_id ORDER BY topic_time DESC LIMIT 10";
  23  $result = $db->sql_query($sql);
  24  $content = "<br>";
  25  while ($row = $db->sql_fetchrow($result)) {
  26      $forum_id = intval($row['forum_id']);
  27      $topic_id = intval($row['topic_id']);
  28      $topic_title = filter($row['topic_title'], "nohtml");
  29      $row2 = $db->sql_fetchrow($db->sql_query("SELECT auth_view, auth_read FROM ".$prefix."_bbforums WHERE forum_id='$forum_id'"));
  30      $auth_view = intval($row2['auth_view']);
  31      $auth_read = intval($row2['auth_read']);
  32      if (($auth_view < 2) OR ($auth_read < 2)) {
  33          $content .= "<img src=\"images/arrow.gif\" border=\"0\" alt=\"\" title=\"\" width=\"9\" height=\"9\">&nbsp;<a href=\"modules.php?name=Forums&amp;file=viewtopic&amp;t=$topic_id\">$topic_title</a><br>";
  34      }
  35  }
  36  
  37  $content .= "<br><center><a href=\"modules.php?name=Forums\"><b>$sitename Forums</b></a><br><br></center>";
  38  
  39  $db->sql_freeresult($result);
  40  
  41  ?>


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