<?php

include ("includes/functions.php");

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Het Kompas :: Artikels &amp; Media</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="viewport" content="width=device-width">
<? MetaStuff (); ?>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="includes/AC_RunActiveContent.js" language="javascript"></script> 
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>

<link rel="stylesheet" href="includes/meanmenu.css" media="all" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="includes//jquery.meanmenu.js"></script> 
<script>
jQuery(document).ready(function () {
    jQuery('nav').meanmenu();
});
</script>

<style type="text/css">
td img {display: block;}
</style>
</head>
<body bgcolor="#f2eeea" onload="MM_preloadImages('images/menu/menu_r1_c1_f2.jpg','images/menu/menu_r3_c1_f2.jpg','images/menu/menu_r1_c1_f3.jpg','images/menu/menu_r4_c1_f2.jpg','images/menu/menu_r1_c1_f4.jpg','images/menu/menu_r5_c1_f2.jpg','images/menu/menu_r1_c1_f5.jpg','images/menu/menu_r6_c1_f2.jpg','images/menu/menu_r1_c1_f6.jpg','images/menu/menu_r7_c1_f2.jpg','images/menu/menu_r1_c1_f7.jpg','images/menu/menu_r8_c1_f2.jpg','images/menu/menu_r1_c1_f8.jpg','images/menu/menu_r9_c1_f2.jpg','images/menu/menu_r1_c1_f9.jpg','images/menu/menu_r10_c1_f2.jpg','images/menu/menu_r1_c1_f10.jpg','images/menu/menu_r11_c1_f2.jpg','images/menu/menu_r1_c1_f11.jpg','images/menu/menu_r12_c1_f2.jpg');">
<div align="center">
	<div id="Wrapper">
		<div id="Header">
			<div id="HeaderNavigContainer">
				<div id="mobile-nav">
				<nav class="mob-menu">
				<ul class="HeaderNavig">
					<li><a href="index.php">Welkom</a></li>
					<li><a href="fotogal.php">Foto's</a></li>
					<li><a href="artikels.php" id="current">Artikels &amp; Media</a></li>
					<li><a href="contact.php">Contacteer Ons</a></li>
					<li><a href="ligging.php">Praktisch &amp; Ligging</a></li>
				</ul>
				</nav>
				</div>
			</div>
			<div class="langsel"><a href="artikels_fr.php">Français</a></div>
		</div>
		<div id="SubHeader">&nbsp;</div>
		<div id="Content">
			<table width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td id="LeftSide">
						<div class="LeftSide">
						<? SubMenu (); ?>
						</div>
					</td>
					<td id="CenterPage">
						<div class="CenterPage">
						<h1>Artikels &amp; Media</h1> 
						<?php ToonArtikels (); ?>
						</div>
					</td>
					<td id="RightSide"><br />
						<img src="images/HomePagePhoto-1212.jpg" width="234" height="157" alt="Het Kompas foto 1" /><br /><br />
						
						<img src="images/HomePagePhoto-1212-3.jpg" width="234" height="300" alt="Het Kompas foto 2" />	<br /><br />
                        <a href="http://www.faq.hetkompas.be/FAQ NL.pdf" target="new"><img src="images/faq.png" width="234" height="127" alt="Het Kompas Faq" /></a></a>	<br />					
					</td>
				</tr>
			</table>
		</div>
	</div>
	<div id="Footer">&nbsp;</div>
	<div id="FooterContent">
		<? FooterContent (); ?>
	</div>
</div>
<? GoogleAnal (); ?>
</body>
</html>



<?php

function ToonArtikels ()
{
	$sql_command = "SELECT * FROM mod_Artikels WHERE Publiceren = 1 ORDER BY id DESC";
	
	$sql_result = (mysql_query($sql_command)) or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());

	echo '<table width="98%" cellpadding="3" cellspacing="3" class="ArtikelBox">';

	while ($row=mysql_fetch_array($sql_result)) 
		{
	echo '<tr>';
	echo '<td width="100%" align="left" valign="top" colspan="2"><h2>'.$row['ArtikelTitel'].'</h2></td>';
	echo '</tr><tr>';
	echo '<td valign="top">'.ToonFoto ($row['id']).'<span class="ArtikelInhoud">'.$row['ArtikelInhoud'].'</span></td>';
	echo '</tr>';
		}
	echo '</table>';
}

function ToonFoto ($id)
{
	$sql_command = "SELECT bestandsNaam FROM mod_ArtikelsFotos WHERE Id = '".$id."'";
	
	$sql_result = (mysql_query($sql_command)) or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());

	while ($row=mysql_fetch_array($sql_result)) 
		{
		$tmp = '<img src="http://www.hetkompas.be/CMS/fotos/'.$row['bestandsNaam'].'" width="175" border="0" align="left" hspace="10" alt="Artikels &amp; Media Brasserie Het Kompas" >';
		}	
		return $tmp;
}

