<?
	session_start();

	// HTTP headers for no cache etc
	header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
	header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
	header("Cache-Control: no-store, no-cache, must-revalidate");
	header("Cache-Control: post-check=0, pre-check=0", false);
	header("Pragma: no-cache");

	if($_SESSION['id_gracza']!=NULL and $_SESSION['pokoj_gracza']!=NULL){
		include $_SERVER['DOCUMENT_ROOT']."/include/baza_danych.php";
		echo $czy_koniec_rozgrywki = mysql_result(mysql_query("SELECT COUNT(*) FROM pokoje WHERE id='".$_SESSION['pokoj_gracza']."' and stan='0';"),0);
	}
?>