"") { $lang = $_GET['lang']; } if (strlen($lang) > 2) { exit; } $link = connect_db(); $query_settings_lesen = "SELECT name, wert, html_" . $lang . " FROM " . $settings_table; $result_settings_lesen = mysql_query($query_settings_lesen); // or print("Anfrage an die Datenbank fehlgeschlagen.
$query
" . mysql_error()); if(mysql_error() != "") { print('Anfrage an die Datenbank fehlgeschlagen. [ ' . mysql_error() . ']\n'); } // $settings_name = array(); while ($settings = mysql_fetch_array($result_settings_lesen)) { $s_name[$settings[0]] = stripslashes($settings[1]); $s_html[$settings[0]] = stripslashes($settings[2]); } // cookie? if ($s_name['cookie'] <> "") { // setcookie ($s_name['cookie'], "", time() - 3600); $cookie = $_COOKIE[$s_name['cookie']]; if ($cookie <> 1) { // print "cookie nicht gesetzt"; // print ""; print $s_html['cookie_page']; exit; } else { // print "cookie gesetzt"; } // print "1: $cookie"; // print "

2: " . $s_name['cookie']; // print_r($_COOKIE); } ?> " . $s_name['html_title'] . ""; $html_content = file_get_contents("faq.tpl"); $html_content = preg_replace('/\[FAQ\]/i', $s_html['faq'], $html_content); } else if ($_GET['tpl'] == "events") { print "" . $s_name['html_title'] . ""; $html_content = file_get_contents("events.tpl"); $html_content = preg_replace('/\[EVENTS\]/i', $s_html['events'], $html_content); } else if ($_GET['tpl'] == "news") { print "" . $s_name['html_title'] . ""; $html_content = file_get_contents("news.tpl"); $html_content = preg_replace('/\[NEWS\]/i', $s_html['news'], $html_content); } else if ($_GET['tpl'] == "raidtermine") { $html_content = file_get_contents("raidtermine.tpl"); $html_content = preg_replace('/\[RAIDTERMINE\]/i', $s_html['raidtermine'], $html_content); } else if ($_GET['tpl'] == "shoutboxoff") { $html_content = file_get_contents("shoutboxoff.tpl"); $html_content = preg_replace('/\[SHOUTBOXOFF\]/i', $s_html['shoutboxoff'], $html_content); $html_content = preg_replace('/\[SHOUTBOX\]/i', $s_html['shoutbox_html'], $html_content); $html_content = preg_replace('/\[LANG\]/i', $lang, $html_content); } else { print "" . $s_name['html_title'] . ""; // template öffnen $html_content = file_get_contents("index.tpl"); // erset0ris0r // $header_replacement = replace_header(); $html_content = preg_replace('/\[HEADER\]/i', replace_header(), $html_content); $html_content = preg_replace('/\[TITEL\]/i', replace_titel(), $html_content); $html_content = preg_replace('/\[CHANNEL_STATUS\]/i', replace_channel_status(), $html_content); $html_content = preg_replace('/\[ONOFF\]/i', replace_onoff(), $html_content); $html_content = preg_replace('/\[TSONOFF\]/i', replace_tsonoff(), $html_content); $html_content = preg_replace('/\[MAIN_CONTENT\]/i', replace_main_content(), $html_content); $html_content = preg_replace('/\[STREAM\]/i', replace_stream(), $html_content); $html_content = preg_replace('/\[SHOUTBOX\]/i', replace_shoutbox(), $html_content); $html_content = preg_replace('/\[FOOTER\]/i', replace_footer(), $html_content); $html_content = preg_replace('/\[CHANNEL_LIST\]/i', replace_channel_list($settings_table), $html_content); $html_content = preg_replace('/\[COPYRIGHT\]/i', replace_copyright(), $html_content); $html_content = preg_replace('/\[LINK_NEWS\]/i', "javascript:opentf('sboff.php?lang=" . $lang . "','sbonoff','index.php?tpl=news&lang=" . $lang . "','sbframe')", $html_content); $html_content = preg_replace('/\[LINK_EVENTS\]/i', "javascript:opentf('sboff.php?lang=" . $lang . "','sbonoff','index.php?tpl=events&lang=" . $lang . "','sbframe')", $html_content); $html_content = preg_replace('/\[LINK_FAQ\]/i', "javascript:opentf('sboff.php?lang=" . $lang . "','sbonoff','index.php?tpl=faq&lang=" . $lang . "','sbframe')", $html_content); $html_content = preg_replace('/\[LINK_RAIDTERMINE\]/i', "javascript:opentf('sboff.php?lang=" . $lang . "','sbonoff','index.php?tpl=raidtermine&lang=" . $lang . "','sbframe')", $html_content); $html_content = preg_replace('/\[LINK_SHOUTBOX_OFF\]/i', "index.php?tpl=shoutboxoff&lang=" . $lang, $html_content); $html_content = preg_replace('/\[LINK_1000\]/i', "/ilsk/forum", $html_content); $html_content = preg_replace('/\[LANG\]/i', $lang , $html_content); } print $html_content; ?>