Jump to content
MakeWebGames

Feky

Members
  • Posts

    172
  • Joined

  • Last visited

    Never

Everything posted by Feky

  1. Feky

    Name bug

    Re: Name bug works now
  2. Feky

    Name bug

    Re: Name bug You Have Changed Your Username nope still the same lol still allows you to leave a space then have any name
  3. Feky

    Name bug

    Re: Name bug yeah lol weird i bet it is possilbe to od in you game also
  4. Feky

    Name bug

    Re: Name bug   That would be wrong.   " Haunted Dawg " becomes "Haunted Dawg" HD looks like you have the same probem in your game lol check my name in your game and my id is [12,675]
  5. Feky

    Name bug

    Re: Name bug this is the query $db->query(sprintf("UPDATE `users` SET `username`='%s' WHERE `userid`='%d'", $_POST['NewName'], $userid));
  6. Feky

    Name bug

    Re: Name bug i tryed all the way and non of them work lol it still let you leave a space before the name try it in ur game and see if it happend its like this (user box) space and any name you want even duplacate
  7. Feky

    Name bug

    Re: Name bug so how would tht be then so far i got this $_POST['NewName'] = str_replace(array("<",">", "'", ";"), array(" ", "", "", ""), $_POST['NewName']); $_POST['NewName'] = trim($_POST['NewName']);
  8. Feky

    Name bug

    Re: Name bug nope still allows player to leave a space then type in any name that already exists lol i think this could be in alots of mccodes game
  9. Feky

    Name bug

    Re: Name bug not much good at triming but i am guesing it to do with this line can some oe do it $_POST['NewName'] = str_replace(array("<", ">", "'", ";"), array("", "", "", ""), $_POST['NewName']);
  10. Feky

    Name bug

    some how player it is possible to have the same name as some in my game if you put a space at the start is their anyway to prevent this thank you
  11. Re: [mc code V2]Updated Lottery weird lol it works for me
  12. Re: [MC Codes V2] Advanced Player Reports been looking for somit like this for time now +2 karlos
  13. Re: +10 for who ever can fix this does anyone know how to fix it its richard free mod anyone can add it once its fixed
  14. Re: +10 for who ever can fix this  
  15. can anyone know why its not showing how much job point i get each day and this is what it says and it dosent show how much i get each day it just say (You receive $300 and Job Points) (You currently work in the Army! You receive $300 and Job Points You also receive 9 IQ, 9 strength, and 9 labour!)   <?php $jobquery=1; include "globals.php"; $_GET['interview'] = abs((int) $_GET['interview']); if(!$ir['job']) { if(!$_GET['interview']) { print "You do not yet have a job. A list of jobs is available below. "; $q=$db->query("SELECT * FROM jobs"); while($r=$db->fetch_row($q)) { print "> {$r['jNAME']} - {$r['jDESC']} - [url='job.php?interview={$r[']Go to interview[/url] "; } } else { $q=$db->query("SELECT j.*,jr.* FROM jobs j LEFT JOIN jobranks jr ON j.jFIRST = jr.jrID WHERE j.jID={$_GET['interview']}"); $r=$db->fetch_row($q); print "{$r['jOWNER']}: So {$ir['username']}, you were looking for a job with us? {$ir['username']}: Yes please! "; if($ir['strength'] >= $r['jrSTRN'] && $ir['labour'] >= $r['jrLABOURN'] && $ir['IQ'] >= $r['jrIQN']) { $db->query("UPDATE users SET job={$_GET['interview']},jobrank={$r['jrID']} WHERE userid=$userid;"); $db->query("UPDATE users SET jobpay={$r['jrPAY']} WHERE userid=$userid;"); print "{$r['jOWNER']}: Okay {$ir['username']}, we're good to go, see you tomorrow. {$ir['username']}: Thanks! [url='job.php']Start your job[/url]"; } else { print "{$r['jOWNER']}: Sorry {$ir['username']}, you're not far enough in the game to work in this job. You'll need:"; if($ir['strength'] < $r['jrSTRN']) { $s=$r['jrSTRN']-$ir['strength']; print " $s more strength, "; } if($ir['labour'] < $r['jrLABOURN']) { $s=$r['jrLABOURN']-$ir['labour']; print " $s more labour, "; } if($ir['IQ'] < $r['jrIQN']) { $s=$r['jrIQN']-$ir['IQ']; print " $s more IQ, "; } print "before you'll be able to work here! [url='index.php']:'([/url]"; } } } else { switch($_GET['action']) { case 'quit': quit_job(); break; case 'promote': job_promote(); break; default: job_index(); break; } } function job_index() { global $db, $ir,$c,$userid,$h; print "<h3>Your Job</h3> You currently work in the {$ir['jNAME']}! You receive \${$ir['jrPAY']} and {$ir['jrPOINTS']} Job Points You also receive {$ir['jrIQG']} IQ, {$ir['jrSTRG']} strength, and {$ir['jrLABOURG']} labour! <table width=80% class='table'><tr><td>Job Points:{$ir['jobpoints']} <tr><td>Strength: {$ir['strength']}</td><td>IQ: {$ir['IQ']}</tr></td><tr><td>Labour: {$ir['labour']}</td><td>Job Rank: {$ir['jrNAME']}</td></tr></table> <table width=80% cellspacing=1 class='table'><tr style='background:gray'><th>Title</th><th>Pay</th><th>Strength Reqd</th><th>IQ Reqd</th><th>Labour Reqd</th></tr>"; $q=$db->query("SELECT * FROM jobranks WHERE jrJOB={$ir['job']} ORDER BY jrPAY ASC;"); while($r=$db->fetch_row($q)) { print "<tr><td>{$r['jrNAME']}</td><td>\${$r['jrPAY']}</td><td>{$r['jrSTRN']}</td><td>{$r['jrIQN']}</td><td>{$r['jrLABOURN']}</td></tr>"; } $js=$db->query("SELECT * FROM jobspecials WHERE jsJOB={$ir['job']} ORDER BY jsID ASC;",$c); print "[b]Job Ranks[/b] <form action='specials.php' method='post'> <table width=80% cellspacing=1 class='table'> <tr> <th><font color=white>Job Specials</font></th> <th><font color=white>Cost</font></th> <th><font color=white>Take</font></th></tr>"; if($db->num_rows($js) == 0) { print "<tr class='row$current_row'><td colspan=3>This Job has no Speacials</td></tr>"; $current_row = 1 - $current_row; } while($sp=$db->fetch_row($js)) { print "<tr class='row$current_row'><td><font color=black>{$sp['jsNAME']}</td><td><font color=#FF0000>-{$sp['jsCOST']} Job Points</font></td><td><center><input type='radio' name='ID' value='{$sp['jsID']}' /></td></tr>"; $current_row = 1 - $current_row; } print "<tr> <td colspan=3><div align=center><input type='submit' value='Purchase'></div></td> </tr></table></form>"; print "</table> [url='job.php?action=promote']> Try To Get Promoted[/url] [url='job.php?action=quit']> Quit[/url]"; } function job_promote() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM jobranks WHERE jrPAY > {$ir['jrPAY']} AND jrSTRN <= {$ir['strength']} AND jrLABOURN <= {$ir['labour']} AND jrIQN <= {$ir['IQ']} AND jrJOB = {$ir['job']} ORDER BY jrPAY DESC LIMIT 1"); if($db->num_rows($q) == 0) { print "Sorry, you cannot be promoted. [url='job.php']> Back[/url]"; } else { $r=$db->fetch_row($q); $db->query("UPDATE users SET jobrank={$r['jrID']} WHERE userid=$userid"); $db->query("UPDATE users SET jobpay={$r['jrPAY']} WHERE userid=$userid;"); print "Congrats, you have been promoted to {$r['jrNAME']} [url='job.php']> Back[/url]"; } } function quit_job() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET job=0,jobrank=0 WHERE userid=$userid"); $db->query("UPDATE users SET jobpay=0 WHERE userid=$userid;"); print "You have quit your job! [url='job.php']> Back[/url]"; } $h->endpage(); ?>
  16. Re: [mc code V2]Updated Lottery     CREATE TABLE `lottery` ( `id` int(11) NOT NULL auto_increment, `userid` int(11) NOT NULL, `amount` int(11) NOT NULL, `jackpot` int(11) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;   add this sql to users table `lottery` int(11) NOT NULL default '0',
  17. Feky

    Gang surrender

    Re: Gang surrender replace this function with you old gang_staff_viewsurrenders() function i think this should do it function gang_staff_viewsurrenders() { global $db,$ir,$c,$userid,$gangdata, $h; if(!isset($_POST['subm'])) { print "<form action='yourgang.php?action=staff&act2=viewsurrenders' method='post'> Choose who to accept the surrender from. <input type='hidden' name='subm' value='submit' /> Gang: <select name='sur' type='dropdown'>"; $wq=$db->query("SELECT s.*,w.* FROM surrenders s LEFT JOIN gangwars w ON s.surWAR=w.warID WHERE surTO={$ir['gang']}"); while($r=$db->fetch_row($wq)) { if($gangdata['gangID'] == $r['warDECLARER']) { $w="You";$f="warDECLARED"; } else { $w="Them";$f="warDECLARER"; } $ggq=$db->query("SELECT * FROM gangs WHERE gangID=".$r[$f]); $them=$db->fetch_row($ggq); print "<option value='{$r['surID']}'>War vs. {$them['gangNAME']} (Msg: {$r['surMSG']})</option>"; } print "</select> <input type='submit' value='Accept Surrender' /></form>"; } else { if ($_POST['sur'] == NULL) { echo 'No War..'; $h->endpage(); exit; } $_POST['sur'] = abs((int) $_POST['sur']); $q=$db->query("SELECT surWAR FROM surrenders WHERE surID={$_POST['sur']}"); $_POST['war'] = $db->fetch_single($q); $wq=$db->query("SELECT * FROM gangwars where warID={$_POST['war']}"); $r=$db->fetch_row($wq); if($gangdata['gangID'] == $r['warDECLARER']) { $w="You";$f="warDECLARED"; } else { $w="Them";$f="warDECLARER"; } $db->query("DELETE FROM surrenders WHERE surID={$_POST['sur']}"); $db->query("DELETE FROM gangwars WHERE warID={$_POST['war']}"); $ggq=$db->query("SELECT * FROM gangs WHERE gangID=".$r[$f]); $them=$db->fetch_row($ggq); $event=str_replace("'","''","[url='gangs.php?action=view&ID={$ir[']{$gangdata['gangNAME']}[/url] have accepted the surrender from [url='gangs.php?action=view&ID={$them[']{$them['gangNAME']}[/url], the war is over!"); $db->query("INSERT INTO gangevents VALUES('',{$ir['gang']},unix_timestamp(),'$event') , ('',".$r[$f].",unix_timestamp(),'$event')"); print "You have accepted surrender, the war is over."; } }
  18. Re: itm info pic can someone sort this layout lol its messed i tred but get errors <?php include "globals.php"; //look up item $_GET['ID'] = abs((int) $_GET['ID']); $itmid=$_GET['ID']; if(!$itmid) { print "Invalid item ID"; } else { $q=$db->query("SELECT i.*,it.* FROM items i LEFT JOIN itemtypes it ON i.itmtype=itmtypeid WHERE i.itmid=$itmid LIMIT 1"); if (!$db->num_rows($q)) { print "Invalid item ID"; } else { if($id['itmpic']) { $itmpic = "<tr style='background: gray;'><td colspan='2' style='text-align: center;'>[img=itmpics/".$id[]</td></tr>"; } print "<table width=20% class='table' cellspacing='1'><tr style='background: gray;'><th colspan=2>[b]Looking up info on $id=$db->fetch_row($q); {$id['itmname']}[/b]</th></tr>$itmpic<tr bgcolor=#dfdfdf><td colspan=2>The [b]{$id['itmname']}[/b] is a/an {$id['itmtypename']} Item - [b]{$id['itmdesc']}[/b]</th><tr style='background: black;'><th colspan=2>Item Info</th></tr><tr style='background:gray'><th>Item Buy Price</th><th>Item Sell Price</th></tr><tr><td>"; if($id['itmbuyprice']) { print money_formatter($id['itmbuyprice']); } else { print "N/A"; } print "</td><td>"; if($id['itmsellprice']) { print money_formatter($id['itmsellprice']); } else { print "N/A</td></tr></table>"; } } } $h->endpage(); ?>
  19. could anyone add a feature to view pics of items in item info.php and +2 for anyone who does this for me thanks folder is called [itmpics]and sql is [itmpic] <?php include "globals.php"; //look up item $_GET['ID'] = abs((int) $_GET['ID']); $itmid=$_GET['ID']; if(!$itmid) { print "Invalid item ID"; } else { $q=$db->query("SELECT i.*,it.* FROM items i LEFT JOIN itemtypes it ON i.itmtype=itmtypeid WHERE i.itmid=$itmid LIMIT 1"); if (!$db->num_rows($q)) { print "Invalid item ID"; } else { $id=$db->fetch_row($q); print " <table width=75% class='table' cellspacing='1'> <tr> <th colspan=5><font color=#696969>Item Information</font></th> </tr> <tr align=center> <td width=20% background=silverbar2.png>[b]Item Name[/b]</td><td width=80% colspan=4 background=silverbar2.png>[b]Item Description[/b]</td> </tr> <tr> <td><center><font color=blue>{$id['itmname']}</font></center></td><td rowspan=2 colspan=4>[b]{$id['itmdesc']}[/b]</td> </tr> <tr align=center> <td background=silverbar2.png>[b]Item Type[/b]</td> </tr> <tr align=center> <td width=20%><font color=#800517>{$id['itmtypename']}</font></td> <td width=20% background=silverbar2.png>[b]Item Buy Price:[/b]</td> <th width=20%><font color=#696969>"; if($id['itmbuyprice']) { print money_formatter($id['itmbuyprice']); } else { print "N/A"; } print "</font></th> <td width=20% background=silverbar2.png>[b]Item sell Price:[/b]</td> <th width=20%><font color=#696969>"; if($id['itmsellprice']) { print money_formatter($id['itmsellprice']); } else { print "N/A"; } print "</font> </th> </tr> </table>"; } } $h->endpage(); ?>
  20. Re: +10 for who ever can fix this this is the cron   $db->query("UPDATE rentals set reDAYS=reDAYS-1"); $io=$db->query("SELECT * FROM users where rent>0"); $hu=$db->fetch_row($io); $gd=$db->query("SELECT * FROM rentals WHERE reRENTER={$hu['userid']}"); $hd=$db->fetch_row($gd); $db->query("UPDATE users set money=money-{$hd['reCOST']} WHERE userid={$hd['reRENTER']}"); $q=$db->query("SELECT * FROM rentals WHERE reDAYS=0"); $ids=array(); while($r=$db->fetch_row($q)) { if (!$r['reDAYS']) { $rf=$db->query("SELECT * FROM properties WHERE prID={$r['rePID']}"); $gf=$db->fetch_row($rf); $db->query("DELETE FROM properties WHERE prID={$r['rePID']}"); $db->query("UPDATE users SET rent=0 WHERE userid={$r['reRENTER']}"); $db->query("INSERT INTO `properties` (`prID`, `prOWNER`, `prHOUSE`) VALUES ('{$r['rePID']}', '{$r['reOWNER']}', '{$gf['prHOUSE']}');",$c); $db->query("DELETE FROM rentals WHERE reDAYS=0"); } }
  21. Re: View Item Information Parse error: syntax error, unexpected '&' in /home/feky/public_html/itemid.php on line 7
  22. ive been try to sort this for a long time but cant seem to th hang of it.The problem is when a user rents a house and moves in then moves out again ,he become the owner and the original owner dosent get the house when the rent is over. properties.php <?php include "globals.php"; print "<center><font size='4' face='Arial, Helvetica, sans-serif'>Your Properties</font><hr width=75%>"; switch($_GET['action']) { case 'sell': sell_house(); break; case 'market': market_house(); break; case 'rent': rent_house(); break; case 'give': send_house(); break; case 'move': move_house(); break; case 'return': return_house(); break; default: your_houses(); break; } function your_houses() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT pr.*,h.* FROM properties pr LEFT JOIN houses h ON pr.prHOUSE=h.hID WHERE pr.prOWNER={$userid} ORDER BY h.hPRICE ASC",$c); if ($db->num_rows($q) == 0) { print "You have no houses."; } else { print "<table width=60% cellspacing=1>"; while($r=$db->fetch_row($q)) { print "<tr>"; $dfi=$db->query("SELECT * FROM users WHERE userid={$r['prOWNER']}",$c); $tb=$db->fetch_row($dfi); print "<td valign='center'> [b]Property: [/b]{$r['hNAME']} [b]Owner: [/b][url='viewuser.php?u={$tb[']{$tb['username']}[/url] [b]Upkeep: [/b]\${$r['hTAX']} [b]Will: [/b]{$r['hWILL']}</td> <td align='center'> [[url='properties.php?action=move&ID={$r[']Move In[/url]] "; $yd=$db->query("SELECT * FROM rentals WHERE reRENTER=$userid AND rePID={$r['prID']}",$c); $zf=$db->fetch_row($yd); $tr=$db->num_rows($yd); if ($r['hWILL'] != '100' && $tr == '0') { print " [[url='properties.php?action=sell&ID={$r[']Sell[/url]] [[url='properties.php?action=market&ID={$r[']Market[/url]] [[url='properties.php?action=rent&ID={$r[']Rent[/url]] [[url='properties.php?action=give&ID={$r[']Give[/url]] "; } $yd=$db->query("SELECT * FROM rentals WHERE reRENTER=$userid AND rePID={$r['prID']}",$c); $zf=$db->fetch_row($yd); $tr=$db->num_rows($yd); if ($tr) { print "[[url='properties.php?action=return&ID={$r[']Return[/url]] "; } $hprice=money_formatter($r['hPRICE']); print "</tr><tr><td height='10'></td></tr>"; } print "</table> "; } } function sell_house() { global $db,$ir,$c,$userid,$h; $_GET['ID'] = abs((int) $_GET['ID']); $yd=$db->query("SELECT * FROM rentals WHERE reRENTER=$userid AND rePID={$_GET['ID']}",$c); $zf=$db->fetch_row($yd); $tr=$db->num_rows($yd); if ($tr) { die (" This house has been rented! <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%> "); } $q=$db->query("SELECT pr.*,h.* FROM properties pr LEFT JOIN houses h ON pr.prHOUSE=h.hID WHERE pr.prID={$_GET['ID']} AND pr.prOWNER=$userid LIMIT 1",$c); $r=$db->fetch_row($q); if ($r['prOWNER'] != $ir['userid']) { print " This house does not belong to you. <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; } else { $db->query("UPDATE users SET money=money+{$r['hPRICE']} WHERE userid=$userid",$c); print " You sold your {$r['hNAME']} for \${$r['hPRICE']}! <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; $db->query("DELETE FROM properties WHERE prID={$_GET['ID']}",$c); } } function send_house() { global $db,$ir,$c,$userid,$h; $_GET['ID'] = abs((int) $_GET['ID']); $yd=$db->query("SELECT * FROM rentals WHERE reRENTER=$userid AND rePID={$_GET['ID']}",$c); $zf=$db->fetch_row($yd); $tr=$db->num_rows($yd); if ($tr) { die (" This house has been rented! <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%> "); } if($_POST['user']) { $q=$db->query("SELECT pr.*,h.* FROM properties pr LEFT JOIN houses h ON pr.prHOUSE=h.hID WHERE pr.prID={$_GET['ID']} AND pr.prOWNER=$userid LIMIT 1",$c); if($db->num_rows($q)==0) { print " Invalid house ID <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; } else { $r=$db->fetch_row($q); $m=$db->query("SELECT * FROM users WHERE userid={$_POST['user']} LIMIT 1",$c); if($db->num_rows($m) == 0) { print " You are trying to send to an invalid user! <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; } else if (!$_GET['ID']) { print " This user does not exist. <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; } else { $rm=$db->fetch_row($m); $db->query("UPDATE properties SET prOWNER={$_POST['user']} WHERE prID={$_GET['ID']}",$c); } print " You sent the {$r['hNAME']} to {$rm['username']}. <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; event_add($_POST['user'],"You received the {$r['hNAME']} from [url='viewuser.php?u=$userid']{$ir['username']}[/url]",$c,'transfer'); } } else if($_GET['ID']) { $id=$db->query("SELECT pr.*,h.* FROM properties pr LEFT JOIN houses h ON pr.prHOUSE=h.hID WHERE pr.prID={$_GET['ID']} AND pr.prOWNER=$userid LIMIT 1",$c); if($db->num_rows($id)==0) { print " Invalid house ID. <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; } else if ($_GET['ID']==0) { print " This user does not exist. <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; } else { $r=$db->fetch_row($id); print " [b]Enter the ID of the user you want to give the {$r['hNAME']} to.[/b] <form action='properties.php?action=give&ID={$_GET['ID']}' method='post'> <input type='hidden' name='ID' value='{$_GET['ID']}' />User ID: <input type='text' name='user' value='' /> <input type='submit' value='Give House' /></form> <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; } } else { print " Invalid use of file. <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; } } function market_house() { global $db,$ir,$c,$userid,$h; $_GET['ID'] = abs((int) $_GET['ID']); $yd=$db->query("SELECT * FROM rentals WHERE reRENTER=$userid AND rePID={$_GET['ID']}",$c); $zf=$db->fetch_row($yd); $tr=$db->num_rows($yd); if ($tr) { die (" This house has been rented! <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%> "); } $_POST['price'] = abs((int) $_POST['price']); if($_POST['price']) { $q=$db->query("SELECT pr.*,h.* FROM properties pr LEFT JOIN houses h ON pr.prHOUSE=h.hID WHERE prID={$_GET['ID']} and prOWNER=$userid",$c); if($db->num_rows($q)==0) { print " Invalid House ID <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; } else { $r=$db->fetch_row($q); $db->query("INSERT INTO propertymarket VALUES ('','$userid',{$_POST['price']},'{$r['hID']}')", $c); $db->query("DELETE FROM properties WHERE prID={$_GET['ID']}",$c); print " House added to market. <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; } } else { $q=$db->query("SELECT * FROM properties WHERE prID={$_GET['ID']} and prOWNER=$userid",$c); if($db->num_rows($q)==0) { print " Invalid House ID <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; } else { $r=$db->fetch_row($q); print " Adding a house to the property market... <form action='properties.php?action=market&ID={$_GET['ID']}' method='post'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> Price: <input type='text' name='price' value='0' /> <input type='submit' value='Add' /></form> <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; } } } function return_house() { global $db,$ir,$c,$userid,$h; $_GET['ID'] = abs((int) $_GET['ID']); $q=$db->query("SELECT pr.*,h.* FROM properties pr LEFT JOIN houses h ON pr.prHOUSE=h.hID WHERE pr.prID={$_GET['ID']} AND pr.prOWNER=$userid LIMIT 1",$c); $r=$db->fetch_row($q); if ($r['prOWNER'] != $ir['userid']) { print " This house does not belong to you. <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; } else { $yd=$db->query("SELECT * FROM rentals WHERE reRENTER=$userid AND rePID={$_GET['ID']}",$c); $zf=$db->fetch_row($yd); event_add($zf['reOWNER'],"You received the {$r['hNAME']} back from [url='viewuser.php?u=$userid']{$ir['username']}[/url]",$c,'transfer'); print " You returned the {$r['hNAME']}! <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; $db->query("DELETE FROM properties WHERE prID={$_GET['ID']}",$c); $db->query("INSERT INTO `properties` (`prID`, `prOWNER`, `prHOUSE`) VALUES ('{$zf['rePID']}', '{$zf['reOWNER']}', '{$r['hID']}');",$c); $db->query("DELETE FROM rentals WHERE rePID={$_GET['ID']}",$c); } } function rent_house() { global $db,$ir,$c,$userid,$h; $_GET['ID'] = abs((int) $_GET['ID']); $yd=$db->query("SELECT * FROM rentals WHERE reRENTER=$userid AND rePID={$_GET['ID']}",$c); $zf=$db->fetch_row($yd); $tr=$db->num_rows($yd); if ($tr) { die (" This house has been rented! <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%> "); } $_POST['price'] = abs((int) $_POST['price']); $_POST['days'] = abs((int) $_POST['days']); if($_POST['price'] || $_POST['days']) { $q=$db->query("SELECT pr.*,h.* FROM properties pr LEFT JOIN houses h ON pr.prHOUSE=h.hID WHERE prID={$_GET['ID']} and prOWNER=$userid",$c); if($db->num_rows($q)==0) { print " Invalid House ID <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; } else { $r=$db->fetch_row($q); $db->query("INSERT INTO rentalmarket VALUES ('','{$_GET['ID']}',{$_POST['price']},'{$_POST['days']}','$userid','{$r['hID']}')", $c); $db->query("DELETE FROM properties WHERE prID={$_GET['ID']}",$c); print " House added to market. <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; } } else { $q=$db->query("SELECT * FROM properties WHERE prID={$_GET['ID']} and prOWNER=$userid",$c); if($db->num_rows($q)==0) { print " Invalid House ID <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; } else { $r=$db->fetch_row($q); print " Adding a house to the rental market... <form action='properties.php?action=rent&ID={$_GET['ID']}' method='post'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> Price (Daily): <input type='text' name='price' value='0' /> Days: <input type='text' name='days' value='0' /> <input type='submit' value='Add' /></form> <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; } } } function move_house() { global $db,$ir,$c,$userid,$h; $_GET['ID'] = abs((int) $_GET['ID']); $q=$db->query("SELECT pr.*,h.* FROM properties pr LEFT JOIN houses h ON pr.prHOUSE=h.hID WHERE pr.prID={$_GET['ID']} AND pr.prOWNER=$userid LIMIT 1",$c); $r=$db->fetch_row($q); if ($r['prOWNER'] != $ir['userid']) { print " This house does not belong to you. <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; } else { $mpq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}",$c); $mp=$db->fetch_row($mpq); print " You moved into your {$r['hNAME']}! <hr width=75%>> [url='properties.php']Back[/url]<hr width=75%>"; $db->query("INSERT INTO `properties` (`prID`, `prOWNER`, `prHOUSE`) VALUES ('', '$userid', '{$mp['hID']}');",$c); $db->query("UPDATE users SET maxwill={$r['hWILL']},will=0 WHERE userid=$userid",$c); $db->query("DELETE FROM properties WHERE prID={$_GET['ID']}",$c); } } $h->endpage(); ?>   renatal.php   <?php include "globals.php"; print "<center><font size='4' face='Arial, Helvetica, sans-serif'>Rental Market</font> "; switch($_GET['action']) { case "buy": buy_house(); break; case "remove": remove_house(); break; default: market_index(); break; } function market_index() { global $db,$ir,$c,$userid; print "<table width=90% cellspacing=1 class='table'> <tr> <th>Owner</th> <th>House</th> <th>Days</th> <th>Daily Price</th> <th>Links</th> </tr>"; $q=$db->query("SELECT rent.*, h.*, u.* FROM rentalmarket rent LEFT JOIN houses h ON rentHOUSE=h.hID LEFT JOIN users u ON u.userid=rent.rentOWNER ORDER BY rent.rentCOST, rent.rentDAYS ASC",$c); $lt=""; while($r=$db->fetch_row($q)) { if($r['rentOWNER'] == $userid) { $link = "[[url='rentals.php?action=remove&ID={$r[']Remove[/url]]"; } else { $link = "[[url='rentals.php?action=buy&ID={$r[']Rent[/url]]"; } $cost=money_formatter($r['rentCOST']); print "<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>{$r['hNAME']}</td> <td>{$r['rentDAYS']}</td> <td>$cost</td> <td>$link</td> </tr>"; } print "</table>"; } function remove_house() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT rent.*, h.*, u.* FROM rentalmarket rent LEFT JOIN houses h ON rentHOUSE=h.hID LEFT JOIN users u ON u.userid=rent.rentOWNER ORDER BY rent.rentCOST, rent.rentDAYS ASC",$c); if(!$db->num_rows($q)) { print "Error, either this house does not exist, or you are not the owner. [url='rentals.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); $f=$db->query("SELECT FROM rentalmarket WHERE rentID={$_GET['ID']}"); $dg=$db->fetch_row($f); $db->query("INSERT INTO `properties` (`prID`, `prOWNER`, `prHOUSE`) VALUES ('NULL', '$userid', '{$dg['rentHOUSE']}');",$c); $db->query("DELETE FROM rentalmarket WHERE rentID={$_GET['ID']}",$c); print "House removed from market! [url='rentals.php']> Back[/url]"; } function buy_house() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT rent.*, h.*, u.* FROM rentalmarket rent LEFT JOIN houses h ON rentHOUSE=h.hID LEFT JOIN users u ON u.userid=rent.rentOWNER ORDER BY rent.rentCOST, rent.rentDAYS ASC",$c); if(!$db->num_rows($q)) { print "This house is already occupied. [url='rentals.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); if($r['reCOST'] > $ir['money']) { print "Error, you do not have the funds to start renting this house. [url='rentals.php']> Back[/url]"; $h->endpage(); exit; } event_add($r['rentOWNER'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] is now renting your {$r['hNAME']} for {$r['rentCOST']} per day.",$c); $db->query("INSERT INTO `properties` (`prID`, `prOWNER`, `prHOUSE`) VALUES ('{$r['rentPROP']}', '{$r['rentOWNER']}', '{$r['hID']}');",$c); $db->query("INSERT INTO `rentals` (`reID`, `reOWNER`, `rePID`, `reRENTER`, `reDAYS`, `reCOST`) VALUES ('NULL', '$userid', '{$r['rentPROP']}', '$userid', '{$r['rentDAYS']}', '{$r['rentCOST']}');",$c); $db->query("DELETE FROM rentalmarket WHERE rentID={$_GET['ID']}",$c); $db->query("UPDATE users SET rent={$r['rentCOST']} WHERE userid=$userid",$c); print "You are now renting the {$r['hNAME']} for \$".number_format($r['rentCOST'])." per day."; } $h->endpage(); ?>
  23. Re: Viewing codes hack does the noob hack games
  24. Re: House pic trouble yea but my dont appear lol cos u put it as if $ir [protected] so i can only see the house pic if i am protected
  25. Re: Viewing codes hack so their is no actual way to hid the html source codes cos that can give info away
×
×
  • Create New...