function showBreadCrumb() { |
$crumbs = explode("/",$_SERVER["REQUEST_URI"]); |
$server = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]/"; |
echo '<div id="breadcrumb">'; |
$path = $server; |
$index = 0; |
foreach($crumbs as $crumb){ |
$index++; |
$bread = (str_replace(array(".php","_"),array(""," "),$crumb)); |
$bread2 = ucfirst(str_replace(array(".php","_"),array(""," "),$crumb)); |
$path .= $bread; |
if (($index>1) && ($index<count($crumbs))) { |
$path .= '/'; |
} |
echo '<a href="'.$path.'">'.$bread2.'</a>'; |
if ($index<count($crumbs)){ |
echo ' > '; |
} |
} |
echo '</div>'; |
} |