Jump to content

Help Me find the error..


ataria

Recommended Posts

There is no error..
but, It shows the 3 images..
but, it doesn't show the rest ;x

It's a slot script.

If you want to seee it..
www.ataria.org/games/slots.php

code :
[code]<?php
include("/home/ataria/public_html/global.php");
echo "<title>Ataria - Slots</title>";

$pull_userinfo = mysql_query("SELECT * FROM `users` WHERE `uid`='{$_COOKIE['uid']}'");
$info = mysql_fetch_array($pull_userinfo);
$points = $info['points'];

if ($points < 5) {
echo "<table cellspacing=3 cellpadding=3 width=450><tr><td class=bar><font class=barfont><center>Slots</center> </font></td></tr><tr><td><center>Sorry. You don't have enough points to play this game!</center></td></tr></table>";
die();
}
else {

if ($page == 'Roll') {
$slot1 = rand(1,5);
$slot2 = rand(1,5);
$slot3 = rand(1,5);

$slottype = array(
'1' => 'mint.gif',
'2' => 'chocolate.gif',
'3' => 'strawberry.gif',
'4' => 'vanilla.gif',
'5' => 'burger.gif'
);
echo "<center>
<table width=450 cellpadding=3 cellspacing=3>
<tr>
<td class=bar>
<font class=barfont><center>Slots</center></font>
</td>
</tr>
<tr>
<td><center>
<img src=/images/games/$slottype[$slot1]>
<img src=/images/games/$slottype[$slot2]>
<img src=/images/games/$slottype[$slot3]>
</td>
</tr>
";
if ($slot1 == $slot2 && $slot1 == $slot3) {
if ($slot == 1) {
// Mint
echo" <center><tr><td><center>Wow! Three Mint Cones! That's worth.. <b>50</b> aD!<br><br><a href=/games/slots.php> Play Again?</a></td></tr></table>";
$new_points = $points+50;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
if ($slot == 3) {
// Strawberry
echo"<center> <tr><td><center>Wow! Three Strawberry Cones! That's worth.. <b>35</b> aD!<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
$new_points = $points+35;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
if ($slot == 4) {
// Vanilla
echo" <center><tr><td><center>Wow! Three Vanilla Cones! That's worth.. <b>25</b> aD!<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
$new_points = $points+25;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
if ($slot == 2) {
// Chocolate
echo" <center><tr><td><center>Wow! Three Chocolate Cones! That's worth.. <b>15</b> aD!<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
$new_points = $points+15;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
if ($slot == 5) {
// Burger
echo" <center><tr><td><center>Ew. Three Burgers! That's gonna cost you..<b>25</b> aD.<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
$new_points = $points-25;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
else {
// Nothing
echo" <center><tr><td><center>Aww. Nothing Matched!<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
}

if ($slot1 == $slot2) {
if ($slot == 1) {
// Mint
echo"<center> <tr><td><center>Nice! Two Mint Cones! That's worth.. <b>35</b> aD!<br><br><a href=/games/slots.php> Play Again?</a></td></tr></table>";
$new_points = $points+35;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
if ($slot == 3) {
// Strawberry
echo"<center> <tr><td><center>Nice! Two Strawberry Cones! That's worth.. <b>25</b> aD!<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
$new_points = $points+35;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
if ($slot == 4) {
// Vanilla
echo"<center> <tr><td><center>Nice! Two Vanilla Cones! That's worth.. <b>15</b> aD!<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
$new_points = $points+25;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
if ($slot == 2) {
// Chocolate
echo"<center> <tr><td><center>Nice! Two Chocolate Cones! That's worth.. <b>10</b> aD!<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
$new_points = $points+10;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
if ($slot == 5) {
// Burger
echo" <center><tr><td><center>Yuck! Two Burgers! That's gonna cost you..<b>15</b> aD.<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
$new_points = $points-15;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
else {
// Nothing
echo" <tr><td><center>Aww. Nothing Matched!<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
}
}
if ($slot1 == $slot3) {
if ($slot == 1) {
// Mint
echo" <center><tr><td><center>Nice! Two Mint Cones! That's worth.. <b>35</b> aD!<br><br><a href=/games/slots.php> Play Again?</a></td></tr></table>";
$new_points = $points+35;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
if ($slot == 3) {
// Strawberry
echo" <center><tr><td><center>Nice! Two Strawberry Cones! That's worth.. <b>25</b> aD!<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
$new_points = $points+35;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
if ($slot == 4) {
// Vanilla
echo"<center> <tr><td><center>Nice! Two Vanilla Cones! That's worth.. <b>15</b> aD!<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
$new_points = $points+25;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
if ($slot == 2) {
// Chocolate
echo" <center><tr><td><center>Nice! Two Chocolate Cones! That's worth.. <b>10</b> aD!<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
$new_points = $points+10;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
if ($slot == 5) {
// Burger
echo" <center><tr><td><center>Yuck! Two Burgers! That's gonna cost you..<b>15</b> aD.<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
$new_points = $points-15;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
else {
// Nothing
echo"<center><tr><td><center>Aww. Nothing Matched!<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
}
}
if ($slot2 == $slot3) {
if ($slot == 1) {
// Mint
echo" <tr><td><center>Nice! Two Mint Cones! That's worth.. <b>35</b> aD!<br><br><a href=/games/slots.php> Play Again?</a></td></tr></table>";
$new_points = $points+35;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
if ($slot == 3) {
// Strawberry
echo" <tr><td><center>Nice! Two Strawberry Cones! That's worth.. <b>25</b> aD!<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
$new_points = $points+35;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
if ($slot == 4) {
// Vanilla
echo" <tr><td><center>Nice! Two Vanilla Cones! That's worth.. <b>15</b> aD!<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
$new_points = $points+25;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
if ($slot == 2) {
// Chocolate
echo" <tr><td><center>Nice! Two Chocolate Cones! That's worth.. <b>10</b> aD!<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
$new_points = $points+10;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
if ($slot == 5) {
// Burger
echo" <tr><td><center>Yuck! Two Burgers! That's gonna cost you..<b>15</b> aD.<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
$new_points = $points-15;
$addpoints = mysql_query("UPDATE `users` SET `points`=$new_points WHERE `uid`='{$_COOKIE['uid']}'");
die();
}
else {
// Nothing
echo" <tr><td><center>Aww. Nothing Matched!<br><br>
<a href=/games/slots.php>Play Again?</a></td></tr></table>";
}

}
}
}
if (!$page) {
echo "
<center>
<table cellspacing=3 cellpadding=3 width=450>
<tr>
<td class=bar>
<font class=barfont><center>Slots</center></font>
</td>
</tr>
<tr>
<td>
<center>Slots! Get two or three in a row to get a prize! Best of luck!
<br><br>
<form action=$PHP_SELF method=post>
<input type=hidden name=page value=Roll>
<input type=submit value='Play Slots!' width=200>
</form>
</center>
</td>
</tr>
</table>
";
}
}
?>[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.