<?php header('Content-type: text/html; charset=utf-8');
  /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */
  //require_once "/var/www/vhosts/janizm.co.uk/httpdocs/cmsAdmin/lib/viewer_functions.php";
  require_once "C:/Users/Dani/Documents/xampp-win32-1.6.6a/xampp/htdocs/janizm/cmsAdmin/lib/viewer_functions.php";
  
  	list($galleryRecords, $galleryMetaData) = getRecords(array( 
  	'tableName'	=> 'gallery', 
  	'where'		=> whereRecordNumberInUrl(1),
  	'limit'		=> '1', 
  	)); 
  	$selectedGalleryRecord = @$galleryRecords[0]; // get first record   
  	// show error message if no matching record is found
  		if (!$selectedGalleryRecord) {
    	print "Record not found!";
    	exit;
  	}

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="<?php echo $selectedGalleryRecord['metakeywords'] ?>" />
<meta name="description" content="<?php echo $selectedGalleryRecord['metadescription'] ?>" />
<link href="css/janizm.css" rel="stylesheet" type="text/css" />
<title><?php echo $selectedGalleryRecord['name'] ?></title>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript">
</script><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10563878-1");
pageTracker._trackPageview();
} catch(err) {}</script>
<body>
<?php include("navigation/ie6death.php"); ?>
	<div class="container">
       	<?php include("navigation/navigation.php"); ?>
		<?php //new dBug (count($selectedGalleryRecord['gallery_images'])); ?>
		<div class="mainText">
		<?php if (count($selectedGalleryRecord['gallery_images']) == 0):  ?>
			<?php echo $selectedGalleryRecord['content'] ?>
		<?php else: ?>
			<?php echo $selectedGalleryRecord['content'] ?>	
			<div class="flashContent">
				<script language="JavaScript" type="text/javascript">
					AC_FL_RunContent(
						'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
						'width', '630',
						'height', '420',
						'src', 'slideshowpro',
						'quality', 'high',
						'pluginspage', 'http://www.adobe.com/go/getflashplayer',
						'align', 'middle',
						'play', 'true',
						'loop', 'true',
						'scale', 'showall',
						'wmode', 'window',
						'devicefont', 'false',
						'id', 'slideshowpro',
						'bgcolor', '#ffffff',
						'name', 'slideshowpro',
						'menu', 'true',
						'allowFullScreen', 'false',
						'allowScriptAccess','sameDomain',
						'movie', 'slideshowpro',
						'salign', '',
						'FlashVars','xmlfile=http://www.janizm.co.uk/images.xml.php?recordNum=<?php echo $selectedGalleryRecord ['num']?>'
						); 
				</script>
				<noscript>
					<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
					<p><a href="http://www.adobe.com/go/getflashplayer" target="_blank"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
				</noscript>
			</div>			
		<?php endif ?>	
        </div>
        <br class="clearBoth" />
</div>
       	<?php include("navigation/footer.php"); ?>
</body>
</html>
