MS-Tropical/public/index.php

29 lines
529 B
PHP
Raw Normal View History

<?php
2024-06-29 08:06:29 -05:00
require '../app/bootstrap.php';
$DM = new DisplayModule();
echo render('header');
2024-06-29 07:47:23 -05:00
if (!empty($_GET['page'])) {
$page = "home";
$TmpPage = basename($_GET['page']);
// If it's not a disallowed path, and if the file exists, update $page
if (!in_array($TmpPage, $LockedPages) && file_exists("Pieces/{$TmpPage}.htm")) {
$page = $TmpPage;
}
} else {
2024-06-29 07:47:23 -05:00
$page = "home";
}
2024-06-29 07:47:23 -05:00
if($page == "home") {
2024-06-29 08:06:29 -05:00
echo render('slider');
}
2024-06-29 07:47:23 -05:00
// Include $page
2024-06-29 08:06:29 -05:00
echo render($page);
2024-06-29 07:47:23 -05:00
2024-06-29 08:06:29 -05:00
echo render('footer');