function sp_post_delete()
{
    sp_delete_post(sp_esc_int($_GET['killpost']), sp_esc_int($_GET['killposttopic']), sp_esc_int($_GET['killpostforum']), false, sp_esc_int($_GET['killpostposter']));
    if ($_GET['count'] == 1) {
        $forumslug = spdb_table(SFFORUMS, 'forum_id=' . sp_esc_int($_GET['killpostforum']), 'forum_slug');
        $topicslug = spdb_table(SFTOPICS, 'topic_id=' . sp_esc_int($_GET['killposttopic']), 'topic_slug');
        $page = sp_esc_int($_GET['page']);
        if ($page == 1) {
            $returnURL = sp_build_url($forumslug, '', 0);
        } else {
            $page = $page - 1;
            $returnURL = sp_build_url($forumslug, $topicslug, $page);
        }
        echo $returnURL;
    }
    die;
}
 if ($spamPosts) {
     foreach ($spamPosts as $post) {
         if ($post->post_id == $postid) {
             $found = true;
         }
     }
 }
 if (!$spamPosts || $found == false) {
     _e('Spam posts not found', 'spab');
     die;
 }
 # remove posts bu this user
 reset($spamPosts);
 $removed = count($spamPosts);
 foreach ($spamPosts as $post) {
     sp_delete_post($post->post_id, $post->topic_id, $post->forum_id, false);
     # we always need to remove from users new posts list
     sp_remove_users_newposts($post->topic_id, $spThisUser->ID);
 }
 # remove this user first SP and then WP
 sp_delete_member_data($userid);
 if (!is_multisite()) {
     $wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->usermeta} WHERE user_id = %d", $userid));
     $wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->users} WHERE ID = %d", $userid));
 } else {
     $level_key = $wpdb->get_blog_prefix() . 'capabilities';
     # wpmu site admins don't have user_levels
     $wpdb->query("DELETE FROM {$wpdb->usermeta} WHERE user_id = {$userid} AND meta_key = '{$level_key}'");
 }
 do_action('deleted_user', $userid);
 echo sprintf(__('%s Posts and User Removed', 'spab'), $removed);