<?
session_start();
?>
<html>
<head>
<body>
<link rel="stylesheet" type="text/css" href="style.css">
<?
include("forb.php");
include("menu.php");
include("check.php");
include("bingo_menu.php");
$admins1 = array('Ejer', 'Webmaster', 'Bingo');
if(in_array($_SESSION[Rang], $admins1)){
$tal = mt_rand(1,99);
$q1 = mysql_query("select * from bingo_udtrukket where tal = '$tal'");
$antal = mysql_num_rows($q1);
if($antal == '1'){
print "Tallet er allerede udtrukket!<br><a href='traek_tal.php'>Find nyt tal!</a>";
}else{
mysql_query("UPDATE bingo SET tal1 = 'X' WHERE tal1 = '$tal'");
mysql_query("UPDATE bingo SET tal2 = 'X' WHERE tal2 = '$tal'");
mysql_query("UPDATE bingo SET tal3 = 'X' WHERE tal3 = '$tal'");
mysql_query("UPDATE bingo SET tal4 = 'X' WHERE tal4 = '$tal'");
mysql_query("UPDATE bingo SET tal5 = 'X' WHERE tal5 = '$tal'");
mysql_query("UPDATE bingo SET tal6 = 'X' WHERE tal6 = '$tal'");
mysql_query("UPDATE bingo SET tal7 = 'X' WHERE tal7 = '$tal'");
mysql_query("UPDATE bingo SET tal8 = 'X' WHERE tal8 = '$tal'");
mysql_query("UPDATE bingo SET tal9 = 'X' WHERE tal9 = '$tal'");
mysql_query("INSERT INTO bingo_udtrukket SET tal = '$tal'");
print "Tallet er nu udtrukket!";
print "<br />";
print "<a href='traek_tal.php'>Find nyt tal!</a>";
}}
?></center>
</html>
</head>
</body>