<?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                            # ||
|| #################################################################### ||
\*======================================================================*/

require_once ('inc/config.php');
require_once ('language/'.$row['language'].'.php');

$_GET = security::escape($_GET);
$_POST = security::escape($_POST);
 
require_once ('inc/details.query.php');

 if(!isset($_GET["action"]) OR empty($_GET['action'])){
    $action = "";
   }else{
   	$action = htmlentities($_GET["action"]);
  }

	$aWeapons = array(
             "arAK74" => $data['arAK74_kills'],
             "wahUGL" => $data['wahUGL_kills'],
             "arM416" => $data['arM416_kills'],
             "wahUSG" => $data['wahUSG_kills'],
             "arAEK" => $data['arAEK_kills'],
             "arM16" => $data['arM16_kills'],
             "arAN94" => $data['arAN94_kills'],
             "arF2" => $data['arF2_kills'],
             "arG3" => $data['arG3_kills'],
             "arKH" => $data['arKH_kills'],
             "srM40" => $data['srM40_kills'],
             "srM98" => $data['srM98_kills'],
             "srMK11" => $data['srMK11_kills'],
             "srSKS" => $data['srSKS_kills'],
             "srSV98" => $data['srSV98_kills'],
             "srSVD"  => $data['srSVD_kills'],
             "mgM240" => $data['mgM240_kills'],
             "mgM249" => $data['mgM249_kills'],
             "mgM27" => $data['mgM27_kills'],
             "mgM60" => $data['mgM60_kills'],
             "mgPech" => $data['mgPech_kills'],
             "mgRPK" => $data['mgRPK_kills'],
             "mgT88"  => $data['mgT88_kills'],
             "caA91" => $data['caA91_kills'],
             "caAKS" => $data['caAKS_kills'],
             "caG36" => $data['caG36_kills'],
             "caM4" => $data['caM4_kills'],
             "caSCAR" => $data['caSCAR_kills'],
             "caSG553" => $data['caSG553_kills'],
             "srM39" => $data['srM39_kills'],
             "wLAAFIM" => $data['wLAAFIM_kills'],
             "wLAAIGL" => $data['wLAAIGL_kills'],
             "wLATJAV" => $data['wLATJAV_kills'],
             "wLATRPG" => $data['wLATRPG_kills'],
             "wLATSMAW" => $data['wLATSMAW_kills'],
             "pG17S" => $data['pG17S_kills'],
             "pG17" => $data['pG17_kills'],
             "pg18S" => $data['pg18S_kills'],
             "pg18" => $data['pg18_kills'],
             "pM1911L" => $data['pM1911L_kills'],
             "pM1911" => $data['pM1911_kills'],
             "pM1911S" => $data['pM1911S_kills'],
             "pM1911T" => $data['pM1911T_kills'],
             "pM412" => $data['pM412_kills'],
             "pM9F" => $data['pM9F_kills'],
             "pM9S" => $data['pM9S_kills'],
             "pM9" => $data['pM9_kills'],
             "pM93R" => $data['pM93R_kills'],
             "pMP443L" => $data['pMP443L_kills'],
             "pMP443S" => $data['pMP443S_kills'],
             "pMP443" => $data['pMP443_kills'],
             "pTaurS" => $data['pTaurS_kills'],
             "pTaur" => $data['pTaur_kills'],
             "sg870" => $data['sg870_kills'],
             "sgDAO" => $data['sgDAO_kills'],
             "sgM1014" => $data['sgM1014_kills'],
             "sgSaiga" => $data['sgSaiga_kills'],
             "sgUSAS" => $data['sgUSAS_kills'],
             "smMP7" => $data['smMP7_kills'],
             "smP90" => $data['smP90_kills'],
             "smPDR" => $data['smPDR_kills'],
             "smPP2000" => $data['smPP2000_kills'],
             "smUMP" => $data['smUMP_kills'],
             "smVAL" => $data['smVAL_kills'],
             "wasK" => $data['wasK_kills'],            
             "arFAMAS" => $data['arFAMAS_kills'],
             "arL85A2" => $data['arL85A2_kills'],
             "caHK53" => $data['caHK53_kills'],
             "caQBZ95B" => $data['caQBZ95B_kills'],
             "mgQBB95" => $data['mgQBB95_kills'],
             "mgMG36" => $data['mgMG36_kills'],
             "srQBU88" => $data['srQBU88_kills'],
             "srL96" => $data['srL96_kills'],
             "smPP19" => $data['smPP19_kills'],
             "sgJackH" => $data['sgJackH_kills'],
             "arAUG" => $data['arAUG_kills'],
             "arSCARL" => $data['arSCARL_kills'],
             "mgL86A1" => $data['mgL86A1_kills'],
             "mgLSAT" => $data['mgLSAT_kills'],
             "caACR" => $data['caACR_kills'],
             "caMTAR21" => $data['caMTAR21_kills'],
             "srHK417" => $data['srHK417_kills'],
             "srJNG90" => $data['srJNG90_kills'],
             "sgSPAS12" => $data['sgSPAS12_kills'],
             "smM5K" => $data['smM5K_kills']
             );
        arsort($aWeapons);
        
      $aVehicles = array(
             "aa9k22" => $data['aa9k22_time'],
             "aaLAV" => $data['aaLAV_time'],
             "ahAH1Z" => $data['ahAH1Z_time'],
             "ahMi28" => $data['ahMi28_time'],
             "atTOW" => $data['atTOW_time'],
             "ifvBMP" => $data['ifvBMP_time'],
             "ifvLAV" => $data['ifvLAV_time'],
             "jaA10" => $data['jaA10_time'],
             "jaSU25" => $data['jaSU25_time'],
             "jfF18" => $data['jfF18_time'],
             "jfSu35" => $data['jfSu35_time'],
             "mbtM1A" => $data['mbtM1A_time'],
             "mbtT90" => $data['mbtT90_time'],
             "saaCRAM" => $data['saaCRAM_time'],
             "saaPant" => $data['saaPant_time'],
             "shAH6" => $data['shAH6_time'],
             "shz11" => $data['shz11_time'],
             "sKorn" => $data['sKorn_time'],
             "trHum" => $data['trHum_time'],
             "trITV" => $data['trITV_time'],
             "trKA60" => $data['trKA60_time'],
             "trRIB" => $data['trRIB_time'],
             "trUH1" => $data['trUH1_time'],
             "trVDV" => $data['trVDV_time'],
             "trVod" => $data['trVod_time'],
             "trSkid" => $data['trSkid_time'],
             "trDpv" => $data['trDpv_time'],
             "ifvBTR90" => $data['ifvBTR90_time'],
             "jfx1F35JSF" => $data['jfx1F35JSF_time']
             );
            arsort($aVehicles);
             
	
  $EoT = new eGamersofTomorrow;
  
  $tab1 = "";
  $tab2 = "";
  $tab3 = "";
  $tab4 = "";
  $tab5 = "";
  $tab6 = "";
  $tab7 = "";
  
  if ($action == ""){
  	$tab1 = 'class="selected"';
  }else if ($action == "dogtags"){
  	$tab2 = 'class="selected"';
  }else if ($action == "weapons_vehicles"){
  	$tab3 = 'class="selected"';
  }else if ($action == "assignments"){
  	$tab4 = 'class="selected"';
  }else if ($action == "reports"){
  	$tab5 = 'class="selected"';
  }else if ($action == "awards"){
  	$tab6 = 'class="selected"';
  }else if ($action == "coop"){
  	$tab7 = 'class="selected"';
  }
  
	?>
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
          "http://www.w3.org/TR/html4/loose.dtd">
			<head>
					<title>Spielerstats--<?php echo htmlspecialchars($data['soldiername']) ?></title>
					 <?php echo $styleSettings; ?>
				</head>
				<body> 
				<script type="text/javascript" src="js/wz_tooltip.js"></script>
				 <script type="text/javascript" src="js/jquery-1.4.3.min.js"></script>
	          <script type="text/javascript" src="js/jquery.mousewheel-3.0.4.pack.js"></script>
	           <script type="text/javascript" src="js/jquery.fancybox-1.3.4.pack.js"></script>
	            <script type="text/javascript">var url="<?php echo $domain ?>"</script>
	            <script type="text/javascript" src="js/jquery.tablesorter.js"></script>
	          <script type="text/javascript" src="js/ajaxtabs.js"></script>
	        <link rel="stylesheet" type="text/css" href="css/jquery.fancybox-1.3.4.css" media="screen" />		
			</body>
		<div class="body_bfLB">
			<?php echo $Banner; ?>
			<ul id="dogtagstabs" class="shadetabs" style="margin-top:10px;margin-bottom:-10px;">
				<li><a href="index.php">Leaderboard</a></li>
        <li><a href="stats.php?name=<?php echo rawurlencode($data['soldiername']); ?>" <?php echo $tab1; ?>>Details</a></li>
        
        <li><a href="stats.php?name=<?php echo rawurlencode($data['soldiername']); ?>&action=weapons_vehicles" <?php echo $tab3; ?>>Weapons/Vehicles</a></li>
        
        <?php if ($row['ribbons_box'] == 1){ ?>
        <li><a href="stats.php?name=<?php echo rawurlencode($data['soldiername']); ?>&action=awards" <?php echo $tab6; ?>>Awards</a></li>
         <?php } ?>
         
        <?php if ($row['coop_box'] == 1){ ?>
        <li><a href="stats.php?name=<?php echo rawurlencode($data['soldiername']); ?>&action=coop" <?php echo $tab7; ?>>Coop</a></li>
        <?php } ?>
         
        <?php if ($row['assignments'] == 1){ ?> 
        <li><a href="stats.php?name=<?php echo rawurlencode($data['soldiername']); ?>&action=assignments" <?php echo $tab4; ?>><?php echo LANG_GENERAL_ASSIGNMENTS; ?></a></li>
        <?php } ?>
          
        <li><a href="stats.php?name=<?php echo rawurlencode($data['soldiername']); ?>&action=dogtags" <?php echo $tab2; ?>>Dogtags</a></li>
        
        <?php if($row['History'] == 1){ ?>
        <li><a id="bf3stats" href="history.php?pid=<?php echo $data['pid']; ?>" >History</a></li>
        <?php }
        
          if($row['platform'] == "pc"){ ?>
        <li><a href="ServerHistory.php?name=<?php echo rawurlencode($data['soldiername']); ?>" >S.History</a></li>
        <?php }
        
          if($row['battlereports'] == 1){ ?>
        <li><a href="battlereport.php?name=<?php echo rawurlencode($data['soldiername']); ?>" >Reports</a></li>
        <?php } ?>
        
        <li><a href="mapstats.php?name=<?php echo rawurlencode($iPlayer); ?>">Mapstats</a></li>
        
      </ul>
 
        <?php
 
         
        if($action == ""){
        	if ($row['general_box'] == 1){ include ('module/general.php'); }
					if ($row['score_box'] == 1){include ('module/score.php'); }
					if ($row['serviceStars'] == 1){include ('module/servicestars.php'); }
					if ($row['gamemodus_box'] == 1){include ('module/gamemodus.php'); }		
					if ($row['progress_box'] == 1){include ('module/rankprogress.php'); }
				  if ($row['stars_box'] == 1){include ('module/next_sig.php');}
				}	
					
			
			 if($action == "dogtags") {
					if ($row['dogtag_stats'] == 1){include ('module/Alldogtags.php'); }
			 } 
			
			if($action == "weapons_vehicles") {
					if ($row['weapon_box'] == 1){include ('module/weapons.php'); }
					if ($row['box_equipment'] == 1){include ('module/equipment.php'); }
					if ($row['unlocks_box'] == 1){include ('module/unlocks.php');}
					if ($row['specializations'] == 1){include ('module/vehicles.php'); }
			}
			
			if($action == "assignments") {
					if ($row['assignments'] == 1){include ('module/assignments.php');}		
			}
					
			if($action == "coop") {
			   if ($row['coop_box'] == 1){include ('module/coop.php'); }
			}   
			
			if($action == "awards") {
					if ($row['ribbons_box'] == 1){include ('module/ribbons.php'); }
			}  
				  
				  
				  

				
					

					include ('inc/footer.php');
				?>
			</div>
			      <script type="text/javascript">
		$(document).ready(function() {
	
			$("a#bf3stats").fancybox({
			'autoDimensions'	: true,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'padding' : 0,
      'overlayColor'		: '#000',
			'overlayOpacity'	: 0.8
	   });
   });
	</script>
	
	

			