Jump to content
MakeWebGames

PoNiT

Members
  • Posts

    57
  • Joined

  • Last visited

    Never

Everything posted by PoNiT

  1. Re: [V2]Game Stats For Admin[V2] What do you mean?
  2. Re: [V2]Game Stats For Admin[V2] Do they? I really dont know, im just sharing the things ive edited. I edited halloffame.php to get this.
  3. I took halloffame.php and edited it to make this. It is a mod which allows admin to see the first 20 users with the most money, bank money, crystals and bank crystals. I know its simple and anyone could have done it, but I just decided to do it so if anyone hacks or cheats, I can look there to see who has been cheating. You can always edit it to add your own things also!   Create a file called me.php, Add into it; <?php include "globals.php"; if($ir['user_level'] != 2) { print" This page can only be viewed by the admins"; $h->endpage(); die(" "); } $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" <table width='75%' cellspacing='1' class='head'><tr><td><h3>Whole Game Stats</h2></td></tr></table> <table width=75% cellspacing=1 class='table'> <tr> <td>[url='me.php?action=money&filter={$filter}']Money[/url]</td> <td>[url='me.php?action=bankmoney&filter={$filter}']Bank Money[/url]</td> <td>[url='me.php?action=crystals&filter={$filter}']Crystals[/url]</td> <td>[url='me.php?action=crystalbank&filter={$filter}']Crystal Bank[/url]</td> </tr> </table> "; switch($_GET['action']) { case "money": hof_money(); break; case "crystals": hof_crystals(); break; case "bankmoney": hof_bankmoney(); break; case "crystalbank": hof_crystalbank(); break; } 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><th>Status</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=""; } { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<tr> <td>$t$p$et</td> <td>$t[url='viewuser.php?u={$r[']{$r['gangPREF']} {$r['username']}[/url] [{$r['userid']}]$et</td> <td>$t\${$r['money']}$et</td><td>$on</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><th>Status</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=""; }{ if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<tr> <td>$t$p$et</td> <td>$t[url='viewuser.php?u={$r[']{$r['gangPREF']} {$r['username']}[/url] [{$r['userid']}]$et</td> <td>$t".money_formatter($r['crystals'],'')."$et</td><td>$on</td> </tr>"; } } print "</table>"; } function hof_bankmoney() { global $db,$ir,$c,$userid, $myf; print " Showing the 20 users with the highest amount of bank money <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Money</th><th>Status</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 bankmoney 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=""; } { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<tr> <td>$t$p$et</td> <td>$t[url='viewuser.php?u={$r[']{$r['gangPREF']} {$r['username']}[/url] [{$r['userid']}]$et</td> <td>$t$ {$r['bankmoney']}$et</td><td>$on</td> </tr>"; } } print "</table>"; } function hof_crystalbank() { global $db,$ir,$c,$userid, $myf; print " Showing the 20 users with the highest amount of crystals in bank <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Crystals</th><th>Status</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 crystalbank 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=""; } { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<tr> <td>$t$p$et</td> <td>$t[url='viewuser.php?u={$r[']{$r['gangPREF']} {$r['username']}[/url] [{$r['userid']}]$et</td> <td>$t{$r['crystalbank']}$et</td><td>$on</td> </tr>"; } } print "</table>"; } $h->endpage(); ?>   Then in smenu.php find; [url='staff_special.php?action=givedpform']Give User Donator Pack[/url]   Below it add; > [url='me.php']Game Stats[/url]     The best thing is, not everyone can see it, only admin can :D ------------------ Extra information: The names of the users links to their profile, and it says whether they are online or offline. Tesco: Every little helps ------------------
  4. Re: [V2]Create Organised Crime[V2] Thanks at least I get a positive comment :-D
  5. This mod will create a link in the staff menu to create a new organised crime rather than logging into php my admin. This mod is not completely mine, i got edit organised crime from CE and i edited it to this. I dont know if this has already been posted but here. In staff_gangs.php find; case 'gedit_ament': admin_gang_edit_ament(); break;   Below it add; case 'createoc': create_oc_form(); break; case 'createocsub': create_oc_sub(); break;   Then go to the bottom of the page and find; $h->endpage(); ?>   Before that add; function create_oc_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } print " <form action='staff_gangs.php?action=createocsub' method='POST'> <h4>Create OC</h4> Name: <input type='text' name='ocNAME'/> Minimum users for crime: <input type='text' name='ocUSERS'/> Text: <textarea rows=4 cols=40 name='ocSTARTTEXT' /></textarea> Success Text: <textarea rows=4 cols=40 name='ocSUCCTEXT' /></textarea> Failure Text <textarea rows=4 cols=40 name='ocFAILTEXT' /></textarea> Minimum Possible Money <input type='text' name='ocMINMONEY'/> Maximum Possible Money <input type='text' name='ocMAXMONEY'/> Respect Gain <input type='text' name='ocRESPECT'/> <input type='submit' value='Create' /> </form>"; } function create_oc_sub() { global $ir,$c,$userid,$db,$h; if($ir['user_level'] != 2) { die("403"); } $db->query("INSERT INTO orgcrimes VALUES('', '{$_POST['ocNAME']}', '{$_POST['ocUSERS']}', '{$_POST['ocSTARTTEXT']}', '{$_POST['ocSUCCTEXT']}', '{$_POST['ocFAILTEXT']}', '{$_POST['ocMINMONEY']}', '{$_POST['ocMAXMONEY']}')"); print " The organised crime was successfully created. [url='staff_gangs.php?action=createoc']>Back[/url] "; stafflog_add("Created Organise Crime: {$_POST['ocNAME']}"); }   Then in smenu.php add; [url='staff_gangs.php?action=createoc']Create Organised Crime[/url]   Thats it and your done :-D. This works fine for me. If you have any problems just post them here and ill fix it for you. As I said it works totally for me but it might not work for you if you have edited the organised crime in your database.
×
×
  • Create New...