} } } $sm = sminit("popup.tpl"); $sm->assign("text", $message); $sm->assign("timeout", $timeout); $sm->assign("title", "Post reporting form"); $sm->display("popup.tpl"); die; } elseif (strtolower($_POST['report']) == "report2") { $message = "what"; if (!isset($_POST['board']) || $_POST['board'] == "") { $message = "No board provided!"; } else { $db = new ThornToolsDBI(); if ($db->checkban()) { THdie("PObanned"); } $board = $db->getboardnumber($_POST['board']); // verify that the board is correct if ($board == null) { $message = "Invalid board provided!"; } else { if ($_POST['post'] <= 0 || isset($_POST['post']) == false) { $message = "No valid post to report!"; } else { if (isset($_POST['category'])) { $category = intval($_POST['category']); if ($category > 0 && $category < 4) { if ($db->checkreportpost($_POST['post'], $board) == 0) { $db->reportpost($_POST['post'], $board, $category);