]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/edit-pages.php
Wordpress 2.0.4
[autoinstalls/wordpress.git] / wp-admin / edit-pages.php
1 <?php
2 require_once('admin.php');
3 $title = __('Pages');
4 $parent_file = 'edit.php';
5 $list_js = true;
6 require_once('admin-header.php');
7 ?>
8
9 <div class="wrap">
10 <h2><?php _e('Page Management'); ?></h2>
11 <p><?php _e('Pages are like posts except they live outside of the normal blog chronology and can be hierarchical. You can use pages to organize and manage any amount of content.'); ?> <a href="page-new.php"><?php _e('Create a new page'); ?> &raquo;</a></p>
12
13 <form name="searchform" action="" method="get"> 
14   <fieldset> 
15   <legend><?php _e('Search Pages&hellip;') ?></legend>
16   <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo wp_specialchars($_GET['s'], 1); ?>" size="17" /> 
17   <input type="submit" name="submit" value="<?php _e('Search') ?>"  /> 
18   </fieldset>
19 </form>
20
21 <?php
22
23 $show_post_type = 'page';
24
25 if ( isset($_GET['s']) )
26         wp();
27 else
28         $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static'");
29
30 if ($posts) {
31 ?>
32 <table id="the-list-x" width="100%" cellpadding="3" cellspacing="3"> 
33   <tr> 
34     <th scope="col"><?php _e('ID') ?></th> 
35     <th scope="col"><?php _e('Title') ?></th> 
36     <th scope="col"><?php _e('Owner') ?></th>
37         <th scope="col"><?php _e('Updated') ?></th>
38         <th scope="col"></th> 
39     <th scope="col"></th> 
40     <th scope="col"></th> 
41   </tr> 
42 <?php
43 if ( isset($_GET['s']) ) {
44 foreach ( $posts as $post ) : 
45         $class = ('alternate' != $class) ? 'alternate' : ''; ?>
46   <tr id='page-<?php echo $post->ID; ?>' class='<?php echo $class; ?>'> 
47     <th scope="row"><?php echo $post->ID; ?></th> 
48     <td>
49       <?php echo $pad; ?><?php the_title() ?> 
50     </td> 
51     <td><?php the_author() ?></td>
52     <td><?php echo mysql2date('Y-m-d g:i a', $post->post_modified); ?></td> 
53         <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e('View'); ?></a></td>
54     <td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=edit&amp;post=$post->ID' class='edit'>" . __('Edit') . "</a>"; } ?></td> 
55     <td><?php if ( current_user_can('edit_pages') ) { echo "<a href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf(__("You are about to delete the &quot;%s&quot; page.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop."), js_escape(get_the_title('','',0))) . "' );\">" . __('Delete') . "</a>"; } ?></td> 
56   </tr>
57 <?php
58 endforeach;
59 } else {
60         page_rows();
61 }
62 ?>
63 </table> 
64
65 <div id="ajax-response"></div>
66
67 <?php
68 } else {
69 ?>
70 <p><?php _e('No pages yet.') ?></p>
71 <?php
72 } // end if ($posts)
73 ?> 
74
75 <h3><a href="page-new.php"><?php _e('Create New Page'); ?> &raquo;</a></h3>
76
77 </div>
78
79 <?php include('admin-footer.php'); ?>