"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(); $domain = $_SERVER['SERVER_NAME']; if ($domain != $cd['base']){ $subdomain = str_replace($cd['sub'], "", $domain); $subdomain = str_replace ( '.', '', $subdomain ); if (trim($subdomain)!="www" && !empty($subdomain)){ $initCore = false; $_GET['sef'] = $db->getid("location","subdomain",$subdomain,"sefurl"); if (!empty($_GET['sef'])){ include dirname(__FILE__)."/lokatie.php"; exit(); } else { $core->redir("https://".$cd['base']); } } } $tpl= new tpl(); $tpl->begin(); ?>

      Warning: Undefined variable $tpl in /home/deb8762n2/domains/vakantielocaties.nl/public_html/index.php on line 25

      Fatal error: Uncaught Error: Call to a member function getStatic() on null in /home/deb8762n2/domains/vakantielocaties.nl/public_html/index.php:25 Stack trace: #0 {main} thrown in /home/deb8762n2/domains/vakantielocaties.nl/public_html/index.php on line 25