Beispiel #1
0
function forumDeletePost($postId)
{
    require_once e_PLUGIN . 'forum/forum_class.php';
    $f = new e107forum();
    $ret = $f->postDelete($postId);
    return LAN_CANCEL . ' and ' . $ret . ' ' . FORLAN_7 . '.';
}
Beispiel #2
0
function email_item($thread_id)
{
    global $tp;
    $gen = new convert();
    include_once e_PLUGIN . 'forum/forum_class.php';
    $forum = new e107forum();
    $thread_info = $forum->thread_get($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;
}
 /**
  * Get latest forum posts.
  *
  * @return array $posts
  *  Array contains latest forum posts. The first item is the newest post. Empty array if no post.
  */
 function getLatestForumPosts()
 {
     include_once e_PLUGIN . 'forum/forum_class.php';
     $posts = array();
     $db = e107::getDb();
     $forum = new e107forum();
     $forumList = implode(',', $forum->getForumPermList('view'));
     $limit = 10;
     $results = $db->select('forum_post', '*', 'post_forum IN (' . $forumList . ') ORDER BY post_datestamp DESC LIMIT 0, ' . $limit);
     if ($results) {
         while ($row = $db->fetch()) {
             $thread = new e_db_mysql();
             $user = new e_db_mysql();
             $posts[] = array('post' => $row, 'thread' => $thread->retrieve('forum_thread', '*', 'thread_id = ' . intval($row['post_thread'])), 'author' => $user->retrieve('user', '*', 'user_id = ' . intval($row['post_user'])));
             unset($thread);
             unset($user);
         }
     }
     return $posts;
 }
Beispiel #4
0
*/
if (!defined('e107_INIT')) {
    require_once '../../class2.php';
}
$e107 = e107::getInstance();
$tp = e107::getParser();
$sql = e107::getDb();
if (!$e107->isInstalled('forum')) {
    // FIXME GLOBAL - get rid of all e_BASE|e_HTTP|Whatever/index.php - just point to SITEURL
    header('Location: ' . SITEURL);
    exit;
}
e107::lan('forum', "front", true);
// include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum.php'); // using English_front.php now
require_once e_PLUGIN . 'forum/forum_class.php';
$forum = new e107forum();
if ($untrackId = varset($_REQUEST['untrack'])) {
    $forum->track('del', USERID, $untrackId);
    header('location:' . $e107->url->create('forum/thread/track', array(), 'full=1&encode=0'));
    exit;
}
if (isset($_GET['f'])) {
    if (isset($_GET['id'])) {
        $id = (int) $_GET['id'];
    }
    switch ($_GET['f']) {
        case 'mfar':
            $forum->forumMarkAsRead($id);
            header('location:' . e_SELF);
            exit;
            break;
Beispiel #5
0
require_once '../../class2.php';
include_lan(e_PLUGIN . 'forum/languages/' . e_LANGUAGE . '/lan_forum_admin.php');
if (!getperms('P')) {
    header('location:' . e_BASE . 'index.php');
    exit;
}
$e_sub_cat = 'forum';
require_once e_ADMIN . 'auth.php';
require_once e_HANDLER . 'userclass_class.php';
require_once e_HANDLER . 'form_handler.php';
require_once e_HANDLER . 'ren_help.php';
require_once e_PLUGIN . 'forum/forum_class.php';
require_once e_PLUGIN . 'forum/forum_admin_class.php';
$emessage = eMessage::getInstance();
$rs = new form();
$for = new e107forum();
$forum = new forumAdmin();
$fPref = e107::getPlugConfig('forum', '', false);
define('IMAGE_new', "<img src='" . img_path('new.png') . "' alt='' />");
define('IMAGE_sub', "<img src='" . e_PLUGIN . "forum/images/forums_16.png' alt='" . FORLAN_145 . "' title='" . FORLAN_145 . "' />");
define('IMAGE_nosub', "<img src='" . e_PLUGIN . "forum/images/sub_forums_16.png' alt='" . FORLAN_145 . "' title='" . FORLAN_145 . "' />");
$deltest = array_flip($_POST);
if (e_QUERY) {
    $tmp = explode('.', e_QUERY);
    $action = $tmp[0];
    $sub_action = $tmp[1];
    $id = $tmp[2];
    unset($tmp);
}
if (isset($_POST['delete'])) {
    $tmp = array_pop(array_flip($_POST['delete']));
Beispiel #6
0
        /*
        require_once (e_HANDLER.'np_class.php');
        $ftotal = $sql->db_Count('forum_thread', '(*)', 'WHERE 1');
        $ix = new nextprev('top.php', $from, $view, $ftotal, '', 'active.forum.'.$view);
        */
    }
}
if ($action == 'top') {
    //require_once (e_HANDLER.'level_handler.php');
    $rank = e107::getRank();
    define('IMAGE_rank_main_admin_image', $pref['rank_main_admin_image'] && file_exists(THEME . "forum/" . $pref['rank_main_admin_image']) ? "<img src='" . THEME_ABS . "forum/" . $pref['rank_main_admin_image'] . "' alt='' />" : "<img src='" . e_PLUGIN_ABS . "forum/images/" . IMODE . "/main_admin.png' alt='' />");
    define('IMAGE_rank_admin_image', $pref['rank_admin_image'] && file_exists(THEME . "forum/" . $pref['rank_admin_image']) ? "<img src='" . THEME_ABS . "forum/" . $pref['rank_admin_image'] . "' alt='' />" : "<img src='" . e_PLUGIN_ABS . "forum/images/" . IMODE . "/admin.png' alt='' />");
    define('IMAGE_rank_moderator_image', $pref['rank_moderator_image'] && file_exists(THEME . "forum/" . $pref['rank_moderator_image']) ? "<img src='" . THEME_ABS . "forum/" . $pref['rank_moderator_image'] . "' alt='' />" : "<img src='" . e_PLUGIN_ABS . "forum/images/" . IMODE . "/moderator.png' alt='' />");
    if ($subaction == 'forum' || $subaction == 'all') {
        require_once e_PLUGIN . 'forum/forum_class.php';
        $forum = new e107forum();
        $qry = "\r\n\t\tSELECT ue.*, u.* FROM `#user_extended` AS ue\r\n\t\tLEFT JOIN `#user` AS u ON u.user_id = ue.user_extended_id\r\n\t\tWHERE ue.user_plugin_forum_posts > 0\r\n\t\tORDER BY ue.user_plugin_forum_posts DESC LIMIT {$from}, {$view}\r\n\t\t";
        //		$top_forum_posters = $sql->db_Select("user", "*", "`user_forums` > 0 ORDER BY user_forums DESC LIMIT ".$from.", ".$view."");
        $text = "\r\n\t\t\t<div>\r\n\t\t\t<table style='width:95%' class='table table-striped fborder'>\r\n\t\t\t<tr>\r\n\t\t\t<th style='width:10%; text-align:center' class='forumheader3'>&nbsp;</th>\r\n\t\t\t<th style='width:50%' class='forumheader3'>" . TOP_LAN_1 . "</th>\r\n\t\t\t<th style='width:10%; text-align:center' class='forumheader3'>" . TOP_LAN_2 . "</th>\r\n\t\t\t<th style='width:30%; text-align:center' class='forumheader3'>" . TOP_LAN_6 . "</th>\r\n\t\t\t</tr>\n";
        $counter = 1 + $from;
        $sql2 = e107::getDb('sql2');
        if ($sql2->gen($qry)) {
            while ($row = $sql2->db_Fetch(MYSQL_ASSOC)) {
                //$ldata = get_level($row['user_id'], $row['user_plugin_forum_posts'], $row['user_comments'], $row['user_chats'], $row['user_visits'], $row['user_join'], $row['user_admin'], $row['user_perms'], $pref);
                $ldata = $rank->getRanks($row, USER && $forum->isModerator(USERID));
                if (vartrue($ldata['special'])) {
                    $r = $ldata['special'];
                } else {
                    $r = $ldata['pic'] ? $ldata['pic'] : defset($ldata['name'], $ldata['name']);
                }
                if (!$r) {
Beispiel #7
0
if (isset($_POST['fjsubmit'])) {
    header('location:' . e107::getUrl()->create('forum/forum/view', array('id' => (int) $_POST['forumjump']), 'full=1&encode=0'));
    exit;
}
$highlight_search = isset($_POST['highlight_search']);
if (!e_QUERY) {
    //	var_dump(e_QUERY);
    //	exit;
    //No parameters given, redirect to forum home
    $url = e107::url('forum', 'index', 'full');
    e107::getRedirect()->go($url);
    //	header('Location:' . e107::getUrl()->create('forum/forum/main', array(), 'full=1&encode=0'));
    exit;
}
include_once e_PLUGIN . 'forum/forum_class.php';
$forum = new e107forum();
$thread = new e107ForumThread();
// check if user wants to download a file
if (vartrue($_GET['id']) && isset($_GET['dl'])) {
    $forum->sendFile($_GET);
    exit;
}
if (e_AJAX_REQUEST && varset($_POST['action']) == 'quickreply') {
    $forum->ajaxQuickReply();
}
if (e_AJAX_REQUEST && MODERATOR) {
    $forum->ajaxModerate();
}
if (isset($_GET['last'])) {
    $_GET['f'] = 'last';
}
Beispiel #8
0
 *
 * Copyright (C) 2008-2013 e107 Inc (e107.org)
 * Released under the terms and conditions of the
 * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
 *
 */
require_once '../../class2.php';
$e107 = e107::getInstance();
if (!$e107->isInstalled('forum')) {
    e107::redirect('admin');
    exit;
}
$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
Beispiel #9
0
 function mostActiveTopics()
 {
     //require_once (e_HANDLER.'userclass_class.php');
     $sql = e107::getDb();
     $tp = e107::getParser();
     $ns = e107::getRender();
     require_once e_PLUGIN . 'forum/forum_class.php';
     $forum = new e107forum();
     $forumList = implode(',', $forum->getForumPermList('view'));
     $qry = "\n\t\tSELECT\n\t\t\tt.*, u.user_name, ul.user_name AS user_last, f.forum_name\n\t\tFROM `#forum_thread` as t\n\t\tLEFT JOIN `#forum` AS f ON f.forum_id = t.thread_forum_id\n\t\tLEFT JOIN `#user` AS u ON u.user_id = t.thread_user\n\t\tLEFT JOIN `#user` AS ul ON ul.user_id = t.thread_lastuser\n\t\tWHERE t.thread_forum_id IN ({$forumList})\n\t\tORDER BY t.thread_views DESC\n\t\tLIMIT\n\t\t\t{$this->from}, {$this->view}\n\t\t";
     if ($sql->gen($qry)) {
         $text = "<div>\n<table style='width:auto' class='table fborder'>\n";
         $gen = e107::getDate();
         $text .= "<tr>\n\t\t\t<th style='width:5%' class='forumheader'>&nbsp;</th>\n\t\t\t<th style='width:45%' class='forumheader'>" . LAN_1 . "</th>\n\t\t\t<th style='width:15%; text-align:center' class='forumheader'>" . LAN_2 . "</th>\n\t\t\t<th style='width:5%; text-align:center' class='forumheader'>" . LAN_3 . "</th>\n\t\t\t<th style='width:5%; text-align:center' class='forumheader'>" . LAN_4 . "</th>\n\t\t\t<th style='width:25%; text-align:center' class='forumheader'>" . LAN_5 . "</th>\n\t\t\t</tr>\n";
         while ($row = $sql->fetch(MYSQL_ASSOC)) {
             if ($row['user_name']) {
                 $POSTER = "<a href='" . e107::getUrl()->create('user/profile/view', "name={$row['user_name']}&id={$row['thread_user']}") . "'>{$row['user_name']}</a>";
             } else {
                 $POSTER = $row['thread_user_anon'];
             }
             $LINKTOTHREAD = e107::getUrl()->create('forum/thread/view', array('id' => $row['thread_id']));
             //$e107->url->getUrl('forum', 'thread', "func=view&id={$row['thread_id']}");
             $LINKTOFORUM = e107::getUrl()->create('forum/forum/view', array('id' => $row['thread_forum_id']));
             //$e107->url->getUrl('forum', 'forum', "func=view&id={$row['thread_forum_id']}");
             $lastpost_datestamp = $gen->convert_date($row['thread_lastpost'], 'forum');
             if ($row['user_last']) {
                 $LASTPOST = "<a href='" . e107::getUrl()->create('user/profile/view', "name={$row['user_last']}&id={$row['thread_lastuser']}") . "'>{$row['user_last']}</a><br />" . $lastpost_datestamp;
             } else {
                 $LASTPOST = $row['thread_lastuser_anon'] . '<br />' . $lastpost_datestamp;
             }
             $text .= "<tr>\n\t\t\t\t\t<td style='width:5%; text-align:center' class='forumheader3'><img src='" . e_PLUGIN_ABS . "forum/images/" . IMODE . "/new_small.png' alt='' /></td>\n\t\t\t\t\t<td style='width:45%' class='forumheader3'><b><a href='{$LINKTOTHREAD}'>{$row['thread_name']}</a></b> <span class='smalltext'>(<a href='{$LINKTOFORUM}'>{$row['forum_name']}</a>)</span></td>\n\t\t\t\t\t<td style='width:15%; text-align:center' class='forumheader3'>{$POSTER}</td>\n\t\t\t\t\t<td style='width:5%; text-align:center' class='forumheader3'>{$row['thread_views']}</td>\n\t\t\t\t\t<td style='width:5%; text-align:center' class='forumheader3'>{$row['thread_total_replies']}</td>\n\t\t\t\t\t<td style='width:25%; text-align:center' class='forumheader3'>{$LASTPOST}</td>\n\t\t\t\t\t</tr>\n";
         }
         $text .= "</table>\n</div>";
         $ftotal = $sql->count('forum_thread', '(*)', 'WHERE `thread_parent` = 0');
         $parms = "{$ftotal},{$this->view},{$this->from}," . e_SELF . '?[FROM].active.forum.' . $this->view;
         $text .= "<div class='nextprev'>" . $tp->parseTemplate("{NEXTPREV={$parms}}") . '</div>';
         $ns->tablerender(LAN_7, $text, 'nfp');
     }
 }
Beispiel #10
0
    if (E107_DEBUG_LEVEL > 0) {
        echo __FILE__ . ' Line: ' . __LINE__;
        exit;
    }
    $url = e107::url('forum', 'index', 'full');
    e107::getRedirect()->go($url);
    //header('Location:'.e107::getUrl()->create('forum/forum/main', array(), 'full=1&encode=0'));
    exit;
}
if (!empty($_GET['sef'])) {
    if ($newID = $sql->retrieve('forum', 'forum_id', "forum_sef= '" . $tp->toDB($_GET['sef']) . "' LIMIT 1")) {
        $_REQUEST['id'] = $newID;
    }
}
require_once e_PLUGIN . 'forum/forum_class.php';
$forum = new e107forum();
//$view = 25;
$view = $forum->prefs->get('threadspage', 25);
if (!$view) {
    $view = 25;
}
$page = varset($_GET['p']) ? $_GET['p'] : 1;
$threadFrom = ($page - 1) * $view;
global $forum_info, $FORUM_CRUMB;
$fVars = new e_vars();
$fVars->STARTERTITLE = LAN_FORUM_1004;
$fVars->THREADTITLE = LAN_FORUM_1003;
$fVars->REPLYTITLE = LAN_FORUM_0003;
$fVars->LASTPOSTITLE = LAN_FORUM_0004;
$fVars->VIEWTITLE = LAN_FORUM_1005;
$forumId = (int) $_REQUEST['id'];
Beispiel #11
0
<?php

require_once '../../class2.php';
require_once e_PLUGIN . 'forum/forum_class.php';
$timestart = microtime();
$forum = new e107forum();
//for($i=1; $i<=7000; $i++) {
// $x = $forum->update_lastpost('thread',$i);
//}
set_time_limit(240);
$forum->update_lastpost('forum', 'all');
//$x = $forum->update_lastpost('forum',16);
$timeend = microtime();
$diff = number_format(substr($timeend, 0, 9) + substr($timeend, -10) - substr($timestart, 0, 9) - substr($timestart, -10), 4);
echo "<br />script generation took {$diff} s";
Beispiel #12
0
        $parms = $ctotal . ",10," . $from . "," . e_REQUEST_SELF . "?[FROM].comments." . $id;
        $nextprev = $ctotal ? $tp->parseTemplate("{NEXTPREV={$parms}}") : '';
        if ($nextprev) {
            $nextprev = str_replace('{USERPOSTS_NEXTPREV}', $nextprev, $USERPOSTS_TEMPLATE['np_table']);
        }
        $vars = new e_vars(array('NEXTPREV' => $nextprev));
        // preg_replace("/\{(.*?)\}/e", '$\1', $USERPOSTS_TEMPLATE['comments_table_start']);
        $userposts_comments_table_start = $tp->simpleParse($USERPOSTS_TEMPLATE['comments_table_start'], $vars);
        // preg_replace("/\{(.*?)\}/e", '$\1', $USERPOSTS_TEMPLATE['comments_table_end'])
        $userposts_comments_table_end = $tp->simpleParse($USERPOSTS_TEMPLATE['comments_table_end'], $vars);
        $ctext .= $userposts_comments_table_start . $userposts_comments_table_string . $userposts_comments_table_end;
    }
    $ns->tablerender($ccaption, $ctext);
} elseif ($action == 'forums') {
    require_once e_PLUGIN . 'forum/forum_class.php';
    $forum = new e107forum();
    $forumList = implode(',', $forum->getForumPermList('view'));
    /*if(is_numeric($id))
    	{
    		$uinfo = e107::user($id);
    		$fcaption = UP_LAN_0.' '.$uinfo['user_name'];
    	}
    	else
    	{
    		$user_name = 0;
    	}*/
    if ($id == e107::getUser()->getId()) {
        $user_name = USERNAME;
    } else {
        $user_name = e107::getSystemUser($id, false)->getName(LAN_ANONYMOUS);
    }
Beispiel #13
0
        $newThreadTitle = '[' . FORCONF_27 . ']';
        $newThreadTitleType = 0;
    } elseif ($_POST['rename_thread'] == 'rename' && trim($_POST['newtitle']) != '') {
        $newThreadTitle = $e107->tp->toDB($_POST['newtitle']);
        $newThreadTitleType = 1;
    }
    $threadId = $_GET['id'];
    $toForum = $_POST['forum_move'];
    $forum->threadMove($threadId, $toForum, $newThreadTitle, $newThreadTitleType);
    $message = FORCONF_9;
    // XXX _URL_ thread name
    $url = $e107->url->create('forum/thread/view', 'id=' . $threadId);
}
if (isset($_POST['movecancel'])) {
    require_once e_PLUGIN . 'forum/forum_class.php';
    $forum = new e107forum();
    $postInfo = $forum->postGet($id, 0, 1);
    $message = FORCONF_10;
    //	$url = e_PLUGIN."forum/forum_viewforum.php?".$info['forum_id'];
    $url = $e107->url->create('forum/forum/view', 'id=' . $postInfo[0]['post_forum']);
    // XXX _URL_ thread name
}
if ($message) {
    $text = "<div style='text-align:center'>" . $message . "\n\t\t<br />\n\t\t<a href='{$url}'>" . FORCONF_11 . '</a>
		</div>';
    $ns->tablerender(FORCONF_12, $text);
    require_once FOOTERF;
    exit;
}
if ($action == "delete_poll") {
    $text = "<div style='text-align:center'>\n\t\t" . FORCONF_13 . "\n\t\t<br /><br />\n\t\t<form method='post' action='" . e_SELF . "?" . e_QUERY . "'>\n\t\t<input class='button' type='submit' name='deletecancel' value='" . FORCONF_14 . "' />\n\t\t<input class='button' type='submit' name='deletepollconfirm' value='" . FORCONF_15 . "' />\n\t\t</form>\n\t\t</div>";
Beispiel #14
0
*/
if ((isset($_POST['report_thread']) || in_array('thread_action', $_POST)) && !isset($_POST['e-token'])) {
    // set e-token so it can be processed by class2
    $_POST['e-token'] = '';
}
require_once '../../class2.php';
if (!isset($pref['plug_installed']['forum'])) {
    header('Location: ' . e_BASE . 'index.php');
    exit;
}
include_lan(e_PLUGIN . 'forum/languages/' . e_LANGUAGE . '/lan_forum_viewtopic.php');
include_once e_PLUGIN . 'forum/forum_class.php';
if (file_exists(THEME . 'forum_design.php')) {
    include_once THEME . 'forum_design.php';
}
$forum = new e107forum();
if (isset($_POST['fjsubmit'])) {
    header("location:" . e_PLUGIN . "forum/forum_viewforum.php?" . $_POST['forumjump']);
    exit;
}
$highlight_search = FALSE;
if (isset($_POST['highlight_search'])) {
    $highlight_search = TRUE;
}
if (!e_QUERY) {
    //No paramaters given, redirect to forum home
    header("Location:" . e_PLUGIN . "forum/forum.php");
    exit;
} else {
    $tmp = explode(".", e_QUERY);
    $thread_id = intval(varset($tmp[0], 0));
Beispiel #15
0
$e107 = e107::getInstance();
$tp = e107::getParser();
$sql = e107::getDb();
if (!$e107->isInstalled('forum')) {
    // FIXME GLOBAL - get rid of all e_BASE|e_HTTP|Whatever/index.php - just point to SITEURL
    e107::redirect();
    exit;
}
e107::lan('forum', "front", true);
// include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum.php'); // using English_front.php now
if (!deftrue('BOOTSTRAP')) {
    $bcDefs = array('FORLAN_11' => 'LAN_FORUM_0039', 'FORLAN_12' => 'LAN_FORUM_0040', 'FORLAN_18' => 'LAN_FORUM_0041');
    e107::getLanguage()->bcDefs($bcDefs);
}
require_once e_PLUGIN . 'forum/forum_class.php';
$forum = new e107forum();
if (e_AJAX_REQUEST) {
    if (varset($_POST['action']) == 'track') {
        $forum->ajaxTrack();
    }
}
if ($untrackId = varset($_REQUEST['untrack'])) {
    $forum->track('del', USERID, $untrackId);
    header('location:' . $e107->url->create('forum/thread/track', array(), 'full=1&encode=0'));
    exit;
}
if (isset($_GET['f'])) {
    if (isset($_GET['id'])) {
        $id = (int) $_GET['id'];
    }
    switch ($_GET['f']) {
Beispiel #16
0
*/
require_once '../../class2.php';
$e107 = e107::getInstance();
$tp = e107::getParser();
$ns = e107::getRender();
if (!$e107->isInstalled('forum')) {
    header('Location: ' . SITEURL . 'index.php');
    exit;
}
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;