summaryrefslogtreecommitdiff
path: root/index.php
blob: 14e5da23ef33fff13be6a04e5adfc5e92f1b67c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
include('./includes/head.php');
$page = strtok(strtok($_SERVER['REQUEST_URI'], '/'), '?');

if (empty($page)) {
	include('./pages/index.php');
} else if (!empty($page) && $page[0] >= '0' && $page[0] <= '9' && is_readable("./posts/$page.php")) {
	include("./posts/$page.php");
} else if (!empty($page) && is_readable("./pages/$page.php")) {
	include("./pages/$page.php");
} else {
	include('./includes/404.php');
}

include('./includes/foot.php');