<?php
if (!defined('EXTERNAL')) {
echo '<!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>'.$sg->config->gallery_name.' - '.$sg->pageTitle().'</title>
<style type="text/css">@import url('.$sg->config->base_url.$sg->config->pathto_current_template.'css/layout.css);</style>
<style type="text/css">@import url('.$sg->config->base_url.$sg->config->pathto_current_template.'css/color_'.$sg->config->template_scheme.'.css);</style>
<!--[if IE]><link rel="stylesheet" type="text/css" media="all" href="'.$sg->config->base_url.$sg->config->pathto_current_template.'css/ie.css"><![endif]-->';
if(!$sg->isImagePage()) {
	echo "\n".
	'<link rel="alternate" type="application/rss+xml" title="'.$sg->gallery->name().'" href="'.$sg->gallery->URL();
		if(!strstr($sg->gallery->URL(), '?')) { echo '?'; } else { echo '&'; };
	echo 'template=rss" />';
	}
/*	
//Description	
echo "\n".'<meta name="description" content="'.$sg->gallery->description().'" />'."\n";
//Title
echo "\n".'<meta name="DC.title" content="'.$sg->gallery->description().'" />'."\n";
//Description
echo "\n".'<meta name="DC.description" content="'.$sg->gallery->description().'" />'."\n";
//Creator/Photographer
echo "\n".'<meta name="DC.creator" content="'.$sg->gallery->description().'" />'."\n";
//"singapore image gallery"
echo "\n".'<meta name="DC.publisher" content="'.$sg->gallery->description().'" />'."\n";
//Date
echo "\n".'<meta name="DC.date" content="'.$sg->gallery->description().'" />'."\n";
//Format (mime type)
echo "\n".'<meta name="DC.format" content="'.$sg->gallery->description().'" />'."\n";
//Rights (copyright)
echo "\n".'<meta name="DC.rights" content="'.$sg->gallery->description().'" />'."\n";
*/
echo $sg->navigationLinks().'</head>
<body>
';
}
	if (!isset($_GET["gallery"]) && $sg->config->update_check == 1 && $sg->isLoggedIn()) {
		$handle = fopen($sg->config->update_url."update.php", "r"); 
	    $buffer = fgets($handle);
	    $thisBuffer = str_replace(' ', '', $buffer);
	    if ($thisBuffer != $sg->config->current_version) { echo '<div id="sgUpdate">There is a new version of Modern ('.$thisBuffer.') - <a href="'.$sg->config->update_url.$thisBuffer.'.zip">Download</a> - <a href="http://www.abitcloser.com/projects/singapore/">Read More</a></div>'; };
	    fclose($handle);
	}
?>

<!-- 
	This page was generated by singapore <http://singapore.sourceforge.net>
	singapore is free software licensed under the terms of the GNU GPL.

	Modern Template <? echo $sg->config->current_version ?> by Ross Howard
	http://www.abitcloser.com/projects/singapore 
-->
<div id="sgContainer">
	<div id="sgHeader">
		<div id="sgOptions"><?php echo $sg->languageFlipper(); ?><?php echo $sg->templateFlipper(); ?></div>		
		<div class="sgCrumb"><?php echo $sg->crumbLine(); ?></div>
<!-- end of header.tpl.php -->