<?php
/*======================================================================*\
|| #################################################################### ||
|| # EoT-Clan BF3 Leaderboard                                         # ||
|| # ---------------------------------------------------------------- # ||
|| # Dieses Copyright darf nicht entfernet werden                     # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # -----------------BF3 Leaderboard is a free Software--------------# ||
|| #                   http://eot-clan.net                            # ||
|| #################################################################### ||
\*======================================================================*/
if(!defined('DIRECTACCESS')){
echo 'You cannot access this file directly!';
die;
}

    $needRank = array (
      "sprint" => "2",
      "ammo" => "5",
      "explresist" => "8",
      "explosives" => "11",
      "supprresist" => "14",
      "suppression" => "17",
      "grenades" => "20",
      "sprint2" => "23",
      "ammo2" => "26",
      "explresist2" => "29",
      "explosives2" => "31",
      "supprresist2" => "33",
      "suppression2" => "35",
      "grenades2" => "37"
     );

    ?>
     <table class="default" cellspacing="0" cellpadding="5">
       <td class="head" colspan="10" cellspacing="0"> <?php echo LANG_SPECIALIZATIONS_TITLE; ?></td>
      <tr>
   <?php


  $i = 0;
  $iLine = 0;

  foreach ($needRank as $key => $needrank){
	   $i++;
	   $Specconstante = 'LANG_SPECIALIZATIONS_TEXT'.$i.'';
	   
	   if ($data['rank'] >= $needrank){
	    $img = "<img src='img/specializations/".$key.".png' width='80px' />";
	    $progress = "";
	  }else{
	  	$img = "<img src='img/specializations/transparent/".$key.".png' width='80px' />";
	  	$progress = $data['rank']*100/$needrank;
	  	$progress = '<br /><div class="progress_small">
	 		  <div class="progress_size_small" style="width:'.$progress.'%">&nbsp;</div>
	 		 </div>';
	  }
	  
	  ?>	
     <td class="result">
     	 <a class="tooltip" href="#">
     	 	 <?php echo $img.$progress; ?>
     	  <span style="margin-top:50px;margin-left:-155px;"><img src="img/specializations/<?php echo $key; ?>.png" width="80px" /><br /><?php echo constant($Specconstante); ?>
     	
     	</td>

    <?php
       if(++$iLine == 7)echo'<tr />';
  }

       ?>
     </table>
