Jump to content
MakeWebGames

Magictallguy

Administrators
  • Posts

    2,146
  • Joined

  • Last visited

  • Days Won

    149

Everything posted by Magictallguy

  1. Track which query is pegging that error. As soon as you do that, I'll be able to help you :)
  2. I'm not at the moment. I'm quite happy with mysqli_* procedural style functions. I'll convert my database abstraction layer to PDO and post up if requested :)
  3. Uses my own database abstraction layer (using mysqli_* procedural style (at the moment)) Bugless (as far as I'm aware) Plenty of features Easily customisable I'm in the process of developing a template engine specifically designed for gRP[MTG] Multiple "multi" detection algorithms The only game currently using it has an active userbase. (323 members, currently 26 online, 72 within the last 24 hours) A very active Changelog that allows players to see exactly what's happening in their game The Staff "Panel" makes extensive use of my Staff Permissions, everything is easily customisable for those with the correct rank permissions The gang system was written from scratch and is very in-depth (yet easy to use). (Gang Perks to come soon) A lot more that I don't currently have the time to write (raking out the house)
  4. I present to you: manageable permission-based staff ranks In the old system, they're hard-coded in. Any time you want to give a player/staff member access to something new, you must edit the code. In my new system, you simply edit their Staff Rank in the staff panel and access is granted/denied based on exactly what you want. Screenshots of how this works are available further down in another post (due to original site death). All it uses is 1 SQL table, an addition to the (grpg)users table, and a self-caching function to check staff permissions. I'm open to offers and comes with full installation, custom to your design
  5. Use the file I have provided. Upload it to your webroot. Make sure the job is scheduled in your crontab
  6. Gotta have an ego somewhere :P
  7. Testing and fully working: <?php include(__DIR__ . '/config.php'); global $_CONFIG; if(!array_key_exists('code', $_GET) || $_GET['code'] != $_CONFIG['code']) exit; define("MONO_ON", 1); require(__DIR__ . '/class/class_db_'.$_CONFIG['driver'].'.php'); $db = new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c = $db->connection_id; include(__DIR__ . '/global_funcs.php'); $db->query("UPDATE `fedjail` SET `fed_days` = `fed_days` - 1"); $q = $db->query("SELECT * FROM `fedjail` WHERE `fed_days` = 0"); $ids = array(); while($r = $db->fetch_row($q)) array_push($ids, $r['fed_userid']); if(count($ids) > 0) $db->query("UPDATE users SET fedjail=0 WHERE userid IN(".implode(",", $ids).")"); $db->query("DELETE FROM `fedjail` WHERE `fed_days` = 0"); $db->query("UPDATE `users` SET " . "`daysingang` = IF(`gang` > 0, `daysingang` + 1, 0), " . "`daysold` = `daysold` + 1, " . "`boxes_opened` = 0, " . "`mailban` = IF(`mailban` > 0, `mailban` - 1, 0), " . "`donatordays` = IF(`donatordays` > 0, `donatordays` - 1, 0), " . "`cdays` = IF(`course` > 0, `cdays` - 1, 0), " . "`bankmoney` = IF(`bankmoney` > 0, `bankmoney` + (`bankmoney` * .2), 0) " . "`cybermoney` + IF(`cybermoney` > 0, (`cybermoney` * 0.7), 0)" ); $q = $db->query("SELECT `userid`, `course` FROM `users` WHERE `cdays` = 0 AND `course` > 0"); while($r = $db->fetch_row($q)) { $db->query("INSERT INTO `coursesdone` VALUES(".$r['userid'].", ".$r['course'].")"); $cd = $db->query("SELECT * FROM `courses` WHERE `crID` = ".$r['course']); if($db->num_rows($cd)) { $coud = $db->fetch_row($cd); $upd = ""; $ev = ""; if($coud['crSTR']) { $upd .= ", `strength` = `strength` + ".$coud['crSTR']; $ev .= ", ".number_format($coud['crSTR'])." strength"; } if($coud['crGUARD']) { $upd .= ", `guard` = `guard` + ".$coud['crGUARD']; $ev .= ", ".number_format($coud['crGUARD'])." guard"; } if($coud['crLABOUR']) { $upd .= ", `labour` = `labour` + ".$coud['crLABOUR']; $ev .= ", ".number_format($coud['crLABOUR'])." labour"; } if($coud['crAGIL']) { $upd .= ", `agility` = `agility` + ".$coud['crAGIL']; $ev .= ", ".number_format($coud['crAGIL'])." agility"; } if($coud['crIQ']) { $upd .= ", `IQ` = `IQ` + ".$coud['crIQ']; $ev .= ", ".number_format($coud['crIQ'])." IQ"; } $ev = substr($ev, 1); if($upd) $db->query("UPDATE userstats SET `userid` = `userid` ".$upd." WHERE `userid` = ".$r['userid']); event_add($r['userid'], "Congratulations, you completed the ".$coud['crNAME']." and gained ".$ev."!"); } else event_add($r['userid'], "Unfortunately, the course you were taking was removed from the School's curriculum. Your course has been ended at no extra cost to you"); } $db->query("UPDATE `users` SET `course` = 0 WHERE `cdays` = 0"); $db->query("TRUNCATE TABLE `votes`");   PHP: 5.4 Apache: 2.4.7 SQL: 5.6
  8. You've clearly never used output buffer handling then :P
  9. Ah, fair enough then :P
  10. Thank you, but I believe sniko is better suited to this - his knowledge of AJAX far outranks mine Also, my rate is $15 per hour
  11. Agreed! And no, not "coder", Developer :P
  12. Aww, I feel all fuzzy inside now! Thanks guys (and gals, if applicable :P)   Well no, I was homeless - story is available on my site   7 years, in fact ;)
  13. I use gRP[MTG] - does that count?
  14. For the record guys, you are more than welcome to ask me directly how to use my stuff ;)
  15. Aye, they're available on my site :)
  16. What's wrong with the chat I wrote for you?
  17. Well.. As far as I'm aware, I haven't died recently - but thanks anyway haha   Yes. That's it. I called them "Cronless Crons" because it gets people's attention
  18. Based on the previous post (the non-updated one), here:   <?php function mail_inbox() { global $ir, $c; ?>Only the last 25 messages sent to you are visible. <hr width='75%' /> <table width="75%" class="table" border="0" cellspacing="1"> <tr> <th width="20%">Sent/From</th> <th width="60%">Subject/Message</th> <th width="20%">Actions</th> </tr><?php $q = mysql_query("SELECT `m`.*, `u`.`userid`, `u`.`username`, `u`.`donatordays`, `u`.`user_level`, `u`.`mail_signature` " . "FROM `mail` AS `m` " . "LEFT JOIN `users` AS `u` ON (`m`.`mail_from` = `u`.`userid`) " . "WHERE `m`.`mail_to` = ".$ir['userid']." AND `m`.`mail_deleted` = 0 " . "ORDER BY `m`.`mail_time` DESC LIMIT 25", $c); if(!mysql_num_rows($q)) echo "<tr><td colspan='2' class='center'>You have no messages</td></tr>"; else while($r = mysql_fetch_assoc($q)) { $d = $r['donatordays'] ? "<img src='/images/donator.gif' alt='Donator: {$r['donatordays']} Days Left' title='Donator: {$r['donatordays']} Days Left' />" : ''; $staff = ($r['user_level'] > 1) ? "<img src='images/staff.gif 'width='10' height='10' alt='Staff' title='Staff' />" : ''; if($r['userid']) { $get = mysql_query("SELECT `imagepath` FROM `user_imageusername` WHERE `userid` = ".$r['userid'], $c); if(mysql_num_rows($get)) $r['username'] = '<img src="images/username/'.$r_image['imagepath'].'" title="'.$r['username'].'" width="110px" height="20px" />'; } if($r['user_level'] == 26) $user = "<span style='color:red;'>".$r['username']."</span>"; else if($r['user_level'] == 2) $user = "<span style='color:gold;'>".$r['username']."</span>"; else if($r['user_level'] == 3) $user = "<span style='color:green;'>".$r['username']."</span>"; else if($r['user_level'] == 4) $user = "<span style='color:pink;'>".$r['username']."</span>"; else if($r['user_level'] == 5) $user = "<span style='color:cyan;'>".$r['username']."</span>"; else if($r['donatordays']) $user = "<span style='color:red;'>".$r['username']."</span>"; else $user = $r['username']; ?><tr> <td><strong>From:</strong><br /><?php echo ($r['userid']) ? "<a href='viewuser.php?u=".$r['userid']."'>".$user."</a> ".$d." ".$staff." [".$r['userid']."]" : ''; ?><br /> <strong>Sent on:</strong> <?php echo date('F j, Y, g:i:s a', $r['mail_time']); ?></td> <td><table class='table' width='100%'> <tr> <td><?php echo stripslashes(htmlspecialchars($r['mail_subject'])); ?></td> </tr> <tr> <td><?php echo nl2br(stripslashes(htmlspecialchars($r['mail_text']))); ?></td> </tr> </table></td> <td><a href='mailbox.php?action=compose&ID=<?php echo $r['userid']; ?>'>Reply</a><br /> <a href='mailbox.php?action=delete&ID=<?php echo $r['mail_id']; ?>'>Delete</a><br /> <a href='preport.php?ID=<?php echo $r['userid']; ?>&report=Fradulent mail: <?php echo urlencode($r['mail_text']); ?>'>Report</a><br /> <a href='mailbox.php?action=addblock&ID=<?php echo $r['userid']; ?>'>Block</a></td> </tr><?php } if($ir['new_mail'] > 0) { mysql_query("UPDATE `mail` SET `mail_read` = 1 WHERE `mail_to` = ".$ir['userid'], $c); mysql_query("UPDATE `users` SET `new_mail` = 0 WHERE `userid` = ".$ir['userid'], $c); } ?></table> <hr width='75%' /> <hr width='90%' /> <table width='50%'> <tr> <td width='50%'><a href='explore.php'>Go Explore</a></td> <td width='50%'><a href='index.php'>Go Home</a></td> </tr> </table> <hr width='90%' /><?php }
  19. Conversion to v2 <?php include(__DIR__ . '/globals.php'); if($ir['user_level'] != 2 && $ir['userid'] != 288) { echo "New Roulette being placed"; $h->endpage(); exit(); } $number = rand(1, 36); for($i = 0; $i <= 36; $i++) ${'n' . $i} = abs(@intval($_POST['n' . $i])); $e = abs(intval($_POST['e'])); $o = abs(intval($_POST['o'])); $teen = abs(intval($_POST['teen'])); $teen1 = abs(intval($_POST['teen1'])); $black = abs(intval($_POST['black'])); $red = abs(intval($_POST['red'])); $twelve = abs(intval($_POST['twelve'])); $dtv = abs(intval($_POST['dtv'])); $vtz = abs(intval($_POST['vtz'])); $ek = abs(intval($_POST['ek'])); $tk = abs(intval($_POST['tk'])); $dk = abs(intval($_POST['dk'])); if(!empty($_POST['go4'])) { $sum = array($n0, $n1, $n2, $n3, $n4, $n5, $n6, $n7, $n8, $n9, $n10, $n11, $n12, $n13, $n14, $n15, $n16, $n17, $n18, $n19, $n20, $n21, $n22, $n23, $n24, $n25, $n26, $n27, $n28, $n29, $n30, $n31, $n32, $n33, $n34, $n35, $n36, $e, $o, $teen, $teen1, $black, $red, $twelve, $dtv, $vtz, $ek, $dk, $tk); $bet = array_sum($sum); if($bet > $ir['money']) { echo "<hr width='50%'>Please read the error message.<hr width='50%'><h3>! ERROR</h3>You do not have that much money! <hr width='50%'><a href='index.php'>> Go Home</a><hr width='50%'>"; $h->endpage(); exit; } if($bet > 50000) { echo "<hr width='50%'>Please read the error message.<hr width='50%'><h3>! ERROR</h3>You cannot bet that much money! <hr width='50%'><a href='roulette.php'>> Go Back</a><hr width='50%'>"; $h->endpage(); exit; } if($bet < 1000) { echo "<hr width='50%'>Please read the error message.<hr width='50%'><h3>! ERROR</h3>You need to place more money to the bet! <hr width='50%'><a href='roulette.php'>> Go Back</a><hr width='50%'>"; $h->endpage(); exit; } $nmoney = 0; $nmoney += ${'n' . $number} * 35; $type = ($number % 2 == 0) ? 'even' : 'odd'; $nmoney += ($type == "odd") ? $o * 2 : $e * 2; $nmoney += ($nummer >= 19) ? $high * 2 : $low * 2; $red = $_POST['red']; $black = $_POST['black']; $red22 = array( 1 => 1, 2 => 3, 3 => 5, 4 => 7, 5 => 9, 6 => 12, 7 => 14, 8 => 16, 9 => 18, 10 => 19, 11 => 21, 12 => 23, 13 => 25, 14 => 27, 15 => 30, 16 => 32, 17 => 34, 18 => 36 ); $ii = 1; while($ii < 18) { if($red22[$ii] == $number) { $colour1 = 'red'; $nmoney += $red * 2; } $ii++; } if(!isset($colour1)) { $black1 = array( 1 => 2, 2 => 4, 3 => 6, 4 => 8, 5 => 10, 6 => 13, 7 => 15, 8 => 17, 9 => 20, 10 => 22, 11 => 24, 12 => 26, 13 => 28, 14 => 29, 15 => 31, 16 => 33, 17 => 35 ); $iii = 0; while($iii < 18) { if($black1[$iii] == $number) { $colour1 = 'black'; $nmoney += $black * 2; } $iii++; } } $one218 = array( 0 => 1, 1 => 2, 2 => 3, 3 => 4, 4 => 5, 5 => 6, 6 => 7, 7 => 8, 8 => 9, 9 => 10, 10 => 11, 11 => 12, 12 => 13, 13 => 14, 14 => 15, 15 => 16, 16 => 17, 17 => 18 ); $part = 0; while($part < 17) { if($one218[$part] == $number) $nmoney += $teen * 2; $part++; } $teen236 = array( 0 => 19, 1 => 20, 2 => 21, 3 => 22, 4 => 23, 5 => 24, 6 => 25, 7 => 26, 8 => 27, 9 => 28, 10 => 29, 11 => 30, 12 => 31, 13 => 32, 14 => 33, 15 => 34, 16 => 35, 17 => 36 ); $part1 = 0; while($part1 < 17) { if($teen236[$part1] == $number) $nmoney += $teen1 * 2; $part1++; } $one212 = array( 0 => 1, 1 => 2, 2 => 3, 3 => 4, 4 => 5, 5 => 6, 6 => 7, 7 => 8, 8 => 9, 9 => 10, 10 => 11, 11 => 12 ); $part2 = 0; while($part2 < 11) { if($one212[$part2] == $number) $nmoney += $twelve * 3; $part2++; } $teen2244 = array( 0 => 13, 1 => 14, 2 => 15, 3 => 16, 4 => 17, 5 => 18, 6 => 19, 7 => 20, 8 => 21, 9 => 22, 10 => 23, 11 => 24 ); $part3 = 0; while($part3 < 11) { if($teen2244[$part3] == $number) $nmoney += $dtv * 3; $part3++; } $twen5 = array( 0 => 25, 1 => 26, 2 => 27, 3 => 28, 4 => 29, 5 => 30, 6 => 31, 7 => 32, 8 => 33, 9 => 34, 10 => 35, 11 => 36 ); $part4 = 0; while($part4 < 11) { if($twen5[$part4] == $number) $nmoney += $vtz * 3; $part4++; } $small = array( 0 => 1, 1 => 5, 2 => 9, 3 => 13, 4 => 17, 5 => 21, 6 => 25, 7 => 29, 8 => 33 ); $part5 = 0; while($part5 < 8) { if($small[$part5] == $number) $nmoney += $ek * 3; if($small[$part5] == $number) $nmoney += $tk * 3; if($small[$part5] == $number) $nmoney += $dk * 3; $part5++; } $yougot = $nmoney - $bet; } ?> <table width="75%" border="0" cellspacing="0" cellpadding="0" > <tr> <td>Roulette</td> </tr> </table> <form method="post"> <table width="75%" border="0" cellspacing="0" cellpadding="0" > <tr> <td width="0%" height="48"> </td> <td width="0%"> </td> <td width="0%"> </td> <td width="0%"> </td> <td width="31%"> </td> <td COLSPAN="3" align="center">0 <input name=n0 type=text class="text" ID="n0" size=8 maxlength="10"></td> </tr> <tr> <td height="37"> </td> <td> </td> <td> </td> <td> </td> <td> Max Bet: $50,000 Minimum Bet: $1,000</td> <td width="23%" align="center">1 <input name=n1 type=text class="text" ID="n1" size=8 maxlength="10"></td> <td width="23%" align="center">2 <input name=n2 type=text class="text" ID="n2" size=8 maxlength="10"></td> <td width="23%" align="center">3 <input name=n3 type=text class="text" ID="n3" size=8 maxlength="10"></td> </tr> <tr> <td height="30"> </td> <td> </td> <td> </td> <td> </td> <td align="center"><h2>Money $<?php echo number_format($ir['money']); ?></h2></td> <td align="center">4 <input name=n4 type=text class="text" ID="n4" size=8 maxlength="10"></td> <td align="center">5 <input name=n5 type=text class="text" ID="n5" size=8 maxlength="10"></td> <td align="center">6 <input name=n6 type=text class="text" ID="n6" size=8 maxlength="10"></td> </tr> <tr> <td height="31"> </td> <td> </td> <td> </td> <td> </td> <td align="center"><?php if(!empty($_POST['go4'])) { if($yougot <= 0) { $result = $db->query("UPDATE `users` SET `money` = `money` - " . $bet . " WHERE `userid` = " . $userid); echo "<h3>Wheel Number " . $number . "</h3><font color='#ff000'>You lost $" . number_format($bet) . "</font>"; } elseif($yougot > 0) { $result = $db->query("UPDATE `users` SET `money` = `money` + " . $nmoney . " WHERE `userid` = " . $userid); echo "<h3>Wheel Number " . $number . "</h3><font color='green'>Congratulations you won $" . number_format($nmoney) . "</font>"; } } ?> </td> <td align="center">7 <input name=n7 type=text class="text" ID="n7" size=8 maxlength="10"></td> <td align="center">8 <input name=n8 type=text class="text" ID="n8" size=8 maxlength="10"></td> <td align="center">9 <input name=n9 type=text class="text" ID="n9" size=8 maxlength="10"></td> </tr> <tr> <td height="35"> </td> <td> </td> <td> </td> <td> </td> <td rowspan="12"><img src="images/roulettetable.gif" width="250" height="329"></td> <td align="center">10 <input name=n10 type=text class="text" ID="n10" size=8 maxlength="10"></td> <td align="center">11 <input name=n11 type=text class="text" ID="n11" size=8 maxlength="10"></td> <td align="center">12 <input name=n12 type=text class="text" ID="n12" size=8 maxlength="10"></td> </tr> <tr> <td height="34"> </td> <td> </td> <td> </td> <td> </td> <td align="center">13 <input name=n13 type=text class="text" ID="n13" size=8 maxlength="10"></td> <td align="center">14 <input name=n14 type=text class="text" ID="n14" size=8 maxlength="10"></td> <td align="center">15 <input name=n15 type=text class="text" ID="n15" size=8 maxlength="10"></td> </tr> <tr> <td height="34"> </td> <td COLSPAN="3"> </td> <td align="center">16 <input name=n16 type=text class="text" ID="n16" size=8 maxlength="10"></td> <td align="center">17 <input name=n17 type=text class="text" ID="n17" size=8 maxlength="10"></td> <td align="center">18 <input name=n18 type=text class="text" ID="n18" size=8 maxlength="10"></td> </tr> <tr> <td height="35"> </td> <td COLSPAN="3"> </td> <td align="center">19 <input name=n19 type=text class="text" ID="n19" size=8 maxlength="10"></td> <td align="center">20 <input name=n20 type=text class="text" ID="n20" size=8 maxlength="10"></td> <td align="center">21 <input name=n21 type=text class="text" ID="n21" size=8 maxlength="10"></td> </tr> <tr> <td height="38"> </td> <td> </td> <td> </td> <td> </td> <td align="center">22 <input name=n22 type=text class="text" ID="n22" size=8 maxlength="10"></td> <td align="center">23 <input name=n23 type=text class="text" ID="n23" size=8 maxlength="10"></td> <td align="center">24 <input name=n24 type=text class="text" ID="n24" size=8 maxlength="10"></td> </tr> <tr> <td height="33"> </td> <td> </td> <td> </td> <td> </td> <td align="center">25 <input name=n25 type=text class="text" ID="n25" size=8 maxlength="10"></td> <td align="center">26 <input name=n26 type=text class="text" ID="n26" size=8 maxlength="10"></td> <td align="center">27 <input name=n27 type=text class="text" ID="n27" size=8 maxlength="10"></td> </tr> <tr> <td height="37"> </td> <td> </td> <td> </td> <td> </td> <td align="center">28 <input name=n28 type=text class="text" ID="n28" size=8 maxlength="10"></td> <td align="center">29 <input name=n29 type=text class="text" ID="n29" size=8 maxlength="10"></td> <td align="center">30 <input name=n30 type=text class="text" ID="n30" size=8 maxlength="10"></td> </tr> <tr> <td height="35"> </td> <td> </td> <td> </td> <td> </td> <td align="center">31 <input name=n31 type=text class="text" ID="n31" size=8 maxlength="10"></td> <td align="center">32 <input name=n32 type=text class="text" ID="n32" size=8 maxlength="10"></td> <td align="center">33 <input name=n33 type=text class="text" ID="n33" size=8 maxlength="10"></td> </tr> <tr> <td height="32"> </td> <td> </td> <td> </td> <td> </td> <td align="center">34 <input name=n34 type=text class="text" ID="n34" size=8 maxlength="10"></td> <td align="center">35 <input name=n35 type=text class="text" ID="n35" size=8 maxlength="10"></td> <td align="center">36 <input name=n36 type=text class="text" ID="n36" size=8 maxlength="10"></td> </tr> <tr> <td height="40"> </td> <td> </td> <td> </td> <td> </td> <td align="center">odd <input name=o type=text class="text" SIZE=8 maxlength="10"></td> <td align="center">19- 36 <input name=teen type=text class="text" ID="teen" size=8 maxlength="10"></td> <td align="center">Even <input name=e type=text class="text" SIZE=8 maxlength="10"></td> </tr> <tr> <td height="53"> </td> <td> </td> <td> </td> <td> </td> <td align="center">red <input name=red type=text class="text" SIZE=8 maxlength="10"></td> <td align="center">1 - 18 <input name=teen type=text class="text" ID="teen" SIZE=8 maxlength="10"></td> <td align="center">black <input name=black type=text class="text" SIZE=8 maxlength="10"></td> </tr> <tr> <td height="58"> </td> <td> </td> <td> </td> <td> </td> <td align="center">1 -12 <input name=twelve type=text class="text" ID="twelve" SIZE=8 maxlength="10"></td> <td align="center">13 -24 <input name=dtv type=text class="text" SIZE=8 maxlength="10"></td> <td align="center">25-36 <input name=vtz type=text class="text" SIZE=8 maxlength="10"></td> </tr> <tr> <td height="65"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td align="center">1st column <input name=ek type=text class="text" SIZE=8 maxlength="10"></td> <td align="center">2nd column <input name=tk type=text class="text" SIZE=8 align="10"></td> <td align="center">3rd column <input name=dk type=text class="text" SIZE=8 maxlength="10"></td> </tr> <tr> <td height="37"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td align="center"><input name='go4' type=submit class="buttong" value=Bet> <input type=reset class="buttong" value=Reset></td> <td> </td> </tr> </table></form><?php $h->endpage();
  20. Of course, I could've done better. But he asked for formatting. I gave him that (and a little bit more) Edit: Revisited the code, managed to shave a further 146 lines off <?php session_start(); require "global_func.php"; if(!isset($_SESSION['loggedin'])) exit(header("Location: login.php")); $userid = $_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is = mysql_query("SELECT `u`.*, `us`.* " . "FROM `users` AS `u` " . "LEFT JOIN `userstats` AS `us` ON (`u`.`userid` = `us`.`userid`) " . "WHERE `u`.`userid` = " . $userid, $c) or die(mysql_error()); $ir = mysql_fetch_array($is); check_level(); $fm = money_formatter($ir['money']); $cm = money_formatter($ir['crystals'], ''); $lv = date('F j, Y, g:i a', $ir['laston']); $h->userdata($ir, $lv, $fm, $cm); $h->menuarea(); if($ir['user_level'] != 2 && $ir['userid'] != 288) { echo "New Roulette being placed"; $h->endpage(); exit(); } $number = rand(1, 36); for($i = 0; $i <= 36; $i++) ${'n' . $i} = abs(@intval($_POST['n' . $i])); $e = abs(intval($_POST['e'])); $o = abs(intval($_POST['o'])); $teen = abs(intval($_POST['teen'])); $teen1 = abs(intval($_POST['teen1'])); $black = abs(intval($_POST['black'])); $red = abs(intval($_POST['red'])); $twelve = abs(intval($_POST['twelve'])); $dtv = abs(intval($_POST['dtv'])); $vtz = abs(intval($_POST['vtz'])); $ek = abs(intval($_POST['ek'])); $tk = abs(intval($_POST['tk'])); $dk = abs(intval($_POST['dk'])); if(!empty($_POST['go4'])) { $sum = array($n0, $n1, $n2, $n3, $n4, $n5, $n6, $n7, $n8, $n9, $n10, $n11, $n12, $n13, $n14, $n15, $n16, $n17, $n18, $n19, $n20, $n21, $n22, $n23, $n24, $n25, $n26, $n27, $n28, $n29, $n30, $n31, $n32, $n33, $n34, $n35, $n36, $e, $o, $teen, $teen1, $black, $red, $twelve, $dtv, $vtz, $ek, $dk, $tk); $bet = array_sum($sum); if($bet > $ir['money']) { echo "<hr width='50%'>Please read the error message.<hr width='50%'><h3>! ERROR</h3>You do not have that much money! <hr width='50%'><a href='index.php'>> Go Home</a><hr width='50%'>"; $h->endpage(); exit; } if($bet > 50000) { echo "<hr width='50%'>Please read the error message.<hr width='50%'><h3>! ERROR</h3>You cannot bet that much money! <hr width='50%'><a href='roulette.php'>> Go Back</a><hr width='50%'>"; $h->endpage(); exit; } if($bet < 1000) { echo "<hr width='50%'>Please read the error message.<hr width='50%'><h3>! ERROR</h3>You need to place more money to the bet! <hr width='50%'><a href='roulette.php'>> Go Back</a><hr width='50%'>"; $h->endpage(); exit; } $nmoney = 0; $nmoney += ${'n' . $number} * 35; $type = ($number % 2 == 0) ? 'even' : 'odd'; $nmoney += ($type == "odd") ? $o * 2 : $e * 2; $nmoney += ($nummer >= 19) ? $high * 2 : $low * 2; $red = $_POST['red']; $black = $_POST['black']; $red22 = array( 1 => 1, 2 => 3, 3 => 5, 4 => 7, 5 => 9, 6 => 12, 7 => 14, 8 => 16, 9 => 18, 10 => 19, 11 => 21, 12 => 23, 13 => 25, 14 => 27, 15 => 30, 16 => 32, 17 => 34, 18 => 36 ); $ii = 1; while($ii < 18) { if($red22[$ii] == $number) { $colour1 = 'red'; $nmoney += $red * 2; } $ii++; } if(!isset($colour1)) { $black1 = array( 1 => 2, 2 => 4, 3 => 6, 4 => 8, 5 => 10, 6 => 13, 7 => 15, 8 => 17, 9 => 20, 10 => 22, 11 => 24, 12 => 26, 13 => 28, 14 => 29, 15 => 31, 16 => 33, 17 => 35 ); $iii = 0; while($iii < 18) { if($black1[$iii] == $number) { $colour1 = 'black'; $nmoney += $black * 2; } $iii++; } } $one218 = array( 0 => 1, 1 => 2, 2 => 3, 3 => 4, 4 => 5, 5 => 6, 6 => 7, 7 => 8, 8 => 9, 9 => 10, 10 => 11, 11 => 12, 12 => 13, 13 => 14, 14 => 15, 15 => 16, 16 => 17, 17 => 18 ); $part = 0; while($part < 17) { if($one218[$part] == $number) $nmoney += $teen * 2; $part++; } $teen236 = array( 0 => 19, 1 => 20, 2 => 21, 3 => 22, 4 => 23, 5 => 24, 6 => 25, 7 => 26, 8 => 27, 9 => 28, 10 => 29, 11 => 30, 12 => 31, 13 => 32, 14 => 33, 15 => 34, 16 => 35, 17 => 36 ); $part1 = 0; while($part1 < 17) { if($teen236[$part1] == $number) $nmoney += $teen1 * 2; $part1++; } $one212 = array( 0 => 1, 1 => 2, 2 => 3, 3 => 4, 4 => 5, 5 => 6, 6 => 7, 7 => 8, 8 => 9, 9 => 10, 10 => 11, 11 => 12 ); $part2 = 0; while($part2 < 11) { if($one212[$part2] == $number) $nmoney += $twelve * 3; $part2++; } $teen2244 = array( 0 => 13, 1 => 14, 2 => 15, 3 => 16, 4 => 17, 5 => 18, 6 => 19, 7 => 20, 8 => 21, 9 => 22, 10 => 23, 11 => 24 ); $part3 = 0; while($part3 < 11) { if($teen2244[$part3] == $number) $nmoney += $dtv * 3; $part3++; } $twen5 = array( 0 => 25, 1 => 26, 2 => 27, 3 => 28, 4 => 29, 5 => 30, 6 => 31, 7 => 32, 8 => 33, 9 => 34, 10 => 35, 11 => 36 ); $part4 = 0; while($part4 < 11) { if($twen5[$part4] == $number) $nmoney += $vtz * 3; $part4++; } $small = array( 0 => 1, 1 => 5, 2 => 9, 3 => 13, 4 => 17, 5 => 21, 6 => 25, 7 => 29, 8 => 33 ); $part5 = 0; while($part5 < 8) { if($small[$part5] == $number) $nmoney += $ek * 3; if($small[$part5] == $number) $nmoney += $tk * 3; if($small[$part5] == $number) $nmoney += $dk * 3; $part5++; } $yougot = $nmoney - $bet; } ?> <table width="75%" border="0" cellspacing="0" cellpadding="0" > <tr> <td>Roulette</td> </tr> </table> <form method="post"> <table width="75%" border="0" cellspacing="0" cellpadding="0" > <tr> <td width="0%" height="48"> </td> <td width="0%"> </td> <td width="0%"> </td> <td width="0%"> </td> <td width="31%"> </td> <td COLSPAN="3" align="center">0 <input name=n0 type=text class="text" ID="n0" size=8 maxlength="10"></td> </tr> <tr> <td height="37"> </td> <td> </td> <td> </td> <td> </td> <td> Max Bet: $50,000 Minimum Bet: $1,000</td> <td width="23%" align="center">1 <input name=n1 type=text class="text" ID="n1" size=8 maxlength="10"></td> <td width="23%" align="center">2 <input name=n2 type=text class="text" ID="n2" size=8 maxlength="10"></td> <td width="23%" align="center">3 <input name=n3 type=text class="text" ID="n3" size=8 maxlength="10"></td> </tr> <tr> <td height="30"> </td> <td> </td> <td> </td> <td> </td> <td align="center"><h2>Money $<?php echo number_format($ir['money']); ?></h2></td> <td align="center">4 <input name=n4 type=text class="text" ID="n4" size=8 maxlength="10"></td> <td align="center">5 <input name=n5 type=text class="text" ID="n5" size=8 maxlength="10"></td> <td align="center">6 <input name=n6 type=text class="text" ID="n6" size=8 maxlength="10"></td> </tr> <tr> <td height="31"> </td> <td> </td> <td> </td> <td> </td> <td align="center"><?php if(!empty($_POST['go4'])) { if($yougot <= 0) { $result = mysql_query("UPDATE `users` SET `money` = `money` - " . $bet . " WHERE `userid` = " . $userid); echo "<h3>Wheel Number " . $number . "</h3><font color='#ff000'>You lost $" . number_format($bet) . "</font>"; } elseif($yougot > 0) { $result = mysql_query("UPDATE `users` SET `money` = `money` + " . $nmoney . " WHERE `userid` = " . $userid); echo "<h3>Wheel Number " . $number . "</h3><font color='green'>Congratulations you won $" . number_format($nmoney) . "</font>"; } } ?> </td> <td align="center">7 <input name=n7 type=text class="text" ID="n7" size=8 maxlength="10"></td> <td align="center">8 <input name=n8 type=text class="text" ID="n8" size=8 maxlength="10"></td> <td align="center">9 <input name=n9 type=text class="text" ID="n9" size=8 maxlength="10"></td> </tr> <tr> <td height="35"> </td> <td> </td> <td> </td> <td> </td> <td rowspan="12"><img src="images/roulettetable.gif" width="250" height="329"></td> <td align="center">10 <input name=n10 type=text class="text" ID="n10" size=8 maxlength="10"></td> <td align="center">11 <input name=n11 type=text class="text" ID="n11" size=8 maxlength="10"></td> <td align="center">12 <input name=n12 type=text class="text" ID="n12" size=8 maxlength="10"></td> </tr> <tr> <td height="34"> </td> <td> </td> <td> </td> <td> </td> <td align="center">13 <input name=n13 type=text class="text" ID="n13" size=8 maxlength="10"></td> <td align="center">14 <input name=n14 type=text class="text" ID="n14" size=8 maxlength="10"></td> <td align="center">15 <input name=n15 type=text class="text" ID="n15" size=8 maxlength="10"></td> </tr> <tr> <td height="34"> </td> <td COLSPAN="3"> </td> <td align="center">16 <input name=n16 type=text class="text" ID="n16" size=8 maxlength="10"></td> <td align="center">17 <input name=n17 type=text class="text" ID="n17" size=8 maxlength="10"></td> <td align="center">18 <input name=n18 type=text class="text" ID="n18" size=8 maxlength="10"></td> </tr> <tr> <td height="35"> </td> <td COLSPAN="3"> </td> <td align="center">19 <input name=n19 type=text class="text" ID="n19" size=8 maxlength="10"></td> <td align="center">20 <input name=n20 type=text class="text" ID="n20" size=8 maxlength="10"></td> <td align="center">21 <input name=n21 type=text class="text" ID="n21" size=8 maxlength="10"></td> </tr> <tr> <td height="38"> </td> <td> </td> <td> </td> <td> </td> <td align="center">22 <input name=n22 type=text class="text" ID="n22" size=8 maxlength="10"></td> <td align="center">23 <input name=n23 type=text class="text" ID="n23" size=8 maxlength="10"></td> <td align="center">24 <input name=n24 type=text class="text" ID="n24" size=8 maxlength="10"></td> </tr> <tr> <td height="33"> </td> <td> </td> <td> </td> <td> </td> <td align="center">25 <input name=n25 type=text class="text" ID="n25" size=8 maxlength="10"></td> <td align="center">26 <input name=n26 type=text class="text" ID="n26" size=8 maxlength="10"></td> <td align="center">27 <input name=n27 type=text class="text" ID="n27" size=8 maxlength="10"></td> </tr> <tr> <td height="37"> </td> <td> </td> <td> </td> <td> </td> <td align="center">28 <input name=n28 type=text class="text" ID="n28" size=8 maxlength="10"></td> <td align="center">29 <input name=n29 type=text class="text" ID="n29" size=8 maxlength="10"></td> <td align="center">30 <input name=n30 type=text class="text" ID="n30" size=8 maxlength="10"></td> </tr> <tr> <td height="35"> </td> <td> </td> <td> </td> <td> </td> <td align="center">31 <input name=n31 type=text class="text" ID="n31" size=8 maxlength="10"></td> <td align="center">32 <input name=n32 type=text class="text" ID="n32" size=8 maxlength="10"></td> <td align="center">33 <input name=n33 type=text class="text" ID="n33" size=8 maxlength="10"></td> </tr> <tr> <td height="32"> </td> <td> </td> <td> </td> <td> </td> <td align="center">34 <input name=n34 type=text class="text" ID="n34" size=8 maxlength="10"></td> <td align="center">35 <input name=n35 type=text class="text" ID="n35" size=8 maxlength="10"></td> <td align="center">36 <input name=n36 type=text class="text" ID="n36" size=8 maxlength="10"></td> </tr> <tr> <td height="40"> </td> <td> </td> <td> </td> <td> </td> <td align="center">odd <input name=o type=text class="text" SIZE=8 maxlength="10"></td> <td align="center">19- 36 <input name=teen type=text class="text" ID="teen" size=8 maxlength="10"></td> <td align="center">Even <input name=e type=text class="text" SIZE=8 maxlength="10"></td> </tr> <tr> <td height="53"> </td> <td> </td> <td> </td> <td> </td> <td align="center">red <input name=red type=text class="text" SIZE=8 maxlength="10"></td> <td align="center">1 - 18 <input name=teen type=text class="text" ID="teen" SIZE=8 maxlength="10"></td> <td align="center">black <input name=black type=text class="text" SIZE=8 maxlength="10"></td> </tr> <tr> <td height="58"> </td> <td> </td> <td> </td> <td> </td> <td align="center">1 -12 <input name=twelve type=text class="text" ID="twelve" SIZE=8 maxlength="10"></td> <td align="center">13 -24 <input name=dtv type=text class="text" SIZE=8 maxlength="10"></td> <td align="center">25-36 <input name=vtz type=text class="text" SIZE=8 maxlength="10"></td> </tr> <tr> <td height="65"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td align="center">1st column <input name=ek type=text class="text" SIZE=8 maxlength="10"></td> <td align="center">2nd column <input name=tk type=text class="text" SIZE=8 align="10"></td> <td align="center">3rd column <input name=dk type=text class="text" SIZE=8 maxlength="10"></td> </tr> <tr> <td height="37"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td align="center"><input name='go4' type=submit class="buttong" value=Bet> <input type=reset class="buttong" value=Reset></td> <td> </td> </tr> </table></form><?php $h->endpage();
  21. Second one I've done for you now.. Next time, do it yourself! <?php session_start(); require "global_func.php"; if(!isset($_SESSION['loggedin'])) exit(header("Location: login.php")); $userid = $_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is = mysql_query("SELECT `u`.*, `us`.* FROM `users` AS `u` LEFT JOIN `userstats` AS `us` ON `u`.`userid` = `us`.`userid` WHERE `u`.`userid` = ".$userid, $c) or die(mysql_error()); $ir = mysql_fetch_array($is); check_level(); $fm = money_formatter($ir['money']); $cm = money_formatter($ir['crystals'], ''); $lv = date('F j, Y, g:i a', $ir['laston']); $h->userdata($ir, $lv, $fm, $cm); $h->menuarea(); if($ir['user_level'] != 2 && $ir['userid'] != 288) { echo "New Roulette Being Placed"; $h->endpage(); exit(); } $number = rand(1, 36); for($i = 0; $i <= 36; $i++) ${'n'.$i} = abs(@intval($_POST['n'.$i])); $e = abs(intval($_POST['e'])); $o = abs(intval($_POST['o'])); $teen = abs(intval($_POST['teen'])); $teen1 = abs(intval($_POST['teen1'])); $black = abs(intval($_POST['black'])); $red = abs(intval($_POST['red'])); $twelve = abs(intval($_POST['twelve'])); $dtv = abs(intval($_POST['dtv'])); $vtz = abs(intval($_POST['vtz'])); $ek = abs(intval($_POST['ek'])); $tk = abs(intval($_POST['tk'])); $dk = abs(intval($_POST['dk'])); if(!empty($_POST['go4'])) { $bet = $n0 + $n1 + $n2 + $n3 + $n4 + $n5 + $n6 + $n7 + $n8 + $n9 + $n10 + $n11 + $n12 + $n13 + $n14 + $n15 + $n16 + $n17 + $n18 + $n19 + $n20 + $n21 + $n22 + $n23 + $n24 + $n25 + $n26 + $n27 + $n28 + $n29 + $n30 + $n31 + $n32 + $n33 + $n34 + $n35 + $n36 + $e + $o + $teen + $teen1 + $black + $red + $twelve + $dtv + $vtz + $ek + $dk + $tk; $maxbet = 50000; $minbet = 1000; if($bet > $ir['money']) { echo "<hr width='50%'>Please read the error message.<hr width='50%'><h3>! ERROR</h3>You do not have that much money! <hr width='50%'><a href='index.php'>> Go Home</a><hr width='50%'>"; $h->endpage(); exit; } if($bet > $maxbet) { echo "<hr width='50%'>Please read the error message.<hr width='50%'><h3>! ERROR</h3>You cannot bet that much money! <hr width='50%'><a href='roulette.php'>> Go Back</a><hr width='50%'>"; $h->endpage(); exit; } if($bet < $minbet) { echo "<hr width='50%'>Please read the error message.<hr width='50%'><h3>! ERROR</h3>You need to place more money to the bet! <hr width='50%'><a href='roulette.php'>> Go Back</a><hr width='50%'>"; $h->endpage(); exit; } $nmoney = 0; if($number == 1) { $nmoney = $nmoney + $n1 * 35; $on = 1; } elseif($number == 2) { $nmoney = $nmoney + $n2 * 35; $on = 2; } elseif($number == 3) { $nmoney = $nmoney + $n3 * 35; $on = 3; } elseif($number == 4) { $nmoney = $nmoney + $n4 * 35; $on = 4; } elseif($number == 5) { $nmoney = $nmoney + $n5 * 35; $on = 5; } elseif($number == 6) { $nmoney = $nmoney + $n6 * 35; $on = 6; } elseif($number == 7) { $nmoney = $nmoney + $n7 * 35; $on = 7; } elseif($number == 8) { $nmoney = $nmoney + $n8 * 35; $on = 8; } elseif($number == 9) { $nmoney = $nmoney + $n9 * 35; $on = 9; } elseif($number == 10) { $nmoney = $nmoney + $n10 * 35; $on = 10; } elseif($number == 11) { $nmoney = $nmoney + $n11 * 35; $on = 11; } elseif($number == 12) { $nmoney = $nmoney + $n12 * 35; $on = 12; } elseif($number == 13) { $nmoney = $nmoney + $n13 * 35; $on = 13; } elseif($number == 14) { $nmoney = $nmoney + $n14 * 35; $on = 14; } elseif($number == 15) { $nmoney = $nmoney + $n15 * 35; $on = 15; } elseif($number == 16) { $nmoney = $nmoney + $n16 * 35; $on = 16; } elseif($number == 17) { $nmoney = $nmoney + $n17 * 35; $on = 17; } elseif($number == 18) { $nmoney = $nmoney + $n18 * 35; $on = 18; } elseif($number == 19) { $nmoney = $nmoney + $n19 * 35; $on = 19; } elseif($number == 20) { $nmoney = $nmoney + $n20 * 35; $on = 20; } elseif($number == 21) { $nmoney = $nmoney + $n21 * 35; $on = 21; } elseif($number == 22) { $nmoney = $nmoney + $n22 * 35; $on = 22; } elseif($number == 23) { $nmoney = $nmoney + $n23 * 35; $on = 23; } elseif($number == 24) { $nmoney = $nmoney + $n24 * 35; $on = 24; } elseif($number == 25) { $nmoney = $nmoney + $n25 * 35; $on = 25; } elseif($number == 26) { $nmoney = $nmoney + $n26 * 35; $on = 26; } elseif($number == 27) { $nmoney = $nmoney + $n27 * 35; $on = 27; } elseif($number == 28) { $nmoney = $nmoney + $n28 * 35; $on = 28; } elseif($number == 29) { $nmoney = $nmoney + $n29 * 35; $on = 29; } elseif($number == 30) { $nmoney = $nmoney + $n30 * 35; $on = 30; } elseif($number == 31) { $nmoney = $nmoney + $n31 * 35; $on = 31; } elseif($number == 32) { $nmoney = $nmoney + $n32 * 35; $on = 32; } elseif($number == 33) { $nmoney = $nmoney + $n33 * 35; $on = 33; } elseif($number == 34) { $nmoney = $nmoney + $n34 * 35; $on = 34; } elseif($number == 35) { $nmoney = $nmoney + $n35 * 35; $on = 35; } elseif($number == 36) { $nmoney = $nmoney + $n36 * 35; $on = 36; } else { $nmoney = ""; } // odd or even $type = ($number % 2 == 0) ? 'even' : 'odd'; $nmoney = ($type == "odd") ? $nmoney + $o * 2 : $nmoney + $e * 2; $nmoney += ($nummer >= 19) ? $high * 2 : $low * 2; $red = $_POST['red']; $black = $_POST['black']; $red22 = array( "1" => "1", "2" => "3", "3" => "5", "4" => "7", "5" => "9", "6" => "12", "7" => "14", "8" => "16", "9" => "18", "10" => "19", "11" => "21", "12" => "23", "13" => "25", "14" => "27", "15" => "30", "16" => "32", "17" => "34", "18" => "36" ); $ii = 1; while($ii < 18) { if($red22[$ii] == $number) { $colour1 = 'red'; $nmoney = $nmoney + $red * 2; } /////////////////////////////////////////////need to fix columns! $ii++; } if($colour1 == "") { $black1 = array( "1" => "2", "2" => "4", "3" => "6", "4" => "8", "5" => "10", "6" => "13", "7" => "15", "8" => "17", "9" => "20", "10" => "22", "11" => "24", "12" => "26", "13" => "28", "14" => "29", "15" => "31", "16" => "33", "17" => "35" ); $iii = 0; while($iii < 18) { if($black1[$iii] == $number) { $colour1 = 'black'; $nmoney = $nmoney + $black * 2; } $iii++; } } $one218 = array( "0" => "1", "1" => "2", "2" => "3", "3" => "4", "4" => "5", "5" => "6", "6" => "7", "7" => "8", "8" => "9", "9" => "10", "10" => "11", "11" => "12", "12" => "13", "13" => "14", "14" => "15", "15" => "16", "16" => "17", "17" => "18" ); $part = 0; while($part < 17) { if($one218[$part] == $number) $nmoney += $teen * 2; $part++; } $teen236 = array( "0" => "19", "1" => "20", "2" => "21", "3" => "22", "4" => "23", "5" => "24", "6" => "25", "7" => "26", "8" => "27", "9" => "28", "10" => "29", "11" => "30", "12" => "31", "13" => "32", "14" => "33", "15" => "34", "16" => "35", "17" => "36" ); $part1 = 0; while($part1 < 17) { if($teen236[$part1] == $number) $nmoney += $teen1 * 2; $part1++; } $one212 = array( "0" => "1", "1" => "2", "2" => "3", "3" => "4", "4" => "5", "5" => "6", "6" => "7", "7" => "8", "8" => "9", "9" => "10", "10" => "11", "11" => "12" ); $part2 = 0; while($part2 < 11) { if($one212[$part2] == $number) $nmoney += $twelve * 3; $part2++; } $teen2244 = array( "0" => "13", "1" => "14", "2" => "15", "3" => "16", "4" => "17", "5" => "18", "6" => "19", "7" => "20", "8" => "21", "9" => "22", "10" => "23", "11" => "24" ); $part3 = 0; while($part3 < 11) { if($teen2244[$part3] == $number) $nmoney += $dtv * 3; $part3++; } $twen5 = array( "0" => "25", "1" => "26", "2" => "27", "3" => "28", "4" => "29", "5" => "30", "6" => "31", "7" => "32", "8" => "33", "9" => "34", "10" => "35", "11" => "36" ); $part4 = 0; while($part4 < 11) { if($twen5[$part4] == $number) $nmoney += $vtz * 3; $part4++; } $small = array( "0" => "1", "1" => "5", "2" => "9", "3" => "13", "4" => "17", "5" => "21", "6" => "25", "7" => "29", "8" => "33" ); $part5 = 0; while($part5 < 8) { if($small[$part5] == $number) $nmoney += $ek * 3; $part5++; } $small1 = array( "0" => "1", "1" => "5", "2" => "9", "3" => "13", "4" => "17", "5" => "21", "6" => "25", "7" => "29", "8" => "33" ); $part6 = 0; while($part6 < 8) { if($small1[$part6] == $number) $nmoney += $tk * 3; $part6++; } $small2 = array( "0" => "1", "1" => "5", "2" => "9", "3" => "13", "4" => "17", "5" => "21", "6" => "25", "7" => "29", "8" => "33" ); $part7 = 0; while($part7 < 8) { if($small2[$part7] == $number) $nmoney += $dk * 3; $part7++; } $yougot = $nmoney - $bet; } ?> <table width="75%" border="0" cellspacing="0" cellpadding="0" > <tr> <td>Roulette</td> </tr> </table> <form method="post"> <table width="75%" border="0" cellspacing="0" cellpadding="0" > <tr> <td width="0%" height="48"> </td> <td width="0%"> </td> <td width="0%"> </td> <td width="0%"> </td> <td width="31%"> </td> <td COLSPAN="3" align="center">0 <input name=n0 type=text class="text" ID="n0" size=8 maxlength="10"></td> </tr> <tr> <td height="37"> </td> <td> </td> <td> </td> <td> </td> <td> Max Bet: $50,000 Minimum Bet: $1,000</td> <td width="23%" align="center">1 <input name=n1 type=text class="text" ID="n1" size=8 maxlength="10"></td> <td width="23%" align="center">2 <input name=n2 type=text class="text" ID="n2" size=8 maxlength="10"></td> <td width="23%" align="center">3 <input name=n3 type=text class="text" ID="n3" size=8 maxlength="10"></td> </tr> <tr> <td height="30"> </td> <td> </td> <td> </td> <td> </td> <td align="center"><h2>Money $<?php echo number_format($ir['money']); ?></h2></td> <td align="center">4 <input name=n4 type=text class="text" ID="n4" size=8 maxlength="10"></td> <td align="center">5 <input name=n5 type=text class="text" ID="n5" size=8 maxlength="10"></td> <td align="center">6 <input name=n6 type=text class="text" ID="n6" size=8 maxlength="10"></td> </tr> <tr> <td height="31"> </td> <td> </td> <td> </td> <td> </td> <td align="center"><?php if(!empty($_POST['go4'])) { if($yougot <= 0) { echo "<h3>Wheel Number " . $number . "</h3><font color='#ff000'>You lost $" . number_format($bet) . "</font>"; $result = mysql_query("UPDATE `users` SET `money` = `money` - ".$bet." WHERE `userid` = " . $userid); } elseif($yougot > 0) { echo "<h3>Wheel Number " . $number . "</h3><font color='green'>Congratulations you won $" . number_format($nmoney) . "</font>"; $result = mysql_query("UPDATE `users` SET `money` = `money` + ".$nmoney." WHERE `userid` = " . $userid); } } ?> </td> <td align="center">7 <input name=n7 type=text class="text" ID="n7" size=8 maxlength="10"></td> <td align="center">8 <input name=n8 type=text class="text" ID="n8" size=8 maxlength="10"></td> <td align="center">9 <input name=n9 type=text class="text" ID="n9" size=8 maxlength="10"></td> </tr> <tr> <td height="35"> </td> <td> </td> <td> </td> <td> </td> <td rowspan="12"><img src="images/roulettetable.gif" width="250" height="329"></td> <td align="center">10 <input name=n10 type=text class="text" ID="n10" size=8 maxlength="10"></td> <td align="center">11 <input name=n11 type=text class="text" ID="n11" size=8 maxlength="10"></td> <td align="center">12 <input name=n12 type=text class="text" ID="n12" size=8 maxlength="10"></td> </tr> <tr> <td height="34"> </td> <td> </td> <td> </td> <td> </td> <td align="center">13 <input name=n13 type=text class="text" ID="n13" size=8 maxlength="10"></td> <td align="center">14 <input name=n14 type=text class="text" ID="n14" size=8 maxlength="10"></td> <td align="center">15 <input name=n15 type=text class="text" ID="n15" size=8 maxlength="10"></td> </tr> <tr> <td height="34"> </td> <td COLSPAN="3"> </td> <td align="center">16 <input name=n16 type=text class="text" ID="n16" size=8 maxlength="10"></td> <td align="center">17 <input name=n17 type=text class="text" ID="n17" size=8 maxlength="10"></td> <td align="center">18 <input name=n18 type=text class="text" ID="n18" size=8 maxlength="10"></td> </tr> <tr> <td height="35"> </td> <td COLSPAN="3"> </td> <td align="center">19 <input name=n19 type=text class="text" ID="n19" size=8 maxlength="10"></td> <td align="center">20 <input name=n20 type=text class="text" ID="n20" size=8 maxlength="10"></td> <td align="center">21 <input name=n21 type=text class="text" ID="n21" size=8 maxlength="10"></td> </tr> <tr> <td height="38"> </td> <td> </td> <td> </td> <td> </td> <td align="center">22 <input name=n22 type=text class="text" ID="n22" size=8 maxlength="10"></td> <td align="center">23 <input name=n23 type=text class="text" ID="n23" size=8 maxlength="10"></td> <td align="center">24 <input name=n24 type=text class="text" ID="n24" size=8 maxlength="10"></td> </tr> <tr> <td height="33"> </td> <td> </td> <td> </td> <td> </td> <td align="center">25 <input name=n25 type=text class="text" ID="n25" size=8 maxlength="10"></td> <td align="center">26 <input name=n26 type=text class="text" ID="n26" size=8 maxlength="10"></td> <td align="center">27 <input name=n27 type=text class="text" ID="n27" size=8 maxlength="10"></td> </tr> <tr> <td height="37"> </td> <td> </td> <td> </td> <td> </td> <td align="center">28 <input name=n28 type=text class="text" ID="n28" size=8 maxlength="10"></td> <td align="center">29 <input name=n29 type=text class="text" ID="n29" size=8 maxlength="10"></td> <td align="center">30 <input name=n30 type=text class="text" ID="n30" size=8 maxlength="10"></td> </tr> <tr> <td height="35"> </td> <td> </td> <td> </td> <td> </td> <td align="center">31 <input name=n31 type=text class="text" ID="n31" size=8 maxlength="10"></td> <td align="center">32 <input name=n32 type=text class="text" ID="n32" size=8 maxlength="10"></td> <td align="center">33 <input name=n33 type=text class="text" ID="n33" size=8 maxlength="10"></td> </tr> <tr> <td height="32"> </td> <td> </td> <td> </td> <td> </td> <td align="center">34 <input name=n34 type=text class="text" ID="n34" size=8 maxlength="10"></td> <td align="center">35 <input name=n35 type=text class="text" ID="n35" size=8 maxlength="10"></td> <td align="center">36 <input name=n36 type=text class="text" ID="n36" size=8 maxlength="10"></td> </tr> <tr> <td height="40"> </td> <td> </td> <td> </td> <td> </td> <td align="center">odd <input name=o type=text class="text" SIZE=8 maxlength="10"></td> <td align="center">19- 36 <input name=teen type=text class="text" ID="teen" size=8 maxlength="10"></td> <td align="center">Even <input name=e type=text class="text" SIZE=8 maxlength="10"></td> </tr> <tr> <td height="53"> </td> <td> </td> <td> </td> <td> </td> <td align="center">red <input name=red type=text class="text" SIZE=8 maxlength="10"></td> <td align="center">1 - 18 <input name=teen type=text class="text" ID="teen" SIZE=8 maxlength="10"></td> <td align="center">black <input name=black type=text class="text" SIZE=8 maxlength="10"></td> </tr> <tr> <td height="58"> </td> <td> </td> <td> </td> <td> </td> <td align="center">1 -12 <input name=twelve type=text class="text" ID="twelve" SIZE=8 maxlength="10"></td> <td align="center">13 -24 <input name=dtv type=text class="text" SIZE=8 maxlength="10"></td> <td align="center">25-36 <input name=vtz type=text class="text" SIZE=8 maxlength="10"></td> </tr> <tr> <td height="65"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td align="center">1st column <input name=ek type=text class="text" SIZE=8 maxlength="10"></td> <td align="center">2nd column <input name=tk type=text class="text" SIZE=8 align="10"></td> <td align="center">3rd column <input name=dk type=text class="text" SIZE=8 maxlength="10"></td> </tr> <tr> <td height="37"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td align="center"><input name='go4' type=submit class="buttong" value=Bet> <input type=reset class="buttong" value=Reset></td> <td> </td> </tr> </table></form> <table width="75%" border="0" cellspacing="0" cellpadding="0" > <tr> <td> </td> </tr> </table> <?php $h->endpage();
  22. If memory serves me correctly, the gang forum functions are commented out and you're automatically redirected to the main forums.php with the gang board automagically created
  23. Strange.. Have you set the $v2 and $mysqli (if v1) variables?
  24. You have posted more than 1 ad, right?
  25. Nope, that's just the newspaper itself. The while() loop is what you want to check
×
×
  • Create New...