<?php
########################################################################
# PHP-Nuke Block: subSystem Center Forum Block v.9 #
# Made for PHP-Nuke 6.* and the phpbb2 Nuke port 2.06 only #
# #
# Made by coldblooded http://www.hellhole.org #
########################################################################
# 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 you modify this, let me know for fun. =) #
########################################################################
if (eregi("block-subSystem-Forum.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
global $prefix, $dbi, $sitename, $admin;
$HideViewReadOnly = 1;
$Last_New_Topics = 5;
$show = " <tr>
<td height=\"25\" colspan=\"6\" align=\"center\" class=\"catbottom\" background=\"modules/Forums/templates/subSystem/images/cellpic1.gif\"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>";
$Count_Topics = 0;
$Topic_Buffer = "";
$result = sql_query( "SELECT topic_id, forum_id, topic_last_post_id, topic_title, topic_poster, topic_views, topic_replies, topic_moved_id FROM ".$prefix."_bbtopics ORDER BY topic_time DESC LIMIT 10", $dbi );
while( list( $topic_id, $forum_id, $topic_last_post_id, $topic_title, $topic_poster, $topic_views, $topic_replies, $topic_moved_id ) = sql_fetch_row( $result, $dbi ) )
{
$skip_display = 0;
if( $skip_display == 0 )
{
$Count_Topics += 1;
$result2 = sql_query("SELECT uname, uid FROM ".$prefix."_users where uid='$topic_poster'", $dbi);
list($uname, $uid)=sql_fetch_row($result2, $dbi);
$avtor=$uname;
$sifra=$uid;
$result3 = sql_query("SELECT poster_id, FROM_UNIXTIME(post_time,'%m/%d/%Y at %H:%i') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'", $dbi);
list($poster_id, $post_time)=sql_fetch_row($result3, $dbi);
$result4 = sql_query("SELECT uname, uid FROM ".$prefix."_users where uid='$poster_id'", $dbi);
list($uname, $uid)=sql_fetch_row($result4, $dbi);
$viewlast .=" <tr>
<td height=\"34\" nowrap bgcolor=\"#C1C1C1\" class=\"row1\"><img src=\"modules/Forums/templates/subSystem/images/folder_new.gif\" border=\"0\" /></td>
<td width=\"100%\" bgcolor=\"#C1C1C1\" class=\"row1\"><a href=\"modules.php?name=Forums&file=viewtopic&t=$topic_id#$topic_last_post_id\">$topic_title</a></td>
<td align=\"center\" bgcolor=\"#D4D4D4\" class=\"row3\"><a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$sifra\">$avtor</a></td>
<td align=\"center\" nowrap bgcolor=\"#D4D4D4\" class=\"row3\"><font size=\"-2\">$post_time</font>
<a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$uid\">$uname</a><a href=\"modules.php?name=Forums&file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\"></a><img src=\"modules/Forums/templates/subSystem/images/icon_minipost_new.gif\"></td>
</tr>";
}
if( $Last_New_Topics == $Count_Topics ) { break 1; }
}
$content .= "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
<tr>
<td bgcolor=\"#000000\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td bgcolor=\"#ADADAD\"><table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\">
<tr>
<th height=\"23\" colspan=\"2\" align=\"center\" nowrap background=\"modules/Forums/templates/subSystem/images/cellpic3.gif\" class=\"thcornerl\"><font color=\"#FFcc00\">Topics</font></th>
<th width=\"100\" align=\"center\" nowrap background=\"modules/Forums/templates/subSystem/images/cellpic3.gif\" class=\"thtop\"><font color=\"#FFcc00\">Author</font></th>
<th align=\"center\" nowrap background=\"modules/Forums/templates/subSystem/images/cellpic3.gif\" class=\"thcornerr\"><font color=\"#FFcc00\">Last Post</font></th>
</tr>";
$content .= "$viewlast";
$content .= "$show";
?> |