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
------------------