How to add those inside topics and posts on forums.php?
print ("<tr valign='top''><td width='150' align='left' class='comment-details'><center><i>$title</i> $res2 = SQL_Query_exec("SELECT COUNT(*) FROM `torrents` WHERE `owner` = '$posterid' ");
$arr2 = mysqli_fetch_row($res2);
$torrentposts = $arr2[0];
$res3 = SQL_Query_exec("SELECT class FROM `users` WHERE id=$posterrid ");
$arr3 = mysqli_fetch_row($res3);
$group = $arr3[0];
print ("<tr valign='top''><td width='150' align='left' class='comment-details'><center><i>$title</i></center><br /><center><img width='80' height='80' src='$avatar' alt='' /></center><br />Class:$group<br />Uploaded: $useruploaded<br />Downloaded: $userdownloaded<br />Posts: $forumposts <br />Torrents: $torrentposts<br /><br />Ratio: $userratio<br />Location: $usercountry<br /><br /></td>");
$res2 = SQL_Query_exec("SELECT COUNT(*) FROM `torrents` WHERE `owner` = $posterid ");
$arr2 = mysqli_fetch_row($res2);
$torrentposts = $arr2[0];
$res3 = SQL_Query_exec("SELECT class FROM `users` WHERE id=$posterid ");
$arr3 = mysqli_fetch_row($res3);
$group1 = $arr3[0];
$res5 = SQL_Query_exec("SELECT level FROM `groups` WHERE group_id=$group1 ");
$arr6 = mysqli_fetch_row($res5);
$group = $arr6[0];
print ("<tr valign='top''><td width='150' align='left' class='comment-details'><center><i>$title</i></center><br /><center><img width='80' height='80' src='$avatar' alt='' /></center><br />Class:$group<br />Uploaded: $useruploaded<br />Downloaded: $userdownloaded<br />Posts: $forumposts <br />Torrents: $torrentposts<br /><br />Ratio: $userratio<br />Location: $usercountry<br /><br /></td>");
No users online
Torrents
Members
Online