<?php
	require("__include-common.php");
	require("../account/__logincheck.php");
	if ($_SESSION['photo_open_path'] == '') {
		header("Location: index.php");
	}
	if (empty($_SESSION['photo'])) {
		header("Location: index.php");
	}
	if (empty($_SESSION['photo_img_count'])) {
		header("Location: index.php");
	}
	if ($_SESSION['photo_img_count'] < 1) {
		header("Location: index.php");
	}
	$open_path = $_SESSION['photo_open_path'];
	if (defined("photo_LIMITED_IMAGES_FOLDER") and photo_LIMITED_IMAGES_FOLDER <> '') {
		if ($_SESSION['システム管理者'] <> 'YES' or photo_LIMITED_ADMIN_NOLIMIT <> 'YES') {
			$len = strlen(photo_LIMITED_IMAGES_FOLDER);
			if (substr($open_path.'/', 0, $len+1) <> photo_LIMITED_IMAGES_FOLDER.'/') {
				header("Location: index.php");
			}
		}
	}
?>
<!DOCTYPE html>
<html>
<head>
<title>MyHome Photo Gallery</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="description" content="Fresh Sliding Thumbnails Gallery with jQuery and PHP" />
<meta name="keywords" content="jquery, images, gallery, full page, thumbnails, scrolling, sliding, php, xml"/>
<link rel="stylesheet" href="css/gallery-style.css" media="screen"/>
<style>
span.reference{
	position:fixed;
	left:10px;
	bottom:0px;
	font-size:9px;
}
span.reference a{
	color:#aaa;
	text-decoration:none;
}
span.reference a:hover{
	color:#ddd;
}
a.a_cancel_back {
	color:#fff;
	text-decoration:none;
}
</style>
</head>
<body>
<div class="albumbar">
	<span>MyHome Photo Gallery</span>
	<div id="albumSelect" class="albumSelect">
	<a class="a_cancel_back" href="javascript:location.href='index.php';">Return</a>
	</div>
</div>
<div id="loading"></div>
<div id="preview">
	<div id="imageWrapper">
	</div>
</div>
<div id="thumbsWrapper">
</div>
<div class="infobar">
	<span id="description"></span>
	<span class="reference">
	<a href="http://tympanus.net/codrops/2010/05/23/fresh-sliding-thumbnails-gallery-with-jquery-php" target="_blank">&copy;Codrops</a>&nbsp;<span style="color:#aaa;">&amp;</span>
	<a href="http://ok2nd.web.fc2.com/" target="_blank">&copy;ok.2nd</a>
	</span>
	<span id="autoStaus"></span>
</div>
<script src="../scripts/jquery.js"></script>
<script src="../scripts/jquery.cookie.js"></script>
<script src="../scripts/jquery.timer.js"></script>
<script src="scripts/jquery.gallery.js"></script>
</body>
</html>
