Esempio n. 1
0
        $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 = ' &rsaquo; <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 = '&rsaquo; <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 = '&rsaquo; <a href="forum.php?mod=forumdisplay&fid=' . $fup['fid'] . '">' . $fup['name'] . '</a> ' . $navigation;
        $navtitle = $navtitle . strip_tags($fup['name']) . ' - ';
    }
    $navigation = ' &rsaquo; <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']]) {
Esempio n. 2
0
        $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']);
Esempio n. 3
0
    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>&rsaquo;</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>&rsaquo;</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>&rsaquo;</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>&rsaquo;</em> <a href="' . $t_link . '">' . $_G['cache']['forums'][$fup]['name'] . '</a>';
    }