<?php
/*======================================================================*\
|| #################################################################### ||
|| # eGamers of Tomorrow Battlefield 3 Leaderboard                    # ||
|| # ---------------------------------------------------------------- # ||
|| # Dieses Copyright darf nicht entfernt werden                      # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------Teil des Bf3 Leaderboards von EoT-----------------# ||
|| #                      http://eot-clan.net                         # ||
|| #################################################################### ||
\*======================================================================*/
      if(!defined('DIRECTACCESS')){
echo 'You cannot access this file directly!';
die;
}   
   
 
$needvehiclesh = array("attackheliflares" => "400","attackhelisidewinders" => "1200","attackhelistealth" => "2500","scoutweaponefficiency" => "4400", "attackheliproximity" => "7000", "attackheliradar" => "10000", "attackheliextinguisher" => "14000", "scoutpreventive" => "19000", "attackhelihellfire" => "25000","attackhelibelowradar" => "32000", "attackhelilaser" => "40000", "scoutecm" => "48000");
$needvehiclejet = array("jetflares" => "300","jetsidewinder" => "700", "jetstealth" => "1500", "jetweaponefficiency" => "2700", "jetproximity" => "4200", "rocketpod" => "6200", "jetradar" => "8600", "jetextinguisher" => "11600", "jetbelowradar" => "15000", "jetpreventive" => "19000", "jetmaverik" => "24000", "jetavionics" => "29000", "jetecm" => "35000");
$neddvehicleifv = array("ifvsmoke" => "800", "ifvtow" => "2300", "ifvweaponefficiency" => "4700", "ifvcoax" => "8300", "ifvenvg" => "13100", "ifvproximity" => "19200", "ifvzoom" => "26900", "ifvpreventive" => "36000", "ifvapfsds-t" => "47000", "ifvstealth" => "60000", "ifvhellfire" => "74000", "ifvarmor" => "90000");
$needvehicleah = array("attackheliflares" => "300", "attackhelisidewinders" => "800", "attackhelistealth" => "1600", "attackheliweaponefficiency" => "2800", "attackhelizoom" => "4400", "attackheliproximity" => "6500", "attackheliradar" => "9000", "attackhelihellfire" => "12000", "attackheliextinguisher" => "16000", "attackhelipreventive" => "20000", "attackhelienvg" => "25000", "attackhelilaser" => "30500", "attackhelibelowradar" => "37000", "attackheliecm" => "44000", "attackhelirocketguide" => "51000", "attackhelitvg" => "60000");
$needvehiclembt = array("mbtsmoke" => "800", "mbtcoax" => "2100", "mbtweaponeff" => "4400", "mbtzoom" => "7600", "mbtpreventive" => "12000", "mbthmg" => "17700", "mbtproximity" => "24700", "mbtatgm" => "33200", "ifvenvg" => "43200", "mbtstealth" => "54800", "mbtcanister" => "68100", "mbtarmor" => "83200", "mbtcitv" => "100000");
$needvehicleaa =array("aasmoke" => "400", "aastinger" => "1200", "aaweaponefficiency" => "2500", "aazoom" => "4400", "aaproximity" => "7000", "aaenvg" => "10000", "aaradar" => "14000", "aapreventive" => "19000", "aastealth" => "25000", "aaarmor" => "32000");  
 

?>
<tr>
	<div  style="width:100%;height:1010px;">
<div style="float:right;height:1019px;">
	<table class="default" style="float: right; width: 455px;height:996px; margin-right: 10px;" cellspacing="0" cellpadding="5">
    <td class="head" colspan="10" cellspacing="0"><?php echo LANG_VEHICLES_TITLE2; ?></td>
   <tr>
    <td class="object" colspan="6">Air Helicopter Scout <b><?php echo LANG_VEHICLES_POINTS.$data['vehiclesh']; ?></b></td>
   <tr>
   	<?php 
   	$i = 0;
  $iLine = 0;
  foreach ($needvehiclesh as $key => $need){
	   $i++;
	   
   	$Specconstante = 'LANG_VEHICLES_UNLOCKS_TEXT_SCOUT'.$i.'';
   
   	
   	if ($data['vehiclesh'] >= $need){
	    $img = "<img src='img/vehicles/unlocks/small/".$key.".png' />";
	    $progress = "";
	    $needed = "";
	  }else{
	  	$img = "<img src='img/vehicles/unlocks/small/transparent/".$key.".png' />";
	  	$progress = $data['vehiclesh']*100/$need;
	  	$progress = '<br /><div class="progress_small" style="width:50px;">
	 		  <div class="progress_size_small" style="width:'.$progress.'%;max-width:49px;">&nbsp;</div>
	 		 </div>'; 
	 		$needed = '<div class="DIVtext">'.$data['vehiclesh'].'/'.$need.'</div>';
	 	}
	 	
	  ?>
	   <td class="result">
     	 <a class="tooltip" href="#">
     	 	 <?php echo $img.$progress; ?>
     	  <span style="margin-top:20px;margin-left:-96px;"><img src="img/vehicles/unlocks/<?php echo $key; ?>.png" width="80px" /><br /><?php echo constant($Specconstante); ?><br /><?php echo $needed; ?></span></a>
     	</td>

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

  
  
  <tr>	
    <td class="object" colspan="6">Air Jet Attackt <b><?php echo LANG_VEHICLES_POINTS.$data['vehiclejet']; ?></b></td>
   <tr>
   	<?php 
   	$i = 0;
  $iLine = 0;
  $ILine = 0;
  foreach ($needvehiclejet as $key => $need){
	   $i++;
	   
   	$Specconstante = 'LANG_VEHICLES_UNLOCKS_TEXT_ATTACK'.$i.'';
   	
   	if ($data['vehiclejet'] >= $need){
	    $img = "<img src='img/vehicles/unlocks/small/".$key.".png' />";
	    $progress = "<br />";
	    $needed = "";
	  }else{
	  	$img = "<img src='img/vehicles/unlocks/small/transparent/".$key.".png' />";
	  	$progress =  $data['vehiclejet']*100/$need;
	  	$progress = '<br /><div class="progress_small" style="width:60px;">
	 		  <div class="progress_size_small" style="width:'.$progress.'%;max-width:59px;">&nbsp;</div>
	 		 </div>';
	 		$needed = '<div class="DIVtext">'.$data['vehiclejet'].'/'.$need.'</div>';
	 	}
	 	
	  ?>
	   <td class="result">
     	 <a class="tooltip" href="#">
     	 	 <?php echo $img.$progress; ?>
     	  <span style="margin-top:20px;margin-left:-96px;"><img src="img/vehicles/unlocks/<?php echo $key; ?>.png" width="80px" /><br /><?php echo constant($Specconstante); ?><br /><?php echo $needed; ?></span></a>
     	</td>

    <?php if(++$iLine == 6)echo'<tr />'; 
          if(++$ILine == 12)echo'<tr />';
    } ?> 
  <td class="result"></td>
   <td class="result"></td>
    <td class="result"></td>
     <td class="result"></td>
      <td class="result"></td>
  
  
  
  <tr>	 
    <td class="object" colspan="6">Infantry Fighting Vehicle <b><?php echo LANG_VEHICLES_POINTS.$data['vehicleifv']; ?></b></td>
   <tr> 
   		<?php 
   	$i = 0;
  $iLine = 0;
  foreach ($neddvehicleifv as $key => $need){
	   $i++;
	   
   	$Specconstante = 'LANG_VEHICLES_UNLOCKS_TEXT_FIGHTING'.$i.'';
   	
   	if ($data['vehicleifv'] >= $need){
	    $img = "<img src='img/vehicles/unlocks/small/".$key.".png' />";
	    $progress = "";
	    $needed = "";
	  }else{
	  	$img = "<img src='img/vehicles/unlocks/small/transparent/".$key.".png' />";
	  	$progress =  $data['vehicleifv']*100/$need;
	  	$progress = '<br /><div class="progress_small" style="width:60px;">
	 		  <div class="progress_size_small" style="width:'.$progress.'%;max-width:59px;">&nbsp;</div>
	 		 </div>';
	 		$needed = '<div class="DIVtext">'.$data['vehicleifv'].'/'.$need.'</div>';
	 	}
	 	
	  ?>
	   <td class="result">
     	 <a class="tooltip" href="#">
     	 	 <?php echo $img.$progress; ?>
     	  <span style="margin-top:20px;margin-left:-96px;"><img src="img/vehicles/unlocks/<?php echo $key; ?>.png" width="80px" /><br /><?php echo constant($Specconstante); ?><br /><?php echo $needed; ?></span></a>
     	</td>

    <?php if(++$iLine == 6)echo'<tr />';  } ?>  	
 
 
  <tr>	 
    <td class="object" colspan="6">Air Helicopter Attack <b><?php echo LANG_VEHICLES_POINTS.$data['vehicleah']; ?></b></td>
   <tr> 
   	<?php 
   	$i = 0;
  $iLine = 0;
  $ILine = 0;
  foreach ($needvehicleah as $key => $need){
	   $i++;
	   
   	$Specconstante = 'LANG_VEHICLES_UNLOCKS_TEXT_ATTACKH'.$i.'';
   	
   	if ($data['vehicleah'] >= $need){
	    $img = "<img src='img/vehicles/unlocks/small/".$key.".png' />";
	    $progress = "";
	    $needed = "";
	  }else{
	  	$img = "<img src='img/vehicles/unlocks/small/transparent/".$key.".png' />";
	  	$progress =  $data['vehicleah']*100/$need;
	  	$progress = '<br /><div class="progress_small" style="width:60px;">
	 		  <div class="progress_size_small" style="width:'.$progress.'%;max-width:59px;">&nbsp;</div>
	 		 </div>'; 
	 		$needed = '<div class="DIVtext">'.$data['vehicleah'].'/'.$need.'</div>';
	 	}
	 	
	  ?>
	   <td class="result">
     	 <a class="tooltip" href="#">
     	 	 <?php echo $img.$progress; ?>
     	  <span style="margin-top:20px;margin-left:-96px;"><img src="img/vehicles/unlocks/<?php echo $key; ?>.png" width="80px" /><br /><?php echo constant($Specconstante); ?><br /><?php echo $needed; ?></span></a>
     	</td>

    <?php if(++$iLine == 6)echo'<tr />'; 
          if(++$ILine == 12)echo'<tr />';
    } ?>  	
    <td class="result"></td>
     <td class="result"></td>

   	
   <tr>
    <td class="object" colspan="6">Main Battle Tanks <b><?php echo LANG_VEHICLES_POINTS.$data['vehiclembt']; ?></b></td>
   <tr>
   	<?php 
   	$i = 0;
  $iLine = 0;
  $ILine = 0;
  foreach ($needvehiclembt as $key => $need){
	   $i++;
	   
   	$Specconstante = 'LANG_VEHICLES_UNLOCKS_TEXT_TANKS'.$i.'';
   	
   	if ($data['vehiclembt'] >= $need){
	    $img = "<img src='img/vehicles/unlocks/small/".$key.".png' />";
	    $progress = "";
	    $needed = "";
	  }else{
	  	$img = "<img src='img/vehicles/unlocks/small/transparent/".$key.".png' />";
	  	$progress =  $data['vehiclembt']*100/$need;
	  	$progress = '<br /><div class="progress_small" style="width:60px;">
	 		  <div class="progress_size_small" style="width:'.$progress.'%;max-width:59px;">&nbsp;</div>
	 		 </div>'; 
	 		$needed = '<div class="DIVtext">'.$data['vehiclembt'].'/'.$need.'</div>';
	 	}
	 	
	  ?>
	   <td class="result">
     	 <a class="tooltip" href="#">
     	 	 <?php echo $img.$progress; ?>
     	  <span style="margin-top:20px;margin-left:-96px;"><img src="img/vehicles/unlocks/<?php echo $key; ?>.png" width="80px" /><br /><?php echo constant($Specconstante); ?><br /><?php echo $needed; ?></span></a>
     	</td>

    <?php if(++$iLine == 6)echo'<tr />'; 
          if(++$ILine == 12)echo'<tr />';
    } ?>  	
    <td class="result"></td>
     <td class="result"></td> 
      <td class="result"></td>
       <td class="result"></td>
        <td class="result"></td>



  <tr>	 	
    <td class="object" colspan="6">Anti Air <b><?php echo LANG_VEHICLES_POINTS.$data['vehicleaa']; ?></b></td> 
	  <tr>
	  		<?php 
   	$i = 0;
  $iLine = 0;
  foreach ($needvehicleaa as $key => $need){
	   $i++;
	   
   	$Specconstante = 'LANG_VEHICLES_UNLOCKS_TEXT_ANTIAIR'.$i.'';
   	
   	if ($data['vehicleaa'] >= $need){
	    $img = "<img src='img/vehicles/unlocks/small/".$key.".png' />";
	    $progress = "";
	    $needed = "";
	  }else{
	  	$img = "<img src='img/vehicles/unlocks/small/transparent/".$key.".png' />";
	  	$progress =  $data['vehicleaa']*100/$need;
	  	$progress = '<br /><div class="progress_small" style="width:60px;">
	 		  <div class="progress_size_small" style="width:'.$progress.'%;max-width:59px;">&nbsp;</div>
	 		 </div>'; 
	 		$needed = '<div class="DIVtext">'.$data['vehicleaa'].'/'.$need.'</div>';
	 	}
	 	
	  ?>
	   <td class="result">
     	 <a class="tooltip" href="#">
     	 	 <?php echo $img.$progress; ?>
     	  <span style="margin-top:20px;margin-left:-96px;"><img src="img/vehicles/unlocks/<?php echo $key; ?>.png" width="80px" /><br /><?php echo constant($Specconstante); ?><br /><?php echo $needed; ?></span></a>
     	</td>
       <?php if(++$iLine == 6)echo'<tr />';  } ?>  	
       	 <td class="result"></td>
         <td class="result"></td>   
 
	</table>
</div>




 <div style="float:left;height:758px;">
	<table class="default" style="float: left; width: 340px; height: 650px; margin-left: 10px;" cellspacing="0" cellpadding="5">
    <td class="head" colspan="10" cellspacing="0"><?php echo LANG_VEHICLES_TITLE; ?></td>
    <tr>
      <td class="object" width="90px"><?php echo LANG_VEHICLES_VEHICLE; ?></td> 
       <td class="object" width="60px"><?php echo LANG_VEHICLES_KILLS; ?></td>
        <td class="object" width="60px"><?php echo LANG_VEHICLES_TIME; ?></td>
        <td class="object" width="60px"><?php echo LANG_VEHICLES_DESTROY; ?></td>
        <td class="object" width="30px">Unlocks</td>
	  <tr height=20px>
	  	<?php 
	  	$aUnlocks = array(
	  	       "vehiclesh" => "32000",
	  	       "vehicleja" => "35000",
             "vehicleifv" => "90000",  
             "vehicleah" => "37000",
             "vehiclembt" => "100000",
             "vehicleaa" => "32000",
             "vehiclejet" => "35000"
           );
	  	foreach ($aVehicles as $key => $vehicle){
	  	
	  		
	  		
	  		
	  		$aVehiclesh = array("shAH6","shz11");
	  		$aVehicleja = array("jaA10","jaSU25");
	  		$aVehicleifv = array("ifvBMP","ifvLAV","ifvBTR90");
	  		$aVehicleah = array("ahAH1Z","ahMi28");
	  		$aVehiclembt = array("mbtM1A","mbtT90");
	  		$vehicleaa = array("aa9k22","aaLAV");
	  		$vehiclejf = array("jfF18","jfSu35","jfx1F35JSF");
	  		
	  		 if (in_array($key,$aVehiclesh)){
	  		 	$id = "vehiclesh";
	  		 	$class = '<div style="margin-left:3px;margin-top:-3px;position:absolute;font-size:11px"><img src="img/vehicles/class/Mp_Vehicle_SH_Kills_SH.png" title="Air Helicopter Scout"/></div>';
	  		}else if (in_array($key,$aVehicleja)){
	  			$id = "vehiclejet";
	  		 	$class = '<div style="margin-left:3px;margin-top:-3px;position:absolute;font-size:11px"><img src="img/vehicles/class/Mp_Vehicle_Jet_Kills_Jet.png" title="Air Jet Attack"/></div>';
	  		}else if (in_array($key,$aVehicleifv)){
	  			$id = "vehicleifv";
	  		 	$class = '<div style="margin-left:3px;margin-top:-3px;position:absolute;font-size:11px"><img src="img/vehicles/class/Mp_Vehicle_IFV_Kills_IFV.png" title="Infantry Fighting Vehicle"/></div>';
	  		}else if (in_array($key,$aVehicleah)){
	  			$id = "vehicleah";
	  		 	$class = '<div style="margin-left:3px;margin-top:-3px;position:absolute;font-size:11px"><img src="img/vehicles/class/Mp_Vehicle_AH_Kills_AH.png" title="Air Helicopter Attack"/></div>';
	  		}else if (in_array($key,$aVehiclembt)){
	  			$id = "vehiclembt";
	  		 	$class = '<div style="margin-left:3px;margin-top:-3px;position:absolute;font-size:11px"><img src="img/vehicles/class/Mp_Vehicle_MBT_Kills_MBT.png" title="Main Battle Tanks"/></div>';
	  		}else if (in_array($key,$vehicleaa)){
	  			$id = "vehicleaa";
	  		 	$class = '<div style="margin-left:3px;margin-top:-3px;position:absolute;font-size:11px"><img src="img/vehicles/class/Mp_Vehicle_AA_Kills_AA.png" title="Anti Air"/></div>';
	  		}else if (in_array($key,$vehiclejf)){
	  			$id = "vehiclejet";
	  		 	$class = '<div style="margin-left:3px;margin-top:-3px;position:absolute;font-size:11px"><img src="img/vehicles/class/Mp_Vehicle_Jet_Kills_Jet.png" title="Air Jet Fighter"/></div>';	
	  		}else{
	  			$id = "";
	  			$class = '<div style="margin-left:3px;margin-top:-3px;position:absolute;font-size:11px"><img src="img/vehicles/class/all.png" title="All other"/></div>';
	  		}
	  		
	  		  $B2K = array("trSkid","trDpv","ifvBTR90","jfx1F35JSF");
	  $b2k = "";
	  if (in_array($key,$B2K)){
	  	$b2k = '<img src="img/b2k.png" style="position:absolute;margin-left:10px;" />';
	  }		  		  		
	  		  		
	  	$vehiclesName = "LANG_VEHICLES_".$key."";
	  	$vehiclesText = 'LANG_VEHICLES_TEXT_'.$key.'';
	  	
	  	 	if (array_key_exists($id,$aUnlocks)){	
	  		  	$unlocks = 	number_format($data[$id]*100/$aUnlocks[$id], 2, ',', ' ').'%';
	  		  	  if ($data[$id] >= $aUnlocks[$id]){
	  		  		  $unlocks = "100%";
	  		  	  }else{
	  		  		  $unlocks = $unlocks;
	  		  	 }
	  		  }else{
	  		  	$unlocks = "--";
	  		  }
	  		  
	  		?>
	  	<td class="result" width="90px"><?php echo $class; ?><a class="tooltip" href="#">
	  		<div style="text-align:left;width:70px;margin-left:22px;"><b><?php echo $EoT->vName(constant($vehiclesName)).$b2k; ?></b></div>
	  		<span style="margin-top:-55px;margin-left:130px;width:250px;">
	  			<div style="text-align:center;width:120px;"><b><?php echo constant($vehiclesName); ?></b></div>
	  			<div style="float:left;"><img src="img/vehicles/<?php echo $key; ?>.png" width="120px"/></div><div style="text-align:left;"><?php echo constant($vehiclesText); ?></div></span></a></td>	
	  	<td class="result" width="60px"><?php echo $EoT->points($data[$key.'_kills']); ?></td>
	    <td class="result" width="60px"><?php echo $EoT->time_complete($data[$key.'_time']); ?></td>
	    <td class="result" width="60px"><?php echo $EoT->points($data[$key.'_destroys']); ?></td>
	    <td class="result" width="30px"><?php echo $unlocks; ?></td>
	  
	  <tr>
	  <?php 
	  }  
	  ?>
	</table>
</div>
	
	
	
	<?php 
	 $needRank = array (
      "sprint" => "2",
      "ammo" => "5",
      "explresist" => "8",
      "explosives" => "11",
      "supprresist" => "14",
      "suppression" => "17",
      "grenades" => "20",
      "sprint2" => "23",
      "ammo2" => "26",
      "explresist2" => "29",
      "explosives2" => "31",
      "suppression2" => "33",
      "supprresist2" => "35", 
      "grenades2" => "37"
     );
    ?>	


<div style="float:left;">
<table class="default" cellspacing="0" cellpadding="5" style="width:340px;margin-left:10px;height:240px">
       <td class="head" colspan="10" cellspacing="0"> <?php echo LANG_SPECIALIZATIONS_TITLE; ?></td>
      <tr>
   <?php


  $i = 0;
  $iLine = 0;
  $ILine = 0;
  $IILine = 0;

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

    <?php
       if(++$iLine == 4)echo'<tr />';
       if(++$ILine == 8)echo'<tr />';
       if(++$IILine == 12)echo'<tr />';
  }

       ?>
        <td class="result"></td>
         <td class="result"></td>
     </table>
    </div>
  </div>