This commit is contained in:
flash 2015-04-01 19:34:36 +02:00
parent 58011071c6
commit df27981146
2 changed files with 177 additions and 165 deletions

View file

@ -161,4 +161,14 @@ class Main {
} }
// Loading info pages
public static function loadInfoPage($id) {
// Get contents from the database
$infopage = Database::fetch('infopages', false, ['shorthand' => [$id, '=']]);
print_r($infopage);
}
} }

View file

@ -9,11 +9,13 @@ namespace Sakura;
// Include components // Include components
require_once '/var/www/flashii.net/_sakura/sakura.php'; require_once '/var/www/flashii.net/_sakura/sakura.php';
// Do parsing etc. // Set default variables
$renderData['page'] = [ $renderData['page'] = [
'title' => 'Info pages', 'title' => 'Info pages',
'content' => 'Unable to load the requested info page.' 'content' => 'Unable to load the requested info page.'
]; ];
$ipData = Main::loadInfoPage(isset($_GET['r']) ? strtolower($_GET['r']) : '');
// Print page contents // Print page contents
print Main::$_TPL->render('main/infopage.tpl', $renderData); print Main::$_TPL->render('main/infopage.tpl', $renderData);