Reports"); echo $pagertop; print("\n"); print(""); print(""); $res = mysql_query("SELECT reports.id, reports.dealtwith,reports.dealtby, reports.addedby, reports.votedfor, reports.reason, reports.type, users.username FROM reports INNER JOIN users on reports.addedby = users.id $where ORDER BY id desc $limit"); while ($arr = mysql_fetch_assoc($res)) { if ($arr['dealtwith']) { $res3 = mysql_query("SELECT username FROM users WHERE id=".$arr['dealtby']); $arr3 = mysql_fetch_assoc($res3); $dealtwith = "Yes - ".$arr3['username'].""; } else $dealtwith = "No"; if ($arr['type'] == "user") { $type = "userdetails"; $res2 = mysql_query("SELECT username FROM users WHERE id=".$arr['votedfor']); $arr2 = mysql_fetch_assoc($res2); $name = $arr2['username']; } else if ($arr['type'] == "torrent") { $type = "details"; $res2 = mysql_query("SELECT name FROM torrents WHERE id=".$arr['votedfor']); $arr2 = mysql_fetch_assoc($res2); $name = $arr2[name]; if ($name == "") $name = "[Deleted]"; } print("\n"); } print("
ByReportingTypeReasonDealt WithMark Dealt With
".$arr['username']."".$name."$arr[type]$arr[reason]$dealtwith
\n"); print("

"); print(""); echo $pagerbottom; end_main_frame(); stdfoot(); ?>