<?
require("config.php");
if($muweb['gm']=='no'){
$query = "Select TOP 100 Name,Class,cLevel,resets,Money,PKcount from Character where ctlcode !='32' and ctlcode !='8' and PkCount>0 order by PKcount desc ,resets desc";}
elseif($muweb['gm']=='yes'){
$query = "Select TOP 100 Name,Class,cLevel,resets,Money,PKcount from Character where PkCount>0 order by PKcount desc ,resets desc";}
$result = $db->Execute($query);
$content ='<br><font color=white size=2><b><center>Top 100 Killers</center></b></font>
<br></br>
<table height=10 border=1 bordercolor=#000000 cellpadding=2 cellspacing=1 width=330>
<tr>
<td bgcolor="#3d3d3d" border="1" bordercolor="black" style="border-collapse: collapse; border: 1px solid black" align=center class=thead2><b><font color=white>#</font></td>
<td bgcolor="#3d3d3d" border="1" bordercolor="black" style="border-collapse: collapse; border: 1px solid black" align=center class=thead2><b><font color=white>Name</font></b></td>
<td bgcolor="#3d3d3d" border="1" bordercolor="black" style="border-collapse: collapse; border: 1px solid black" align=center class=thead2><b><font color=white>Class</font></b></td>
<td bgcolor="#3d3d3d" border="1" bordercolor="black" style="border-collapse: collapse; border: 1px solid black" align=center class=thead2><b><font color=white>Level</font></b></td>
<td bgcolor="#3d3d3d" border="1" bordercolor="black" style="border-collapse: collapse; border: 1px solid black" align=center class=thead2><b><font color=white>Resets</font></b></td>
<td bgcolor="#3d3d3d" border="1" bordercolor="black" style="border-collapse: collapse; border: 1px solid black" align=center class=thead2><b><font color=white>Zen</font></b></td>
<td bgcolor="#3d3d3d" border="1" bordercolor="black" style="border-collapse: collapse; border: 1px solid black" align=center class=thead2><b><font color=white>PK</font></b></td>
</tr>';
for($i=0;$i < $result->numrows();++$i)
{
$row = $result->fetchrow();
$rank = $i+1;
$rank2 = $rank+1;
if($row[1] == 0){ $row[1] ='DW';
}
if($row[1] == 1){ $row[1] ='SM';
}
if($row[1] == 2){ $row[1] ='GrM';
}
if($row[1] == 16){ $row[1] ='DK';
}
if($row[1] == 17){ $row[1] ='BK';
}
if($row[1] == 18){ $row[1] ='BM';
}
if($row[1] == 32){ $row[1] ='ELF';
}
if($row[1] == 33){ $row[1] ='ME';
}
if($row[1] == 34){ $row[1] ='HE';
}
if($row[1] == 48){ $row[1] ='MG';
}
if($row[1] == 49){ $row[1] ='DM';
}
if($row[1] == 64){ $row[1] ='DL';
}
if($row[1] == 65){ $row[1] ='LE';
}
$content .="<tr>
<td bgcolor='#3d3d3d' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' align=center><font color=#FFFFFF>$rank.</font></td>
<td bgcolor='#3d3d3d' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' align=center><font color=#FFFFFF>$row[0]</font></td>
<td bgcolor='#3d3d3d' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' align=center><font color=#FFFFFF>$row[1]</font></td>
<td bgcolor='#3d3d3d' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' align=center><font color=#FFFFFF>$row[2]</font></td>
<td bgcolor='#3d3d3d' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' align=center><font color=#FFFFFF>$row[3]</font></td>
<td bgcolor='#3d3d3d' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' align=center><font color=#FFFFFF>$row[4]</font></td>
<td bgcolor='#3d3d3d' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' align=center><font color=#FFFFFF>$row[5]</font></td>
</tr>";
}
show($content);
?>
</table>