Index: trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php	(revision 544)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php	(revision 545)
@@ -479,12 +479,15 @@
 			$post_id = $GLOBALS['post']->ID;
 	}
+	if ( empty($blogid) ) {
+		$blogid = $blog_id;
+	}
 
 	$post_id = intval($post_id);
 	if($post_id==0) return null;
 	if(!isset($post_cache_views[$post_id])){
-		if (is_null($blog_id)){
+		if (is_null($blogid)){
 			$blog_where = '';
 		} else {
-			$blog_where = ' AND blog_id = '. $blog_id;
+			$blog_where = ' AND blog_id = '. $blogid;
 		}
 		$sql = "SELECT post_views FROM " . get_wp_prefix() . "views" . " WHERE post_id=$post_id " .  $blog_where;
@@ -937,5 +940,8 @@
 						$data->post_modified_date_time = $data->post_modified_date . ' ' . $data->post_modified_time;
 						
-						$data->post_unix_time = xpress_get_post_unix_time($data->post_id, $data->brog_id);
+						ob_start();
+							the_time('U');
+							$data->post_unix_time = ob_get_contents();
+						ob_end_clean();
 						
 						ob_start();
@@ -955,4 +961,7 @@
 							$data->comments_link = ob_get_contents();
 						ob_end_clean();
+						
+						$data->post_views = xpress_post_views_count('post_id=' . $data->post_id . '&blogid=' . $data->brog_id . '&format=' . __('Views :%d', 'xpress'). '&echo=0');
+
 						$data_array[] = $data;
 	        		}  // end whilwe
@@ -978,21 +987,4 @@
 }
 
-function xpress_get_post_unix_time($post_id=0,$b_id=1)
-{
-	global $wpdb;
-	$post_id= (int)$post_id;
-	$b_id = (int)$b_id;
-	
-	$db_prefix = get_wp_prefix();
-	
-	if (empty($b_id)) $b_id =1;
-	$blog_prefix = '';
-	if ($b_id >1) $blog_prefix = $b_id . '_';
-	$post_tb = $db_prefix . $blog_prefix .'posts';
-
-	$sql = "SELECT UNIX_TIMESTAMP(post_date) AS post_timestamp FROM $post_tb WHERE ID = $post_id";
-	$post_timestamp = $wpdb->get_var($sql);
-	return $post_timestamp;
-}
 function xpress_get_blog_option($option_name,$b_id = 1)
 {
