示例#1
0
文件: forum.php 项目: rmuzzini/e107
    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;
        case 'rules':
            include_once HEADERF;
示例#2
0
    if ($thread_id) {
        $post_num = $forum->thread_postnum($thread_id);
        $pages = ceil(($post_num['post_num'] + 1) / $pref['forum_postspage']);
        $topic_from = ($pages - 1) * $pref['forum_postspage'];
        if ($post_num['parent'] != $thread_id) {
            header("location: " . e_SELF . "?{$post_num['parent']}.{$topic_from}#post_{$thread_id}");
            exit;
        }
    } else {
        header("Location:" . e_PLUGIN . "forum/forum.php");
        exit;
    }
}
require_once e_PLUGIN . 'forum/forum_shortcodes.php';
if ($action == "track" && USER) {
    $forum->track($thread_id);
    header("location:" . e_SELF . "?{$thread_id}.{$topic_from}");
    exit;
}
if ($action == "untrack" && USER) {
    $forum->untrack($thread_id);
    header("location:" . e_SELF . "?{$thread_id}.{$topic_from}");
    exit;
}
if ($action == "next") {
    $next = $forum->thread_getnext($thread_id, $topic_from);
    if ($next) {
        header("location:" . e_SELF . "?{$next}");
        exit;
    } else {
        require_once HEADERF;