$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']; if (!$forumId && e_QUERY) { list($id, $from) = explode(".", e_QUERY); $forumId = intval($id); $threadFrom = intval($from); unset($id, $from); } if (!$forum->checkPerm($forumId, 'view')) { // header('Location:'.e107::getUrl()->create('forum/forum/main')); $url = e107::url('forum', 'index', 'full'); if (E107_DEBUG_LEVEL > 0) { print_a($_REQUEST); print_a($_GET); echo __FILE__ . ' Line: ' . __LINE__; echo " forumId: " . $forumId; exit; } e107::getRedirect()->go($url); exit; } $forumInfo = $forum->forumGet($forumId); $threadsViewed = $forum->threadGetUserViewed(); if (!vartrue($FORUM_VIEW_START)) {
$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: header("Location:" . $e107->url->create('forum/forum/main', array(), 'full=1&encode=0')); exit; } // check if user can post to this forum ... if (!$forum->checkPerm($forumId, 'post')) { require_once HEADERF; $ns->tablerender(LAN_20, "<div style='text-align:center'>" . LAN_399 . '</div>'); require_once FOOTERF; exit; } define('MODERATOR', USER && $forum->isModerator(USERID)); require_once e_HANDLER . 'ren_help.php'; e107::getScBatch('view', 'forum'); e107::getScBatch('post', 'forum')->setScVar('forum', $forum)->setScVar('threadInfo', $threadInfo); $gen = new convert(); $fp = new floodprotect(); $e107 = e107::getInstance(); //if thread is not active and not new thread, show warning if ($action != 'nt' && !$threadInfo['thread_active'] && !MODERATOR) { require_once HEADERF;