File size: 1.59Kb
<?php error_reporting(0);
/* HEHEHEHEHE LOL. */ {
$query2=mysql_query("SELECT * FROM b_topics ORDER BY lastpostdate DESC LIMIT 1");
$num=mysql_num_rows($query2);
if($num>0) {
echo"<div align='left'><br>";
while($info=mysql_fetch_array($query2))
{
$title=cleanvalues2($info["subject"]);
$lv=user_info($user, level);
$id2=cleanvalues2($info["id"]);
$author=cleanvalues2($info["poster"]);
$aid=user_info($author, userID);
$date=cleanvalues2($info["date"]);
$lastposter=cleanvalues2($info["lastposter"]);
$forumid=cleanvalues2($info["forumid"]);
$bid=user_info($lastposter, userID);
$lastpostdate=cleanvalues2($info["lastpostdate"]);
$lastpostdate=@date('G:i D, d M Y', $lastpostdate);
if(empty($lastposter))
{
$lastposter="---";
}
else
{
$lastposter="<a href='../profile.php?uid=$bid'><font color='red'>$lastposter</font></a>";
}
if($lv==0) { $rnk=''; }
elseif($lv==1) {
$rnk= '<img style="vertical-align:middle" src="/images/crown2.png" />'; }
elseif($lv==2) {
$rnk= '<img style="vertical-align:middle" src="/images/crown3.png" />'; } if(empty($img))
{ $img="<img src='../images/novice.png'>";
} else { $img="<img src='../images/novice.png'>";}
echo"<div align='center' class='b_head'><strong> Joyloaded Trending Topic!!</strong></div><small><div class='info_post'><table><td valign='top'><img src='../images/nophoto.png' height='50' width='50'/></td><td><b><a href='../profile.php?uid=$uid'>$rnk$lastposter</a></b> just commented on <a href=../forum/showtopic.php?id=$id2>$title</a> <div class='b_head'><b>On [$lastpostdate]</b></div></td></table></div></small>";
}
echo"</div>";
}
}?>