<?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;
}

$equipmentAr  = array("seqRad" => "recon" ,"waeM67" => "all","wasDef" => "assault","waeC4" => "support","seqUGS" => "recon","waeMine" => "engineer" ,"waeClay" => "support" ,"seqEOD" => "engineer" ,"seqSOF" => "recon","waeMort" => "support" ,"seqMAV" => "recon","wasRT" => "engineer");

?>
<table class="default" cellspacing="0" cellpadding="5">
 <thead>
  <td class="head" colspan="10" cellspacing="0"><?php echo LANG_EQUIPMENT_TITLE; ?></td>
	  <tr> 
	  	<?php 
	  	$i = 0;
	  	$ii = 0;
	  	$iii = 0;
	  	foreach ($equipmentAr as $key => $equipment){
	  		$name = 'LANG_EQUIPMENT_'.$key;
	  		if ($key == "waeM67" OR $key == "wasDef" OR $key == "waeC4" OR $key == "waeMine" OR $key == "waeClay" OR $key == "waeMort" OR $key == "wasRT"){
	  			$Line = '
	  			<div style="float:left;margin-left:5px;">'.LANG_EQUIPMENT_KILLS.'</div>
	  			<div style="float:right;margin-right:5px;">'.$EoT->points($data[$key.'_kills']).'</div><br />
	  			<div style="float:left;margin-left:5px;">'.LANG_EQUIPMENT_SHOTS.'</div>
	  			<div style="float:right;margin-right:5px;">'.$EoT->points($data[$key.'_shots']).'</div><br />
	  			<div style="float:left;margin-left:5px;">'.LANG_EQUIPMENT_HITS.'</div>
	  			<div style="float:right;margin-right:5px;">'.$EoT->points($data[$key.'_hits']).'</div><br />';
	  		}else{
	  			$Line ="";
	  		}
	  		
	  		if ($key == "wasDef"){
	  			$Line2 = '<div style="float:left;margin-left:5px;">'.LANG_EQUIPMENT_REVIVES.'</div>
	  			<div style="float:right;margin-right:5px;">'.$EoT->points($data[$key.'_revives']).'</div><br />';
	  			}else{
	  			$Line2 ="";
	  		}
	  		
	  		if ($key == "seqEOD" OR $key == "seqSOF"){
	  			$Line3 = '
	  			<div style="float:left;margin-left:5px;">'.LANG_EQUIPMENT_KILLS.'</div>
	  			<div style="float:right;margin-right:5px;">'.$EoT->points($data[$key.'_kills']).'</div><br />';
	  			}else{
	  			$Line3 ="";
	  		}
	  		
	  		if ($key == "seqMAV"){
	  			$Line4 = '
	  			<div style="float:left;margin-left:5px;">'.LANG_EQUIPMENT_KILLS.'</div>
	  			<div style="float:right;margin-right:5px;">'.$EoT->points($data[$key.'_kills']).'</div><br />
	  			<div style="float:left;margin-left:5px;">'.LANG_EQUIPMENT_SPOT.'</div>
	  			<div style="float:right;margin-right:5px;">'.$EoT->points($data[$key.'_spots']).'</div><br />';
	  			}else{
	  			$Line4 ="";
	  		}
	  		
	  		if ($key == "seqRad"){
	  			$Line5 = '
	  			<div style="float:left;margin-left:5px;">'.LANG_EQUIPMENT_KILLS.'</div>
	  			<div style="float:right;margin-right:5px;">'.$EoT->points($data[$key.'_kills']).'</div><br />
	  			<div style="float:left;margin-left:5px;">'.LANG_EQUIPMENT_SPAWNS.'</div>
	  			<div style="float:right;margin-right:5px;">'.$EoT->points($data[$key.'_spawns']).'</div><br />';
	  			}else{
	  			$Line5 ="";
	  		}
	  		
	  		if ($key == "seqUGS"){
	  			$Line6 = '
	  			<div style="float:left;margin-left:5px;">'.LANG_EQUIPMENT_SPOT.'</div>
	  			<div style="float:right;margin-right:5px;">'.$EoT->points($data[$key.'_spots']).'</div><br />';
	  			}else{
	  			$Line6 ="";
	  		}
	  		
	  		
	  		
	  if ($key == "wasDef" && $data['assault'] < 4000){
	  			$img = '<img src="img/kititems/transparent/'.$key.'.png" width="90px" />';
	  			$progress =  $data['assault']*100/4000;
	  			$progress = '<br /><br /><div class="progress_small" style="width:60px;margin-bottom:5px;margin-left:15px;"><div class="progress_size_small" style="width:'.$progress.'%;max-width:59px;">&nbsp;</div></div>';
	  		  $needed = '<div style="margin-top:0px;margin-right:80px" class="DIVtext">'.$data['assault'].'/4000</div>';
	  		} elseif ($key == "waeC4" && $data['support'] < 4000){
	  			$img = '<img src="img/kititems/transparent/'.$key.'.png" width="90px" />';
	  			$progress =  $data['support']*100/4000;
	  			$progress = '<br /><br /><div class="progress_small" style="width:60px;margin-bottom:5px;margin-left:15px;"><div class="progress_size_small" style="width:'.$progress.'%;max-width:59px;">&nbsp;</div></div>';
	  	    $needed =  '<div style="margin-top:10px;margin-right:80px" class="DIVtext">'.$data['support'].'/4000</div>';
	  	  } elseif ($key == "seqUGS" && $data['recon'] < 5000){
	  			$img = '<img src="img/kititems/transparent/'.$key.'.png" width="90px" />';
	  			$progress =  $data['recon']*100/5000;
	  			$progress = '<br /><br /><div class="progress_small" style="width:60px;margin-bottom:5px;margin-left:15px;"><div class="progress_size_small" style="width:'.$progress.'%;max-width:59px;">&nbsp;</div></div>';
	  		  $needed =  '<div style="margin-top:35px;margin-right:100px" class="DIVtext">'.$data['recon'].'/5000</div>';
	  		} elseif ($key == "waeMine" && $data['engineer'] < 7000){
	  			$img = '<img src="img/kititems/transparent/'.$key.'.png" width="90px" />';
	  			$progress =  $data['engineer']*100/7000;
	  			$progress = '<br /><br /><div class="progress_small" style="width:60px;margin-bottom:5px;margin-left:15px;"><div class="progress_size_small" style="width:'.$progress.'%;max-width:59px;">&nbsp;</div></div>';
	  	    $needed =  '<div style="margin-top:10px;margin-right:80px" class="DIVtext">'.$data['engineer'].'/7000</div>';
	  	  } elseif ($key == "waeClay" && $data['support'] < 18000){
	  			$img = '<img src="img/kititems/transparent/'.$key.'.png" width="90px" />';
	  			$progress =  $data['support']*100/18000;
	  			$progress = '<br /><br /><div class="progress_small" style="width:60px;margin-bottom:5px;margin-left:15px;"><div class="progress_size_small" style="width:'.$progress.'%;max-width:59px;">&nbsp;</div></div>';
	  		  $needed =  '<div style="margin-top:10px;margin-right:80px" class="DIVtext">'.$data['support'].'/18000</div>';
	  		} elseif ($key == "seqEOD" && $data['engineer'] < 25000){
	  			$img = '<img src="img/kititems/transparent/'.$key.'.png" width="90px" />';
	  			$progress =  $data['engineer']*100/25000;
	  			$progress = '<br /><br /><div class="progress_small" style="width:60px;margin-bottom:5px;margin-left:15px;"><div class="progress_size_small" style="width:'.$progress.'%;max-width:59px;">&nbsp;</div></div>';
	  	    $needed =  '<div style="margin-top:35px;margin-right:80px" class="DIVtext">'.$data['engineer'].'/25000</div>';
	  	  } elseif ($key == "seqSOF" && $data['recon'] < 26000){
	  			$img = '<img src="img/kititems/transparent/'.$key.'.png" width="90px" />';
	  			$progress =  $data['recon']*100/26000;
	  			$progress = '<br /><br /><div class="progress_small" style="width:60px;margin-bottom:5px;margin-left:15px;"><div class="progress_size_small" style="width:'.$progress.'%;max-width:59px;">&nbsp;</div></div>';
	  	    $needed = '<div style="margin-top:35px;margin-right:80px" class="DIVtext">'.$data['recon'].'/26000</div>';
	  	  } elseif ($key == "waeMort" && $data['support'] < 40000){
	  			$img = '<img src="img/kititems/transparent/'.$key.'.png" width="90px" />';
	  			$progress =  $data['support']*100/40000;
	  			$progress = '<br /><br /><div class="progress_small" style="width:60px;margin-bottom:5px;margin-left:15px;"><div class="progress_size_small" style="width:'.$progress.'%;max-width:59px;">&nbsp;</div></div>';
	  	    $needed =  '<div style="margin-top:10px;margin-right:80px" class="DIVtext">'.$data['support'].'/40000</div>';
	  	  } elseif ($key == "seqMAV" && $data['recon'] < 45000){
	  			$img = '<img src="img/kititems/transparent/'.$key.'.png" width="90px" />';
	  			$progress =  $data['recon']*100/45000;
	  			$progress = '<br /><br /><div class="progress_small" style="width:60px;margin-bottom:5px;margin-left:15px;"><div class="progress_size_small" style="width:'.$progress.'%;max-width:59px;">&nbsp;</div></div>';
	  	    $needed =  '<div style="margin-top:23px;margin-right:80px" class="DIVtext">'.$data['recon'].'/45000</div>';
	  	}else{  			
	  			$img = '<img src="img/kititems/'.$key.'.png" width="90px" />';
	  			$progress =  "";
	  			$needed = "";
	  }
	  		
	  		$text = 'LANG_EQUIPMENT_TEXT_'.$key;
	  		  		
	  		?>	
	  		<td>
   <div class="bgDIV" style="width:260px;height:110px;float:left;"><img src="img/weapons/class/<?php echo $equipment;  ?>.png" style="float:left;postition:absolute;margin-left:10px;"/><?php echo constant($name); ?><p style="border-bottom:1px solid <?php echo $style['table_border_color']; ?>;">
   
   		 <div style="float:left;"><a class="tooltip" href="#"><?php echo $img.$progress; ?><span style="margin-top:15px;margin-left:-50px;width:320px;"><div style="float:left;"><img src="img/kititems/<?php echo $key; ?>.png" width="140px" /></div><?php echo constant($text); ?></span></a></div>
   		<div style="float:left;margin-left:5px;"><?php echo  LANG_EQUIPMENT_TIME; ?></div>
   			<div style="float:right;margin-right:5px;"><?php echo $EoT->time_complete($data[$key.'_time']); ?></div><br />
        <?php echo  $Line.$Line2.$Line3.$Line4.$Line5.$Line6.$needed; ?>
  </td>
   	
	<?php 
	  if (++$i == 3){ echo "<tr />";}
	  if (++$ii == 6){ echo "<tr />";}
	  if (++$iii == 9){ echo "<tr />";}
	  } 
	?>		
			</div>
	   </td> 
 	</table>


      