} } if ($action == "prev") { $prev = $forum->thread_getprev($thread_id, $topic_from); if ($prev) { header("location:" . e_SELF . "?{$prev}"); exit; } else { require_once HEADERF; $ns->tablerender('', LAN_404, array('forum_viewtopic', '404')); require_once FOOTERF; exit; } } if ($action == "report") { $thread_info = $forum->thread_get_postinfo($thread_id, TRUE); if (isset($_POST['report_thread'])) { $report_add = $tp->toDB($_POST['report_add']); if ($pref['reported_post_email']) { require_once e_HANDLER . "mail.php"; $report = LAN_422 . SITENAME . " : " . (substr(SITEURL, -1) == "/" ? SITEURL : SITEURL . "/") . $PLUGINS_DIRECTORY . "forum/forum_viewtopic.php?" . $thread_id . ".post\n" . LAN_425 . USERNAME . "\n" . $report_add; $subject = LAN_421 . " " . SITENAME; sendemail(SITEADMINEMAIL, $subject, $report); } $sql->db_Insert('generic', "0, 'reported_post', " . time() . ", '" . USERID . "', '{$thread_info['head']['thread_name']}', " . intval($thread_id) . ", '{$report_add}'"); define("e_PAGETITLE", LAN_01 . " / " . LAN_428); require_once HEADERF; $text = LAN_424 . "<br /><br /><a href='forum_viewtopic.php?" . $thread_id . ".post'>" . LAN_429 . "</a"; $ns->tablerender(LAN_414, $text, array('forum_viewtopic', 'report')); } else { $thread_name = $tp->toHTML($thread_info['head']['thread_name'], TRUE, 'USER_TITLE');