"Alle rechten", "I" => "CMS Index", "N" => "Nieuwsposter", "F" => "Kan posts op het forum bewerken en verwijderen", "M" => "Overige forum moderatie opties"); $cd['access'] = array("all" => "A", "cms" => "I", "news" => "N", "forum" => "F", "fmod" => "M"); $cd['links'] = array("vergeten"=>array("url"=>"/vergeten","desc"=>"Wachtwoord vergeten"), "gegevens"=>array("url"=>"/profiel","desc"=>"Gegevens wijzigen"), "email"=>array("url"=>"/change/email","desc"=>"E-mail adres wijzigen"), "wachtwoord"=>array("url"=>"/change/password","desc"=>"Wachtwoord wijzigen"), "newuser"=>array("url"=>"/aanmelden/gebruiker","desc"=>"Aanmelden als gebruiker"), "newlocation"=>array("url"=>"/aanmelden/huiseigenaar","desc"=>"Aanmelden als huiseigenaar"), "managelocation"=>array("url"=>"/beheer","desc"=>"Lokaties beheren"), "addlocation"=>array("url"=>"/beheer/toevoegen","desc"=>"Lokatie toevoegen"), "addother"=>array("url"=>"/beheer/toevoegen","desc"=>"Andere lokatie toevoegen"), "otherpayment"=>array("url"=>"/beheer/pay","desc"=>"Andere betaalmethode proberen"), "home"=>array("url"=>"/","desc"=>"Begin pagina"), "changetype"=>array("url"=>"/profiel/type","desc"=>"Profiel wijzigen in lokatie beheerder"), "search"=>array("url"=>"/zoeken","desc"=>"Lokaties zoeken"), "otherlocation"=>array("url"=>"/beheer","desc"=>"Andere lokatie beheren")); $cd['months'] = array("","Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"); $db = new db(); $db->connect(); if (!isset($_GET['pn'])) $_GET['pn'] = "index"; if ($_GET['pn']=="beheer" || $_GET['pn']=="cms") $allowedHtml="
    1. "; else $allowedHtml=false; if (count($_POST)>0) $_POST = $this->cleanArray($_POST,$allowedHtml,($_GET['pn'] == "cms" ? false : true)); if (count($_GET)>0) $_GET = $this->cleanArray($_GET,$allowedHtml,($_GET['pn'] == "cms" ? false : true)); if ($session) session_start(); if ($user->loggedin()){ $my=$db->ass($db->q("SELECT u.user,u.name,u.password,u.type,u.email,p.privileges as rights,s.sessid,s.data FROM user u INNER JOIN user_type p ON u.user_type=p.id INNER JOIN user_session s ON s.user=u.user AND s.sessid='".$_SESSION['sessid']."' WHERE u.user='".$user->loginid()."'")); $my['ip']=$this->ip(); $my['data']=(!is_array(unserialize($my['data'])) ? array() : unserialize($my['data'])); if ($_GET['pn']!="error"){ $update_session = $db->upd("user_session",array("last"=>time(),"page"=>$_SERVER["REQUEST_URI"]),array("sessid"=>$_SESSION['sessid'])); } } else { $my=array(); if ($this->check_ip($this->ip())){ $my['sessid']=$user->initVisitor(); $my['ip']=$this->ip(); $my['data']=$db->getid("site_session","sessid",$my['sessid'],"data"); $my['data']=(!is_array(unserialize($my['data'])) ? array() : unserialize($my['data'])); } } if (IsSet($_COOKIE['vkl'])&&!IsSet($_SESSION['sessid'])&&$autologin){ list ($session,$password) = explode("|",$_COOKIE['vkl']); $password=base64_decode($password); $_SESSION['btr'] = $_SERVER['REQUEST_URI']; $user->loginfromcookie($session,$password); } if (IsSet($_GET['sef'])) $_GET['sef'] = current(explode(".",$_GET['sef'])); } function cleanArray($array,$allowedHtml=false,$stripHtml=true){ global $db_con; $newArray = array(); foreach ($array as $key => $val){ if (is_array($array[$key])) $newArray[$key] = $this->cleanArray($array[$key]); else if ( $key == 'fckvalue' || $key == 'regionval' ) $newArray[$key] = $val; else $newArray[$key]=($stripHtml ? mysqli_real_escape_string($db_con, strip_tags($val,$allowedHtml)) : addslashes($val)); } return $newArray; } function loadMyExtra(){ global $my, $db; //if ($my['type']=="location") $my=array_merge($my,$db->ass($db->q("SELECT surname,lastname,street,number,zipcode,city,country,phone,fax,website FROM user_location WHERE user = '".$my['user']."'"))); //else // $my=array_merge($my,$db->ass($db->q("SELECT country,city,realname FROM user_user WHERE user = '".$my['user']."'"))); } // //Zie .htaccess , vertaald de url naar variabelen via de 'qs' manier of 'qs2' manier (in .htaccess bepaald) // function qvar(){ //global $qvar; 10-1-2018 uitgezet, wat nou global... $qvar=''; if (isset($_GET['qs'])){ $i=0; $qvar=array(); foreach (explode("/",$_GET['qs']) as $var){ $qvar[$i]=$var; $i++; } } if (isset($_GET['qs2'])){ $i=0; $qvar=array(); foreach (explode("-",$_GET['qs2']) as $var){ $qvar[$i]=$var; $i++; } } return $qvar; } function backtrace(){ global $cd; $callers = debug_backtrace(); $callers = array_reverse($callers); $walkThrough = false; foreach ($callers as $key=>$callerId){ if ($callerId['function'] != "backtrace"){ $callerId['file'] = str_replace($cd['home'],"/",$callerId['file']); @$walkThrough .= " Functie ".$callerId['class'].$callerId['type'].$callerId['function']."()"." in ".$callerId['file'].":".$callerId['line']."
      "; } } return "

      Debug:
      ".$walkThrough; } function redir($url){ global $cd, $user; if (IsSet($cd['sessionCacheChanged'])) $user->writeSessionCache(); Header("Location: ".$url); exit(); } function kickBack(){ global $cd, $user; if (IsSet($cd['sessionCacheChanged'])) $user->writeSessionCache(); $this->redir((IsSet($_SESSION['btr']) ? $_SESSION['btr'] : "/")); } function ip (){ $ip=((IsSet($_SERVER['HTTP_X_FORWARDED_FOR'])) ? (($this->check_ip($_SERVER['HTTP_X_FORWARDED_FOR'])) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']) : $_SERVER['REMOTE_ADDR']); return $ip; } function iprange (){ $ip=$this->ip(); $ip=explode(".",$ip); unset($ip[3]); $ip=implode("",$ip); return $ip; } function check_ip($checkip) { if (filter_var(trim($checkip), FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { for ($i = 1; $i <= 3; $i++) { if (!(substr($checkip, 0, strpos($checkip, ".")) >= "0" && substr($checkip, 0, strpos($checkip, ".")) <= "255")) { return false; } $checkip = substr($checkip, strpos($checkip, ".") + 1); } if (!($checkip >= "0" && $checkip <= "255")) { return false; } } else { return false; } return true; } function range ($start,$end){ $range=array(); while ($start <= $end){ $range[]=$start; $start++; } return $range; } function str_split($text, $split = 1){ if (!is_string($text)) return false; if (!is_numeric($split) && $split < 1) return false; $len = strlen($text); $array = array(); $i = 0; while ($i < $len){ $key = NULL; for ($j = 0; $j < $split; $j += 1){ $key .= isset($text{$i}) ? $text{$i} : false; $i += 1; } $array[] = $key; } return $array; } function sessid ($user){ $char=$this->range("A","F"); $num=$this->range(0,9); $var=array_merge($char,$num); if ($user){ $user=$this->str_split($user,4); $user=implode("-",$user); } $sessid=false; $a=0; for ($i=0;$i<32;$i++){ if ($a==4){ $sessid.="-"; $a=0; } $sessid.=$var[rand(0,(count($var)-1))]; $a++; } if ($user) $sessid.="-".$user; return $sessid; } function gen_pkey(){ return implode("-",$this->str_split(strtoupper(substr(md5(uniqid(rand(), true)), 0, 16)),4)); } function pkey(){ global $db; while (true){ $pkey=$this->gen_pkey(); if ($db->count("user_pkey","pkey",$pkey)==0){ break; } } return $pkey; } function used_pkey($pkey){ global $db; return $db->q("DELETE FROM user_pkey WHERE pkey='".$pkey."'"); } function extractsession ($sessid){ $session=explode("-",$sessid); $user=false; foreach ($session as $i=>$chunk){ if ($i>7){ $user.=$chunk; } } $find=$this->range("A","F"); $replace=$this->range(0,9,2); $user=str_replace($find,$replace,$user); return $user; } function getSefUrl($name,$addHtml=false){ $search = explode(",","ç,æ,œ,á,é,í,ó,ú,à,è,ì,ò,ù,ä,ë,ï,ö,ü,ÿ,â,ê,î,ô,û,å,e,i,ø,u,Ç,Æ,Œ,?,É,?,Ó,Ú,À,È,Ì,Ò,Ù,Ä,Ë,?,Ö,Ü,Ÿ,Â,Ê,Î,Ô,Û,Å,E,I,Ø,U"); $search[] = "&"; $replace = explode(",","c,ae,oe,a,e,i,o,u,a,e,i,o,u,a,e,i,o,u,y,a,e,i,o,u,a,e,i,o,u,C,AE,OE,A,E,I,O,U,A,E,I,O,U,A,E,I,O,U,Y,A,E,I,O,U,A,E,I,O,U"); $replace[] = "en"; $name = str_replace($search, $replace, $name); //return strtolower(ereg_replace("[^A-Za-z0-9_-]","",str_replace(" ","_",$name))).($addHtml ? ".html" : false); return strtolower(preg_replace("/[^A-Za-z0-9_]/","",str_replace(" ","_",$name))).($addHtml ? ".html" : false); //return strtolower(ereg_replace("(^[_a-z0-9-])","\\1",str_replace(" ","_",$name))).($addHtml ? ".html" : false); } function getCurrentUrl(){ return current(explode("?",$_SERVER['REQUEST_URI'])); } function resizeImage($fileName,$realName,$fileId,$isThumb=false,$sz=238,$isSite=false) { global $cd; $extension = explode(".",$realName); $extension=strtolower(end($extension)); if (preg_match("/^jpg|jpeg/",$extension)){ $im = imagecreatefromjpeg($fileName); } elseif (preg_match("/^gif/",$extension)){ $im = imagecreatefromgif($fileName); } elseif (preg_match("/^png/",$extension)){ $im = imagecreatefrompng($fileName); } else { return false; } if (!$im) { return false; } $x=imageSX($im); $im_width=$x; $y=imageSY($im); $im_height=$y; if ($x > $y){ if ($x > $sz){$y = round($y / $x * $sz); $x = $sz;} } else { if($y > $sz){$x = round($x / $y * $sz); $y=$sz;} } $new_im=imagecreatetruecolor($x,$y); ImageCopyResized($new_im, $im, 0, 0, 0, 0, $x, $y, $im_width, $im_height); $imageConvert=Imagejpeg($new_im,$cd['store'].($isSite ? "/site/" : false).($isThumb ? "/thumbs/" : false)."/".$fileId.".jpg",100); ImageDestroy($new_im); # $command = "/usr/bin/convert '" . $fileName . "' -resize ".$x."x".$y." '" . $cd['store'].($isSite ? "/site/" : false).($isThumb ? "/thumbs/" : false)."/".$fileId.".jpg'"; # $system = exec($command,$ret); return true; } function mail($to,$subject,$text,$senderName="Vakantielocaties.nl",$senderEmail="no-reply@vakantielocaties.nl"){ global $tpl; $text=$tpl->mail($subject,$text); $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\n"; $headers .= "X-Priority: 3\n"; $headers .= "X-MSMail-Priority: Normal\n"; $headers .= "X-Mailer: Microsoft Office Outlook, Build 11.0.6353\n"; $headers .= "X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180\n"; $headers .= "From: \"{$senderName}\" <{$senderEmail}>\n"; return mail($to,$subject,$text,$headers); } function random_char($type){ $lenght = sizeof($type); $position = mt_rand(0, $lenght-1); return($type[$position]); } function password(){ mt_srand((double)microtime() * 1000000); $vowel = array("b","d","f","g","h","j","k","l","m","n","p","r","s","t","v","w","x","z"); $doublevowel = array("bl","br","cl","cr","dr","fl","fr","gl","gn","gr","kl","kn","kr", "ph", "pr", "sh", "sj", "sk", "sl", "sm", "sn", "sp", "st", "tr", "vl", "vr", "zw"); $consonant = array("a","e","i","o","u"); $number = array("1","2","3","4","5","6","7","8","9","0"); $password = ""; $password .= $this->random_char($doublevowel); $password .= $this->random_char($consonant); $password .= $this->random_char($vowel); $password .= $this->random_char($consonant); $password .= $this->random_char($vowel); $password .= $this->random_char($number); $password .= $this->random_char($number); return $password; } function shortText($text,$maxlength){ if (strlen($text) > $maxlength){ $chars=$maxlength / 2; $begin=substr($text,0,$chars); $end=substr($text,(strlen($text) - $chars)); $text=$begin."(...)".$end; } return $text; } function getCurrentRange($prefix="r"){ $range = range("a","z"); $range[] = "0"; $currentChar= false; //was... $myQs = explode("&",end(explode("?", $req_uri))); $myQs = explode("?", $_SERVER['REQUEST_URI']); $myQs = explode("&",end($myQs)); $myQs = array_map('strtolower', $myQs); foreach ($myQs as $myStr) if (substr($myStr,0,1) == $prefix && in_array(strtolower(substr($myStr,1,1)),$range)) return strtolower(substr($myStr,1,1)); return $currentChar; } function getCurrentPage($prefix="p"){ $currentChar = false; //oud: $myQs = explode("&",end(explode("?",$_SERVER['REQUEST_URI']))); $myQs = explode("?", $_SERVER['REQUEST_URI']); $myQs = explode("&",end($myQs)); $myQs = array_map('strtolower', $myQs); foreach ($myQs as $myStr) if (substr($myStr,0,1) == $prefix) return substr($myStr,1,(strlen($myStr) - 1)); return $currentChar; } //lokatienaam, plaatsnaam, e.d. function properName($value) { return htmlentities(stripslashes($value)); } function trueDate($timestamp,$time=false,$type="short", $bAlways = false){ $today=mktime(0,0,0,date('m'),date('d'),date('Y')); $yesterday=$today - 86400; $tomorrow=$today + 86400; $datomorrow=$today + (86400 * 2); $future=$today + (86400 * 3); if ($type == "short"){ $day = "%a."; $month = "%b."; $year = "'%y"; } elseif ($type == "long"){ $day = "%A"; $month = "%B"; $year = "%Y"; } if ($timestamp < $today || $timestamp > $future || $bAlways) return ucfirst(strftime("{$day} %e {$month} {$year}".($time ? " om %H:%M" : false),$timestamp)); //return ($timestamp > $future ? ($timestamp > $datomorrow ? ($timestamp > $tomorrow ? "Morgen" : "Overmorgen") : false) : (($timestamp > $yesterday) ? (($timestamp > $today) ? "Vandaag".($time ? " om ".date('H:i:s',$timestamp) : false) : "Gisteren".($time ? " om ".date('H:i:s',$timestamp) : false)) : ucfirst(strftime("{$day} %e {$month} {$year}".($time ? " om %H:%M" : false),$timestamp)))); } function wordWrap($text,$maxChars=100){ $words = explode(" ",$text); $total = 0; $return = false; foreach ($words as $key=>$word){ $total+=strlen($word) + 1; if ($total > $maxChars){ $parts = array_chunk($words,$key); $return = implode(" ",$parts[0]); break; } } if (!$return){ $return = $text; } return $return; } function format($number,$round=0){ return number_format($number, $round, ',', '.'); } } header ('Content-type: text/html; charset=ISO-8859-1'); ?> init(); $tpl = new tpl(); $tpl->begin(); @list($var1,$var2,$var3,$var4) = $core->qvar(); $qid = (isset($_GET['qid'])?(int)$_GET['qid']:''); //nieuwe sefs : ID toevoegen bij plaatsen en provincies omdat er dubbele zijn //bijv: beuningen in Gelderland en Overijsel of Limburg in Belgie en Nederland //Landen en continenten niet die zijn er maar 1. /*echo "*1[".$var1."]*"; echo "*[".$var2."]*"; echo "*[".$var3."]*"; echo "*[".$var4."]*"; echo "*[".$_GET['sef']."]*"; echo "*QID[".$qid."]*
      ";*/ //nieuwe sef url: /****-****-****/ $newsef=false; if ($db->count("location_categories","sefurl",$var1) > 0) { $newsef=true; $tmp = $var1; $var1 = $var2; $var2 = $var3; $var3 = $var4; if (empty($var1)) { $var1 = (isset($_GET['sef']))?$_GET['sef']:''; } elseif (empty($var2)) { $var2 = (isset($_GET['sef']))?$_GET['sef']:''; } elseif (empty($var3)) { $var3 = (isset($_GET['sef']))?$_GET['sef']:''; } elseif (empty($var4)) { $var4 = (isset($_GET['sef']))?$_GET['sef']:''; } $_GET['sef'] = $tmp; } //nieuwe sef url: "/europa/" if (empty($_GET['sef'])) { $_GET['sef'] = $var1; $var1 = ''; $newsef=true; } //"Geen voorkeur" bestemming if ($_GET['sef'] == 'vakantie') { unset($_GET['sef']); } /* echo "*2[".$var1."]*"; echo "*[".$var2."]*"; echo "*[".$var3."]*"; echo "*[".$var4."]*"; echo "*[".$_GET['sef']."]*"; echo "*QID[".$qid."]*
      ";*/ $isGeo = (IsSet($_GET['sef']) ? ($db->count("location_categories","sefurl",$_GET['sef']) > 0 ? false : true) : false); if (!$newsef) { //OUDE sef if ($isGeo) $requestedExists = ($db->count("base_continent","sefurl",(!empty($var1) ? $var1 : $_GET['sef'])) > 0 ? true : false); else $requestedExists = true; $eSef = (!$isGeo && (!empty($var1) || !empty($_GET['sef'])) ? "/".$_GET['sef'] : false); } else { //NIEUWE sef $requestedExists = true; if (isset($_GET['sef']) && $db->count("location_categories","sefurl",$_GET['sef']) > 0) { $eSef = $_GET['sef'] . "-"; } else { $eSef = false; } } if ($requestedExists || (!isset($_GET['sef']) && empty($var1))){ //new voorbereiding (ID nog meegeven ivm dubbele plaatsen zoals beuningen) if ($newsef) { if (empty($var1)) { if (isset($_GET['sef']) && $db->count("base_continent","sefurl",$_GET['sef']) > 0) { // } elseif (isset($_GET['sef']) && $db->count("base_country","sefurl",$_GET['sef']) > 0) { $continentId = $db->result($db->q("SELECT region FROM base_country WHERE sefurl = '" . $_GET['sef'] . "'" ) ); $var1 = $db->result($db->q("SELECT sefurl FROM base_continent WHERE id = '" . $continentId . "'" ) ); } elseif (isset($_GET['sef']) && $db->count("base_state","sefurl",$_GET['sef']) > 0) { $countryId = $db->result($db->q("SELECT country_id FROM base_state WHERE id = '" . $qid . "'" ) ); $var2 = $db->result($db->q("SELECT sefurl FROM base_country WHERE id = '" . $countryId . "'" ) ); $continentId = $db->result($db->q("SELECT region FROM base_country WHERE id = '" . $countryId . "'" ) ); $var1 = $db->result($db->q("SELECT sefurl FROM base_continent WHERE id = '" . $continentId . "'" ) ); } else { $stateId = $db->result($db->q("SELECT state_id FROM base_city WHERE id = '" . $qid . "'" ) ); $var3 = $db->result($db->q("SELECT sefurl FROM base_state WHERE id = '" . $stateId . "'" ) ); $countryId = $db->result($db->q("SELECT country_id FROM base_state WHERE id = '" . $stateId . "'" ) ); $var2 = $db->result($db->q("SELECT sefurl FROM base_country WHERE id = '" . $countryId . "'" ) ); $continentId = $db->result($db->q("SELECT region FROM base_country WHERE id = '" . $countryId . "'" ) ); $var1 = $db->result($db->q("SELECT sefurl FROM base_continent WHERE id = '" . $continentId . "'" ) ); } } elseif (empty($var2)) { if ($db->count("base_continent","sefurl",$var1) > 0) { } elseif ($db->count("base_country","sefurl",$var1) > 0) { $continentId = $db->result($db->q("SELECT region FROM base_country WHERE sefurl = '" . $var1 . "'" ) ); $var2 = $var1; $var1 = $db->result($db->q("SELECT sefurl FROM base_continent WHERE id = '" . $continentId . "'" ) ); } elseif ($db->count("base_state","sefurl",$var1) > 0) { $countryId = $db->result($db->q("SELECT country_id FROM base_state WHERE id = '" . $qid . "'" ) ); $var3 = $var1; $var2 = $db->result($db->q("SELECT sefurl FROM base_country WHERE id = '" . $countryId . "'" ) ); $continentId = $db->result($db->q("SELECT region FROM base_country WHERE id = '" . $countryId . "'" ) ); $var1 = $db->result($db->q("SELECT sefurl FROM base_continent WHERE id = '" . $continentId . "'" ) ); } else { $stateId = $db->result($db->q("SELECT state_id FROM base_city WHERE id = '" . $qid . "'" ) ); $var4 = $var1; $var3 = $db->result($db->q("SELECT sefurl FROM base_state WHERE id = '" . $stateId . "'" ) ); $countryId = $db->result($db->q("SELECT country_id FROM base_state WHERE id = '" . $stateId . "'" ) ); $var2 = $db->result($db->q("SELECT sefurl FROM base_country WHERE id = '" . $countryId . "'" ) ); $continentId = $db->result($db->q("SELECT region FROM base_country WHERE id = '" . $countryId . "'" ) ); $var1 = $db->result($db->q("SELECT sefurl FROM base_continent WHERE id = '" . $continentId . "'" ) ); } } } //end new if (!isset($_GET['sef']) && empty($var1)){ $goTo = "continent"; } elseif ($isGeo){ if (empty($var1)) $goTo = "country"; elseif (empty($var2)) $goTo = "state"; elseif (empty($var3)) $goTo = "city"; else $goTo = "show"; } else { if (empty($var1)) $goTo = "continent"; elseif (empty($var2)) $goTo = "country"; elseif (empty($var3)) $goTo = "state"; elseif (empty($var4)) $goTo = "city"; else $goTo = "show"; } if ($goTo == "show"){ //plaats nivo $continentId = $db->getid("base_continent","sefurl",$var1); $countryId = $db->getid("base_country","sefurl",$var2); $stateId = $db->result($db->q("SELECT id FROM base_state WHERE country_id = '" . $countryId . "' AND sefurl = '" . $var3 . "'" ) ); //oud sef wijze //$cityId = $db->result($db->q("SELECT id FROM base_city WHERE country_id = '" . $countryId . "' AND sefurl = '" .($isGeo ? $_GET['sef'] : $var4) . "'" ) ); //nieuwe sef wijze $cityId = $qid; if (!$isGeo) $categoryId = $db->getid("location_categories","sefurl",$_GET['sef']); if ($continentId && $countryId && $stateId && $cityId){ $continentName = $db->getid("base_continent","sefurl",$var1,"name"); $countryName = $db->getid("base_country","sefurl",$var2,"name"); $stateName = $db->getid("base_state","sefurl",$var3,"name"); $stateID = $db->getid("base_state","sefurl",$var3,"id"); $cityName = $db->getid("base_city","sefurl",($isGeo ? $_GET['sef'] : $var4),"name"); if (!$isGeo) $catName = $db->getid("location_categories","sefurl",$_GET['sef'],"name"); $broodkruimel = array(); if (!$isGeo) $broodkruimel[$catName] = "/".$_GET['sef']."/"; $broodkruimel[$continentName] = "/".$eSef.$var1."/"; $broodkruimel[$countryName] = "/".$eSef.$var2."/"; $broodkruimel[$stateName] = "/".$eSef.$var3."-".$stateID."/"; $broodkruimel[$cityName] = "/".$eSef.(!empty($var4) ? $var4 : $_GET['sef'])."-".$qid."/"; echo $tpl->createRange(true,(!$isGeo) ? $categoryId : false, null, (!empty($var4) ? $var4 : $_GET['sef'])."-".$cityId); $currentRange = $core->getCurrentRange(); $currentPage = $core->getCurrentPage(); if (!$currentPage) $currentPage = 0; $start = $cd['fpp'] * $currentPage; $rows = $db->rows($db->q("SELECT l.id FROM location l INNER JOIN location_category c ON c.location_id = l.id ".(!$isGeo ? "AND c.category_id = '".$categoryId."'" : false)." WHERE l.city = '".$cityId."'".($currentRange ? " AND l.active = 'Y' AND LEFT(l.sefurl,1) = '".$currentRange."'" : false))); if ($rows > 0){ $locations = $db->q("SELECT l.id,l.name,l.user,l.contract,l.sefurl,l.subdomain,l.capacity,l.added,l.updated,p.id imageid,cn.name AS catname, bc.name as city FROM location l LEFT JOIN location_photos p ON l.id = p.location INNER JOIN location_description d ON d.id = l.id INNER JOIN base_city bc ON bc.id = l.city LEFT JOIN location_category c ON c.location_id = l.id ".(!$isGeo ? "AND c.category_id = '".$categoryId."'" : false)." LEFT JOIN location_categories cn ON cn.id = c.category_id INNER JOIN user u ON u.user = l.user WHERE city = '".$cityId."' AND l.active = 'Y'".($currentRange ? " AND LEFT(l.sefurl,1) = '".$currentRange."'" : false)." GROUP BY l.id LIMIT {$start},{$cd['fpp']}"); echo $tpl->showLocations($locations); //navigatie van lokaties op plaats nivo if ($rows > $cd['lpp']) { echo $tpl->ehead().$tpl->pagenav($rows,$core->getCurrentUrl()."?".($core->getCurrentRange() ? "r".$core->getCurrentRange()."&" : false)."{page}",$core->getCurrentPage()).$tpl->foot(); } } else { echo $tpl->ehead(); echo "Er zijn helaas geen lokaties gevonden die voldoen aan uw criteria."; echo $tpl->foot(); } } else $tpl->err_replace(INVALID_ACTION); } elseif ($goTo == "continent"){ ?> getid("location_categories","sefurl",substr($eSef, 0, -1),"name"); $content = substr($eSef, 0, -1); } ?>


      Warning: Undefined variable $title in /home/deb8762n2/domains/vakantielocaties.nl/public_html/lokaties.php on line 257

      getid("site_static","sefurl",$content,"content"); ?>
      count("base_continent","sefurl",(!empty($var1) ? $var1 : $_GET['sef'])) == 0) $tpl->err_replace(INVALID_ACTION); if (!$isGeo) $categoryId = $db->getid("location_categories","sefurl",$_GET['sef']); $continentId = $db->getid("base_continent","sefurl",(!empty($var1) ? $var1 : $_GET['sef'])); $continentName = $db->getid("base_continent","sefurl",(!empty($var1) ? $var1 : $_GET['sef']),"name"); if (!$isGeo) $catName = $db->getid("location_categories","sefurl",substr($eSef, 0, -1),"name"); $broodkruimel=array(); !empty($eSef)?$broodkruimel[$catName] = "/".substr($eSef, 0, -1)."/":false; $broodkruimel[$continentName] ="/".$eSef.(!empty($var1) ? $var1 : $_GET['sef'])."/"; echo $tpl->createRange(true,(!$isGeo) ? $categoryId : false, null, (!empty($var1) ? $var1 : $_GET['sef'])); $currentRange = $core->getCurrentRange(); $currentPage = $core->getCurrentPage(); if (!$currentPage) $currentPage = 0; $start = $cd['fpp'] * $currentPage; $locations = "(SELECT COUNT(1) FROM location".(!$isGeo ? " LEFT JOIN location_category r ON r.category_id = '".$categoryId."' AND location.id = r.location_id " : false)." WHERE active = 'Y' AND country = c.id".(!$isGeo ? " AND r.id IS NOT NULL" : false).") as locations"; $rows = $db->rows($db->q("SELECT COUNT(c.id) as aantal,{$locations} FROM base_country c WHERE region = '".$continentId."'".($currentRange ? " AND LEFT(sefurl,1) = '".$currentRange."'" : false)." GROUP BY c.id HAVING locations > 0")); if ($rows > 0){ $countries = $db->q("SELECT c.name,c.code2,c.sefurl,{$locations} FROM base_country c WHERE region = '".$continentId."'".($currentRange ? " AND LEFT(sefurl,1) = '".$currentRange."'" : false)." HAVING locations > 0 LIMIT {$start},{$cd['fpp']}"); ?> ass($countries)){ //oude sef: //$url = "/lokaties/".(!empty($var1) ? $var1 : $_GET['sef'])."/".$country['sefurl'].$eSef.".html"; //nieuwe sef: $url = "/" . $eSef . $country['sefurl']."/"; $alt_title = (empty($eSef)?'Vakantie':substr($eSef,0,-1)) . " in " . strtolower($country['name']); ?>
        Land Lokaties
      <br />
<b>Warning</b>:  Undefined variable $alt_title in <b>/home/deb8762n2/domains/vakantielocaties.nl/public_html/lokaties.php</b> on line <b>308</b><br />
 in <br />
<b>Warning</b>:  Undefined variable $country in <b>/home/deb8762n2/domains/vakantielocaties.nl/public_html/lokaties.php</b> on line <b>308</b><br />
<br />
<b>Warning</b>:  Trying to access array offset on value of type null in <b>/home/deb8762n2/domains/vakantielocaties.nl/public_html/lokaties.php</b> on line <b>308</b><br />
      Warning: Undefined variable $country in /home/deb8762n2/domains/vakantielocaties.nl/public_html/lokaties.php on line 309

      Warning: Trying to access array offset on value of type null in /home/deb8762n2/domains/vakantielocaties.nl/public_html/lokaties.php on line 309

      Warning: Undefined variable $country in /home/deb8762n2/domains/vakantielocaties.nl/public_html/lokaties.php on line 310

      Warning: Trying to access array offset on value of type null in /home/deb8762n2/domains/vakantielocaties.nl/public_html/lokaties.php on line 310
      $cd['fpp']) { echo $tpl->ehead().$tpl->pagenav($rows,$core->getCurrentUrl()."?".($core->getCurrentRange() ? "r".$core->getCurrentRange()."&" : false)."{page}",$core->getCurrentPage()).$tpl->foot(); } // Voorlopige resultaten $currentPage = $core->getCurrentPage("l"); if (!$currentPage) $currentPage = 0; $rows2 = $db->rows($db->q("SELECT l.id,l.name,l.user,l.contract,l.sefurl,l.subdomain,l.capacity,l.added,l.updated,p.id imageid,cn.name AS catname FROM location l LEFT JOIN location_photos p ON l.id = p.location INNER JOIN location_description d ON d.id = l.id INNER JOIN base_country gc ON gc.id = l.country INNER JOIN location_category c ON c.location_id = l.id ".(!$isGeo ? "AND c.category_id = '".$categoryId."'" : false)." LEFT JOIN location_categories cn ON cn.id = c.category_id INNER JOIN user u ON u.user = l.user WHERE gc.region = '".$continentId."' AND l.active = 'Y'".($currentRange ? " AND LEFT(gc.sefurl,1) = '".$currentRange."'" : false)." GROUP BY l.id")); $rows2Temp = $rows2; # new range? if ( ! isset ( $_SESSION['ses_range'] ) || $_SESSION['ses_range'] != $goTo . $_GET['sef'] . $var1 . $var2 . $var3 . $var4 ) { $_SESSION['ses_range'] = $goTo.$_GET['sef'].$var1.$var2.$var3.$var4; $_SESSION['ses_range_list'] = array(); $iStart = 0; do { if ( $rows2Temp <= $cd['lpp'] ) break; $_SESSION['ses_range_list'][] = $iStart; $iStart += $cd['lpp']; $rows2Temp -= $cd['lpp']; } while ( true ); shuffle($_SESSION['ses_range_list']); $_SESSION['ses_range_list'][] = $iStart; } $start = $_SESSION['ses_range_list'][$currentPage]; echo "

      Populaire lokaties in ".$continentName."

      "; $locations = $db->q("SELECT l.id,l.name,l.user,l.contract,l.sefurl,l.subdomain,l.capacity,l.added,l.updated,p.id imageid,cn.name AS catname, bc.name AS city FROM location l LEFT JOIN location_photos p ON l.id = p.location INNER JOIN location_description d ON d.id = l.id INNER JOIN base_country gc ON gc.id = l.country INNER JOIN base_city bc ON bc.id = l.city INNER JOIN location_category c ON c.location_id = l.id ".(!$isGeo ? "AND c.category_id = '".$categoryId."'" : false)." LEFT JOIN location_categories cn ON cn.id = c.category_id INNER JOIN user u ON u.user = l.user WHERE gc.region = '".$continentId."' AND l.active = 'Y'".($currentRange ? " AND LEFT(gc.sefurl,1) = '".$currentRange."'" : false)." GROUP BY l.id LIMIT {$start},{$cd['lpp']}"); $rows = $db->rows($locations); if ($rows > 0){ echo $tpl->showLocations($locations); //navigatie van lokaties op continent nivo if ($rows2 > $cd['lpp']) { echo $tpl->ehead().$tpl->pagenav($rows2,$core->getCurrentUrl()."?".($core->getCurrentRange() ? "r".$core->getCurrentRange()."&" : false)."{page}",$core->getCurrentPage("l"),true,false,$cd['lpp'],"l").$tpl->foot(); } } else { echo $tpl->econtent("Er zijn helaas geen voorlopige resultaten beschikbaar."); } } else { echo $tpl->econtent(NO_RESULTS); } } elseif($goTo == "state"){ /* Land-nivo met lijstweergave van provincies */ if ($db->count("base_country","sefurl",($isGeo ? $_GET['sef'] : $var2)) == 0) $tpl->err_replace(INVALID_ACTION); if (!$isGeo) $categoryId = $db->getid("location_categories","sefurl",$_GET['sef']); $continentId = $db->getid("base_continent","sefurl",$var1); $continentName = $db->getid("base_continent","sefurl",$var1,"name"); $countryId = $db->getid("base_country","sefurl",($isGeo ? $_GET['sef'] : $var2)); $countryName = $db->getid("base_country","sefurl",($isGeo ? $_GET['sef'] : $var2),"name"); if (!$isGeo) $catName = $db->getid("location_categories","sefurl",substr($eSef, 0, -1),"name"); !empty($eSef)?$broodkruimel[$catName] = "/".substr($eSef, 0, -1)."/":false; $broodkruimel[$continentName] ="/".$eSef.$var1."/"; $broodkruimel[$countryName] = "/".$eSef.(!empty($var2) ? $var2 : $_GET['sef'])."/"; //$broodkruimel=array($continentName=>"/lokaties/".$var1.".html",$countryName=>"/lokaties/".$var1."/".($isGeo ? $_GET['sef'] : $var2).".html"); echo $tpl->createRange(true,(!$isGeo) ? $categoryId : false, null, (!empty($var2) ? $var2 : $_GET['sef'])); $currentRange = $core->getCurrentRange(); $currentPage = $core->getCurrentPage(); if (!$currentPage) $currentPage = 0; $start = $cd['fpp'] * $currentPage; $locations = "(SELECT COUNT(1) FROM location".(!$isGeo ? " LEFT JOIN location_category r ON r.category_id = '".$categoryId."' AND location.id = r.location_id " : false)." WHERE active = 'Y' AND state = s.id".(!$isGeo ? " AND r.id IS NOT NULL" : false)." AND active = 'Y') as locations"; $rows = $db->rows($db->q("SELECT COUNT(1),{$locations} FROM base_state s WHERE country_id = '".$countryId."'".($currentRange ? " AND LEFT(sefurl,1) = '".$currentRange."'" : false)." GROUP BY s.id HAVING locations > 0")); if ($rows > 0){ //$states = $db->q("SELECT s.name,s.id,s.sefurl,{$locations},(SELECT COUNT(1) FROM location WHERE state = s.id AND active = 'Y') as availcities FROM base_state s WHERE s.country_id = '".$countryId."' ".($currentRange ? " AND LEFT(sefurl,1) = '".$currentRange."'" : false)." HAVING locations > 0 ORDER BY s.name ASC LIMIT {$start},{$cd['fpp']}"); $states = $db->q("SELECT s.name,s.id,s.sefurl,{$locations} FROM base_state s WHERE s.country_id = '".$countryId."' ".($currentRange ? " AND LEFT(sefurl,1) = '".$currentRange."'" : false)." HAVING locations > 0 ORDER BY s.name ASC LIMIT {$start},{$cd['fpp']}"); ?> ass($states)){ //oude sef: //$url = "/lokaties/".$var1."/".($isGeo ? $_GET['sef'] : $var2)."/".$state['sefurl'].$eSef.".html"; //nieuwe sef: $url = "/".$eSef. $state['sefurl'] ."-".$state['id']."/"; ?>
      Regio Lokaties

      Warning: Undefined variable $state in /home/deb8762n2/domains/vakantielocaties.nl/public_html/lokaties.php on line 439

      Warning: Trying to access array offset on value of type null in /home/deb8762n2/domains/vakantielocaties.nl/public_html/lokaties.php on line 439

      Warning: Undefined variable $state in /home/deb8762n2/domains/vakantielocaties.nl/public_html/lokaties.php on line 440

      Warning: Trying to access array offset on value of type null in /home/deb8762n2/domains/vakantielocaties.nl/public_html/lokaties.php on line 440
      $cd['fpp']) { echo $tpl->ehead().$tpl->pagenav($rows,$core->getCurrentUrl()."?".($core->getCurrentRange() ? "r".$core->getCurrentRange()."&" : false)."{page}",$core->getCurrentPage()).$tpl->foot(); } // Voorlopige resultaten $currentPage = $core->getCurrentPage("l"); if (!$currentPage) $currentPage = 0; $rows2 = $db->rows($db->q("SELECT l.id,l.name,l.user,l.contract,l.sefurl,l.subdomain,l.capacity,l.added,l.updated,p.id imageid,cn.name AS catname FROM location l LEFT JOIN location_photos p ON l.id = p.location INNER JOIN location_description d ON d.id = l.id INNER JOIN base_state gs ON gs.id = l.state INNER JOIN location_category c ON c.location_id = l.id ".(!$isGeo ? "AND c.category_id = '".$categoryId."'" : false)." LEFT JOIN location_categories cn ON cn.id = c.category_id INNER JOIN user u ON u.user = l.user WHERE l.country = '".$countryId."' AND l.active = 'Y'".($currentRange ? " AND LEFT(gs.sefurl,1) = '".$currentRange."'" : false)." GROUP BY l.id")); $rows2Temp = $rows2; # new range? if ( ! isset ( $_SESSION['ses_range'] ) || $_SESSION['ses_range'] != $goTo . $_GET['sef'] . $var1 . $var2 . $var3 . $var4 ) { $_SESSION['ses_range'] = $goTo.$_GET['sef'].$var1.$var2.$var3.$var4; $_SESSION['ses_range_list'] = array(); $iStart = 0; do { if ( $rows2Temp <= $cd['lpp'] ) break; $_SESSION['ses_range_list'][] = $iStart; $iStart += $cd['lpp']; $rows2Temp -= $cd['lpp']; } while ( true ); shuffle($_SESSION['ses_range_list']); $_SESSION['ses_range_list'][] = $iStart; } $start = $_SESSION['ses_range_list'][$currentPage]; echo "

      Populaire lokaties in ".$countryName."

      "; $locations = $db->q("SELECT l.id,l.name,l.user,l.contract,l.sefurl,l.subdomain,l.capacity,l.added,l.updated,p.id imageid,cn.name AS catname, bc.name AS city FROM location l LEFT JOIN location_photos p ON l.id = p.location INNER JOIN location_description d ON d.id = l.id INNER JOIN base_state gs ON gs.id = l.state INNER JOIN base_city bc ON bc.id = l.city INNER JOIN location_category c ON c.location_id = l.id ".(!$isGeo ? "AND c.category_id = '".$categoryId."'" : false)." LEFT JOIN location_categories cn ON cn.id = c.category_id INNER JOIN user u ON u.user = l.user WHERE l.country = '".$countryId."' AND l.active = 'Y'".($currentRange ? " AND LEFT(gs.sefurl,1) = '".$currentRange."'" : false)." GROUP BY l.id LIMIT {$start},{$cd['lpp']}"); $rows = $db->rows($locations); if ($rows > 0){ echo $tpl->showLocations($locations); //navigatie van lokaties op land nivo if ($rows2 > $cd['lpp']) { echo $tpl->ehead().$tpl->pagenav($rows2,$core->getCurrentUrl()."?".($core->getCurrentRange() ? "r".$core->getCurrentRange()."&" : false)."{page}",$core->getCurrentPage("l"),true,false,$cd['lpp'],"l").$tpl->foot(); } } else { echo $tpl->econtent("Er zijn helaas geen voorlopige resultaten beschikbaar."); } } else { echo $tpl->econtent(NO_RESULTS); } } elseif($goTo == "city") { /* Provincie/regio nivo met lijstweergave van plaatsen */ if ($db->count("base_state","sefurl",($isGeo ? $_GET['sef'] : $var3)) == 0) $tpl->err_replace(INVALID_ACTION); if (!$isGeo) $categoryId = $db->getid("location_categories","sefurl",$_GET['sef']); $continentId = $db->getid("base_continent","sefurl",$var1); $continentName = $db->getid("base_continent","sefurl",$var1,"name"); $countryId = $db->getid("base_country","sefurl",$var2); $countryName = $db->getid("base_country","sefurl",$var2,"name"); $stateId = $db->result($db->q("SELECT id FROM base_state WHERE country_id = '" . $countryId . "' AND sefurl = '" . ($isGeo ? $_GET['sef'] : $var3) . "'" ) ); $stateName = $db->getid("base_state","id",$stateId,"name"); //$broodkruimel=array($continentName=>"/lokaties/".$var1.".html",$countryName=>"/lokaties/".$var1."/".$var2.".html",$stateName=>"/lokaties/".$var1."/".$var2."/".($isGeo ? $_GET['sef'] : $var3).".html"); if (!$isGeo) $catName = $db->getid("location_categories","sefurl",substr($eSef, 0, -1),"name"); !empty($eSef)?$broodkruimel[$catName] = "/".substr($eSef, 0, -1)."/":false; $broodkruimel[$continentName] ="/".$eSef.$var1."/"; $broodkruimel[$countryName] = "/".$eSef.$var2."/"; $broodkruimel[$stateName] = "/".$eSef.(!empty($var3) ? $var3 : $_GET['sef'])."-".$stateId."/"; echo $tpl->createRange(true,(!$isGeo) ? $categoryId : false, null, (!empty($var3) ? $var3 : $_GET['sef'])."-".$_GET['qid']); $currentRange = $core->getCurrentRange(); $currentPage = $core->getCurrentPage(); if (!$currentPage) $currentPage = 0; $start = $cd['fpp'] * $currentPage; $locations = "(SELECT COUNT(1) FROM location".(!$isGeo ? " LEFT JOIN location_category r ON r.category_id = '".$categoryId."' AND location.id = r.location_id " : false)." WHERE active = 'Y' AND city = c.id".(!$isGeo ? " AND r.id IS NOT NULL" : false).") as locations"; $rows = $db->rows($db->q("SELECT COUNT(1),{$locations} FROM base_city c WHERE state_id = '".$stateId."'".($currentRange ? " AND LEFT(sefurl,1) = '".$currentRange."'" : false)." GROUP BY c.id HAVING locations > 0")); //11-05-2012 huh, 2x een query? Deze laatste maar uitgezet //$rows = $db->result($db->q("SELECT COUNT(*) FROM location WHERE state = '" . $stateId . "'" )); if ($rows > 0){ $cities = $db->q("SELECT c.name,c.id,c.sefurl,{$locations} FROM base_city c WHERE c.country_id = '" . $countryId . "' AND c.state_id = '".$stateId."' ".($currentRange ? " AND LEFT(sefurl,1) = '".$currentRange."'" : false)." HAVING locations > 0 ORDER BY c.name ASC LIMIT {$start},{$cd['fpp']}"); ?> ass($cities)){ //nieuwe sef: //$url = "/lokaties/".$var1."/".$var2."/".($isGeo ? $_GET['sef'] : $var3)."/".$city['sefurl'].$eSef.".html"; //nieuwe sef: $url = "/".$eSef.$city['sefurl']."-".$city['id'] . "/"; ?>
      Plaats Lokaties

      Warning: Undefined variable $city in /home/deb8762n2/domains/vakantielocaties.nl/public_html/lokaties.php on line 567

      Warning: Trying to access array offset on value of type null in /home/deb8762n2/domains/vakantielocaties.nl/public_html/lokaties.php on line 567

      Warning: Undefined variable $city in /home/deb8762n2/domains/vakantielocaties.nl/public_html/lokaties.php on line 568

      Warning: Trying to access array offset on value of type null in /home/deb8762n2/domains/vakantielocaties.nl/public_html/lokaties.php on line 568
      $cd['fpp']) { echo $tpl->ehead().$tpl->pagenav($rows,$core->getCurrentUrl()."?".($core->getCurrentRange() ? "r".$core->getCurrentRange()."&" : false)."{page}",$core->getCurrentPage()).$tpl->foot(); } // Voorlopige resultaten $currentPage = $core->getCurrentPage("l"); if (!$currentPage) $currentPage = 0; $rows2 = $db->rows( $db->q("SELECT l.id,l.name,l.user,l.contract,l.sefurl,l.subdomain,l.capacity,l.added,l.updated,p.id imageid,cn.name AS catname FROM location l LEFT JOIN location_photos p ON l.id = p.location INNER JOIN location_description d ON d.id = l.id INNER JOIN base_city gc ON gc.id = l.state INNER JOIN location_category c ON c.location_id = l.id ".(!$isGeo ? "AND c.category_id = '".$categoryId."'" : false)." LEFT JOIN location_categories cn ON cn.id = c.category_id INNER JOIN user u ON u.user = l.user WHERE l.state = '".$stateId."' AND l.active = 'Y'".($currentRange ? " AND LEFT(gc.sefurl,1) = '".$currentRange."'" : false)." GROUP BY l.id")); $rows2Temp = $rows2; # new range? if ( ! isset ( $_SESSION['ses_range'] ) || $_SESSION['ses_range'] != $goTo . $_GET['sef'] . $var1 . $var2 . $var3 . $var4 ) { $_SESSION['ses_range'] = $goTo.$_GET['sef'].$var1.$var2.$var3.$var4; $_SESSION['ses_range_list'] = array(); $iStart = 0; do { if ( $rows2Temp <= $cd['lpp'] ) break; $_SESSION['ses_range_list'][] = $iStart; $iStart += $cd['lpp']; $rows2Temp -= $cd['lpp']; } while ( true ); shuffle($_SESSION['ses_range_list']); $_SESSION['ses_range_list'][] = $iStart; } $start = $_SESSION['ses_range_list'][$currentPage]; echo "

      Populaire lokaties in ".$stateName." - ".$countryName."

      "; $locations = $db->q("SELECT l.id,l.name,l.user,l.contract,l.sefurl,l.subdomain,l.capacity,l.added,l.updated,p.id imageid,cn.name AS catname, bc.name AS city FROM location l LEFT JOIN location_photos p ON l.id = p.location INNER JOIN location_description d ON d.id = l.id INNER JOIN base_city bc ON bc.id = l.city INNER JOIN location_category c ON c.location_id = l.id ".(!$isGeo ? "AND c.category_id = '".$categoryId."'" : false)." LEFT JOIN location_categories cn ON cn.id = c.category_id INNER JOIN user u ON u.user = l.user WHERE l.state = '".$stateId."' AND l.active = 'Y'".($currentRange ? " AND LEFT(bc.sefurl,1) = '".$currentRange."'" : false)." GROUP BY l.id LIMIT {$start},{$cd['lpp']}"); $rows = $db->rows($locations); if ($rows > 0){ echo $tpl->showLocations($locations); //navigatie van lokaties op provincie/regio nivo if ($rows2 > $cd['lpp']) { echo $tpl->ehead().$tpl->pagenav($rows2,$core->getCurrentUrl()."?".($core->getCurrentRange() ? "r".$core->getCurrentRange()."&" : false)."{page}",$core->getCurrentPage("l"),true,false,$cd['lpp'],"l").$tpl->foot(); } } else { echo $tpl->econtent("Er zijn helaas geen voorlopige resultaten beschikbaar."); } } else { echo $tpl->econtent(NO_RESULTS); } } else { $tpl->err_replace(INVALID_ACTION); } } else { $tpl->err_replace(INVALID_ACTION); } $tpl->end(); ?>