Beispiel #1
0
        $newThreadTitleType = 0;
    } elseif ($_POST['rename_thread'] == 'rename' && trim($_POST['newtitle']) != '') {
        $newThreadTitle = $e107->tp->toDB($_POST['newtitle']);
        $newThreadTitleType = 1;
    }
    $threadId = $_GET['id'];
    $toForum = $_POST['forum_move'];
    $forum->threadMove($threadId, $toForum, $newThreadTitle, $newThreadTitleType);
    $message = FORCONF_9;
    // XXX _URL_ thread name
    $url = $e107->url->create('forum/thread/view', 'id=' . $threadId);
}
if (isset($_POST['movecancel'])) {
    require_once e_PLUGIN . 'forum/forum_class.php';
    $forum = new e107forum();
    $postInfo = $forum->postGet($id, 0, 1);
    $message = FORCONF_10;
    //	$url = e_PLUGIN."forum/forum_viewforum.php?".$info['forum_id'];
    $url = $e107->url->create('forum/forum/view', 'id=' . $postInfo[0]['post_forum']);
    // XXX _URL_ thread name
}
if ($message) {
    $text = "<div style='text-align:center'>" . $message . "\n\t\t<br />\n\t\t<a href='{$url}'>" . FORCONF_11 . '</a>
		</div>';
    $ns->tablerender(FORCONF_12, $text);
    require_once FOOTERF;
    exit;
}
if ($action == "delete_poll") {
    $text = "<div style='text-align:center'>\n\t\t" . FORCONF_13 . "\n\t\t<br /><br />\n\t\t<form method='post' action='" . e_SELF . "?" . e_QUERY . "'>\n\t\t<input class='button' type='submit' name='deletecancel' value='" . FORCONF_14 . "' />\n\t\t<input class='button' type='submit' name='deletepollconfirm' value='" . FORCONF_15 . "' />\n\t\t</form>\n\t\t</div>";
    $ns->tablerender(FORCONF_16, $text);
Beispiel #2
0
}
$action = trim($_GET['f']);
$id = (int) $_GET['id'];
switch ($action) {
    case 'rp':
        $threadInfo = $forum->threadGet($id, false);
        $forumId = $threadInfo['thread_forum_id'];
        $forumInfo = $forum->forumGet($forumId);
        break;
    case 'nt':
        $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;
}