Jump to content
MakeWebGames

HarryB

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

Everything posted by HarryB

  1. Re: [V1] Menu Yes it does already work but a v1 and v2 main menu are quite different. V1 main menu doesn't have jail and hospital etc.
  2. Re: [V1] Menu can somebody please help convert to v2 i've tried alsorts.
  3. Re: [V1] Menu Could somebody show me how to work this on v2 please. V2 Main menu <?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 "[url='hospital.php']Hospital ($hc)[/url] [url='inventory.php']Inventory[/url] "; } elseif($ir['jail']) { print "[url='jail.php']Jail ($jc)[/url] "; } else { print "[url='index.php']Home[/url] [url='inventory.php']Inventory[/url] "; } if($ec > 0) { print "[url='events.php']Events ($ec)[/url] "; } else { print "[url='events.php']Events (0)[/url] "; } if($mc > 0) { print "[url='mailbox.php']Mailbox ($mc)[/url] "; } else { print "[url='mailbox.php']Mailbox (0)[/url] "; } if($ir['jail'] and !$ir['hospital']) { print "[url='gym.php']Jail Gym[/url] [url='hospital.php']Hospital ($hc)[/url] "; } else if (!$ir['hospital']) { print "[url='explore.php']Explore[/url] [url='gym.php']Gym[/url] [url='criminal.php']Crimes[/url] [url='job.php']Your Job[/url] [url='education.php']Local School[/url] [url='hospital.php']Hospital ($hc)[/url] [url='jail.php']Jail ($jc)[/url] "; } else { print "[url='jail.php']Jail ($jc)[/url] "; } print "[url='forums.php']Forums[/url] "; if($ir['new_announcements']) { print "[url='announcements.php']Announcements ({$ir['new_announcements']})[/url] "; } else { print "[url='announcements.php']Announcements (0)[/url] "; } print " [url='newspaper.php']Newspaper[/url] [url='search.php']Search[/url] "; if(!$ir['jail'] && $ir['gang']) { print "[url='yourgang.php']Your Gang[/url] "; } if($ir['user_level'] > 1) { print "<hr /> [url='staff.php']Staff Panel[/url] \n"; print "<hr />[b]Staff Online:[/b] "; $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 "[url='viewuser.php?u={$r[']{$r['username']}[/url] ($la $unit) "; } } if($ir['donatordays']) { print "<hr /> [b]Donators Only[/b] [url='friendslist.php']Friends List[/url] [url='blacklist.php']Black List[/url]"; } print "<hr /> [url='preferences.php']Preferences[/url] [url='preport.php']Player Report[/url] [url='helptutorial.php']Help Tutorial[/url] [url='gamerules.php']Game Rules[/url] [url='viewuser.php?u={$ir[']My Profile[/url] [url='logout.php']Logout[/url] Time is now "; echo date ('F j, Y')." ".date('g:i:s a'); ?>   Thank You
  4. Re: Honor Awards - V2 - Modified by HarryB i see them all their
  5. Re: Honor Awards - V2 - Modified by HarryB no its not ment to be int 11, sorry i hardly get any time on the computer. Make it so it allows text to be typed in it. And you should have took all the files out of the folders not just droped the folders in your ftp.
  6. Re: Honor Awards - V2 - Modified by HarryB Sorry folks there your table CREATE TABLE `honorawards` ( `userid` int(11) NOT NULL default '0', `list` int(11) NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  7. Re: Hoes and Drugs $db->query("UPDATE `users` SET prostitutes=prostitutes-1 WHERE `userid`= $userid"); That should work
  8. Re: Honor Awards - V2 - Modified by HarryB well first of all it might not be adding in the database as some of you may have changed the databased field names in the database or in the coding as i spotted before the code that has been posted it, daysingang has been shortened to dig thats not going to work isit.
  9. Re: Honor Awards - V2 - Modified by HarryB Link Back Up Tested : 26/6/2008
  10. Re: Honor Awards - V2 - Modified by HarryB The screenshots are down so s the link sorry people i'll get it back up as soon as, some bad boy hacked my game and infected all my files.
  11. Re: [V2] Race Mod & Status Mod on Page 2 [V2] Haha lol first time i looked at it nothing was der it was just the scroll bar.
  12. Re: [V2] Race Mod & Status Mod on Page 2 [V2] Extermination, where's the bloody SQL. Lol. Im joking somethings probably messed up, you wouldn't forget the SQL, I know you, you make excellent mods, you've already beaten a paid mod. Anyway i've always wanted this mod so please post the SQL. ;)
  13. Re: [V2] Credit Card Mod [V2] Well Extermination i've got to say yours looks a million times better than mine, also yours is a free mod and i payed $15 for mine i think so well done but 1 thing my mod has got that yours hasn't is a check box under the buy item and the coding to buy stuff from the shop is much smaller but still as i said for a free mod you've made it look better than mine.
  14. Re: Help With announments If you could post your mainmenu.php maybe someone could tell you the problem, we can't just automatically read your code & you've posted in the wrong section.
  15. Re: Honor Awards - V2 - Modified by HarryB Really sorry it was late at night barely knew what I was doing, all fixed now.
  16. Who's not made this mod? I just got the free copy of the forums and made it look a million times better and added a few things to it The code is too long to put on here so I'm going to show you some screen shots and if you like it then you can download it from the download link which is placed after the screen shots The Zip file includes; Instructions File (don't think you won't need it as theres a few sql's involved and a few database querys) honoraward.php HonorExchange.php 6 pages of Money Awards 5 pages of Crimes Awards 5 pages of Star/Crystal Awards 7 pages of Donator day Awards 5 pages of Gang Day Awards 5 pages of Days Old Awards 6 pages of Level Awards 5 pages of Attacks Won Awards Picture 1 - Just to show you how the tables are set out, theres more than 1 on every table but i just showed 1 to save my self from the long work Picture 2 - Shows What the Honor Exchange looks like Picture 3 - Well the old one was 'Award Credited Click Hereto go back to Honor awards'. Boooorrring, who doesn't agree? So i just made a little conversion with HarryB against the player. Change HarryB if you want i don't mind. www.deadly-planet.com/Honor-Award-Mod-Modified-By-HarryB.zip Hope you like it. Post your comments please.
  17. Re: Staff Function - Edit User - V2 - Enhanced Version   Nyna leave him as he was quoting on the delete user part, i haven't modified that part i've made it so when you edit a user you can edit their; donator days steps circus tickets energy max energy will max will brave max brave health max health, soo if anyone wants to add this mod to their game then the list above is what is modified to do.
  18. Re: Staff Function - Edit User - V2 - Enhanced Version   See what i mean you get muppets like deception, wow i remember creating this years ago, i said i wern't a good php coder buh no decryption has a say to everything doesn't he, the strap.
  19. Re: Staff Function - Edit User - V2 - Enhanced Version   <?php function deluser() { global $ir,$c,$h,$userid,$db; if($ir['user_level'] != 2) { die("403"); } $undeletable = array('1','2'); // add more IDs here, such as NPCs switch ($_GET['step']) { default: echo "<h3>Deleteing User</h3> Here you can delete a user. <form action='staff_users.php?action=deluser&step=2' method='post'> User: ".user_dropdown($c,'user')." <input type='submit' value='Delete User' /></form> OR enter a user ID to Delete: <form action='staff_users.php?action=deluser&step=2' method='post'> User: <input type='text' name='user' value='0' /> <input type='submit' value='Delete User' /></form>"; break; case 2: $target = $_POST['user']; if (!is_numeric($target)) exit; if (in_array($target,$undeletable)) { die('You cannot delete this person.'); } $d=$db->query("SELECT username FROM users WHERE userid='$target'"); $itemi=$db->fetch_row($d); print "<h3>Confirm</h3> Delete user ".$itemi["username"]."? <form action='staff_users.php?action=deluser&step=3' method='post'> <input type='hidden' name='userid' value='$target' /> <input type='submit' name='yesorno' value='Yes' /> <input type='submit' name='yesorno' value='No' onclick=\"window.location='staff_users.php?action=deluser';\" /></form>"; break; case 3: $target = $_POST['userid']; if (!is_numeric($target)) exit; if (in_array($target,$undeletable)) { die('You cannot delete this person.'); } if($_POST['yesorno']=='No') { die("User not deleted. [url='staff_users.php?action=deluser']>Back to main Delete Users page.[/url]"); } if ($_POST['yesorno'] != ("No" || "Yes")) die('Eh'); $d=$db->query("SELECT username FROM users WHERE userid='$target'"); $itemi=$db->fetch_row($d); $db->query("DELETE FROM users WHERE userid='$target'"); $db->query("DELETE FROM userstats WHERE userid='$target'"); $db->query("DELETE FROM inventory WHERE inv_userid='$target'"); $db->query("DELETE FROM fedjail WHERE fed_userid='$target'"); echo "User {$itemi['username']} Deleted. [url='staff_users.php?action=deluser']>Back to main Delete Users page.[/url]"; stafflog_add("Deleted User {$itemi['username']} [{$_POST['userid']}]"); break; } } function inv_user_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 3) { die("403"); } print "<h3>Viewing User Inventory</h3> You may browse this user's inventory. <form action='staff_users.php?action=invuser' method='post'> User: ".user_dropdown($c,'user')." <input type='submit' value='View Inventory' /></form>"; } function inv_user_view() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 3) { die("403"); } $d=$db->query("SELECT username FROM users WHERE userid='{$_POST['user']}'"); $un=$db->fetch_single($d); $inv=$db->query("SELECT iv.*,i.*,it.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_userid={$_POST['user']}"); if ($db->num_rows($inv) == 0) { print "[b]This person has no items![/b]"; } else { print "[b]Their items are listed below.[/b] <table width=100%><tr style='background-color:gray;'><th>Item</th><th>Sell Value</th><th>Total Sell Value</th><th>Links</th></tr>"; while($i=$db->fetch_row($inv)) { print "<tr><td>{$i['itmname']}"; if ($i['inv_qty'] > 1) { print " x{$i['inv_qty']}"; } print "</td><td>\${$i['itmsellprice']}</td><td>"; print "$".($i['itmsellprice']*$i['inv_qty']); print "</td><td>[[url='staff_users.php?action=deleinv&ID={$i[']Delete[/url]]"; print "</td></tr>"; } print "</table>"; } stafflog_add("Viewed user {$un} [{$_POST['user']}] inventory"); } function inv_delete() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 3) { die("403"); } $db->query("DELETE FROM inventory WHERE inv_id={$_GET['ID']}"); print "Item deleted from inventory."; stafflog_add("Deleted inventory ID {$_GET['ID']}"); } function credit_user_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 3) { die("403"); } print "<h3>Crediting User</h3> You can give a user money/crystals. <form action='staff_users.php?action=creditsub' method='post'> User:".user_dropdown($c,'user')." Money: <input type='text' name='money' /> Crystals: <input type='text' name='crystals' /> Steps: <input type='text' name='turns' /> Tickets: <input type='text' name='tickets' /> Donator Days: <input type='text' name='donatordays' /> <input type='submit' value='Credit User' /></form>"; } function credit_user_submit() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 3) { die("403"); } $_POST['money'] = (int) $_POST['money']; $_POST['crystals'] = (int) $_POST['crystals']; $_POST['turns'] = (int) $_POST['turns']; $_POST['tickets'] = (int) $_POST['tickets']; $_POST['donatordays'] = (int) $_POST['donatordays']; $db->query("UPDATE users u SET money=money+{$_POST['money']}, crystals=crystals+{$_POST['crystals']}, turns=turns+{$_POST['turns']}, tickets=tickets+{$_POST['tickets']}, donatordays=donatordays+{$_POST['donatordays']} WHERE u.userid={$_POST['user']}"); print "User credited."; $d=$db->query("SELECT username FROM users WHERE userid='{$_POST['user']}'"); $un=$db->fetch_single($d); stafflog_add("Credited $un [{$_POST['user']}] \${$_POST['money']} and/or {$_POST['crystals']} stars and/or {$_POST['turns']} steps and/or {$_POST['tickets']} tickets and/or {$_POST['donatordays']} donator days."); } function mcredit_user_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } print "<h3>Mass Payment</h3> You can give all users money/stars/steps/tickets/donator days. <form action='staff_users.php?action=masscreditsub' method='post'> Money: <input type='text' name='money' /> Stars: <input type='text' name='crystals' /> Steps: <input type='text' name='turns' /> Tickets: <input type='text' name='tickets' /> Donator Days: <input type='text' name='donatordays' /> <input type='submit' value='Credit User' /></form>"; } function mcredit_user_submit() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } $_POST['money'] = (int) $_POST['money']; $_POST['crystals'] = (int) $_POST['crystals']; $_POST['turns'] = (int) $_POST['turns']; $_POST['tickets'] = (int) $_POST['tickets']; $_POST['donatordays'] = (int) $_POST['donatordays']; $db->query("UPDATE users u SET money=money+{$_POST['money']}, crystals=crystals+{$_POST['crystals']}, turns=turns+{$_POST['turns']}, tickets=tickets+{$_POST['tickets']}, donatordays=donatordays+{$_POST['donatordays']}"); print "All Users credited. Click [url='staff.php?action=announce']here to add an announcement[/url] or [url='staff_special.php?action=massmailer']here to send a mass mail[/url] explaining why."; stafflog_add("Credited all users \${$_POST['money']} and/or {$_POST['crystals']} stars and/or {$_POST['turns']} steps and/or {$_POST['tickets']} tickets and/or {$_POST['donatordays']} donator days."); } function reports_view() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 3) { die("403"); } print "<h3>Player Reports</h3> <table width=80%><tr style='background:gray'><th>Reporter</th> <th>Offender</th> <th>What they did</th> <th> </th> </tr>"; $q=$db->query("SELECT pr.*,u1.username as reporter, u2.username as offender FROM preports pr LEFT JOIN users u1 ON u1.userid=pr.prREPORTER LEFT JOIN users u2 ON u2.userid=pr.prREPORTED ORDER BY pr.prID DESC"); while($r=$db->fetch_row($q)) { print "\n<tr> <td>[url='viewuser.php?u={$r[']{$r['reporter']}[/url] [{$r['prREPORTER']}]</td> <td>[url='viewuser.php?u={$r[']{$r['offender']}[/url] [{$r['prREPORTED']}]</td> <td>{$r['prTEXT']}</td> <td>[url='staff_users.php?action=repclear&ID={$r[']Clear[/url]</td> </tr>"; } print "</table>"; } function forcelogout() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } $_POST['userid'] = abs((int) $_POST['userid']); if($_POST['userid']) { $db->query("UPDATE users SET force_logout=1 WHERE userid={$_POST['userid']}"); print "User ID {$_POST['userid']} successfully forced to logout."; stafflog_add("Forced User ID {$_POST['userid']} to logout"); } else { print "<h3>Force User Logout</h3><hr /> The user will be automatically logged out next time he/she makes a hit to the site.<form action='staff_users.php?action=forcelogout' method='post'> User: ".user_dropdown($c, 'userid')." <input type='submit' value='Force User to Logout' /></form>"; } } function change_user_pass() { global $db,$ir,$c; if ($_POST['USER']) { if(!$_POST['pw']) { print"You forgot to enter a new password! [url='staff_users.php?action=changeuserpass']> Back[/url]"; } else { $password=$_POST['pw']; $db->query("UPDATE users SET userpass=md5('$password') WHERE userid='{$_POST['USER']}' ",$c) or die(mysql_error()); } } else { print "<h3>Changing User's Password</h3> <form action='staff_users.php?action=changeuserpass' method='post'> Select User: <select name='USER' type='dropdown'>"; $q=mysql_query("SELECT userid,username FROM users",$c); while($r=mysql_fetch_array($q)) { print "\n<option value='{$r['userid']}'>{$r['username']} [{$r['userid']}]</option>"; } print" </select> </br> New Password: <input type='text' name='pw' value='1' /> <input type='submit' value='Change Password' /></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(); ?>   So there you go, please remember this is the first time I've posted my work, well it's only a few lines of coding but I've always been scared people will take the piss or give negative comments but i don't care now. Hope you like it.   Please use [code] ... [/code] tags
  20. Re: Staff Function - Edit User - V2 - Enhanced Version   <?php include "sglobals.php"; //This contains user stuffs switch($_GET['action']) { case 'newuser': new_user_form(); break; case 'newusersub': new_user_submit(); break; case 'edituser': edit_user_begin(); break; case 'edituserform': edit_user_form(); break; case 'editusersub': edit_user_sub(); break; case 'invbeg': inv_user_begin(); break; case 'invuser': inv_user_view(); break; case 'deleinv': inv_delete(); break; case 'creditform': credit_user_form(); break; case 'creditsub': credit_user_submit(); break; case 'masscredit': mcredit_user_form(); break; case 'masscreditsub': mcredit_user_submit(); break; case 'reportsview': reports_view(); break; case 'changeuserpass': change_user_pass(); break; case 'repclear': report_clear(); break; case 'deluser': deluser(); break; case 'forcelogout': forcelogout(); break; default: print "Error: This script requires an action."; break; } function htmlspcl($in) { return str_replace("'", "'", htmlspecialchars($in)); } function new_user_form() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("403"); } print "Adding a new user. <form action='staff_users.php?action=newusersub' method='post'> Username: <input type='text' name='username' /> Login Name: <input type='text' name='login_name' /> Email: <input type='text' name='email' /> Password: <input type='text' name='userpass' /> Type: <input type='radio' name='user_level' value='0' />NPC <input type='radio' name='user_level' value='1' checked='checked' />Regular Member Level: <input type='text' name='level' value='1' /> Money: <input type='text' name='money' value='100' /> Stars: <input type='text' name='crystals' value='0' /> Steps: <input type='text' name='turns' value='0' /> Tickets: <input type='text' name='tickets' value='0' /> Donator Days: <input type='text' name='donatordays' value='0' /> Gender: <select name='gender' type='dropdown'><option>Male</option><option>Female</option></select> [b]Stats[/b] Strength: <input type='text' name='strength' value='10' /> Agility: <input type='text' name='agility' value='10' /> Guard: <input type='text' name='guard' value='10' /> Labour: <input type='text' name='labour' value='10' /> IQ: <input type='text' name='labour' value='10' /> <input type='submit' value='Create User' /></form>"; } function new_user_submit() { global $db,$ir,$c,$userid; if($ir['user_level'] != 2) { die("403"); } if(!isset($_POST['username']) || !isset($_POST['login_name']) || !isset($_POST['userpass'])) { print "You missed one or more of the required fields. Please go back and try again. [url='admin.php?action=newuser']> Back[/url]"; $h->endpage(); exit; } $level=abs((int) $_POST['level']); $money=abs((int) $_POST['money']); $crystals=abs((int) $_POST['crystals']); $turns=abs((int) $_POST['turns']); $tickets=abs((int) $_POST['tickets']); $donator=abs((int) $_POST['donatordays']); $ulevel=abs((int) $_POST['user_level']); $strength=abs((int) $_POST['strength']); $agility=abs((int) $_POST['agility']); $guard=abs((int) $_POST['guard']); $labour=abs((int) $_POST['labour']); $iq=abs((int) $_POST['iq']); $energy=10+$level*2; $brave=3+$level*2; $hp=50+$level*50; $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, turns, tickets. donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney) VALUES( '{$_POST['username']}', '{$_POST['login_name']}', md5('{$_POST['userpass']}'), $level, $money, $crystals, $turns, $tickets, $donator, $ulevel, $energy, $energy, 100, 100, $brave, $brave, $hp, $hp, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1)"); $i=mysql_insert_id($c); $db->query("INSERT INTO userstats VALUES($i, $strength, $agility, $guard, $labour, $iq)"); print "User created!"; stafflog_add("Created user {$_POST['username']} [$i]"); } function edit_user_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } print "<h3>Editing User</h3> You can edit any aspect of this user. <form action='staff_users.php?action=edituserform' method='post'> User: ".user_dropdown($c,'user')." <input type='submit' value='Edit User' /></form> OR enter a user ID to edit: <form action='staff_users.php?action=edituserform' method='post'> User: <input type='text' name='user' value='0' /> <input type='submit' value='Edit User' /></form>"; } function edit_user_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $d=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us on u.userid=us.userid WHERE u.userid={$_POST['user']}"); $itemi=$db->fetch_row($d); $itemi['hospreason']=htmlspcl($itemi['hospreason']); $itemi['jail_reason']=htmlspcl($itemi['jail_reason']); print "<h3>Editing User</h3> <form action='staff_users.php?action=editusersub' method='post'> <input type='hidden' name='userid' value='{$_POST['user']}' /> Username: <input type='text' name='username' value='{$itemi['username']}' /> Login Name: <input type='text' name='login_name' value='{$itemi['login_name']}' /> Duties: <input type='text' name='duties' value='{$itemi['duties']}' /> Staff Notes: <input type='text' name='staffnotes' value='{$itemi['staffnotes']}' /> Level: <input type='text' name='level' value='{$itemi['level']}' /> Money: \$<input type='text' name='money' value='{$itemi['money']}' /> Bank: \$<input type='text' name='bankmoney' value='{$itemi['bankmoney']}' /> Cyber Bank: \$<input type='text' name='cybermoney' value='{$itemi['cybermoney']}' /> Stars: <input type='text' name='crystals' value='{$itemi['crystals']}' /> Steps: <input type='text' name='turns' value='{$itemi['turns']}' /> Tickets: <input type='text' name='tickets' value='{$itemi['tickets']}' /> Donator Days: <input type='text' name='donatordays' value='{$itemi['donatordays']}' /> Mail Ban: <input type='text' name='mailban' value='{$itemi['mailban']}' /> Mail Ban Reason: <input type='text' name='mb_reason' value='{$itemi['mb_reason']}' /> Forum Ban: <input type='text' name='forumban' value='{$itemi['forumban']}' /> Forum Ban Reason: <input type='text' name='fb_reason' value='{$itemi['fb_reason']}' /> Hospital time: <input type='text' name='hospital' value='{$itemi['hospital']}' /> Hospital reason: <input type='text' name='hospreason' value='{$itemi['hospreason']}' /> Jail time: <input type='text' name='jail' value='{$itemi['jail']}' /> Jail reason: <input type='text' name='jail_reason' value='{$itemi['jail_reason']}' /> House: ".house2_dropdown($c, "maxwill", $itemi['maxwill'])." <h4>Stats</h4> Strength: <input type='text' name='strength' value='{$itemi['strength']}' /> Agility: <input type='text' name='agility' value='{$itemi['agility']}' /> Guard: <input type='text' name='guard' value='{$itemi['guard']}' /> Labour: <input type='text' name='labour' value='{$itemi['labour']}' /> IQ: <input type='text' name='IQ' value='{$itemi['IQ']}' /> <h4>Energy, Will, Brave & Health</h4> Energy: <input type='text' name='energy' value='{$itemi['energy']}' /> Max Energy: <input type='text' name='maxenergy' value='{$itemi['maxenergy']}' /> Will: <input type='text' name='will' value='{$itemi['will']}' /> Maxwill: <input type='text' name='maxwill' value='{$itemi['maxwill']}' /> Brave: <input type='text' name='brave' value='{$itemi['brave']}' /> Max Brave: <input type='text' name='maxbrave' value='{$itemi['maxbrave']}' /> Health: <input type='text' name='hp' value='{$itemi['hp']}' /> Max Health: <input type='text' name='maxhp' value='{$itemi['maxhp']}' /> <input type='submit' value='Edit User' /></form>"; } function edit_user_sub() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $go=0; if(!isset($_POST['level'])) { $go=1; } if(!isset($_POST['money'])) { $go=1; } if(!isset($_POST['bankmoney'])) { $go=1; } if(!isset($_POST['crystals'])) { $go=1; } if(!isset($_POST['turns'])) { $go=1; } if(!isset($_POST['tickets'])) { $go=1; } if(!isset($_POST['donatordays'])) { $go=1; } if(!isset($_POST['strength'])) { $go=1; } if(!isset($_POST['agility'])) { $go=1; } if(!isset($_POST['guard'])) { $go=1; } if(!isset($_POST['labour'])) { $go=1; } if(!isset($_POST['IQ'])) { $go=1; } if(!isset($_POST['username'])) { $go=1; } if(!isset($_POST['login_name'])) { $go=1; } if($go) { print "You did not fully fill out the form."; $_POST['user']=$_POST['userid']; edit_user_form(); } else { $_POST['level']=(int) $_POST['level']; $_POST['strength']=abs((int) $_POST['strength']); $_POST['agility']=abs((int) $_POST['agility']); $_POST['guard']=abs((int) $_POST['guard']); $_POST['labour']=abs((int) $_POST['labour']); $_POST['IQ']=abs((int) $_POST['IQ']); $_POST['money']=(int) $_POST['money']; $_POST['bankmoney']=(int) $_POST['bankmoney']; $_POST['cybermoney']=(int) $_POST['cybermoney']; $_POST['crystals']=(int) $_POST['crystals']; $_POST['turns']=(int) $_POST['turns']; $_POST['tickets']=abs((int) $_POST['tickets']); $_POST['donatordays']=abs((int) $_POST['donatordays']); $_POST['mailban']=(int) $_POST['mailban']; $_POST['forumban']=(int) $_POST['forumban']; $maxwill=abs((int) $_POST['maxwill']); //check for username usage $u=$db->query("SELECT * FROM users WHERE username='{$_POST['username']}' and userid != {$_POST['userid']}"); if($db->num_rows($u) != 0) { print "That username is in use, choose another."; print " [url='admin.php?action=edituser']> Back[/url]"; $h->endpage(); exit; } $oq=$db->query("SELECT * FROM users WHERE userid={$_POST['userid']}"); $rm=$db->fetch_row($oq); $will=($rm['will'] > $maxwill) ? $maxwill: $rm['will']; $energy=10+$_POST['level']*2; $nerve=3+$_POST['level']*2; $hp=50+$_POST['level']*50; $db->query("UPDATE users SET username='{$_POST['username']}', level={$_POST['level']}, money={$_POST['money']}, crystals={$_POST['crystals']}, energy=$energy, brave=$nerve, maxbrave=$nerve, maxenergy=$energy, hp=$hp, maxhp=$hp, hospital={$_POST['hospital']}, jail={$_POST['jail']}, duties='{$_POST['duties']}', staffnotes='{$_POST['staffnotes']}', mailban={$_POST['mailban']}, mb_reason='{$_POST['mb_reason']}', forumban={$_POST['forumban']}, fb_reason='{$_POST['fb_reason']}', hospreason='{$_POST['hospreason']}', jail_reason='{$_POST['jail_reason']}', login_name='{$_POST['login_name']}', energy='{$_POST['energy']}', maxenergy='{$_POST['maxenergy']}', will='{$_POST['will']}', maxwill='{$_POST['maxwill']}', brave='{$_POST['brave']}', maxbrave='{$_POST['maxbrave']}', hp='{$_POST['hp']}', maxhp='{$_POST['maxhp']}', turns='{$_POST['turns']}', tickets='{$_POST['tickets']}', donatordays='{$_POST['donatordays']}', will=$will, maxwill=$maxwill WHERE userid={$_POST['userid']}"); $db->query("UPDATE userstats SET strength={$_POST['strength']}, agility={$_POST['agility']}, guard={$_POST['guard']}, labour={$_POST['labour']}, IQ={$_POST['IQ']} WHERE userid={$_POST['userid']}"); stafflog_add("Edited user {$_POST['username']} [{$_POST['userid']}]"); print "User edited...."; } }   Please use [code] ... [/code] tags
  21. This is my first addition to a source code page, it's the staff_users.php page with a few extras added on, I've tested it on my game and it's working properly. Now what I usually do is make a new notepad file and save the 1 that I'm allready using with a 1 on the end of it for example staff_users1.php then i put the new 1 in if i like the new 1 I'll keep them both if i don't like the new 1 I'll delete them both. So make a new notepad file called staff_users.php and rename the one you've already got in the ftp to staff_users1.php then add the code below into staff_users.php and test it. Code's on next post, exceeded maximum limit
  22. Hello there, Can somebody please help me. I'm getting the error below after signing up to the game, please can somebody help. I'd really appreciate it. Thanks Game Link - www.deadly-planet.com QUERY ERROR: Duplicate entry '100' for key 2 Query was INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES( 'Gangster', 'Gangster', md5('gangster'), 1, 100, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, 'Male', unix_timestamp(), '[email protected]', -1, 'IP.IP.IP.IP', 'IP.IP.IP.IP')
  23. Hello there, Can somebody please help me. I'm getting the error below after signing up to the game, please can somebody help. I'd really appreciate it. Thanks Game Link - www.deadly-planet.com QUERY ERROR: Duplicate entry '100' for key 2 Query was INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES( 'Gangster', 'Gangster', md5('gangster'), 1, 100, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, 'Male', unix_timestamp(), '[email protected]', -1, 'IP.IP.IP.IP', 'IP.IP.IP.IP')
  24. Re: [V2]Crystal Smuggling Mod[V2] This is what i have entered ////Coded By Klikoka For Free switch($_GET['action']) { case 'smug1': smug_1(); break; case 'smug1sub': smug_1_sub(); break; case 'smug2': smug_2(); break; case 'smug2sub': smug_2_sub(); break; case 'smug3': smug_3(); break; case 'smug3sub': smug_3_sub(); break; case 'smug4': smug_4(); break; case 'smug4sub': smug_4_sub(); break; case 'smug5': smug_5(); break; case 'smug5sub': smug_5_sub(); break; case 'smug6': smug_6(); break; case 'smug6sub': smug_6_sub(); break; default: smug_index('action'); break; } It gives me this error Fatal error: Call to undefined function smug_1() in /home/deadlypl/public_html/csmuggling.php on line 19 please can someone help me. Thanks.
×
×
  • Create New...