prepare(" SELECT `post_id`, `post_title`, `post_text`, UNIX_TIMESTAMP(`post_published`) AS `post_published` FROM `fm_blog_posts` AS bp WHERE `post_published` IS NOT NULL AND `post_published` < CURRENT_TIMESTAMP AND `post_deleted` IS NULL ORDER BY `post_published` DESC "); $posts = $getPosts->execute() ? $getPosts->fetchAll(PDO::FETCH_OBJ) : false; $posts = $posts ? $posts : []; } if(isset($_GET['blog_dump'])) { header('Content-Type: application/json; charset=utf-8'); echo json_encode($posts ?? []); return; } echo html_doctype(); ?>
=html_charset();?>