<?php
define('WP_USE_THEMES', false);
require_once('../../../wp-load.php');

// Our variables
$numPosts = 6;
$page = (isset($_GET['pageNumber'])) ? $_GET['pageNumber'] : 0;

echo $numPosts;
echo $page;


$this_user = wp_get_current_user();
$postid = $post->ID ;
$edit_page = get_editposts_page_link($post->ID);
 ?>
              <?php $query = new WP_Query(array('orderby' => 'DESC','posts_per_page' => $numPosts,"author"=>$this_user->ID,'paged' => $page,'post_type' => 'post', 'post_status' => array('publish', 'pending', 'draft', 'private', 'trash') ) ); ?>

			<?php if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
              <div class="lioLatestPost">
              	<div class="row">
                						<div class="span1">
                                            <div class="postListColumns">
                                                <div class="liopostThumb">
                                                  <a href="<?php echo post_permalink($post->ID); ?>" rel="bookmark" title="<?php echo get_the_title(); ?>"> <?php the_post_thumbnail('thumb-small', array('title' => strip_tags(get_the_title()))); ?> </a> 
                                                </div>
                                                <!--End Post Thumb-->
                                            </div>
                                        </div>
                                        <div class="span5">
                                        	<div class="postListColumns" style="text-align:left; padding-left:10px;">
                                                <h4>
                                                <div class="notes-marker">
                                                	<i class="icon-comment"></i>
                                                	<span class="notes-marker-count"><?php comments_number(__('0', 'lioit'), __('1', 'lioit'), __('%', 'lioit'));?></span>
                                                </div>
                                                <a href="<?php  echo post_permalink($post->ID); ?>">
                                                
                                                  <?php echo get_the_title(); ?>
                                                  </a> </h4>
                                                <div class="lioPosMeta">
                                                       <?php $post_status_class =  get_post_status( $post->ID ); if($post_status_class == "trash") {?>
                                                         <div><i class="icon-trash"></i> <?php echo $post_status_class; ?></div>
                                                         <?php } elseif($post_status_class =="private") { ?>
                                                         <div><i class="icon-lock"></i> <?php echo $post_status_class; ?></div>
                                                         <?php } elseif($post_status_class =="pending") { ?>
                                                         <div><i class="icon-clock"></i> <?php echo $post_status_class; ?></div>
                                                         <?php } elseif($post_status_class =="publish") { ?>
                                                         <div><i class="icon-file-alt"></i> <?php echo $post_status_class; ?></div>
                                                         <?php } ?>
                                                       
                                                       <?php $edit_post = add_query_arg('post', $post->ID, $edit_page); ?>
                                                      
                                                        <div class="edit_post"><a href="<?php echo $edit_post; ?>"><i class="icon-pencil"></i><?php _e("Edit","lioit"); ?></a></div>
                                                    
                                                        <?php if( !(get_post_status() == 'trash') ) : ?>
                                                        <div class="delete_post"><a onclick="return confirm('Are you sure you wish to delete post: <?php echo get_the_title() ?>?')" href="<?php echo get_delete_post_link( $post->ID ); ?>"><i class="icon-trash"></i><?php _e("Delete","lioit"); ?></a></div><?php endif; ?>
                                                        
                                                    
                                                </div>
                                                </div>
                                        </div>
                                        <div class="span2">
                                        	<div class="postListColumns">
                                       
                                                <span><?php the_time('F d, Y'); ?></span>
                                            </div>
                                        </div>
                                        <div class="span2">
                                        	<div class="postListColumns">
                                                <span><?php the_author();?></span>
                                            </div>
                                        </div>
                                        <div class="span2">
                                        	<div class="postListColumns">
                                   
                                                <span><?php the_category(', ') ?></span>
                                            </div>
                                        </div>
                                        
                                        
                                        </div>
                                      </div>
       <?php endwhile; endif; ?>
        <?php wp_reset_query(); ?>
        
       
