This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/main/infopage.php
2015-04-02 15:31:52 +02:00

30 lines
745 B
PHP

<?php
/*
* Sakura Info Page Handler
*/
// Declare Namespace
namespace Sakura;
// Include components
require_once '/var/www/flashii.net/_sakura/sakura.php';
// Set default variables
$renderData['page'] = [
'title' => 'Info pages',
'content' => Main::mdParse("# Unable to load the requested info page.\r\n\r\nCheck the URL and try again.")
];
// Get info page data from the database
if($ipData = Main::loadInfoPage(isset($_GET['r']) ? strtolower($_GET['r']) : '')) {
// Assign new proper variable
$renderData['page'] = [
'title' => $ipData['pagetitle'],
'content' => Main::mdParse($ipData['content'])
];
}
// Print page contents
print Main::$_TPL->render('main/infopage.tpl', $renderData);