diff options
author | 53hornet <atc@53hor.net> | 2021-12-11 11:26:18 -0500 |
---|---|---|
committer | 53hornet <atc@53hor.net> | 2021-12-11 11:26:18 -0500 |
commit | 00d6a7d10f6267e437b330aa99df091bfc7c67b6 (patch) | |
tree | b3ffb8fc4f09933ebc8ed9c90f03412250199dd8 /index.php | |
parent | de9bbfdb8f0d3b366e76a5cc775690f7315c740f (diff) | |
download | 53hor-00d6a7d10f6267e437b330aa99df091bfc7c67b6.tar.xz 53hor-00d6a7d10f6267e437b330aa99df091bfc7c67b6.zip |
chore: organize pages and use router/renderer, organize assetsrouting
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,8 +1,12 @@ <?php include('./includes/head.php'); -if (($post = strtok($_SERVER['REQUEST_URI'], '/')) && !empty($post)) { +$page = strtok($_SERVER['REQUEST_URI'], '/'); + +if (!empty($page) && $page == "posts" && ($post = strtok('/')) && !empty($post)) { include("./posts/$post.php"); +} else if (!empty($page)) { + include("./pages/$page.php"); } else { include('./includes/render_index.php'); } |