<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */
  require_once "C:/xampp/htdocs/jubileehigh/cmsAdmin/lib/viewer_functions.php";
  require_once "C:/xampp/htdocs/dBug/dBug.php";

 list($contactRecords, $contactMetaData) = getRecords(array(
    'tableName'   => 'contact',
  	));
  	$selectedContactRecord = @$contactRecords[0]; // get first selectedContactRecord   
  	// show error message if no matching selectedContactRecord is found
  		if (!$contactRecords) {
    	print "Record not found!";
    	exit;
  	}
?>

<!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=utf-8" />
<title><?php echo $selectedContactRecord['metaTitle'] ?></title>
<meta name="keywords" content="<?php echo $selectedContactRecord['metaKeywords'] ?>" />
<meta name="description" content="<?php echo $selectedContactRecord['metaDescription'] ?>" />
<link href="assets/css/jubileehighschool.css" rel="stylesheet" type="text/css" />
<script src="assets/js/swfobject.js" type="text/javascript"></script>
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=abcdefg&sensor=true_or_false&amp;key=ABQIAAAAgZd7zZ21nnb3eWIuZ41IhBSCCW54gislk1q4c2N5MqwVPoJazhRXV1crCULfGv2F-J4WY407jKkXcA" type="text/javascript"></script>

<!-- LIVE KEY: ABQIAAAAgZd7zZ21nnb3eWIuZ41IhBTwT504Xq3rWe0ut7AuGE6YfOBuHhSsduNK0gi7aX80EagPwff1KWF2Mw
DEV KEY: ABQIAAAAgZd7zZ21nnb3eWIuZ41IhBSCCW54gislk1q4c2N5MqwVPoJazhRXV1crCULfGv2F-J4WY407jKkXcA -->
</head>
<body onload="initialize()" onunload="GUnload()">
	<div class="container">
    	<?php $thisPage=""; ?>
		<?php include("navigation/navigation.php"); ?>
        <div class="flash">
          <?php foreach ($contactRecords as $featureRecord): ?>         
			<?php if(strlen($featureRecord['featureSelect'] == "Top Feature")) {?>
                <?php //new dBug($featureRecord);?>
                <div class="topFeature">
                    <?php 	
						$content = $featureRecord['content'];
						$regExp  = "/^\s*<p>/i";
						$content = preg_replace($regExp, "", $content ); 
						echo $content;
					?>
                 </div>
            <?php } ?>
        <?php endforeach; ?>
        <?php if (count($selectedContactRecord['slideShow']) == 0):  ?>
            <img class="defaultImage" src="assets/images/defaultImage.jpg" alt="School Classroom" />
		<?php else: ?>
        	<?php 
				$slideShowXML = 'http://localhost/jubileehigh/assets/xml/contactImages.xml.php?recordNum';
				$slideshowRecord = $selectedContactRecord['num'];
			?>
       		<script type="text/javascript">
                if(typeof swfobject == "undefined"){
                    alert("The swfobject.js file is missing");
                }else{
                    swfobject.embedSWF ( 
                        "assets/flash/contact.swf", "flash", "751", "289", 
                        "7.0.0", "assets/flash/expressInstall.swf", 
                        { 'xmlfile':'<?php echo $slideShowXML ?>=<?php echo $slideshowRecord ?>' }, { 'wmode':'Opaque' }, { 'id':'flash','class':'flashClass' }
                    );
                }
            </script>
			<div id="flash" class="noFlash">
            	<p>You must have JavaScript enabled and have the<br />
                latest <a href="http://www.adobe.com/go/getflashplayer" target="_blank">Flash Player</a> installed to view this movie.</p>
            </div>
         	<?php endif ?>
        </div>
        <div class="maintext contact">
			<?php foreach ($contactRecords as $featureRecord): ?>
            	<?php if(strlen($featureRecord['featureSelect'] == "Right Feature")) {?>
                    <div class="feature">
                    	<?php 	
							$content = $featureRecord['content'];
							$regExp  = "/^\s*<p>/i";
							$content = preg_replace($regExp, "", $content ); 
							echo $content;
						?>
                    </div>
                <?php } ?>
            <?php endforeach; ?>
            <div class="homeContent">
            	<h1>Search Results</h1>
                <p>Searched for: <?php echo ?></p>
            </div>
        </div>
        <?php include("navigation/footer.php"); ?>
	</div>
</body>
</html>