<?php

ob_start();
if ( !session_id() ) {session_start();}
/*
	if(strstr($_SERVER['HTTP_ACCEPT'], "application/xhtml+xml")) {
		header("Content-Type: application/xhtml+xml; charset: utf-8");
	}
	else { */
		header("Content-Type: text/html");
		header("Charset: utf-8");
//	}
?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
		 
<html xmlns="http://www.w3.org/1999/xhtml" lang="pl" xml:lang="pl">

	<head>
	<title>Teatr w Eldoracie</title>
	<link href="style.css" rel="stylesheet" type="text/css" />
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	</head>

	<body>
	
<?php 
require("dbconfig.php"); 
?>
	  
		<div id="container">
			<div id="topbanner">
			<div id="menu">
				<ul class="menu">
					<li class="menuElement"><a href="index.php" class="menuItem floatLeft">Strona główna</a></li>
					<li class="menuElement"><a href="index.php?t=info" class="menuItem floatLeft">Budynek teatru</a></li>
					<li class="menuElement"><a href="index.php?t=repertuar" class="menuItem floatLeft">Repertuar</a></li>
					<?php
					if (!isset($_SESSION['userID'])) { ?>
					<li class="menuElement"><a href="index.php?t=login" class="menuItem floatLeft">Login</a></li> <?php } ?>
					<li class="menuElement"><strong><a href="http://www.sclavinia.sarmacja.org" class="menuItem floatRight">Sclavinia</a></strong></li>
					<?php
					if (isset($_SESSION['userID'])) {
					echo "<li class=\"menuElement\"><a href=\"index.php?t=cp\" class=\"menuItem floatLeft\"><strong>Panel</strong></a></li>";
					echo "<li class=\"menuElement\"><a href=\"index.php?t=login\" class=\"menuItem floatLeft\"><strong>Wyloguj</strong></a></li>";
					} ?>
				</ul>
			</div>
			</div>
			<div id="content">
			<?php
			if (!isset($_GET['t']) || $_GET['t'] == 'scene') {
			$t = "main";
			}
			else {
			$t = $_GET['t'];
			}
			include ("$t.php");
			?>
			</div>
			<div id="bottom">
			<p>
				<a href="http://validator.w3.org/check?uri=referer"><img
					 src="imgs/xhtml.gif"
					 alt="Valid XHTML 1.0 Strict" 
					 class="button"/></a>
			</p>
			</div>
		</div>
		
	</body>
	
</html>