Jump to content
MakeWebGames

jds137

Members
  • Posts

    402
  • Joined

  • Last visited

Everything posted by jds137

  1. Re: I know it was posted before, but there was no resolution Whenever I try adding a city, it has all the boxes, and when I try submitting it, it goes to a blank black screen, no error of any kind.
  2. In my admin panel, I cant add a city, I need to add it through the db.Please give any help you can..   <?php include "sglobals.php"; if($ir['user_level'] > 2) { die("403"); } //This contains city stuffs switch($_GET['action']) { case "addcity": addcity(); break; case "editcity": editcity(); break; case "delcity": delcity(); break; default: print "Error: This script requires an action."; break; } function addcity() { global $db, $ir, $c, $h, $userid; $minlevel=abs((int) $_POST['minlevel']); $name=$_POST['name']; $desc=$_POST['desc']; if($minlevel and $desc and $name) { $q=$db->query("SELECT * FROM cities WHERE cityname='{$name}'"); if($db->num_rows($q)) { print "Sorry, you cannot have two cities with the same name."; $h->endpage(); exit; } $db->query("INSERT INTO cities VALUES(NULL, '$name', '$desc', '$minlevel')"); print "City {$name} added to the game."; stafflog_add("Created City $name"); } else { print "<h3>Add City</h3><hr /> <form action='staff_cities.php?action=addcity' method='post'> Name: <input type='text' name='name' /> Description: <input type='text' name='desc' /> Minimum Level: <input type='text' name=minlevel' /> <input type='submit' value='Add City' /></form>"; } } function editcity() { global $db, $ir, $c, $h, $userid; switch($_POST['step']) { case "2": $minlevel=abs((int) $_POST['minlevel']); $name=$_POST['name']; $desc=$_POST['desc']; $q=$db->query("SELECT * FROM cities WHERE cityname='{$name}' AND cityid!={$_POST['id']}"); if($db->num_rows($q)) { print "Sorry, you cannot have two cities with the same name."; $h->endpage(); exit; } $name=$_POST['name']; $q=$db->query("SELECT * FROM cities WHERE cityid={$_POST['id']}"); $old=$db->fetch_row($q); $db->query("UPDATE cities SET cityminlevel=$minlevel, citydesc='$desc', cityname='$name' WHERE cityid={$_POST['id']}"); print "City $name was edited successfully."; stafflog_add("Edited city $name"); break; case "1": $q=$db->query("SELECT * FROM cities WHERE cityid={$_POST['city']}"); $old=$db->fetch_row($q); print "<h3>Editing a City</h3><hr /> <form action='staff_cities.php?action=editcity' method='post'> <input type='hidden' name='step' value='2' /> <input type='hidden' name='id' value='{$_POST['city']}' /> Name: <input type='text' name='name' value='{$old['cityname']}' /> Description: <input type='text' name='desc' value='{$old['citydesc']}' /> Minimum Level: <input type='text' name='minlevel' value='{$old['cityminlevel']}' /> <input type='submit' value='Edit City' /></form>"; break; default: print "<h3>Editing a City</h3><hr /> <form action='staff_cities.php?action=editcity' method='post'> <input type='hidden' name='step' value='1' /> City: ".location_dropdown($c, "city")." <input type='submit' value='Edit City' /></form>"; break; } } function delcity() { global $db,$ir,$c,$h,$userid; if($_POST['city']) { $q=$db->query("SELECT * FROM cities WHERE cityid={$_POST['city']}"); $old=$db->fetch_row($q); if($old['cityid']==1) { die("This city cannot be deleted."); } $db->query("UPDATE users SET location=1 WHERE location={$old['cityid']}"); $db->query("UPDATE shops SET shopLOCATION=1 WHERE shopLOCATION={$old['cityid']}"); $db->query("DELETE FROM cities WHERE cityid={$old['cityid']}"); print "City {$old['cityname']} deleted."; stafflog_add("Deleted city {$old['cityname']}"); } else { print "<h3>Delete City</h3><hr /> Deleting a city is permanent - be sure. Any users and shops that are currently in the city you delete will be moved to the default city (ID 1).<form action='staff_cities.php?action=delcity' method='post'> City: ".location_dropdown($c, "city")." <input type='submit' value='Delete City' /></form>"; } } function report_clear() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 3) { die("403"); } $_GET['ID'] = abs((int) $_GET['ID']); stafflog_add("Cleared player report ID {$_GET['ID']}"); $db->query("DELETE FROM preports WHERE prID={$_GET['ID']}"); print "Report cleared and deleted! [url='staff_users.php?action=reportsview']> Back[/url]"; } $h->endpage(); ?>
  3. Re: Updated Personal Details [V2] I followed your guide step by step, and for people already registered, it says they dont wanna share info, even though thats not true. V2
  4. Re: Screening Mod and Research Facility Centre Mod [FREE][V2] I can admit I make mistakes, but I am learning from them all.   <?php include("globals.php"); if ($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed when in jail or hospital. Click [url='index.php']HERE[/url] to return home."); } if ($ir['rfuse'] == 1) { die("You've been tested enough for today. Anymore tests, and you'll die. Come back when you're fit. Click [url='index.php']HERE[/url] to return home."); } $q = $db->query("SELECT * FROM `inventory` WHERE `inv_itemid` = 322 AND `inv_userid` = $userid"); if ($db->num_rows($q) > 0) { print "You have entered Area 1 of the research facility. You volunteer yourself to be used to test vacinations and medication for the virus. You were given $750 for testing the medication. Click [url='index.php']HERE[/url] to return home."; $db->query("UPDATE users SET hospital=hospital+35,hospreason='Tested new medication for money' WHERE userid=$userid", $c); $db->query("UPDATE users SET hp=0 WHERE userid=$userid", $c); $db->query("UPDATE users SET money=money+750 WHERE userid=$userid", $c); $db->query("UPDATE users SET rfuse=rfuse+1 WHERE userid=$userid", $c); $db->query("UPDATE users SET inventory=inventory+1 WHERE itemid=322", $c); } else { die("You need a Research Facility Area 1 Key Card before you can enter Area 1. Click [url='index.php']HERE[/url] to go home."); } $h->endpage(); ?>
  5. In the game, I have bought, the energy refill is unlimited atm, and I wanted to ask you all for a code to limit energy refills to 3 a day, as well as make them go up in price each refill. like $25, then $75, then $150 lets say. I tried fixing this, but I am not the greatest at coding atm.   <?php include "globals.php"; if(!$_GET['spend']) { print "Welcome to the crystal temple! You have [b]{$ir['crystals']}[/b] crystals. What would you like to spend your crystals on? [url='crystaltemple.php?spend=refill']Energy Refill - {$set['ct_refillprice']} Crystals[/url] [url='crystaltemple.php?spend=IQ']IQ - {$set['ct_iqpercrys']} IQ per crystal[/url] [url='crystaltemple.php?spend=money']Money - \$".number_format($set['ct_moneypercrys'])." per crystal[/url] "; } else { if($_GET['spend'] == 'refill') { if($ir['crystals'] <$set['ct_refillprice']) { print "You don't have enough crystals!"; } else if($ir['energy'] == $ir['maxenergy']) { print "You already have full energy."; } else { $db->query("UPDATE users SET energy=maxenergy,crystals=crystals-{$set['ct_refillprice']} WHERE userid=$userid"); print "You have paid {$set['ct_refillprice']} crystals to refill your energy bar."; } } else if($_GET['spend'] == 'IQ') { print "Type in the amount of crystals you want to swap for IQ. You have [b]{$ir['crystals']}[/b] crystals. One crystal = {$set['ct_iqpercrys']} IQ.<form action='crystaltemple.php?spend=IQ2' method='post'><input type='text' name='crystals' /> <input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'IQ2') { $_POST['crystals']=(int) $_POST['crystals']; if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals']) { print "Error, you either do not have enough crystals or did not fill out the form. [url='crystaltemple.php?spend=IQ']Back[/url]"; } else { $iqgain=$_POST['crystals']*$set['ct_iqpercrys']; $db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']} WHERE userid=$userid"); $db->query("UPDATE userstats SET IQ=IQ+$iqgain WHERE userid=$userid"); print "You traded {$_POST['crystals']} crystals for $iqgain IQ."; } } else if($_GET['spend'] == 'money') { print "Type in the amount of crystals you want to swap for money. You have [b]{$ir['crystals']}[/b] crystals. One crystal = \$".number_format($set['ct_moneypercrys']).".<form action='crystaltemple.php?spend=money2' method='post'><input type='text' name='crystals' /> <input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'money2') { $_POST['crystals']=(int) $_POST['crystals']; if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals']) { print "Error, you either do not have enough crystals or did not fill out the form. [url='crystaltemple.php?spend=money']Back[/url]"; } else { $iqgain=$_POST['crystals']*$set['ct_moneypercrys']; $db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']},money=money+$iqgain WHERE userid=$userid"); print "You traded {$_POST['crystals']} crystals for \$".number_format($iqgain)."."; } } } $h->endpage(); ?>
  6. Re: issues with my forums the second one worked, thank you very much for your help.   Forums Deleting topic... Done Recaching forum ID 2 ... ... Done
  7. Re: How to Make you rmarried Stats Display in viewuser.php will that work for v2 as well?
  8. I get this error message, trying to delete a topic, and I am clueless how to resolve the issue. Please can someone help me?   Heres line 703: $q=$db->query("SELECT * FROM forum_topics WHERE ft_id={$_GET['topic']}");
  9. Re: Screening Mod and Research Facility Centre Mod [FREE][V2]   You have entered Area 1 of the research facility. You volunteer yourself to be used to test vacinations and medication for the virus. You were given $750 for testing the medication. Click HERE to return home.QUERY ERROR: Unknown column 'itemid' in 'where clause' Query was UPDATE users SET inventory=inventory+1 WHERE itemid=322   http://mobslife.net/researcharea1.php
  10. Re: Basic Stock Market [V2] I fixed it, great mod... t/y
  11. Re: Screening Mod and Research Facility Centre Mod [FREE][V2]   <?php include "globals.php"; if($ir['jail'] or $ir['hospital']) { die("You cannot be screened when in hospital or jail."); } if($ir['screened'] == 1) { die("You must wait 5 minutes before you can be screened again."); } print "<h3 />Welcome to the Screening Lab</h3> "; if ($_GET['action'] != 'screen') { $screen=$ir['screen']; print "You are now being screened! "'; } if ($ir['screen'] == 1) { print ("You only have to be screened once. You don't have to be screened again. "); } else { $outcome = rand(1,3); if ($outcome == 1) { print "The screening was successful. You don't have the virus/disease."; $db->query("UPDATE users SET screen=1 WHERE userid=$userid",$c); event_add($ir['userid'],"The screening was successful. You can now roam freely.",$c); } if ($outcome == 2) { $hosp = rand(200,350); print "The screening was successful, but the medication you were given has had a bad effect. You end up in the hospital for a while."; $db->query("UPDATE users SET screen=1 WHERE userid=$userid",$c); $db->query("UPDATE users SET hospital=hospital+$hosp,hospreason='Suffering from the screening medication' WHERE userid=$userid",$c); } if ($outcome == 3 { print "The screening was a <font color=red />FAILURE</font>"; $db->query("UPDATE users SET screen=0 WHERE userid=$userid",$c); $db->query("UPDATE users SET screened=1 WHERE userid=$userid",$c); } } $h->endpage() ?>
  12. Re: Basic Stock Market [V2] I received the same error message as listed above. Very nice work, keep it up. Fatal error: Call to undefined function stock_dropdown() in /home/jds137/public_html/staff_stocks.php on line 74
  13. Re: Screening Mod and Research Facility Centre Mod [FREE][V2]  
  14. Re: Free 2 - BLIP Tables (Blocked IPv4 Addresses by CIDR) using this worked, and thanks for the advice:  
  15. Re: [Free] [v1] BB Gun / Shoot Someone in Back! It was because I had bb gun in the spot, instead of 110... lol I think Ill read more into this stuff
  16. Re: Register [Free] The last idea worked great, I added the table. I appreciate the help.
  17. Re: Register [Free] I received this error:  
  18. Re: [v2]***UPDATED*** Staff Action: Full User Details[v2] Sweet mod is all I wanna say...
  19. Re: Mining V2 Converted I added it as well, using all the info given but when u click on something it don't work and it says go mining you have 0/0   Welcome to the mine shaft. There are 3 spots to go mining but thay are restricted depending on your mine level. Your mining level is 0 and you have 0/0 mining experience Crystal Mines [Level 1 mine] [Level 20 mine] [Level 40 mine] Money Mines [Level 10 mine] [Level 30 mine] [Level 40 mine]
  20. Re: Free 2 - BLIP Tables (Blocked IPv4 Addresses by CIDR) I received this, any ideas how to resolve?   Warning: include_once() [function.include-once]: Unable to access ./blip.php in /home/jds137/public_html/staff_blip.php on line 4 Warning: include_once(./blip.php) [function.include-once]: failed to open stream: No such file or directory in /home/jds137/public_html/staff_blip.php on line 4 Warning: include_once() [function.include]: Failed opening './blip.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /home/jds137/public_html/staff_blip.php on line 4 Fatal error: Call to undefined function blip_fetch_all() in /home/jds137/public_html/staff_blip.php on line 38
  21. Re: [Free] [v1] BB Gun / Shoot Someone in Back! Heres what I received, also I really like this mod alot, reminds me of my childhood.   Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/jds137/public_html/injure.php on line 4 You do not own a BB Gun
  22. Re: Mood Mod Fatal error: Call to undefined function conf_mood_change() in /home/jds137/public_html/preferences.php on line 51
  23. Re: Mood Mod   MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'anxious','aroused','ashamed','awake','bitchy','blah','blank','blessed','bored','' at line 1
  24. Re: random.php Parse error: syntax error, unexpected '"' in /home/jds137/public_html/random.php on line 23
  25. Re: [mccode] Updated v1.0 Nunclear Bomb Does anyone have V2 of this?
×
×
  • Create New...