|

get_var("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = $comment"); $authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $post_id")); if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) { $wpdb->query("DELETE FROM $wpdb->comments WHERE comment_ID = $comment"); ++$i; } } echo "

" . sprintf(__('%s comments deleted.'), $i) . "

"; } if (isset($_GET['s'])) { $s = $wpdb->escape($_GET['s']); $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_author LIKE '%$s%' OR comment_author_email LIKE '%$s%' OR comment_author_url LIKE ('%$s%') OR comment_author_IP LIKE ('%$s%') OR comment_content LIKE ('%$s%') ORDER BY comment_date DESC"); } else { $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments ORDER BY comment_date DESC LIMIT 20"); } if ('view' == $mode) { if ($comments) { echo '
    '; foreach ($comments as $comment) { $authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID")); $comment_status = wp_get_comment_status($comment->comment_ID); if ('unapproved' == $comment_status) { echo '
  1. '; } else { echo '
  2. '; } ?>

    comment_author_email) { ?>| comment_author_email) { ?> | |

    | $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "comment_ID."\">" . __('Edit Comment') . ""; echo " | comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), $comment->comment_author) . "')\">" . __('Delete Comment') . " — "; } // end if any comments to show // Get post title $post_title = $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE ID = $comment->comment_post_ID"); $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title; ?> |

  3. '; } else { ?>

    '; foreach ($comments as $comment) { $authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID")); $bgcolor = ('#eee' == $bgcolor) ? 'none' : '#eee'; ?>
    * ' . __('Name') . ' ' . __('E-mail') . ' ' . __('IP') . ' ' . __('Comment Excerpt') . ' ' . __('Actions') . '
    $authordata->user_level) or ($user_login == $authordata->user_login)) { ?> $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "" . __('Edit') . ""; } ?> $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), $comment->comment_author) . "')\" class='delete'>" . __('Delete') . ""; } ?>

    ')" />