19 lines
501 B
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";
|
|
}
|