$notify_n = 1; $mode_n = $mode; $post_data_n = $post_data; $forum_id_n = $forum_id; $topic_id_n = $topic_id; $post_id_n = $post_id; $notify_user_n = $notify_user; } break; case ‘newtopic’: case ‘reply’: $username = (!empty($HTTP_POST_VARS[‘username’])) ? $HTTP_POST_VARS[‘username’] : ‘’; $subject = (!empty($HTTP_POST_VARS[‘subject’])) ? trim($HTTP_POST_VARS[‘subject’]) : ‘’; $subject_e = (!empty($HTTP_POST_VARS[‘subject_e’])) ? trim($HTTP_POST_VARS[‘subject_e’]) : ‘’; $message = (!empty($HTTP_POST_VARS[‘message’])) ? $HTTP_POST_VARS[‘message’] : ‘’; $poll_title = (isset($HTTP_POST_VARS[‘poll_title’]) && $is_auth[‘auth_pollcreate’] ) ? $HTTP_POST_VARS[‘poll_title’] : ‘’; $poll_options = (isset($HTTP_POST_VARS[‘poll_option_text’]) && $is_auth[‘auth_pollcreate’] ) ? $HTTP_POST_VARS[‘poll_option_text’] : ‘’; $poll_length = (isset($HTTP_POST_VARS[‘poll_length’]) && $is_auth[‘auth_pollcreate’] ) ? intval($HTTP_POST_VARS[‘poll_length’]) : ‘0’; $poll_length_h = (isset($HTTP_POST_VARS[‘poll_length_h’]) && $is_auth[‘auth_pollcreate’] ) ? intval($HTTP_POST_VARS[‘poll_length_h’]) : ‘0’; $poll_length = $poll_length * 24; $poll_length = $poll_length_h + $poll_length; $poll_length = ($poll_length) ? max(0, ($poll_length / 24)) : 0; $max_vote = (isset($HTTP_POST_VARS[‘max_vote’]) && $is_auth[‘auth_pollcreate’] ) ? ( ( $HTTP_POST_VARS[‘max_vote’] == 0 ) ? 1 : $HTTP_POST_VARS[‘max_vote’] ) : ‘’; $hide_vote = (isset($HTTP_POST_VARS[‘hide_vote’]) && $is_auth[‘auth_pollcreate’] && ($poll_length > 0) ) ? 1 : ‘’; $tothide_vote = (isset($HTTP_POST_VARS[‘tothide_vote’]) && isset($HTTP_POST_VARS[‘hide_vote’]) && $is_auth[‘auth_pollcreate’] && ($poll_length>0) ) ? 1 : ‘’; $bbcode_uid = ‘’; $user_agent = (isset($HTTP_SERVER_VARS[‘HTTP_USER_AGENT’])) ? htmlspecialchars(trim(stripslashes($HTTP_SERVER_VARS[‘HTTP_USER_AGENT’]))) : htmlspecialchars(trim(stripslashes(getenv(‘HTTP_USER_AGENT’)))); if ( strlen($message) > 65500 ) { message_die(GENERAL_MESSAGE, ‘Your message is too long. It can not be more than 65500 chars.’); } prepare_post($mode, $post_data, $bbcode_on, $html_on, $smilies_on, $error_msg, $username, $bbcode_uid, $subject, $subject_e, $message, $poll_title, $poll_options, $poll_length, $max_vote, $hide_vote, $tothide_vote, $forum_id); if ( $error_msg == ‘’ ) { $topic_type = ( $topic_type != $post_data[‘topic_type’] && !$is_auth[‘auth_sticky’] && !$is_auth[‘auth_announce’] && !$is_auth[‘auth_globalannounce’] ) ? $post_data[‘topic_type’] : $topic_type; if ( !$userdata[‘session_logged_in’] && $board_config[‘not_anonymous_posting’] && empty($HTTP_POST_VARS[‘username’]) ) { message_die(GENERAL_MESSAGE, $lang[‘No_to_user’]); } $post_approve = ($post_info[‘forum_moderate’] && !$is_auth[‘auth_mod’]) ? 0 : 1; submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("’", “’’”, $username), str_replace("’", “’’”, $subject), str_replace("’", “’’”, $subject_e), str_replace("’", “’’”, $message), str_replace("’", “’’”, $poll_title), $poll_options, $poll_length, $max_vote, $hide_vote, $tothide_vote, str_replace("’", “’’”, $user_agent), $msg_icon, $msg_expire, str_replace("’", “’’”, $topic_color), $post_approve, $is_mod, $is_jr_admin); if ( $board_config[‘read_tracking’] ) { $current_time = time(); smart_submit($forum_id, $topic_id, $current_time, $post_id); } $notify_n = 1; $mode_n = $mode; $post_data_n = $post_data; $forum_id_n = $forum_id; $topic_id_n = $topic_id; $post_id_n = $post_id; $notify_user_n = $notify_user; if ( $error_msg == ‘’ && $lock && $mode == ‘newtopic’ && $is_auth[‘auth_mod’] ) { $sql = “UPDATE " . TOPICS_TABLE . " SET topic_status = " . TOPIC_LOCKED . " WHERE topic_id = $topic_id AND topic_moved_id = 0”; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, ‘Could not update topics table’, ‘’, __LINE__, __FILE__, $sql); } } } break; case ‘delete’: if ( !$board_config[‘report_disable’] ) { $post_data[‘report’] = !empty($post_info[‘reporter_id’]); } case ‘poll_delete’: if ( $HTTP_POST_VARS[‘sid’] == ‘’ || $HTTP_POST_VARS[‘sid’] != $userdata[‘session_id’] ) { message_die(GENERAL_ERROR, ‘Invalid_session’); } if ( $board_config[‘del_notify_enable’] && (isset($HTTP_POST_VARS[‘reason’]) || isset($HTTP_POST_VARS[‘reasons’])) && (!($HTTP_POST_VARS[‘no_notify’] && $board_config[‘del_notify_choice’])) ) { $reason = (!empty($HTTP_POST_VARS[‘reason’])) ? $HTTP_POST_VARS[‘reason’] : $HTTP_POST_VARS[‘reasons’]; notify_delete($post_id, $topic_id, $userdata[‘user_id’], intval($HTTP_POST_VARS[‘notify_user’]), trim(stripslashes($reason))); } include($phpbb_root_path . ‘includes/functions_remove.’.$phpEx); //delete_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id); if ( $mode != ‘poll_delete’ )