aboutsummaryrefslogtreecommitdiff
path: root/inc/title.inc.php
blob: 149f0c82de5cf9664d14a957e4f7f57bfb2c03b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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>