dimaslanjaka /
universal-framework
| 1 | <nav aria-label="breadcrumb" class=""> |
||
| 2 | <ol class="breadcrumb white"> |
||
| 3 | <li class="breadcrumb-item"><a href="/superuser/"><i class="fad fa-home"></i></a></li> |
||
| 4 | <?php |
||
| 5 | $dirs = array_filter(glob(__DIR__ . '/*'), 'is_dir'); |
||
| 6 | if (is_array($dirs)) { |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 7 | $map = array_values(array_unique(array_filter(array_map('basename', $dirs)))); |
||
| 8 | for ($i = 0; $i < count($map); $i++) { |
||
| 9 | if ($i == count($map) - 1) { |
||
| 10 | //latest iteration |
||
| 11 | echo '<li class="breadcrumb-item active"><a href="/superuser/' . $map[$i] . '/">' . strtoupper($map[$i]) . '</a></li>'; |
||
| 12 | } else { |
||
| 13 | echo '<li class="breadcrumb-item"><a href="/superuser/' . $map[$i] . '/">' . strtoupper($map[$i]) . '</a></li>'; |
||
| 14 | } |
||
| 15 | } |
||
| 16 | } |
||
| 17 | ?> |
||
| 18 | </ol> |
||
| 19 | </nav> |