OLD VERSION - PLEASE VISIT http://www.dcadvisorypartners.com"; } else { // Redirect to new DV Advisory Page header("Location: http://www.dcadvisorypartners.com\n"); die("Please go to http://www.dcadvisorypartners.com"); } $_SESSION[lang] = $_SESSION['lang'] ? $_SESSION['lang'] : 0; $_SESSION[langid] = $_SESSION['langid'] ? $_SESSION['langid'] : 0; $_SESSION[lang]=$_SESSION['langid']; //Konfiguration der Seite require("includes/global.php"); $notfound = $_GET[notfound] ? true : false; $subnav = false; function get_cmspage_text($pageid) { $q = "SELECT * FROM category WHERE rewrite_name = '".$pageid[2]."' AND active = 1"; $rs = @mysql_query($q); if (mysql_num_rows($rs)>0) { if ($row=mysql_fetch_assoc($rs)) { return $row['content']; } } return ""; } function lecho($german, $english) { if ($_SESSION['lang']==1) echo $english; else echo $german; } //Determine Module and Site-info $_GET[jump] = mysql_escape_string($_GET[jump]); $_GET[jump] = $_GET[jump] ? $_GET[jump] : 'home'; if ($_GET['lang']) { // Change page language switch ($_GET['lang']) { case 'EN': $langid=1; $default_jump="en_home"; $jump_prefix="en_"; $jump = $jump_prefix.$_GET[jump]; setlocale('LC_ALL','en_EN'); break; case 'DE': default: $langid=0; $default_jump="home"; $jump = str_replace('en_','',$_GET[jump]); setlocale('LC_ALL','de_DE'); break; } $old_lang=$_SESSION[lang]; $_SESSION[lang]=$langid; $q = "SELECT * FROM category WHERE rewrite_name = '".$jump."' AND active = 1 ORDER BY sort"; $rs = @mysql_query($q); if (mysql_num_rows($rs)>0) $_GET['jump']=$jump; else $_GET['jump']=$default_jump; } $current_page = $_GET['jump'].'.html'; $q = "SELECT * FROM category WHERE rewrite_name = '".$_GET[jump]."' AND active = 1 ORDER BY sort"; $rs = @mysql_query($q); $selected_second_level=false; if (mysql_num_rows($rs) > 0) { $_SITE[category] = mysql_fetch_array($rs); $require_mod = ($_SITE[category][mod] != '' ) ? $_SITE[category][mod] : false; $selected_top = ($_SITE[category][parent_id] > 1) ? $_SITE[category][parent_id] : $_SITE[category][category_id]; $selected_top_rewrite = $_GET['jump']; if (($_SITE[category][parent_id] > 1)) $selected_second_level=$_SITE[category][category_id]; // Third navigation level $q = "SELECT c1.*, c2.rewrite_name as parent_rewrite_name FROM category c1 LEFT JOIN category c2 ON c1.parent_id=c2.category_id WHERE c1.category_id = $selected_top AND c1.active = 1 ORDER BY sort"; $rs = @mysql_query($q); if (mysql_num_rows($rs) > 0) { $_SITE[parent_category] = mysql_fetch_array($rs); if ($_SITE[parent_category][parent_id]>1){ $selected_top = $_SITE[parent_category][parent_id]; $selected_second_level=$_SITE[parent_category][category_id]; $selected_top_rewrite = $_SITE[parent_category]['parent_rewrite_name']; } else { $selected_top_rewrite = $_SITE[parent_category]['rewrite_name']; } } //Check wether to show subnav if ($_SITE[category][parent_id] > 0) { $subnav = true; } else { $q = "SELECT * FROM category WHERE parent_id = '".$_SITE[category][category_id]."' AND active = 1 ORDER BY sort"; $rs = mysql_query($q); $subnav = (mysql_num_rows($rs) > 0 ) ? true : false; } //Check Language $q = "SELECT parent_id FROM category WHERE category_id = '".$selected_top."' AND active = 1 ORDER BY sort"; $rs = @mysql_query($q); $tmp = @mysql_fetch_array($rs); $_SESSION[lang] = $tmp[parent_id]; // Prepare CMS Content $_SITE[category][content]=preg_replace_callback("/(\{INCLUDE:(.*)\})/mix","get_cmspage_text",$_SITE[category][content]); } else $notfound = true; if ($_SESSION['lang']==1) $lang_prefix="en_"; else $lang_prefix=""; if ($_SESSION['lang']==1) $sql_postfix="_en"; else $sql_postfix="_de"; if ($_SESSION['lang']==1) $langid="en"; else $langid="de"; if ($_SESSION['lang']==1) { setlocale('LC_ALL','en_GB.UTF-8'); }else {setlocale(LC_ALL, 'de_DE@euro');}; //Kopf und Navigation require("includes/header.inc.php"); $q = "SELECT * FROM modules WHERE mod_id = '".$require_mod."' AND active = 1 ORDER BY name"; $rs = mysql_query($q); $module = mysql_fetch_array($rs); if ($require_mod) require("includes/htdocs/".$module[filename]); else if ($notfound) require("includes/htdocs/notfound.inc.php"); else require("includes/htdocs/cms.inc.php"); //Fusszeile und Abschluss require("includes/footer.inc.php"); include_once("admin/shortstat/inc.stats.php"); ?>