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

$aWeaponsAssault = array(
              //assault
             "wahUGL" => 11000,
             "arM416" => 22000,
             "wahUSG" => 38000,
             "arAEK" => 60000,
             "arM16A4" => 89000,
             "arF2" => 124000,
             "arKH" => 17000,
             "arAN94" => 166000,
             "arM16A3" => 220000,
             "arAK74A" => 220000,
             "arG3" => 160000);
?>
 <ul id="unlocktabs" class="shadetabs" style="margin-top:10px;">
        <li><a href="#" rel="#default" class="selected"><?php echo LANG_WEAPONS_ASSAULT; ?></a></li> 
        <li><a href="module/support.php?name=<?php echo rawurlencode($data['soldiername']); ?>" rel="classcontainer"><?php echo LANG_WEAPONS_SUPPORT; ?></a></li>
        <li><a href="module/engineer.php?name=<?php echo rawurlencode($data['soldiername']); ?>" rel="classcontainer"><?php echo LANG_WEAPONS_ENGINEER; ?></a></li>
        <li><a href="module/recon.php?name=<?php echo rawurlencode($data['soldiername']); ?>" rel="classcontainer"><?php echo LANG_WEAPONS_RECON; ?></a></li>
        <li><a href="module/all.php?name=<?php echo rawurlencode($data['soldiername']); ?>" rel="classcontainer"><?php echo LANG_WEAPONS_ALL; ?></a></li>
       </ul>

       <div id="unlockcontainer" style="width:814px; margin-top:-17px; padding: 7px">
<table class="default" cellspacing="0" cellpadding="5">
 <thead>
  <td class="head" colspan="10" cellspacing="0"> <?php echo LANG_GENERAL_UNLOCKS_TITLE; ?></td>
	  <tr>
	  	<td class="result" width="200px" height="200px" rowspan="2" style="border-right:<?php echo $style['result_border']; ?>">
	  		<img src="<?php echo $domain; ?>/img/fav/class/weapons/assault.png" />
	  	</td>
<?php  
         $i = 0;
         $ii = 0;
         foreach($aWeaponsAssault as $key => $unlocks){
         	
         	if ($key == "arKH" OR $key == "arG3"){
         		$points = $data['coop_score'];
         		$name = LANG_GENERAL_UNLOCKS_COOP_POINTS;
         	}else{
         		$name = LANG_GENERAL_UNLOCKS_ASSAULT_POINTS;
         		$points = $data['assault'];
         	}
         	
         	$weaponsName = 'LANG_WEAPONS_'.$key;
	  	    $weaponsTEXT = 'LANG_WEAPONS_TEXT_'.$key;
         	
         	if ($unlocks <= $points){
         		$progress = "";	
         		$img = '<img src="'.$domain.'/img/weapons/'.$key.'.png" width="80px" />';
         		$need = "";
         	}else{
         		$progress = $points*100/$unlocks;
         		$progress = '<div class="progress_small" style="width:90px;">
	 		  <div class="progress_size_small" style="width:'.$progress.'%;max-width:89px;">&nbsp;</div>
	 		 </div>';
	 		      $img = '<img src="'.$domain.'/img/weapons/transparent/'.$key.'.png" width="80px" />';
	 		      $need = $points.'/'.$unlocks.$name;
	 		      
	 		}
         	
	     ?>
         <td class="result" width="100px" rowspan="1" height="100px">
         	 <a class="tooltip"><?php echo $img; ?>
         	 	<span style="margin-top:10px;margin-left:-60px;width:250px;">
         	 	  <div style="text-align:center;width:120px;"><b><?php echo constant($weaponsName); ?></b></div><br />
	  			     <div style="float:left;"><img src="<?php echo $domain; ?>/img/weapons/<?php echo $key; ?>.png" width="120px"/></div><div style="text-align:left;"><?php echo constant($weaponsTEXT); ?></div>
	  			    <div class="DIVtext"><?php echo $need; ?></div>
	  			  </span>
	  			 </a> 
         	<br/><?php echo $progress; ?>
         	</td>
        <?php  
        if (++$ii == 6 ) echo'<tr />';
        } ?>	
       <td class="result" width="100px" rowspan="1"></td>
 	</table>
</div>

      
<script type="text/javascript">
var countries=new ddajaxtabs("unlocktabs", "unlockcontainer")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()
</script>