include(SERVER_ROOT.'/classes/text.class.php'); // Text formatting class
$Text = new TEXT(true);
if (!empty($_GET['id']) && is_number($_GET['id'])) { //Visiting article via ID
$ArticleID = $_GET['id'];
} elseif ($_GET['name'] != '') { //Retrieve article ID via alias.
$ArticleID = $Alias->to_id($_GET['name']);
} else { //No ID, No Name
//error(404);
error('Unknown article ['.display_str($_GET['id']).']');
}
if (!$ArticleID) { //No article found
View::show_header('No article found');
?>
There is no article matching the name you requested.
- Search for an article similar to this.
- Link this to an existing article.
- Create an article in its place.
View::show_footer();
die();
}
$Article = $Alias->article($ArticleID);
list($Revision, $Title, $Body, $Read, $Edit, $Date, $AuthorID, $AuthorName, $Aliases, $UserIDs) = array_shift($Article);
if ($Read > $LoggedUser['EffectiveClass']) {
error('You must be a higher user class to view this wiki article');
}
$TextBody = $Text->full_format($Body, false);
$TOC = $Text->parse_toc(0);
View::show_header($Title,'wiki,bbcode');
?>
View::show_footer(); ?>