diff options
author | Kai Stevenson <kai@kaistevenson.com> | 2022-10-28 17:36:28 -0700 |
---|---|---|
committer | Kai Stevenson <kai@kaistevenson.com> | 2022-10-28 17:36:28 -0700 |
commit | 09feefc9f04b38420a198b6f69895b242832ad30 (patch) | |
tree | f4901d6c67ecfed074ca5a0028a9a7964ac7a70a /src/header.php | |
parent | 04cd72c5b46a16b7b82d581f22fe74d2f1e4916e (diff) |
changed the file structure
Diffstat (limited to 'src/header.php')
-rw-r--r-- | src/header.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/header.php b/src/header.php new file mode 100644 index 0000000..7d8614b --- /dev/null +++ b/src/header.php @@ -0,0 +1,9 @@ +<h1><?php echo $title; ?></h1> + +<?php if (getcwd() == $_SERVER["DOCUMENT_ROOT"]) { ?> + <h3 class="nav"><a href="/">[Home]</a> | <a href="/about.php">[About]</a></h3> +<?php } else if (basename($_SERVER['PHP_SELF']) == "index.php") { ?> + <h3 class="nav"><a href="/">[Home]</a> | <a href="/about.php">[About]</a> | <a href="..">[Back]</a></h3> +<?php } else { ?> + <h3 class="nav"><a href="/">[Home]</a> | <a href="/about.php">[About]</a> | <a href=".">[Back]</a></h3> +<?php } ?> |