code blijft werken
if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
}
if (in_array($_SERVER['HTTP_HOST'], ['localhost', Host::TUINADVIES_DEV])) {
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
}
$currentdomain = strtolower(str_replace("www.", "", $_SERVER['HTTP_HOST']));
if (($currentdomain == "tuintv.be") or ($currentdomain == "bloemschikken.com")) {
header("HTTP/1.1 301 Moved Permanently");
header("Location: https://www.tuinadvies.be" . $_SERVER['REQUEST_URI']);
exit();
}
if (isset($_GET["zoekenid"]) && ($_GET["zoekenid"] != '')) //zoekenid weg!!!!
{
//redirect zonder zoekenid
$uri_parts = explode('?', $_SERVER['REQUEST_URI'], 2);
//301 redirect
header("HTTP/1.1 301 Moved Permanently");
header("Location: https://" . $_SERVER['HTTP_HOST'] . $uri_parts[0]);
exit();
}
$_SESSION["pree_test"] = [];
$_SESSION["controler_route"] = false; //labels wegschrijven !!!
//urls met daarin het woord aveve moet worden geforwarded naar een 404 pagina
//tenzij een bezoeker dit echt heeft gezocht in onze eigen zoekfunctie.
$noindexnofollow = "";
if (preg_match("/aveve/", strtolower($_SERVER["REQUEST_URI"]))) {
if (preg_match("/tuinadvies/", strtolower($_SERVER['HTTP_REFERER']))) {
//tis iemand die zelf heeft gezocht, dus deze pagina niet laten indexeren
$noindexnofollow = "";
} else {
//pagina is niet aangeroepen via tuinadvies. Wellicht google of iets anders, dus 301'en
Header("HTTP/1.1 301 Moved Permanently");
Header("Location: /404.html");
exit;
}
}
if ($_SERVER['SERVER_NAME'] == 'www.digituin.be') {
Header("HTTP/1.1 301 Moved Permanently");
Header("Location: http://www.tuinadvies.be/tuinvrienden");
exit;
}
if (($_SERVER['SERVER_NAME'] == 'www.tuinwinkel.be') or ($_SERVER['SERVER_NAME'] == 'www.tuinadvi.es') or ($_SERVER['SERVER_NAME'] == 'www.tuinclub.be')) //ilse 11/2017
{
Header("HTTP/1.1 301 Moved Permanently");
Header("Location: https://www.tuinadvies.be" . $_SERVER['REQUEST_URI']);
exit;
}
if (in_array($_SERVER['HTTP_HOST'], ['localhost', 'tuinadvies.docker'])) {
error_reporting(E_ERROR);
} elseif ($_SERVER['REMOTE_ADDR'] != '91.183.203.239') { //109.135.17.76
// Turn off all error reporting
error_reporting(0);
} else {
error_reporting(E_ERROR);
}
if (!stristr($_SERVER['REQUEST_URI'], "/ajax/")) { //enkel indien het een niet-ajax pagina betreft !!!
//product_detail vorig en volgend product
$_SESSION['new_product_order'] = [];
}
//product_detail vorig en volgend plant
$_SESSION['new_plant_order'] = [];
if ($_SERVER['SERVER_NAME'] == 'test.tuinadvies.be') {
$_SESSION['testversion'] = true;
} else {
$_SESSION['testversion'] = false;
}
if ($_SESSION['testversion']) {
date_default_timezone_set('Europe/Brussels');
$noindexnofollow = "";
}
//proberen resizes toe te voegen aan tuinfoto_album_fotos
// maar bij de activiteiten zitten de fotos vast in de tekst!! probleem !!!!!
//voorlopig niet online ....
if ((isset($_GET["tuinfotos"])) && ($_GET["tuinfotos"] == 'ilse1976')) {
$_SESSION['tuinfotos'] = true;
}
if ((isset($_GET["layoutold"])) && ($_GET["layoutold"] == 'ilse1976')) {
$_SESSION['layoutold'] = true;
}
$_SESSION['bus'] = true;
$_SESSION['orderplanten'] = true;
$_SESSION['pager'] = true;
$_SESSION['pagination'] = true;
if ((isset($_GET["layout"])) && ($_GET["layout"] == 'ilse1976')) {
$_SESSION['layout'] = true;
} elseif (!isset($_SESSION['layout'])) {
$_SESSION['layout'] = false;
}
$_SESSION["save_labels_trans"] = []; //Templater::vertaal -> iedere label hierin opslaan onderaan de pagina wegschrijven
if ((isset($_GET["lazyload"])) && ($_GET["lazyload"] == 'ilse1976')) {
$_SESSION['lazyload'] = true;
} elseif (!isset($_SESSION['lazyload'])) {
$_SESSION['lazyload'] = false;
}
$_SESSION['lazyload'] = true;
if ((isset($_GET["testsite"])) && ($_GET["testsite"] == 'ilse1976')) {
$_SESSION['testsite'] = true;
}
header('Content-Type: text/html; charset=utf-8');
$useragent = $_SERVER['HTTP_USER_AGENT'];
if (preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i', $useragent) || preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i', substr($useragent, 0, 4)))
$_SESSION['mobile'] = 1;
else
$_SESSION['mobile'] = 0;
$css_version = '1.435';
include("library/functions.php");
if ($_SERVER['SERVER_NAME'] == 'www.matelma.de') //oude links redirecten
{
Header("HTTP/1.1 301 Moved Permanently");
Header("Location: https://www.matelma.com/de-de" . ($_SERVER['REQUEST_URI'] == '/' ? '' : $_SERVER['REQUEST_URI']));
exit;
} elseif ($_SERVER['SERVER_NAME'] == 'www.matelma.be') {
Header("HTTP/1.1 301 Moved Permanently");
$c = explode("?", $_SERVER['REQUEST_URI']);
$urlRequestZonderParams = $c[0];
Header("Location: https://www.tuinadvies.be" . ($c[0] == '/' ? '' : $c[0]) . "?selectCountry=1");
exit;
} elseif ($_SERVER['SERVER_NAME'] == 'www.matelma.fr') {
Header("HTTP/1.1 301 Moved Permanently");
$c = explode("?", $_SERVER['REQUEST_URI']);
$urlRequestZonderParams = $c[0];
Header("Location: https://www.matelma.com/fr-fr" . ($c[0] == '/' ? '' : $c[0]) . "?selectCountry=1");
exit;
}
//if ( ($_SERVER['REMOTE_ADDR'] == "109.135.17.76") or ($_SERVER['REMOTE_ADDR'] == "188.166.90.42")) {
// echo $_SERVER['REMOTE_ADDR'];
// // if (Templater::getIdPageContent() == 'tuinwinkel_mijnbestellingen'){
// //
// // pre($_COOKIE);
// // echo 'test';
// // die();
// // }
//}
include("classes/class.Templater.php");
include("classes/class.Controller.php");
include("classes/class.Banners.php");
include("classes/class.Database.php");
include("classes/class.Artikel.php");
include("classes/class.Author.php");
include("classes/class.Profiel.php");
include("classes/class.ImageResize.php");
include("classes/class.Taal.php");
include("classes/class.Tags.php");
include("classes/class.Pagination.php");
include("classes/class.Encyclopedie.php");
include("classes/class.Bookmark.php");
include("classes/class.Activiteit.php");
include("classes/class.Forum.php");
include("classes/class.Tuinfoto.php");
include("classes/class.Ruillijst.php");
include("classes/class.Producten.php");
include("classes/class.FrontAndBackend.php");
include("classes/class.SharedFunctions.php");
include("classes/class.Winkelwagen.php");
include("classes/class.Verlanglijst.php");
include("classes/class.Url.php");
include("classes/class.Berichten.php");
include("classes/class.Soap.php");
include("classes/class.Bestelling.php");
include("classes/class.Media.php");
include("classes/class.Cutoff.php");
include("classes/class.Inhoud.php");
include("classes/class.MultiSafePayAfhandeling.php");
include("classes/class.Merk.php");
include("classes/class.Plantenherkenner.php");
include("classes/class.Status.php");
include("classes/class.Tuinagenda.php");
include("classes/class.Video.php");
include("classes/class.Tuinproblemen.php");
include("classes/class.Quiz.php");
include("classes/class.Faq.php");
include("classes/class.Marketing.php");
//print_r("offline");
//die();
include("classes/class.Plantenbeheer.php");
include("classes/class.Ads.php");
include("classes/class.Mail.php");
include("classes/class.Like.php");
include("classes/class.Dhl.php");
include("classes/class.Zoeken.php");
//UITZONDERING IN ADMIN
include("admin/phpmailer/PHPMailerAutoload.php");
include("classes/class.Admin.php");
//tijdelijke fix om inkomende bezoekers vanuit google toch de juiste zoekresultatentab te tonen (2022/11/04)
use Tuinadvies\Domain\Visitor\SearchTab;
if (str_contains($_SERVER['REQUEST_URI'], "/" . (Templater::genereerKorteTitelMetCijfers(Templater::vertaal("TUINWINKEL"))))) {
$lastVisitedSearchTabRepository = Container::getLastVisitedSearchTabRepository();
$lastVisitedSearchTabRepository->set(SearchTab::useTabFromController('webshop'));
}
//indien marketing beslist om een custom popup te tonen, dan moet dit hier bekeken worden
$shopInstellingen = Templater::getShopInstellingen();
if (time() > $shopInstellingen['kortingscodepopup_vanaf'] && time() < $shopInstellingen['kortingscodepopup_tot']) {
$_SESSION['toonKortingscodePopup'] = true;
} else {
//tenzij de testsessie manueel gezet is:
if ($_SESSION['toonKortingscodePopupManueel']) {
} else {
unset($_SESSION['toonKortingscodePopup']);
}
}
//testen om de popup aan te zetten? => via get-parameter
if ((isset($_GET["previewkortingscodepopup"])) && ($_GET["previewkortingscodepopup"] == '1')) {
$_SESSION['toonKortingscodePopup'] = true;
$_SESSION['toonKortingscodePopupManueel'] = true;
}
//test terug kunnen uitzetten
if ((isset($_GET["previewkortingscodepopup"])) && ($_GET["previewkortingscodepopup"] == '0')) {
unset($_SESSION['toonKortingscodePopup']);
unset($_SESSION['toonKortingscodePopupManueel']);
}
// //in tijden van AB-testen controleren of de huidige test nog steeds actief is
// if ($_SESSION['abtest_active_id'] != "") {
// //als er een sessie bestaat, dan controleren of deze nu nog altijd live is
// Templater::checkValidityAbTest($_SESSION['abtest_active_id']);
// }
if ($_GET['ELASTICSEARCH_ENABLED'] != "") { //wordt dus doorgegeven aan de hand van een get-parameter zoals www.tuinadvies.be?ELASTICSEARCH_ENABLED=102
//sessie voor autocomplete maken
if (substr(trim($_GET['ELASTICSEARCH_ENABLED']), 0, 1) == '0') {
$_SESSION['ELASTICSEARCH_AUTOCOMPLETE'] = "false";
} elseif (substr(trim($_GET['ELASTICSEARCH_ENABLED']), 0, 1) == 1) {
$_SESSION['ELASTICSEARCH_AUTOCOMPLETE'] = "true";
}
if (substr(trim($_GET['ELASTICSEARCH_ENABLED']), 0, 1) == 2) {
unset($_SESSION['ELASTICSEARCH_AUTOCOMPLETE']);
}
//sessie voor gewone zoekpagina maken (idem voor de laad-meer items op zoek zoekpagina)
if (substr(trim($_GET['ELASTICSEARCH_ENABLED']), 1, 1) == 0) {
$_SESSION['ELASTICSEARCH_SERPS'] = "false";
} elseif (substr(trim($_GET['ELASTICSEARCH_ENABLED']), 1, 1) == 1) {
$_SESSION['ELASTICSEARCH_SERPS'] = "true";
}
if (substr(trim($_GET['ELASTICSEARCH_ENABLED']), 1, 1) == 2) {
unset($_SESSION['ELASTICSEARCH_SERPS']);
}
//sessie voor gerelateerde items op de productpagina
if (substr(trim($_GET['ELASTICSEARCH_ENABLED']), 2, 1) == 0) {
$_SESSION['ELASTICSEARCH_GERELATEERDE'] = "false";
} elseif (substr(trim($_GET['ELASTICSEARCH_ENABLED']), 2, 1) == 1) {
$_SESSION['ELASTICSEARCH_GERELATEERDE'] = "true";
}
if (substr(trim($_GET['ELASTICSEARCH_ENABLED']), 2, 1) == 2) {
unset($_SESSION['ELASTICSEARCH_GERELATEERDE']);
}
}
//een lijst van alle ip-adressen bijhouden waarmee een klant de site bezoekt
Bestelling::logUsersIpHistory();
//links uit de nieuwsbrief 10/2017
// hs37 + hashstring weglaten uit url + automatisch inloggen adhv deze hash
if (preg_match("/hs37([a-z0-9]+)/", $_SERVER['REQUEST_URI'], $match)) { //oude manier
$profiel = Profiel::getProfielByHashAutoLogin($match[1]);
if (!empty($profiel['profiel_email'])) {
Profiel::inloggen($profiel['profiel_email'], $profiel['profiel_wachtwoord']);
}
$newURL = (isSecure() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . str_replace("/" . $match[0], '', $_SERVER['REQUEST_URI']);
header("HTTP/1.1 301 Moved Permanently");
header("Location: " . $newURL);
exit();
}
//nieuwsbrief kliks
//https://www.tuinadvies.be/tuinwinkel/product/10614/regenton-antraciet-270-liter?
//Array
//(
// [mi] => 1012
// [k] => 43429
// [mhash] => bbe68e980cfa26828f89111a284c6413utm_source=TUBE
// [utm_campaign] => MAILING_2018_01_31_1517410102
// [utm_medium] => email
// [utm_term] => MAILING_2018_01_31_1517410102_43429
//)
function grabIpInfo($ip)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://api.ipgeolocationapi.com/geolocate/" . $ip);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 3);
$returnData = curl_exec($curl);
curl_close($curl);
return $returnData;
}
function getIpLandje($ip)
{
$sth = Database::prepare('SELECT ip_landcode from tube0712_sitebe.ip2loc WHERE ip_ipstart<=:ip AND ip_ipstop>=:ip ');
$sth->bindValue("ip", ip2long($ip), PDO::PARAM_INT);
Database::execute($sth);
$iplandje = $sth->fetchColumn(0);
return ($iplandje);
}
//if(isset($_GET["mhash"])){//nieuw systeem ilse -> mag weg -> niet meer automatisch laten inloggen vanuit de mailing
if (isset($_GET["mi"]) && isset($_GET["k"])) { //nieuw systeem ilse
// $curl = curl_init();
// curl_setopt_array($curl, array(
// CURLOPT_URL => "https://freegeoip.app/json/".$ip,
// CURLOPT_RETURNTRANSFER => true,
// CURLOPT_ENCODING => "",
// CURLOPT_MAXREDIRS => 10,
// CURLOPT_TIMEOUT => 5,
// CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
// CURLOPT_CUSTOMREQUEST => "GET",
// CURLOPT_HTTPHEADER => array(
// "accept: application/json",
// "content-type: application/json"
// ),
// ));
// $response = curl_exec($curl);
// $err = curl_error($curl);
// curl_close($curl);
//
// if ($err) {
//// echo "cURL Error #:" . $err;
// //Admin::voegErrorLogToe("ip api error", $err);
//// mail("[email protected]", "test ip ERR ".$err, $ip.' - lancode nie gevonden !!!! '.$_SERVER['HTTP_HOST'].' '.$_SERVER['REQUEST_URI'] . ' - sess.kl.id. '.$_SESSION['klant_land_id']);
// } else {
// $tmp = json_decode($response, true);
// $iplandcode = $tmp["country_code"];
//
// if( ($iplandcode=="NL") OR ($iplandcode=="BE") OR ($iplandcode=="DE") OR ($iplandcode=="FR")){
// $iplandje = $iplandcode;
// }else{
// // Admin::voegErrorLogToe("ander ip land mailing", " ipland niet be/nl/de/fr ");
// // mail("[email protected]", "test ip NIET ".$iplandcode, $ip.' - lancode nie gevonden !!!! '.$_SERVER['HTTP_HOST'].' '.$_SERVER['REQUEST_URI'] . ' - sess.kl.id. '.$_SESSION['klant_land_id']);
// }
// }
// $lol=ip2long($ip);
// $sth = Database::prepare('SELECT ip_land from tube0712_sitebe.ip2loc WHERE ip_ipstart<=:ip AND ip_ipstop>=:ip ');
// $sth->bindValue("ip", $lol, PDO::PARAM_INT);
// Database::execute($sth);
// $iplandje = $sth->fetchColumn(0);
// $ipInfo = grabIpInfo($ip);
// $ipJsonInfo = json_decode($ipInfo);
// $iplandcode = $ipJsonInfo->alpha2;
$ip = $_SERVER["REMOTE_ADDR"];
$iplandje = "";
$iplandcode = getIpLandje($ip);
if (($iplandcode == "NL") or ($iplandcode == "BE") or ($iplandcode == "DE") or ($iplandcode == "FR")) {
$iplandje = $iplandcode;
} else {
// // Admin::voegErrorLogToe("ander ip land mailing", " ipland niet be/nl/de/fr ");
// mail("[email protected]", "test ip NIET ".$iplandcode, $ip.' - lancode nie gevonden !!!! '.$_SERVER['HTTP_HOST'].' '.$_SERVER['REQUEST_URI'] . ' - sess.kl.id. '.$_SESSION['klant_land_id']);
}
//pree($iplandje);
$tempURL = ($_SERVER['REDIRECT_HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$aTempURL = explode('?', $tempURL);
$sURL = $aTempURL[0];
if ($iplandje != "") {
//ipland is niet leeg ==> tzal geen amerikaansen bot zijn
//bijhouden klik van klant, maar url filteren zodat de hash wegvalt ==> later gemakkelijker asc te sorteren in favo url
// if ($ip != Templater::getTuinadviesIp()){//kliks tuinadvies niet wegschrijven
$timestamp = time();
$sth = Database::prepare("INSERT into tube0712_log.mailing_log_kliks SET
log_klik_mailing_id = :mailingid,
log_klik_datum=:timestamp,
log_klik_klant_id=:klantid,
log_klik_url=:url,
log_klik_uri =:uri,
log_klik_ip=:ip");
$sth->bindValue("mailingid", $_GET["mi"], PDO::PARAM_INT);
$sth->bindValue("timestamp", $timestamp, PDO::PARAM_STR);
$sth->bindValue("klantid", $_GET["k"], PDO::PARAM_INT);
$sth->bindValue("url", $sURL, PDO::PARAM_STR);
$sth->bindValue("uri", ($_SERVER['REDIRECT_HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], PDO::PARAM_STR);
$sth->bindValue("ip", $ip, PDO::PARAM_STR); //TODO
Database::execute($sth);
//pree("dd");
// mail("[email protected]", "error mailing", "".$_GET["mi"]." - ".$_GET["k"]." - ".$sURL." - ".$ip);
//indien de mailing niet in HTML-mode zou zijn geopend is de open-event nooit getriggerd
//hier is mailing geklikt ==> is dus ook geopend ==> open-event oproepen
$sth = Database::prepare("INSERT into tube0712_log.mailing_log_open SET
log_open_mailing_id=:mailingid,
log_open_klant_id=:klantid,
log_open_ip=:ip
ON DUPLICATE KEY UPDATE
log_open_ip=:ip");
$sth->bindValue("mailingid", $_GET["mi"], PDO::PARAM_INT);
$sth->bindValue("klantid", $_GET["k"], PDO::PARAM_INT);
$sth->bindValue("ip", $ip, PDO::PARAM_STR); //TODO
Database::execute($sth);
// }
} else { //effen alles zonder iplandje... 13/2/2019
$timestamp = time();
// $sth = Database::prepare("INSERT into tube0712_log.mailing_log_kliks2 SET
// log_klik_mailing_id = :mailingid,
// log_klik_datum=:timestamp,
// log_klik_klant_id=:klantid,
// log_klik_url=:url,
// log_klik_uri =:uri,
// log_klik_ip=:ip");
// $sth->bindValue("mailingid", $_GET["mi"], PDO::PARAM_INT);
// $sth->bindValue("timestamp", $timestamp, PDO::PARAM_STR);
// $sth->bindValue("klantid", $_GET["k"], PDO::PARAM_INT);
// $sth->bindValue("url", $sURL, PDO::PARAM_STR);
// $sth->bindValue("uri", ($_SERVER['REDIRECT_HTTPS']=='on'?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'], PDO::PARAM_STR);
// $sth->bindValue("ip", $ip, PDO::PARAM_STR); //TODO
// Database::execute($sth);
}
//via de hash automatisch inloggenmail(
// if(($_SERVER['REMOTE_ADDR'] == Templater::getTuinadviesIp()) OR ($_SERVER['REMOTE_ADDR'] == Templater::getTuinadviesIpNL())){
// //niet automatisch inloggen
// }else{
// $profiel = Profiel::getProfielByHashKlantAutoLogin($_GET["mhash"], $_GET["k"]);
// //$profiel = Profiel::getProfielByHashAutoLogin($_GET["mhash"]);
// if(! empty($profiel['profiel_email'])){
// Profiel::inloggen($profiel['profiel_email'], $profiel['profiel_wachtwoord']);
// }
// }
}
if (isset($_GET["bannerfotoid"]) && ($_GET["bannerfotoid"] != '')) {
Banners::verhoogKliksBannerFoto($_GET["bannerfotoid"]);
}
/// ilse 2/5/2017 Profiel:isIngelogd -> query meerdere keren per pagina -> dit is niet nodig
// script 1 maal draaien per pagina en isIngelogd aanpassen
Profiel::isIngelogdCheckStatusValid();
//PROBEER AUTOMATISCH MET COOKIE IN TE LOGGEN
if (isset($_COOKIE['cookiegebruikersnaam']) && isset($_COOKIE['cookiewachtwoord']) && !Profiel::isIngelogd()) {
Profiel::inloggen($_COOKIE['cookiegebruikersnaam'], $_COOKIE['cookiewachtwoord']); //+setcookie preferedcountry
}
$_SESSION['testfrans'] = true;
$_SESSION['testparcelshop'] = true;
//pree($_SERVER['HTTP_HOST']);
//pree($_SERVER['REQUEST_URI']);
//if(isset($_GET["dsfsdf"])){
// echo $_GET["dsfsdf"];
//
// print_r($_COOKIE);
// print_r($_SERVER["REMOTE_ADDR"]);
//
// $ip = $_SERVER["REMOTE_ADDR"];
//
//// $opts = array('http'=>array('method'=>"GET"));
//// $context = stream_context_create($opts);
//// $res = file_get_contents('http://freegeoip.net/json/'.$ip, false, $context);
////
//// print_r($res);
////
// //https://ipstack.com/quickstart
//// $key = "27f7b2a59c826ba1afe655ac03418dd4";
//// $urlipstack = "http://api.ipstack.com/".$ip."?access_key=".$key;
////
//// $res = file_get_contents($urlipstack);
////
//// pre($res);
////
//// print_r($res["country_code"]);
//
//
// //https://ipstack.com/
// $ip = $_SERVER["REMOTE_ADDR"];
// $access_key = "27f7b2a59c826ba1afe655ac03418dd4";
// // Initialize CURL:
// $ch = curl_init('http://api.ipstack.com/'.$ip.'?access_key='.$access_key.'');
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// // Store the data:
// $json = curl_exec($ch);
// curl_close($ch);
// // Decode JSON response:
// $api_result = json_decode($json, true);
//
// pre($api_result);
// // Output the "capital" object inside "location"
// echo $api_result['country_code'];
//
//
//
// die();
//}
//if ($_SERVER['REMOTE_ADDR'] == Templater::getTuinadviesIp()) {
// $ip = $_SERVER["REMOTE_ADDR"];
// $ipInfo = grabIpInfo($ip);
// $ipJsonInfo = json_decode($ipInfo);
// $iplandcode = $ipJsonInfo->alpha2;
// echo $iplandcode;
// if( ($iplandcode=="NL") OR ($iplandcode=="BE") OR ($iplandcode=="DE") OR ($iplandcode=="FR")){
// $sCountry_code = $iplandcode;
// }else{
// //
// }
//}
if (isset($_GET["selectCountry"])) //taalwissel site -> niet redirecten!!!!
{
//een sessie toevoegen, want dit wil zeggen dat de gebruiker zelf heeft gekozen om naar een bepaalde taal te gaan
//in dat geval zal de automatische redirect uiteraard een ander land voorstellen dan wat bezocht wordt
//door deze sessie kunnen we de automatische redirect stoppen
$_SESSION['userSelectCountry'] = $_GET["selectCountry"];
//verder niks doen... op de pagina zal cookie worden gezet
} else {
if (!isset($_COOKIE['preferedcountry'])) { //via hierboven Profiel::inloggen misschien ook cookie gezet adhv landid klant indien correct ingevuld
$ip = $_SERVER["REMOTE_ADDR"];
if (strlen(trim($ip)) > 0) {
// $iplong = ip2long($ip);
// //$sth = Database::prepare('SELECT ip_landcode from tube0712_sitebe.ip2loc WHERE ip_ipstart <= :iplong AND ip_ipstop >= :iplong ');
// $sth = Database::prepare('SELECT ip_landcode from tube0712_sitebe.ip2loc2 WHERE ip_longstart <= :iplong AND ip_longstop >= :iplong ');
// $sth->bindValue("iplong", $iplong, PDO::PARAM_STR);
// Database::execute($sth);
// $iplandcode = trim(strtoupper($sth->fetchColumn(0)));
// if($iplandcode != ''){
// if( ($iplandcode=="NL") OR ($iplandcode=="DE") OR ($iplandcode=="FR")){
// $sCountry_code = $iplandcode;
// //mail("[email protected]", "test ip ".$iplandcode." ".$sCountry_code ." ".$ip, $ip.' lancode wel gevonden !!!! '.$_SERVER['HTTP_HOST'].' '.$_SERVER['REQUEST_URI'] . ' - sess.kl.id. '.$_SESSION['klant_land_id']);
// }else{
// //mail("[email protected]", "test ip NIET ".$iplandcode, $ip.' - lancode nie gevonden !!!! '.$_SERVER['HTTP_HOST'].' '.$_SERVER['REQUEST_URI'] . ' - sess.kl.id. '.$_SESSION['klant_land_id']);
// }
// }
$sCountry_code = '';
// $curl = curl_init();
// curl_setopt_array($curl, array(
// CURLOPT_URL => "https://freegeoip.app/json/".$ip,
// CURLOPT_RETURNTRANSFER => true,
// CURLOPT_ENCODING => "",
// CURLOPT_MAXREDIRS => 10,
// CURLOPT_TIMEOUT => 5,//max aantal seconden!!
// CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
// CURLOPT_CUSTOMREQUEST => "GET",
// CURLOPT_HTTPHEADER => array(
// "accept: application/json",
// "content-type: application/json"
// ),
// ));
// $response = curl_exec($curl);
// $err = curl_error($curl);
// curl_close($curl);
//
// //keer tellen hoeveel per uur -> testing
// //Admin::voegErrorLogToe("tellen hoeveel requests per uur", "testing - verwijderen aub!!");
//
// if ($err) {
// //echo "cURL Error #:" . $err;
// //Admin::voegErrorLogToe("ip api error", $err);
// //mail("[email protected]", "test ip ERR ".$err, $ip.' - lancode nie gevonden !!!! '.$_SERVER['HTTP_HOST'].' '.$_SERVER['REQUEST_URI'] . ' - sess.kl.id. '.$_SESSION['klant_land_id']);
// } else {
// $tmp = json_decode($response, true);
// $iplandcode = $tmp["country_code"];
//
// if( ($iplandcode=="NL") OR ($iplandcode=="BE") OR ($iplandcode=="DE") OR ($iplandcode=="FR")){
// $sCountry_code = $iplandcode;
// }else{
// // Admin::voegErrorLogToe("ander ip land", " ipland niet be/nl/de/fr ");
// // mail("[email protected]", "test ip NIET ".$iplandcode, $ip.' - lancode nie gevonden !!!! '.$_SERVER['HTTP_HOST'].' '.$_SERVER['REQUEST_URI'] . ' - sess.kl.id. '.$_SESSION['klant_land_id']);
// }
// }
// $ipInfo = grabIpInfo($ip);
// $ipJsonInfo = json_decode($ipInfo);
// $iplandcode = $ipJsonInfo->alpha2;
// $iplandcode1 = $iplandcode;
// if (($iplandcode == "NL") or ($iplandcode == "BE") or ($iplandcode == "DE") or ($iplandcode == "FR")) {
// $sCountry_code = $iplandcode;
// } else {
// // Admin::voegErrorLogToe("ander ip land mailing", " ipland niet be/nl/de/fr ");
// // mail("[email protected]", "test ip NIET ".$iplandcode, $ip.' - lancode nie gevonden !!!! '.$_SERVER['HTTP_HOST'].' '.$_SERVER['REQUEST_URI'] . ' - sess.kl.id. '.$_SESSION['klant_land_id']);
// }
//nie gevonden 2de poging
// if ($sCountry_code == '') {
// $s = file_get_contents('http://ip2c.org/' . $ip);//1;BE;BEL;Belgium
// $reply = explode(';', $s);
// $iplandcode = $reply[1];//2 letters
// if (($iplandcode == "NL") or ($iplandcode == "BE") or ($iplandcode == "DE") or ($iplandcode == "FR")) {
// // mail("[email protected]", " 1-".$iplandcode1."-".$iplandcode."-", $ip.' - lancode nie gevonden !!!! '.$_SERVER['HTTP_HOST'].' '.$_SERVER['REQUEST_URI'] . ' - sess.kl.id. '.$_SESSION['klant_land_id']);
// $sCountry_code = $iplandcode;
// } else {
// // mail("[email protected]", " 2--".$iplandcode."-", $ip.' - lancode nie gevonden !!!! '.$_SERVER['HTTP_HOST'].' '.$_SERVER['REQUEST_URI'] . ' - sess.kl.id. '.$_SESSION['klant_land_id']);
// }
// }
//$sCountry_code = $results["country_code"];// BE / FR / DE / empty
if ($sCountry_code == "BE")
$nTmpPreferedCountryID = 1; //belgie
elseif ($sCountry_code == "FR")
$nTmpPreferedCountryID = 5; //frankrijk
elseif ($sCountry_code == "DE")
$nTmpPreferedCountryID = 3; //duitsland
elseif ($sCountry_code == "NL")
$nTmpPreferedCountryID = 2; //nederland
// if ($_SERVER['REMOTE_ADDR'] == Templater::getTuinadviesIp()) {
//
// $afzenderNaam = my_mb_ucfirst(Templater::getWebshopNaam());
// $afzenderEmail = '[email protected]';
// $onderwerp = 'stest index !!!';
// $mailbody = '
';
// $mailbody .= " nTmpPreferedCountryID :".$nTmpPreferedCountryID. " host:".$_SERVER['HTTP_HOST']." uri:".$_SERVER['REQUEST_URI']."klantid:".$_SESSION['klant_land_id'];
// $ontvangerEmail = '[email protected]';
// $ontvangerNaam = 'ilse';
// $bijlage = '';
// Mail::sendMail($afzenderNaam, $afzenderEmail, $onderwerp, $mailbody, $ontvangerEmail, $ontvangerNaam, $bijlage);
// }
//enkel mogelijks wisselen tss franstalig (belgie en frans) -> assortiment is anders
//MATELMA
//no cookie - site:frankrijk - ip:belgie - profiel!=france -> wallonie
if (preg_match("/matelma\.com\/fr-fr/", $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) && ($nTmpPreferedCountryID == 1) && ($_SESSION['klant_land_id'] != 5)) {
//redirect
header("Location: https://" . str_replace('/fr-fr', '/be-fr', $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']));
exit();
//no cookie - site:wallonie - ip:france - profiel!=belgie -> france
} elseif (preg_match("/matelma\.com\/be-fr/", $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) && ($nTmpPreferedCountryID == 5) && ($_SESSION['klant_land_id'] != 1)) {
//redirect
header("Location: https://" . str_replace('/be-fr', '/fr-fr', $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']));
exit();
//no cookie - site:matelma(home) - ip:france - profiel!=belgie -> france
} elseif (preg_match("/matelma\.com/", $_SERVER['HTTP_HOST']) && ($_SERVER['REQUEST_URI'] == '/') && ($nTmpPreferedCountryID == 5) && ($_SESSION['klant_land_id'] != 1)) { //https://www.matelma.com
//redirect
header("Location: https://www.matelma.com/fr-fr");
exit();
//no cookie - site:matelma(home) - ip:belgie - profiel!=frankrijk -> wallonie
} elseif (preg_match("/matelma\.com/", $_SERVER['HTTP_HOST']) && ($_SERVER['REQUEST_URI'] == '/') && ($nTmpPreferedCountryID == 1) && ($_SESSION['klant_land_id'] != 5)) { //https://www.matelma.com
//redirect
header("Location: https://www.matelma.com/be-fr");
exit();
}/*elseif(preg_match("/matelma\.fr\/",$_SERVER['HTTP_HOST']) ){//https://www.matelma.com
pree($_SERVER['REQUEST_URI']);
die();
//redirect
// header("Location: https://www.matelma.com/be-fr");
// exit();
}*//*elseif(preg_match("/matelma\.fr\/",$_SERVER['HTTP_HOST']) && ($_SERVER['REQUEST_URI'] == '/') && ($nTmpPreferedCountryID==1) && ($_SESSION['klant_land_id']!=5)){//https://www.matelma.com
//redirect
header("Location: https://www.matelma.com/be-fr");
exit();
}*/
//TUINADVIES.BE
//no cookie - site:TA.be - ip:nederland - profiel!=belgie -> nederland
elseif (preg_match("/tuinadvies\.be/", $_SERVER['HTTP_HOST']) && ($nTmpPreferedCountryID == 2) && ($_SESSION['klant_land_id'] != 1)) {
// if ($_SERVER['REMOTE_ADDR'] == Templater::getTuinadviesIp()) {
//
// $afzenderNaam = my_mb_ucfirst(Templater::getWebshopNaam());
// $afzenderEmail = '[email protected]';
// $onderwerp = 'stest index !!!';
// $mailbody = '
';
// $mailbody .= " 111 Location: https://".str_replace('/tuinadvies.be/', '/tuinadvies.nl/', $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
// $ontvangerEmail = '[email protected]';
// $ontvangerNaam = 'ilse';
// $bijlage = '';
// Mail::sendMail($afzenderNaam, $afzenderEmail, $onderwerp, $mailbody, $ontvangerEmail, $ontvangerNaam, $bijlage);
// }
//redirect
header("Location: https://" . str_replace('tuinadvies.be/', 'tuinadvies.nl/', $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']));
exit();
} //no cookie - site:TA.nl - ip:belgie - profiel!=nederland -> TA.be
elseif (preg_match("/tuinadvies\.nl/", $_SERVER['HTTP_HOST']) && ($nTmpPreferedCountryID == 1) && ($_SESSION['klant_land_id'] != 2)) {
// if ($_SERVER['REMOTE_ADDR'] == Templater::getTuinadviesIp()) {
//
// $afzenderNaam = my_mb_ucfirst(Templater::getWebshopNaam());
// $afzenderEmail = '[email protected]';
// $onderwerp = 'stest index !!!';
// $mailbody = '
';
// $mailbody .= " 222 Location: https://".str_replace('/tuinadvies.nl/', '/tuinadvies.be/', $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
// $ontvangerEmail = '[email protected]';
// $ontvangerNaam = 'ilse';
// $bijlage = '';
// Mail::sendMail($afzenderNaam, $afzenderEmail, $onderwerp, $mailbody, $ontvangerEmail, $ontvangerNaam, $bijlage);
// }
//redirect
header("Location: https://" . str_replace('tuinadvies.nl/', 'tuinadvies.be/', $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']));
exit();
}
}
} elseif (isset($_COOKIE['preferedcountry']) && ($_COOKIE['preferedcountry'] == 1)) { // cookie:belgie
// cookie:belgie - site:france -> wallonie
if (preg_match("/matelma\.com\/fr-fr/", $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'])) {
header("Location: https://" . str_replace('/fr-fr', '/be-fr', $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']));
exit();
}
// cookie:belgie - site:nederland -> belgie
if (preg_match("/tuinadvies\.nl/", $_SERVER['HTTP_HOST'])) {
header("Location: https://" . str_replace('www.tuinadvies.nl', 'www.tuinadvies.be', $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']));
exit();
}
//cookie:belgie site:matelma.com -> be-fr //new
if (preg_match("/matelma\.com/", $_SERVER['HTTP_HOST']) && ($_SERVER['REQUEST_URI'] == '/')) {
header("Location: https://www.matelma.com/be-fr");
exit();
}
} elseif (isset($_COOKIE['preferedcountry']) && ($_COOKIE['preferedcountry'] == 5)) { // cookie:france
// cookie:france - site:wallonie -> france
if (preg_match("/matelma\.com\/be-fr/", $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'])) {
header("Location: https://" . str_replace('/be-fr', '/fr-fr', $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']));
exit();
}
//cookie:france site:matelma.com -> be-fr //new
if (preg_match("/matelma\.com/", $_SERVER['HTTP_HOST']) && ($_SERVER['REQUEST_URI'] == '/')) {
header("Location: https://www.matelma.com/fr-fr");
exit();
}
} elseif (isset($_COOKIE['preferedcountry']) && ($_COOKIE['preferedcountry'] == 2)) { // cookie:nederland
// cookie:nederland - site:belgie -> nederland
if (preg_match("/tuinadvies\.be/", $_SERVER['HTTP_HOST'])) {
header("Location: https://" . str_replace('www.tuinadvies.be', 'www.tuinadvies.nl', $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']));
exit();
}
//cookie:nederland site:matelma.com -> be-fr?? //new
if (preg_match("/matelma\.com/", $_SERVER['HTTP_HOST']) && ($_SERVER['REQUEST_URI'] == '/')) {
header("Location: https://www.matelma.com/be-fr");
exit();
}
} elseif (isset($_COOKIE['preferedcountry']) && ($_COOKIE['preferedcountry'] == 3)) { // cookie:duitsland
//cookie:nederland site:matelma.com -> be-fr?? //new
if (preg_match("/matelma\.com/", $_SERVER['HTTP_HOST']) && ($_SERVER['REQUEST_URI'] == '/')) {
header("Location: https://www.matelma.com/de-de");
exit();
}
} elseif (isset($_COOKIE['preferedcountry']) && ($_COOKIE['preferedcountry'] == 4)) { // cookie:luxemburg
//cookie:luxemburg site:matelma.com -> be-fr?? //new
if (preg_match("/matelma\.com/", $_SERVER['HTTP_HOST']) && ($_SERVER['REQUEST_URI'] == '/')) {
header("Location: https://www.matelma.com/de-de");
exit();
}
}
}
// AANPASSEN VAN EEN REACTIE (KAN OVERAL)
if ($_POST['actie'] == 'pasReactieAan' && Profiel::isIngelogd() && $_POST['reactieId'] > 0 && !empty($_POST['reactieVeld']) && !empty($_POST['reactieSoort'])) {
Profiel::pasReactieAan($_POST['reactieId'], $_POST['reactieVeld'], $_POST['reactieSoort']);
}
Profiel::log();
Controller::route();
if ((Templater::getIdPageContent() != 'tuinwinkel_winkelwagen') && (Templater::getIdPageContent() != 'tuinwinkel_product') && (Templater::getIdPageContent() != 'tuinadvies_encyclopedie')) { //niet op detail product
$_SESSION['last_overview_page'] = ($_SERVER['REDIRECT_HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; //terug naar overzicht
}
if ((Templater::getIdPageContent() != 'tuinadvies_zoeken') && (Templater::getIdPageContent() != 'tuinadvies_homepage'))
$_SESSION['last_selected_zone'] = Controller::getZone();
$uri_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$uri_segments = explode('/', $uri_path);
$sTmpLang = 'nl-BE';
if (Taal::getTaal() == 1) {
if ($_SERVER['HTTP_HOST'] == "tuinadvies.docker" || $_SERVER['HTTP_HOST'] == "tuinadvies.be") {
$sTmpLang = 'nl-BE';
} elseif ($_SERVER['HTTP_HOST'] == "tuinadvies.nl") {
$sTmpLang = 'nl-NL';
}
} elseif (Taal::getTaal() == 3) {
$sTmpLang = 'fr-BE';
if ($uri_segments[1] == "be-fr") {
$sTmpLang = 'fr-BE';
} elseif ($uri_segments[1] == "fr-fr") {
$sTmpLang = 'fr-FR';
}
} elseif (Taal::getTaal() == 4) {
$sTmpLang = 'de-DE';
}
if (Templater::getIdPageContent() == 'tuinadvies_homepage')
$bHomepage = true;
else
$bHomepage = false;
if (Templater::getIdPageContent() == 'tuinadvies_zoeken')
$bSearchPage = true;
else
$bSearchPage = false;
//NOINDEX, NOFOLLOW
if (
// matelma zoeken terug indexeren!
// ((Templater::getIdPageContent() == 'tuinadvies_zoeken') && (Taal::getTaal() == 4)) ////MATELMA ZOEKEN -> niet in google !!!!!
// or
(Templater::getIdPageContent() == "profiel_profiel") //mijn tuin -> niet in google!!!
or
(Templater::getIdPageContent() == "profiel_beoordeling") //beoordelingen
or
(Templater::getIdPageContent() == "admin_admin") //admin_admin
or
(Templater::getIdPageContent() == "tuinwinkel_mijnbestellingen") //
or
(Templater::getIdPageContent() == "tuinadvies_zoeken")
or
// (Templater::getIdPageContent() == "tuinadvies_encyclopedie2")
// or
stristr($_SERVER['SERVER_NAME'], 'avisjardin.com') //to test
or
// stristr($_SERVER['SERVER_NAME'], 'matelma.com')//to test
// or
stristr($_SERVER['SERVER_NAME'], 'matelma.nl') //to test
or
stristr($_SERVER['SERVER_NAME'], 'matelma.fr') //to test
or
stristr($_SERVER['SERVER_NAME'], 'matelma.be') //to test
) {
$noindexnofollow = "";
}
//canonical instellen
if (
(Templater::getIdPageContent() == "tuinadvies_encyclopedie2")
) {
Templater::setCanonicalUrl(Url::getTuinadviesEncyclopedie());
}
$manifest = Container::getManifest();
// automatisch klanten inloggen?
// Controleer of de URL een 32-delige hashstring bevat
if (preg_match('/\/([a-f0-9]{32})\b/i', $_SERVER['REQUEST_URI'], $matches)) {
// Extract de hashstring
$hash = $matches[1];
// Gebruik de hashstring om het profiel op te halen en automatisch in te loggen
$profielVanHash = Profiel::getProfielByHashAutoLogin($hash);
// Controleer of het profiel bestaat en de gebruiker kan worden ingelogd
if (!empty($profielVanHash['profiel_email'])) {
// Inloggen met behulp van profiel_email en profiel_wachtwoord
Profiel::inloggen($profielVanHash['profiel_email'], $profielVanHash['profiel_wachtwoord']);
//automatisch terugkeren naar huidige pagina:
$newURL = preg_replace('/\/[a-f0-9]{32}\b/i', '', $_SERVER['REQUEST_URI']);
if ($newURL !== $_SERVER['REQUEST_URI']) {
// Stuur de gebruiker door naar de bijgewerkte URL zonder de hash
//print("fwd naar $newURL
");
setcookie("preferedcountry", Taal::getLandId(), time() + 31556926, '/');
header("HTTP/1.1 301 Moved Permanently");
header("Location: " . $newURL);
//print("");
exit();
}
}
}
?>