<?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]-->
<link rel="alternate" type="application/rss+xml" title="'.$sg->pageTitle().'" href="'.$_SERVER["PHP_SELF"]; if (isset($_GET["gallery"])) { echo '?gallery='.$_GET["gallery"];} echo '&template=rss" />
'.$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 -->