} else { $db = new ThornModDBI(); // Init some stuff if (isset($_GET['board'])) { $board_folder = trim($_GET['board']); //trim the board name from get } else { $board_folder = ""; } $boardid = 0; $reports = array(); $processed_reports = array(); if ($board_folder && $db->getboardnumber($board_folder)) { $boardid = $db->getboardnumber($board_folder); // Filter by this boardid $reports = $db->gettopreports($boardid); } else { $board_folder = ""; // Clear $board if the getboardnumber call failed $reports = $db->gettopreports(); } // Populate each report with post and image information as well foreach ($reports as $report) { // Basic post information $report['post'] = $db->getsinglepost($report['postid'], $report['board']); // Add in the thread location (globalid) if ($report['post']['thread'] == 0) { $report['post']['thread_globalid'] = $report['post']['globalid']; } else { // Get the thread globalid $loc_array = $db->getpostlocation($report['post']['thread']);