Jump to content
MakeWebGames

Magictallguy

Administrators
  • Posts

    2,130
  • Joined

  • Last visited

  • Days Won

    145

Everything posted by Magictallguy

  1. Re: Problem   <?php include "globals.php"; $filters=array( 'nodon' => 'AND donatordays=0', 'don' => 'AND donatordays > 0', 'all' => ''); $filter=(isset($filters[$_GET['filter']])) ? $_GET['filter'] : 'all'; $myf=$filters[$filter]; $bt1=($filter=="nodon") ? "[b]" : ""; $bet1=($filter=="nodon") ? "[/b]" : ""; $bt2=($filter=="don") ? "[b]" : ""; $bet2=($filter=="don") ? "[/b]" : ""; $bt3=($filter=="all") ? "[b]" : ""; $bet3=($filter=="all") ? "[/b]" : ""; print "<h3>Hall Of Fame</h3><hr /> Filter: [$bt1[url='halloffame.php?action={$_GET[']Non-Donators[/url]$bet1 | $bt2[url='halloffame.php?action={$_GET[']Donators[/url]$bet2 | $bt3[url='halloffame.php?action={$_GET[']All Users[/url]$bet3]<hr /> <table width=75% cellspacing=1 class='table'> <tr> <td>[url='halloffame.php?action=level&filter={$filter}']LEVEL[/url]</td> <td>[url='halloffame.php?action=money&filter={$filter}']MONEY[/url]</td> <td>[url='halloffame.php?action=respect&filter={$filter}']RESPECT[/url]</td> <td>[url='halloffame.php?action=crystals&filter={$filter}']CRYSTALS[/url]</td> <td>[url='halloffame.php?action=total&filter={$filter}']TOTAL STATS[/url]</td> </tr> <tr> <td>[url='halloffame.php?action=strength&filter={$filter}']STRENGTH[/url]</td> <td>[url='halloffame.php?action=agility&filter={$filter}']AGILITY[/url]</td> <td>[url='halloffame.php?action=guard&filter={$filter}']GUARD[/url]</td> <td>[url='halloffame.php?action=labour&filter={$filter}']LABOUR[/url]</td> <td>[url='halloffame.php?action=iq&filter={$filter}']IQ[/url]</td> </tr> </table>"; switch($_GET['action']) { case "level": hof_level(); break; case "money": hof_money(); break; case "crystals": hof_crystals(); break; case "respect": hof_respect(); break; case "total": hof_total(); break; case "strength": hof_strength(); break; case "agility": hof_agility(); break; case "guard": hof_guard(); break; case "labour": hof_labour(); break; case "iq": hof_iq(); break; } function hof_level() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest levels <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Level</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY level DESC,userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $userid) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> <td>$t{$r['level']}$et</td> </tr>"; } print "</table>"; } function hof_money() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest amount of money <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Money</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY money DESC,userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $userid) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> <td>$t\$".money_formatter($r['money'],'')."$et</td> </tr>"; } print "</table>"; } function hof_crystals() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest amount of crystals <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Crystals</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY crystals DESC,userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $userid) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> <td>$t".money_formatter($r['crystals'],'')."$et</td> </tr>"; } print "</table>"; } function hof_respect() { global $db,$ir,$c,$userid; print "Showing the 20 gangs with the highest amount of respect <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>Gang</th> <th>Respect</th> </tr>"; $q=$db->query("SELECT * FROM gangs ORDER BY gangRESPECT DESC,gangID ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['gangID'] == $ir['gang']) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangNAME']} [{$r['gangID']}]$et</td> <td>$t".money_formatter($r['gangRESPECT'],'')."$et</td> </tr>"; } print "</table>"; } function hof_total() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest total stats <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY (us.strength+us.agility+us.guard+us.labour+us.IQ) DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> </tr>"; } print "</table>"; } function hof_strength() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest strength <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY us.strength DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> </tr>"; } print "</table>"; } function hof_agility() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest agility <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY us.agility DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> </tr>"; } print "</table>"; } function hof_guard() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest guard <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY us.guard DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> </tr>"; } print "</table>"; } function hof_labour() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest labour <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY us.labour DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> </tr>"; } print "</table>"; } function hof_iq() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest IQ <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY us.IQ DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> </tr>"; } print "</table>"; } $h->endpage(); ?>
  2. Re: Delete   Does badboy act stoopid on purpose? :P
  3. Re: [v1]Refill Users Create a new file called staff_refil.php   <?php include "sglobals.php"; if($ir['user_level'] > 2) { die("403"); } //This contains refil stuffs switch($_GET['action']) { case 'cwill': update_will(); break; case 'cbrave': update_brave(); break; case 'chp': update_hp(); break; case 'cenergy': update_energy(); break; case 'chospital': update_hospital(); break; case 'call': update_all(); break; case 'cmost': update_most(); break; default: print "Error: This script requires an action."; break; } function update_will() { global $db,$ir,$h,$userid; $db->query("UPDATE users SET will=maxwill"); print "All users have been refilled, Will! [url='staff.php']> Back[/url]"; } function update_energy() { global $db,$ir,$h,$userid; $db->query("UPDATE users SET energy=maxenergy"); print "All users have been refilled, Energy! [url='staff.php']> Back[/url]"; } function update_brave() { global $db,$ir,$h,$userid; $db->query("UPDATE users SET brave=maxbrave"); print "All users have been refilled, Brave! [url='staff.php']> Back[/url]"; } function update_hp() { global $db,$ir,$h,$userid; $db->query("UPDATE users SET hp=maxhp"); print "All users have been refilled, Health! [url='staff.php']> Back[/url]"; } function update_hospital() { global $db,$ir,$h,$userid; $db->query("UPDATE users SET hospital=''"); $db->query("UPDATE users SET hospreason = ''"); print "All users have been let out of hospital! [url='staff.php']> Back[/url]"; } function update_most() { global $db,$ir,$h,$userid; $db->query("UPDATE users SET will=maxwill"); $db->query("UPDATE users SET energy=maxenergy"); $db->query("UPDATE users SET brave=maxbrave"); $db->query("UPDATE users SET hp=maxhp"); print "All bars have been refilled! [url='staff.php']> Back[/url]"; } function update_all() { global $db,$ir,$h,$userid; $db->query("UPDATE users SET will=maxwill"); $db->query("UPDATE users SET energy=maxenergy"); $db->query("UPDATE users SET brave=maxbrave"); $db->query("UPDATE users SET hp=maxhp"); $db->query("UPDATE users SET hospital=''"); $db->query("UPDATE users SET hospreason = ''"); print "All bars have been refilled and all users let out of hospital! [url='staff.php']> Back[/url]"; } $h->endpage(); ?>   Put into smenu.php (whever you want it to show) <hr /> [b]Refilling people (not being dirty :P)[/b] > [url='staff_refil.php?action=cwill']Refil Will[/url] > [url='staff_refil.php?action=cbrave']Refil Brave[/url] > [url='staff_refil.php?action=chp']Refil Health[/url] > [url='staff_refil.php?action=cenergy']Refil Energy[/url] > [url='staff_refil.php?action=chospital']Let everyone out of hospital[/url] > [url='staff_refil.php?action=cmost']Refil All Bars[/url] > [url='staff_refil.php?action=call']Refil All Bars And Let Everyone Out Of Hospital/Jail[/url]
  4. Re: [v1]Refill Users I'll post for v2 now..
  5. Re: Free Loan Shark System   <?php session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); switch($_GET['action']) { case 'borrow': borrow_money_start(); break; case 'borrowed': borrow_money(); break; case 'repay': repay_money_start(); break; case 'repayed': repay_money(); break; case 'invest': invest_money(); break; case 'invested': invested_money(); break; default: loanshark_main(); break; } function loanshark_main() { global $ir,$c,$userid,$h; $maxloan=$ir['level']*50000; echo "<h2>Loan Shark</h2> You currently have a loan of \${$ir['loan']} The max you can loan is \$$maxloan - [url='loanshark.php?action=borrow']Loan Money[/url] - [url='loanshark.php?action=repay']Repay Loan[/url] - [url='loanshark.php?action=invest']Invest Money[/url] "; } function borrow_money_start() { global $ir,$c,$userid,$h; $maxloan=$ir['level']*50000; echo "The max amount you can borrow is \$$maxloan You currently have a lone of \${$ir['loan']} <form action='loanshark.php?action=borrowed' method='post'> Ammount: <input type=text value='$maxloan' name=borrowed> <input type=submit value='Borrow'>"; } function borrow_money() { global $ir,$c,$userid,$h; $maxloan=$ir['level']*50000; $loan=$ir['loan']; if ($loan == $maxloan) { die("You have already taken out the max loan possible you must pay it back before you can loan more > [url='loanshark.php?action=repay']Repay[/url]"); } if ($_POST['borrowed'] >= $maxloan) { die("You are trying to loan more then your max lone > [url='loanshark.php?action=borrow']Back[/url]"); } mysql_query("UPDATE users SET loan=loan+{$_POST['borrowed']} WHERE userid=$userid",$c); mysql_query("UPDATE users SET money=money+{$_POST['borrowed']} WHERE userid=$userid",$c); echo"You Borrowed from the loan shark > [url='loanshark.php']Back[/url]"; } function repay_money_start() { global $ir,$c,$userid,$h; echo"You have a lone of \${$ir['loan']} <form action='loanshark.php?action=repayed' method='post'> Ammount: <input type=text value='{$ir['loan']}' name=repayed> <input type=submit value='Repay'>"; } function repay_money() { global $ir,$c,$userid,$h; if($ir['loan'] <= 0) { die("You are trying to payback more then u have to > [url='loanshark.php']Back[/url]"); } mysql_query("UPDATE users SET loan=loan-{$_POST['repayed']} WHERE userid=$userid",$c); mysql_query("UPDATE users SET money=money-{$_POST['repayed']} WHERE userid=$userid",$c); echo"You repayed the loan shark > [url='loanshark.php']Back[/url]"; } function invest_money() { global $ir,$c,$userid,$h; echo"Here you can invest money on the spot and watch your money sink or float its simple you state the ammount you wish to invest in the box below and click Invest You have [b]{$ir['investments']}[/b] dayily invest statment's left <form action='loanshark.php?action=invested' method='post'> Ammount: \$<input type=text name=invest> <input type=submit value='Invest'> "; } function invested_money() { global $ir,$c,$userid,$h; if ($ir['investments'] < 1) { die("You have used up all your dayily investments > [url='loanshark.php?action=invest']Back[/url]"); } if(rand(1,100) <= 50) { $gainedmoney=(int) rand(1,30); print "<font color=green>[b]Result: You hand over {$_POST['invest']} to the old man at the counter One week later you get a phone call its the old man he explains that your investment has payed off You invested ${$_POST['invest']} and ended up making \$$gainedmoney extra.</font>[/b] You have [b]{$ir['investments']}[/b] dayily invest statment's left > [url='loanshark.php?action=invest']Try Again[/url]"; mysql_query("UPDATE users SET investments=investments-1",$c); mysql_query("UPDATE users SET money=money+$gainedmoney WHERE userid=$userid",$c); } else { if ($ir['investments'] < 1) { die("You have used up all your dayily investments > [url='loanshark.php?action=invest']Back[/url]"); } $lostmoney=(int) rand(1,10); mysql_query("UPDATE users SET money=money-$lostmoney WHERE userid=$userid", $c); echo"<font color=red>[b]Result: You invested \${$_POST['invest']} and lost \$$lostmoney out of your overall investment. One week later you get a phone call its the old man he explains that your investment has failed </font>[/b] You have [b]{$ir['investments']}[/b] dayily invest statment's left > [url='loanshark.php?action=invest']Try Again[/url] "; mysql_query("UPDATE users SET investments=investments-1",$c); } } $h->endpage(); ?>
  6. Re: Free Loan Shark System I'll tidy it up now!
  7. Re: Delete For the school...The code should already be there.. cron_day.php (about half way down)   $q=$db->query("SELECT * FROM users WHERE cdays=0 AND course > 0"); while($r=$db->fetch_row($q)) { $cd=$db->query("SELECT * FROM courses WHERE crID={$r['course']}"); $coud=$db->fetch_row($cd); $userid=$r['userid']; $db->query("INSERT INTO coursesdone VALUES({$r['userid']},{$r['course']})");
  8. Re: Delete If you want to be able to credit yourself more than 2,147,483,647 then: Go into your File Manager Find staff_users.php In there find the code 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']; $db->query("UPDATE users u SET money=money+{$_POST['money']}, crystals=crystals+{$_POST['crystals']} 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']} crystals."); }   And replace with: function credit_user_submit() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 3) { die("403"); } $_POST['money'] = (float) $_POST['money']; $_POST['crystals'] = (float) $_POST['crystals']; $db->query("UPDATE users u SET money=money+{$_POST['money']}, crystals=crystals+{$_POST['crystals']} 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']} crystals."); }
  9. Re: Delete Why you would want to overdo your economy is above me..but fine.. Go into phpMyAdmin -> SQL   ALTER TABLE `users` CHANGE `money` `money` INT( 12 ) NOT NULL DEFAULT '0', CHANGE `crystals` `crystals` INT( 12 ) NOT NULL DEFAULT '0', CHANGE `bankmoney` `crystals` INT( 12 ) NOT NULL DEFAULT '0', CHANGE `cybermoney` `crystals` INT( 12 ) NOT NULL DEFAULT '0'
  10. Re: Delete Add into attackwon.php if ($ga['gangRESPECT']<=0 && $r['gang']) { $db->query("UPDATE users SET gang=0 WHERE gang={$r['gang']}"); $db->query("DELETE FROM gangs WHERE gangRESPECT<='0'"); $db->query("DELETE FROM gangwars WHERE warDECLARER={$ga['gangID']} or warDECLARED={$ga['gangID']}"); } ---- Add into attackbeat.php if ($ga['gangRESPECT']<=0 && $r['gang']) { $db->query("UPDATE users SET gang=0 WHERE gang={$r['gang']}"); $db->query("DELETE FROM gangs WHERE gangRESPECT<='0'"); $db->query("DELETE FROM gangwars WHERE warDECLARER={$ga['gangID']} or warDECLARED={$ga['gangID']}"); }
  11. Re: Tutorial: v1 - v2 Conversion   As true as this is, what many coder/programmers don't realise is that it's actually *much* safer to use the $db->query string instead of the mysql_query.. So.. v1 session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea();   v2 include "globals.php";   ----------- v1 mysql_   v2 $db->   ------------ v1 fetch_array   v2 fetch_row   Much safer to use it that way.
  12. Re: [Free] Password reset code You probably already covered this but in the v2 codes you don't get a mysql.php the closest thing to it that you get is config.php ... Would you be able to use that instead of the mysql?
  13. Re: [TGM] Ammunition For Weapons [TGM] Does this work on v2 PHP games?
  14. Re: [$10] Secure Password System Do you take pay by card? PayPal stopped working (I'm 16, gotta be 18 to use)
  15. Re: [v1]Refill Users Crons mod....HAHAHAHA!! Good one! I'll convert to v2 for you soon!
  16. Re: [mccode] Improved Estate Agents for v2.0 Well it won't....This is v2! Look at page 1 near the bottom to find v1!
  17. Re: [mccode] Supporter Packs Ner ner!!! Oh wait...Neither do I! But I code for about 4!!
  18. Re: [mccode] Supporter Packs I know this is annoying to see all over the place but...does anyone have this for v2?
  19. Re: [FREE] Bodyguard V2.0   if thats for me i am spelling it right i spelt cronus'es Just to be awkward it would actually be Cronus'
  20. Re: [mccode v2] Crystal Reserve Mod FREE VERSION [/mccode v2] Probably forgot to change mysql_fetch_array() to rows()
  21. Re: [mccode] Diamond gems, with a Diamondtemple.php for v2.0 And for those who want to add the diamond amount you have on hand to the game then look for this: Open header.php and find:   [b]Crystals:[/b] {$ir['crystals']}   Then add this: [b]Diamonds:[/b] {$ir['diamonds']}
  22. Re: FREE Bug Tracker Mod I'm bored so Oxi? You can have another +1!! (I've already given you a +1 but as I said I'm bored!!)
  23. Re: [mccode] Close page system Well I have an HTML tester on my Owner Panel if anyone wants it?
  24. Re: Free New City Mod For v1 and lite Or what you could try is this... Go into your admin panel (admin.php) and add in this underneath where all the case: whatever whatever; (); stuff is case "delcity": del_city(); break; case "delcitysub": del_city_sub(); break; case 'newcity': new_city(); break; case 'newcitysub': new_city_sub(); break; case 'editcity': edit_city(); break; case 'editcitysub': edit_city_sub(); break; case 'delcity': del_city(); break; case 'delcitysub': del_city_sub(); break; Add in the link wherer you want it [[url='newcity.php?action=newcity']Create New city[/url]] [[url='newcity.php?action=editcity']Edit City[/url]] [<a href='newcity.php?action=delcity'> And go to $h->endpage and paste this above function new_city() { global $ir, $c, $h, $userid; print "<h3>Create New City</h3> This will create a new city. <form action='newcity.php?action=newcitysub' method='post'> City name: <input type='text' name='cityname' /> City desc: <input type='text' name='citydesc' /> City min level <input type='text' name='cityminlevel' /> <input type='submit' value='Create New city' /></form>"; } function new_city_sub() { global $ir, $c, $h, $userid; $_POST['cityminlevel'] = abs((int)$_POST['cityminlevel']); mysql_query("INSERT INTO cities (cityname, citydesc, cityminlevel) VALUES ('{$_POST['cityname']}', '{$_POST['citydesc']}', '{$_POST['cityminlevel']}');", $c); print "[url='admin.php']> Back[/url]"; } function edit_city() { global $ir, $c, $h, $userid, $cityid; print "<h3>Edit City</h3> This will edit a city. <form action='newcity.php?action=editcitysub' method='post'> City City id: <input type='text' name='cityid' /> City Name EXACTLY as it appears: <input type='text' name='cityname' /> City desc: <input type='text' name='citydesc' /> City min level <input type='text' name='cityminlevel' /> <input type='submit' value='Edit city' /></form>"; } function edit_city_sub() { global $ir,$c,$h,$userid; mysql_query("UPDATE cities SET cityid='{$_POST['cityid']}',cityname='{$_POST['cityname']}', citydesc='{$_POST['citydesc']}', cityminlevel='{$_POST['cityminlevel']}' WHERE cityid='{$_POST['cityid']}'",$c); print "City edited..."; } function del_city() { global $ir, $c, $h, $userid, $cityid; print "<h3>Delete City</h3> This will delete a city. <form action='newcity.php?action=delcitysub' method='post'> City id: <input type='text' name='cityid' /> <input type='submit' value='Delete city' /></form>"; } function del_city_sub() { global $ir,$c,$h,$userid; mysql_query("DELETE FROM cities WHERE cityid='{$_POST['cityid']}'",$c); print "City deleted"; } and that's it! Nothing was changed apart from where to shove it! ;P
  25. Re: SQL Injections You got any defensive ideas about these? I just got hacked!!!
×
×
  • Create New...