Jump to content
MakeWebGames

VitalEnd

Members
  • Posts

    68
  • Joined

  • Last visited

    Never

Everything posted by VitalEnd

  1. Cron line for updating searches   $db->query("UPDATE users SET searches = 100");
  2. Hi, i have tried a lot of thigns and cannot get it to work, i dont really want to have to put an if function for usernames in all the files that displays them so im looking for a function to go into globals.php This should give users a bold yellow name if they are a donator, red name if they are admin, green if a secretary and a purple for an assistant, if anyone can post anything up here that i can try ill much appreciate it :) THANKS :)
  3. Im sure you have seen them before. Lets say User id 1 = Name: Simon so you put in your profile signature: @1 then o viewuser in the signature it shows the name Simon, possibly in a table. Thats the tricky bit cant seem to work out.
  4. Hey all, just posting a 5050 mod up here, this is for crystals althoguh in my game i use poitns so i have the field changed. I would appreciate a little security here as i know you are able to remove a bet even if you are not the poster of that bet. Here is the code:   <?php include "globals.php"; $minbet=1; $maxg=10; echo "<big>[b]50/50 Points[/b]</big> "; function add_game() { global $ir,$t,$userid, $db, $minbet, $maxg; if(!isset($_POST['amt'])) { echo "<big>Adding a game</big> <form action='5050_points.php?add=1' method='post'> Amount of Points:<input type='text' name='amt' size=10 maxlength=10> <input type='submit' value='Add!'></form> ($maxg games max per user) [url='5050_points.php']Back[/url]"; } else { $_POST['amt'] = abs((int) $_POST['amt']); if($_POST['amt'] < $minbet){echo "The minimum bet is $minbet [url='5050_points.php?add=1']Back[/url]";exit;} $theckcount=$db->query("SELECT logID FROM 5050_points WHERE userID={$ir['userid']} and active=1"); if($db->num_rows($theckcount) > ($maxg-1)){echo "There is a maximum of $maxg games per user. [url='5050_points.php']Back[/url]";exit;} if($ir['points'] < $_POST['amt']){echo "You cannot afford that amount. [url='5050_points.php']Back[/url]";exit;} $db->query("UPDATE users SET points = points - {$_POST['amt']} WHERE userid = {$ir['userid']}"); $ir['points']=$ir['points'] - $_POST['amt']; $db->query("INSERT INTO 5050_points VALUES ('', {$ir['userid']}, {$_POST['amt']}, 1)"); echo "Your game has been set. Good Luck. [url='5050_points.php']Back[/url]"; } } function view_games() { global $ir,$t,$userid, $db, $maxg; $q=$db->query("SELECT t.*, u.username FROM 5050_points t left join users u on u.userid = t.userID WHERE t.active = 1 ORDER BY t.logID ASC"); echo "[url='5050_points.php?add=1']Add Game[/url] Table of users awaiting a challenge <table class='table' width=100%><tr><th>Game ID</th><th>User</th><th>Amount</th><th>Challenge</th><th>Cancel</th></tr>"; if($db->num_rows($q) < 1){echo "<tr><td colspan=5>There are currenly no challenges</td></tr>";} while($r=$db->fetch_row($q)) { echo "<tr><td align=center>{$r['logID']}</td><td align=center>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userID']}]</td><td align=center>{$r['amount']}</td><td align=center>[url='5050_points.php?chal={$r[']Challenge[/url]</td><td>"; if($ir['userid']==$r['userID']){echo "[url='5050_points.php?cancel={$r[']Cancel[/url]";} echo "</td></tr>"; } echo "</table>"; } function dogame() { global $ir,$t,$userid, $db; $_GET['chal'] = abs((int) $_GET['chal']); $q=$db->query("SELECT t.*, u.username from 5050_points t LEFT JOIN users u ON t.userID = u.userid Where t.logID={$_GET['chal']} AND t.active = 1 LIMIT 1"); if($db->num_rows($q) > 0) { $r=$db->fetch_row($q); if($ir['points'] < $r['amount']){echo "You cannot afford the challenge amount. [url='5050_points.php']Back[/url]";exit;} if($ir['userid'] == $r['userID']){echo "You cannot accept your own challenge. [url='5050_points.php']Back[/url]";exit;} if(rand(1,2) == 1) { $winner=$r['userID']; $loser=$ir['userid']; $winnername=$r['username']; $losername=$ir['username']; $tstring="Sorry, you Lost. Better luck next time. [url='5050_points.php']Back[/url]"; $db->query("UPDATE users SET points = points - {$r['amount']} WHERE userid={$ir['userid']}"); $db->query("UPDATE users SET points = points + ({$r['amount']} * 2) WHERE userid={$r['userID']}"); } else { $winner=$ir['userid']; $loser=$r['userID']; $winnername=$ir['username']; $losername=$r['username']; $tstring="You Won! Congratulations! You Won {$r['amount']} points. [url='5050_points.php']Back[/url]"; $db->query("UPDATE users SET points = points + {$r['amount']} WHERE userid={$ir['userid']}"); } event_add($winner, "The game of {$r['amount']} points challenged by [url='viewuser.php?u={$r[']{$r['username']}[/url] was won by [url='viewuser.php?u={$winner}']{$winnername}[/url].", $t); event_add($loser, "The game of {$r['amount']} points challenged by [url='viewuser.php?u={$r[']{$r['username']}[/url] was won by [url='viewuser.php?u={$winner}']{$winnername}[/url].", $t); $db->query("UPDATE 5050_points SET active = 0 WHERE logID={$_GET['chal']}"); echo $tstring; } else { echo "This game has either been cancelled or someone played before you got the 5050. [url='5050_points.php']Back[/url]"; exit; } } function cancel() { global $ir,$t,$userid, $db; $_GET['cancel'] = abs((int) $_GET['cancel']); $q=$db->query("SELECT * from 5050_points where logID={$_GET['cancel']} AND active = 1"); if($db->num_rows($q) > 0) { $r=$db->fetch_row($q); $db->query("UPDATE users SET points = points + {$r['amount']} WHERE userid = {$ir['userid']}"); $ir['points']=$ir['points'] + $r['amount']; $db->query("UPDATE 5050_points SET active = -1 WHERE logID = {$_GET['cancel']}"); echo "The game has been cancelled, and your points has been returned. [url='5050_points.php']Back[/url]"; } else { echo "This game has already been canceled, does not exist, or someone already played. [url='5050_points.php']Back[/url]"; } } if(isset($_GET['cancel'])){cancel();} elseif(isset($_GET['chal'])){dogame();} elseif(isset($_GET['add'])){add_game();} else{view_games();} ?>
  5. wwo, can someone upload this again please ? I would really appreciate a copy of this.
  6. Really noob thing to say here but whats the link for rating a user up ? I cant for the life of me figure it out lol
  7. Not sure if it's out there or if there is an easier way but this will update the hospital count on the mainmenu instantly. Open mainmenu.php find: $hc=$set['hospital_count']; $jc=$set['jail_count'];   replace with $hc = mysql_query("SELECT * FROM users WHERE hospital > 0"); $hospitalcount = mysql_num_rows($hc); $jc = mysql_query("SELECT * FROM users WHERE jail > 0"); $jailcount = mysql_num_rows($jc);   Now find:   {$hc}   replace with:   {$hospitalcount}   Last bit now: find:   {$jc}   replace with:   {$jailcount}   Just annoyed me that it never updated instantly so i made this quickly.
  8. Hi, i have looked around and i cannot find one, but i am looking for an ajax regster page if it is possible, if someone could go ahead and make an ajax register that would be awesome, why do i want one? i am using Lightbox on my website which means the register will be a pop up, and at the moment it pops up but when you submit it, it takes you to the page, and ajax will sort this. Thanks in advance for any help or coding towards this.
  9. awesome Wasn't expecting such a quick response and coding posted up aswell, thanks alot guys :)
  10. Hi, sorry if this is posted but i cannot find it anywhere, it may be cimple for whoever is reading this but i have just recently started working with mccodes and i am looking for a function to go in the register page which will automatically send the user an email when they first login which will welcome them to the game and give them a few tips. Secondly when changing a username in preferences it seems 2 people can have the same name. I would like to know how to fix this so it displays: "This username has already been taken". Something like that, any help would be much appreciated, thank you.
  11. Fixed ... Ok i added a function so that if you post more searches then you have then it displays a message saying you do not have that man ysearches ...   <?php include "globals.php"; ?> <style type="text/css"> p.together { line-height: .5em; text-align: left; } </style> <?php $pointsf=0; $moneyf=0; $itemsf=0; $ritemf=0; $sritemf=0; print "<h3>Search Downtown</h3> <hr> "; $_GET['action'] = mysql_real_escape_string($_GET['action']); $search=$ir['searches']; if($_POST['search']>$search) { print("You do not have that many searches left. [url='searchdowntown.php'][i]Continue ...[/i][/url] "); return; } if ($_GET['action'] != 'search') { $search=$ir['searches']; print "You can search downtown 100 times a day. You have {$search} Searches left for today. You can find Points, Money, Items or even Gain EXP. "; print " <form method=post action=search_downtown.php?action=search><input type=hidden name=action value=search><input type='text' name='search' value='{$ir['searches']}'> <input type=submit value='Search'></form> "; } else { $search=abs((int) $_POST['search']); for($i=0;$i<$search;$i++) if ($ir['searches'] < 1) { print("You have searched all you can for today. Come back at newday. [url='explore.php'][i]back to city[/i][/url] "); return; } else { $g=$i+1; $chance = rand(1,10); ## $chance = random numbr between 1 and 15 -- diferrent posiblities for search $chancepoints= rand (1,25); ## Chance to find points : tweak this to change the rate that you find points $chancemoney = rand (1,10); $chanceitem = rand (1,25); $chanceritem = rand (1,50); $chancesritem = rand (1,75); $query1=sprintf("UPDATE users SET searches=searches-1 where userid=$userid"); $db->query($query1); print"<p class='together'>[b] $g : [/b]"; if ($chance == 1) { print "Nothing here."; } ## CHANCE FOR POINTS if ($chance == 2) { if ($chancepoints < 23) { print "Nothing here."; } if ($chancepoints == 23) { $gain = rand(1,15); print "You found [b]$gain[/b] Points."; $query2=sprintf("UPDATE users SET points=points+$gain where userid=$userid"); $db->query($query2); $pointsf=$pointsf+$gain; } if ($chancepoints == 24) { $gain = rand(1,10); print "You found [b]$gain[/b] Points."; $query3=sprintf("UPDATE users SET points=points+$gain where userid=$userid"); $db->query($query3); $pointsf=$pointsf+$gain; } if ($chancepoints == 25) { $gain = rand(1,5); print "You found [b]$gain[/b] Points."; $query4=sprintf("UPDATE users SET points=points+$gain where userid=$userid"); $db->query($query4); $pointsf=$pointsf+$gain; } } ## CHANCE FOR MONEY if ($chance == 3) { if ($chancemoney < 7) { print "Nothing here."; } if ($chancemoney == 7) { $gain = rand(50,100)*(floor($ir['level']/2)+1); print "You found [b] \$$gain[/b]."; $query5=sprintf("update users set money=money+$gain where userid=$userid"); $db->query($query5); $moneyf=$moneyf+$gain; } if ($chancemoney == 8) { $gain = rand(75,150)*(floor($ir['level']/2)+1); print "You found [b] \$$gain[/b]."; $query6=sprintf("update users set money=money+$gain where userid=$userid"); $db->query($query6); $moneyf=$moneyf+$gain; } if ($chancemoney == 9) { $gain = rand(50,100)*(floor($ir['level']*2)); print "You found [b] \$$gain[/b]."; $query7=sprintf("update users set money=money+$gain where userid=$userid"); $db->query($query7); $moneyf=$moneyf+$gain; } if ($chancemoney == 10) { $gain = rand(150,300)*(floor($ir['level']/2)+1); print "You found [b] \$$gain[/b]."; $query8=sprintf("update users set money=money+$gain where userid=$userid"); $db->query($query8); $moneyf=$moneyf+$gain; } } if ($chance == 4) { print "Nothing here. "; } ########################### ## CHANCE FOR COMMON ITEM # ########################### if ($chance == 5) { if ($chanceitem == 22) { ## RANDOM NUMBER FOR COMMON ITEM srand ((double) microtime() * 10000000); // $ri = array("50","52","53","54","8","30");**EXAMPLE** $ci = array("1","2","3"); ## Add You common Items ID to this array $cia = array_rand($ci,1); $common = mysql_query("SELECT * FROM `items` WHERE `itmid`='".$ci[$cia]."' LIMIT 1"); $comi = mysql_fetch_array($common); $query9=sprintf("INSERT INTO inventory VALUES('',$ci[$cia],$userid,1)",$c); $db->query($query9); $itemsf = $itemsf +1; print " You found a/an {$comi['itmname']} !"; } else { echo "Nothing here."; } } if ($chance == 6) { print "Nothing here. "; } if ($chance == 7) { $gain = rand(50,100)*(floor($ir['level']*2)); print "You found [b] \$$gain[/b]."; $query10=sprintf("update users set money=money+$gain where userid=$userid"); $db->query($query10); $moneyf=$moneyf+$gain; } if ($chance == 8) { $gain = rand(50,100)*(floor($ir['level']/2)+1); print "You found [b] \$$gain[/b]."; $query11=sprintf("update users set money=money+$gain where userid=$userid"); $db->query($query11); $moneyf=$moneyf+$gain; } ########################## ## CHANCE FOR RARE ITEM ## ########################## if ($chance == 9) { if ($chanceritem == 25) { ## RANDOM NUMBER FOR RARE ITEM srand ((double) microtime() * 10000000); $ri = array("1","2","3"); ## Add Your Rare Items ID to this array $ria = array_rand($ri,1); $common = mysql_query("SELECT * FROM `items` WHERE `itmid`='".$ri[$ria]."' LIMIT 1"); $ri = mysql_fetch_array($common); $query12=sprintf("INSERT INTO inventory VALUES('',$ri[$ria],$userid,1)",$c); $db->query($query12); $ritemf = $ritemf + 1; print " You found a/an {$ri['itmname']} !"; } else { echo "Nothing here."; } } ################################ ## CHANCE FOR SUPER RARE ITEM ## ################################ if ($chance == 10) { if ($chancesritem == 25) { ## RANDOM NUMBER FOR SUPER RARE ITEM srand ((double) microtime() * 10000000); $ri = array("1","2","3"); ## Replace numbers with your Super Rare Items ID to this array $ria = array_rand($ri,1); $common = mysql_query("SELECT * FROM `items` WHERE `itmid`='".$ri[$ria]."' LIMIT 1"); $ri = mysql_fetch_array($common); $query13=sprintf("INSERT INTO inventory VALUES('',$ri[$ria],$userid,1)",$c); $db->query($query13); $sritemf = $sritemf + 1; print " You found a/an {$ri['itmname']} !"; } else { echo "Nothing here."; } } } $moneyf=number_format($moneyf); print " <hr></p> You found a total of [b] $pointsf [/b]Points. You found a total of [b] \$$moneyf. [/b] You found a total of [b] $itemsf [/b] Items. "; if ($ritemf > 0){ print "[b] You found a total of[i] $ritemf [/i]Rare Items.[/b] "; } if ($sritemf > 0){ print "[b] You found a total of[i] $sritemf [/i] Super Rare Items.[/b] "; } print "<hr>"; if($ir['searches']==0) { print("You have searched all you can for today. Come back at newday. [url='explore.php'][i]back to city[/i][/url] "); return; } else { print " <form method=post action=searchdowntown.php?action=search><input type=hidden name=action value=search><input type='text' name='search' value=' {$ir['searches'] }'> <input type=submit value='Search'></form>"; } } $h->endpage(); ?>
  12. BUMP I know this is old, but this is just what people are still looking for and cannot find ths so im bumping it, GREAT MOD MAN NICE WORK. Only one problem ... If you search say ... 100 times. And then refresh .. you will go into minus searches. So .. little error there needs to be fixed, ill have a go and if i succeed ill post up the fix here.
  13. hmmm... Can anyone tell me if this ever got done ?
  14. hmm i think this is what you mean but it does appear pri is declared as something: $pri = $db->query("SELECT * FROM `items` WHERE (`itmid` = ". $ir['equip_primary'] .");"); // $user_class1 & $q0
  15. Hi, i am using a one click attack system and i get the following error: Warning: Cannot use a scalar value as an array in /home/mafiasta/public_html/attack.php on line 74 Line 74 is: $pri['weapon'] = 10;   i've no idea what is wrong, can anyone help ?
  16. fixed... Sorryzed as i said in above post i said it did not send event or update money upon winning the bid, i was wrong, it works perfectly there is only one error which i have corrected for people it was just one update line to update the users money when they buy the item with the buy it now price ...   <?php //Made by zeddicus, do NOT re-distribute. //Copyright 2010 include(DIRNAME(__FILE__).'/globals.php'); $_GET['page'] = isset($_GET['page']) ? trim($_GET['page']) : 'index'; switch($_GET['page']) { case 'index' : index(); break; case 'Bid' : Bid(); break; case 'Add' : Add(); break; default : index(); break; } function index() { global $h; $Data = mysql_query("SELECT g.`ID`,g.`SellerID`,g.`ItemID`,g.`Time`,g.`CurrentBid`,g.`BuyNow`,g.`TimeLeft`,i.`itmid`,i.`itmname` FROM `gAuction` g LEFT JOIN `items` i ON (g.`ItemID` = i.`itmid`)") or die(mysql_error()); echo (' <span style = "font-size:2em; font-family:Arial,Helvetica,sans-serif; color:#8B0000">Auction House</span> <hr width = "90%"> <table border = "0" class = "table" align = "center" width = "90%" style = "text-align:center" cellspacing = "1"> <tr> <th>Seller</th> <th>Item</th> <th>Time Left</th> <th>Current Bid</th> <th>Links</th> </tr>'); if(!mysql_num_rows($Data)) { echo ('<tr> <td colspan = "5">There are no auction being held at the present time.</td> </tr> </table>'); exit($h->endpage()); }else{ while($aData = mysql_fetch_array($Data)) { $time = $aData['Time'] - time() + $aData['TimeLeft']; echo (' <tr> <td>'.$aData['SellerID'].'</td> <td>'.stripslashes(htmlentities($aData['itmname'])).'</td> <td>'.time_format($time).'</td> <td width = "15%">$'.number_format($aData['CurrentBid']).'</td> <td width = "15%" align = "center"><a href = "auction.php?page=Bid&ID='.$aData['ID'].'"><span style = "color:#8B0000">Bid</span></a>|| <a href = "iteminfo.php?ID='.$aData['ItemID'].'"><span style = "color:#8B0000">Info</span></a></td>'); } echo ('</tr> </table> '); } $h->endpage(); } function Bid() { global $h,$ir; echo (' <span style = "font-size:2em; font-family:Arial,Helvetica,sans-serif; color:#8B0000">Bidding on Item</span> <hr width = "90%">'); $Data = mysql_query("SELECT g.`ID`,g.`SellerID`,g.`ItemID`,g.`CurrentBid`,g.`BuyNow`,g.`TimeLeft`,i.`itmid`,i.`itmname` FROM `gAuction` g LEFT JOIN `items` i ON (g.`ItemID` = i.`itmid`) WHERE (g.`ID` = ".abs(intval($_GET['ID'])).")") or die(mysql_error()); if(!mysql_num_rows($Data) || !ctype_digit($_GET['ID'])) { echo ('An error has occurred, please go back and try again.'); exit($h->endpage()); } $Data = mysql_fetch_array($Data); if((isset($_POST['bid']))) { if(!ctype_digit($_POST['bid'])) { echo ('An error has occurred, please try again.'); exit($h->endpage()); } if($_POST['bid'] < $Data['CurrentBid'] || $ir['money'] < $_POST['bid']) { echo ('You\'ve bidded below the current bid, or you don\'t have enough cash to bid. <a href = "/auction.php"><span style = "color:#8B0000">Go Back</span></a>'); exit($h->endpage()); } if($_POST['bid'] >= $Data['BuyNow'] && $Data['BuyNow'] > 0) { mysql_query("DELETE FROM `gAuction` WHERE (`ID` = ".abs(intval($_GET['ID'])).")"); //Auction Delete mysql_query("UPDATE `users` SET `money` = `money` - ".abs(intval($_POST['bid']))." WHERE (`userid` = ".$_SESSION['userid'].")"); //Take cash from user mysql_query("INSERT INTO `inventory` VALUES ('',".$Data['ItemID'].",".$_SESSION['userid'].",1)"); // Credit winner item event_add($Data['SellerID'],''.mysql_real_escape_string($ir['username']).' bought your item of the auction using your "Buy It Now Price" ($'.number_format($Data['BuyNow']).')'); mysql_query("UPDATE `users` SET `money` = `money` + ".abs(intval($_POST['bid']))." WHERE (`userid` = ".$Data['SellerID'].")"); //Give cash to user echo ('You\'ve successfully purchased the item from the Auction using the "Buy It Now" price!. <a href = "/index.php"><span style = "color:#8B0000">Go Home</span></a>'); }else{ mysql_query("UPDATE `gAuction` SET `CurrentBid` = ".abs(intval($_POST['bid']))." WHERE (`ID` = ".abs(intval($_GET['ID'])).")"); // mysql_query("INSERT INTO `gAuctionBids` VALUES ('',".$Data['ID'].",".$_SESSION['userid'].",".abs(intval($_POST['bid'])).")"); //insert bid mysql_query("UPDATE `users` SET `money` = `money` - ".abs(intval($_POST['bid']))." WHERE (`userid` = ".$_SESSION['userid'].")"); //Take cash from user echo ('Your bid has been confirmed. <a href = "/auction.php"><span style = "color:#8B0000">Back to Auction</span></a>'); } } if($Data['BuyNow'] == 0) { $Buy = 'Disabled by user'; }else{ $Buy = number_format($Data['BuyNow']); } if($Data['BuyNow'] == 0) { $Sign = ''; }else{ $Sign = '$'; } echo (' <table class = "table" cellspacing = "1" width = "35%" align = "center" style = "text-align:center"> <form action = "auction.php?page=Bid&ID='.$_GET['ID'].'" method = "post"> <tr> <td width = "25%">Item Name:</td> <td><span style = "color:#8B0000">'.htmlentities($Data['itmname']).'</span></td> </tr> <tr> <td width = "25%">Current Bid:</td> <td>'.number_format($Data['CurrentBid']).'</td> </tr> <tr> <td width = "25%">Buy Now Price:</td> <td>'.$Sign.''.$Buy.'</td> </tr> <tr> <td width = "25%">Enter Bid:</td> <td><input type = "text" name = "bid" value = "0" /></td> </tr> <tr> <td colspan = "2"><input type = "submit" value = "Place Bid" /></td> </tr> </form> </table> <a href = "/auction.php"><span style = "color:#8B0000">Go Back</a>'); $h->endpage(); } function Add() { global $h; $Data = mysql_query("SELECT i.`inv_itemid`,i.`inv_userid`,i.`inv_qty`,it.`itmid`,it.`itmname` FROM `inventory` i LEFT JOIN `items` it ON (i.`inv_itemid` = it.`itmid`) WHERE (`inv_userid` = ".$_SESSION['userid'].") AND (`inv_itemid` = ".abs(intval($_GET['ID'])).")") or die(mysql_error()); if(!mysql_num_rows($Data) || !ctype_digit($_GET['ID'])) { echo ('An error has occurred, please go back and try again.'); exit($h->endpage()); } $Data = mysql_fetch_array($Data); echo (' <span style = "font-size:2em; font-family:Arial,Helvetica,sans-serif; color:#8B0000">Adding Item To Auction</span> <hr width = "90%"> You have <span style = "color:#8B0000">[i]'.number_format($Data['inv_qty']).'[/i]</span> - <span style = "color:#8B0000">[i]'.htmlentities($Data['itmname']).'[/i]</span> <hr width = "90%">'); if((isset($_POST['time']))) { $One = mysql_query("SELECT `ID` FROM `gAuction` WHERE (`SellerID` = ".$_SESSION['userid'].")"); if(mysql_num_rows($One)) { echo ('Only one item at the auction please.'); exit($h->endpage()); } if(!in_array($_POST['time'], array('1Hour','6Hours','1Day','2Days'))) { echo ('An error has occured please go back and try again.'); exit($h->endpage()); } if($Data['inv_qty'] < 1) { echo ('It seems you don\'t have enough of this item to send it to auction.'); exit($h->endpage()); } if($_POST['time'] === '1Hour') { $time = '3600'; } elseif($_POST['time'] === '6Hours') { $time = '21600'; } elseif($_POST['time'] === '1Day') { $time = '86400'; } elseif($_POST['time'] === '2Days') { $time = '172800'; } mysql_query("INSERT INTO `gAuction` VALUES ('',".$_SESSION['userid'].",".$Data['itmid'].",".abs(intval($_POST['sbid'])).",".abs(intval($_POST['buy'])).",".$time.",unix_timestamp())") or die(mysql_error()); if($Data['inv_qty'] > 1) { mysql_query("UPDATE `inventory` SET `inv_qty` = `inv_qty` - 1 WHERE (`inv_userid` = ".$_SESSION['userid'].") AND (`inv_itemid` = ".$Data['itmid'].")") OR DIE(MYSQL_ERROR()); }else{ mysql_query("DELETE FROM `inventory` WHERE (`inv_userid` = ".$_SESSION['userid'].") AND (`inv_itemid` = ".$Data['itmid'].")")OR DIE(MYSQL_ERROR()); } echo ('You\'ve successfully add the item to the auction. <a href = "/auction.php"><span style = "color:#8B0000">Click here to View</span></a>'); }else{ echo (' <table border = "0" class = "table" cellspacing = "1" width = "60%" align = "center" style = "text-align:center"> <form action = "auction.php?page=Add&ID='.$_GET['ID'].'" method = "post"> <tr> <td colspan = "2">Select the amount off time you wish your auction to last.</td> </tr> <tr> <td colspan = "2">1 Hour<input type = "radio" name = "time" value = "1Hour" /> 6 Hours<input type = "radio" name = "time" value = "6Hours" /> 24 Hours<input type = "radio" name = "time" value = "1Day" /> 48 Hours<input type = "radio" name = "time" value = "2Days" /></td> </tr> <tr> <td>Starting Bid</td> <td><input type = "text" name = "sbid" value = "0" /></td> </tr> <tr> <td>Buy It Now Price:</td> <td><input type = "text" name = "buy" value = "0" />(Enter 0 to disable)</td> </tr> <tr> <td colspan = "2"><input type = "submit" value = "Add item to auction" /></td> </tr> </form> </table> <a href = "/inventory.php"><span style = "color:#8B0000">Go Back</span></a>'); } $h->endpage(); } ?>
  17. error Same problem as above, seller does not recive any money. Neither is there an eventsent to the player when they win the auction.
×
×
  • Create New...