<?php 
//welke pagina?
$pagina = $_GET[id];
//als geen id dan default id=1
if (empty($id))
{$id='1';}

//database openen
include 'opendb.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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" />
<!--
<script type="text/javascript">
if (screen.width == 1024)
	{
	document.write ("<link href="style1024x768.css" rel="stylesheet" type="text/css" /> ")
	}
else if (screen.width == 1280) 
	{
	document.write ("<link href="style1280x1024.css" rel="stylesheet" type="text/css" /> ")
	}
</script> 
--->
<style type="text/css">
li.nr<?php {echo "{$_GET['id']}";}?> {background-color:#c4dddf; line-height: 32px; width:100%; color: #ffffff;}
</style> 
<title>
<?php //query: zoek title
$query = sprintf("SELECT title FROM chapters WHERE id='$id'", 
mysql_real_escape_string($title));
//perform query
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result)) {
echo "{$row['title']}";} ?>

</title>
<meta name="description" content="In de vroege jaren '50 werden veel Hagenaars wagenziek van de nieuwe PCC-car. In Amerika kwam de wagenziekte niet voor. Waarom maakte een PCC-car de Yankees niet misselijk? ">
<meta name="keywords" content="pcc-car, pcc, car, draaistel, tram, b3 draaistel, b2 draaistel, bn draaistel, draaistellen, den haag,  duwag draaistel, gerard scheltens, wagenziekte, misselijk, düwag, tramophanging, htm, smalspoor, ">
<meta name="author" content="metatags generator">
<meta name="robots" content="index, follow">
<meta name="revisit-after" content="3 month">
<title>PCC-cars en hun trucks</title>
<!--  -->
</head>

<body>
<?php include_once("analyticstracking.php") ?>
<div id="container">
	<div id="header">
		<?php 
			// query: zoek header
			$query = sprintf("SELECT header FROM chapters WHERE id='$id'",
			mysql_real_escape_string($header));
			//perform query
			$result = mysql_query($query);
		?>
		<p align="center"><img src="img/<?php //resultaat header in de link img src 
				while ($row = mysql_fetch_assoc($result)) {
    			echo "{$row['header']}";} ?> " /> </p>

	</div>
	<div id="menu">
		<?php
			include 'menu.html';
		?>
	</div>
	<div id="content">
	<?php
	//get the text from the database
	$id = $_GET['id']; 
		if (empty($id)) {$id='1';}
	$result = @mysql_query(
		"SELECT chaptertext FROM chapters WHERE id='$id'");
	if (!$result) {
		exit('Unable to load the text from the database.');
		}
	if (mysql_num_rows($result) < 1) {
		exit('Could not locate the specified chapter.');
		}
	while ($row = mysql_fetch_array($result)) {
		echo $row['chaptertext'];}
?>


	</div>
	<div id="footer">
		<?php // footer invoegen
		include 'footer.php' ?>
	</div>
</div>
<?php //sluiten database
include 'closedb.php';
?>




</body>
</html>
