if($comments=$wpdb->get_results("SELECT comment_author, comment_author_url, comment_ID, comment_post_ID FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 5")):
if($numcomments=$wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_approved = '0'")):
?>
<p><strong><ahref="moderation.php"><?phpechosprintf(__('Comments in moderation (%s)'),number_format($numcomments));?> »</a></strong></p>
<?phpendif;?>
</div>
<ul>
<?php
if($comments){
foreach($commentsas$comment){
echo'<li>'.sprintf(__('%1$s on %2$s'),get_comment_author_link(),'<a href="'.get_permalink($comment->comment_post_ID).'#comment-'.$comment->comment_ID.'">'.get_the_title($comment->comment_post_ID).'</a>');
if($recentposts=$wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'publish' AND post_date_gmt < '$today' ORDER BY post_date DESC LIMIT 5")):
if($scheduled=$wpdb->get_results("SELECT ID, post_title, post_date_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND post_date_gmt > '$today' ORDER BY post_date ASC")):
echo"<li>".sprintf(__('%1$s in %2$s'),"<a href='post.php?action=edit&post=$post->ID' title='".__('Edit this post')."'>$post->post_title</a>",human_time_diff(current_time('timestamp',1),strtotime($post->post_date_gmt.' GMT')))."</li>";
<p><?phpprintf(__('There are currently %1$s <a href="%2$s" title="Posts">posts</a> and %3$s <a href="%4$s" title="Comments">comments</a>, contained within %5$s <a href="%6$s" title="categories">categories</a>.'),$numposts,'edit.php',$numcomms,'edit-comments.php',$numcats,'categories.php');?></p>
<p><?php_e("Below is the latest news from the official WordPress development blog, click on a title to read the full entry. If you need help with WordPress please see our <a href='http://codex.wordpress.org/'>great documentation</a> or if that doesn't help visit the <a href='http://wordpress.org/support/'>support forums</a>.");?></p>