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