blob: e75d485c675aec5bad84f5872f95a6baea6cfb28 (
plain)
1 <?php
2 //print(file_get_contents('res/header.html'));
3 include('res/header.php');
4
5 // Support multiple page query styles (this implements partial support for
6 // links used by other sofwares)
7 if($_GET['p'] != '') {
8 $post = $_GET['p'];
9 } else if($_GET['title'] != '') {
10 $post = $_GET['title'];
11 } else if($_GET['q'] != '') {
12 $post = $_GET['q'];
13 }
14
15 if($post == "" && file_exists('html/index.html')) {
16 // if a post isn't specified
17 print(file_get_contents('html/index.html'));
18 } elseif(file_exists('html/' . $post . '.html')) {
19 // Get body contents
20 print(file_get_contents('html/' . $post . '.html'));
21 } else {
22 print("Error: the page you have requested does not exist.");
23 }
24
25 print(file_get_contents('res/footer.html'));
26 ?>
|