lang = (!empty($_SESSION['kunde']['lang']) ? $_SESSION['kunde']['lang'] : "DE"); // CSS f�r IE if(strpos($_SERVER['HTTP_USER_AGENT'],"MSIE")!==false) $template->putCSS('seite/ie/layout'); // Header und Footertemplate laden $headertemplate = $template->load((isset($_SESSION['kunde']['template']) ? $_SESSION['kunde']['template'] : "standard")."/header"); $footertemplate = $template->load((isset($_SESSION['kunde']['template']) ? $_SESSION['kunde']['template'] : "standard")."/footer"); $maintemplate = $template->load((isset($_SESSION['kunde']['template']) ? $_SESSION['kunde']['template'] : "standard")."/".($_GET['ordner'] ? $_GET['ordner'].'/' : '').$_GET['seite']); $template->putMeta(''); // Inhalt includen if(file_exists($_SERVER['DOCUMENT_ROOT']."/includes/".($_GET['ordner'] ? $_GET['ordner']."/" : "").$_GET['seite'].".php")) require_once $_SERVER['DOCUMENT_ROOT']."/includes/".($_GET['ordner'] ? $_GET['ordner']."/" : "").$_GET['seite'].".php"; else require_once $_SERVER['DOCUMENT_ROOT']."/includes/index.php"; if(!$_SESSION['kunde']['online']) { header("HTTP/1.0 404 Not Found"); $headertemplate = $template->load("header404"); $maintemplate = $template->load("index404"); $footertemplate = $template->load("footer404"); function IPtoCountry($ip) { $sock = fsockopen("whois.ripe.net", 43); fwrite($sock, $ip."\n"); while (!feof($sock)) { $info .= fgetc($sock); } fclose($sock); preg_match("/country:[ ]+([A-Z]{2})\n/", $info, $match); return $match[1]; } switch(IPtoCountry($_SERVER['REMOTE_ADDR'])) { case "BE": header('Location: https://www.granit-parts.be/registration'); exit; die(); break; case "DK": header('Location: https://www.granit-parts.dk/registration'); exit; die(); break; case "FR": header('Location: https://www.granit-parts.fr/registration'); exit; die(); break; case "NL": header('Location: https://www.granit-parts.nl/registration'); exit; die(); break; case "AT": header('Location: https://www.granit-parts.at/registration'); exit; die(); break; case "SE": header('Location: https://www.granit-parts.se/registration'); exit; die(); break; case "CH": header('Location: https://www.granit-parts.ch/registration'); exit; die(); break; case "ES": header('Location: https://www.granit-parts.es/registration'); exit; die(); break; default: header('Location: https://www.granit-parts.com/registration'); exit; die(); break; } } #print_r($_GET); #print_r($_SESSION); #die(); /*if((isset($_SESSION['user']))&&(!$wartungsmodus)) { if($_SESSION['user']['kunde_id']!=$_SESSION['kunde']['id']) { $_SESSION['user'] = array(); $_SESSION['kunde'] = array(); //header("Location: "._ROOT."/admin/"); } $maintemplate = $template->load("adminmaske").'
'.$maintemplate.'
'.$template->load("adminfooter"); if(isset($_SESSION['seiten_id'])) $maintemplate = str_replace("{seitenid}",$_SESSION['seiten_id'],$maintemplate); // JQuery UI $template->putJS('jquery-ui.min'); // Editor $template->putCSS('summernote'); $template->putJS('summernote.min'); #$template->putJS('lang/summernote-de-DE'); // Admin Funktionen $template->putCSS('admin'); $template->putJS('admin'); // Color Picker $template->putJS('bootstrap-colorpicker.min'); $template->putCSS('bootstrap-colorpicker.min'); #$template->putJS('#','$(document).ready(function(){$(".colorpicker").colorpicker();});'); // FuelUx $template->putJS('fuelux.min'); $template->putCSS('fuelux.min'); // Uploader $template->putJS('plupload.full.min'); $template->putJS('jquery.plupload.queue/jquery.plupload.queue.min'); $template->putJS('jquery.plupload.queue/jquery.plupload.queue'); $template->putJS('i18n/'.strtolower($template->lang)); $template->putCSS('jquery.plupload.queue'); // Mehrsprachige JS Meldungen $template->putJS('#','var root = "{root}";var userlang = "{sprache}"; var del = "##Wirklich entfernen##?"; var neuereihe = "##Neue Inhalts-Reihe##"; var speichern = "##Speichern##";var gespeichert = "##Gespeichert##"; var entfernt = "##Entfernt##"; var session_expire = "'.session_cache_expire().'"; var choosename = "##Bitte eintragen##";'); $template->putJS("#","$.widget.bridge('uibutton', $.ui.button);$.widget.bridge('uitooltip', $.ui.tooltip);"); $template->putNavigation(''); }*/ $su = new SafeURL(); //$maintemplate = (strpos($_SERVER['HTTP_USER_AGENT'],"Trident")===false ? $maintemplate : utf8_encode($maintemplate)); //$headertemplate = (strpos($_SERVER['HTTP_USER_AGENT'],"Trident")===false ? $su->utf(utf8_encode($headertemplate)) : utf8_encode($headertemplate)); $maintemplate = (strpos($_SERVER['HTTP_USER_AGENT'],"Trident")===false ? $su->utf(utf8_encode($maintemplate)) : utf8_encode($maintemplate)); //$footertemplate = (strpos($_SERVER['HTTP_USER_AGENT'],"Trident")===false ? $su->utf(utf8_encode($footertemplate)) : utf8_encode(utf8_encode($footertemplate))); //$maintemplate = (strpos($_SERVER['HTTP_USER_AGENT'],"Trident")===false ? $su->utf(utf8_encode($maintemplate)) : utf8_encode(utf8_encode($maintemplate))); //$maintemplate = $su->utf(utf8_encode(utf8_encode($maintemplate))); // Weiterleitungsanzeige $q = mysql_query("SELECT * FROM kunde WHERE umgezogen=1 AND id='".$_SESSION['kunde']['id']."'"); $d = mysql_fetch_assoc($q); if($d['umgezogen']) { if($_SERVER['REMOTE_ADDR']=="91.249.139.96") { $headertemplate .= 'Sie finden unsere Webseite unter folgender Domain: '.$d['domain'].''; $template->putMeta(''); } else { header("Location: https://".$d['domain']); exit; } } // Template ausgeben echo $template->replace($headertemplate.$maintemplate.$footertemplate); ob_end_flush(); ?>