$navtitle = $thread['subject'] . ' - '; if ($thread['readperm'] && $thread['readperm'] > $_G['group']['readaccess'] && !$_G['forum']['ismoderator'] && $thread['authorid'] != $_G['uid']) { showmessage('thread_nopermission', NULL, array('readperm' => $thread['readperm']), array('login' => 1)); } $_G['fid'] = $thread['fid']; $special = $thread['special']; } else { showmessage('thread_nonexistence'); } if ($_G['gp_action'] == 'reply' && $thread['closed'] == 1 && !$_G['forum']['ismoderator']) { showmessage('post_thread_closed'); } } if ($_G['forum']['status'] == 3) { $returnurl = 'forum.php?mod=forumdisplay&fid=' . $_G['fid'] . (!empty($_G['gp_extra']) ? '&action=list&' . preg_replace("/^(&)*/", '', $_G['gp_extra']) : '') . '#groupnav'; $navigation = ' › <a href="group.php">' . $_G['setting']['navs'][3]['navname'] . '</a> ' . get_groupnav($_G['forum']); } else { if ($_G['gp_from'] != 'portal') { $returnurl = 'forum.php?mod=forumdisplay&fid=' . $_G['fid'] . (!empty($_G['gp_extra']) ? '&' . preg_replace("/^(&)*/", '', $_G['gp_extra']) : ''); $navigation = '› <a href="' . $returnurl . '">' . $_G['forum']['name'] . '</a> ' . $navigation; } $navtitle = $navtitle . strip_tags($_G['forum']['name']) . ' - '; if ($_G['forum']['type'] == 'sub') { $fup = DB::fetch_first("SELECT name, fid FROM " . DB::table('forum_forum') . " WHERE fid='" . $_G['forum']['fup'] . "'"); $navigation = '› <a href="forum.php?mod=forumdisplay&fid=' . $fup['fid'] . '">' . $fup['name'] . '</a> ' . $navigation; $navtitle = $navtitle . strip_tags($fup['name']) . ' - '; } $navigation = ' › <a href="forum.php">' . $_G['setting']['navs'][2]['navname'] . '</a> ' . $navigation; } periodscheck('postbanperiods'); if ($_G['forum']['password'] && $_G['forum']['password'] != $_G['cookie']['fidpw' . $_G['fid']]) {
$url .= '?sgid=' . $sgid; } else { $sgid = 0; } } if (empty($curtype)) { if ($_G['uid'] && empty($_G['mod'])) { $usergroups = getuserprofile('groups'); if (!empty($usergroups)) { dheader('Location:group.php?mod=my'); exit; } } $curtype = array(); } else { $nav = get_groupnav($curtype); $groupnav = $nav['nav']; $_G['grouptypeid'] = $curtype['fid']; $perpage = 10; if ($curtype['forumcolumns'] > 1) { $curtype['forumcolwidth'] = floor(100 / $curtype['forumcolumns']) - 0.1 . '%'; $perpage = $curtype['forumcolumns'] * 10; } } $seodata = array('first' => $nav['first']['name'], 'second' => $nav['second']['name']); list($navtitle, $metadescription, $metakeywords) = get_seosetting('group', $seodata); $_G['cache']['groupindex'] = ''; $data = $randgrouplist = $randgroupdata = $grouptop = $newgrouplist = array(); $topgrouplist = $_G['cache']['groupindex']['topgrouplist']; $lastupdategroup = $_G['cache']['groupindex']['lastupdategroup']; $todayposts = intval($_G['cache']['groupindex']['todayposts']);
if (!empty($thread)) { if ($thread['readperm'] && $thread['readperm'] > $_G['group']['readaccess'] && !$_G['forum']['ismoderator'] && $thread['authorid'] != $_G['uid']) { showmessage('thread_nopermission', NULL, array('readperm' => $thread['readperm']), array('login' => 1)); } $_G['fid'] = $thread['fid']; $special = $thread['special']; } else { showmessage('thread_nonexistence'); } if ($thread['closed'] == 1 && !$_G['forum']['ismoderator']) { showmessage('post_thread_closed'); } } if ($_G['forum']['status'] == 3) { $returnurl = 'forum.php?mod=forumdisplay&fid=' . $_G['fid'] . (!empty($_GET['extra']) ? '&action=list&' . preg_replace("/^(&)*/", '', $_GET['extra']) : '') . '#groupnav'; $nav = get_groupnav($_G['forum']); $navigation = ' <em>›</em> <a href="group.php">' . $_G['setting']['navs'][3]['navname'] . '</a> ' . $nav['nav']; } else { loadcache('forums'); $returnurl = 'forum.php?mod=forumdisplay&fid=' . $_G['fid'] . (!empty($_GET['extra']) ? '&' . preg_replace("/^(&)*/", '', $_GET['extra']) : ''); $navigation = ' <em>›</em> <a href="forum.php">' . $_G['setting']['navs'][2]['navname'] . '</a>'; if ($_G['forum']['type'] == 'sub') { $fup = $_G['cache']['forums'][$_G['forum']['fup']]['fup']; $t_link = $_G['cache']['forums'][$fup]['type'] == 'group' ? 'forum.php?gid=' . $fup : 'forum.php?mod=forumdisplay&fid=' . $fup; $navigation .= ' <em>›</em> <a href="' . $t_link . '">' . $_G['cache']['forums'][$fup]['name'] . '</a>'; } if ($_G['forum']['fup']) { $fup = $_G['forum']['fup']; $t_link = $_G['cache']['forums'][$fup]['type'] == 'group' ? 'forum.php?gid=' . $fup : 'forum.php?mod=forumdisplay&fid=' . $fup; $navigation .= ' <em>›</em> <a href="' . $t_link . '">' . $_G['cache']['forums'][$fup]['name'] . '</a>'; }