-?>
-<div class="wrap">
-<form id="posts-filter" action="" method="get">
-<h2><?php _e('Manage Comments'); ?></h2>
-
-<ul class="subsubsub">
-<?php
-$status_links = array();
-$num_comments = wp_count_comments();
-$stati = array('moderated' => sprintf(__ngettext('Awaiting Moderation (%s)', 'Awaiting Moderation (%s)', number_format_i18n($num_comments->moderated) ), "<span class='comment-count'>" . number_format_i18n($num_comments->moderated) . "</span>"), 'approved' => _c('Approved|plural'));
-$class = ( '' === $comment_status ) ? ' class="current"' : '';
-$status_links[] = "<li><a href=\"edit-comments.php\"$class>".__('Show All Comments')."</a>";
-foreach ( $stati as $status => $label ) {
- $class = '';
-
- if ( $status == $comment_status )
- $class = ' class="current"';
-
- $status_links[] = "<li><a href=\"edit-comments.php?comment_status=$status\"$class>" . $label . '</a>';
-}
-
-$status_links = apply_filters( 'comment_status_links', $status_links );
-
-echo implode(' | </li>', $status_links) . '</li>';
-unset($status_links);
-?>
-</ul>
-
-<p id="post-search">
- <label class="hidden" for="post-search-input"><?php _e( 'Search Comments' ); ?>:</label>
- <input type="text" id="post-search-input" name="s" value="<?php echo $search; ?>" />
- <input type="submit" value="<?php _e( 'Search Comments' ); ?>" class="button" />
-</p>
-
-<input type="hidden" name="mode" value="<?php echo $mode; ?>" />
-<input type="hidden" name="comment_status" value="<?php echo $comment_status; ?>" />
-</form>
-
-<ul class="view-switch">
- <li <?php if ( 'detail' == $mode ) echo "class='current'" ?>><a href="<?php echo clean_url(add_query_arg('mode', 'detail', $_SERVER['REQUEST_URI'])) ?>"><?php _e('Detail View') ?></a></li>
- <li <?php if ( 'list' == $mode ) echo "class='current'" ?>><a href="<?php echo clean_url(add_query_arg('mode', 'list', $_SERVER['REQUEST_URI'])) ?>"><?php _e('List View') ?></a></li>
-</ul>
-
-<?php
-
-$comments_per_page = apply_filters('comments_per_page', 20, $comment_status);
-
-if ( isset( $_GET['apage'] ) )
- $page = abs( (int) $_GET['apage'] );
-else
- $page = 1;
-
-$start = $offset = ( $page - 1 ) * $comments_per_page;
-
-list($_comments, $total) = _wp_get_comment_list( $comment_status, $search_dirty, $start, $comments_per_page + 5 ); // Grab a few extra
-
-$comments = array_slice($_comments, 0, $comments_per_page);
-$extra_comments = array_slice($_comments, $comments_per_page);
-
-$page_links = paginate_links( array(
- 'base' => add_query_arg( 'apage', '%#%' ),
- 'format' => '',
- 'total' => ceil($total / $comments_per_page),
- 'current' => $page
-));
-