<HTML>
 <HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<style type="text/css">
<!--
.unnamed1 {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px}
a:hover {  color: #FFCC33}
a:link {  text-decoration: none}
a:visited {  text-decoration: none}
-->
</style>
<link rel="stylesheet" type="text/css" href="style.css" />
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</HEAD>
 <BODY>
<?


require ('.../config.php');
$dir = dir($dirplayer);
$topn = $top;
$n = 0;
$r = 1;
$gms = 0;
while (false !== ($nomes = $dir->read())){
if (eregi(".xml$",$nomes)){
   $arquivo = "$dirplayer/$nomes";
   $leitura = fopen($arquivo, "r");
   $cont = fread($leitura, filesize($arquivo));
   $procurar = explode('"',$cont);
   $expnome = explode('.',$nomes);
   $level = $procurar[15];
   $exp = $procurar[11];
   $nome = $expnome[0];
   $gm = explode(" ", $nome);
   if ($gm[0] == 'GM' || $gm[0] == 'Gm' ||  $gm[0] == 'Azz ' ||  $gm[0] == 'Killavus' ||  $gm[0] == 'GM Yeebak' ||  $gm[0] == 'Jampa' ||  $gm[0] == 'Voru the Great' || $gm[0] == 'gM' || $gm[0] == 'gm' || $gm[0] == 'Royal' || $gm[0] == 'Elite' || $gm[0] == 'Elder' || $gm[0] == 'Master'){
   $gms += 1;
   }
   else
   {
   $c[$n] = $exp." - ".$level." - ".$nome;
   $n++;
   }
   }
   }
   $top = $n;
   if ($n > 100){
   $top = 100;
   }
   rSort ($c,1);
   echo '<body bgcolor=#333333 leftMargin=0 topMargin=0 rightMargin=0 marginwidth=0 marginheight=0>';
   echo "<h2><br><font size=5 face=verdana color=#9F9F9F><div align=center>Top $topn Doswiadczenia</div></font></h2><br>";
   echo "<TABLE cellSpacing=1 cellPadding=4 width=70% border=0 align=center>
                    <TR bgColor=#333333>
                      <TD class=whites width=10%><B><font size=2 face=verdana color=#FFCC00>Ranking</font></B></TD>
                      <TD class=whites width=55%><B><font size=2 face=verdana color=#FFCC00>Nazwa</font></B></TD>
                      <TD class=whites width=15%><B><font size=2 face=verdana color=#FFCC00>Poziom</font></B></TD>
                      <TD class=whites width=20%><B><font size=2 face=verdana color=#FFCC00>Doswiadczenie</font></B></TD></TR>";

   if ($n > $topn){
   $n = $topn;
   }
   $r = 1;
   $n -= 1;
   $h = $n;
   $n = 0;

   while ($n <= $h){
   $separa = explode("-",$c[$n]);
   $lvls = $separa[1];
   $exps = $separa[0];
   $nomec = $separa[2];
   if ($n > $h){}
   else
   {
   echo "<TR bgColor=#444444>
                      <TD width=10%><font size=2 face=verdana color=#FFFFFF>$r</font></TD>
                      <TD width=55%><font size=2 face=verdana color=#FFFFFF size=3><b>$nomec</b></font><font color=#003399 size=2></TD>
                      <TD width=15%><font size=2 face=verdana color=#FFFFFF>$lvls</font></TD>
                      <TD width=20%><font size=2 face=verdana color=#FFFFFF>$exps</font></TD></TR>";
                      $r += 1;
                      $n += 1;
   }
   if ($n > $h) {}
   else
   {
   $separa = explode("-",$c[$n]);
   $lvls = $separa[1];
   $exps = $separa[0];
   $nomec = $separa[2];
   if ($n >= 0){
   $n += 1;
   
   echo "<TR bgColor=#444444>
                      <TD width=10%><font size=2 face=verdana color=#FFFFFF>$r</font></TD>
                      <TD width=55%><font size=2 face=verdana color=#ffffff size=3><b>$nomec</b></font><font color=#003399 size=2></TD>
                      <TD width=15%><font size=2 face=verdana color=#FFFFFF>$lvls</font></TD>
                      <TD width=20%><font size=2 face=verdana color=#FFFFFF>$exps</font></TD></TR>";
   $r += 1;
   }
   }
   }
 

?>
</BODY>
</HTML>
