root > rawview > crumbs.php

crumbs.php

application/x-php, 708 bytes (load raw)
<?

if ($repos==='_root_') {
    print "root";
}
else {
    print "<a href='".rvURL(NULL, NULL)."'>root</a>";

    if ($path==='/') {
        print "&nbsp;&gt; " . htmlspecialchars($repos);
    }
    else {
        print "&nbsp;&gt; <a href='".rvURL($repos, NULL)."'>" . htmlspecialchars($repos)."</a>";
       
        $pp= explode('/',$path);
        $p= '';
       
        foreach ($pp as $n) {
            if ($p!='') $p.= '/';
            $p.= $n;
           
            if ($p == $path) break;
           
            print "&nbsp;&gt; <a href='".rvURL($repos, $p)."'>" . htmlspecialchars($n)."</a>";
        }
       
        print "&nbsp;&gt; " . htmlspecialchars(basename($path));
    }
}

?>