| Quote: |
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi (fbc@mandrakesoft.com) */
/* */
/* */
/* This is a 2 min hack of the old forum block to work with the phpBB2 */
/* port. */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (eregi("block-Forums.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
global $prefix, $dbi, $sitename;
$result = sql_query("SELECT forum_id, topic_id, topic_title FROM ".$prefix."_bbtopics ORDER BY topic_time DESC LIMIT 10", $dbi);
$content = "<center><font class=\"blue\"><b> Last Subisions</b></font></center><br>";
while(list($forum_id, $topic_id, $topic_title) = sql_fetch_row($result, $dbi)) {
$topic_title = substr("$topic_title", 0,15);
$result1 = sql_query( "SELECT auth_view, auth_read FROM ".$prefix."_bbforums where forum_id = '$forum_id'", $dbi );
list( $auth_view, $auth_read ) = sql_fetch_row( $result1, $dbi );
if( ( $auth_view != 2 ) or ( $auth_read != 2 ) ) {
$content .= "<img src=\"images/blocks/icon_mini_message.gif\" border=\"0\" alt=\"\" width=\"13\" height=\"14\">&<a href=\"postt.html$topic_id\">$topic_title...</a><br>";
}
}
$content .= "<br><center><a href=\"forums.html\"><i>Forums</i></a></center>";
?> |