Het probleem bij dit script:
Ik verlies altijd, dus wat gaat er mis:
En hier ontvangt hij het script:
Iemand een idee?
Ik verlies altijd, dus wat gaat er mis:
PHP:
<?php
/*---------------------------------------------------+
| HoloCMS - Website and Content Management System
+----------------------------------------------------+
| Copyright © 2008 Meth0d
+----------------------------------------------------+
| HoloCMS is provided "as is" and comes without
| warrenty of any kind.
+---------------------------------------------------*/
include('core.php');
include('casino_config.php');
include('includes/session.php');
include('includes/news_headlines.php');
if($_GET['do'] == "RemoveFeedItem" && is_numeric($_GET['key'])){ // ex. me.php?do=RemoveFeedItem&key=5
mysql_query("DELETE FROM cms_alerts WHERE userid = '".$my_id."' AND id = '".$_GET['key']."' ORDER BY id ASC LIMIT 1") or die(mysql_error());
}
$pagename = "Red Or Black?";
$pageid = "801";
include('templates/community/subheader.php');
include('templates/community/header.php');
?>
<div id='container'>
<div id='content'>
<div id='column1' class='column'><div class='habblet-container '>
<div class='cbb clearfix red '>
<h2 class='title'>Red or black?!</h2>
<img class='credits-image' src='casino/Treasure_chest_white.JPG' align='left' /> Hi! Welcome to the red or black game! What is the idea of this game? You choose: Red or black, if you choose red, and the computer choose also red you win <?php echo $win_amount_rb; ?> credits! If you choose black, and the computer choose red you lose <?php echo $play_amount_rb; ?> credits! Good luck!<br><br><form action="resultrb.php" method="post">
<input="r" name="rb">
<A href="resultrb.php?colour=red"><IMG src="casino/red.png"></A>
<form action="resultrb.php" method="post">
<input="b" name="rb">
<A href="resultrb.php?colour=black"><IMG src="casino/black.png"></A>
</form>
</p>
</div>
</div>
<script type='text/javascript'>if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
<?php
include('templates/community/footer.php');
?>
En hier ontvangt hij het script:
PHP:
<?php
/*---------------------------------------------------+
| HoloCMS - Website and Content Management System
+----------------------------------------------------+
| Copyright © 2008 Meth0d
+----------------------------------------------------+
| HoloCMS is provided "as is" and comes without
| warrenty of any kind.
+---------------------------------------------------*/
include('core.php');
include('casino_config.php');
include('includes/session.php');
include('includes/news_headlines.php');
if($_GET['do'] == "RemoveFeedItem" && is_numeric($_GET['key'])){ // ex. me.php?do=RemoveFeedItem&key=5
mysql_query("DELETE FROM cms_alerts WHERE userid = '".$my_id."' AND id = '".$_GET['key']."' ORDER BY id ASC LIMIT 1") or die(mysql_error());
}
$pagename = "Gambling Palace";
$pageid = "801";
include('templates/community/subheader.php');
include('templates/community/header.php');
// Create the random tag questions array
$randomq[] = "r";
$randomq[] = "b";
// Select a random question from the array above
srand ((double) microtime() * 100);
$chosen = rand(0,count($randomq)-1);
// Appoint the variable
$tag_question = $randomq[$chosen];
$rb=$_POST['rb'];
if ($rb==r) {
mysql_query("UPDATE users SET credits = credits + ".$win_amount_rb." WHERE name = '".$name."' LIMIT 1") or die(mysql_error());
mysql_query("INSERT INTO cms_transactions (userid,amount,date,descr) VALUES ('".$my_id."','".$win_amount_rb."','".$date_full."','Win Red or Black Gambling')");
$result="You win!";
}else{
mysql_query("UPDATE users SET credits = credits - '".$play_amount_rb."' WHERE id = '".$my_id."' LIMIT 1") or die(mysql_error());
mysql_query("INSERT INTO cms_transactions (userid,amount,date,descr) VALUES ('".$my_id."','-".$play_amount_rb."','".$date_full."','Red or Black Gambling')");
$result="You Lose!";
}
?>
<div id='container'>
<div id='content'>
<div id='column1' class='column'><div class='habblet-container '>
<div class='cbb clearfix red '>
<h2 class='title'>Result red or black:</h2>
<?php echo $result; ?>
</p>
</div>
</div>
<script type='text/javascript'>if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
<?php
include('templates/community/footer.php');
?>
Iemand een idee?