<?php
session_start();
$key_code = $_SESSION['TouchGirl_key'];
$check_flg = false;
if(!empty($key_code)){
	//$_SESSION['TouchGirl_key'] = null;
	$check_flg = true; 
}
?>
<!doctype html>
<html lnag="ja">
	<head>
		<meta charset="UTF-8" />
		<title>お・さ・わ・り☆タッチ・ガール</title>
		<meta name="viewport" content="width=device-width">
		<link rel="stylesheet" type="text/css" href="./css/degine.css?0000">
	</head>
	<body id="body" class="body_degine">
	<script>
	function check(){
		if(!window.opener || window.opener.closed){ // メインウィンドウの存在をチェック
			document.location.href = "https://littleambition.qc-soft.com/"; // 存在する場合はページを切りかえる
		}
	}
	check();
	</script>
	<?php
	if($check_flg){
		//ゲームスタート
		echo'
			<script src="./game.js?202305091246"></script>
			<script>
				xmlDataForHtml.replace("%tilte%",document.title);
				document.write(xmlDataForHtml);
			</script>
			?>
		';
	}else{
		http_response_code( 301 );
		header( "Location: https://littleambition.qc-soft.com/");
		exit ;
	}
	?>
	</body>
</html>