Changeset 1747 for trunk/wp-admin/edit-pages.php
- Timestamp:
- 10/05/2004 08:27:13 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-pages.php
r1551 r1747 9 9 ?> 10 10 11 <div class="wrap"> 12 <?php echo "<p> <a href='post.php?action=createpage' title='" . __('Create a new page') . "'>Create New Page</a></p>"; ?> 13 </div> 11 <div class="wrap"> 12 <h2><?php _e('Page Management'); ?></h2> 14 13 15 <div class="wrap">16 <form name="searchform" action="" method="get" style="float: left; width: 20em;">17 <fieldset>18 <legend><?php _e('Show Pages That Contain...') ?></legend>19 <input type="text" name="s" value="<?php if (isset($s)) echo $s; ?>" size="17" />20 <input type="submit" name="submit" value="<?php _e('Search') ?>" />21 </fieldset>22 </form>23 24 <br style="clear:both;" />25 26 <table width="100%" cellpadding="3" cellspacing="3">27 <tr>28 <th scope="col"><?php _e('ID') ?></th>29 <th scope="col"><?php _e('When') ?></th>30 <th scope="col"><?php _e('Title') ?></th>31 <th scope="col"><?php _e('Author') ?></th>32 <th scope="col"></th>33 <th scope="col"></th>34 <th scope="col"></th>35 </tr>36 14 <?php 37 38 include(ABSPATH.'wp-blog-header.php');39 40 15 if (isset($user_ID) && ('' != intval($user_ID))) { 41 16 $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static' AND post_author = $user_ID"); … … 45 20 46 21 if ($posts) { 22 ?> 23 <table width="100%" cellpadding="3" cellspacing="3"> 24 <tr> 25 <th scope="col"><?php _e('ID') ?></th> 26 <th scope="col"><?php _e('Title') ?></th> 27 <th scope="col"><?php _e('Owner') ?></th> 28 <th scope="col"><?php _e('Updated') ?></th> 29 <th scope="col"></th> 30 <th scope="col"></th> 31 <th scope="col"></th> 32 </tr> 33 <?php 47 34 $bgcolor = ''; 48 foreach ($posts as $post) {start_wp();35 foreach ($posts as $post) : start_wp(); 49 36 $class = ('alternate' == $class) ? '' : 'alternate'; 50 37 ?> 51 38 <tr class='<?php echo $class; ?>'> 52 39 <th scope="row"><?php echo $id ?></th> 53 <td><?php the_time('Y-m-d \<\b\r \/\> g:i:s a'); ?></td>54 40 <td> 55 41 <?php the_title() ?> 56 42 </td> 57 <td><?php the_author() ?></td> 43 <td><?php the_author() ?></td> 44 <td><?php the_time('Y-m-d g:i a'); ?></td> 58 45 <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit">View</a></td> 59 46 <td><?php if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "<a href='post.php?action=edit&post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td> 60 47 <td><?php if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "<a href='post.php?action=delete&post=$id' class='delete' onclick=\"return confirm('" . sprintf(__("You are about to delete this post \'%s\'\\n \'OK\' to delete, \'Cancel\' to stop."), the_title('','',0)) . "')\">" . __('Delete') . "</a>"; } ?></td> 61 48 </tr> 49 <?php endforeach; ?> 50 </table> 62 51 <?php 63 }64 52 } else { 65 53 ?> 66 <tr style='background-color: <?php echo $bgcolor; ?>'> 67 <td colspan="8"><?php _e('No pages found.') ?></td> 68 </tr> 54 <p><?php _e('No pages yet.') ?></p> 69 55 <?php 70 56 } // end if ($posts) 71 57 ?> 72 </table> 58 59 </div> 60 73 61 <?php 74 if ( 1 == count($posts) ) { 62 if ($user_level > 0) { 63 $action = 'post'; 64 get_currentuserinfo(); 65 //set defaults 66 $post_status = 'static'; 67 $comment_status = get_settings('default_comment_status'); 68 $ping_status = get_settings('default_ping_status'); 69 $post_pingback = get_settings('default_pingback_flag'); 75 70 76 $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id ORDER BY comment_date"); 77 if ($comments) { 78 ?> 79 <h3><?php _e('Comments') ?></h3> 80 <ol id="comments"> 81 <?php 82 foreach ($comments as $comment) { 83 $comment_status = wp_get_comment_status($comment->comment_ID); 84 ?> 71 include('edit-page-form.php'); 72 } 73 ?> 85 74 86 <li <?php if ("unapproved" == $comment_status) echo "class='unapproved'"; ?> > 87 <?php comment_date('Y-n-j') ?> 88 @ 89 <?php comment_time('g:m:s a') ?> 90 <?php 91 if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) { 92 echo "[ <a href=\"post.php?action=editcomment&comment=".$comment->comment_ID."\">" . __('Edit') . "</a>"; 93 echo " - <a href=\"post.php?action=deletecomment&p=".$post->ID."&comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n \'OK\' to delete, \'Cancel\' to stop."), $comment->comment_author) . "')\">" . __('Delete') . "</a> "; 94 if ( ('none' != $comment_status) && ($user_level >= 3) ) { 95 if ('approved' == wp_get_comment_status($comment->comment_ID)) { 96 echo " - <a href=\"post.php?action=unapprovecomment&p=".$post->ID."&comment=".$comment->comment_ID."\">" . __('Unapprove') . "</a> "; 97 } else { 98 echo " - <a href=\"post.php?action=approvecomment&p=".$post->ID."&comment=".$comment->comment_ID."\">" . __('Approve') . "</a> "; 99 } 100 } 101 echo "]"; 102 } // end if any comments to show 103 ?> 104 <br /> 105 <strong> 106 <?php comment_author() ?> 107 ( 108 <?php comment_author_email_link() ?> 109 / 110 <?php comment_author_url_link() ?> 111 )</strong> (IP: 112 <?php comment_author_IP() ?> 113 ) 114 <?php comment_text() ?> 115 116 </li> 117 <!-- /comment --> 118 <?php //end of the loop, don't delete 119 } // end foreach 120 echo '</ol>'; 121 }//end if comments 122 ?> 123 <?php } ?> 124 </div> 125 <?php 126 include('admin-footer.php'); 127 ?> 75 <?php include('admin-footer.php'); ?>
Note: See TracChangeset
for help on using the changeset viewer.