# First I get my current working directory
$whereami = $_SERVER['REQUEST_URI'];
#Now I define my folder array for the sub-nav
# these need to be defined longest to shortest, ending with '/'
# $folder[0] = "/amp-healthcare-staffing-recruiting/something-beneath-that-you-want-different/"; #test
$folder[0] = "/job-seekers/"; #js
$folder[1] = "/contact-us/"; #contact
$folder[2] = "/employers/"; #emp
$folder[3] = "/resources/"; #res
$folder[4] = "/about-us/"; #about
$folder[5] = "/"; #blank
#Now for some logic to see where we are versus the style we want to print to the page...
switch (1) {
case doMatch($folder[0]): #js
$cur_js = 'current';
$banner = 'Js';
break;
case doMatch($folder[1]): #contact
$cur_contact = 'current';
$banner = 'Contact';
break;
case doMatch($folder[2]): #emp
$cur_emp = 'current';
$banner = 'Emp';
break;
case doMatch($folder[3]): #res
$cur_res = 'current';
$banner = 'Resources';
break;
case doMatch($folder[4]): #about
$cur_about = 'current';
$banner = 'About';
break;
case doMatch($folder[5]): #blank
$banner = 'About';
break;
}
function doMatch($the_folder) {
global $whereami;
$the_folder = preg_replace("/\//", "\/", $the_folder);
$match = preg_match("/^$the_folder/",$whereami);
//echo " Checking $the_folder vs $whereami : $match
";
return $match;
}
?>
Successfully providing recruitment excellence for over 40 years.
Since 1973, Career Path Personnel has been providing both clients and candidates with results that facilitate their success. Placements ranging from executive management to entry level in multiple job functions and industries across Canada.