This repository has been archived on 2021-12-22. You can view files and clone it, but cannot push or open issues or pull requests.
blog-legacy/views/article.php

19 lines
501 B
PHP

<?php
if(isset($_GET["ID"])){
if(!empty($_GET["ID"])){
include_once("lib/articles.php");
include_once("lib/users.php");
include_once("lib/md.php");
$article = getArticle($_GET["ID"]);
$authorName = getUserName($article["author"]);
$content = "<h1>".$article["title"]."</h1><article>".md2html($article["content"])."</article><span>written by ".$authorName." on ".$article["date"]."</span>";
}else{
$content = "Article ID is empty";
}
}else{
$content = "No article ID set";
}