facnav.php
\n";
if (substr_count($path, $root) < 1) //check $root is actually part of the path of this current page
{
//echo "The root folder doesn't exist in this path. FAIL! \n";
return -1;
}
$path = substr($path, stripos($path, $root)); //strip out everything before the declared root
//echo "Rooted path: ".$path." \n";
$homedpath = substr_replace($path, $homedispname, 0, strlen($root)); //replace root folder name with 'Home'
//echo "Homed path: ".$homedpath." \n";
$folders = explode("/", $homedpath);
//echo "Breadcrumbs: ".$folders." \n";
if ($folders)
{
returna($folders);
}
else
{
return($homedispname);
}
}
/**
* This function returns an array of relative paths, for the anchors of the breadcrumbs.
* @param root The first folder, root of the relative paths.
* @return folderpaths An array of relative paths, or -1 if the root specified doesn't exist
*/
function getFolderpathArray($root="intranet-new")
//function getFolderpathArray($root)
{
$path = getcwd();
if (substr_count($path, $root) < 1) //check $root is actually part of the path of this current page
{
//echo "The root folder doesn't exist in this path. FAIL! \n";
return -1;
}
$path = substr($path, stripos($path, $root)); //strip out everything before the declared root
$varpath = $path;
}
?>