Initial routing
parent
eeba3a5ef3
commit
22622d6b3c
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/*
|
||||
* Cryto is more free software. It is licensed under the WTFPL, which
|
||||
* allows you to do pretty much anything with it, without having to
|
||||
* ask permission. Commercial use is allowed, and no attribution is
|
||||
* required. We do politely request that you share your modifications
|
||||
* to benefit other developers, but you are under no enforced
|
||||
* obligation to do so :)
|
||||
*
|
||||
* Please read the accompanying LICENSE document for the full WTFPL
|
||||
* licensing text.
|
||||
*/
|
||||
|
||||
if(!isset($_APP)) { die("Unauthorized."); }
|
||||
|
||||
/* TODO: Have a dynamic homepage rather than a static one. */
|
||||
|
||||
$sPageContents = NewTemplater::Render("homepage", $locale->strings, array());
|
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/*
|
||||
* Cryto is more free software. It is licensed under the WTFPL, which
|
||||
* allows you to do pretty much anything with it, without having to
|
||||
* ask permission. Commercial use is allowed, and no attribution is
|
||||
* required. We do politely request that you share your modifications
|
||||
* to benefit other developers, but you are under no enforced
|
||||
* obligation to do so :)
|
||||
*
|
||||
* Please read the accompanying LICENSE document for the full WTFPL
|
||||
* licensing text.
|
||||
*/
|
||||
|
||||
if(!isset($_APP)) { die("Unauthorized."); }
|
||||
|
||||
try
|
||||
{
|
||||
$sPage = Page::CreateFromQuery("SELECT * FROM pages WHERE `Slug` = :Slug", array(":Slug" => $router->uParameters[1]), 60, true);
|
||||
}
|
||||
catch (NotFoundException $e)
|
||||
{
|
||||
throw new RouterException("Page does not exist.");
|
||||
}
|
||||
|
||||
$sPageContents = Michelf\MarkdownExtra::defaultTransform($sPage->uBody);
|
Loading…
Reference in New Issue