<? include $DOCUMENT_ROOT."/zzzfilelist.inc"; ?>
<? include Inc("metootop.inc.php"); ?>
<? $where="indexmetoo"; include Inc("checkgameaccess.inc.php"); ?>
<?
	if ($askforgame!=0) {
		$text="<html>Request to access game ".$askforgame." by <b>".$login."<br>";
		$text.=$login."</b> is ".$firstname." ".$lastname."<br>";
		$text.="Game ".$askforgame." is ".$gamecell[$askforgame][2]."<br>";
		$text.="<br>";
		$text.="<a href='".IncCL("validateaccess.php")."?askinggame=$askforgame&askinguser=$user'>Click here to validate complete access</a><br>";
		$text.="<a href='".IncCL("validateaccess.php")."?askinggame=$askforgame&askinguser=$user&limited=yes'>For a limited access click here</a><br>";
		$text.="<br>";
		$text.="<a href='".IncCL("validateaccess.php")."?askinggame=$askforgame&askinguser=$user&refuse=yes'>To refuse access and warn the user click here</a><br>";
		$text.="<br>";
		$text.="<a href='mailto:$email'>Contact the user</a><br>";
		$text.="</html>";
		$headers  = "MIME-Version: 1.0\r\n";
		$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
#		mail("fcambounet@yahoo.com", "MeToo game access", $text, $headers);
		mail($usercell[$gamecell[$askforgame][4]][5], "MeToo game access", $text, $headers);
		echo "<br><center><font class='orangenormal'><b>".$loc[$loctag[2]+10][$lang]."</b></font><br>";
	}
?>
<center>
<?
	echo "<br>";
	echo "<table>";
	$nbaccess=0;
	for ($n=1; $n<=$gamenb; $n++) {
		if ($game_status[$n]!="closed") {
		if (($getaccess[$n]) || ($getaccesslimited[$n])) {
			$nbaccess++;
			if (odd($nbaccess)) {
				if ($nbaccess!=1) {
					echo "</tr><tr height=30><td colspan=3>&nbsp;</td></tr>";
				}
				echo "<tr align=center valign=top>";
			} else {
				echo "<td width=50>&nbsp;</td>";
			}
			echo "<td>";
			echo "<font color=#FFFF00><a href='".IncL("checkauth.php")."?game=$n'>";
			echo "<img src='".DirL('picsdir.txt')."game".$n.".jpg' border=0><br>";
			$display=$loc[$loctag[2]+6][$lang]." ".$game_nb[$n];
			if ($game_name[$n]!="") { $display.=" : <b>".$game_name[$n]."</b>"; }
			$display=str_replace(" ","&nbsp;",$display);
			echo $display;
			echo "</a>";
			echo "<br>";
			echo "<table><tr align=center valign=bottom>";
			echo "<td>";
			echo "<font size=-1><a href='".IncL("enterdata.php")."?game=$n'>";
			echo "<img src='".IncL('turnresult.gif')."' border=0><br>";
			$display=$loc[$loctag[2]+7][$lang]."</a>";
			$display=str_replace(" ","&nbsp;",$display);
			echo $display;
			echo "</td><td width=10>&nbsp;</td><td>";
			echo "<font size=-1><a href='".IncL("enterorders.php")."?game=$n'>";
			echo "<img src='".IncL('sendorders.gif')."' border=0><br>";
			$display=$loc[$loctag[2]+35][$lang]."</a>";
			$display=str_replace(" ","&nbsp;",$display);
			echo $display;
			echo "</td>";
			echo "</tr></table>";
			echo "</td>";
			$playeraccess=true;
		}
		}
	}
	echo "</tr></table>";
	echo "<br><br>";
		
	echo "<table>";
	$nbaccess=0;
	for ($n=1; $n<=$gamenb; $n++) {
		if ($game_status[$n]!="closed") {
		if ((!$getaccess[$n]) && (!$getaccesslimited[$n])) {
			$nbaccess++;
			if (odd($nbaccess)) {
				if ($nbaccess!=1) {
					echo "</tr><tr height=30><td colspan=3>&nbsp;</td></tr>";
				}
				echo "<tr align=center valign=top>";
			} else {
				echo "<td width=50>&nbsp;</td>";
			}
			echo "<td>";
			echo "<img src='".DirL('picsdir.txt')."game".$n."_no.jpg' border=0><br>";
			echo "<font color=#FFFF00 size=-1>".$loc[$loctag[2]+8][$lang]." ".$game_nb[$n];
			if ($gamecell[$n][2]!="") { echo " : ".$gamecell[$n][2]; }
			echo "<br><a href='".IncL("index_metoo.php")."?askforgame=$n'>".$loc[$loctag[2]+9][$lang]."</a></font>";
			echo "</td>";
		}
		}
	}
	echo "</tr></table>";
?>
<? $showaccessadminmenu=true; include Inc("metoobottom.inc.php"); ?>