diff options
Diffstat (limited to 'inc/title.inc.php')
-rw-r--r-- | inc/title.inc.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/inc/title.inc.php b/inc/title.inc.php new file mode 100644 index 0000000..149f0c8 --- /dev/null +++ b/inc/title.inc.php @@ -0,0 +1,22 @@ +<title><?php +$uri = $_SERVER['REQUEST_URI']; +if ($uri === '/') { echo '~floppydisk'; } +else { + $uri = substr(substr($uri, 1), 0, -1); + if (!strpos($uri, '/')) { + $uriArr = explode('/', $uri); + $link = "/"; + $links = '~floppydisk / '; + $currentDir = basename(getcwd()); + foreach($uriArr as $page) { + if ($page !== $currentDir) { + if ($link !== '/') $link = $link . '/' . $page; + else $link = $link . $page; + $links = $links . $link . $page . ' / '; + } + } + $links = substr($links, 0, -3) . ' / ' . $currentDir; + echo $links; + } +} +?></title> |