Index: edit-pages.php
===================================================================
--- edit-pages.php	(revision 257)
+++ edit-pages.php	(working copy)
@@ -1,103 +1,228 @@
-<?php
-require_once('admin.php');
-$title = __('Pages');
-$parent_file = 'edit.php';
-wp_enqueue_script( 'listman' );
-require_once('admin-header.php');
-
-$post_stati  = array(	//	array( adj, noun )
-			'publish' => array(__('Published'), __('Published pages')),
-			'draft'   => array(__('Draft'), __('Draft pages')),
-			'private' => array(__('Private'), __('Private pages'))
-		);
-
-
-$post_status_label = __('Pages');
-$post_status_q = '';
-if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) ) {
-	$post_status_label = $post_stati[$_GET['post_status']][1];
-	$post_status_q = '&post_status=' . $_GET['post_status'];
-}
-
-?>
-
-<div class="wrap">
-
-<h2><?php
-// Use $_GET instead of is_ since they can override each other
-$h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching &#8220;%s&#8221;'), wp_specialchars( stripslashes( $_GET['s'] ) ) ) : '';
-$h2_author = '';
-if ( isset($_GET['author']) && $_GET['author'] ) {
-	$author_user = get_userdata( (int) $_GET['author'] );
-	$h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name ));
-}
-printf( _c( '%1$s%2$s%3$s|You can reorder these: 1: Pages, 2: by {s}, 3: matching {s}' ), $post_status_label, $h2_author, $h2_search );
-?></h2>
-
-<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>
-
-<form name="searchform" id="searchform" action="" method="get">
-	<fieldset><legend><?php _e('Search Terms&hellip;') ?></legend>
-		<input type="text" name="s" id="s" value="<?php echo attribute_escape( stripslashes( $_GET['s'] ) ); ?>" size="17" />
-	</fieldset>
-
-
-	<fieldset><legend><?php _e('Page Type&hellip;'); ?></legend>
-		<select name='post_status'>
-			<option<?php selected( @$_GET['post_status'], 0 ); ?> value='0'><?php _e('Any'); ?></option>
-<?php	foreach ( $post_stati as $status => $label ) : ?>
-			<option<?php selected( @$_GET['post_status'], $status ); ?> value='<?php echo $status; ?>'><?php echo $label[0]; ?></option>
-<?php	endforeach; ?>
-		</select>
-	</fieldset>
-
-<?php $editable_ids = get_editable_user_ids( $user_ID ); if ( $editable_ids && count( $editable_ids ) > 1 ) : ?>
-
-	<fieldset><legend><?php _e('Author&hellip;'); ?></legend>
-		<?php wp_dropdown_users( array('include' => $editable_ids, 'show_option_all' => __('Any'), 'name' => 'author', 'selected' => isset($_GET['author']) ? $_GET['author'] : 0) ); ?>
-	</fieldset>
-
-<?php endif; ?>
-
-	<input type="submit" id="post-query-submit" value="<?php _e('Filter &#187;'); ?>" class="button" />
-</form>
-
-<br style="clear:both;" />
-
-<?php
-wp("post_type=page&orderby=menu_order&what_to_show=posts$post_status_q&posts_per_page=-1&posts_per_archive_page=-1&order=asc");
-
-$all = !( $h2_search || $post_status_q );
-
-if ($posts) {
-?>
-<table class="widefat">
-  <thead>
-  <tr>
-    <th scope="col" style="text-align: center"><?php _e('ID') ?></th>
-    <th scope="col"><?php _e('Title') ?></th>
-    <th scope="col"><?php _e('Owner') ?></th>
-	<th scope="col"><?php _e('Updated') ?></th>
-	<th scope="col" colspan="3" style="text-align: center"><?php _e('Action'); ?></th>
-  </tr>
-  </thead>
-  <tbody id="the-list">
-<?php page_rows(0, 0, $posts, $all); ?>
-  </tbody>
-</table>
-
-<div id="ajax-response"></div>
-
-<?php
-} else {
-?>
-<p><?php _e('No pages found.') ?></p>
-<?php
-} // end if ($posts)
-?>
-
-<h3><a href="page-new.php"><?php _e('Create New Page &raquo;'); ?></a></h3>
-
-</div>
-
-<?php include('admin-footer.php'); ?>
+<?php
+require_once('admin.php');
+$title = __('Pages');
+$parent_file = 'edit.php';
+wp_enqueue_script( 'listman' );
+require_once('admin-header.php');
+
+$post_stati  = array(	//	array( adj, noun )
+			'publish' => array(__('Published'), __('Published pages')),
+			'draft'   => array(__('Draft'), __('Draft pages')),
+			'private' => array(__('Private'), __('Private pages'))
+		);
+
+
+$post_status_label = __('Pages');
+$post_status_q = '';
+if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) ) {
+	$post_status_label = $post_stati[$_GET['post_status']][1];
+	$post_status_q = '&post_status=' . $_GET['post_status'];
+}
+
+?>
+
+<div class="wrap">
+
+<h2><?php
+// Use $_GET instead of is_ since they can override each other
+$h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching &#8220;%s&#8221;'), wp_specialchars( stripslashes( $_GET['s'] ) ) ) : '';
+$h2_author = '';
+if ( isset($_GET['author']) && $_GET['author'] ) {
+	$author_user = get_userdata( (int) $_GET['author'] );
+	$h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name ));
+}
+printf( _c( '%1$s%2$s%3$s|You can reorder these: 1: Pages, 2: by {s}, 3: matching {s}' ), $post_status_label, $h2_author, $h2_search );
+?></h2>
+
+<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>
+
+<form name="searchform" id="searchform" action="" method="get">
+	<fieldset><legend><?php _e('Search Terms&hellip;') ?></legend>
+		<input type="text" name="s" id="s" value="<?php echo attribute_escape( stripslashes( $_GET['s'] ) ); ?>" size="17" />
+	</fieldset>
+
+
+	<fieldset><legend><?php _e('Page Type&hellip;'); ?></legend>
+		<select name='post_status'>
+			<option<?php selected( @$_GET['post_status'], 0 ); ?> value='0'><?php _e('Any'); ?></option>
+<?php	foreach ( $post_stati as $status => $label ) : ?>
+			<option<?php selected( @$_GET['post_status'], $status ); ?> value='<?php echo $status; ?>'><?php echo $label[0]; ?></option>
+<?php	endforeach; ?>
+		</select>
+	</fieldset>
+
+<?php $editable_ids = get_editable_user_ids( $user_ID ); if ( $editable_ids && count( $editable_ids ) > 1 ) : ?>
+
+	<fieldset><legend><?php _e('Author&hellip;'); ?></legend>
+		<?php wp_dropdown_users( array('include' => $editable_ids, 'show_option_all' => __('Any'), 'name' => 'author', 'selected' => isset($_GET['author']) ? $_GET['author'] : 0) ); ?>
+	</fieldset>
+
+<?php endif; ?>
+
+	<input type="submit" id="post-query-submit" value="<?php _e('Filter &#187;'); ?>" class="button" />
+</form>
+
+<br style="clear:both;" />
+
+<?php
+wp("post_type=page&orderby=menu_order&what_to_show=posts$post_status_q&posts_per_page=-1&posts_per_archive_page=-1&order=asc");
+
+$all = !( $h2_search || $post_status_q );
+
+if ($posts) {
+?>
+<table class="widefat">
+  <thead>
+  <tr>
+    <th scope="col" style="text-align: center"><?php _e('ID') ?></th>
+    <th scope="col"><?php _e('Title') ?></th>
+    <th scope="col"><?php _e('Owner') ?></th>
+	<th scope="col"><?php _e('Updated') ?></th>
+	<th scope="col" colspan="3" style="text-align: center"><?php _e('Action'); ?></th>
+  </tr>
+  </thead>
+  <tbody id="the-list">
+<?php
+
+	    if ( $all == false )
+	    {
+	        page_rows(0, 0, $posts, $all);
+	    }
+	    else
+	    {
+	      
+$numPagesPerPage = 50; //number of pages to be displayed per page
+$pages =  $wpdb->get_results("SELECT `post_title`, `ID`, `guid`, `post_author`, `post_modified`  FROM `wp_posts` WHERE `post_type` = 'page' ORDER BY `wp_posts`.`ID` DESC", ARRAY_A); 
+$size = sizeof($pages);//total number of pages in the database
+
+$numAdminPagesfull =$size/$numPagesPerPage;//get the total number of full admin pages
+$numAdminPages =  (int)$numAdminPagesfull;//get rid of the fraction if there is one
+$fraction = false;//initally set this to false
+
+//if they are not equal, then the number of pages is not divisble by the $numPagesPerPage
+if($numAdminPages != $numAdminPagesfull){
+$numPagesLastPage = ($numAdminPagesfull-$numAdminPages)*$numPagesPerPage;//this gets the number of posts on the last page
+$numAdminPages++;//increase it so we know how many pages there are
+$fraction = true;//so we know that there arent the full number of pages on the last page
+}
+
+if (isset($_POST['pageNum'])){
+	$adminPage = $_POST['pageNum'];
+	unset($_POST['pageNum']);
+	if (isset($_POST['back'])){
+	unset($_POST['back']);	
+	$adminPage--;
+	}else if (isset($_POST['next'])){
+	unset($_POST['next']);	
+	$adminPage++;
+	}
+	}else{
+	$adminPage = 1;
+}	
+//if thre is a fraction, and on the last page, then do it differently
+if ($fraction && $adminPage == $numAdminPages){
+$lowernum = ($adminPage-1)*$numPagesPerPage;
+$uppernum = $lowernum + $numPagesLastPage;
+}else{
+//else, get the adminpage and multiply it by the number of pages per page
+$lowernum = ($adminPage-1)*$numPagesPerPage;
+$uppernum = $adminPage*$numPagesPerPage;	
+}
+
+$displayPages ="";//empty this
+for ($i = $lowernum; $i < $uppernum; $i++){
+$displayPages[] = $pages[$i];//add the pages to the displayPage
+}
+//give it to the function to display the pages info on the page
+page_rows_modified($displayPages);
+}
+?>
+  </tbody>
+</table>
+
+<div id="ajax-response"></div>
+
+<?php
+} else {
+?>
+<p><?php _e('No pages found.') ?></p>
+<?php
+} // end if ($posts)
+if ( $all != false ){
+//if not searched, then display the below
+echo '<p>Displaying pages '.$lowernum.' to '.$uppernum.' of total '. $size.' pages.</p>';	
+	?>
+
+<div>
+<table>
+<tr>
+<?php
+//the above div may not be styled properly 
+$z = 0;	
+//add a button for each page
+while ($z <  $numAdminPages){
+?>
+
+<form action="" method="post">
+<input type="hidden" name="pageNum" id="pageNum" value="<?php echo $z+1; ?>">
+<input type="submit" name="submit" value="<?php echo $z+1; ?>" 
+<?php if($adminPage != $z+1){
+//if  on the page that is being viewed, then style the button	
+}else {echo 'style="background:#fff;"';
+}?>
+/>
+</form>
+
+<?php
+$z++;
+}
+?>
+</tr>
+</table>
+
+</div>
+
+<div class="navigation"> 
+<div class="alignleft"><?php
+if( $adminPage > 1){
+	//if not on the first page, add a button to scroll back a page
+	?>
+	<form action="" method="post">
+	<input type="hidden" name="back" id="back" value="true">
+	<input type="hidden" name="pageNum" id=pageNum" value="<?php echo $adminPage ?>">
+	<p class="submit">
+	<input type="submit" name="submit" value="&laquo Previous Page" />
+	</p>
+	</form>
+<?php
+}
+?>
+</div>
+
+<div class="alignright"><?php
+//if not on the last page, add a button to go to the next page
+if($adminPage < $numAdminPages){
+	?>
+<form action="" method="post">
+	<input type="hidden" name="next" id="next" value="true">
+	<input type="hidden" name="pageNum" id="pageNum" value="<?php echo $adminPage ?>">
+	<p class="submit">
+	<input type="submit" name="submit" value="Next Page &raquo" />
+	</p>
+	</form>
+<?php
+}
+?>
+</div>
+
+</div>
+<br><br><br>
+<?php
+//may need to do some styling, like the above <br> probably shouldnt be used
+}?>
+
+<h3><a href="page-new.php"><?php _e('Create New Page &raquo;'); ?></a></h3>
+
+</div>
+
+<?php include('admin-footer.php'); ?>
Index: includes/template.php
===================================================================
--- includes/template.php	(revision 257)
+++ includes/template.php	(working copy)
@@ -199,6 +199,34 @@
 		if ( $hierarchy ) page_rows( $id, $level + 1, $pages );
 	}
 }
+//added by Jason Manion
+function page_rows_modified($pages = 0) {
+	global $wpdb, $class;
+
+	if ( empty($pages) || $pages == 0 )
+		return false;
+		
+	foreach ( $pages as $post) {
+		
+		$title = wp_specialchars($post['post_title']);
+		$id =  $post['ID'];
+		$class = ('alternate' == $class ) ? '' : 'alternate';
+		$link = $post['guid'];
+		$authorid = $post['post_author'];
+?>
+  	<tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'>
+    <td scope="row" style="text-align: center"><?php echo $id; ?></td>
+    <td><?php echo $title; ?></td>
+    <td><?php  $first = get_usermeta($authorid,'first_name'); $last = get_usermeta($authorid,'last_name'); echo $first." ".$last; ?></td>
+    <td><?php if ( '0000-00-00 00:00:00' ==$post['post_modified'] ) _e('Unpublished'); else echo mysql2date( __('Y-m-d g:i a'), $post['post_modified'] ); ?></td>
+	<td><a href="<?php echo $link ?>" rel="permalink" class="view"><?php _e( 'View' ); ?></a></td>
+    <td><?php if ( current_user_can( 'edit_page', $id ) ) { echo "<a href='page.php?action=edit&amp;post=$id' class='edit'>" . __( 'Edit' ) . "</a>"; } ?></td>
+    <td><?php if ( current_user_can( 'delete_page', $id ) ) { echo "<a href='" . wp_nonce_url( "page.php?action=delete&amp;post=$id", 'delete-page_' . $id ) .  "' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . js_escape(sprintf( __("You are about to delete the '%s' page.\n'OK' to delete, 'Cancel' to stop." ), get_the_title() ) ) . "' );\">" . __( 'Delete' ) . "</a>"; } ?></td>
+  </tr>
+
+<?php
+}
+}
 
 function user_row( $user_object, $style = '' ) {
 	if ( !(is_object( $user_object) && is_a( $user_object, 'WP_User' ) ) )
