owner == $data['login']){ echo "
"; if(isset($_POST['VA'])) { $inzet = $_POST['inzet']; echo ""; } if(isset($_POST['stort'])) { $inzet = $_POST['bedrag']; echo ""; } if(isset($_POST['afhalen'])) { $inzet = $_POST['bedrag']; echo ""; } $dbres = mysql_query("SELECT * FROM `[buildings]` WHERE `type`='slot' AND `city`='{$data['land']}'"); $aantal = mysql_fetch_object($dbres); $winstt = number_format($aantal->profit,0); $casinobank = number_format($aantal->bank, 0, ",", "."); if($aantal->owner == $data['login']) { $casinobank = number_format($aantal->bank, 0, ",", "."); $cash = number_format($data['cash'], 0, ",", "."); $bank = $aantal->profit; if($bank > 0){ $fruitwinst = number_format($aantal->profit, 0, ",", "."); $fruitwinst = '$'.$fruitwinst.''; } if($bank < 0){ $fruitwinst = number_format($aantal->profit, 0, ",", "."); $fruitwinst = '$'.$fruitwinst.''; } if($bank == 0){ $fruitwinst = number_format($aantal->profit, 0, ",", "."); $fruitwinst = '$'.$fruitwinst.''; } echo ""; exit; } } if($aantal->owner == '' and $_GET['koop'] != 'oke'){?>
Fruitmachine
"; if(! preg_match('/^[0-9]{0,15}$/',$inzet)){ print "Onjuiste invoer"; } elseif($inzet < 1000){ echo "Je inzet moet hoger als \$1000 zijn!"; } elseif($inzet > 10000000){ echo "Je inzet moet lager zijn als \$10.000.000"; } else{ mysql_query("UPDATE `[buildings]` SET `price`='$inzet' WHERE `type`='slot' AND `city`='".$data['land']."'") or die(mysql_error()); $inzet2 = number_format($inzet, 0, ",", "."); echo "De maximum inzet is veranderd naar € $inzet2"; } echo "
"; if(! preg_match('/^[0-9]{0,15}$/',$_POST['bedrag'])){ print "Onjuiste invoer"; } elseif($inzet < 1){ echo "Geen negatieve getallen invullen!"; } elseif($data['cash'] < $inzet){ print "Je hebt niet genoeg geld!"; } else{ mysql_query("UPDATE `[users]` SET `cash`=`cash`-'$inzet' WHERE `login`='{$data['login']}'"); mysql_query("UPDATE `[buildings]` SET `bank`=`bank`+'$inzet' WHERE `type`='slot' AND `city`='".$data['land']."'") or die(mysql_error()); $inzet2 = number_format($inzet, 0, ",", "."); echo "Je hebt € $inzet2,- op de casinobank gestort!"; } echo "
"; if(! preg_match('/^[0-9]{0,15}$/',$_POST['bedrag'])){ print "Onjuiste invoer"; } elseif($inzet < 1){ echo "Geen negatieve getallen invullen!"; } elseif($aantal->bank < $inzet){ print "Er staat niet genoeg geld op de casinobank!"; } else{ mysql_query("UPDATE `[users]` SET `cash`=`cash`+'$inzet' WHERE `login`='{$data['login']}'"); mysql_query("UPDATE `[buildings]` SET `bank`=`bank`-'$inzet' WHERE `type`='slot' AND `city`='{$data['land']}'"); $inzet2 = number_format($inzet, 0, ",", "."); echo "Je hebt € $inzet2 van de casinobank afgehaalt!"; } echo "
Je hebt € $fruitwinst,- Winst gemaakt met je Fruitmachine.

Geld in de Casino-Bank: € $casinobank
Geld op zak : € $cash

Maximum inzet price>

Let erop als er geen geld meer op de casinobank staat zul je hem verliezen!

Stuur geld naar de casinobank:
$

Fruitmachine
Dit casino-spel is van niemand !
Klik hier om het Casino-Spel te kopen.
owner == '' and $_GET['koop'] == 'oke'){ if($data['belcredits'] >= 100 and numcheck('city','[buildings]',' WHERE owner="'.$data['login'].'"') == 0){ mysql_query("UPDATE `[buildings]` SET owner='".$data['login']."' WHERE city='".$data['land']."'"); mysql_query("UPDATE `[users]` SET belcredits = belcredits - 100 WHERE login='".$data['login']."'"); $error = 'Je hebt succesvol dit casino-spel gekocht.'; header("Refresh: 2; URL=fruitmachine.php"); }else{ $error = 'Je hebt niet genoeg belcredits of je hebt meer dan 1 casino-spel van dit soort !'; } ?>
Fruitmachine
owner != ''){ $ownerr = ($aantal->owner == "") ? "Neem over!" : "owner}\">$aantal->owner"; $owner = $aantal->owner; ?> price/10; $inzet2 = number_format($inzet, 0, ",", "."); $omfg = $lol; $inzet3 = number_format($omfg, 0, ",", "."); if(!preg_match('/^[0-9]{1,15}$/',$_POST['inzet']) OR $_POST['inzet'] < 1){ echo ""; } elseif($inzet > $data['cash']){ echo ""; } elseif($lol > $inzet) { echo ""; } elseif ($data['login'] == $aantal->owner){ echo ""; } elseif($inzet > $aantal->price) { echo ""; } else { if($aantal->bank < 0) { mysql_query("UPDATE `[buildings]` SET `owner`='{$data['login']}', `profit`='0',`price`='0', `bank`='0' WHERE `city`='{$data['land']}'"); echo ""; exit; } if($aantal->profit >0){ $nr12 = rand(0,71); $nr22 = rand(0,71); $nr32 = rand(0,71); $nr11 = array("1","2","3","4","5","6","7","8","3","4","5","6","7","8","3","4","5","6","7","8","3","5","6","7","8","3","4","2","5","6","4","1","6","3","7","5","6","7","8","3","4","5","6","7","8","3","4","5","6","7","8","3","5","6","7","8","3","4","2","5","6","4","5","6","7","8","5","6","7","8","3","4"); $nr21 = array("1","2","3","4","5","6","7","8","3","4","5","6","7","8","3","4","5","6","7","8","3","5","6","7","8","3","4","4","5","6","4","1","6","3","7","5","6","7","8","3","4","5","6","7","8","3","4","5","6","7","8","3","5","6","7","8","3","4","4","5","6","4","5","6","7","8","5","6","7","8","3","4"); $nr31 = array("1","2","3","4","5","6","7","8","3","4","5","6","7","8","3","4","5","6","7","8","3","5","6","7","8","3","4","4","5","6","4","1","6","3","7","5","6","7","8","3","4","5","6","7","8","3","4","5","6","7","8","3","5","6","7","8","3","4","4","5","6","4","5","6","7","8","5","6","7","8","3","4"); } else { $nr12 = rand(0,81); $nr22 = rand(0,81); $nr32 = rand(0,81); $nr11 = array("1","2","3","4","5","6","7","8","3","9","5","6","7","8","3","3","5","6","4","8","3","5","6","7","8","7","5","5","7","8","3","1","5","8","5","8","1","3","5","6","7","8","3","9","5","6","7","8","3","3","5","6","4","8","3","5","6","7","8","7","5","5","7","8","3","1","5","8","5","8","5","6","7","8","5","6","7","8","5","6","7","8"); $nr21 = array("1","2","3","4","5","6","7","8","3","9","5","6","7","8","3","3","5","6","4","8","3","5","6","7","8","7","5","5","7","8","3","1","5","8","5","8","1","3","5","6","7","8","3","9","5","6","7","8","3","3","5","6","4","8","3","5","6","7","8","7","5","5","7","8","3","1","5","8","5","8","5","6","7","8","5","6","7","8","5","6","7","8"); $nr31 = array("1","2","3","4","5","6","7","8","3","9","5","6","7","8","3","3","5","6","4","8","3","5","6","7","8","7","5","5","7","8","3","1","5","8","5","8","1","3","5","6","7","8","3","9","5","6","7","8","3","3","5","6","4","8","3","5","6","7","8","7","5","5","7","8","3","1","5","8","5","8","5","6","7","8","5","6","7","8","5","6","7","8"); } $nr1 = $nr11[$nr12]; $nr2 = $nr21[$nr22]; $nr3 = $nr31[$nr32]; print << ENDHTML; echo ""; } } $price = number_format($aantal->price,0,",","."); $check = $aantal->price/10; $price2 = number_format($check,0,",","."); ?>
Fruitmachine
Ongeldig bedrag geld
"; echo "
Je hebt niet genoeg geld.
"; echo "
Je inzet is lager dan het minimum bod € $inzet3
"; echo "
Jij bent de eigenaar
Zelf kun je dus niet spelen
"; echo "
Je inzet is hoger dan het maximum bod € $inzet2
"; echo "
"; echo "De eigenaar van dit casino kon je niet uitbetalen!
Het casino is nu van jou!
"; echo "
"; if($nr1 == 1 && $nr2 == 1 && $nr3 == 1){ $profit2 = round($inzet*76); $profit1 = round($profit2-$inzet); $profit = number_format($profit1,0,",","."); echo "Gefeliciteerd!
Je hebt € $profit gewonnen"; } elseif($nr1 == 2 && $nr2 == 2 && $nr3 == 2){ $profit2 = round($inzet*51); $profit1 = round($profit2-$inzet); $profit = number_format($profit1,0,",","."); echo "Gefeliciteerd!
Je hebt € $profit gewonnen"; } elseif($nr1 == 3 && $nr2 == 3 && $nr3 == 3){ $profit2 = round($inzet*36); $profit1 = round($profit2-$inzet); $profit = number_format($profit1,0,",","."); echo "Gefeliciteerd!
Je hebt € $profit gewonnen"; } elseif(($nr1 == 4 && $nr2 == 4 && $nr3 == 4) XOR ($nr1 == 4 && $nr2 == 4 && $nr3 == 9) XOR ($nr1 == 4 && $nr2 == 9 && $nr3 == 9) XOR ($nr1 == 9 && $nr2 == 9 && $nr3 == 9) XOR ($nr1 == 9 && $nr2 == 9 && $nr3 == 4) XOR ($nr1 == 9 && $nr2 == 4 && $nr3 == 4) XOR ($nr1 == 9 && $nr2 == 4 && $nr3 == 9) XOR ($nr1 == 4 && $nr2 == 9 && $nr3 == 4)){ $profit2 = round($inzet*7); $profit1 = round($profit2-$inzet); $profit = number_format($profit1,0,",","."); echo "Gefeliciteerd!
Je hebt € $profit gewonnen"; } elseif($nr1 == 2 XOR $nr2 == 2 XOR $nr3 == 2){ $profit2 = round($inzet*4); $profit1 = round($profit2-$inzet); $profit = number_format($profit1,0,",","."); echo "Gefeliciteerd!
Je hebt € $profit gewonnen"; } elseif(($nr1 == 2 && $nr2 == 2) XOR ($nr2 == 2 && $nr3 == 2) XOR ($nr3 == 2 && $nr1 == 2)){ $profit2 = round($inzet*8); $profit1 = round($profit2-$inzet); $profit = number_format($profit1,0,",","."); echo "Gefeliciteerd!
Je hebt € $profit gewonnen"; } elseif(($nr1 == 4 && $nr2 == 4) XOR ($nr1 == 4 && $nr2 == 9) XOR ($nr1 == 9 && $nr2 == 4) XOR ($nr1 == 9 && $nr2 == 9) XOR ($nr1 == 4 && $nr3 == 4) XOR ($nr1 == 4 && $nr3 == 9) XOR ($nr1 == 9 && $nr3 == 4) XOR ($nr1 == 9 && $nr3 == 9) XOR ($nr2 == 4 && $nr3 == 4) XOR ($nr2 == 4 && $nr3 == 9) XOR ($nr2 == 9 && $nr3 == 4) XOR ($nr2 == 9 && $nr3 == 9)){ $profit2 = round($inzet*7); $profit1 = round($profit2-$inzet); $profit = number_format($profit1,0,",","."); echo "Gefeliciteerd!
Je hebt € $profit gewonnen"; } else{ $profit2 = round($inzet); $profit1 = round(0-$inzet); $profit = number_format($profit2,0,",","."); print"
Je hebt € $profit verloren.
"; } mysql_query("UPDATE `[buildings]` SET `profit`=`profit`-$profit1 WHERE `type`='slot' AND `city`='{$data['land']}'"); mysql_query("UPDATE `[buildings]` SET `bank`=`bank`-'$profit1' WHERE `city`='{$data['land']}'"); mysql_query("UPDATE `[users]` SET `cash`=`cash`+'$profit1' WHERE `login`='{$data['login']}'"); echo "
Inzet:
,-

Deze fruitmachine heeft als eigenaar .
De maximale inzet is ,-
De minimale inzet is ,-