$url = $HTTP_SERVER_VARS['HTTP_HOST'];
$page = $_SERVER['REQUEST_URI'];
if ($url != "www.angelsandurchins.co.uk") {
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.angelsandurchins.co.uk".$page);
}
include_once("../admin/func/db_func.php");
include_once("../admin/global.php");
global $img_small, $img_medium, $img_large, $img_xlarge;
$replacethis = array(" ", "'");
$withthis = array("-", "");
//echo 'this = '.$_GET['pid'];
if (isset($_GET['pid'])) {
buildTitles($_GET['pid']); //here we call our function - pass your ID variable for the current category here
//reverse sort the arrays (sorting on the key not the value)
krsort($titles_arr, SORT_NUMERIC);
krsort($titles_arr, SORT_NUMERIC);
//cycle through arrays - we only need to cycle through one as the keys will be identical on both arrays
foreach($titles_arr as $key => $value) {
//$crumb .= ' - '.stripslashes(htmlspecialchars(str_replace($replacethis,$withthis,$value)));
//we are pulling data from MySQL so we must clean slashes
//and protect against HTML code in the category names
//using stripslashes and htmlspecialchars
$title_name .= ' - '.stripslashes(htmlspecialchars($value)) . ' ';
}
//our crumb will have a trailing > character with a space either side -
//let’s chop that off
$title_name = substr($title_name, 0, strlen($titles) - 1);
//echo $title_name;
//$title_name = ' - '.get_dcategory_name_by_uid($_GET['pid']);
}
?>