blob: e75445c576c2f448b8bfa6c3482a8f0d8ea27b87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
<div class="header">
<nav>
<div>
<a href="/projects/">projects</a> |
<a href="https://github.com/floppydisk05?tab=repositories">repos</a> |
<a href="/calculators/">calculators</a> |
<a href="/computers/">computers</a> |
<a href="/bookmarks/">bookmarks</a> |
<a href="/guestbook/">guestbook</a>
</div>
</nav>
<div class="pagetree">
<span class="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 = '<a href="/">~floppydisk</a> / ';
$currentDir = basename(getcwd());
foreach($uriArr as $page) {
if ($page !== $currentDir) {
if ($link !== '/') $link = $link . '/' . $page;
else $link = $link . $page;
$links = $links . '<a href="' . $link . '">' . $page . '</a> / ';
}
}
$links = substr($links, 0, -3) . ' / ' . $currentDir;
echo $links;
}
}
?>
</span>
</div> <!-- pagetree -->
</div> <!-- header -->
|