예제 #1
0
    }
    if ($valid && $poll_vote_type == POLL_VOTE_PUBLIC && $change_vote == POLL_VOTE_MULTI) {
        $error_msg_array[] = gettext("Public ballots cannot be multi-vote");
        $valid = false;
    }
    if ($valid && $poll_vote_type == POLL_VOTE_PUBLIC && $poll_type != POLL_HORIZONTAL_GRAPH) {
        $error_msg_array[] = gettext("Public ballots can only be created using horizontal graphs");
        $valid = false;
    }
    if (isset($message_text) && strlen(trim($message_text)) > 0) {
        if (attachments_embed_check($message_text)) {
            $error_msg_array[] = gettext("You are not allowed to embed attachments in your posts.");
            $valid = false;
        }
    }
    if (isset($sig_text) && attachments_embed_check($sig_text)) {
        $error_msg_array[] = gettext("You are not allowed to embed attachments in your signature.");
        $valid = false;
    }
} else {
    if (isset($_POST['emots_toggle_x']) || isset($_POST['sig_toggle_x']) || isset($_POST['poll_additional_message_toggle_x']) || isset($_POST['poll_advanced_toggle_x'])) {
        if (isset($_POST['emots_toggle_x'])) {
            $page_prefs = (double) $page_prefs ^ POST_EMOTICONS_DISPLAY;
        } else {
            if (isset($_POST['sig_toggle_x'])) {
                $page_prefs = (double) $page_prefs ^ POST_SIGNATURE_DISPLAY;
            } else {
                if (isset($_POST['poll_additional_message_toggle_x'])) {
                    $page_prefs = (double) $page_prefs ^ POLL_ADDITIONAL_MESSAGE_DISPLAY;
                } else {
                    if (isset($_POST['poll_advanced_toggle_x'])) {
예제 #2
0
    }
}
if (isset($_POST['post']) || isset($_POST['preview'])) {
    if (isset($_POST['t_content']) && strlen(trim($_POST['t_content'])) > 0) {
        $t_content = fix_html(emoticons_strip($_POST['t_content']));
        if (attachments_embed_check($t_content)) {
            $error_msg_array[] = gettext("You are not allowed to embed attachments in your posts.");
            $valid = false;
        }
    } else {
        $error_msg_array[] = gettext("You must enter some content for the post!");
        $valid = false;
    }
    if (isset($_POST['t_sig'])) {
        $t_sig = fix_html(emoticons_strip($_POST['t_sig']));
        if (attachments_embed_check($t_sig)) {
            $error_msg_array[] = gettext("You are not allowed to embed attachments in your signature.");
            $valid = false;
        }
    }
}
if (isset($_POST['more'])) {
    if (isset($_POST['t_content']) && strlen(trim($_POST['t_content'])) > 0) {
        $t_content = fix_html(emoticons_strip($_POST['t_content']));
    }
}
if (isset($_POST['emots_toggle']) || isset($_POST['sig_toggle'])) {
    if (isset($_POST['t_newthread'])) {
        if (isset($_POST['t_threadtitle']) && strlen(trim($_POST['t_threadtitle'])) > 0) {
            $t_threadtitle = trim($_POST['t_threadtitle']);
        }
예제 #3
0
}
if (isset($_POST['save']) || isset($_POST['preview'])) {
    if (isset($_POST['sig_content']) && strlen(trim($_POST['sig_content'])) > 0) {
        $sig_text = trim($_POST['sig_content']);
    } else {
        $sig_text = "";
    }
    if (isset($_POST['sig_global']) && $_POST['sig_global'] == 'Y') {
        $t_sig_global = 'Y';
    } else {
        $t_sig_global = 'N';
    }
    if (session::check_perm(USER_PERM_ADMIN_TOOLS, 0) && $admin_edit === true) {
        $t_sig_global = 'N';
    }
    if (attachments_embed_check($sig_text)) {
        $error_msg_array[] = gettext("You are not allowed to embed attachments in your signature.");
        $valid = false;
    }
}
$sig_text = fix_html(emoticons_strip($sig_text));
if (isset($_POST['save'])) {
    if ($valid) {
        // Update USER_SIG
        if (user_update_sig($sig_uid, $sig_text, $t_sig_global == 'Y')) {
            if ($admin_edit === true) {
                $redirect_uri = "admin_user.php?webtag={$webtag}&signature_updated=true&uid={$sig_uid}";
                header_redirect($redirect_uri);
            } else {
                if ($t_sig_global == 'Y' && forums_get_available_count() > 1) {
                    header_redirect("edit_signature.php?webtag={$webtag}&updated_global=true");
예제 #4
0
    }
}
if (isset($_POST['attachment']) && is_array($_POST['attachment'])) {
    $attachments = array_filter($_POST['attachment'], 'is_md5');
} else {
    $attachments = array();
}
if (isset($_POST['dedupe']) && is_numeric($_POST['dedupe'])) {
    $dedupe = $_POST['dedupe'];
} else {
    $dedupe = time();
}
if (isset($_POST['post']) || isset($_POST['preview'])) {
    if (isset($_POST['content']) && strlen(trim($_POST['content'])) > 0) {
        $content = nl2br(fix_html(emoticons_strip($_POST['content'])));
        if (attachments_embed_check($content)) {
            $error_msg_array[] = gettext("You are not allowed to embed attachments in your posts.");
            $valid = false;
        }
    } else {
        $error_msg_array[] = gettext("You must enter some content for the post!");
        $valid = false;
    }
}
if (isset($_POST['more'])) {
    if (isset($_POST['content']) && strlen(trim($_POST['content'])) > 0) {
        $content = nl2br(fix_html(emoticons_strip($_POST['content'])));
    }
}
if (isset($_POST['emots_toggle']) || isset($_POST['sig_toggle'])) {
    if (isset($_POST['newthread'])) {
예제 #5
0
                     $question['QUESTION'] = fix_html(emoticons_strip($question['QUESTION']));
                 } else {
                     $question['QUESTION'] = htmlentities_array($question['QUESTION']);
                 }
                 $poll_option_count += sizeof($question['OPTIONS_ARRAY']);
                 if (sizeof($question['OPTIONS_ARRAY']) < 2) {
                     $error_msg_array[] = gettext("You must provide at least 2 options for each question");
                     $valid = false;
                 } else {
                     foreach ($question['OPTIONS_ARRAY'] as $option_id => $option) {
                         if ($allow_html == true) {
                             $poll_questions_array[$question_id]['OPTIONS_ARRAY'][$option_id]['OPTION_NAME'] = fix_html($option['OPTION_NAME']);
                         } else {
                             $poll_questions_array[$question_id]['OPTIONS_ARRAY'][$option_id]['OPTION_NAME'] = htmlentities_array($option['OPTION_NAME']);
                         }
                         if (attachments_embed_check($option['OPTION_NAME']) && $allow_html == true) {
                             $error_msg_array[] = gettext("You are not allowed to embed attachments in your posts.");
                             $valid = false;
                         }
                     }
                 }
             }
         }
     }
 }
 if (sizeof($poll_questions_array) < 1) {
     $poll_questions_array = poll_get_default_questions_array();
     $error_msg_array[] = gettext("You must provide at least one question");
     $valid = false;
 }
 if ($valid && $poll_option_count > 20) {