View file public_html/luckygame5.php

File size: 1.79Kb
<html>
<title>Lucky Room Game5</title>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<link rel="shortcut icon" href="pics/do.jpg" type="image/x-icon"/>
<link href="../theme/style.css" rel="stylesheet" type="text/css" />
<?php include "inc/def.php"; ?>

<?php include "inc/usrchk.php";

if($guest==1) {
header("location:index.php");
} ?>
<?php include "inc/header.php"; ?><?
/*$user=secureget('user');

*/
$user1='irgame2';
$hammad = mysql_query("SELECT bal FROM users WHERE user='$user'");
$khan = mysql_fetch_array($hammad);
if ($khan['bal']<0.2)
{
echo '<div class="blk"> Not  Enough Money </div>';
echo '<div class="lgn"><font color=red><b> You Not Have Enough Money To play Game</b></font></div>';

echo '<br><a href="lucky5.php">Go BacK</a>';

include "inc/footer.php";
die();
}

$new=$khan['bal'];
$newbal=$new-0.5;
$hammad1 = mysql_query("SELECT * FROM users WHERE user='$user1'");

$khan1 = mysql_fetch_array($hammad1);

$new1=$khan1['bal']+5;

echo '<div class="blk">Lucky Room Game</div>';
echo '<div class="lgn"><font color=blue><b> Your Visiting Number is '.$new1.'</b></font></div>';

if($new1==100)
{
$newbal=$newbal+5;
$new1=0;
echo '<div class="lgn"><font color=green><b>Congrats You Won $5. You Are The 100th Visitor </b></font></div>';



mysql_query('UPDATE users SET paypal = "'.$user.'" WHERE user = "'.$user1.'"');
}

else
{

echo '<div class="lgn"><font color=red><b>Sorry You lost The Game.<br />NOTE: Who Enter As 100th Visitor,They Will Get $5 As a Prize.</b></font></div>';

}
mysql_query('UPDATE users SET bal = "'.$newbal.'"
WHERE user = "'.$user.'"');
mysql_query('UPDATE users SET bal = "'.$new1.'" WHERE user = "'.$user1.'"');
echo '<br><a href="lucky5.php">Go BacK</a>';
echo '<br><a href="home.php">Home Page</a>';

include "inc/footer.php";
die();
?>