".date("H:i:s")." ".$str."

"; } /* if($_SESSION["BEZIG"] != "OK" && $_GET["ISBEZIG"] == "OK") { $_SESSION["BEZIG"] = "OK"; } if($_SESSION["BEZIG"] != "OK") { header('HTTP/1.1 503 Service Temporarily Unavailable'); header('Status: 503 Service Temporarily Unavailable'); echo "

 

Momenteel wordt er onderhoud gepleegd aan onze website.
Onze excuses voor het ongemak.

"; exit(); } */ //$_SESSION["showDebug"] = "OK"; if($_SESSION["showDegbug"] != "OK" && $_GET["showDebug"] == "START") { $_SESSION["showDebug"] = "OK"; } elseif($_GET["showDebug"] == "STOP") { $_SESSION["showDebug"] = ""; } if(!isset($_SESSION["TEST"]) && $_GET["TEST"] == "OK") { $_SESSION["TEST"] = "OK"; echo "ok"; } elseif(!isset($_SESSION["TEST"]) && $_GET["TEST"] == "STOP") { unset($_SESSION["TEST"]); } require_once("CMS2/beheer/basis.php"); $STD_DB = connectdb("ja"); require_once("defines_inc.php"); require_once("stdf.php"); require_once("emails_inc.php"); require_once('productEnCategorie_inc.php'); $BZTeller = mysqli_fetch_array(mysqli_query($GLOBALS["___mysqli_ston"], "SELECT Bezoekersteller FROM T_Algemeen")); if($BZTeller["Bezoekersteller"]) { if($_SESSION["Sid"] != "OK" && $_GET["SesID"] == "") { $Sid = "OK"; $_SESSION["Sid"] = "OK"; $ip = $_SERVER['REMOTE_ADDR']; $hostname = gethostbyaddr($ip); $jaar = date("Y"); $dag = date("d"); $maand = date("m"); $tijd = date("H:i:s"); if(mysqli_num_rows(mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM T_Counter WHERE IP = '$ip' AND Jaar = '$jaar' AND Maand = '$maand' AND Dag = '$dag'")) == 0) mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO T_Counter (Jaar, Maand, Dag, Tijd, IP, Hostname) VALUES ('$jaar', '$maand', '$dag', '$tijd', '$ip', '$hostname')"); } } $temp = ''; $content = ""; $containterClass = ""; $PID = -1; $getUrlStr = ""; $htmlError = false; $error = 0; $newUrl = ""; $stdLink = ""; $jaar = date("Y"); $jQuery = true; $jQueryFancy = true; $jQueryVoorbeeldOntwerp = false; $robots = "index, follow"; $htmlTitle = ""; $htmlDescription = ""; $htmlKeywords = ""; $headincBefore = ""; $headinc = ""; $headincAfter = ""; $bovenContent = 'Wellness and Garden'; $selectedCategorie = -1; $selectedProduct = -1; $selectedMenuCategorie = -1; $leftMenu = LeftMenu($PID, $selectedMenuCategorie); $leftMenuKop = 'Welkom'; $url = trim($_SERVER['REQUEST_URI'], '/'); debug($_SERVER["HTTP_HOST"]); if(substr($_SERVER["HTTP_HOST"], 0, 3) != 'www') { $newUrl = $DOMEINNAAM.$url; header("location: ".$newUrl.""); exit(); } debug ("Line: ".__LINE__." url = $url"); if(($getPosition = strpos($url, '?')) !== false) { $getUrlStr = substr($url, $getPosition + 1); debug ("Line: ".__LINE__." getUrlStr = $getUrlStr"); $url = substr($url, 0, $getPosition); debug ("Line: ".__LINE__." url = $url"); } if(($hashtagPosition = strpos($url, '#')) !== false) { $hashtagUrlStr = substr($url, $hashtagPosition + 1); debug ("Line: ".__LINE__." hashtagUrlStr = $hashtagUrlStr"); $url = substr($url, 0, $hashtagPosition); debug ("Line: ".__LINE__." url = $url"); } $urlItems = explode('/', $url); /* temp */ $urlItems = array_slice($urlItems, 0); $url = implode('/', $urlItems); debug ("Line: ".__LINE__." temp url = $url"); /* end temp */ $lastUrlItemIndex = count($urlItems) - 1; if(substr($urlItems[$lastUrlItemIndex], -5) !== ".html") { $htmlError = true; $error = 301; $newUrl = DOMEIN.$url.".html"; if($getUrlStr > '') { $newUrl .= "?".$getUrlStr; } if($hashtagPosition > '') { $newUrl .= "#".$hashtagPosition; } debug ("Line: ".__LINE__." htmlError (301): $newUrl"); } else { $urlItems[$lastUrlItemIndex] = str_replace(".html", "", $urlItems[$lastUrlItemIndex]); } if(LANGUAGE != 'NL' && (substr($urlItems[$lastUrlItemIndex], -3) == '_ch' || substr($urlItems[$lastUrlItemIndex], -3) == '_it' || substr($urlItems[$lastUrlItemIndex], -3) == '_de')) { $htmlError = true; $error = 301; $newUrl = DOMEIN.substr($url, 0, strlen($url) - 8).".html"; if($getUrlStr > '') { $newUrl .= "?".$getUrlStr; } if($hashtagPosition > '') { $newUrl .= "#".$hashtagPosition; } debug ("Line: ".__LINE__." htmlError (301): $newUrl"); } $pageFound = false; $pageIndex = $lastUrlItemIndex; debug ("Line: ".__LINE__." pageIndex: $pageIndex"); while($pageIndex >= 0 && $pageFound == false && $url != "" && $error == 0) { if(findUrlInPages($urlItems[$pageIndex]) == true) { $pageFound = true; $tempQuery = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM T_Paginas WHERE Actief = '1' AND Adres = '".addslashes($urlItems[$pageIndex])."'"); $pageResult = mysqli_fetch_assoc($tempQuery); debug ("Line: ".__LINE__." findUrlInPages = true"); } elseif(($urlDoorverwijzing = findUrlInUrlHistory($urlItems[$pageIndex])) !== false) { $pageFound = true; $newUrl = $urlDoorverwijzing; $error = 301; $newUrl = DOMEIN.getCompleteUrl($urlDoorverwijzing).'/'; for($i = $pageIndex + 1; $i <= $lastUrlItemIndex; $i++) { $newUrl .= $urlItems[$i]."/"; } $newUrl = trim($newUrl, '/').'.html'; if($getUrlStr > '') { $newUrl .= "?".$getUrlStr; } debug ("Line: ".__LINE__." findUrlInUrlHistory = true, error 301, newUrl: $newUrl"); } elseif(mysqli_num_rows(mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM T_Paginas WHERE Actief = '0' AND Adres = '".addslashes($urlItems[$pageIndex])."' AND Doorlink > ''")) > 0) { $pageQuery = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM T_Paginas WHERE Actief = '0' AND Adres = '".addslashes($urlItems[$pageIndex])."' AND Doorlink > ''"); $pageResult = mysqli_fetch_array($pageQuery); $Doorlink = stripslashes($pageResult['Doorlink']); $error = 301; $newUrl = DOMEIN.$Doorlink; } else { $pageIndex--; debug ("Line: ".__LINE__." pageIndex = $pageIndex"); } } if($pageIndex == 0 && $urlItems[0] == "home") { debug ("Line: ".__LINE__." home.html -> 301"); $error = 301; $newUrl = DOMEIN; } if($urlItems[0] == '') { // page = home debug ("Line: ".__LINE__." page = home"); $error = 0; $pageFound = true; $urlItems[0] = "home"; $pageIndex = 0; } if($pageFound == false && $error == 0) { $error = 404; debug ("Line: ".__LINE__." error 404"); } elseif($error == 0) { debug ("Line: ".__LINE__." page found"); $receivedUrl = ""; for($i = 0; $i <= $pageIndex; $i++) { $receivedUrl .= "/".$urlItems[$i]; } $receivedUrl = trim($receivedUrl, '/'); $stdLink = $urlItems[$pageIndex]; debug ("Line: ".__LINE__." receivedUrl = $receivedUrl"); $validUrl = getCompleteUrl($urlItems[$pageIndex]); debug ("Line: ".__LINE__." validUrl = $validUrl"); if($validUrl === false) { $error = 404; debug ("Line: ".__LINE__." error 404"); } else if($validUrl != $receivedUrl) { $newUrl = DOMEIN.$validUrl.'/'; for($i = $pageIndex + 1; $i <= $lastUrlItemIndex; $i++) { $newUrl .= $urlItems[$i]."/"; } $newUrl = trim($newUrl, '/').'.html'; if($getUrlStr > '') { $newUrl .= "?".$getUrlStr; } $error = 301; debug ("Line: ".__LINE__." error 301: $newUrl"); } else { debug ("Line: ".__LINE__." no error"); if($pageFound == true && LANGUAGE != 'NL') { debug ("Line: ".__LINE__." Find alternative page pageIndex = $pageIndex"); $tempQuery = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM T_Paginas WHERE Actief = '1' AND Adres = '".addslashes($urlItems[$pageIndex].'_'.LANGUAGE)."'"); if(mysqli_num_rows($tempQuery) > 0) { $pageResult = mysqli_fetch_assoc($tempQuery); } } else { $pageResult = mysqli_fetch_assoc(mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM T_Paginas WHERE Adres = '".addslashes($urlItems[$pageIndex])."' AND Actief = 1 LIMIT 1")); } $pageType = $pageResult['Type']; $paginaTitel = stripslashes($pageResult['Zoek_Titel']); $bovenContent .= '  »  '.$paginaTitel.''; $nextIndex = 0; if($pageIndex < $lastUrlItemIndex) // Er is een volgend item { $other = true; $tempIndex = $pageIndex + 1; if($pageType == 8) // Webshop check { $completeSubUrl = ''; for($i = $tempIndex; $i <= $lastUrlItemIndex; $i++) { $completeSubUrl .= '/'.$urlItems[$i]; } if(is_product($urlItems[$lastUrlItemIndex])) { $tempSubUrl = getProductLinkByUrl($urlItems[$lastUrlItemIndex]); if($completeSubUrl != $tempSubUrl) { $error = 301; $newUrl = $validUrl.$tempSubUrl.'.html'; debug ("Line: ".__LINE__." Unvalid product URL: ".$completeSubUrl." should be: (".$validUrl.")".$tempSubUrl); } else { $selectedProduct = getContentTypeID('product', getNumberFromUrl($urlItems[$lastUrlItemIndex])); $selectedMenuCategorie = getContentTypeID('categorie', getNumberFromUrl($urlItems[$pageIndex + 1])); debug ("Line: ".__LINE__." Valid product URL"); } } else if(is_categorie($urlItems[$lastUrlItemIndex])) { $tempSubUrl = getCategorieLinkByUrl($urlItems[$lastUrlItemIndex]); if($completeSubUrl != $tempSubUrl) { $error = 301; $newUrl = $validUrl.$tempSubUrl.'.html'; debug ("Line: ".__LINE__." Unvalid categorie URL: ".$completeSubUrl." should be: (".$validUrl.")".$tempSubUrl); } else { $selectedCategorie = getContentTypeID('categorie', getNumberFromUrl($urlItems[$lastUrlItemIndex])); $selectedMenuCategorie = getContentTypeID('categorie', getNumberFromUrl($urlItems[$pageIndex + 1])); debug ("Line: ".__LINE__." Valid categorie URL"); } } else { $error = 404; } /* // Categorie check $selectedCategorie = getNumberFromUrl($urlItems[$tempIndex]); debug ("Line: ".__LINE__." selectedCategorie: ".$selectedCategorie); if($tempIndex < ($lastUrlItemIndex)) { $tempIndex++; // Product check $selectedProduct = getNumberFromUrl($urlItems[$tempIndex]); debug ("Line: ".__LINE__." selectedProduct: ".$selectedProduct); $leftMenu = ProductMenu($selectedCategorie); } */ } } else { $other = true; debug ("Line: ".__LINE__." anders.."); } if($other == true) { $PID = $pageResult['PID']; getSeoResults('pagina', $PID); $pageResult['Tekst'] = replaceHTMLItems('pagina', $PID, stripslashes($pageResult['Tekst'])); $pageResult['UitgebreideTekst'] = getTekstItemByPID($PID); debug ("Line: ".__LINE__." PageType: $pageType, PID: $PID"); switch($pageType) { case 3: $newUrl = $pageResult['Tekst']; $error = 301; break; case 8: // Webwinkel debug ("Line: ".__LINE__." Webwinkel"); if($selectedProduct != -1) // Toon product { debug ("Line: ".__LINE__." SelectedProduct: ".$selectedProduct); // $leftMenu = LeftMenu(WEBSHOPPID, $selectedMenuCategorie); $content .= geefProductWeer($selectedProduct); } else if($selectedCategorie != -1) // Toon producten of categorieŽn uit categorie { debug ("Line: ".__LINE__." SelectedCategorie: ".$selectedCategorie); $content .= geefCategorieWeer($selectedCategorie, true, false, false, true, true); } else // Toon alle categorieŽn { debug ("Line: ".__LINE__." Alle categorieŽn"); $content .= $pageResult['Tekst']; $content .= geefCategorieWeer(-1, true, false, false, true, true); $content .= $pageResult['UitgebreideTekst']; $contentTitle = stripslashes($pageResult['Zoek_Titel']); } $headincAfter .= ''; break; case 7: // Contactpagina if($PID == CONTACT_PID || $PID == CONTACT_PID_CH) { require_once('contacten_inc.php'); require_once('contact_inc.php'); $containterClass = 'gr2'; $contentTitle .= stripslashes($pageResult['Zoek_Titel']); if($_SERVER['REQUEST_METHOD'] == 'POST') { if(errorCheck() == 0) { $content .= sendContactForm(); } else { $content .= '
'.$pageResult['Tekst'].'
'; $content .= showContactForm(false); } } else { $content .= '
'.$pageResult['Tekst'].'
'; $content .= showContactForm(true); } $content .= $pageResult['UitgebreideTekst']; $jQuery = true; } break; default: $content .= $pageResult['Tekst']; $contentTitle .= stripslashes($pageResult['Zoek_Titel']); /*if(strlen($pageResult['UitgebreideTekst']) > UITGEBREIDE_TEKST_MIN) { $content .= '

Lees meer >>

'.$pageResult['UitgebreideTekst'].'
'; }*/ break; } } } } /* if($pageResult['LayoutID'] == 1) // Voorpagina { $temp = file_get_contents($BASISMAP."includes/layout/layout.html"); $temp = str_replace('class="content"', 'class="content content-home"', $temp); } elseif($pageResult['LayoutID'] == 2) { $temp = file_get_contents($BASISMAP."includes/layout/layout-met-kaart.html"); } elseif($pageResult['LayoutID'] == 3) { $temp = file_get_contents($BASISMAP."includes/layout/layout-zonder-info.html"); if($PID != 45 && $PID != 37) { $linkResult = mysql_fetch_assoc(mysql_query("SELECT ps.SID FROM T_PaginaStructuur ps, T_Paginas p WHERE ps.SUPPID = 38 AND ps.PID = '".$PID."' AND p.PID = ps.PID AND p.Actief = 1 ORDER BY ps.SID")); $laatste = mysql_num_rows(mysql_query("SELECT * FROM T_PaginaStructuur ps, T_Paginas p WHERE ps.SUPPID = 38 AND ps.PID = p.PID AND p.Actief = 1")) - 1; debug ("Line: ".__LINE__." SID: ".$linkResult['SID'].", Laatste: $laatste"); if($linkResult['SID'] == 0) { $vorigeLink = $laatste; $volgendeLink = 1; } elseif($linkResult['SID'] == $laatste) { $vorigeLink = $laatste - 1; $volgendeLink = 0; } else { $vorigeLink = $linkResult['SID'] - 1; $volgendeLink = $linkResult['SID'] + 1; } debug ("Line: ".__LINE__." vorigeLink: $vorigeLink, volgendeLink: $volgendeLink"); // $linkResult = mysql_fetch_assoc(mysql_query("SELECT PID FROM T_Structuur WHERE SUPPID = 38 AND SID = '".$vorigeLink."' LIMIT 1")); $content = str_replace('href="" class="vorige"', 'href="'.getPageBySuppidSid(38, $vorigeLink).'" class="vorige"', $content); $content = str_replace('href="" class="volgende"', 'href="'.getPageBySuppidSid(38, $volgendeLink).'" class="volgende"', $content); } $temp = str_replace('', $contentTitle, $temp); } else { $temp = file_get_contents($BASISMAP."includes/layout/layout.html"); } */ $temp = file_get_contents($BASISMAP."layout.html"); if($error == 404) { if(($newUrl = checkUrlByOldList()) !== false) { $error = 301; } else { debug ("Line: ".__LINE__." ".str_replace('_', '-', $urlItems[$lastUrlItemIndex])); if(mysqli_num_rows(mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM T_Paginas WHERE Adres = '".addslashes(str_replace('_', '-', $urlItems[$lastUrlItemIndex]))."' AND Actief = 1"))) { $urlItems[$lastUrlItemIndex] = str_replace('_', '-', $urlItems[$lastUrlItemIndex]); $newUrl = DOMEIN.getCompleteUrl(str_replace('_', '-', $urlItems[$lastUrlItemIndex])).'/'; /* for($i = $pageIndex + 1; $i <= $lastUrlItemIndex; $i++) { $newUrl .= $urlItems[$i]."/"; }*/ $newUrl = trim($newUrl, '/').'.html'; if($getUrlStr > '') { $newUrl .= "?".$getUrlStr; } $error = 301; debug ("Line: ".__LINE__." getCompleteUrl = true, error 301, newUrl: $newUrl | ".$urlItems[$lastUrlItemIndex]); } else { $contentTitle = "Pagina niet gevonden..."; $content = '

De pagina die u probeert te bereiken bestaat mogelijk niet meer...

'; header('Status: 404 Not Found'); header('HTTP/1.0 404 Not Found'); } } } if($error == 301) { debug ("Line: ".__LINE__." error 301: $newUrl"); if($_SESSION["showDebug"] == "OK") echo $debugStr; header('HTTP/1.1 301 Moved Permanently'); header('Location: '.$newUrl); exit(); } function getPageBySuppidSid($SUPPID = 38, $SID = 0) { $linkResult = mysqli_fetch_assoc(mysqli_query($GLOBALS["___mysqli_ston"], "SELECT PID FROM T_PaginaStructuur WHERE SUPPID = '".$SUPPID."' AND SID = '".$SID."' LIMIT 1")); $result = mysqli_fetch_assoc(mysqli_query($GLOBALS["___mysqli_ston"], "SELECT Adres FROM T_Paginas WHERE PID = '".$linkResult['PID']."'")); return DOMEIN.getCompleteUrl($result['Adres']).'.html'; } function findUrlInPages($url) { debug ("Line: ".__LINE__." findUrlInPages(): $url"); $result = false; $query = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM T_Paginas WHERE Adres = '".addslashes($url)."' AND Actief = 1"); if(mysqli_num_rows($query)) { $result = mysqli_fetch_assoc($query); } return $result; } function findUrlInUrlHistory($url) { $pageResult = false; $query = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM T_UrlHistory WHERE OldUrl = '".addslashes($url)."' LIMIT 1"); if(mysqli_num_rows($query)) { $result = mysqli_fetch_assoc($query); $pageQuery = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM T_Paginas WHERE PID = '".addslashes($result['ItemID'])."' AND Actief = 1 LIMIT 1"); if(mysqli_num_rows($pageQuery)) { $result2 = mysqli_fetch_assoc($pageQuery); $pageResult = stripslashes($result2['Adres']); } } return $pageResult; } function checkUrlByOldList() { global $urlItems; global $lastUrlItemIndex; $output = false; if($output != false) $output = DOMEIN.$output; return $output; } if($contentTitle != '') $contentTitle = '

'.$contentTitle.'

'; if($containterClass == '') $containterClass = 'gr1'; $containterClass = ' class="'.$containterClass.'"'; if(isset($_SESSION["showDebug"]) && $_SESSION["showDebug"] == "OK") $content = "
$debugStr
".$content; if($jQueryFancy == true) { $jQuery = true; if($PID == CONTACT_PID) { $headincBefore .= ' '; } $placeHolder = 0; if($PID == CONTACT_PID) $placeHolder = 1; $headincBefore .= ' '; } if($jQuery == true) { $headincBefore = ' '.$headincBefore; } /* $headincBefore .= ' ';*/ if($getUrlStr > '') { $canonicalLink = trim(implode($urlItems, "/"), "/").".html"; $headinc .= ' '; } $leftMenu = LeftMenu($PID, $selectedMenuCategorie); $menu = TopMenu($PID, $selectedMenuCategorie); $footerContent = '
DHW B.V.
'; //$breadcrumb = 'Wellness and Garden  »  Home'; $temp = str_replace("", $htmlTitle, $temp); $temp = str_replace("", $htmlDescription, $temp); $temp = str_replace("", $htmlKeywords, $temp); $temp = str_replace("", $headincBefore.$headinc.$headincAfter, $temp); $temp = str_replace("", $bovenContent, $temp); $temp = str_replace("", $leftMenu, $temp); $temp = str_replace("", $leftMenuKop, $temp); $temp = str_replace("", $menu, $temp); $temp = str_replace("", $containterClass, $temp); $temp = str_replace("", $contentTitle.$content.ADD_THIS_TOOLBAR, $temp);//str_replace('href="https://www.buitenbusiness.nl', 'href="https://testwww.buitenbusiness.nl', $content) $temp = str_replace("", $footerContent, $temp); $temp = str_replace("", $robots, $temp); $temp = str_replace("", '', $temp); $temp = str_replace("", '', $temp); $temp = str_replace('[analytics_opt_out_link]', 'opt-out link', $temp); $temp = str_replace("<%DOMEIN%>", DOMEIN, $temp); $temp = str_replace(array(DOMEIN.'home.html', DOMEIN.'home/', DOMEIN.'home'), array(DOMEIN, DOMEIN, DOMEIN), $temp); $vlaggen = ' Wellness and Garden.at Wellness and Garden.ch Wellness and Garden.de Wellness and Garden.nl'; $telefoonnr = '+31 (0)6 51 88 23 77'; if(LANGUAGE != 'NL') { $temp = str_replace("https://www.wellnessandgarden.nl/", DOMEIN, $temp); if(LANGUAGE == 'CH') { //$telefoonnr = '+41 (0)900 19 99 99
2CHF pro Minute (gilt ab Festnetz)'; } elseif(LANGUAGE == 'IT') { $telefoonnr = '+49 (0)'; } elseif(LANGUAGE == 'DE') { // gebruik AT contactgegevens } } $temp = str_replace('
', '
'.$vlaggen.'
', $temp); $temp = str_replace('
', '
'.$telefoonnr.'
', $temp); $temp = str_replace('
', '
'.$vlaggen.'
', $temp); if(LANGUAGE == 'AT') { // insert $headToevoeging = ' '; } elseif(LANGUAGE == 'CH') { $canonicalLink = true; if(substr($pageResult['Adres'], -3) == '_ch') { if(mysqli_num_rows(mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM T_Paginas WHERE Adres = '".addslashes(substr($pageResult['Adres'], -3))."' AND Actief = 1")) == 0) { $canonicalLink = false; } } if($canonicalLink == true) // insert canonical { $headToevoeging = ' '; } //Analytics $temp = str_replace("'UA-38359050-1'", "'UA-38359050-2'", $temp); }/* elseif(LANGUAGE == 'IT') { $canonicalLink = true; if(substr($pageResult['Adres'], -3) == '_it') { if(mysql_num_rows(mysql_query("SELECT * FROM T_Paginas WHERE Adres = '".addslashes(substr($pageResult['Adres'], -3))."' AND Actief = 1")) == 0) { $canonicalLink = false; } } if($canonicalLink == true) // insert canonical { $headToevoeging = ' '; } //Analytics $temp = str_replace("'UA-38359050-1'", "'UA-38359050-3'", $temp); }*/ elseif(LANGUAGE == 'DE') { $canonicalLink = true; if(substr($pageResult['Adres'], -3) == '_de') { if(mysqli_num_rows(mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM T_Paginas WHERE Adres = '".addslashes(substr($pageResult['Adres'], -3))."' AND Actief = 1")) == 0) { $canonicalLink = false; } } if($canonicalLink == true) // insert canonical { $headToevoeging = ' '; } //Analytics $temp = str_replace("'UA-38359050-1'", "'UA-38359050-3'", $temp); } $temp = str_replace("", $headToevoeging, $temp); header('Content-Type: text/html; charset=ISO-8859-1'); echo $temp; function getSubPids($pid, $layer = 0) { $pidsOutput = ''; $pidsQuery = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM T_PaginaStructuur WHERE SUPPID = '".$pid."'"); if(mysqli_num_rows($pidsQuery)) { while($pidsResult = mysqli_fetch_assoc($pidsQuery)) { if($pidsOutput != '') $pidsOutput .= ','; $pidsOutput .= "'".$pidsResult['PID']."'"; $supPidsOutput = ''; // if($layer < 2) // $supPidsOutput = getSubPids($pid, $layer++); if($supPidsOutput > '') $pidsOutput .= ",".$supPidsOutput; } } return $output; } ?>