session_start(); error_reporting(E_ALL); ini_set('display_errors', 1); //includes include_once("backend/includes/db_config.inc.php"); include_once("backend/includes/functions.inc.php"); include_once("index.inc.php"); //*********************************************************// if(GetSetting('ForceWWW') == 'true'){ if(substr($_SERVER['HTTP_HOST'],0,3) != "www"){ header("Location: http://www.".$_SERVER['HTTP_HOST']); exit; } } define('PLUGIN_MAX',GetPluginMax()); $meta = ''; $descr = ''; $title = GetSetting('Titel'); $tid = 0; $intro = false; if(!isset($_GET['page'])){ $page = ''; }else{ $page = $_GET['page']; } if(file_exists('backend/includes/redirects.inc.php')){ include_once('backend/includes/redirects.inc.php'); $dest = GetRedirectExists($page); if($dest){ header("Location: ".$dest); exit; } } // Prevent empty vars if(!isset($_SESSION['sellang'])){ $_SESSION['sellang'] = 'NL'; } if(isset($_GET['lang'])){ $_SESSION['sellang'] = mysql_real_escape_string($_GET['lang']); } $lang = $_SESSION['sellang']; if($page == ''){ $intro = true; $sql = "SELECT template_id,content_id,name,parent,alias,title,meta,descr,template_id FROM cms_content WHERE menu_default = 1 AND lang = '".$_SESSION['sellang']."' GROUP BY content_id LIMIT 1"; $query = mysql_query($sql); $row = mysql_fetch_array($query); $cid = $row['content_id']; $template_id = $row['template_id']; $name = $row['name']; $alias = $row['alias']; $menu_parent = $row['parent']; $meta = $row['meta']; $descr = $row['descr']; $title = $row['title']; $tid = $row['template_id']; }else{ $sql = "SELECT content_id,name,template_id,parent,alias,title,meta,descr,template_id FROM cms_content WHERE lang = '".$_SESSION['sellang']."' GROUP BY content_id"; $query = mysql_query($sql); while($row = mysql_fetch_array($query)){ if($row['alias'] == $page){ $cid = $row['content_id']; $template_id = $row['template_id']; $name = $row['name']; $alias = $row['alias']; $menu_parent = $row['parent']; $meta = $row['meta']; $descr = $row['descr']; $title = $row['title']; $tid = $row['template_id']; } } } if(!isset($cid)){ header('Status: 404 Not Found'); header('HTTP/1.0 404 Not Found'); echo("Pagina niet gevonden!"); exit; } define('tid',$tid); define('cid',$cid); define('page',$page); define('name',$name); define('page_parent',$menu_parent); define('lang',$lang); if($title == ''){ $title = $name; } $template = GetTemplate($template_id); $s = "SELECT * FROM cms_plugin_auto WHERE content_id = '".cid."'"; $q = mysql_query($s); if(mysql_num_rows($q) != 0){ while($r = mysql_fetch_array($q)){ if($r['plugin_id'] != 0){ $template .= "[%PLUGIN_".$r['plugin_id']."%]"; } /* * @param :subtemplate_id = defines the shape * @param :parent_id = defines the starting point of the data * @param :template_id = defines the template of the data */ if($r['parent_id'] != 0){ $template .= "[%SUBPAGES_".$r['id']."%]"; } } } $template = Show_Content($template,$cid,$template_id,$title,$alias); $submenu = Show_Menu($cid,$cid,1,$tid,"li"); if (strlen($submenu) > 0) { $submenu = '