<?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;
}
?>
<table class="default" cellspacing="0" cellpadding="5">
  <td class="head" colspan="10" cellspacing="0"> <?php echo LANG_RANKPROGRESS_RANK; ?></td>
	  <tr> 

<td class="result">
	
	
	  <div style="float:left;"><a class="tooltip" href="#"><img src="img/rank/big/P0<?php echo $data['rank']; ?>.png" style="width:60px;float:left;"/><span style="margin-top:-25px;margin-left:-70px;width:80px;"><b><?php echo $EoT->rankname($data['rank']); ?></b></span></a></div>
		<?php
				if ($data['rank'] < 145 && $data['nextrank'] > 0){
					?>
	          <div style="float:right"><a class="tooltip" href="#"><img src="img/rank/big/P0<?php echo ($data['rank']+1); ?>.png" style="width:60px;float:right;"/><span style="margin-top:-25px;margin-left:-15px;width:80px;"><b><?php echo $EoT->rankname($data['rank']+1); ?></b></span></a></div>
	  <?php 
	    }else{
	    	?>
	    	<div style="float:right;"><a class="tooltip" href="#"><img src="img/rank/big/P0<?php echo $data['rank']; ?>.png" style="width:60px;float:left;"/><span style="margin-top:-25px;margin-left:-70px;width:80px;"><b><?php echo $EoT->rankname($data['rank']); ?></b></span></a></div>
		<?php }
	    	
				if ($data['rank'] < 145 && $data['nextrank'] > 0){
					 $a = $data['nextrank'] - $data['rankscore'];
					 $b = $data['nextrank'] - $data['points'];
					 $points = $a-$b;
           $progress = number_format($points * 100 / $a, 2, '.', '');
        }else{
        	$b = '0';
        	$progress = '100';  
      }
      
      if ($data['rank'] < 145 && $data['nextrank'] > 0){
      ?>
      <div style="margin-top:25px;margin-left:31px;float:left;font-weight:bold;font-size:12px;"><?php echo $EoT->points($data['rankscore']); ?></div>
        <div style="margin-top:25px;margin-right:45px;float:right;font-weight:bold;font-size:12px;"><?php echo $EoT->points($data['nextrank']); ?></div>
      <?php } ?>	
				 <div class="progress_big" style="margin-left:90px;width:605px;margin-top:40px;">
									        <div class="progress_size_big" style="width:<?php echo $progress; ?>%">&nbsp;</div>
									        <div style="margin-left:<?php echo $progress; ?>%;font-size:12px;width:100%">|<?php echo $EoT->points($b); ?></div>
					
			</div>
	   </td> 
 	</table>


      