check_login_member('read_blogs'); $tpl = new phemplate(_BASEPATH_ . '/skins_site/' . get_my_skin() . '/', 'remove_nonjs'); $post_id = sanitize_and_format_gpc($_GET, 'pid', TYPE_INT, 0, 0); $output = array(); $loop_comments = array(); if (!empty($post_id)) { // no need to check the status of the post ( AND `status`=".STAT_APPROVED) $query = "SELECT `fk_user_id`,`allow_comments` FROM `{$dbtable_prefix}blog_posts` WHERE `post_id`={$post_id}"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } if (mysql_num_rows($res)) { $output = mysql_fetch_assoc($res); require _BASEPATH_ . '/includes/classes/blog_posts_cache.class.php'; $blog_posts_cache = new blog_posts_cache(); if ($temp = $blog_posts_cache->get_post($post_id, false)) { $output = array_merge($output, $temp); if ($output['date_posted'] > $page_last_modified_time) { $page_last_modified_time = $output['date_posted']; } $output['date_posted'] = strftime($_SESSION[_LICENSE_KEY_]['user']['prefs']['datetime_format'], $output['date_posted'] + $_SESSION[_LICENSE_KEY_]['user']['prefs']['time_offset']); if (!empty($_SESSION[_LICENSE_KEY_]['user']['user_id']) && $output['fk_user_id'] == $_SESSION[_LICENSE_KEY_]['user']['user_id']) { $output['post_owner'] = true; } if (isset($_list_of_online_members[$output['fk_user_id']])) { $output['is_online'] = 'member_online'; $output['user_online_status'] = $GLOBALS['_lang'][102]; } else { $output['user_online_status'] = $GLOBALS['_lang'][103]; } // comments