Je hebt {$_POST['amount']} loten gekocht.";
$data->cash -= round($_POST['amount']*$lottery[ticketprice]);
$lottery[pot] += round($_POST['amount']*$lottery[ticketprice]);
$lottery[ticketssold] += $_POST['amount'];
mysql_query("UPDATE `[users]` SET `cash`='{$data->cash}' WHERE `login`='{$data->login}'");
}
}
$ticketssold = number_format($lottery[ticketssold],0);
$ticketprice = number_format($lottery[ticketprice],0);
$pot = number_format($lottery[pot],0);
$dbres = mysql_query("SELECT * FROM `lottery` WHERE `active`='0' ORDER BY `start` DESC LIMIT 0,1");
$lw = mysql_fetch_assoc($dbres);
$winner = $lw[winner];
?>
Loterij |
De Winnaar van de laatste loterij was: =$winner;?> Er zijn al =$ticketssold;?> loten verkocht, de jackpot staat nu op €=$pot;?>
|
Naam | Prijs per lot | Trekking | Kopen |
=$lottery[name];?> | €=$ticketprice;?> | Iedere Week |
Er is geen actieve loterij! | \n";
$yourtickets = "";
$dbres = mysql_query("SELECT * FROM `lottery-tickets` WHERE `login`='{$data->login}' AND `lotterynr`='{$lottery[id]}'");
while($yourticket = mysql_fetch_assoc($dbres)) {
$yourtickets .= "{$yourticket[id]}, ";
}
$yourtickets = ($yourtickets == '') ? "Je hebt geen loten" : $yourtickets;
$yourtickets = (isset($_GET['show'])) ? $yourtickets : "Je hebt momenteel $sql loten, Klik hier je loten te bekijken";
?>
|