<?php
include("include/casino.class.php");
require "include/bittorrent.php";

dbconn();
loggedinorreturn();

$casino = new Casino($CURUSER["id"]);

// Wurde "Rot oder Schwarz" gespielt?
if (isset($_POST["c_rob"])) {
	$game = $casino->playRedOrBlack($_POST["c_farbe"], $_POST["c_stake"]);
	$type = 1;
	Casino::resetDize();
}
elseif (isset($_POST["c_dice"])) {
	$game = $casino->playDice($_POST["c_wurf"], $_POST["c_stake"]);
	$type = 2;
}
elseif (isset($_POST["c_bet"])) {
	$game = $casino->playBetOrDie($_POST["c_number"]);
	$type = 3;
	Casino::resetDize();
}

header("Location: casino_frame.php?t=$type&g=$game&z=".$casino->zuf);
?>