} } } } $forum['modrecommend'] = $forum['modrecommend'] ? unserialize($forum['modrecommend']) : array(); $raterange = $modratelimit && $adminid == 3 && !$forum['ismoderator'] ? array() : $raterange; $extra = rawurlencode($extra); $allowgetattach = !empty($forum['allowgetattach']) || $allowgetattach && !$forum['getattachperm'] || forumperm($forum['getattachperm']); $seccodecheck = $seccodestatus & 4 && (!$seccodedata['minposts'] || $posts < $seccodedata['minposts']); $secqaacheck = $secqaa['status'][2] && (!$secqaa['minposts'] || $posts < $secqaa['minposts']); $postlist = $attachtags = $attachlist = array(); $aimgcount = 0; $attachpids = -1; if (empty($action) && $tid) { $thisgid = $forum['type'] == 'forum' ? $forum['fup'] : $_DCACHE['forums'][$forum['fup']]['fup']; $lastmod = $thread['moderated'] ? viewthread_lastmod() : array(); $showsettings = str_pad(decbin($showsettings), 3, '0', STR_PAD_LEFT); $customshow = $discuz_uid ? str_pad(base_convert($customshow, 10, 3), 4, '0', STR_PAD_LEFT) : '2222'; $disableddateconvert = $customshow[0]; $showsignatures = $customshow[1] == 2 ? $showsettings[0] : $customshow[1]; $showavatars = $customshow[2] == 2 ? $showsettings[1] : $customshow[2]; $showimages = $customshow[3] == 2 ? $showsettings[2] : $customshow[3]; $highlightstatus = isset($highlight) && str_replace('+', '', $highlight) ? 1 : 0; $usesigcheck = $discuz_uid && $sigstatus ? 1 : 0; $allowpostreply = $forum['allowreply'] != -1 && (!$thread['closed'] && !checkautoclose() || $forum['ismoderator']) && (!$forum['replyperm'] && $allowreply || $forum['replyperm'] && forumperm($forum['replyperm']) || $forum['allowreply']); $allowpost = $forum['allowpost'] != -1 && (!$forum['postperm'] && $allowpost || $forum['postperm'] && forumperm($forum['postperm']) || $forum['allowpost']); $addfeedcheck = $customaddfeed & 4 ? 1 : 0; if ($allowpost) { $allowpostpoll = $allowpostpoll && $forum['allowpostspecial'] & 1; $allowposttrade = $allowposttrade && $forum['allowpostspecial'] & 2; $allowpostreward = $allowpostreward && $forum['allowpostspecial'] & 4 && isset($extcredits[$creditstrans]);
} $exemptvalue = $_G['forum']['ismoderator'] ? 64 : 8; $_G['forum_attachmentdown'] = $_G['group']['exempt'] & $exemptvalue; list($seccodecheck, $secqaacheck) = seccheck('post', 'reply'); $usesigcheck = $_G['uid'] && $_G['group']['maxsigsize']; $postlist = $_G['forum_attachtags'] = $attachlist = $_G['forum_threadstamp'] = array(); $aimgcount = 0; $_G['forum_attachpids'] = array(); if (!empty($_GET['action']) && $_GET['action'] == 'printable' && $_G['tid']) { require_once libfile('thread/printable', 'include'); dexit(); } if ($_G['forum_thread']['stamp'] >= 0) { $_G['forum_threadstamp'] = $_G['cache']['stamps'][$_G['forum_thread']['stamp']]; } $lastmod = viewthread_lastmod($_G['forum_thread']); $showsettings = str_pad(decbin($_G['setting']['showsettings']), 3, '0', STR_PAD_LEFT); $showsignatures = $showsettings[0]; $showavatars = $showsettings[1]; $_G['setting']['showimages'] = $showsettings[2]; $highlightstatus = isset($_GET['highlight']) && str_replace('+', '', $_GET['highlight']) ? 1 : 0; $_G['forum']['allowreply'] = isset($_G['forum']['allowreply']) ? $_G['forum']['allowreply'] : ''; $_G['forum']['allowpost'] = isset($_G['forum']['allowpost']) ? $_G['forum']['allowpost'] : ''; $allowpostreply = $_G['forum']['allowreply'] != -1 && ($_G['forum_thread']['isgroup'] || !$_G['forum_thread']['closed'] && !checkautoclose($_G['forum_thread']) || $_G['forum']['ismoderator']) && (!$_G['forum']['replyperm'] && $_G['group']['allowreply'] || $_G['forum']['replyperm'] && forumperm($_G['forum']['replyperm']) || $_G['forum']['allowreply']); $fastpost = $_G['setting']['fastpost'] && !$_G['forum_thread']['archiveid'] && ($_G['forum']['status'] != 3 || $_G['isgroupuser']); $allowfastpost = $_G['setting']['fastpost'] && $allowpostreply; if (!$_G['uid'] && ($_G['setting']['need_avatar'] || $_G['setting']['need_email'] || $_G['setting']['need_friendnum']) || !$_G['adminid'] && (!cknewuser(1) || $_G['setting']['newbiespan'] && (!getuserprofile('lastpost') || TIMESTAMP - getuserprofile('lastpost') < $_G['setting']['newbiespan'] * 60) && TIMESTAMP - $_G['member']['regdate'] < $_G['setting']['newbiespan'] * 60)) { $allowfastpost = false; } $_G['group']['allowpost'] = $_G['forum']['allowpost'] != -1 && (!$_G['forum']['postperm'] && $_G['group']['allowpost'] || $_G['forum']['postperm'] && forumperm($_G['forum']['postperm']) || $_G['forum']['allowpost']); $_G['forum']['allowpostattach'] = isset($_G['forum']['allowpostattach']) ? $_G['forum']['allowpostattach'] : '';
$exemptvalue = $_G['forum']['ismoderator'] ? 64 : 8; $_G['forum_attachmentdown'] = $_G['group']['exempt'] & $exemptvalue; $seccodecheck = $_G['setting']['seccodestatus'] & 4 && (!$_G['setting']['seccodedata']['minposts'] || getuserprofile('posts') < $_G['setting']['seccodedata']['minposts']); $secqaacheck = $_G['setting']['secqaa']['status'] & 2 && (!$_G['setting']['secqaa']['minposts'] || getuserprofile('posts') < $_G['setting']['secqaa']['minposts']); $postlist = $_G['forum_attachtags'] = $attachlist = $_G['forum_threadstamp'] = array(); $aimgcount = 0; $_G['forum_attachpids'] = -1; if (!empty($_G['gp_action']) && $_G['gp_action'] == 'printable' && $_G['tid']) { require_once libfile('thread/printable', 'include'); dexit(); } if ($_G['forum_thread']['stamp'] >= 0) { $_G['forum_threadstamp'] = $_G['cache']['stamps'][$_G['forum_thread']['stamp']]; } $thisgid = $_G['forum']['type'] == 'forum' ? $_G['forum']['fup'] : $_G['cache']['forums'][$_G['forum']['fup']]['fup']; $lastmod = $_G['forum_thread']['moderated'] ? viewthread_lastmod() : array(); $showsettings = str_pad(decbin($_G['setting']['showsettings']), 3, '0', STR_PAD_LEFT); $showsignatures = $showsettings[0]; $showavatars = $showsettings[1]; $_G['setting']['showimages'] = $showsettings[2]; $highlightstatus = isset($_G['gp_highlight']) && str_replace('+', '', $_G['gp_highlight']) ? 1 : 0; $_G['forum']['allowreply'] = isset($_G['forum']['allowreply']) ? $_G['forum']['allowreply'] : ''; $_G['forum']['allowpost'] = isset($_G['forum']['allowpost']) ? $_G['forum']['allowpost'] : ''; if (!$_G['uid']) { $guestallowpostreply = $_G['forum']['allowreply'] != -1 && ($_G['forum_thread']['isgroup'] || !$_G['forum_thread']['closed'] && !checkautoclose($_G['forum_thread']) || $_G['forum']['ismoderator']) && (!$_G['forum']['replyperm'] && $_G['perm']['allowreply'] || $_G['forum']['replyperm'] && forumperm($_G['forum']['replyperm'], $_G['perm']['groupid']) || $_G['forum']['allowreply']); } $allowpostreply = $_G['forum']['allowreply'] != -1 && ($_G['forum_thread']['isgroup'] || !$_G['forum_thread']['closed'] && !checkautoclose($_G['forum_thread']) || $_G['forum']['ismoderator']) && (!$_G['forum']['replyperm'] && $_G['group']['allowreply'] || $_G['forum']['replyperm'] && forumperm($_G['forum']['replyperm']) || $_G['forum']['allowreply']); if (!$_G['uid'] && ($_G['setting']['need_avatar'] || $_G['setting']['need_email'] || $_G['setting']['need_friendnum'])) { $allowpostreply = false; } $_G['group']['allowpost'] = $_G['forum']['allowpost'] != -1 && (!$_G['forum']['postperm'] && $_G['group']['allowpost'] || $_G['forum']['postperm'] && forumperm($_G['forum']['postperm']) || $_G['forum']['allowpost']);