21 lines
584 B
PHP
21 lines
584 B
PHP
|
|
<?php
|
||
|
|
// Simple front controller — expand routing here later
|
||
|
|
$path = trim($_GET['path'] ?? '', '/');
|
||
|
|
|
||
|
|
// Map paths to page includes
|
||
|
|
$pages = [
|
||
|
|
'' => 'pages/home.php',
|
||
|
|
'services' => 'pages/services.php',
|
||
|
|
'coverage' => 'pages/coverage.php',
|
||
|
|
'about' => 'pages/about.php',
|
||
|
|
'contact' => 'pages/contact.php',
|
||
|
|
];
|
||
|
|
|
||
|
|
$page = $pages[$path] ?? 'pages/404.php';
|
||
|
|
$pageFile = __DIR__ . '/' . $page;
|
||
|
|
|
||
|
|
include __DIR__ . '/includes/header.php';
|
||
|
|
include file_exists($pageFile) ? $pageFile : __DIR__ . '/pages/404.php';
|
||
|
|
include __DIR__ . '/includes/footer.php';
|
||
|
|
?>
|