<?php
header("Content-type: text/html; charset=utf-8");
session_start();
$Startpagina = "home";
include_once("_Config/Config.php");

/* Personal Theme */
/*If(!IsSet($_COOKIE['PDTheme_pers2'])) setcookie('PDTheme_pers2',"2",mktime(0,0,0,date('m'),date('d'),date('Y')+5));
ElseIf(IsSet($_REQUEST['PDTheme'])) {
	setcookie('PDTheme_pers2',$_REQUEST['PDTheme'],mktime(0,0,0,date('m'),date('d'),date('Y')+5));
	$_COOKIE['PDTheme_pers2'] = $_REQUEST['PDTheme'];
}*/

If(!IsSet($_GET['id'])) $_GET['id'] = $Startpagina;

$link = mysql_connect($cfgServer['host'],$cfgServer['user'], $cfgServer['password'])or die ("Could not connect");
mysql_select_db($cfgServer['database']) or die ("Could not select database".$cfgServer['database']);

//Haal categorie gegevens op
$query = "SELECT * FROM in_menu WHERE Show_item=1 ORDER BY ID_menu_niv1, ID_menu_niv2 ASC;";
$result1 = mysql_query($query);

while($row = @mysql_fetch_array($result1,MYSQL_ASSOC)){
	$menu_item[$row['ID_menu_niv1']][$row['ID_menu_niv2']]['Name'] = $row['Name'];
	$menu_item[$row['ID_menu_niv1']][$row['ID_menu_niv2']]['Menu_naam'] = $row['Menu_naam'];
	$menu_item[$row['ID_menu_niv1']][$row['ID_menu_niv2']]['Link'] = $row['Link'];
	$menu_item[$row['ID_menu_niv1']][$row['ID_menu_niv2']]['ID_menu'] = $row['ID_menu'];

	If($row['Name'] == $_GET['id']) {
		$Menu_ID = $row['ID_menu'];
		$ID_menu_niv1 = $row['ID_menu_niv1'];
		$ID_menu_niv2 = $row['ID_menu_niv2'];
		$Pagina = $row['Link'];
		$_GET['Page'] = $row['Name'];
	}
}
$query = "SELECT * FROM in_menu WHERE Show_item=1 AND ID_menu_niv1=".$ID_menu_niv1." ORDER BY ID_menu_niv2 ASC;";
$result1 = mysql_query($query);

If($row = @mysql_fetch_array($result1,MYSQL_ASSOC)) $menu_parent_id = $row['Name'];
Else $menu_parent_id = $row['Name'];

If($Pagina=="") $Pagina = "Pages/".$_GET['id'].".php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
#############################################################################################
# Dit document is auteursrechtelijk beschermt. Alle vormen van kopi&euml;ren, dupliceren,	#
# rippen of andere manier van herproduceren van dit document zonder							#
# uitdrukkelijke toestemming van Usendes en Atlantri worden beschouwd als een				#
# inbreuk op het auteursrecht. Dit leid ertoe dat deze handeling(en) als strafbaar feit		# 
# volgens de Nederlandse en internationale wetten word beschouwd.							#
#																							#
#				Usendes en Atlantri &copy; 2005-2007,2008,2009,2010							#
#############################################################################################
 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" lang="nl">
<head>
	<META http-equiv="Content-type" content="text/html; charset=utf-8">
	<META name="distribution" content="Global">
	<META name="rating" content="General">
	<META name="description" content="<?php Echo $Bedrijf['beschrijving']; ?>">
	<META name="keywords" content="<?php Echo $Bedrijf['keywords']; ?>">
	<META name="copyright" content="<?php Echo $Bedrijf['Naam']; ?> &copy; <?php Echo date("Y"); ?>">
	<META name="OUTLINE" content="<?php Echo $Bedrijf['keywords']; ?>">
	<META name="TITLE" content="<?php Echo $Bedrijf['internet_titel']; ?>">
	<META name="DESC" content="<?php Echo $Bedrijf['beschrijving']; ?>">

	<title><?php Echo $Bedrijf['internet_titel']; ?></title>
	
	<link rel="icon" type="image/ico" href="_Images/favicon.ico">	
	<link rel="shortcut icon" type="image/ico" href="_Images/favicon.ico">
	<link href="<?php Echo $style_sheets['algemeen']; ?>" rel="stylesheet" type="text/css">
	
	<SCRIPT src="_Scripts/thirdparty/jQuery/jQueryLibraries.js" language="javascript" type="text/javascript"></SCRIPT>
	<!--[if lt IE 7.]>
		<script defer type="text/javascript" src="_Scripts/thirdparty/transparentfix/pngfix.js"></script>
	<![endif]-->
</head>
<body <?php Echo "class='theme_background_color".$_COOKIE['PDTheme_pers2']."'"; ?>>
<?php
If(IsSet($Onderhoud) && $Onderhoud['Onderhoud']) 	Echo $Onderhoud['Message'];
If(ini_get('safe_mode') && $syscheck['syscheck']) 	Echo $syscheck['SafemodeON'];
?>
<a name='top'></a>
<center>
	<DIV class="outerframe">
		<DIV class="innerframe">
			<DIV class="innerframe_border_top"></DIV>
			<DIV class="innerframe_border_middle"></DIV>
			<DIV class="webpage_frame">
				<?php 
					If(file_exists("_Images/Banner/Banner_".$menu_parent_id.".jpg")){
						Echo "\t\t\t\t<DIV class=\"headframe\" style=\"background: url('_Images/Banner/Banner_".$menu_parent_id.".jpg') no-repeat top;\">";
					} Else Echo "\t\t\t\t<DIV class=\"headframe\" style=\"background: url('_Images/Banner/Banner.png') no-repeat top;\">";
					
					If($style_objects['logo']) {	
						Echo	"\t\t\t\t<DIV class='logo'><a href='".$Bedrijf['www'].
								"'><img src='_Images/logo.png' width='250' height='133' alt='BoesCampers' border=0 /></a></div>";
					}
					?>
					<DIV class="menu_frame">
						<!-- HOOFDMENU -->
						<DIV class="hoofdmenu_frame">
							<UL class="hoofdmenu">
							<?php
							foreach($menu_item as $key => $waarde){
								$InActive = "";
								If($ID_menu_niv1 == $key) {
									$InActive = "_down";
									$Rollover_effect ="";	
								} ElseIf($style_objects['menu_buttons']) {
									$Rollover_effect =	'onMouseOver="this.src=\''.$path_Menubutton_IMG.$menu_item[$key][0]['Menu_naam'].'_over.png\';" '.
														'onMouseOut="this.src=\''.$path_Menubutton_IMG.$menu_item[$key][0]['Menu_naam'].'.png\';"';
								}
								Echo	"<IL class='menu_item'>\n\t\t\t\t".
										'<a class="menu_link'.$InActive.'" href="'.$_SERVER['PHP_SELF'].'?id='.$menu_item[$key][0]['Name'].'">';
										
								If($style_objects['menu_buttons']) {
									Echo	'<img id="image_'.$menu_item[$key][0]['Name'].'" src="'.$path_Menubutton_IMG.$menu_item[$key][0]['Menu_naam'].$InActive.'.png" border="0" '.
											'alt="'.$menu_item[$key][0]['Name'].'" '.$Rollover_effect.' /><BR>';
								}
								Echo	$menu_item[$key][0]['Menu_naam'].'</a></IL>';
							}
							?>
							</UL>
						</DIV>
						<!--/ END HOOFDMENU -->
					</DIV>
				</DIV>
				<!-- SUBMENU -->
				<DIV class="submenu_frame">
					<DIV class="left_border_submenu"></DIV>
					<DIV class="submenu">
					<?php
					foreach($menu_item[$ID_menu_niv1] as $key => $waarde){
						If($ID_menu_niv2 == $key) {
							$Selectsym = "<SPAN style='font-size:14px;'>&raquo; </SPAN>";
							$InActive = "_down";
						} Else {
							$Selectsym = "<SPAN style='font-size:14px;'>&nbsp;&nbsp; </SPAN>";
							$InActive = "";
						}
						Echo	"\t\t<DIV class='submenu_item'>".
								'<a class="submenu_item'.$InActive.'" href="'.$_SERVER['PHP_SELF'].'?id='.$menu_item[$ID_menu_niv1][$key]['Name'].
								'">'.$Selectsym.$menu_item[$ID_menu_niv1][$key]['Menu_naam']."</a></DIV>\n";
					}
					?>
					</DIV>
					<DIV class="right_border_submenu"></DIV>&nbsp;
				</DIV>
				<!--/ END SUBMENU -->
				<DIV class="contentframe">
					<DIV class="Content">
						<?PHP
						//Opvragen module pagina
						If(strpos($Pagina,'http://') === False) {
							include_once($Pagina);
						} Else {
							Echo	"<script language='JavaScript'>\n<!--\n".
									"window.location=\"".$Pagina."\";\n//-->\n</script>";
						}
						?>
					</DIV>
				</DIV>
				<DIV class="footerframe">

				</DIV>
			</DIV>
		</DIV>
		<DIV>
			<DIV class="copyframe">
				<?php Echo $Website['footer']; ?>
				<DIV class="copyrights"><?php Echo $Bedrijf['Naam']." ".date("Y"); ?>&copy;. Alle rechten voorbehouden.</DIV>
			</DIV>
		</DIV>
		<DIV class="innerframe_border_bottom"></DIV>
	</DIV>
	<DIV class="Theme_panel">
		<?php 
		/*for($th=1;$th<7;$th++){
			Echo	"\t<a href='".$_SERVER['PHP_SELF']."?";
			If($_SERVER['QUERY_STRING']) Echo $_SERVER['QUERY_STRING']."&";
			Echo	"PDTheme=".$th."'><img class='Theme_chooser' src='_Images/Themes/Theme_choser".$th.".gif' alt='Kies je eigen thema ".$th."' ></a>\n";
		}*/
		?>
	</DIV>
</center>

<!--/ Google website analystics /-->

</body>
</html>