fetch_assoc(); $author = exec_stmt('SELECT user_id, username, profile_picture FROM user WHERE user_id = ?', 'i', $article['author_id'])->fetch_assoc(); $markdown = read_file_one_string($_ENV['ARTICLES_FQ_PATH'] . $article_id . '/article.md'); $parsedown = new Parsedown(); $parsedown->setSafeMode(true); $article_content = $parsedown->text($markdown); $html = '

' . $article['title'] . '

' . (isset($_SESSION['user_id']) && $_SESSION['user_id'] == $article['author_id'] ? '' : '') . '
Written by ' . $author['username'] . '

Published on ' . $article['published_at'] . '
Lasted edited on ' . $article['updated_at'] . '

' . $article_content . '
'; return $html; }