function email_item($thread_id) { global $tp; $gen = new convert(); include_once e_PLUGIN . 'forum/forum_class.php'; $forum = new e107forum(); $thread_info = $forum->threadGet($thread_id, 0, 999); $thread_name = $tp->toHTML($thread_info[0]['thread_name'], TRUE); $text = "<b>" . $thread_name . "</b><br />\n\t" . $thread_info[0]['user_name'] . ", " . $gen->convert_date($thread_info[0]['thread_datestamp'], "forum") . "<br /><br />\n\t" . $tp->toHTML($thread_info[0]['thread_thread'], TRUE); $count = 1; unset($thread_info[0], $thread_info['head']); foreach ($thread_info as $reply) { $text .= "<br /><br />Re: <b>" . $thread_name . "</b><br />\n\t\t" . $reply['user_name'] . ", " . $gen->convert_date($reply['thread_datestamp'], "forum") . "<br /><br />\n\t\t" . $tp->toHTML($reply['thread_thread'], TRUE); } return $text; }
} $ns = e107::getRender(); $tp = e107::getParser(); require_once e_PLUGIN . 'forum/forum_class.php'; $forum = new e107forum(); e107::lan('forum', 'admin'); //include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_conf.php'); $e_sub_cat = 'forum'; if (!USER || !isset($_GET['f']) || !isset($_GET['id'])) { header('location:' . $e107::getUrl()->create('/'), array(), array('encode' => false, 'full' => 1)); exit; } $id = (int) $_GET['id']; $action = $_GET['f']; $qry = "\nSELECT t.*, f.*, fp.forum_id AS forum_parent_id FROM #forum_thread as t\nLEFT JOIN #forum AS f ON t.thread_forum_id = f.forum_id\nLEFT JOIN #forum AS fp ON fp.forum_id = f.forum_parent\nWHERE t.thread_id = {$thread_id}\n"; $threadInfo = $forum->threadGet($id); $modList = $forum->forumGetMods($threadInfo->forum_moderators); //var_dump($threadInfo); //var_dump($modList); //If user is not a moderator of indicated forum, redirect to index page if (!in_array(USERID, array_keys($modList))) { header('location:' . $e107::getUrl()->create('/'), array(), array('encode' => false, 'full' => 1)); exit; } require_once HEADERF; if (isset($_POST['deletepollconfirm'])) { $sql->delete("poll", "poll_id='" . intval($thread_parent) . "' "); $sql->select("forum_thread", "*", "thread_id='" . $thread_id . "' "); $row = $sql->fetch(); extract($row); $thread_name = str_replace("[poll] ", "", $thread_name);
include_lan(e_PLUGIN . 'forum/languages/' . e_LANGUAGE . '/lan_forum_post.php'); if (isset($_POST['fjsubmit'])) { header('Location:' . $e107->url->create('forum/forum/view', array('id' => (int) $_POST['forumjump']), '', 'full=1&encode=0')); exit; } require_once e_PLUGIN . 'forum/forum_class.php'; $forum = new e107forum(); if (!e_QUERY || !isset($_GET['id'])) { header('Location:' . $e107->url->create('forum/forum/main', array(), 'full=1&encode=0')); exit; } $action = trim($_GET['f']); $id = (int) $_GET['id']; switch ($action) { case 'rp': $threadInfo = $forum->threadGet($id, false); $forumId = $threadInfo['thread_forum_id']; $forumInfo = $forum->forumGet($forumId); break; case 'nt': $forumInfo = $forum->forumGet($id); $forumId = $id; break; case 'quote': case 'edit': $postInfo = $forum->postGet($id, 'post'); $threadInfo = $postInfo; $forumId = $postInfo['post_forum']; $forumInfo = $forum->forumGet($forumId); break; default: