Fix #153 You can now load sub files (custom pages created in layout folder) instead of the default Znote AAC files. (override system).

This commit is contained in:
Stefan Brannfjell
2014-09-03 00:59:12 +02:00
parent 89a775c23f
commit e0ad3aae09
4 changed files with 106 additions and 22 deletions

14
sub.php
View File

@@ -1,6 +1,10 @@
<?php require_once 'engine/init.php'; include 'layout/overall/header.php';
if ($config['allowSubPages']) include 'layout/sub.php';
<?php require_once 'engine/init.php'; require_once 'layout/overall/header.php';
if ($config['allowSubPages']) {
$page = (isset($_GET['page']) && !empty($_GET['page'])) ? getValue($_GET['page']) : '';
if (isset($subpages[$page]['file'])) require_once 'layout/sub/'.$subpages[$page]['file'];
else {
if (isset($subpages)) echo '<h2>Sub page not recognized.</h2><p>The sub page you requested is not recognized.</p>';
}
}
else echo '<h2>System disabled.</h2><p>The sub page system is disabled.</p>';
include 'layout/overall/footer.php'; ?>
require_once 'layout/overall/footer.php'; ?>