Beispiel #1
0
    }
}
$sid = isset($_POST['sid']) ? intval($_POST['sid']) : (isset($_GET['sid']) ? intval($_GET['sid']) : 0);
if ((isset($_POST['postreply']) || isset($_POST['preview']) || isset($_GET['reply']) || isset($_GET['comment'])) && (!$MAIN_CFG['global']['articlecomm'] || $db->sql_count($prefix . '_stories', "sid={$sid} AND acomm=0"))) {
    URL::redirect(URL::index('&file=article&sid=' . $sid));
}
require_once "modules/{$module_name}/comments.php";
if (isset($_POST['postreply'])) {
    replyPost($sid);
    // store the reply
} else {
    if (isset($_GET['reply'])) {
        reply($sid);
        // reply to comment
    } elseif (isset($_POST['preview'])) {
        replyPreview($sid);
        // Preview the reply before storage
    } else {
        if (isset($_GET['comment'])) {
            // Show comment X
            if (!isset($_GET['pid'])) {
                singlecomment(intval($_GET['comment']), $sid);
            } else {
                DisplayComments($sid, '', intval($_GET['pid']), intval($_GET['comment']));
            }
        } else {
            $storynum = is_user() && $userinfo['storynum'] && $MAIN_CFG['member']['user_news'] ? $userinfo['storynum'] : $MAIN_CFG['global']['storyhome'];
            if (isset($_GET['page']) && intval($_GET['page']) > 1) {
                $page = intval($_GET['page']);
                $pagetitle .= '- ' . _PAGE . ' ' . $page;
            } else {
Beispiel #2
0
    if (strlen($forwarder < 5)) {
        $forwarder = URL::index('&op=results&pollid=' . $poll_id);
    }
    URL::redirect($forwarder);
} elseif (isset($_POST['postreply'])) {
    // store the reply
    replyPost($poll_id);
}
require_once 'header.php';
OpenTable();
if (isset($_GET['reply'])) {
    // reply to comment
    reply($poll_id);
} elseif (isset($_POST['preview'])) {
    // Preview the reply before storage
    replyPreview($poll_id);
} else {
    if (isset($_GET['comment'])) {
        // Show comment X
        if (!isset($_GET['pid'])) {
            singlecomment(intval($_GET['comment']), $poll_id);
        } else {
            DisplayComments($poll_id, '', intval($_GET['pid']), intval($_GET['comment']));
        }
    } elseif ($op == 'results' && $poll_id > 0) {
        echo '<div style="text-align:center;" class="title">' . _CURRENTPOLLRESULTS . '</div>';
        CloseTable();
        echo '<table border="0" width="100%" cellpadding="0" cellspacing="0"><tr><td width="70%" valign="top">';
        OpenTable();
        $title = pollResults($poll_id);
        CloseTable();
Beispiel #3
0
        $order = 0;
    }
}
if (!isset($thold) or empty($thold)) {
    if (isset($userinfo['thold'])) {
        $thold = $userinfo['thold'];
    } else {
        $thold = 0;
    }
}
switch ($op) {
    case "Reply":
        reply($pid, $pollID, $mode, $order, $thold);
        break;
    case "" . _PREVIEW . "":
        replyPreview($pid, $pollID, $subject, $comment, $xanonpost, $mode, $order, $thold);
        break;
    case "" . _OK . "":
        CreateTopic($xanonpost, $subject, $comment, $pid, $pollID, $host_name, $mode, $order, $thold);
        break;
    case "moderate":
        if (!is_admin($admin)) {
            global $module_name;
        }
        if ($admintest == 1 || $moderate == 2) {
            while (list($tdw, $emp) = each($_POST)) {
                $tdw = intval($tdw);
                if (stripos_clone($tdw, "dkn")) {
                    $emp = explode(":", $emp);
                    if ($emp[1] != 0) {
                        $tdw = str_replace("dkn", "", $tdw);
    } else {
        $options .= "&order=0";
    }
    if (isset($cookie[6])) {
        $options .= "&thold={$cookie['6']}";
    } else {
        $options .= "&thold=0";
    }
    Header("Location: modules.php?name={$module_name}&file=article&sid={$sid}{$options}");
}
switch ($op) {
    case "Reply":
        reply($pid, $sid, $mode, $order, $thold);
        break;
    case "" . _PREVIEW . "":
        replyPreview($pid, $sid, $subject, $comment, $xanonpost, $mode, $order, $thold, $posttype);
        break;
    case "" . _OK . "":
        CreateTopic($xanonpost, $subject, $comment, $pid, $sid, $host_name, $mode, $order, $thold, $posttype);
        break;
    case "moderate":
        if (isset($admin)) {
            include "auth.php";
        } else {
            include "mainfile.php";
        }
        if ($admintest == 1 || $moderate == 2) {
            while (list($tdw, $emp) = each($HTTP_POST_VARS)) {
                if (eregi("dkn", $tdw)) {
                    $emp = explode(":", $emp);
                    if ($emp[1] != 0) {