setTemplateDir('tn-template/'); $smarty->setCompileDir('tn-cache/'); $smarty->setConfigDir('tn-core/smarty/configs/'); $smarty->setCacheDir('tn-core/smarty/cache/'); $smarty->setPluginsDir('tn-core/smarty/plugins/'); require('tn-core/smarty/SmartyPaginate.class.php'); $smarty->caching = 0; $smarty->escape_html = true; Smarty::muteExpectedErrors(); //TODO prüfen ob andere Fehler noch angezeigt werden $domain_daten = $mysqli->query("SELECT `domain`, `art`, `ziel`, `index`, `portal` FROM `" . $TAB_Liste['domains'] . "` WHERE `domain` = '" . $_SERVER['SERVER_NAME'] . "'"); if ($domain_daten->num_rows == 1) { $domain = $domain_daten->fetch_object(); if ($domain->art == 2 && !empty($domain->ziel)) { header("HTTP/1.1 302 Found"); header("Status: 302 Found"); header('location: ' . $domain->ziel . $_SERVER['REQUEST_URI']); exit; } else if ($domain->art == 2 && empty($domain->ziel) && $domain->portal == 0) { $domain_daten = $mysqli->query("SELECT `domain` FROM `" . $TAB_Liste['domains'] . "` WHERE `index` = '" . $domain->index . "' AND `art` = '1'"); $domain = $domain_daten->fetch_object(); header("HTTP/1.1 301 Moved Permanently"); header("Status: 301 Moved Permanently"); header('location: http://' . $domain->domain . $_SERVER['REQUEST_URI']); exit; } elseif ($domain->art == 1) { $config_daten = $mysqli->query("SELECT `mobil` FROM `" . $TAB_Liste['config'] . "` WHERE `id` = '" . $domain->index . "'"); $_config = $config_daten->fetch_object(); if (!empty($_config->mobil)) { $mdomain_daten = $mysqli->query("SELECT `domain` FROM `" . $TAB_Liste['domains'] . "` WHERE `index` = '" . $_config->mobil . "' AND `art` = '1'"); $mdomain = $mdomain_daten->fetch_object(); require_once('tn-core/mobile_device_detect.php'); if (!LOCAL_SERVER || (LOCAL_SERVER && preg_match("!\.dicke\-kreativ\.de$!i", $_SERVER['HTTP_HOST']))) { $mobileredirect = $mdomain->domain; $desktopredirect = $domain->domain; mobile_device_detect($mobileredirect, $desktopredirect, $desktopredirect); } } if ($domain->portal == 0) { if (!LOCAL_SERVER || empty($_GET['index'])) { $_GET['index'] = $domain->index; } $heimaturl[] = "//" . $domain->domain; $heimaturl[] = "//server2:8080"; $heimaturl[] = "//server2"; } } } else { //Domain nicht zugewiesen header('content-type: text/plain; charset=utf-8'); die('Die Adresse "' . $_SERVER['SERVER_NAME'] . '" konnte nicht zugewiesen werden.'); } if (isset($_GET['index']) && !is_numeric($_GET['index'])) { unset($_GET['index']); } include('tn-core/functions.php'); $_GET = check_magic_quotes_gpc($_GET); $_POST = check_magic_quotes_gpc($_POST); if (!isset($_GET['lng'])) { $_GET['lng'] = getPreferredLanguage(); } if (!empty($_GET['index'])) { $homepage_status_daten = $mysqli->query("SELECT `homepage_status` FROM " . $TAB_Liste['config'] . " WHERE `id` = " . $_GET['index'] . ";"); $homepage_status = $homepage_status_daten->fetch_object(); $homepage_status = $homepage_status->homepage_status; $BEuser_status_daten = $mysqli->query("SELECT `sid` FROM " . $TAB_Liste['user'] . " WHERE `sid` = '" . $sid . "';"); $BEuser_status = $BEuser_status_daten->num_rows; if (($homepage_status == 0) && ($BEuser_status == 1)) { if (file_exists('tn-misc/offline/offline.php')) { require_once('tn-misc/offline/offline.php'); } else { ?>