Code:
if (eregi("block-Forums.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
include_once ('blocks/smileys.php');
global $prefix, $dbi, $user, $cookie, $group_id;
$count = 1;
$content ="<DIV STYLE=\"overflow: auto; width: 132px; height: 260;
border-left: 0px gray solid; border-bottom: 0px gray solid;
border-right: 0px gray solid; border-top: 0px gray solid;
padding:0px; margin: 0px\">";
$content .="<TABLE cellspacing=0 cellpadding=2><COL WIDTH=140><tr><td width=100% valign=\"top\" wrap><center><font color='#666666' style='text-decoration: none'><b>"._LAST20."</b></font></center>";
$result1 = sql_query("SELECT t.topic_id, t.topic_last_post_id, t.topic_title, f.forum_name, f.forum_id FROM ".$prefix."_bbtopics t, ".$prefix."_bbforums f where t.forum_id=f.forum_id and f.auth_view=0 ORDER BY t.topic_last_post_id DESC LIMIT 20", $dbi);
$content .= "<br>";
while(list($topic_id, $topic_last_post_id, $topic_title, $forum_name, $forum_id) = sql_fetch_row($result1, $dbi)) {
$result2 = sql_query("SELECT topic_id, poster_id, FROM_UNIXTIME(post_time,'%b %d, %Y â %T') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'", $dbi);
list($topic_id, $poster_id, $post_time)=sql_fetch_row($result2, $dbi);
$result3 = sql_query("SELECT username, user_id FROM ".$prefix."_users where user_id='$poster_id'", $dbi);
list($username, $user_id)=sql_fetch_row($result3, $dbi);
$topic_title=parseEmoticons($topic_title);
// Remove the comment below to add the counter
//$content .="<STYLE=\"text-decoration: none\"><font color=\"#666666\"><b>Message: $count<br></b>";
$content .= "<div id=\"contentlayer\"><img src=\"modules/Forums/templates/subSilver/images/icon_mini_message.gif\" border=\"0\" alt=\"\"><a href=\"forums.html?amp;file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\"><b> $topic_title </b></a><br><center><font color=\"#666666\"><i>"._LASTPOST." <A HREF=\"forums.html?file=profile&mode=viewprofile&u=$user_id\"><font color=#F0A20F><b> $username </b></font></a> â <a href=\"forums.html?amp;file=viewforum&f=$forum_id\">$forum_name</a> íà $post_time</i></font></center><br>";
$count = $count + 1;
}
$content .= "<br><center><a href=\"forums.html\"STYLE=\"text-decoration: none\">[ Forums ]</center>";
$content .= "</td></tr></TABLE>";
$content .= "</DIV>";
|