
MarFur93
Members-
Posts
43 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by MarFur93
-
Re: Free Updated Newspaper delete this: if ($ir['newspaper']==0 { echo "You haven't brought a newspaper today go to the <a href=nagent.php>News agents</a> and buy one." ; $h->endpage(); exit;} Should work fine now. I am glad that I saw this comment, without having to look through the code myself, lol.
-
My Item Market does not have any links to add any items, can anyone help me with this? P.S. Below is what my modified version of the Item Market currently looks like. <?php include "globals.php"; print "<h3>Online Store</h3>"; switch($_GET['action']) { case "buy": item_buy(); break; case "gift1": item_gift1(); break; case "gift2": item_gift2(); break; case "remove": itemm_remove(); break; default: imarket_index(); break; } function imarket_index() { global $db,$ir,$c,$userid,$h; print " <table width=75% cellspacing=1 class='table'> <tr style='background:gray'> <th>Seller</th> <th>Item</th> <th>Price</th> <th>Options</th> </tr>"; $q=$db->query("SELECT im.*, i.*, u.*,it.* FROM itemmarket im LEFT JOIN items i ON im.imITEM=i.itmid LEFT JOIN users u ON u.userid=im.imADDER LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid ORDER BY i.itmtype, i.itmname ASC"); $lt=""; while($r=$db->fetch_row($q)) { if($lt!=$r['itmtypename']) { $lt=$r['itmtypename']; print "\n<tr style='background: gray;'><th colspan=4>{$lt}</th></tr>"; } if($r['imCURRENCY']=="money") { $price="\$".number_format($r['imPRICE']); } else { $price=number_format($r['imPRICE'])." crystals"; } if($r['imADDER'] == $userid) { $link = "[[url='itemmarket.php?action=remove&ID={$r[']Remove[/url]]"; } else { $link = "[[url='itemmarket.php?action=buy&ID={$r[']Buy[/url]] [[url='itemmarket.php?action=gift1&ID={$r[']Gift[/url]]"; } print "\n<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>{$r['itmname']}</td> <td>$price</td> <td>[[url='iteminfo.php?ID={$r[']Info[/url]] $link</td> </tr>"; } print "</table>"; } function itemm_remove() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT im.*,i.* FROM itemmarket im LEFT JOIN items i ON im.imITEM=i.itmid WHERE imID={$_GET['ID']} AND imADDER=$userid"); if(!$db->num_rows($q)) { print "Error, either this item does not exist, or you are not the owner. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); item_add($userid, $r['imITEM'], 1); $i=($db->insert_id()) ? $db->insert_id() : 99999; $db->query("DELETE FROM itemmarket WHERE imID={$_GET['ID']}"); $db->query("INSERT INTO imremovelogs VALUES ('', {$r['imITEM']}, {$r['imADDER']}, $userid, {$r['imID']}, $i, unix_timestamp(), '{$ir['username']} removed a {$r['itmname']} from the item market.')"); print "Item removed from market! [url='itemmarket.php']> Back[/url]"; } function item_buy() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM itemmarket im LEFT JOIN items i ON i.itmid=im.imITEM WHERE imID={$_GET['ID']}",$c); if(!$db->num_rows($q)) { print "Error, either this item does not exist, or it has already been bought. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); $curr=$r['imCURRENCY']; if($r['imPRICE'] > $ir[$curr]) { print "Error, you do not have the funds to buy this item. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } item_add($userid, $r['imITEM'], 1); $i=($db->insert_id()) ? $db->insert_id() : 99999; $db->query("DELETE FROM itemmarket WHERE imID={$_GET['ID']}"); $db->query("UPDATE users SET $curr=$curr-{$r['imPRICE']} where userid=$userid"); $db->query("UPDATE users SET $curr=$curr+{$r['imPRICE']} where userid={$r['imADDER']}"); if($curr=="money") { event_add($r['imADDER'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['itmname']} item from the market for \$".number_format($r['imPRICE']).".",$c); $db->query("INSERT INTO imbuylogs VALUES ('', {$r['imITEM']}, {$r['imADDER']}, $userid, {$r['imPRICE']}, {$r['imID']}, $i, unix_timestamp(), '{$ir['username']} bought a {$r['itmname']} from the item market for \${$r['imPRICE']} from user ID {$r['imADDER']}')"); print "You bought the {$r['itmname']} from the market for \$".number_format($r['imPRICE'])."."; } else { event_add($r['imADDER'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['itmname']} item from the market for ".number_format($r['imPRICE'])." crystals.",$c); $db->query("INSERT INTO imbuylogs VALUES ('', {$r['imITEM']}, {$r['imADDER']}, $userid, {$r['imPRICE']}, {$r['imID']}, $i, unix_timestamp(), '{$ir['username']} bought a {$r['itmname']} from the item market for {$r['imPRICE']} crystals from user ID {$r['imADDER']}')"); print "You bought the {$r['itmname']} from the market for ".number_format($r['imPRICE'])." crystals."; } } function item_gift1() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM itemmarket im LEFT JOIN items i ON i.itmid=im.imITEM WHERE imID={$_GET['ID']}"); if(!$db->num_rows($q)) { print "Error, either this item does not exist, or it has already been bought. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); $curr=$r['imCURRENCY']; if($r['imPRICE'] > $ir[$curr]) { print "Error, you do not have the funds to buy this item. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } if($curr=="money") { print "Buying the [b]{$r['itmname']}[/b] for \$".number_format($r['imPRICE'])." as a gift... <form action='itemmarket.php?action=gift2' method='post'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> User to give gift to: ".user_dropdown($c,'user')." <input type='submit' value='Buy Item and Send Gift' /></form>"; } else { print "Buying the [b]{$r['itmname']}[/b] for ".number_format($r['imPRICE'])." crystals as a gift... <form action='itemmarket.php?action=gift2' method='post'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> User to give gift to: ".user_dropdown($c,'user')." <input type='submit' value='Buy Item and Send Gift' /></form>"; } } function item_gift2() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM itemmarket im LEFT JOIN items i ON i.itmid=im.imITEM WHERE imID={$_POST['ID']}"); if(!$db->num_rows($q)) { print "Error, either this item does not exist, or it has already been bought. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); $curr=$r['imCURRENCY']; if($r['imPRICE'] > $ir[$curr]) { print "Error, you do not have the funds to buy this item. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } item_add($_POST['user'], $r['imITEM'], 1); $i=($db->insert_id()) ? $db->insert_id() : 99999; $db->query("DELETE FROM itemmarket WHERE imID={$_POST['ID']}"); $db->query("UPDATE users SET $curr=$curr-{$r['imPRICE']} where userid=$userid"); $db->query("UPDATE users SET $curr=$curr+{$r['imPRICE']} where userid={$r['imADDER']}"); if($curr=="money") { event_add($r['imADDER'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['itmname']} item from the market for \$".number_format($r['imPRICE']).".",$c); event_add($_POST['user'], "[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought you a {$r['itmname']} from the item market as a gift.",$c); $u=$db->query("SELECT username FROM users WHERE userid={$_POST['user']}"); $uname=$db->fetch_single($u); $db->query("INSERT INTO imbuylogs VALUES ('', {$r['imITEM']}, {$r['imADDER']}, $userid, {$r['imPRICE']}, {$r['imID']}, $i, unix_timestamp(), '{$ir['username']} bought a {$r['itmname']} from the item market for \${$r['imPRICE']} from user ID {$r['imADDER']} as a gift for $uname [{$_POST['user']}]')"); print "You bought the {$r['itmname']} from the market for \$".number_format($r['imPRICE'])." and sent the gift to $uname."; } else { event_add($r['imADDER'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['itmname']} item from the market for ".number_format($r['imPRICE'])." crystals.",$c); event_add($_POST['user'], "[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought you a {$r['itmname']} from the item market as a gift.",$c); $u=$db->query("SELECT username FROM users WHERE userid={$_POST['user']}"); $uname=$db->fetch_single($u); $db->query("INSERT INTO imbuylogs VALUES ('', {$r['imITEM']}, {$r['imADDER']}, $userid, {$r['imPRICE']}, {$r['imID']}, $i, unix_timestamp(), '{$ir['username']} bought a {$r['itmname']} from the item market for {$r['imPRICE']} crystals from user ID {$r['imADDER']} as a gift for $uname [{$_POST['user']}]')"); print "You bought the {$r['itmname']} from the market for ".number_format($r['imPRICE'])." crystals and sent the gift to $uname."; } } $h->endpage(); ?>
-
Re: MCcodes v2.0 problem :? I am really a n00b! Could someone please help me if I gave them my crime.php or docrime.php?
-
Re: Please Help Me! Thank you so much! :-D
-
Whenever I try and create a new house, I receive the following error: QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO houses VALUES(NULL, 'Mansion', '1000000', '1000') Please Help Me!
-
Re: MCcodes v2.0 problem Just so that you know, the account I am having problems with is not being hosted by myself, so i probably won't be able to edit the php.ini file.
-
I keep getting this error when I actually try and do the crime that I created. Fatal error: SUHOSIN - Use of eval is forbidden by configuration in /home/marfur93/public_html/docrime.php(21) : eval()'d code on line 21 Help Me Please!
-
N00B Question: Align Menu To Left in MCcodes v2.0
MarFur93 replied to MarFur93's topic in General Discussion
Re: N00B Question: Align Menu To Left in MCcodes v2.0 Thank you So Much For that! :-D -
Could someone please modify this code so that the whole mainmenu.php in MCcodes v2.0 is aligned to the left, instead of centered. I have tried the HTML codes, though I can't get them to work. <?php global $db,$c,$ir, $set; $hc=$set['hospital_count']; $jc=$set['jail_count']; $ec=$ir['new_events']; $mc=$ir['new_mail']; if($ir['hospital']) { print "Hospital ($hc) Inventory "; } elseif($ir['jail']) { print "Jail ($jc) "; } else { print "Home Inventory "; } if($ec > 0) { print "Events ($ec) "; } else { print "Events (0) "; } if($mc > 0) { print "Mailbox ($mc) "; } else { print "Mailbox (0) "; } if($ir['jail'] and !$ir['hospital']) { print "Jail Gym Hospital ($hc) "; } else if (!$ir['hospital']) { print "Explore Gym Crimes Your Job Local School Hospital ($hc) Jail ($jc) "; } else { print "Jail ($jc) "; } print "Forums "; if($ir['new_announcements']) { print "Announcements ({$ir['new_announcements']}) "; } else { print "Announcements (0) "; } print " Newspaper Search "; if(!$ir['jail'] && $ir['gang']) { print "Your Gang "; } if($ir['user_level'] > 1) { print "<hr /> Staff Panel \n"; print "<hr />Staff Online: "; $q=$db->query("SELECT * FROM users WHERE laston>(unix_timestamp()-15*60) AND user_level>1 ORDER BY userid ASC"); while($r=$db->fetch_row($q)) { $la=time()-$r['laston']; $unit="secs"; if($la >= 60) { $la=(int) ($la/60); $unit="mins"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } print "{$r['username']} ($la $unit) "; } } if($ir['donatordays']) { print "<hr /> Donators Only Friends List Black List"; } print "<hr /> Preferences Player Report Help Tutorial Game Rules My Profile Logout Time is now "; echo date ('F j, Y')." ".date('g:i:s a'); ?>
-
Help Needed With Cyberbank [MCcodes v2.0]
MarFur93 replied to MarFur93's topic in General Discussion
Re: Help Needed With Cyberbank [MCcodes v2.0] Thanks, I might take your advice on that! -
Does anyone know or have a free table script for explore.php
MarFur93 replied to MarFur93's topic in General Discussion
Re: Does anyone know or have a free table script for explore.php Thanks, I will try some of the tutorials. :wink: -
Help Needed With Cyberbank [MCcodes v2.0]
MarFur93 replied to MarFur93's topic in General Discussion
Re: Help Needed With Cyberbank [MCcodes v2.0] Thanks very much for that! :-D -
I keep Receiving the following error when I access Cyberbank: Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/marfur93/public_html/cyberbank.php on line 81 Does anyone know how I can Fix this? The Following Is my cyberbank.php <?php include "globals.php"; print "<h3>Cyber Bank</h3>"; if($ir['cybermoney']>-1) { switch($_GET['action']) { case "deposit": deposit(); break; case "withdraw": withdraw(); break; default: index(); break; } } else { if(isset($_GET['buy'])) { if($ir['money']>9999999) { print "Congratulations, you bought a bank account for \$10,000,000! Start using my account"; $db->query("UPDATE users SET money=money-10000000,cybermoney=0 WHERE userid=$userid"); } else { print "You do not have enough money to open an account. Back to town..."; } } else { print "Open a bank account today, just \$10,000,000! > Yes, sign me up!"; } } function index() { global $db,$ir,$c,$userid,$h; print "\nYou currently have \${$ir['cybermoney']} in the bank. At the end of each day, your bank balance will go up by 7%. <table width='75%' border='2'> <tr> <td width='50%'>Deposit Money It will cost you 15% of the money you deposit, rounded up. The maximum fee is \$1,500,000.<form action='cyberbank.php?action=deposit' method='post'> Amount: <input type='text' name='deposit' value='{$ir['money']}' /> <input type='submit' value='Deposit' /></form></td> <td> Withdraw Money It will cost you 7.5% of the money you withdraw, rounded up. The maximum fee is \$750,000.<form action='cyberbank.php?action=withdraw' method='post'> Amount: <input type='text' name='withdraw' value='{$ir['cybermoney']}' /> <input type='submit' value='Withdraw' /></form></td> </tr> </table>"; } function deposit() { global $db,$ir,$c,$userid,$h; $_POST['deposit']=abs((int) $_POST['deposit']); if($_POST['deposit'] > $ir['money']) { print "You do not have enough money to deposit this amount."; } else { $fee=ceil($_POST['deposit']*15/100); if($fee > 1500000) { $fee=1500000; } $gain=$_POST['deposit']-$fee; $ir['cybermoney']+=$gain; $db->query("UPDATE users SET cybermoney=cybermoney+$gain, money=money-{$_POST['deposit']} where userid=$userid"); print "You hand over \${$_POST['deposit']} to be deposited, after the fee is taken (\$$fee), \$$gain is added to your account. You now have \${$ir['cybermoney']} in the Cyber Bank. > Back"; } } function withdraw() { global db,$ir,$c,$userid,$h; $_POST['withdraw']=abs((int) $_POST['withdraw']); if($_POST['withdraw'] > $ir['cybermoney']) { print "You do not have enough banked money to withdraw this amount."; } else { $fee=ceil($_POST['withdraw']*75/1000); if($fee > 750000) { $fee=750000; } $gain=$_POST['withdraw']-$fee; $ir['cybermoney']-=$gain; $db->query("UPDATE users SET cybermoney=cybermoney-$gain, money=money+$gain where userid=$userid"); print "You ask to withdraw $gain, the teller hands it over after she takes the bank fees. You now have \${$ir['cybermoney']} in the Cyber Bank. > Back"; } } $h->endpage(); ?>
-
Re: Lottery [v1 and v2] It is an alright script once modified, though it does have a REFRESH problem. Refresh after you Win.. Keep Receiving more Crystals. Refresh after you Lose.. Keep losing more Crystals.
-
Re: FREE SERVER THAT WORKS WITH MCCODES I will back that up, thank god for X10Hosting!