<?php require("top.php"); ?>
<?php
require("usercheck.php");
require("prison_check.php");
?>
<form method="post">
<table width="550" border="0" align="center" cellpadding="0" cellspacing="2" class="table">
<tr>
<td colspan="3" align="left" class="head">Top 10 Ranked Players:</td>
</tr>
<tr>
<td width="150" align="left" class="sub">Name:</td>
<td width="150" align="left" class="sub">Rank:</td>
<td width="250" align="left" class="sub">Gang:</td>
</tr>
<?php
$result = mysql_query("SELECT name,gang,exp,rank FROM login WHERE staff='0' AND sitestate='0' ORDER BY exp + 0 DESC LIMIT 0,10") or die(mysql_error());
// keeps getting the next row until there are no more to get
while ($row = mysql_fetch_array($result)) {
// Print out the contents of each row into a table
?>
<tr>
<td width="150" align="left"
class="cell"><?php echo "<a href=\"view_profile.php?name=" . $row['name'] . "\" onFocus=\"if(this.blur)this.blur()\">" . $row['name'] . "</a>"; ?></td>
<td width="150" align="left" class="cell"><?php echo $rank_array[$row['rank']]; ?></td>
<td width="250" align="left" class="cell"><?php
if (empty($row['gang'])) {
echo "No Gang.";
} else {
echo "<a href=\"view_gang.php?name=" . $row['gang'] . "\" onFocus=\"if(this.blur)this.blur()\" >" . $row['gang'] . "</a>";
}?></td>
</tr>
<?php } // while ?>
</table>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="2" class="table">
<tr>
<td colspan="3" align="left" class="head">Top 10 wealthiest Players:</td>
</tr>
<tr>
<td width="150" align="left" class="sub">Name:</td>
<td width="150" align="left" class="sub">Wealth:</td>
<td width="250" align="left" class="sub">Gang:</td>
</tr>
<?php
$result = mysql_query("SELECT money,name,gang FROM login WHERE staff='0' AND sitestate='0' ORDER BY money + 0 DESC LIMIT 0,10") or die(mysql_error());
// keeps getting the next row until there are no more to get
while ($row = mysql_fetch_array($result)) {
// Print out the contents of each row into a table
?>
<tr>
<td width="150" align="left"
class="cell"><?php echo "<a href=\"view_profile.php?name=" . $row['name'] . "\" onFocus=\"if(this.blur)this.blur()\">" . $row['name'] . "</a>"; ?></td>
<td width="150" align="left" class="cell"><?php
if ($row['money'] >= 0) {
$profile_wealth = $wealth_array[0];
}
if ($row['money'] >= 25000) {
$profile_wealth = $wealth_array[1];
}
if ($row['money'] >= 50000) {
$profile_wealth = $wealth_array[2];
}
if ($row['money'] >= 100000) {
$profile_wealth = $wealth_array[3];
}
if ($row['money'] >= 250000) {
$profile_wealth = $wealth_array[4];
}
if ($row['money'] >= 500000) {
$profile_wealth = $wealth_array[5];
}
if ($row['money'] >= 1000000) {
$profile_wealth = $wealth_array[6];
}
if ($row['money'] >= 10000000) {
$profile_wealth = $wealth_array[7];
}
if ($row['money'] >= 1000000000) {
$profile_wealth = $wealth_array[8];
}
if ($row['money'] >= 10000000000) {
$profile_wealth = $wealth_array[9];
}
echo $profile_wealth;?>
</td>
<td width="250" align="left" class="cell"><?php
if (empty($row['gang'])) {
echo "No Gang.";
} else {
echo "<a href=\"view_gang.php?name=" . $row['gang'] . "\" onFocus=\"if(this.blur)this.blur()\" >" . $row['gang'] . "</a>";
}?></td>
</tr>
<?php } // while ?>
</table>
</p>
</form>
<?php require("bottom.php"); ?>
try now