<?php 
	
	if(file_exists('../../../../wp-load.php')) :
		include '../../../../wp-load.php';
	else:
		include '../../../../../wp-load.php';
	endif; 
	
	ob_flush(); 

	$offset 	= 		htmlspecialchars(trim($_POST['offset']));
	$cat 		= 		htmlspecialchars(trim($_POST['category']));
	$author 	= 		htmlspecialchars(trim($_POST['author']));
	$tag 		= 		htmlspecialchars(trim($_POST['tag']));
	$date 		= 		htmlspecialchars(trim($_POST['date']));
	$search 	= 		htmlspecialchars(trim($_POST['searchQ']));
   
    query_posts(array(
			
					'offset' => $offset,
					'cat' => $cat,
					'author' => $author,
					'tag' => $tag,
					'monthnum' => $date,
					's' => $search
				)
			);
			
?>
 
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
	
<div class="lioLatestPost">
                                        <div class="liopostThumb">
                                        
                                          <a href="<?php echo post_permalink($post->ID); ?>" rel="bookmark" title="<?php echo get_the_title(); ?>"> <?php the_post_thumbnail('main-block', array('title' => strip_tags(get_the_title()))); ?></a> 
                                        </div>
                                        <!--End Post Thumb-->
                                      
                                        <h4> <a href="<?php  echo post_permalink($post->ID); ?>">
                                        
                                          <?php echo get_the_title(); ?>
                                          </a> </h4>
                                        <div class="lioPosMeta">
                                        	   
                                               <div><?php echo get_post_status( $post->ID ) ?></div>
                                               <?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>
		
<?php endwhile; endif; ?>

<?php ob_end_flush(); ?>