<?php
/*======================================================================*\
|| #################################################################### ||
|| # EoT-Clan BF3 Leaderboard                                         # ||
|| # ---------------------------------------------------------------- # ||
|| # Dieses Copyright darf nicht entfernt werden                      # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # -----------------BF3 Leaderboard is a free Software--------------# ||
|| #                     http://eot-clan.net                          # ||
|| #################################################################### ||
\*======================================================================*/
if (!defined('INCLUDE_ME')){ 
die('access not allowed'); 
}

$EoT = new eGamersofTomorrow;
$battlelog = new BattlelogApiCurl;

      
$APIUPDATE = "";

$oTime    = new timing('ja');
$fTime    = 0;
$fTimeMax = 0;
$iCounter = 0;
$sError   = '';


$oTimer = new timing('ja');

$query_admin = "SELECT * FROM ".DBPrefix."admin";
$result_admin = mysql_query($query_admin);
	while($admin = mysql_fetch_assoc($result_admin)){
$platform = $admin['platform'];
$Hhour = $admin['HistoryInsert']*3600;
$LIMIT = $admin['max_players'];
$HistoryYesNO = $admin['History'];
}


$sSql = "SELECT soldiername FROM ".DBPrefix."generalStats";
           $rResult   = mysql_query($sSql) or $bError .= "\nError in Query: " . mysql_error() . ' in SQL: ' . print_r($sSql, true);
           $sSoldiers = array();
        while($aSoldiers = mysql_fetch_assoc($rResult)){
          $sSoldiers[] = $aSoldiers['soldiername'];
       } 



if (isset($_GET['name']) && !empty($_GET['name']) && $_GET['name'] != '' && in_array($_GET['name'],$sSoldiers)){
	$sSoldiers = $_GET['name'];
	$l = 'player';
	$p = 'player';
}else if(isset($apiSoldiers) && !empty($apiSoldiers) && $apiSoldiers != ''){
    $sSoldiers = $EoT->implodeAPI($apiSoldiers);
    $l = 'playerlist';
	  $p = 'players';  
	  $APIUPDATE = '
<html>
	<head>
		<title>'.LANG_UPDATE_API_TITLE.'</title>
		'.$styleSettings.'
</head>
 <table class="defaultUpdate" style="width:470px; margin-left: -250px;margin-top: -100px;position: absolute;left: 50%;top: 50%;" border="0" cellspacing="0" cellpadding="4">
 <td class="default" style="font-size:11px;">'.LANG_UPDATE_API_TEXT.'<br /></td>
		</div>		
  </table>
</html>';
	  
} else {
	     $sWhere = "1";
	     $l = 'playerlist';
	     $p = 'players';
	         $sSql = "SELECT soldiername FROM ".DBPrefix."generalStats WHERE {$sWhere} ORDER by last_update ASC LIMIT {$LIMIT}";
           $rResult   = mysql_query($sSql) or $bError .= "\nError in Query: " . mysql_error() . ' in SQL: ' . print_r($sSql, true);
           $sSoldiers = array();
        while($aSoldiers = mysql_fetch_assoc($rResult)){
          $sSoldiers[] = $aSoldiers['soldiername'];
       } 
       $sSoldiers = $EoT->implodeAPI($sSoldiers);	
  }






$opt = "clear,awards,vehicles,scores,global,nextranks,rank,coop,coopMissions,gamemodes,weapons,weaponsStars,equipment,specializations,kits,urls,weaponsUnlocks,assignments";

$url = 'http://api.bf3stats.com/'.$platform.'/'.$l.'/';
$postdata = ''.$p.'='.rawurlencode($sSoldiers).'?opt='.$opt;


$ch = curl_init($url.'?'.$postdata);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
$jData = curl_exec($ch);
curl_close($ch);
$aData = json_decode($jData,true);

$aData = security::escape($aData);

#print_r($aData);

$errorArray = array("pifound","notfound","error","invalid_platform","no_players_given","no_valid_players","index_database_error","data_database_error","too_many_players");


if (in_array($aData['status'],$errorArray) OR !is_array($aData)){
	if ($aData['status'] == "notfound"){
							$apiError = LANG_UPDATE_ERROR_NOT_FOUND;	
						}else{
							$apiError = 'Error Code'.$aData['status'];
						}
	$sError = LANG_ERROR_UPDATE.'<br />'.$apiError;			
}else{
	if ($l == 'playerlist'){
		$aData = $aData['list'];
	}else{
		$aData = array($aData);
	}


	foreach ($aData as $aPlayer){
      
		   
$soldiername = " soldiername = '{$aPlayer['name']}'";

$sSql = "SELECT * FROM ".DBPrefix."generalStats WHERE {$soldiername}";
$rResult   = mysql_query($sSql) or $bError .= "\nError in Query: " . mysql_error() . ' in SQL: ' . print_r($sSql, true);
$aStats = mysql_fetch_assoc($rResult);
$pid = $aStats['pid'];
		
		//Stats PID bei Ribbons
		$sSql = "SELECT SUM(stats_pid) AS anzahl FROM ".DBPrefix."ribbons WHERE stats_pid = {$pid}";
		$rResultUser = mysql_query($sSql) or die ("Fehler: ".mysql_error(). " -> " . $sSql);
		$aUser = mysql_fetch_assoc($rResultUser);
		if ($aUser['anzahl'] <= 0){
			mysql_query("INSERT INTO ".DBPrefix."ribbons (stats_pid) VALUES ({$pid})") or die ("Fehler: ".mysql_error(). " -> " . $sSql);
		}
		
		//Stats PID bei Medals
		$sSql = "SELECT SUM(stats_pid) AS anzahl FROM ".DBPrefix."medals WHERE stats_pid = {$pid}";
		$rResultUser = mysql_query($sSql) or die ("Fehler: ".mysql_error(). " -> " . $sSql);
		$aUser = mysql_fetch_assoc($rResultUser);
		if ($aUser['anzahl'] <= 0){
			mysql_query("INSERT INTO ".DBPrefix."medals (stats_pid) VALUES ({$pid})");
		}
		
		//Stats PID bei Vehicles
		$sSql = "SELECT SUM(stats_pid) AS anzahl FROM ".DBPrefix."vehicles WHERE stats_pid = {$pid}";
		$rResultUser = mysql_query($sSql) or die ("Fehler: ".mysql_error(). " -> " . $sSql);
		$aUser = mysql_fetch_assoc($rResultUser);
		if ($aUser['anzahl'] <= 0){
			mysql_query("INSERT INTO ".DBPrefix."vehicles (stats_pid) VALUES ({$pid})");
		}
		
		//Stats PID bei Weapons
		$sSql = "SELECT SUM(stats_pid) AS anzahl FROM ".DBPrefix."weapons WHERE stats_pid = {$pid}";
		$rResultUser = mysql_query($sSql) or die ("Fehler: ".mysql_error(). " -> " . $sSql);
		$aUser = mysql_fetch_assoc($rResultUser);
		if ($aUser['anzahl'] <= 0){
			mysql_query("INSERT INTO ".DBPrefix."weapons (stats_pid) VALUES ({$pid})");
		}
		
		//Stats PID bei Team
		$sSql = "SELECT SUM(stats_pid) AS anzahl FROM ".DBPrefix."team WHERE stats_pid = {$pid}";
		$rResultUser = mysql_query($sSql) or die ("Fehler: ".mysql_error(). " -> " . $sSql);
		$aUser = mysql_fetch_assoc($rResultUser);
		if ($aUser['anzahl'] <= 0){
			mysql_query("INSERT INTO ".DBPrefix."team (stats_pid) VALUES ({$pid})");
		}
		
		//Stats PID bei COOP
		$sSql = "SELECT SUM(stats_pid) AS anzahl FROM ".DBPrefix."coop WHERE stats_pid = {$pid}";
		$rResultUser = mysql_query($sSql) or die ("Fehler: ".mysql_error(). " -> " . $sSql);
		$aUser = mysql_fetch_assoc($rResultUser);
		if ($aUser['anzahl'] <= 0){
			mysql_query("INSERT INTO ".DBPrefix."coop (stats_pid) VALUES ({$pid})");
		}
		
		//Stats PID bei Gamemodes
		$sSql = "SELECT SUM(stats_pid) AS anzahl FROM ".DBPrefix."gamemodes WHERE stats_pid = {$pid}";
		$rResultUser = mysql_query($sSql) or die ("Fehler: ".mysql_error(). " -> " . $sSql);
		$aUser = mysql_fetch_assoc($rResultUser);
		if ($aUser['anzahl'] <= 0){
			mysql_query("INSERT INTO ".DBPrefix."gamemodes (stats_pid) VALUES ({$pid})");
		}
		
		//Stats PID bei Stars
		$sSql = "SELECT SUM(stats_pid) AS anzahl FROM ".DBPrefix."stars WHERE stats_pid = {$pid}";
		$rResultUser = mysql_query($sSql) or die ("Fehler: ".mysql_error(). " -> " . $sSql);
		$aUser = mysql_fetch_assoc($rResultUser);
		if ($aUser['anzahl'] <= 0){
			mysql_query("INSERT INTO ".DBPrefix."stars (stats_pid) VALUES ({$pid})");
		}
		
		//Stats PID bei Stars
		$sSql = "SELECT SUM(stats_pid) AS anzahl FROM ".DBPrefix."equipment WHERE stats_pid = {$pid}";
		$rResultUser = mysql_query($sSql) or die ("Fehler: ".mysql_error(). " -> " . $sSql);
		$aUser = mysql_fetch_assoc($rResultUser);
		if ($aUser['anzahl'] <= 0){
			mysql_query("INSERT INTO ".DBPrefix."equipment (stats_pid) VALUES ({$pid})");
		}
		
		//Stats PID bei assignments
		$sSql = "SELECT SUM(stats_pid) AS anzahl FROM ".DBPrefix."assignments WHERE stats_pid = {$pid}";
		$rResultUser = mysql_query($sSql) or die ("Fehler: ".mysql_error(). " -> " . $sSql);
		$aUser = mysql_fetch_assoc($rResultUser);
		if ($aUser['anzahl'] <= 0){
			mysql_query("INSERT INTO ".DBPrefix."assignments (stats_pid) VALUES ({$pid})");
		}
		
		
		$pName = $aPlayer['name'];

      if ($platform == 'ps3'){
          $pName = $aStats['persona'];
      }
      
      $exp = $battlelog->GameExpantions($pName);
          $expansions = array();       
        if (is_array($exp))foreach ($exp as $key => $expension){
            $expansions[] = $key;
        }

       $expansions = implode(',',$expansions); 
		
		
			 /**********Allgemein Update*************/
			$g_rank 		= $aPlayer['stats']['rank']['nr'];
			$s_rank 		= $aPlayer['stats']['rank']['score'];
			$n_rank 		= $aPlayer['stats']['nextranks'][0]['score'];
			$points 		= $aPlayer['stats']['scores']['score'];
			$award	    = $aPlayer['stats']['scores']['award'];
			$assault	    = $aPlayer['stats']['scores']['assault'];
			$bonus	    = $aPlayer['stats']['scores']['bonus'];
			$engineer	    = $aPlayer['stats']['scores']['engineer'];
			$general	    = $aPlayer['stats']['scores']['general'];
			$objective	    = $aPlayer['stats']['scores']['objective'];
			$recon	    = $aPlayer['stats']['scores']['recon'];
			$squad	    = $aPlayer['stats']['scores']['squad'];
			$support	    = $aPlayer['stats']['scores']['support'];
			$team	    = $aPlayer['stats']['scores']['team'];
			$unlock	    = $aPlayer['stats']['scores']['unlock'];
			$vehicleaa	    = $aPlayer['stats']['scores']['vehicleaa'];
			$vehicleah	    = $aPlayer['stats']['scores']['vehicleah'];
			$vehicleall	    = $aPlayer['stats']['scores']['vehicleall'];
			$vehicleifv	    = $aPlayer['stats']['scores']['vehicleifv'];
			$vehiclejet	    = $aPlayer['stats']['scores']['vehiclejet'];
			$vehiclembt	    = $aPlayer['stats']['scores']['vehiclembt'];
			$vehiclesh	    = $aPlayer['stats']['scores']['vehiclesh'];
			$kills 		= $aPlayer['stats']['global']['kills'];
			$deaths 		= $aPlayer['stats']['global']['deaths'];
			$wins 		= $aPlayer['stats']['global']['wins'];
			$losses 		= $aPlayer['stats']['global']['losses'];
	    $shots		= $aPlayer['stats']['global']['shots'];
			$hits		= $aPlayer['stats']['global']['hits'];
			$headshots		= $aPlayer['stats']['global']['headshots'];
			$longesths		= $aPlayer['stats']['global']['longesths'];
			$time		= $aPlayer['stats']['global']['time'];
			$revives		= $aPlayer['stats']['global']['revives'];
			$killassists		= $aPlayer['stats']['global']['killassists'];
			$resupplies		= $aPlayer['stats']['global']['resupplies'];
			$heals		= $aPlayer['stats']['global']['heals'];
			$repairs		= $aPlayer['stats']['global']['repairs'];
			$rounds		= $aPlayer['stats']['global']['rounds'];
			$elo		= $aPlayer['stats']['global']['elo'];
			$elo_games		= $aPlayer['stats']['global']['elo_games'];
			$killstreakbonus		= $aPlayer['stats']['global']['killstreakbonus'];
			$vehicledestroyassist		= $aPlayer['stats']['global']['vehicledestroyassist'];
			$vehicledestroyed		= $aPlayer['stats']['global']['vehicledestroyed'];
			$dogtags		= $aPlayer['stats']['global']['dogtags'];
			$avengerkills		= $aPlayer['stats']['global']['avengerkills'];
			$saviorkills		= $aPlayer['stats']['global']['saviorkills'];
			$damagaassists		= $aPlayer['stats']['global']['damagaassists'];
			$date_insert_bf3s = $aPlayer['stats']['date_insert'];
			$date_check_bf3s = $aPlayer['stats']['date_check'];
			$date_update_bf3s = $aPlayer['stats']['date_update'];
			$bf3surl = $aPlayer['url'];
			$battlelogurl = $aPlayer['battlelog'];
			
			$bID = 	parse_url($aPlayer['battlelog']);
			$bID = explode('/',$bID['path']);
			$bID = $bID['5'];
			
      $suppression = $aPlayer['stats']['global']['suppression'];
      $nemesisstreak = $aPlayer['stats']['global']['nemesisstreak'];
      $nemesiskills = $aPlayer['stats']['global']['nemesiskills'];
      $mcomdest = $aPlayer['stats']['global']['mcomdest'];
      $mcomdefkills = $aPlayer['stats']['global']['mcomdefkills'];
      $flagcaps = $aPlayer['stats']['global']['flagcaps'];
      $flagdef = $aPlayer['stats']['global']['flagdef'];
      $longesthandhs = $aPlayer['stats']['global']['longesthandhs'];
      

	   
        $tTime = time();
		
		/*MEDLAS Stats Update */
		     $m1_count	= $aPlayer['stats']['medals']['m01']['count'];
		     $m1_date	= $aPlayer['stats']['medals']['m01']['date'];
		     $m1_curr	= $aPlayer['stats']['medals']['m01']['curr'];
		     $m1_needed	= $aPlayer['stats']['medals']['m01']['needed'];
		     $m2_count	= $aPlayer['stats']['medals']['m02']['count'];
		     $m2_date	= $aPlayer['stats']['medals']['m02']['date'];
		     $m2_curr	= $aPlayer['stats']['medals']['m02']['curr'];
		     $m2_needed	= $aPlayer['stats']['medals']['m02']['needed'];
		     $m3_count	= $aPlayer['stats']['medals']['m03']['count'];
		     $m3_date	= $aPlayer['stats']['medals']['m03']['date'];
		     $m3_curr	= $aPlayer['stats']['medals']['m03']['curr'];
		     $m3_needed	= $aPlayer['stats']['medals']['m03']['needed'];
		     $m4_count	= $aPlayer['stats']['medals']['m04']['count'];
		     $m4_date	= $aPlayer['stats']['medals']['m04']['date'];
		     $m4_curr	= $aPlayer['stats']['medals']['m04']['curr'];
		     $m4_needed	= $aPlayer['stats']['medals']['m04']['needed'];
		     $m5_count	= $aPlayer['stats']['medals']['m05']['count'];
		     $m5_date	= $aPlayer['stats']['medals']['m05']['date'];
		     $m5_curr	= $aPlayer['stats']['medals']['m05']['curr'];
		     $m5_needed	= $aPlayer['stats']['medals']['m05']['needed'];
		     $m6_count	= $aPlayer['stats']['medals']['m06']['count'];
		     $m6_date	= $aPlayer['stats']['medals']['m06']['date'];
		     $m6_curr	= $aPlayer['stats']['medals']['m06']['curr'];
		     $m6_needed	= $aPlayer['stats']['medals']['m06']['needed'];
		     $m7_count	= $aPlayer['stats']['medals']['m07']['count'];
		     $m7_date	= $aPlayer['stats']['medals']['m07']['date'];
		     $m7_curr	= $aPlayer['stats']['medals']['m07']['curr'];
		     $m7_needed	= $aPlayer['stats']['medals']['m07']['needed'];
		     $m8_count	= $aPlayer['stats']['medals']['m08']['count'];
		     $m8_date	= $aPlayer['stats']['medals']['m08']['date'];
		     $m8_curr	= $aPlayer['stats']['medals']['m08']['curr'];
		     $m8_needed	= $aPlayer['stats']['medals']['m08']['needed'];
		     $m9_count	= $aPlayer['stats']['medals']['m09']['count'];
		     $m9_date	= $aPlayer['stats']['medals']['m09']['date'];
		     $m9_curr	= $aPlayer['stats']['medals']['m09']['curr'];
		     $m9_needed	= $aPlayer['stats']['medals']['m09']['needed'];
		     $m10_count	= $aPlayer['stats']['medals']['m10']['count'];
		     $m10_date	= $aPlayer['stats']['medals']['m10']['date'];
		     $m10_curr	= $aPlayer['stats']['medals']['m10']['curr'];
		     $m10_needed	= $aPlayer['stats']['medals']['m10']['needed'];
		     $m11_count	= $aPlayer['stats']['medals']['m11']['count'];
		     $m11_date	= $aPlayer['stats']['medals']['m11']['date'];
		     $m11_curr	= $aPlayer['stats']['medals']['m11']['curr'];
		     $m11_needed	= $aPlayer['stats']['medals']['m11']['needed'];
		     $m12_count	= $aPlayer['stats']['medals']['m12']['count'];
		     $m12_date	= $aPlayer['stats']['medals']['m12']['date'];
		     $m12_curr	= $aPlayer['stats']['medals']['m12']['curr'];
		     $m12_needed	= $aPlayer['stats']['medals']['m12']['needed'];
		     $m13_count	= $aPlayer['stats']['medals']['m13']['count'];
		     $m13_date	= $aPlayer['stats']['medals']['m13']['date'];
		     $m13_curr	= $aPlayer['stats']['medals']['m13']['curr'];
		     $m13_needed	= $aPlayer['stats']['medals']['m13']['needed'];
		     $m14_count	= $aPlayer['stats']['medals']['m14']['count'];
		     $m14_date	= $aPlayer['stats']['medals']['m14']['date'];
		     $m14_curr	= $aPlayer['stats']['medals']['m14']['curr'];
		     $m14_needed	= $aPlayer['stats']['medals']['m14']['needed'];
		     $m15_count	= $aPlayer['stats']['medals']['m15']['count'];
		     $m15_date	= $aPlayer['stats']['medals']['m15']['date'];
		     $m15_curr	= $aPlayer['stats']['medals']['m15']['curr'];
		     $m15_needed	= $aPlayer['stats']['medals']['m15']['needed'];
		     $m16_count	= $aPlayer['stats']['medals']['m16']['count'];
		     $m16_date	= $aPlayer['stats']['medals']['m16']['date'];
		     $m16_curr	= $aPlayer['stats']['medals']['m16']['curr'];
		     $m16_needed	= $aPlayer['stats']['medals']['m16']['needed'];
		     $m17_count	= $aPlayer['stats']['medals']['m17']['count'];
		     $m17_date	= $aPlayer['stats']['medals']['m17']['date'];
		     $m17_curr	= $aPlayer['stats']['medals']['m17']['curr'];
		     $m17_needed	= $aPlayer['stats']['medals']['m17']['needed'];
		     $m18_count	= $aPlayer['stats']['medals']['m18']['count'];
		     $m18_date	= $aPlayer['stats']['medals']['m18']['date'];
		     $m18_curr	= $aPlayer['stats']['medals']['m18']['curr'];
		     $m18_needed	= $aPlayer['stats']['medals']['m18']['needed'];
		     $m19_count	= $aPlayer['stats']['medals']['m19']['count'];
		     $m19_date	= $aPlayer['stats']['medals']['m19']['date'];
		     $m19_curr	= $aPlayer['stats']['medals']['m19']['curr'];
		     $m19_needed	= $aPlayer['stats']['medals']['m19']['needed'];
		     $m20_count	= $aPlayer['stats']['medals']['m20']['count'];
		     $m20_date	= $aPlayer['stats']['medals']['m20']['date'];
		     $m20_curr	= $aPlayer['stats']['medals']['m20']['curr'];
		     $m20_needed	= $aPlayer['stats']['medals']['m20']['needed'];
		     $m21_count	= $aPlayer['stats']['medals']['m21']['count'];
		     $m21_date	= $aPlayer['stats']['medals']['m21']['date'];
		     $m21_curr	= $aPlayer['stats']['medals']['m21']['curr'];
		     $m21_needed	= $aPlayer['stats']['medals']['m21']['needed'];
		     $m22_count	= $aPlayer['stats']['medals']['m22']['count'];
		     $m22_date	= $aPlayer['stats']['medals']['m22']['date'];
		     $m22_curr	= $aPlayer['stats']['medals']['m22']['curr'];
		     $m22_needed	= $aPlayer['stats']['medals']['m22']['needed'];
		     $m23_count	= $aPlayer['stats']['medals']['m23']['count'];
		     $m23_date	= $aPlayer['stats']['medals']['m23']['date'];
		     $m23_curr	= $aPlayer['stats']['medals']['m23']['curr'];
		     $m23_needed	= $aPlayer['stats']['medals']['m23']['needed'];
		     $m24_count	= $aPlayer['stats']['medals']['m24']['count'];
		     $m24_date	= $aPlayer['stats']['medals']['m24']['date'];
		     $m24_curr	= $aPlayer['stats']['medals']['m24']['curr'];
		     $m24_needed	= $aPlayer['stats']['medals']['m24']['needed'];
		     $m25_count	= $aPlayer['stats']['medals']['m25']['count'];
		     $m25_date	= $aPlayer['stats']['medals']['m25']['date'];
		     $m25_curr	= $aPlayer['stats']['medals']['m25']['curr'];
		     $m25_needed	= $aPlayer['stats']['medals']['m25']['needed'];
		     $m26_count	= $aPlayer['stats']['medals']['m26']['count'];
		     $m26_date	= $aPlayer['stats']['medals']['m26']['date'];
		     $m26_curr	= $aPlayer['stats']['medals']['m26']['curr'];
		     $m26_needed	= $aPlayer['stats']['medals']['m26']['needed'];
		     $m27_count	= $aPlayer['stats']['medals']['m27']['count'];
		     $m27_date	= $aPlayer['stats']['medals']['m27']['date'];
		     $m27_curr	= $aPlayer['stats']['medals']['m27']['curr'];
		     $m27_needed	= $aPlayer['stats']['medals']['m27']['needed'];
		     $m28_count	= $aPlayer['stats']['medals']['m28']['count'];
		     $m28_date	= $aPlayer['stats']['medals']['m28']['date'];
		     $m28_curr	= $aPlayer['stats']['medals']['m28']['curr'];
		     $m28_needed	= $aPlayer['stats']['medals']['m28']['needed'];
		     $m29_count	= $aPlayer['stats']['medals']['m29']['count'];
		     $m29_date	= $aPlayer['stats']['medals']['m29']['date'];
		     $m29_curr	= $aPlayer['stats']['medals']['m29']['curr'];
		     $m29_needed	= $aPlayer['stats']['medals']['m29']['needed'];
		     $m30_count	= $aPlayer['stats']['medals']['m30']['count'];
		     $m30_date	= $aPlayer['stats']['medals']['m30']['date'];
		     $m30_curr	= $aPlayer['stats']['medals']['m30']['curr'];
		     $m30_needed	= $aPlayer['stats']['medals']['m30']['needed'];
		     $m31_count	= $aPlayer['stats']['medals']['m31']['count'];
		     $m31_date	= $aPlayer['stats']['medals']['m31']['date'];
		     $m31_curr	= $aPlayer['stats']['medals']['m31']['curr'];
		     $m31_needed	= $aPlayer['stats']['medals']['m31']['needed'];
		     $m32_count	= $aPlayer['stats']['medals']['m32']['count'];
		     $m32_date	= $aPlayer['stats']['medals']['m32']['date'];
		     $m32_curr	= $aPlayer['stats']['medals']['m32']['curr'];
		     $m32_needed	= $aPlayer['stats']['medals']['m32']['needed'];
		     $m33_count	= $aPlayer['stats']['medals']['m33']['count'];
		     $m33_date	= $aPlayer['stats']['medals']['m33']['date'];
		     $m33_curr	= $aPlayer['stats']['medals']['m33']['curr'];
		     $m33_needed	= $aPlayer['stats']['medals']['m33']['needed'];
		     $m34_count	= $aPlayer['stats']['medals']['m34']['count'];
		     $m34_date	= $aPlayer['stats']['medals']['m34']['date'];
		     $m34_curr	= $aPlayer['stats']['medals']['m34']['curr'];
		     $m34_needed	= $aPlayer['stats']['medals']['m34']['needed'];
		     $m35_count	= $aPlayer['stats']['medals']['m35']['count'];
		     $m35_date	= $aPlayer['stats']['medals']['m35']['date'];
		     $m35_curr	= $aPlayer['stats']['medals']['m35']['curr'];
		     $m35_needed	= $aPlayer['stats']['medals']['m35']['needed'];
		     $m36_count	= $aPlayer['stats']['medals']['m36']['count'];
		     $m36_date	= $aPlayer['stats']['medals']['m36']['date'];
		     $m36_curr	= $aPlayer['stats']['medals']['m36']['curr'];
		     $m36_needed	= $aPlayer['stats']['medals']['m36']['needed'];
		     $m37_count	= $aPlayer['stats']['medals']['m37']['count'];
		     $m37_date	= $aPlayer['stats']['medals']['m37']['date'];
		     $m37_curr	= $aPlayer['stats']['medals']['m37']['curr'];
		     $m37_needed	= $aPlayer['stats']['medals']['m37']['needed'];
		     $m38_count	= $aPlayer['stats']['medals']['m38']['count'];
		     $m38_date	= $aPlayer['stats']['medals']['m38']['date'];
		     $m38_curr	= $aPlayer['stats']['medals']['m38']['curr'];
		     $m38_needed	= $aPlayer['stats']['medals']['m38']['needed'];
		     $m39_count	= $aPlayer['stats']['medals']['m39']['count'];
		     $m39_date	= $aPlayer['stats']['medals']['m39']['date'];
		     $m39_curr	= $aPlayer['stats']['medals']['m39']['curr'];
		     $m39_needed	= $aPlayer['stats']['medals']['m39']['needed'];
		     $m40_count	= $aPlayer['stats']['medals']['m40']['count'];
		     $m40_date	= $aPlayer['stats']['medals']['m40']['date'];
		     $m40_curr	= $aPlayer['stats']['medals']['m40']['curr'];
		     $m40_needed	= $aPlayer['stats']['medals']['m40']['needed'];
		     $m41_count	= $aPlayer['stats']['medals']['m41']['count'];
		     $m41_date	= $aPlayer['stats']['medals']['m41']['date'];
		     $m41_curr	= $aPlayer['stats']['medals']['m41']['curr'];
		     $m41_needed	= $aPlayer['stats']['medals']['m41']['needed'];
		     $m42_count	= $aPlayer['stats']['medals']['m42']['count'];
		     $m42_date	= $aPlayer['stats']['medals']['m42']['date'];
		     $m42_curr	= $aPlayer['stats']['medals']['m42']['curr'];
		     $m42_needed	= $aPlayer['stats']['medals']['m42']['needed'];
		     $m43_date	= $aPlayer['stats']['medals']['m43']['date'];
		     $m43_count	= $aPlayer['stats']['medals']['m43']['count'];
		     $m43_curr	= $aPlayer['stats']['medals']['m43']['curr'];
		     $m43_needed	= $aPlayer['stats']['medals']['m43']['needed'];
		     $m44_count	= $aPlayer['stats']['medals']['m44']['count'];
		     $m44_date	= $aPlayer['stats']['medals']['m44']['date'];
		     $m44_curr	= $aPlayer['stats']['medals']['m44']['curr'];
		     $m44_needed	= $aPlayer['stats']['medals']['m44']['needed'];
		     $m45_count	= $aPlayer['stats']['medals']['m45']['count'];
		     $m45_date	= $aPlayer['stats']['medals']['m45']['date'];
		     $m45_curr	= $aPlayer['stats']['medals']['m45']['curr'];
		     $m45_needed	= $aPlayer['stats']['medals']['m45']['needed'];
		     $m46_count	= $aPlayer['stats']['medals']['m46']['count'];
		     $m46_date	= $aPlayer['stats']['medals']['m46']['date'];
		     $m46_curr	= $aPlayer['stats']['medals']['m46']['curr'];
		     $m46_needed	= $aPlayer['stats']['medals']['m46']['needed'];
		     $m47_count	= $aPlayer['stats']['medals']['m47']['count'];
		     $m47_date	= $aPlayer['stats']['medals']['m47']['date'];
		     $m47_curr	= $aPlayer['stats']['medals']['m47']['curr'];
		     $m47_needed	= $aPlayer['stats']['medals']['m47']['needed'];
		     $m48_count	= $aPlayer['stats']['medals']['m48']['count'];
		     $m48_date	= $aPlayer['stats']['medals']['m48']['date'];
		     $m48_curr	= $aPlayer['stats']['medals']['m48']['curr'];
		     $m48_needed	= $aPlayer['stats']['medals']['m48']['needed'];
		     $m49_count	= $aPlayer['stats']['medals']['m49']['count'];
		     $m49_date	= $aPlayer['stats']['medals']['m49']['date'];
		     $m49_curr	= $aPlayer['stats']['medals']['m49']['curr'];
		     $m49_needed	= $aPlayer['stats']['medals']['m49']['needed'];
		     $m50_count	= $aPlayer['stats']['medals']['m50']['count'];
		     $m50_date	= $aPlayer['stats']['medals']['m50']['date'];
		     $m50_curr	= $aPlayer['stats']['medals']['m50']['curr'];
		     $m50_needed	= $aPlayer['stats']['medals']['m50']['needed'];
		
			
		
		/*Ribbons Stats Update*/
		     $r1_count	= $aPlayer['stats']['ribbons']['r01']['count'];
		     $r1_date	= $aPlayer['stats']['ribbons']['r01']['date'];
		     $r2_count	= $aPlayer['stats']['ribbons']['r02']['count'];
		     $r2_date	= $aPlayer['stats']['ribbons']['r02']['date'];
		     $r3_count	= $aPlayer['stats']['ribbons']['r03']['count'];
		     $r3_date	= $aPlayer['stats']['ribbons']['r03']['date'];
		     $r4_count	= $aPlayer['stats']['ribbons']['r04']['count'];
		     $r4_date	= $aPlayer['stats']['ribbons']['r04']['date'];
		     $r5_count	= $aPlayer['stats']['ribbons']['r05']['count'];
		     $r5_date	= $aPlayer['stats']['ribbons']['r05']['date'];
		     $r6_count	= $aPlayer['stats']['ribbons']['r06']['count'];
		     $r6_date	= $aPlayer['stats']['ribbons']['r06']['date'];
		     $r7_count	= $aPlayer['stats']['ribbons']['r07']['count'];
		     $r7_date	= $aPlayer['stats']['ribbons']['r07']['date'];
		     $r8_count	= $aPlayer['stats']['ribbons']['r08']['count'];
		     $r8_date	= $aPlayer['stats']['ribbons']['r08']['date'];
		     $r9_count	= $aPlayer['stats']['ribbons']['r09']['count'];
		     $r9_date	= $aPlayer['stats']['ribbons']['r09']['date'];
		     $r10_count	= $aPlayer['stats']['ribbons']['r10']['count'];
		     $r10_date	= $aPlayer['stats']['ribbons']['r10']['date'];
		     $r11_count	= $aPlayer['stats']['ribbons']['r11']['count'];
		     $r11_date	= $aPlayer['stats']['ribbons']['r11']['date'];
		     $r12_count	= $aPlayer['stats']['ribbons']['r12']['count'];
		     $r12_date	= $aPlayer['stats']['ribbons']['r12']['date'];
		     $r13_count	= $aPlayer['stats']['ribbons']['r13']['count'];
		     $r13_date	= $aPlayer['stats']['ribbons']['r13']['date'];
		     $r14_count	= $aPlayer['stats']['ribbons']['r14']['count'];
		     $r14_date	= $aPlayer['stats']['ribbons']['r14']['date'];
		     $r15_count	= $aPlayer['stats']['ribbons']['r15']['count'];
		     $r15_date	= $aPlayer['stats']['ribbons']['r15']['date'];
		     $r16_count	= $aPlayer['stats']['ribbons']['r16']['count'];
		     $r16_date	= $aPlayer['stats']['ribbons']['r16']['date'];
		     $r17_count	= $aPlayer['stats']['ribbons']['r17']['count'];
		     $r17_date	= $aPlayer['stats']['ribbons']['r17']['date'];
		     $r18_count	= $aPlayer['stats']['ribbons']['r18']['count'];
		     $r18_date	= $aPlayer['stats']['ribbons']['r18']['date'];
		     $r19_count	= $aPlayer['stats']['ribbons']['r19']['count'];
		     $r19_date	= $aPlayer['stats']['ribbons']['r19']['date'];
		     $r20_count	= $aPlayer['stats']['ribbons']['r20']['count'];
		     $r20_date	= $aPlayer['stats']['ribbons']['r20']['date'];
		     $r21_count	= $aPlayer['stats']['ribbons']['r21']['count'];
		     $r21_date	= $aPlayer['stats']['ribbons']['r21']['date'];
		     $r22_count	= $aPlayer['stats']['ribbons']['r22']['count'];
		     $r22_date	= $aPlayer['stats']['ribbons']['r22']['date'];
		     $r23_count	= $aPlayer['stats']['ribbons']['r23']['count'];
		     $r23_date	= $aPlayer['stats']['ribbons']['r23']['date'];
		     $r24_count	= $aPlayer['stats']['ribbons']['r24']['count'];
		     $r24_date	= $aPlayer['stats']['ribbons']['r24']['date'];
		     $r25_count	= $aPlayer['stats']['ribbons']['r25']['count'];
		     $r25_date	= $aPlayer['stats']['ribbons']['r25']['date'];
		     $r26_count	= $aPlayer['stats']['ribbons']['r26']['count'];
		     $r26_date	= $aPlayer['stats']['ribbons']['r26']['date'];
		     $r27_count	= $aPlayer['stats']['ribbons']['r27']['count'];
		     $r27_date	= $aPlayer['stats']['ribbons']['r27']['date'];
		     $r28_count	= $aPlayer['stats']['ribbons']['r28']['count'];
		     $r28_date	= $aPlayer['stats']['ribbons']['r28']['date'];
		     $r29_count	= $aPlayer['stats']['ribbons']['r29']['count'];
		     $r29_date	= $aPlayer['stats']['ribbons']['r29']['date'];
		     $r30_count	= $aPlayer['stats']['ribbons']['r30']['count'];
		     $r30_date	= $aPlayer['stats']['ribbons']['r30']['date'];
		     $r31_count	= $aPlayer['stats']['ribbons']['r31']['count'];
		     $r31_date	= $aPlayer['stats']['ribbons']['r31']['date'];
		     $r32_count	= $aPlayer['stats']['ribbons']['r32']['count'];
		     $r32_date	= $aPlayer['stats']['ribbons']['r32']['date'];
		     $r33_count	= $aPlayer['stats']['ribbons']['r33']['count'];
		     $r33_date	= $aPlayer['stats']['ribbons']['r33']['date'];
		     $r34_count	= $aPlayer['stats']['ribbons']['r34']['count'];
		     $r34_date	= $aPlayer['stats']['ribbons']['r34']['date'];
		     $r35_count	= $aPlayer['stats']['ribbons']['r35']['count'];
		     $r35_date	= $aPlayer['stats']['ribbons']['r35']['date'];
		     $r36_count	= $aPlayer['stats']['ribbons']['r36']['count'];
		     $r36_date	= $aPlayer['stats']['ribbons']['r36']['date'];
		     $r37_count	= $aPlayer['stats']['ribbons']['r37']['count'];
		     $r37_date	= $aPlayer['stats']['ribbons']['r37']['date'];
		     $r38_count	= $aPlayer['stats']['ribbons']['r38']['count'];
		     $r38_date	= $aPlayer['stats']['ribbons']['r38']['date'];
		     $r39_count	= $aPlayer['stats']['ribbons']['r39']['count'];
		     $r39_date	= $aPlayer['stats']['ribbons']['r39']['date'];
		     $r40_count	= $aPlayer['stats']['ribbons']['r40']['count'];
		     $r40_date	= $aPlayer['stats']['ribbons']['r40']['date'];
		     $r41_count	= $aPlayer['stats']['ribbons']['r41']['count'];
		     $r41_date	= $aPlayer['stats']['ribbons']['r41']['date'];
		     $r42_count	= $aPlayer['stats']['ribbons']['r42']['count'];
		     $r42_date	= $aPlayer['stats']['ribbons']['r42']['date'];
		     $r43_count	= $aPlayer['stats']['ribbons']['r43']['count'];
		     $r43_date	= $aPlayer['stats']['ribbons']['r43']['date'];
		     $r44_count	= $aPlayer['stats']['ribbons']['r44']['count'];
		     $r44_date	= $aPlayer['stats']['ribbons']['r44']['date'];
		     $r45_count	= $aPlayer['stats']['ribbons']['r45']['count'];
		     $r45_date	= $aPlayer['stats']['ribbons']['r45']['date'];
		
		
		/*Equipment*/
		$waeM67_time = $aPlayer['stats']['equipment']['waeM67']['time'];
		$waeM67_kills = $aPlayer['stats']['equipment']['waeM67']['kills'];
		$waeM67_shots = $aPlayer['stats']['equipment']['waeM67']['shots'];
		$waeM67_hits = $aPlayer['stats']['equipment']['waeM67']['hits'];
		$waeM67_headshots = $aPlayer['stats']['equipment']['waeM67']['headshots'];
		
		$wasDef_time = $aPlayer['stats']['equipment']['wasDef']['time'];
		$wasDef_kills = $aPlayer['stats']['equipment']['wasDef']['kills'];
		$wasDef_shots = $aPlayer['stats']['equipment']['wasDef']['shots'];
		$wasDef_hits = $aPlayer['stats']['equipment']['wasDef']['hits'];
		$wasDef_headshots = $aPlayer['stats']['equipment']['wasDef']['headshots'];
		$wasDef_revives = $aPlayer['stats']['equipment']['wasDef']['revives'];
		
		
		$waeMine_time = $aPlayer['stats']['equipment']['waeMine']['time'];
		$waeMine_kills = $aPlayer['stats']['equipment']['waeMine']['kills'];
		$waeMine_shots = $aPlayer['stats']['equipment']['waeMine']['shots'];
		$waeMine_hits = $aPlayer['stats']['equipment']['waeMine']['hits'];
		$waeMine_headshots = $aPlayer['stats']['equipment']['waeMine']['headshots'];
		
		$waeMort_time = $aPlayer['stats']['equipment']['waeMort']['time'];
		$waeMort_kills = $aPlayer['stats']['equipment']['waeMort']['kills'];
		$waeMort_shots = $aPlayer['stats']['equipment']['waeMort']['shots'];
		$waeMort_hits = $aPlayer['stats']['equipment']['waeMort']['hits'];
		$waeMort_headshots = $aPlayer['stats']['equipment']['waeMort']['headshots'];

		$waeC4_time = $aPlayer['stats']['equipment']['waeC4']['time'];
		$waeC4_kills = $aPlayer['stats']['equipment']['waeC4']['kills'];
    $waeC4_shots = $aPlayer['stats']['equipment']['waeC4']['shots'];
		$waeC4_hits = $aPlayer['stats']['equipment']['waeC4']['hits'];
		$waeC4_headshots = $aPlayer['stats']['equipment']['waeC4']['headshots'];
		
		
		$waeClay_time = $aPlayer['stats']['equipment']['waeClay']['time'];
		$waeClay_kills = $aPlayer['stats']['equipment']['waeClay']['kills'];
		$waeClay_shots = $aPlayer['stats']['equipment']['waeClay']['shots'];
		$waeClay_hits = $aPlayer['stats']['equipment']['waeClay']['hits'];
		$waeClay_headshots = $aPlayer['stats']['equipment']['waeClay']['headshots'];
		
		$seqEOD_time = $aPlayer['stats']['equipment']['seqEOD']['time'];
		$seqEOD_kills = $aPlayer['stats']['equipment']['seqEOD']['kills'];
		
		$seqMAV_time = $aPlayer['stats']['equipment']['seqMAV']['time'];
		$seqMAV_kills = $aPlayer['stats']['equipment']['seqMAV']['kills'];
		$seqMAV_spots = $aPlayer['stats']['equipment']['seqMAV']['spots'];
		
		$seqSOF_time = $aPlayer['stats']['equipment']['seqSOF']['time'];
		$seqSOF_kills = $aPlayer['stats']['equipment']['seqSOF']['kills'];
		
		$seqUGS_time = $aPlayer['stats']['equipment']['seqUGS']['time'];
		$seqUGS_kills = $aPlayer['stats']['equipment']['seqUGS']['kills'];
		$seqUGS_spots = $aPlayer['stats']['equipment']['seqUGS']['spots'];
		
		$seqRad_time = $aPlayer['stats']['equipment']['seqRad']['time'];
		$seqRad_kills = $aPlayer['stats']['equipment']['seqRad']['kills'];
		$seqRad_spawns = $aPlayer['stats']['equipment']['seqRad']['spawns'];
		
		
		$wasRT_time = $aPlayer['stats']['equipment']['wasRT']['time'];
		$wasRT_kills = $aPlayer['stats']['equipment']['wasRT']['kills'];
		$wasRT_shots = $aPlayer['stats']['equipment']['wasRT']['shots'];
		$wasRT_hits = $aPlayer['stats']['equipment']['wasRT']['hits'];
		$wasRT_headshots = $aPlayer['stats']['equipment']['wasRT']['headshots'];
		
		
	
		
		/* Weaponds */
		$arAEK_time = $aPlayer['stats']['weapons']['arAEK']['time'];
		$arAEK_kills = $aPlayer['stats']['weapons']['arAEK']['kills'];
		$arAEK_shots = $aPlayer['stats']['weapons']['arAEK']['shots'];
		$arAEK_headshots = $aPlayer['stats']['weapons']['arAEK']['headshots'];
		$arAEK_hits = $aPlayer['stats']['weapons']['arAEK']['hits'];

		
		
		$arAK74_time = $aPlayer['stats']['weapons']['arAK74']['time'];
		$arAK74_kills = $aPlayer['stats']['weapons']['arAK74']['kills'];
		$arAK74_shots = $aPlayer['stats']['weapons']['arAK74']['shots'];
		$arAK74_headshots = $aPlayer['stats']['weapons']['arAK74']['headshots'];
		$arAK74_hits = $aPlayer['stats']['weapons']['arAK74']['hits'];

		
		$arAN94_time = $aPlayer['stats']['weapons']['arAN94']['time'];
		$arAN94_kills = $aPlayer['stats']['weapons']['arAN94']['kills'];
		$arAN94_shots = $aPlayer['stats']['weapons']['arAN94']['shots'];
		$arAN94_headshots = $aPlayer['stats']['weapons']['arAN94']['headshots'];
		$arAN94_hits = $aPlayer['stats']['weapons']['arAN94']['hits'];

		
		$arF2_time = $aPlayer['stats']['weapons']['arF2']['time'];
		$arF2_kills = $aPlayer['stats']['weapons']['arF2']['kills'];
		$arF2_shots = $aPlayer['stats']['weapons']['arF2']['shots'];
		$arF2_headshots = $aPlayer['stats']['weapons']['arF2']['headshots'];
		$arF2_hits = $aPlayer['stats']['weapons']['arF2']['hits'];

		
		$arG3_time = $aPlayer['stats']['weapons']['arG3']['time'];
		$arG3_kills = $aPlayer['stats']['weapons']['arG3']['kills'];
		$arG3_shots = $aPlayer['stats']['weapons']['arG3']['shots'];
		$arG3_headshots = $aPlayer['stats']['weapons']['arG3']['headshots'];
		$arG3_hits = $aPlayer['stats']['weapons']['arG3']['hits'];

		
		$arKH_time = $aPlayer['stats']['weapons']['arKH']['time'];
		$arKH_kills = $aPlayer['stats']['weapons']['arKH']['kills'];
		$arKH_shots = $aPlayer['stats']['weapons']['arKH']['shots'];
		$arKH_headshots = $aPlayer['stats']['weapons']['arKH']['headshots'];
		$arKH_hits = $aPlayer['stats']['weapons']['arKH']['hits'];

		
		$arM16_time = $aPlayer['stats']['weapons']['arM16']['time'];
		$arM16_kills = $aPlayer['stats']['weapons']['arM16']['kills'];
		$arM16_shots = $aPlayer['stats']['weapons']['arM16']['shots'];
		$arM16_headshots = $aPlayer['stats']['weapons']['arM16']['headshots'];
		$arM16_hits = $aPlayer['stats']['weapons']['arM16']['hits'];

		
		$arM416_time = $aPlayer['stats']['weapons']['arM416']['time'];
		$arM416_kills = $aPlayer['stats']['weapons']['arM416']['kills'];
		$arM416_shots = $aPlayer['stats']['weapons']['arM416']['shots'];
		$arM416_headshots = $aPlayer['stats']['weapons']['arM416']['headshots'];
		$arM416_hits = $aPlayer['stats']['weapons']['arM416']['hits'];

		
		$caA91_time = $aPlayer['stats']['weapons']['caA91']['time'];
		$caA91_kills = $aPlayer['stats']['weapons']['caA91']['kills'];
		$caA91_shots = $aPlayer['stats']['weapons']['caA91']['shots'];
		$caA91_headshots = $aPlayer['stats']['weapons']['caA91']['headshots'];
		$caA91_hits = $aPlayer['stats']['weapons']['caA91']['hits'];

		
		$caAKS_time = $aPlayer['stats']['weapons']['caAKS']['time'];
		$caAKS_kills = $aPlayer['stats']['weapons']['caAKS']['kills'];
		$caAKS_shots = $aPlayer['stats']['weapons']['caAKS']['shots'];
		$caAKS_headshots = $aPlayer['stats']['weapons']['caAKS']['headshots'];
		$caAKS_hits = $aPlayer['stats']['weapons']['caAKS']['hits'];

		
		$caG36_time = $aPlayer['stats']['weapons']['caG36']['time'];
		$caG36_kills = $aPlayer['stats']['weapons']['caG36']['kills'];
		$caG36_shots = $aPlayer['stats']['weapons']['caG36']['shots'];
		$caG36_headshots = $aPlayer['stats']['weapons']['caG36']['headshots'];
		$caG36_hits = $aPlayer['stats']['weapons']['caG36']['hits'];

		
		$caM4_time = $aPlayer['stats']['weapons']['caM4']['time'];
		$caM4_kills = $aPlayer['stats']['weapons']['caM4']['kills'];
		$caM4_shots = $aPlayer['stats']['weapons']['caM4']['shots'];
		$caM4_headshots = $aPlayer['stats']['weapons']['caM4']['headshots'];
		$caM4_hits = $aPlayer['stats']['weapons']['caM4']['hits'];

		
		$caSCAR_time = $aPlayer['stats']['weapons']['caSCAR']['time'];
		$caSCAR_kills = $aPlayer['stats']['weapons']['caSCAR']['kills'];
		$caSCAR_shots = $aPlayer['stats']['weapons']['caSCAR']['shots'];
		$caSCAR_headshots = $aPlayer['stats']['weapons']['caSCAR']['headshots'];
		$caSCAR_hits = $aPlayer['stats']['weapons']['caSCAR']['hits'];

		
		$caSG553_time = $aPlayer['stats']['weapons']['caSG553']['time'];
		$caSG553_kills = $aPlayer['stats']['weapons']['caSG553']['kills'];
		$caSG553_shots = $aPlayer['stats']['weapons']['caSG553']['shots'];
		$caSG553_headshots = $aPlayer['stats']['weapons']['caSG553']['headshots'];
		$caSG553_hits = $aPlayer['stats']['weapons']['caSG553']['hits'];

		
		$mgM240_time = $aPlayer['stats']['weapons']['mgM240']['time'];
		$mgM240_kills = $aPlayer['stats']['weapons']['mgM240']['kills'];
		$mgM240_shots = $aPlayer['stats']['weapons']['mgM240']['shots'];
		$mgM240_headshots = $aPlayer['stats']['weapons']['mgM240']['headshots'];
		$mgM240_hits = $aPlayer['stats']['weapons']['mgM240']['hits'];

		
		$mgM249_time = $aPlayer['stats']['weapons']['mgM249']['time'];
		$mgM249_kills = $aPlayer['stats']['weapons']['mgM249']['kills'];
		$mgM249_shots = $aPlayer['stats']['weapons']['mgM249']['shots'];
		$mgM249_headshots = $aPlayer['stats']['weapons']['mgM249']['headshots'];
		$mgM249_hits = $aPlayer['stats']['weapons']['mgM249']['hits'];

		
		$mgM27_time = $aPlayer['stats']['weapons']['mgM27']['time'];
		$mgM27_kills = $aPlayer['stats']['weapons']['mgM27']['kills'];
		$mgM27_shots = $aPlayer['stats']['weapons']['mgM27']['shots'];
		$mgM27_headshots = $aPlayer['stats']['weapons']['mgM27']['headshots'];
		$mgM27_hits = $aPlayer['stats']['weapons']['mgM27']['hits'];

		
		$mgM60_time = $aPlayer['stats']['weapons']['mgM60']['time'];
		$mgM60_kills = $aPlayer['stats']['weapons']['mgM60']['kills'];
		$mgM60_shots = $aPlayer['stats']['weapons']['mgM60']['shots'];
		$mgM60_headshots = $aPlayer['stats']['weapons']['mgM60']['headshots'];
		$mgM60_hits = $aPlayer['stats']['weapons']['mgM60']['hits'];

		
		$mgPech_time = $aPlayer['stats']['weapons']['mgPech']['time'];
		$mgPech_kills = $aPlayer['stats']['weapons']['mgPech']['kills'];
		$mgPech_shots = $aPlayer['stats']['weapons']['mgPech']['shots'];
		$mgPech_headshots = $aPlayer['stats']['weapons']['mgPech']['headshots'];
		$mgPech_hits = $aPlayer['stats']['weapons']['mgPech']['hits'];

		
		$mgRPK_time = $aPlayer['stats']['weapons']['mgRPK']['time'];
		$mgRPK_kills = $aPlayer['stats']['weapons']['mgRPK']['kills'];
		$mgRPK_shots = $aPlayer['stats']['weapons']['mgRPK']['shots'];
		$mgRPK_headshots = $aPlayer['stats']['weapons']['mgRPK']['headshots'];
		$mgRPK_hits = $aPlayer['stats']['weapons']['mgRPK']['hits'];

		$mgT88_time = $aPlayer['stats']['weapons']['mgT88']['time'];
		$mgT88_kills = $aPlayer['stats']['weapons']['mgT88']['kills'];
		$mgT88_shots = $aPlayer['stats']['weapons']['mgT88']['shots'];
		$mgT88_headshots = $aPlayer['stats']['weapons']['mgT88']['headshots'];
		$mgT88_hits = $aPlayer['stats']['weapons']['mgT88']['hits'];

		$pG17S_time = $aPlayer['stats']['weapons']['pG17S']['time'];
		$pG17S_kills = $aPlayer['stats']['weapons']['pG17S']['kills'];
		$pG17S_shots = $aPlayer['stats']['weapons']['pG17S']['shots'];
		$pG17S_headshots = $aPlayer['stats']['weapons']['pG17S']['headshots'];
		$pG17S_hits = $aPlayer['stats']['weapons']['pG17S']['hits'];
	
		$pG17_time = $aPlayer['stats']['weapons']['pG17']['time'];
		$pG17_kills = $aPlayer['stats']['weapons']['pG17']['kills'];
		$pG17_shots = $aPlayer['stats']['weapons']['pG17']['shots'];
		$pG17_headshots = $aPlayer['stats']['weapons']['pG17']['headshots'];
		$pG17_hits = $aPlayer['stats']['weapons']['pG17']['hits'];
	
		$pg18S_time = $aPlayer['stats']['weapons']['pg18S']['time'];
		$pg18S_kills = $aPlayer['stats']['weapons']['pg18S']['kills'];
		$pg18S_shots = $aPlayer['stats']['weapons']['pg18S']['shots'];
		$pg18S_headshots = $aPlayer['stats']['weapons']['pg18S']['headshots'];
		$pg18S_hits = $aPlayer['stats']['weapons']['pg18S']['hits'];
	
		$pg18_time = $aPlayer['stats']['weapons']['pg18']['time'];
		$pg18_kills = $aPlayer['stats']['weapons']['pg18']['kills'];
		$pg18_shots = $aPlayer['stats']['weapons']['pg18']['shots'];
		$pg18_headshots = $aPlayer['stats']['weapons']['pg18']['headshots'];
		$pg18_hits = $aPlayer['stats']['weapons']['pg18']['hits'];
	
		$pM1911L_time = $aPlayer['stats']['weapons']['pM1911L']['time'];
		$pM1911L_kills = $aPlayer['stats']['weapons']['pM1911L']['kills'];
		$pM1911L_shots = $aPlayer['stats']['weapons']['pM1911L']['shots'];
		$pM1911L_headshots = $aPlayer['stats']['weapons']['pM1911L']['headshots'];
		$pM1911L_hits = $aPlayer['stats']['weapons']['pM1911L']['hits'];
	
		$pM1911_time = $aPlayer['stats']['weapons']['pM1911']['time'];
		$pM1911_kills = $aPlayer['stats']['weapons']['pM1911']['kills'];
		$pM1911_shots = $aPlayer['stats']['weapons']['pM1911']['shots'];
		$pM1911_headshots = $aPlayer['stats']['weapons']['pM1911']['headshots'];
		$pM1911_hits = $aPlayer['stats']['weapons']['pM1911']['hits'];
	
		$pM1911S_time = $aPlayer['stats']['weapons']['pM1911S']['time'];
		$pM1911S_kills = $aPlayer['stats']['weapons']['pM1911S']['kills'];
		$pM1911S_shots = $aPlayer['stats']['weapons']['pM1911S']['shots'];
		$pM1911S_headshots = $aPlayer['stats']['weapons']['pM1911S']['headshots'];
		$pM1911S_hits = $aPlayer['stats']['weapons']['pM1911S']['hits'];
	
		$pM1911T_time = $aPlayer['stats']['weapons']['pM1911T']['time'];
		$pM1911T_kills = $aPlayer['stats']['weapons']['pM1911T']['kills'];
		$pM1911T_shots = $aPlayer['stats']['weapons']['pM1911T']['shots'];
		$pM1911T_headshots = $aPlayer['stats']['weapons']['pM1911T']['headshots'];
		$pM1911T_hits = $aPlayer['stats']['weapons']['pM1911T']['hits'];
	
		$pM412_time = $aPlayer['stats']['weapons']['pM412']['time'];
		$pM412_kills = $aPlayer['stats']['weapons']['pM412']['kills'];
		$pM412_shots = $aPlayer['stats']['weapons']['pM412']['shots'];
		$pM412_headshots = $aPlayer['stats']['weapons']['pM412']['headshots'];
		$pM412_hits = $aPlayer['stats']['weapons']['pM412']['hits'];
		
		$pM9F_time = $aPlayer['stats']['weapons']['pM9F']['time'];
		$pM9F_kills = $aPlayer['stats']['weapons']['pM9F']['kills'];
		$pM9F_shots = $aPlayer['stats']['weapons']['pM9F']['shots'];
		$pM9F_headshots = $aPlayer['stats']['weapons']['pM9F']['headshots'];
		$pM9F_hits = $aPlayer['stats']['weapons']['pM9F']['hits'];
	
		$pM9S_time = $aPlayer['stats']['weapons']['pM9S']['time'];
		$pM9S_kills = $aPlayer['stats']['weapons']['pM9S']['kills'];
		$pM9S_shots = $aPlayer['stats']['weapons']['pM9S']['shots'];
		$pM9S_headshots = $aPlayer['stats']['weapons']['pM9S']['headshots'];
		$pM9S_hits = $aPlayer['stats']['weapons']['pM9S']['hits'];
	
		$pM9_time = $aPlayer['stats']['weapons']['pM9']['time'];
		$pM9_kills = $aPlayer['stats']['weapons']['pM9']['kills'];
		$pM9_shots = $aPlayer['stats']['weapons']['pM9']['shots'];
		$pM9_headshots = $aPlayer['stats']['weapons']['pM9']['headshots'];
		$pM9_hits = $aPlayer['stats']['weapons']['pM9']['hits'];
	
		$pM93R_time = $aPlayer['stats']['weapons']['pM93R']['time'];
		$pM93R_kills = $aPlayer['stats']['weapons']['pM93R']['kills'];
		$pM93R_shots = $aPlayer['stats']['weapons']['pM93R']['shots'];
		$pM93R_headshots = $aPlayer['stats']['weapons']['pM93R']['headshots'];
		$pM93R_hits = $aPlayer['stats']['weapons']['pM93R']['hits'];
	
		$pMP443L_time = $aPlayer['stats']['weapons']['pMP443L']['time'];
		$pMP443L_kills = $aPlayer['stats']['weapons']['pMP443L']['kills'];
		$pMP443L_shots = $aPlayer['stats']['weapons']['pMP443L']['shots'];
		$pMP443L_headshots = $aPlayer['stats']['weapons']['pMP443L']['headshots'];
		$pMP443L_hits = $aPlayer['stats']['weapons']['pMP443L']['hits'];
	
		$pMP443S_time = $aPlayer['stats']['weapons']['pMP443S']['time'];
		$pMP443S_kills = $aPlayer['stats']['weapons']['pMP443S']['kills'];
		$pMP443S_shots = $aPlayer['stats']['weapons']['pMP443S']['shots'];
		$pMP443S_headshots = $aPlayer['stats']['weapons']['pMP443S']['headshots'];
		$pMP443S_hits = $aPlayer['stats']['weapons']['pMP443S']['hits'];
	
		$pMP443_time = $aPlayer['stats']['weapons']['pMP443']['time'];
		$pMP443_kills = $aPlayer['stats']['weapons']['pMP443']['kills'];
		$pMP443_shots = $aPlayer['stats']['weapons']['pMP443']['shots'];
		$pMP443_headshots = $aPlayer['stats']['weapons']['pMP443']['headshots'];
		$pMP443_hits = $aPlayer['stats']['weapons']['pMP443']['hits'];
		
		$pTaurS_time = $aPlayer['stats']['weapons']['pTaurS']['time'];
		$pTaurS_kills = $aPlayer['stats']['weapons']['pTaurS']['kills'];
		$pTaurS_shots = $aPlayer['stats']['weapons']['pTaurS']['shots'];
		$pTaurS_headshots = $aPlayer['stats']['weapons']['pTaurS']['headshots'];
		$pTaurS_hits = $aPlayer['stats']['weapons']['pTaurS']['hits'];
	
		$pTaur_time = $aPlayer['stats']['weapons']['pTaur']['time'];
		$pTaur_kills = $aPlayer['stats']['weapons']['pTaur']['kills'];
		$pTaur_shots = $aPlayer['stats']['weapons']['pTaur']['shots'];
		$pTaur_headshots = $aPlayer['stats']['weapons']['pTaur']['headshots'];
		$pTaur_hits = $aPlayer['stats']['weapons']['pTaur']['hits'];
	
		$sg870_time = $aPlayer['stats']['weapons']['sg870']['time'];
		$sg870_kills = $aPlayer['stats']['weapons']['sg870']['kills'];
		$sg870_shots = $aPlayer['stats']['weapons']['sg870']['shots'];
		$sg870_headshots = $aPlayer['stats']['weapons']['sg870']['headshots'];
		$sg870_hits = $aPlayer['stats']['weapons']['sg870']['hits'];
		
		$sgDAO_time = $aPlayer['stats']['weapons']['sgDAO']['time'];	
		$sgDAO_kills = $aPlayer['stats']['weapons']['sgDAO']['kills'];
		$sgDAO_shots = $aPlayer['stats']['weapons']['sgDAO']['shots'];
		$sgDAO_headshots = $aPlayer['stats']['weapons']['sgDAO']['headshots'];
		$sgDAO_hits = $aPlayer['stats']['weapons']['sgDAO']['hits'];
	
		$sgM1014_time = $aPlayer['stats']['weapons']['sgM1014']['time'];	
		$sgM1014_kills = $aPlayer['stats']['weapons']['sgM1014']['kills'];
		$sgM1014_shots = $aPlayer['stats']['weapons']['sgM1014']['shots'];
		$sgM1014_headshots = $aPlayer['stats']['weapons']['sgM1014']['headshots'];
		$sgM1014_hits = $aPlayer['stats']['weapons']['sgM1014']['hits'];
	
		$sgSaiga_time = $aPlayer['stats']['weapons']['sgSaiga']['time'];	
		$sgSaiga_kills = $aPlayer['stats']['weapons']['sgSaiga']['kills'];
		$sgSaiga_shots = $aPlayer['stats']['weapons']['sgSaiga']['shots'];
		$sgSaiga_headshots = $aPlayer['stats']['weapons']['sgSaiga']['headshots'];
		$sgSaiga_hits = $aPlayer['stats']['weapons']['sgSaiga']['hits'];
	
		$sgUSAS_time = $aPlayer['stats']['weapons']['sgUSAS']['time'];
		$sgUSAS_kills = $aPlayer['stats']['weapons']['sgUSAS']['kills'];
		$sgUSAS_shots = $aPlayer['stats']['weapons']['sgUSAS']['shots'];
		$sgUSAS_headshots = $aPlayer['stats']['weapons']['sgUSAS']['headshots'];
		$sgUSAS_hits = $aPlayer['stats']['weapons']['sgUSAS']['hits'];
	
		$smMP7_time = $aPlayer['stats']['weapons']['smMP7']['time'];
		$smMP7_kills = $aPlayer['stats']['weapons']['smMP7']['kills'];
		$smMP7_shots = $aPlayer['stats']['weapons']['smMP7']['shots'];
		$smMP7_headshots = $aPlayer['stats']['weapons']['smMP7']['headshots'];
		$smMP7_hits = $aPlayer['stats']['weapons']['smMP7']['hits'];
	
		$smP90_time = $aPlayer['stats']['weapons']['smP90']['time'];
		$smP90_kills = $aPlayer['stats']['weapons']['smP90']['kills'];
		$smP90_shots = $aPlayer['stats']['weapons']['smP90']['shots'];
		$smP90_headshots = $aPlayer['stats']['weapons']['smP90']['headshots'];
		$smP90_hits = $aPlayer['stats']['weapons']['smP90']['hits'];
	
		$smPDR_time = $aPlayer['stats']['weapons']['smPDR']['time'];
		$smPDR_kills = $aPlayer['stats']['weapons']['smPDR']['kills'];
		$smPDR_shots = $aPlayer['stats']['weapons']['smPDR']['shots'];
		$smPDR_headshots = $aPlayer['stats']['weapons']['smPDR']['headshots'];
		$smPDR_hits = $aPlayer['stats']['weapons']['smPDR']['hits'];
	
		$smPP2000_time = $aPlayer['stats']['weapons']['smPP2000']['time'];
		$smPP2000_kills = $aPlayer['stats']['weapons']['smPP2000']['kills'];
		$smPP2000_shots = $aPlayer['stats']['weapons']['smPP2000']['shots'];
		$smPP2000_headshots = $aPlayer['stats']['weapons']['smPP2000']['headshots'];
		$smPP2000_hits = $aPlayer['stats']['weapons']['smPP2000']['hits'];
	
		$smUMP_time = $aPlayer['stats']['weapons']['smUMP']['time'];
		$smUMP_kills = $aPlayer['stats']['weapons']['smUMP']['kills'];
		$smUMP_shots = $aPlayer['stats']['weapons']['smUMP']['shots'];
		$smUMP_headshots = $aPlayer['stats']['weapons']['smUMP']['headshots'];
		$smUMP_hits = $aPlayer['stats']['weapons']['smUMP']['hits'];
	
		$smVAL_time = $aPlayer['stats']['weapons']['smVAL']['time'];
		$smVAL_kills = $aPlayer['stats']['weapons']['smVAL']['kills'];
		$smVAL_shots = $aPlayer['stats']['weapons']['smVAL']['shots'];
		$smVAL_headshots = $aPlayer['stats']['weapons']['smVAL']['headshots'];
		$smVAL_hits = $aPlayer['stats']['weapons']['smVAL']['hits'];
		
		$srM39_time = $aPlayer['stats']['weapons']['srM39']['time'];
		$srM39_kills = $aPlayer['stats']['weapons']['srM39']['kills'];
		$srM39_shots = $aPlayer['stats']['weapons']['srM39']['shots'];
		$srM39_headshots = $aPlayer['stats']['weapons']['srM39']['headshots'];
		$srM39_hits = $aPlayer['stats']['weapons']['srM39']['hits'];
		
		$srM40_time = $aPlayer['stats']['weapons']['srM40']['time'];
		$srM40_kills = $aPlayer['stats']['weapons']['srM40']['kills'];
		$srM40_shots = $aPlayer['stats']['weapons']['srM40']['shots'];
		$srM40_headshots = $aPlayer['stats']['weapons']['srM40']['headshots'];
		$srM40_hits = $aPlayer['stats']['weapons']['srM40']['hits'];
	
		$srM98_time = $aPlayer['stats']['weapons']['srM98']['time'];
		$srM98_kills = $aPlayer['stats']['weapons']['srM98']['kills'];
		$srM98_shots = $aPlayer['stats']['weapons']['srM98']['shots'];
		$srM98_headshots = $aPlayer['stats']['weapons']['srM98']['headshots'];
		$srM98_hits = $aPlayer['stats']['weapons']['srM98']['hits'];
		
		$srMK11_time = $aPlayer['stats']['weapons']['srMK11']['time'];
		$srMK11_kills = $aPlayer['stats']['weapons']['srMK11']['kills'];
		$srMK11_shots = $aPlayer['stats']['weapons']['srMK11']['shots'];
		$srMK11_headshots = $aPlayer['stats']['weapons']['srMK11']['headshots'];
		$srMK11_hits = $aPlayer['stats']['weapons']['srMK11']['hits'];
	
		$srSKS_time = $aPlayer['stats']['weapons']['srSKS']['time'];
		$srSKS_kills = $aPlayer['stats']['weapons']['srSKS']['kills'];
		$srSKS_shots = $aPlayer['stats']['weapons']['srSKS']['shots'];
		$srSKS_headshots = $aPlayer['stats']['weapons']['srSKS']['headshots'];
		$srSKS_hits = $aPlayer['stats']['weapons']['srSKS']['hits'];
		
		$srSV98_time = $aPlayer['stats']['weapons']['srSV98']['time'];
		$srSV98_kills = $aPlayer['stats']['weapons']['srSV98']['kills'];
		$srSV98_shots = $aPlayer['stats']['weapons']['srSV98']['shots'];
		$srSV98_headshots = $aPlayer['stats']['weapons']['srSV98']['headshots'];
		$srSV98_hits = $aPlayer['stats']['weapons']['srSV98']['hits'];
	
		$srSVD_time = $aPlayer['stats']['weapons']['srSVD']['time'];
		$srSVD_kills = $aPlayer['stats']['weapons']['srSVD']['kills'];
		$srSVD_shots = $aPlayer['stats']['weapons']['srSVD']['shots'];
		$srSVD_headshots = $aPlayer['stats']['weapons']['srSVD']['headshots'];
		$srSVD_hits = $aPlayer['stats']['weapons']['srSVD']['hits'];
	
		$wahUSG_time = $aPlayer['stats']['weapons']['wahUSG']['time'];
		$wahUSG_kills = $aPlayer['stats']['weapons']['wahUSG']['kills'];
		$wahUSG_shots = $aPlayer['stats']['weapons']['wahUSG']['shots'];
		$wahUSG_headshots = $aPlayer['stats']['weapons']['wahUSG']['headshots'];
		$wahUSG_hits = $aPlayer['stats']['weapons']['wahUSG']['hits'];
		
		$wahUGL_time = $aPlayer['stats']['weapons']['wahUGL']['time'];
		$wahUGL_kills = $aPlayer['stats']['weapons']['wahUGL']['kills'];
		$wahUGL_shots = $aPlayer['stats']['weapons']['wahUGL']['shots'];
		$wahUGL_headshots = $aPlayer['stats']['weapons']['wahUGL']['headshots'];
		$wahUGL_hits = $aPlayer['stats']['weapons']['wahUGL']['hits'];
	
		$wasK_time = $aPlayer['stats']['weapons']['wasK']['time'];
		$wasK_kills = $aPlayer['stats']['weapons']['wasK']['kills'];
		$wasK_shots = $aPlayer['stats']['weapons']['wasK']['shots'];
		$wasK_headshots = $aPlayer['stats']['weapons']['wasK']['headshots'];
		$wasK_hits = $aPlayer['stats']['weapons']['wasK']['hits'];
	
		$wLAAFIM_time = $aPlayer['stats']['weapons']['wLAAFIM']['time'];
		$wLAAFIM_kills = $aPlayer['stats']['weapons']['wLAAFIM']['kills'];
		$wLAAFIM_shots = $aPlayer['stats']['weapons']['wLAAFIM']['shots'];
		$wLAAFIM_headshots = $aPlayer['stats']['weapons']['wLAAFIM']['headshots'];
		$wLAAFIM_hits = $aPlayer['stats']['weapons']['wLAAFIM']['hits'];
	
		$wLAAIGL_time = $aPlayer['stats']['weapons']['wLAAIGL']['time'];
		$wLAAIGL_kills = $aPlayer['stats']['weapons']['wLAAIGL']['kills'];
		$wLAAIGL_shots = $aPlayer['stats']['weapons']['wLAAIGL']['shots'];
		$wLAAIGL_headshots = $aPlayer['stats']['weapons']['wLAAIGL']['headshots'];
		$wLAAIGL_hits = $aPlayer['stats']['weapons']['wLAAIGL']['hits'];
	
		$wLATJAV_time = $aPlayer['stats']['weapons']['wLATJAV']['time'];
		$wLATJAV_kills = $aPlayer['stats']['weapons']['wLATJAV']['kills'];
		$wLATJAV_shots = $aPlayer['stats']['weapons']['wLATJAV']['shots'];
		$wLATJAV_headshots = $aPlayer['stats']['weapons']['wLATJAV']['headshots'];
		$wLATJAV_hits = $aPlayer['stats']['weapons']['wLATJAV']['hits'];
	
		$wLATRPG_time = $aPlayer['stats']['weapons']['wLATRPG']['time'];
		$wLATRPG_kills = $aPlayer['stats']['weapons']['wLATRPG']['kills'];
		$wLATRPG_shots = $aPlayer['stats']['weapons']['wLATRPG']['shots'];
		$wLATRPG_headshots = $aPlayer['stats']['weapons']['wLATRPG']['headshots'];
		$wLATRPG_hits = $aPlayer['stats']['weapons']['wLATRPG']['hits'];
	
		$wLATSMAW_time = $aPlayer['stats']['weapons']['wLATSMAW']['time'];
		$wLATSMAW_kills = $aPlayer['stats']['weapons']['wLATSMAW']['kills'];
		$wLATSMAW_shots = $aPlayer['stats']['weapons']['wLATSMAW']['shots'];
		$wLATSMAW_headshots = $aPlayer['stats']['weapons']['wLATSMAW']['headshots'];
		$wLATSMAW_hits = $aPlayer['stats']['weapons']['wLATSMAW']['hits'];
		
		$arFAMAS_time = $aPlayer['stats']['weapons']['arFAMAS']['time'];
		$arFAMAS_kills = $aPlayer['stats']['weapons']['arFAMAS']['kills'];
		$arFAMAS_shots = $aPlayer['stats']['weapons']['arFAMAS']['shots'];
		$arFAMAS_headshots = $aPlayer['stats']['weapons']['arFAMAS']['headshots'];
		$arFAMAS_hits = $aPlayer['stats']['weapons']['arFAMAS']['hits'];
		
		$arL85A2_time = $aPlayer['stats']['weapons']['arL85A2']['time'];
		$arL85A2_kills = $aPlayer['stats']['weapons']['arL85A2']['kills'];
		$arL85A2_shots = $aPlayer['stats']['weapons']['arL85A2']['shots'];
		$arL85A2_headshots = $aPlayer['stats']['weapons']['arL85A2']['headshots'];
		$arL85A2_hits = $aPlayer['stats']['weapons']['arL85A2']['hits'];
		
		$caHK53_time = $aPlayer['stats']['weapons']['caHK53']['time'];
		$caHK53_kills = $aPlayer['stats']['weapons']['caHK53']['kills'];
		$caHK53_shots = $aPlayer['stats']['weapons']['caHK53']['shots'];
		$caHK53_headshots = $aPlayer['stats']['weapons']['caHK53']['headshots'];
		$caHK53_hits = $aPlayer['stats']['weapons']['caHK53']['hits'];
		
		$caQBZ95B_time = $aPlayer['stats']['weapons']['caQBZ95B']['time'];
		$caQBZ95B_kills = $aPlayer['stats']['weapons']['caQBZ95B']['kills'];
		$caQBZ95B_shots = $aPlayer['stats']['weapons']['caQBZ95B']['shots'];
		$caQBZ95B_headshots = $aPlayer['stats']['weapons']['caQBZ95B']['headshots'];
		$caQBZ95B_hits = $aPlayer['stats']['weapons']['caQBZ95B']['hits'];
		
		$mgQBB95_time = $aPlayer['stats']['weapons']['mgQBB95']['time'];
		$mgQBB95_kills = $aPlayer['stats']['weapons']['mgQBB95']['kills'];
		$mgQBB95_shots = $aPlayer['stats']['weapons']['mgQBB95']['shots'];
		$mgQBB95_headshots = $aPlayer['stats']['weapons']['mgQBB95']['headshots'];
		$mgQBB95_hits = $aPlayer['stats']['weapons']['mgQBB95']['hits'];
		
		$mgMG36_time = $aPlayer['stats']['weapons']['mgMG36']['time'];
		$mgMG36_kills = $aPlayer['stats']['weapons']['mgMG36']['kills'];
		$mgMG36_shots = $aPlayer['stats']['weapons']['mgMG36']['shots'];
		$mgMG36_headshots = $aPlayer['stats']['weapons']['mgMG36']['headshots'];
		$mgMG36_hits = $aPlayer['stats']['weapons']['mgMG36']['hits'];
		
		$srQBU88_time = $aPlayer['stats']['weapons']['srQBU88']['time'];
		$srQBU88_kills = $aPlayer['stats']['weapons']['srQBU88']['kills'];
		$srQBU88_shots = $aPlayer['stats']['weapons']['srQBU88']['shots'];
		$srQBU88_headshots = $aPlayer['stats']['weapons']['srQBU88']['headshots'];
		$srQBU88_hits = $aPlayer['stats']['weapons']['srQBU88']['hits'];
		
		$srL96_time = $aPlayer['stats']['weapons']['srL96']['time'];
		$srL96_kills = $aPlayer['stats']['weapons']['srL96']['kills'];
		$srL96_shots = $aPlayer['stats']['weapons']['srL96']['shots'];
		$srL96_headshots = $aPlayer['stats']['weapons']['srL96']['headshots'];
		$srL96_hits = $aPlayer['stats']['weapons']['srL96']['hits'];
		
		$smPP19_time = $aPlayer['stats']['weapons']['smPP19']['time'];
		$smPP19_kills = $aPlayer['stats']['weapons']['smPP19']['kills'];
		$smPP19_shots = $aPlayer['stats']['weapons']['smPP19']['shots'];
		$smPP19_headshots = $aPlayer['stats']['weapons']['smPP19']['headshots'];
		$smPP19_hits = $aPlayer['stats']['weapons']['smPP19']['hits'];
		
		$sgJackH_time = $aPlayer['stats']['weapons']['sgJackH']['time'];
		$sgJackH_kills = $aPlayer['stats']['weapons']['sgJackH']['kills'];
		$sgJackH_shots = $aPlayer['stats']['weapons']['sgJackH']['shots'];
		$sgJackH_headshots = $aPlayer['stats']['weapons']['sgJackH']['headshots'];
		$sgJackH_hits = $aPlayer['stats']['weapons']['sgJackH']['hits'];
		
		$arAUG_time = $aPlayer['stats']['weapons']['arAUG']['time'];
		$arAUG_kills = $aPlayer['stats']['weapons']['arAUG']['kills'];
		$arAUG_shots = $aPlayer['stats']['weapons']['arAUG']['shots'];
		$arAUG_headshots = $aPlayer['stats']['weapons']['arAUG']['headshots'];
		$arAUG_hits = $aPlayer['stats']['weapons']['arAUG']['hits'];
	
	  $arSCARL_time = $aPlayer['stats']['weapons']['arSCARL']['time'];
		$arSCARL_kills = $aPlayer['stats']['weapons']['arSCARL']['kills'];
		$arSCARL_shots = $aPlayer['stats']['weapons']['arSCARL']['shots'];
		$arSCARL_headshots = $aPlayer['stats']['weapons']['arSCARL']['headshots'];
		$arSCARL_hits = $aPlayer['stats']['weapons']['arSCARL']['hits'];
	  
	  $mgL86A1_time = $aPlayer['stats']['weapons']['mgL86A1']['time'];
		$mgL86A1_kills = $aPlayer['stats']['weapons']['mgL86A1']['kills'];
		$mgL86A1_shots = $aPlayer['stats']['weapons']['mgL86A1']['shots'];
		$mgL86A1_headshots = $aPlayer['stats']['weapons']['mgL86A1']['headshots'];
		$mgL86A1_hits = $aPlayer['stats']['weapons']['mgL86A1']['hits'];
	
	  $mgLSAT_time = $aPlayer['stats']['weapons']['mgLSAT']['time'];
		$mgLSAT_kills = $aPlayer['stats']['weapons']['mgLSAT']['kills'];
		$mgLSAT_shots = $aPlayer['stats']['weapons']['mgLSAT']['shots'];
		$mgLSAT_headshots = $aPlayer['stats']['weapons']['mgLSAT']['headshots'];
		$mgLSAT_hits = $aPlayer['stats']['weapons']['mgLSAT']['hits'];
	
	  $caACR_time = $aPlayer['stats']['weapons']['caACR']['time'];
		$caACR_kills = $aPlayer['stats']['weapons']['caACR']['kills'];
		$caACR_shots = $aPlayer['stats']['weapons']['caACR']['shots'];
		$caACR_headshots = $aPlayer['stats']['weapons']['caACR']['headshots'];
		$caACR_hits = $aPlayer['stats']['weapons']['caACR']['hits'];
	  
	  $caMTAR21_time = $aPlayer['stats']['weapons']['caMTAR21']['time'];
		$caMTAR21_kills = $aPlayer['stats']['weapons']['caMTAR21']['kills'];
		$caMTAR21_shots = $aPlayer['stats']['weapons']['caMTAR21']['shots'];
		$caMTAR21_headshots = $aPlayer['stats']['weapons']['caMTAR21']['headshots'];
		$caMTAR21_hits = $aPlayer['stats']['weapons']['caMTAR21']['hits'];
	  
	  $srHK417_time = $aPlayer['stats']['weapons']['srHK417']['time'];
		$srHK417_kills = $aPlayer['stats']['weapons']['srHK417']['kills'];
		$srHK417_shots = $aPlayer['stats']['weapons']['srHK417']['shots'];
		$srHK417_headshots = $aPlayer['stats']['weapons']['srHK417']['headshots'];
		$srHK417_hits = $aPlayer['stats']['weapons']['srHK417']['hits'];
	  
	  $srJNG90_time = $aPlayer['stats']['weapons']['srJNG90']['time'];
		$srJNG90_kills = $aPlayer['stats']['weapons']['srJNG90']['kills'];
		$srJNG90_shots = $aPlayer['stats']['weapons']['srJNG90']['shots'];
		$srJNG90_headshots = $aPlayer['stats']['weapons']['srJNG90']['headshots'];
		$srJNG90_hits = $aPlayer['stats']['weapons']['srJNG90']['hits'];
	  
	  $sgSPAS12_time = $aPlayer['stats']['weapons']['sgSPAS12']['time'];
		$sgSPAS12_kills = $aPlayer['stats']['weapons']['sgSPAS12']['kills'];
		$sgSPAS12_shots = $aPlayer['stats']['weapons']['sgSPAS12']['shots'];
		$sgSPAS12_headshots = $aPlayer['stats']['weapons']['sgSPAS12']['headshots'];
		$sgSPAS12_hits = $aPlayer['stats']['weapons']['sgSPAS12']['hits'];
	  
	  $smM5K_time = $aPlayer['stats']['weapons']['smM5K']['time'];
		$smM5K_kills = $aPlayer['stats']['weapons']['smM5K']['kills'];
		$smM5K_shots = $aPlayer['stats']['weapons']['smM5K']['shots'];
		$smM5K_headshots = $aPlayer['stats']['weapons']['smM5K']['headshots'];
		$smM5K_hits = $aPlayer['stats']['weapons']['smM5K']['hits'];
	
	
	
	
		$arAEK_date = $aPlayer['stats']['weapons']['arAEK']['star']['date'];				
		$arAK74_date = $aPlayer['stats']['weapons']['arAK74']['star']['date'];
		$arAN94_date = $aPlayer['stats']['weapons']['arAN94']['star']['date'];		
		$arF2_date = $aPlayer['stats']['weapons']['arF2']['star']['date'];				
		$arG3_date = $aPlayer['stats']['weapons']['arG3']['star']['date'];			
		$arKH_date = $aPlayer['stats']['weapons']['arKH']['star']['date'];				
  	$arM16_date = $aPlayer['stats']['weapons']['arM16']['star']['date'];				
		$arM416_date = $aPlayer['stats']['weapons']['arM416']['star']['date'];				
		$caA91_date = $aPlayer['stats']['weapons']['caA91']['star']['date'];			
		$caAKS_date = $aPlayer['stats']['weapons']['caAKS']['star']['date'];			
		$caG36_date = $aPlayer['stats']['weapons']['caG36']['star']['date'];				
		$caM4_date = $aPlayer['stats']['weapons']['caM4']['star']['date'];				
		$caSCAR_date = $aPlayer['stats']['weapons']['caSCAR']['star']['date'];		
		$caSG553_date = $aPlayer['stats']['weapons']['caSG553']['star']['date'];	
		$mgM240_date = $aPlayer['stats']['weapons']['mgM240']['star']['date'];	
		$mgM249_date = $aPlayer['stats']['weapons']['mgM249']['star']['date'];				
		$mgM27_date = $aPlayer['stats']['weapons']['mgM27']['star']['date'];			
		$mgM60_date = $aPlayer['stats']['weapons']['mgM60']['star']['date'];				
		$mgPech_date = $aPlayer['stats']['weapons']['mgPech']['star']['date'];		
		$mgRPK_date = $aPlayer['stats']['weapons']['mgRPK']['star']['date'];				
		$mgT88_date = $aPlayer['stats']['weapons']['mgT88']['star']['date'];
		$pG17S_date = $aPlayer['stats']['weapons']['pG17S']['star']['date'];				
		$pG17_date = $aPlayer['stats']['weapons']['pG17']['star']['date'];		
		$pg18S_date = $aPlayer['stats']['weapons']['pg18S']['star']['date'];			
		$pg18_date = $aPlayer['stats']['weapons']['pg18']['star']['date'];		
		$pM1911L_date = $aPlayer['stats']['weapons']['pM1911L']['star']['date'];			
		$pM1911_date = $aPlayer['stats']['weapons']['pM1911']['star']['date'];	
		$pM1911S_date = $aPlayer['stats']['weapons']['pM1911S']['star']['date'];		
	  $pM1911T_date = $aPlayer['stats']['weapons']['pM1911T']['star']['date'];				
		$pM412_date = $aPlayer['stats']['weapons']['pM412']['star']['date'];		
		$pM9F_date = $aPlayer['stats']['weapons']['pM9F']['star']['date'];		
		$pM9S_date = $aPlayer['stats']['weapons']['pM9S']['star']['date'];		
		$pM9_date = $aPlayer['stats']['weapons']['pM9']['star']['date'];			
		$pM93R_date = $aPlayer['stats']['weapons']['pM93R']['star']['date'];		
		$pMP443L_date = $aPlayer['stats']['weapons']['pMP443L']['star']['date'];				
		$pMP443S_date = $aPlayer['stats']['weapons']['pMP443S']['star']['date'];
		$pMP443_date = $aPlayer['stats']['weapons']['pMP443']['star']['date'];				
		$pTaurS_date = $aPlayer['stats']['weapons']['pTaurS']['star']['date'];		
		$pTaur_date = $aPlayer['stats']['weapons']['pTaur']['star']['date'];				
		$sg870_date = $aPlayer['stats']['weapons']['sg870']['star']['date'];			
		$sgDAO_date = $aPlayer['stats']['weapons']['sgDAO']['star']['date'];				
		$sgM1014_date = $aPlayer['stats']['weapons']['sgM1014']['star']['date'];		
		$sgSaiga_date = $aPlayer['stats']['weapons']['sgSaiga']['star']['date'];				
		$sgUSAS_date = $aPlayer['stats']['weapons']['sgUSAS']['star']['date'];
		$smMP7_date = $aPlayer['stats']['weapons']['smMP7']['star']['date'];				
		$smP90_date = $aPlayer['stats']['weapons']['smP90']['star']['date'];		
		$smPDR_date = $aPlayer['stats']['weapons']['smPDR']['star']['date'];		
		$smPP2000_date = $aPlayer['stats']['weapons']['smPP2000']['star']['date'];		
		$smUMP_date = $aPlayer['stats']['weapons']['smUMP']['star']['date'];				
		$smVAL_date = $aPlayer['stats']['weapons']['smVAL']['star']['date'];		
		$srM39_date = $aPlayer['stats']['weapons']['srM39']['star']['date'];			
		$srM40_date = $aPlayer['stats']['weapons']['srM40']['star']['date'];
		$srM98_date = $aPlayer['stats']['weapons']['srM98']['star']['date'];				
		$srMK11_date = $aPlayer['stats']['weapons']['srMK11']['star']['date'];
		$srSKS_date = $aPlayer['stats']['weapons']['srSKS']['star']['date'];			
		$srSV98_date = $aPlayer['stats']['weapons']['srSV98']['star']['date'];
		$srSVD_date = $aPlayer['stats']['weapons']['srSVD']['star']['date'];			
		$wahUSG_date = $aPlayer['stats']['weapons']['wahUSG']['star']['date'];		
		$wahUGL_date = $aPlayer['stats']['weapons']['wahUGL']['star']['date'];			
		$wasK_date = $aPlayer['stats']['weapons']['wasK']['star']['date'];		
		$wLAAFIM_date = $aPlayer['stats']['weapons']['wLAAFIM']['star']['date'];	
		$wLAAIGL_date = $aPlayer['stats']['weapons']['wLAAIGL']['star']['date'];
		$wLATJAV_date = $aPlayer['stats']['weapons']['wLATJAV']['star']['date'];			
		$wLATRPG_date = $aPlayer['stats']['weapons']['wLATRPG']['star']['date'];
		$wLATSMAW_date = $aPlayer['stats']['weapons']['wLATSMAW']['star']['date'];	
		$arAEK_curr = $aPlayer['stats']['weapons']['arAEK']['star']['curr'];				
		$arAK74_curr = $aPlayer['stats']['weapons']['arAK74']['star']['curr'];
		$arAN94_curr = $aPlayer['stats']['weapons']['arAN94']['star']['curr'];		
		$arF2_curr = $aPlayer['stats']['weapons']['arF2']['star']['curr'];				
		$arG3_curr = $aPlayer['stats']['weapons']['arG3']['star']['curr'];			
		$arKH_curr = $aPlayer['stats']['weapons']['arKH']['star']['curr'];				
  	$arM16_curr = $aPlayer['stats']['weapons']['arM16']['star']['curr'];				
		$arM416_curr = $aPlayer['stats']['weapons']['arM416']['star']['curr'];				
		$caA91_curr = $aPlayer['stats']['weapons']['caA91']['star']['curr'];			
		$caAKS_curr = $aPlayer['stats']['weapons']['caAKS']['star']['curr'];			
		$caG36_curr = $aPlayer['stats']['weapons']['caG36']['star']['curr'];				
		$caM4_curr = $aPlayer['stats']['weapons']['caM4']['star']['curr'];				
		$caSCAR_curr = $aPlayer['stats']['weapons']['caSCAR']['star']['curr'];		
		$caSG553_curr = $aPlayer['stats']['weapons']['caSG553']['star']['curr'];	
		$mgM240_curr = $aPlayer['stats']['weapons']['mgM240']['star']['curr'];	
		$mgM249_curr = $aPlayer['stats']['weapons']['mgM249']['star']['curr'];				
		$mgM27_curr = $aPlayer['stats']['weapons']['mgM27']['star']['curr'];			
		$mgM60_curr = $aPlayer['stats']['weapons']['mgM60']['star']['curr'];				
		$mgPech_curr = $aPlayer['stats']['weapons']['mgPech']['star']['curr'];		
		$mgRPK_curr = $aPlayer['stats']['weapons']['mgRPK']['star']['curr'];				
		$mgT88_curr = $aPlayer['stats']['weapons']['mgT88']['star']['curr'];
		$pG17S_curr = $aPlayer['stats']['weapons']['pG17S']['star']['curr'];				
		$pG17_curr = $aPlayer['stats']['weapons']['pG17']['star']['curr'];		
		$pg18S_curr = $aPlayer['stats']['weapons']['pg18S']['star']['curr'];			
		$pg18_curr = $aPlayer['stats']['weapons']['pg18']['star']['curr'];		
		$pM1911L_curr = $aPlayer['stats']['weapons']['pM1911L']['star']['curr'];			
		$pM1911_curr = $aPlayer['stats']['weapons']['pM1911']['star']['curr'];	
		$pM1911S_curr = $aPlayer['stats']['weapons']['pM1911S']['star']['curr'];		
	  $pM1911T_curr = $aPlayer['stats']['weapons']['pM1911T']['star']['curr'];				
		$pM412_curr = $aPlayer['stats']['weapons']['pM412']['star']['curr'];		
		$pM9F_curr = $aPlayer['stats']['weapons']['pM9F']['star']['curr'];		
		$pM9S_curr = $aPlayer['stats']['weapons']['pM9S']['star']['curr'];		
		$pM9_curr = $aPlayer['stats']['weapons']['pM9']['star']['curr'];			
		$pM93R_curr = $aPlayer['stats']['weapons']['pM93R']['star']['curr'];		
		$pMP443L_curr = $aPlayer['stats']['weapons']['pMP443L']['star']['curr'];				
		$pMP443S_curr = $aPlayer['stats']['weapons']['pMP443S']['star']['curr'];
		$pMP443_curr = $aPlayer['stats']['weapons']['pMP443']['star']['curr'];				
		$pTaurS_curr = $aPlayer['stats']['weapons']['pTaurS']['star']['curr'];		
		$pTaur_curr = $aPlayer['stats']['weapons']['pTaur']['star']['curr'];				
		$sg870_curr = $aPlayer['stats']['weapons']['sg870']['star']['curr'];			
		$sgDAO_curr = $aPlayer['stats']['weapons']['sgDAO']['star']['curr'];				
		$sgM1014_curr = $aPlayer['stats']['weapons']['sgM1014']['star']['curr'];		
		$sgSaiga_curr = $aPlayer['stats']['weapons']['sgSaiga']['star']['curr'];				
		$sgUSAS_curr = $aPlayer['stats']['weapons']['sgUSAS']['star']['curr'];
		$smMP7_curr = $aPlayer['stats']['weapons']['smMP7']['star']['curr'];				
		$smP90_curr = $aPlayer['stats']['weapons']['smP90']['star']['curr'];		
		$smPDR_curr = $aPlayer['stats']['weapons']['smPDR']['star']['curr'];		
		$smPP2000_curr = $aPlayer['stats']['weapons']['smPP2000']['star']['curr'];		
		$smUMP_curr = $aPlayer['stats']['weapons']['smUMP']['star']['curr'];				
		$smVAL_curr = $aPlayer['stats']['weapons']['smVAL']['star']['curr'];		
		$srM39_curr = $aPlayer['stats']['weapons']['srM39']['star']['curr'];			
		$srM40_curr = $aPlayer['stats']['weapons']['srM40']['star']['curr'];
		$srM98_curr = $aPlayer['stats']['weapons']['srM98']['star']['curr'];				
		$srMK11_curr = $aPlayer['stats']['weapons']['srMK11']['star']['curr'];
		$srSKS_curr = $aPlayer['stats']['weapons']['srSKS']['star']['curr'];			
		$srSV98_curr = $aPlayer['stats']['weapons']['srSV98']['star']['curr'];
		$srSVD_curr = $aPlayer['stats']['weapons']['srSVD']['star']['curr'];			
		$wahUSG_curr = $aPlayer['stats']['weapons']['wahUSG']['star']['curr'];		
		$wahUGL_curr = $aPlayer['stats']['weapons']['wahUGL']['star']['curr'];			
		$wasK_curr = $aPlayer['stats']['weapons']['wasK']['star']['curr'];		
		$wLAAFIM_curr = $aPlayer['stats']['weapons']['wLAAFIM']['star']['curr'];	
		$wLAAIGL_curr = $aPlayer['stats']['weapons']['wLAAIGL']['star']['curr'];
		$wLATJAV_curr = $aPlayer['stats']['weapons']['wLATJAV']['star']['curr'];			
		$wLATRPG_curr = $aPlayer['stats']['weapons']['wLATRPG']['star']['curr'];
		$wLATSMAW_curr = $aPlayer['stats']['weapons']['wLATSMAW']['star']['curr'];		
		$arAEK_needed = $aPlayer['stats']['weapons']['arAEK']['star']['needed'];				
		$arAK74_needed = $aPlayer['stats']['weapons']['arAK74']['star']['needed'];
		$arAN94_needed = $aPlayer['stats']['weapons']['arAN94']['star']['needed'];		
		$arF2_needed = $aPlayer['stats']['weapons']['arF2']['star']['needed'];				
		$arG3_needed = $aPlayer['stats']['weapons']['arG3']['star']['needed'];			
		$arKH_needed = $aPlayer['stats']['weapons']['arKH']['star']['needed'];				
  	$arM16_needed = $aPlayer['stats']['weapons']['arM16']['star']['needed'];				
		$arM416_needed = $aPlayer['stats']['weapons']['arM416']['star']['needed'];				
		$caA91_needed = $aPlayer['stats']['weapons']['caA91']['star']['needed'];			
		$caAKS_needed = $aPlayer['stats']['weapons']['caAKS']['star']['needed'];			
		$caG36_needed = $aPlayer['stats']['weapons']['caG36']['star']['needed'];				
		$caM4_needed = $aPlayer['stats']['weapons']['caM4']['star']['needed'];				
		$caSCAR_needed = $aPlayer['stats']['weapons']['caSCAR']['star']['needed'];		
		$caSG553_needed = $aPlayer['stats']['weapons']['caSG553']['star']['needed'];	
		$mgM240_needed = $aPlayer['stats']['weapons']['mgM240']['star']['needed'];	
		$mgM249_needed = $aPlayer['stats']['weapons']['mgM249']['star']['needed'];				
		$mgM27_needed = $aPlayer['stats']['weapons']['mgM27']['star']['needed'];			
		$mgM60_needed = $aPlayer['stats']['weapons']['mgM60']['star']['needed'];				
		$mgPech_needed = $aPlayer['stats']['weapons']['mgPech']['star']['needed'];		
		$mgRPK_needed = $aPlayer['stats']['weapons']['mgRPK']['star']['needed'];				
		$mgT88_needed = $aPlayer['stats']['weapons']['mgT88']['star']['needed'];
		$pG17S_needed = $aPlayer['stats']['weapons']['pG17S']['star']['needed'];				
		$pG17_needed = $aPlayer['stats']['weapons']['pG17']['star']['needed'];		
		$pg18S_needed = $aPlayer['stats']['weapons']['pg18S']['star']['needed'];			
		$pg18_needed = $aPlayer['stats']['weapons']['pg18']['star']['needed'];		
		$pM1911L_needed = $aPlayer['stats']['weapons']['pM1911L']['star']['needed'];			
		$pM1911_needed = $aPlayer['stats']['weapons']['pM1911']['star']['needed'];	
		$pM1911S_needed = $aPlayer['stats']['weapons']['pM1911S']['star']['needed'];		
	  $pM1911T_needed = $aPlayer['stats']['weapons']['pM1911T']['star']['needed'];				
		$pM412_needed = $aPlayer['stats']['weapons']['pM412']['star']['needed'];		
		$pM9F_needed = $aPlayer['stats']['weapons']['pM9F']['star']['needed'];		
		$pM9S_needed = $aPlayer['stats']['weapons']['pM9S']['star']['needed'];		
		$pM9_needed = $aPlayer['stats']['weapons']['pM9']['star']['needed'];			
		$pM93R_needed = $aPlayer['stats']['weapons']['pM93R']['star']['needed'];		
		$pMP443L_needed = $aPlayer['stats']['weapons']['pMP443L']['star']['needed'];				
		$pMP443S_needed = $aPlayer['stats']['weapons']['pMP443S']['star']['needed'];
		$pMP443_needed = $aPlayer['stats']['weapons']['pMP443']['star']['needed'];				
		$pTaurS_needed = $aPlayer['stats']['weapons']['pTaurS']['star']['needed'];		
		$pTaur_needed = $aPlayer['stats']['weapons']['pTaur']['star']['needed'];				
		$sg870_needed = $aPlayer['stats']['weapons']['sg870']['star']['needed'];			
		$sgDAO_needed = $aPlayer['stats']['weapons']['sgDAO']['star']['needed'];				
		$sgM1014_needed = $aPlayer['stats']['weapons']['sgM1014']['star']['needed'];		
		$sgSaiga_needed = $aPlayer['stats']['weapons']['sgSaiga']['star']['needed'];				
		$sgUSAS_needed = $aPlayer['stats']['weapons']['sgUSAS']['star']['needed'];
		$smMP7_needed = $aPlayer['stats']['weapons']['smMP7']['star']['needed'];				
		$smP90_needed = $aPlayer['stats']['weapons']['smP90']['star']['needed'];		
		$smPDR_needed = $aPlayer['stats']['weapons']['smPDR']['star']['needed'];		
		$smPP2000_needed = $aPlayer['stats']['weapons']['smPP2000']['star']['needed'];		
		$smUMP_needed = $aPlayer['stats']['weapons']['smUMP']['star']['needed'];				
		$smVAL_needed = $aPlayer['stats']['weapons']['smVAL']['star']['needed'];		
		$srM39_needed = $aPlayer['stats']['weapons']['srM39']['star']['needed'];			
		$srM40_needed = $aPlayer['stats']['weapons']['srM40']['star']['needed'];
		$srM98_needed = $aPlayer['stats']['weapons']['srM98']['star']['needed'];				
		$srMK11_needed = $aPlayer['stats']['weapons']['srMK11']['star']['needed'];
		$srSKS_needed = $aPlayer['stats']['weapons']['srSKS']['star']['needed'];			
		$srSV98_needed = $aPlayer['stats']['weapons']['srSV98']['star']['needed'];
		$srSVD_needed = $aPlayer['stats']['weapons']['srSVD']['star']['needed'];			
		$wahUSG_needed = $aPlayer['stats']['weapons']['wahUSG']['star']['needed'];		
		$wahUGL_needed = $aPlayer['stats']['weapons']['wahUGL']['star']['needed'];			
		$wasK_needed = $aPlayer['stats']['weapons']['wasK']['star']['needed'];		
		$wLAAFIM_needed = $aPlayer['stats']['weapons']['wLAAFIM']['star']['needed'];	
		$wLAAIGL_needed = $aPlayer['stats']['weapons']['wLAAIGL']['star']['needed'];
		$wLATJAV_needed = $aPlayer['stats']['weapons']['wLATJAV']['star']['needed'];			
		$wLATRPG_needed = $aPlayer['stats']['weapons']['wLATRPG']['star']['needed'];
		$wLATSMAW_needed = $aPlayer['stats']['weapons']['wLATSMAW']['star']['needed'];	
		$arAEK_count = $aPlayer['stats']['weapons']['arAEK']['star']['count'];				
		$arAK74_count = $aPlayer['stats']['weapons']['arAK74']['star']['count'];
		$arAN94_count = $aPlayer['stats']['weapons']['arAN94']['star']['count'];		
		$arF2_count = $aPlayer['stats']['weapons']['arF2']['star']['count'];				
		$arG3_count = $aPlayer['stats']['weapons']['arG3']['star']['count'];			
		$arKH_count = $aPlayer['stats']['weapons']['arKH']['star']['count'];				
  	$arM16_count = $aPlayer['stats']['weapons']['arM16']['star']['count'];				
		$arM416_count = $aPlayer['stats']['weapons']['arM416']['star']['count'];				
		$caA91_count = $aPlayer['stats']['weapons']['caA91']['star']['count'];			
		$caAKS_count = $aPlayer['stats']['weapons']['caAKS']['star']['count'];			
		$caG36_count = $aPlayer['stats']['weapons']['caG36']['star']['count'];				
		$caM4_count = $aPlayer['stats']['weapons']['caM4']['star']['count'];				
		$caSCAR_count = $aPlayer['stats']['weapons']['caSCAR']['star']['count'];		
		$caSG553_count = $aPlayer['stats']['weapons']['caSG553']['star']['count'];	
		$mgM240_count = $aPlayer['stats']['weapons']['mgM240']['star']['count'];	
		$mgM249_count = $aPlayer['stats']['weapons']['mgM249']['star']['count'];				
		$mgM27_count = $aPlayer['stats']['weapons']['mgM27']['star']['count'];			
		$mgM60_count = $aPlayer['stats']['weapons']['mgM60']['star']['count'];				
		$mgPech_count = $aPlayer['stats']['weapons']['mgPech']['star']['count'];		
		$mgRPK_count = $aPlayer['stats']['weapons']['mgRPK']['star']['count'];				
		$mgT88_count = $aPlayer['stats']['weapons']['mgT88']['star']['count'];
		$pG17S_count = $aPlayer['stats']['weapons']['pG17S']['star']['count'];				
		$pG17_count = $aPlayer['stats']['weapons']['pG17']['star']['count'];		
		$pg18S_count = $aPlayer['stats']['weapons']['pg18S']['star']['count'];			
		$pg18_count = $aPlayer['stats']['weapons']['pg18']['star']['count'];		
		$pM1911L_count = $aPlayer['stats']['weapons']['pM1911L']['star']['count'];			
		$pM1911_count = $aPlayer['stats']['weapons']['pM1911']['star']['count'];	
		$pM1911S_count = $aPlayer['stats']['weapons']['pM1911S']['star']['count'];		
	  $pM1911T_count = $aPlayer['stats']['weapons']['pM1911T']['star']['count'];				
		$pM412_count = $aPlayer['stats']['weapons']['pM412']['star']['count'];		
		$pM9F_count = $aPlayer['stats']['weapons']['pM9F']['star']['count'];		
		$pM9S_count = $aPlayer['stats']['weapons']['pM9S']['star']['count'];		
		$pM9_count = $aPlayer['stats']['weapons']['pM9']['star']['count'];			
		$pM93R_count = $aPlayer['stats']['weapons']['pM93R']['star']['count'];		
		$pMP443L_count = $aPlayer['stats']['weapons']['pMP443L']['star']['count'];				
		$pMP443S_count = $aPlayer['stats']['weapons']['pMP443S']['star']['count'];
		$pMP443_count = $aPlayer['stats']['weapons']['pMP443']['star']['count'];				
		$pTaurS_count = $aPlayer['stats']['weapons']['pTaurS']['star']['count'];		
		$pTaur_count = $aPlayer['stats']['weapons']['pTaur']['star']['count'];				
		$sg870_count = $aPlayer['stats']['weapons']['sg870']['star']['count'];			
		$sgDAO_count = $aPlayer['stats']['weapons']['sgDAO']['star']['count'];				
		$sgM1014_count = $aPlayer['stats']['weapons']['sgM1014']['star']['count'];		
		$sgSaiga_count = $aPlayer['stats']['weapons']['sgSaiga']['star']['count'];				
		$sgUSAS_count = $aPlayer['stats']['weapons']['sgUSAS']['star']['count'];
		$smMP7_count = $aPlayer['stats']['weapons']['smMP7']['star']['count'];				
		$smP90_count = $aPlayer['stats']['weapons']['smP90']['star']['count'];		
		$smPDR_count = $aPlayer['stats']['weapons']['smPDR']['star']['count'];		
		$smPP2000_count = $aPlayer['stats']['weapons']['smPP2000']['star']['count'];		
		$smUMP_count = $aPlayer['stats']['weapons']['smUMP']['star']['count'];				
		$smVAL_count = $aPlayer['stats']['weapons']['smVAL']['star']['count'];		
		$srM39_count = $aPlayer['stats']['weapons']['srM39']['star']['count'];			
		$srM40_count = $aPlayer['stats']['weapons']['srM40']['star']['count'];
		$srM98_count = $aPlayer['stats']['weapons']['srM98']['star']['count'];				
		$srMK11_count = $aPlayer['stats']['weapons']['srMK11']['star']['count'];
		$srSKS_count = $aPlayer['stats']['weapons']['srSKS']['star']['count'];			
		$srSV98_count = $aPlayer['stats']['weapons']['srSV98']['star']['count'];
		$srSVD_count = $aPlayer['stats']['weapons']['srSVD']['star']['count'];			
		$wahUSG_count = $aPlayer['stats']['weapons']['wahUSG']['star']['count'];		
		$wahUGL_count = $aPlayer['stats']['weapons']['wahUGL']['star']['count'];			
		$wasK_count = $aPlayer['stats']['weapons']['wasK']['star']['count'];		
		$wLAAFIM_count = $aPlayer['stats']['weapons']['wLAAFIM']['star']['count'];	
		$wLAAIGL_count = $aPlayer['stats']['weapons']['wLAAIGL']['star']['count'];
		$wLATJAV_count = $aPlayer['stats']['weapons']['wLATJAV']['star']['count'];			
		$wLATRPG_count = $aPlayer['stats']['weapons']['wLATRPG']['star']['count'];
		$wLATSMAW_count = $aPlayer['stats']['weapons']['wLATSMAW']['star']['count'];
	

    $arFAMAS_date = $aPlayer['stats']['weapons']['arFAMAS']['star']['date'];
		$arL85A2_date = $aPlayer['stats']['weapons']['arL85A2']['star']['date'];
		$caHK53_date = $aPlayer['stats']['weapons']['caHK53']['star']['date'];
		$caQBZ95B_date = $aPlayer['stats']['weapons']['caQBZ95B']['star']['date'];
		$mgQBB95_date = $aPlayer['stats']['weapons']['mgQBB95']['star']['date'];
		$mgMG36_date = $aPlayer['stats']['weapons']['mgMG36']['star']['date'];
		$srQBU88_date = $aPlayer['stats']['weapons']['srQBU88']['star']['date'];
		$srL96_date = $aPlayer['stats']['weapons']['srL96']['star']['date'];
		$smPP19_date = $aPlayer['stats']['weapons']['smPP19']['star']['date'];
		$sgJackH_date = $aPlayer['stats']['weapons']['sgJackH']['star']['date'];
		
		$arFAMAS_curr = $aPlayer['stats']['weapons']['arFAMAS']['star']['curr'];
		$arL85A2_curr = $aPlayer['stats']['weapons']['arL85A2']['star']['curr'];
		$caHK53_curr = $aPlayer['stats']['weapons']['caHK53']['star']['curr'];
		$caQBZ95B_curr = $aPlayer['stats']['weapons']['caQBZ95B']['star']['curr'];
		$mgQBB95_curr = $aPlayer['stats']['weapons']['mgQBB95']['star']['curr'];
		$mgMG36_curr = $aPlayer['stats']['weapons']['mgMG36']['star']['curr'];
		$srQBU88_curr = $aPlayer['stats']['weapons']['srQBU88']['star']['curr'];
		$srL96_curr = $aPlayer['stats']['weapons']['srL96']['star']['curr'];
		$smPP19_curr = $aPlayer['stats']['weapons']['smPP19']['star']['curr'];
		$sgJackH_curr = $aPlayer['stats']['weapons']['sgJackH']['star']['curr'];
		
		$arFAMAS_needed = $aPlayer['stats']['weapons']['arFAMAS']['star']['needed'];
		$arL85A2_needed = $aPlayer['stats']['weapons']['arL85A2']['star']['needed'];
		$caHK53_needed = $aPlayer['stats']['weapons']['caHK53']['star']['needed'];
		$caQBZ95B_needed = $aPlayer['stats']['weapons']['caQBZ95B']['star']['needed'];
		$mgQBB95_needed = $aPlayer['stats']['weapons']['mgQBB95']['star']['needed'];
		$mgMG36_needed = $aPlayer['stats']['weapons']['mgMG36']['star']['needed'];
		$srQBU88_needed = $aPlayer['stats']['weapons']['srQBU88']['star']['needed'];
		$srL96_needed = $aPlayer['stats']['weapons']['srL96']['star']['needed'];
		$smPP19_needed = $aPlayer['stats']['weapons']['smPP19']['star']['needed'];
		$sgJackH_needed = $aPlayer['stats']['weapons']['sgJackH']['star']['needed'];
		
		$arFAMAS_count = $aPlayer['stats']['weapons']['arFAMAS']['star']['count'];
		$arL85A2_count = $aPlayer['stats']['weapons']['arL85A2']['star']['count'];
		$caHK53_count = $aPlayer['stats']['weapons']['caHK53']['star']['count'];
		$caQBZ95B_count = $aPlayer['stats']['weapons']['caQBZ95B']['star']['count'];
		$mgQBB95_count = $aPlayer['stats']['weapons']['mgQBB95']['star']['count'];
		$mgMG36_count = $aPlayer['stats']['weapons']['mgMG36']['star']['count'];
		$srQBU88_count = $aPlayer['stats']['weapons']['srQBU88']['star']['count'];
		$srL96_count = $aPlayer['stats']['weapons']['srL96']['star']['count'];
		$smPP19_count = $aPlayer['stats']['weapons']['smPP19']['star']['count'];
		$sgJackH_count = $aPlayer['stats']['weapons']['sgJackH']['star']['count'];
		
		
		$arAUG_date = $aPlayer['stats']['weapons']['arAUG']['star']['date'];
		$arAUG_count = $aPlayer['stats']['weapons']['arAUG']['star']['count'];
		$arAUG_curr = $aPlayer['stats']['weapons']['arAUG']['star']['curr'];
		$arAUG_needed = $aPlayer['stats']['weapons']['arAUG']['star']['needed'];
		
		$arSCARL_date = $aPlayer['stats']['weapons']['arSCARL']['star']['date'];
		$arSCARL_count = $aPlayer['stats']['weapons']['arSCARL']['star']['count'];
		$arSCARL_curr = $aPlayer['stats']['weapons']['arSCARL']['star']['curr'];
		$arSCARL_needed = $aPlayer['stats']['weapons']['arSCARL']['star']['needed'];
		
		$mgL86A1_date = $aPlayer['stats']['weapons']['mgL86A1']['star']['date'];
		$mgL86A1_count = $aPlayer['stats']['weapons']['mgL86A1']['star']['count'];
		$mgL86A1_curr = $aPlayer['stats']['weapons']['mgL86A1']['star']['curr'];
		$mgL86A1_needed = $aPlayer['stats']['weapons']['mgL86A1']['star']['needed'];
		
		$mgLSAT_date = $aPlayer['stats']['weapons']['mgLSAT']['star']['date'];
		$mgLSAT_count = $aPlayer['stats']['weapons']['mgLSAT']['star']['count'];
		$mgLSAT_curr = $aPlayer['stats']['weapons']['mgLSAT']['star']['curr'];
		$mgLSAT_needed = $aPlayer['stats']['weapons']['mgLSAT']['star']['needed'];
		
		$caACR_date = $aPlayer['stats']['weapons']['caACR']['star']['date'];
		$caACR_count = $aPlayer['stats']['weapons']['caACR']['star']['count'];
		$caACR_curr = $aPlayer['stats']['weapons']['caACR']['star']['curr'];
		$caACR_needed = $aPlayer['stats']['weapons']['caACR']['star']['needed'];
		
		$caMTAR21_date = $aPlayer['stats']['weapons']['caMTAR21']['star']['date'];
		$caMTAR21_count = $aPlayer['stats']['weapons']['caMTAR21']['star']['count'];
		$caMTAR21_curr = $aPlayer['stats']['weapons']['caMTAR21']['star']['curr'];
		$caMTAR21_needed = $aPlayer['stats']['weapons']['caMTAR21']['star']['needed'];
		
		$srHK417_date = $aPlayer['stats']['weapons']['srHK417']['star']['date'];
		$srHK417_count = $aPlayer['stats']['weapons']['srHK417']['star']['count'];
		$srHK417_curr = $aPlayer['stats']['weapons']['srHK417']['star']['curr'];
		$srHK417_needed = $aPlayer['stats']['weapons']['srHK417']['star']['needed'];
		
		$srJNG90_date = $aPlayer['stats']['weapons']['srJNG90']['star']['date'];
		$srJNG90_count = $aPlayer['stats']['weapons']['srJNG90']['star']['count'];
		$srJNG90_curr = $aPlayer['stats']['weapons']['srJNG90']['star']['curr'];
		$srJNG90_needed = $aPlayer['stats']['weapons']['srJNG90']['star']['needed'];
		
		$sgSPAS12_date = $aPlayer['stats']['weapons']['sgSPAS12']['star']['date'];
		$sgSPAS12_count = $aPlayer['stats']['weapons']['sgSPAS12']['star']['count'];
		$sgSPAS12_curr = $aPlayer['stats']['weapons']['sgSPAS12']['star']['curr'];
		$sgSPAS12_needed = $aPlayer['stats']['weapons']['sgSPAS12']['star']['needed'];
		
		$smM5K_date = $aPlayer['stats']['weapons']['smM5K']['star']['date'];
		$smM5K_count = $aPlayer['stats']['weapons']['smM5K']['star']['count'];
		$smM5K_curr = $aPlayer['stats']['weapons']['smM5K']['star']['curr'];
		$smM5K_needed = $aPlayer['stats']['weapons']['smM5K']['star']['needed'];



		
		$aa9k22_time = $aPlayer['stats']['vehicles']['aa9k22']['time'];
		$aa9k22_kills = $aPlayer['stats']['vehicles']['aa9k22']['kills'];
		$aa9k22_destroys = $aPlayer['stats']['vehicles']['aa9k22']['destroys'];
		
		$aaLAV_time = $aPlayer['stats']['vehicles']['aaLAV']['time'];
		$aaLAV_kills = $aPlayer['stats']['vehicles']['aaLAV']['kills'];
		$aaLAV_destroys = $aPlayer['stats']['vehicles']['aaLAV']['destroys'];
		
		$ahAH1Z_time = $aPlayer['stats']['vehicles']['ahAH1Z']['time'];
		$ahAH1Z_kills = $aPlayer['stats']['vehicles']['ahAH1Z']['kills'];
		$ahAH1Z_destroys = $aPlayer['stats']['vehicles']['ahAH1Z']['destroys'];
		
		$ahMi28_time = $aPlayer['stats']['vehicles']['ahMi28']['time'];
		$ahMi28_kills = $aPlayer['stats']['vehicles']['ahMi28']['kills'];
		$ahMi28_destroys = $aPlayer['stats']['vehicles']['ahMi28']['destroys'];
		
		$atTOW_time = $aPlayer['stats']['vehicles']['atTOW']['time'];
		$atTOW_kills = $aPlayer['stats']['vehicles']['atTOW']['kills'];
		$atTOW_destroys = $aPlayer['stats']['vehicles']['atTOW']['destroys'];
		
		$ifvBMP_time = $aPlayer['stats']['vehicles']['ifvBMP']['time'];
		$ifvBMP_kills = $aPlayer['stats']['vehicles']['ifvBMP']['kills'];
		$ifvBMP_destroys = $aPlayer['stats']['vehicles']['ifvBMP']['destroys'];
		
		$ifvLAV_time = $aPlayer['stats']['vehicles']['ifvLAV']['time'];
		$ifvLAV_kills = $aPlayer['stats']['vehicles']['ifvLAV']['kills'];
		$ifvLAV_destroys = $aPlayer['stats']['vehicles']['ifvLAV']['destroys'];
		
		$jaA10_time = $aPlayer['stats']['vehicles']['jaA10']['time'];
		$jaA10_kills = $aPlayer['stats']['vehicles']['jaA10']['kills'];
		$jaA10_destroys = $aPlayer['stats']['vehicles']['jaA10']['destroys'];
		
		$jaSU25_time = $aPlayer['stats']['vehicles']['jaSU25']['time'];
		$jaSU25_kills = $aPlayer['stats']['vehicles']['jaSU25']['kills'];
		$jaSU25_destroys = $aPlayer['stats']['vehicles']['jaSU25']['destroys'];
		
		$jfF18_time = $aPlayer['stats']['vehicles']['jfF18']['time'];
		$jfF18_kills = $aPlayer['stats']['vehicles']['jfF18']['kills'];
		$jfF18_destroys = $aPlayer['stats']['vehicles']['jfF18']['destroys'];
		
		$jfSu35_time = $aPlayer['stats']['vehicles']['jfSu35']['time'];
		$jfSu35_kills = $aPlayer['stats']['vehicles']['jfSu35']['kills'];
		$jfSu35_destroys = $aPlayer['stats']['vehicles']['jfSu35']['destroys'];
		
		$mbtM1A_time = $aPlayer['stats']['vehicles']['mbtM1A']['time'];
		$mbtM1A_kills = $aPlayer['stats']['vehicles']['mbtM1A']['kills'];
		$mbtM1A_destroys = $aPlayer['stats']['vehicles']['mbtM1A']['destroys'];
		
		$mbtT90_time = $aPlayer['stats']['vehicles']['mbtT90']['time'];
		$mbtT90_kills = $aPlayer['stats']['vehicles']['mbtT90']['kills'];
		$mbtT90_destroys = $aPlayer['stats']['vehicles']['mbtT90']['destroys'];
		
		$saaCRAM_time = $aPlayer['stats']['vehicles']['saaCRAM']['time'];
		$saaCRAM_kills = $aPlayer['stats']['vehicles']['saaCRAM']['kills'];
		$saaCRAM_destroys = $aPlayer['stats']['vehicles']['saaCRAM']['destroys'];
		
		$shAH6_time = $aPlayer['stats']['vehicles']['shAH6']['time'];
		$shAH6_kills = $aPlayer['stats']['vehicles']['shAH6']['kills'];
		$shAH6_destroys = $aPlayer['stats']['vehicles']['shAH6']['destroys'];
		
		$saaPant_time = $aPlayer['stats']['vehicles']['saaPant']['time'];
		$saaPant_kills = $aPlayer['stats']['vehicles']['saaPant']['kills'];
		$saaPant_destroys = $aPlayer['stats']['vehicles']['saaPant']['destroys'];
		
		$shz11_time = $aPlayer['stats']['vehicles']['shz11']['time'];
		$shz11_kills = $aPlayer['stats']['vehicles']['shz11']['kills'];
		$shz11_destroys = $aPlayer['stats']['vehicles']['shz11']['destroys'];
		
		$sKorn_time = $aPlayer['stats']['vehicles']['sKorn']['time'];
		$sKorn_kills = $aPlayer['stats']['vehicles']['sKorn']['kills'];
		$sKorn_destroys = $aPlayer['stats']['vehicles']['sKorn']['destroys'];
		
		$trAAV_time = $aPlayer['stats']['vehicles']['trAAV']['time'];
		$trAAV_kills = $aPlayer['stats']['vehicles']['trAAV']['kills'];
		$trAAV_destroys = $aPlayer['stats']['vehicles']['trAAV']['destroys'];
		
		$trHum_time = $aPlayer['stats']['vehicles']['trHum']['time'];
		$trHum_kills = $aPlayer['stats']['vehicles']['trHum']['kills'];
		$trHum_destroys = $aPlayer['stats']['vehicles']['trHum']['destroys'];
		
		$trITV_time = $aPlayer['stats']['vehicles']['trITV']['time'];
		$trITV_kills = $aPlayer['stats']['vehicles']['trITV']['kills'];
		$trITV_destroys = $aPlayer['stats']['vehicles']['trITV']['destroys'];
		
		$trKA60_time = $aPlayer['stats']['vehicles']['trKA60']['time'];
		$trKA60_kills = $aPlayer['stats']['vehicles']['trKA60']['kills'];
		$trKA60_destroys = $aPlayer['stats']['vehicles']['trKA60']['destroys'];
		
		$trRIB_time = $aPlayer['stats']['vehicles']['trRIB']['time'];
		$trRIB_kills = $aPlayer['stats']['vehicles']['trRIB']['kills'];
		$trRIB_destroys = $aPlayer['stats']['vehicles']['trRIB']['destroys'];
		
		$trUH1_time = $aPlayer['stats']['vehicles']['trUH1']['time'];
		$trUH1_kills = $aPlayer['stats']['vehicles']['trUH1']['kills'];
		$trUH1_destroys = $aPlayer['stats']['vehicles']['trUH1']['destroys'];
		
		$trVod_time = $aPlayer['stats']['vehicles']['trVod']['time'];
		$trVod_kills = $aPlayer['stats']['vehicles']['trVod']['kills'];
		$trVod_destroys = $aPlayer['stats']['vehicles']['trVod']['destroys'];
		
		$trVDV_time = $aPlayer['stats']['vehicles']['trVDV']['time'];
		$trVDV_kills = $aPlayer['stats']['vehicles']['trVDV']['kills'];	
		$trVDV_destroys = $aPlayer['stats']['vehicles']['trVDV']['destroys'];
		
		$trSkid_time = $aPlayer['stats']['vehicles']['trSkid']['time'];
		$trSkid_kills = $aPlayer['stats']['vehicles']['trSkid']['kills'];
		$trSkid_destroys = $aPlayer['stats']['vehicles']['trSkid']['destroys'];
		
		$trDpv_time = $aPlayer['stats']['vehicles']['trDpv']['time'];
		$trDpv_kills = $aPlayer['stats']['vehicles']['trDpv']['kills'];
		$trDpv_destroys = $aPlayer['stats']['vehicles']['trDpv']['destroys'];
		
		$ifvBTR90_time = $aPlayer['stats']['vehicles']['ifvBTR90']['time'];
		$ifvBTR90_kills = $aPlayer['stats']['vehicles']['ifvBTR90']['kills'];
		$ifvBTR90_destroys = $aPlayer['stats']['vehicles']['ifvBTR90']['destroys'];
		
		$jfx1F35JSF_time = $aPlayer['stats']['vehicles']['jfx1F35JSF']['time'];
		$jfx1F35JSF_kills = $aPlayer['stats']['vehicles']['jfx1F35JSF']['kills'];
		$jfx1F35JSF_destroys = $aPlayer['stats']['vehicles']['jfx1F35JSF']['destroys'];
		

		
		
		/*Team Stats*/
		
		  $time_us = $aPlayer['stats']['kits']['assault']['timeu']+$aPlayer['stats']['kits']['engineer']['timeu']+$aPlayer['stats']['kits']['recon']['timeu']+$aPlayer['stats']['kits']['support']['timeu'];
		  $assault_us = $aPlayer['stats']['kits']['assault']['timeu'];
		  $recon_us = $aPlayer['stats']['kits']['recon']['timeu'];
		  $support_us = $aPlayer['stats']['kits']['support']['timeu'];
		  $engineer_us = $aPlayer['stats']['kits']['engineer']['timeu'];
		  $time_ru = $aPlayer['stats']['kits']['assault']['timer']+$aPlayer['stats']['kits']['engineer']['timer']+$aPlayer['stats']['kits']['recon']['timer']+$aPlayer['stats']['kits']['support']['timer'];;
		  $assault_ru = $aPlayer['stats']['kits']['assault']['timer'];
		  $recon_ru = $aPlayer['stats']['kits']['recon']['timer'];
		  $support_ru = $aPlayer['stats']['kits']['support']['timer'];
		  $engineer_ru = $aPlayer['stats']['kits']['engineer']['timer'];
		  
		
	
	
		/*COOP Stats*/
		
		 $kills_coop = $aPlayer['stats']['coop']['kills'];
		 $headshots_coop = $aPlayer['stats']['coop']['headshots'];
		 $mdrevives_coop = $aPlayer['stats']['coop']['mdrevives'];
		 $killassists_coop = $aPlayer['stats']['coop']['killassists'];
		 $vehicledestroyed_coop = $aPlayer['stats']['coop']['avengerkills'];
		 $avengerkills_coop = $aPlayer['stats']['coop']['killassists'];
		 $saviorkills_coop = $aPlayer['stats']['coop']['saviorkills'];
		 $score_coop = $aPlayer['stats']['coop']['score'];
		 $indscore_coop = $aPlayer['stats']['coop']['indscore'];
		 
		 $level1_easy_score = $aPlayer['stats']['coopmissions']['level002']['difficulty']['easy']['score'];
		 $level1_medium_score= $aPlayer['stats']['coopmissions']['level002']['difficulty']['medium']['score'];
		 $level1_hard_score = $aPlayer['stats']['coopmissions']['level002']['difficulty']['hard']['score'];
		 $level1_easy_count = $aPlayer['stats']['coopmissions']['level002']['difficulty']['easy']['count'];
		 $level1_medium_count = $aPlayer['stats']['coopmissions']['level002']['difficulty']['medium']['count'];
		 $level1_hard_count = $aPlayer['stats']['coopmissions']['level002']['difficulty']['hard']['count'];
		 $level1_easy_date = $aPlayer['stats']['coopmissions']['level002']['difficulty']['easy']['date'];
		 $level1_medium_date= $aPlayer['stats']['coopmissions']['level002']['difficulty']['medium']['date'];
		 $level1_hard_date = $aPlayer['stats']['coopmissions']['level002']['difficulty']['hard']['date'];
		 
		 
		 $level3_easy_score = $aPlayer['stats']['coopmissions']['level003']['difficulty']['easy']['score'];
		 $level3_medium_score = $aPlayer['stats']['coopmissions']['level003']['difficulty']['medium']['score'];	 
		 $level3_hard_score = $aPlayer['stats']['coopmissions']['level003']['difficulty']['hard']['score'];
		 $level3_easy_count = $aPlayer['stats']['coopmissions']['level003']['difficulty']['easy']['count'];
		 $level3_medium_count = $aPlayer['stats']['coopmissions']['level003']['difficulty']['medium']['count'];
		 $level3_hard_count = $aPlayer['stats']['coopmissions']['level003']['difficulty']['hard']['count'];
		 $level3_easy_date = $aPlayer['stats']['coopmissions']['level003']['difficulty']['easy']['date'];
		 $level3_medium_date= $aPlayer['stats']['coopmissions']['level003']['difficulty']['medium']['date'];
		 $level3_hard_date = $aPlayer['stats']['coopmissions']['level003']['difficulty']['hard']['date'];
		 
		 $level6_easy_score = $aPlayer['stats']['coopmissions']['level006']['difficulty']['easy']['score'];
		 $level6_medium_score = $aPlayer['stats']['coopmissions']['level006']['difficulty']['medium']['score'];	 
		 $level6_hard_score = $aPlayer['stats']['coopmissions']['level006']['difficulty']['hard']['score'];
		 $level6_easy_count = $aPlayer['stats']['coopmissions']['level006']['difficulty']['easy']['count'];
		 $level6_medium_count = $aPlayer['stats']['coopmissions']['level006']['difficulty']['medium']['count'];
		 $level6_hard_count = $aPlayer['stats']['coopmissions']['level006']['difficulty']['hard']['count'];
		 $level6_easy_date = $aPlayer['stats']['coopmissions']['level006']['difficulty']['easy']['date'];
		 $level6_medium_date= $aPlayer['stats']['coopmissions']['level006']['difficulty']['medium']['date'];
		 $level6_hard_date = $aPlayer['stats']['coopmissions']['level006']['difficulty']['hard']['date'];
		 
		 $level7_easy_score = $aPlayer['stats']['coopmissions']['level007']['difficulty']['easy']['score'];
		 $level7_medium_score = $aPlayer['stats']['coopmissions']['level007']['difficulty']['medium']['score'];	 
		 $level7_hard_score = $aPlayer['stats']['coopmissions']['level007']['difficulty']['hard']['score'];
		 $level7_easy_count = $aPlayer['stats']['coopmissions']['level007']['difficulty']['easy']['count'];
		 $level7_medium_count = $aPlayer['stats']['coopmissions']['level007']['difficulty']['medium']['count'];
		 $level7_hard_count = $aPlayer['stats']['coopmissions']['level007']['difficulty']['hard']['count'];
		 $level7_easy_date = $aPlayer['stats']['coopmissions']['level007']['difficulty']['easy']['date'];
		 $level7_medium_date= $aPlayer['stats']['coopmissions']['level007']['difficulty']['medium']['date'];
		 $level7_hard_date = $aPlayer['stats']['coopmissions']['level007']['difficulty']['hard']['date'];
		 
		 $level9_easy_score = $aPlayer['stats']['coopmissions']['level009']['difficulty']['easy']['score'];
		 $level9_medium_score = $aPlayer['stats']['coopmissions']['level009']['difficulty']['medium']['score'];	 
		 $level9_hard_score = $aPlayer['stats']['coopmissions']['level009']['difficulty']['hard']['score'];
		 $level9_easy_count = $aPlayer['stats']['coopmissions']['level009']['difficulty']['easy']['count'];
		 $level9_medium_count = $aPlayer['stats']['coopmissions']['level009']['difficulty']['medium']['count'];
		 $level9_hard_count = $aPlayer['stats']['coopmissions']['level009']['difficulty']['hard']['count'];
		 $level9_easy_date = $aPlayer['stats']['coopmissions']['level009']['difficulty']['easy']['date'];
		 $level9_medium_date= $aPlayer['stats']['coopmissions']['level009']['difficulty']['medium']['date'];
		 $level9_hard_date = $aPlayer['stats']['coopmissions']['level009']['difficulty']['hard']['date'];
		 
		 $level10_easy_score = $aPlayer['stats']['coopmissions']['level010']['difficulty']['easy']['score'];
		 $level10_medium_score = $aPlayer['stats']['coopmissions']['level010']['difficulty']['medium']['score'];	 
		 $level10_hard_score = $aPlayer['stats']['coopmissions']['level010']['difficulty']['hard']['score'];
		 $level10_easy_count = $aPlayer['stats']['coopmissions']['level010']['difficulty']['easy']['count'];
		 $level10_medium_count = $aPlayer['stats']['coopmissions']['level010']['difficulty']['medium']['count'];
		 $level10_hard_count = $aPlayer['stats']['coopmissions']['level010']['difficulty']['hard']['count'];
		 $level10_easy_date = $aPlayer['stats']['coopmissions']['level010']['difficulty']['easy']['date'];
		 $level10_medium_date= $aPlayer['stats']['coopmissions']['level010']['difficulty']['medium']['date'];
		 $level10_hard_date = $aPlayer['stats']['coopmissions']['level010']['difficulty']['hard']['date'];
		 
			
	
	
	
			/*GAMEMOD Stats*/
		
		 $looses_cq = $aPlayer['stats']['gamemodes']['conquest']['losses'];
		 $wins_cq = $aPlayer['stats']['gamemodes']['conquest']['wins'];
		 $looses_rush = $aPlayer['stats']['gamemodes']['rush']['losses'];
		 $wins_rush = $aPlayer['stats']['gamemodes']['rush']['wins'];
		 $looses_sqr = $aPlayer['stats']['gamemodes']['squadrush']['losses'];
		 $wins_sqr = $aPlayer['stats']['gamemodes']['squadrush']['wins'];
		 $looses_teamdm = $aPlayer['stats']['gamemodes']['teamdm']['losses'];
		 $wins_teamdm = $aPlayer['stats']['gamemodes']['teamdm']['wins']; 
		 $looses_squaddm = $aPlayer['stats']['gamemodes']['squaddm']['losses'];
		 $wins_squaddm = $aPlayer['stats']['gamemodes']['squaddm']['wins']; 
		
		
		
		
		/* Histroy Funktion Begin*/
			$sSqlHist = "SELECT a.*,b.*,c.*,d.*,e.*,f.* FROM ".DBPrefix."generalStats a
			Left JOIN 
         ".DBPrefix."ribbons b ON a.pid = b.stats_pid
       Left JOIN 
         ".DBPrefix."medals c ON a.pid = c.stats_pid
       Left JOIN 
         ".DBPrefix."weapons d ON a.pid = d.stats_pid
       Left JOIN 
         ".DBPrefix."vehicles e ON a.pid = e.stats_pid
       Left JOIN 
         ".DBPrefix."stars f ON a.pid = f.stats_pid
          WHERE a.soldiername = '{$aPlayer['name']}'";
			$aHist = mysql_fetch_assoc(mysql_query($sSqlHist));
	    $HTime = time();
	    


	   // History
			if ($aHist['points'] != $points && $HistoryYesNO == 1){
        $Hscore =  $points-$aHist['points'];
				$Hkills = $kills-$aHist['kills'];
				$Hdeaths = $deaths-$aHist['deaths'];
				$Hrounds = $rounds-$aHist['rounds'];
				$Htime = round($time)-round($aHist['playtime']);
				$Hg_rank =  $g_rank-$aHist['rank'];
				$Hrank =  $g_rank;
				$Hdogtags =  $dogtags-$aHist['dogtags'];
				$Hresupplies = $resupplies-$aHist['resupplies'];
				$Hrevives = $revives-$aHist['revives'];
				$Hheals = round($heals)-round($aHist['heals']);
				$Hrepairs = $repairs-$aHist['repairs'];
				$Hresupplies = $resupplies-$aHist['resupplies'];
				$Hheadshots = $headshots-$aHist['headshots'];
				$Hteam = $team-$aHist['team'];
				$Hwins = $wins-$aHist['wins'];
				$Hlooses = $losses-$aHist['losses'];
				$Hshots = $shots-$aHist['shots'];
				$Hhits = $hits-$aHist['hits'];
				$Hskill = $elo-$aHist['elo'];
				
				if ($Hskill < 0 ){
					$Hskill = $Hskill;
				}else{
					$Hskill = '+'.$Hskill;
				}
					  
					   $ribbon_all = 0;
               for ($i = 1; $i <= 45; ++$i){
	              $sRibbon = "r{$i}_count";
	              $ribbon_all += $aHist[$sRibbon];
              }
          
          $ribbonsNew = $r1_count+$r2_count+$r3_count+$r4_count+$r5_count+$r6_count+$r7_count+$r8_count+$r9_count+$r10_count+$r11_count+$r12_count+$r13_count+$r14_count+$r15_count+$r16_count+$r17_count+$r18_count+$r19_count
          +$r20_count+$r21_count+$r22_count+$r23_count+$r24_count+$r25_count+$r26_count+$r27_count+$r28_count+$r29_count+$r30_count+$r31_count+$r32_count+$r33_count+$r34_count+$r35_count+$r36_count
          +$r37_count+$r38_count+$r39_count+$r40_count+$r41_count+$r42_count+$r43_count+$r44_count+$r45_count;
          
       $Hribbons = $ribbonsNew-$ribbon_all;
       
         $medals_all = 0;
          for ($i = 1; $i <= 50; ++$i){
	         $sMedals = "m{$i}_count";
	          $medals_all += $aHist[$sMedals];
          }
       
       $medalsNew = $m1_count+$m2_count+$m3_count+$m4_count+$m5_count+$m6_count+$m7_count+$m8_count+$m9_count+$m10_count+$m11_count+$m12_count+$m13_count+$m14_count+$m15_count+$m16_count+$m17_count+$m18_count+$m19_count
          +$m20_count+$m21_count+$m22_count+$m23_count+$m24_count+$m25_count+$m26_count+$m27_count+$m28_count+$m29_count+$m30_count+$m31_count+$m32_count+$m33_count+$m34_count+$m35_count+$m36_count
          +$m37_count+$m38_count+$m39_count+$m40_count+$m41_count+$m42_count+$m43_count+$m44_count+$m45_count+$m46_count+$m47_count+$m48_count+$m49_count+$m50_count;
          
       
       $HMedals = $medalsNew-$medals_all;
       
       $Hclass = $EoT->favclass($assault-$aHist['assault'],$recon-$aHist['recon'],$support-$aHist['support'],$engineer-$aHist['engineer']);
       
       $aWeapons = array(
             "arAK74" => $arAK74_kills-$aHist['arAK74_kills'],
             "wahUGL" => $wahUGL_kills-$aHist['wahUGL_kills'],
             "arM416" => $arM416_kills-$aHist['arM416_kills'],
             "wahUSG" => $wahUSG_kills-$aHist['wahUSG_kills'],
             "arAEK" => $arAEK_kills-$aHist['arAEK_kills'],
             "arM16" => $arM16_kills-$aHist['arM16_kills'],
             "arAN94" => $arAN94_kills-$aHist['arAN94_kills'],
             "arF2" => $arF2_kills-$aHist['arF2_kills'],
             "arG3" => $arG3_kills-$aHist['arG3_kills'],
             "arKH" => $arKH_kills-$aHist['arKH_kills'],
             "srM40" => $srM40_kills-$aHist['srM40_kills'],
             "srM98" => $srM98_kills-$aHist['srM98_kills'],
             "srMK11" => $srMK11_kills-$aHist['srMK11_kills'],
             "srSKS" => $srSKS_kills-$aHist['srSKS_kills'],
             "srSV98" => $srSV98_kills-$aHist['srSV98_kills'],
             "srSVD"  => $srSVD_kills-$aHist['srSVD_kills'],
             "mgM240" => $mgM240_kills-$aHist['mgM240_kills'],
             "mgM249" => $mgM249_kills-$aHist['mgM249_kills'],
             "mgM27" => $mgM27_kills-$aHist['mgM27_kills'],
             "mgM60" => $mgM60_kills-$aHist['mgM60_kills'],
             "mgPech" => $mgPech_kills-$aHist['mgPech_kills'],
             "mgRPK" => $mgRPK_kills-$aHist['mgRPK_kills'],
             "mgT88"  => $mgT88_kills-$aHist['mgT88_kills'],
             "caA91" => $caA91_kills-$aHist['caA91_kills'],
             "caAKS" => $caAKS_kills-$aHist['caAKS_kills'],
             "caG36" => $caG36_kills-$aHist['caG36_kills'],
             "caM4" => $caM4_kills-$aHist['caM4_kills'],
             "caSCAR" => $caSCAR_kills-$aHist['caSCAR_kills'],
             "caSG553" => $caSG553_kills-$aHist['caSG553_kills'],
             "srM39" => $srM39_kills-$aHist['srM39_kills'],
             "wLAAFIM" => $wLAAFIM_kills-$aHist['wLAAFIM_kills'],
             "wLAAIGL" => $wLAAIGL_kills-$aHist['wLAAIGL_kills'],
             "wLATJAV" => $wLATJAV_kills-$aHist['wLATJAV_kills'],
             "wLATRPG" => $wLATRPG_kills-$aHist['wLATRPG_kills'],
             "wLATSMAW" => $wLATSMAW_kills-$aHist['wLATSMAW_kills'],
             "pG17S" => $pG17S_kills-$aHist['pG17S_kills'],
             "pG17" => $pG17_kills-$aHist['pG17_kills'],
             "pg18S" => $pg18S_kills-$aHist['pg18S_kills'],
             "pg18" => $pg18_kills-$aHist['pg18_kills'],
             "pM1911L" => $pM1911L_kills-$aHist['pM1911L_kills'],
             "pM1911" => $pM1911_kills-$aHist['pM1911_kills'],
             "pM1911S" => $pM1911S_kills-$aHist['pM1911S_kills'],
             "pM1911T" => $pM1911T_kills-$aHist['pM1911T_kills'],
             "pM412" => $pM412_kills-$aHist['pM412_kills'],
             "pM9F" => $pM9F_kills-$aHist['pM9F_kills'],
             "pM9S" => $pM9S_kills-$aHist['pM9S_kills'],
             "pM9" => $pM9_kills-$aHist['pM9_kills'],
             "pM93R" => $pM93R_kills-$aHist['pM93R_kills'],
             "pMP443L" => $pMP443L_kills-$aHist['pMP443L_kills'],
             "pMP443S" => $pMP443S_kills-$aHist['pMP443S_kills'],
             "pMP443" => $pMP443_kills-$aHist['pMP443_kills'],
             "pTaurS" => $pTaurS_kills-$aHist['pTaurS_kills'],
             "pTaur" => $pTaur_kills-$aHist['pTaur_kills'],
             "sg870" => $sg870_kills-$aHist['sg870_kills'],
             "sgDAO" => $sgDAO_kills-$aHist['sgDAO_kills'],
             "sgM1014" => $sgM1014_kills-$aHist['sgM1014_kills'],
             "sgSaiga" => $sgSaiga_kills-$aHist['sgSaiga_kills'],
             "sgUSAS" => $sgUSAS_kills-$aHist['sgUSAS_kills'],
             "smMP7" => $smMP7_kills-$aHist['smMP7_kills'],
             "smP90" => $smP90_kills-$aHist['smP90_kills'],
             "smPDR" => $smPDR_kills-$aHist['smPDR_kills'],
             "smPP2000" => $smPP2000_kills-$aHist['smPP2000_kills'],
             "smUMP" => $smUMP_kills-$aHist['smUMP_kills'],
             "smVAL" => $smVAL_kills-$aHist['smVAL_kills'],
             "wasK" => $wasK_kills-$aHist['wasK_kills'],
             "arFAMAS" => $arFAMAS_kills-$aHist['arFAMAS_kills'],
             "arL85A2" => $arL85A2_kills-$aHist['arL85A2_kills'],
             "caHK53" => $caHK53_kills-$aHist['caHK53_kills'],
             "caQBZ95B" => $caQBZ95B_kills-$aHist['caQBZ95B_kills'],
             "mgQBB95" => $mgQBB95_kills-$aHist['mgQBB95_kills'],
             "mgMG36" => $mgMG36_kills-$aHist['mgMG36_kills'],
             "srQBU88" => $srQBU88_kills-$aHist['srQBU88_kills'],
             "srL96" => $srL96_kills-$aHist['srL96_kills'],
             "smPP19" => $smPP19_kills-$aHist['smPP19_kills'],
             "sgJackH" => $sgJackH_kills-$aHist['sgJackH_kills'],             
             "arAUG" => $arAUG_kills-$aHist['arAUG_kills'],
             "arSCARL" => $arSCARL_kills-$aHist['arSCARL_kills'],
             "mgL86A1" => $mgL86A1_kills-$aHist['mgL86A1_kills'],
             "mgLSAT" => $mgLSAT_kills-$aHist['mgLSAT_kills'],
             "caACR" => $caACR_kills-$aHist['caACR_kills'],
             "caMTAR21" => $caMTAR21_kills-$aHist['caMTAR21_kills'],
             "srHK417" => $srHK417_kills-$aHist['srHK417_kills'],
             "srJNG90" => $srJNG90_kills-$aHist['srJNG90_kills'],
             "sgSPAS12" => $sgSPAS12_kills-$aHist['sgSPAS12_kills'],
             "smM5K" => $smM5K_kills-$aHist['smM5K_kills']
             );
        arsort($aWeapons);
        $Fweapons = array_keys($aWeapons);
        $Hweapons = $Fweapons[0];
        $HweponsaKills = $aWeapons[$Fweapons[0]];
       
        $aVehicles = array(
             "aa9k22" => $aa9k22_time-$aHist['aa9k22_time'],
             "aaLAV" => $aaLAV_time-$aHist['aaLAV_time'],
             "ahAH1Z" => $ahAH1Z_time-$aHist['ahAH1Z_time'],
             "ahMi28" => $ahMi28_time-$aHist['ahMi28_time'],
             "atTOW" => $atTOW_time-$aHist['atTOW_time'],
             "ifvBMP" => $ifvBMP_time-$aHist['ifvBMP_time'],
             "ifvLAV" => $ifvLAV_time-$aHist['ifvLAV_time'],
             "jaA10" => $jaA10_time-$aHist['jaA10_time'],
             "jaSU25" => $jaSU25_time-$aHist['jaSU25_time'],
             "jfF18" => $jfF18_time-$aHist['jfF18_time'],
             "jfSu35" => $jfSu35_time-$aHist['jfSu35_time'],
             "mbtM1A" => $mbtM1A_time-$aHist['mbtM1A_time'],
             "mbtT90" => $mbtT90_time-$aHist['mbtT90_time'],
             "saaCRAM" => $saaCRAM_time-$aHist['saaCRAM_time'],
             "saaPant" => $saaPant_time-$aHist['saaPant_time'],
             "shAH6" => $shAH6_time-$aHist['shAH6_time'],
             "shz11" => $shz11_time-$aHist['shz11_time'],
             "sKorn" => $sKorn_time-$aHist['sKorn_time'],
             "trHum" => $trHum_time-$aHist['trHum_time'],
             "trITV" => $trITV_time-$aHist['trITV_time'],
             "trKA60" => $trKA60_time-$aHist['trKA60_time'],
             "trRIB" => $trRIB_time-$aHist['trRIB_time'],
             "trUH1" => $trUH1_time-$aHist['trUH1_time'],
             "trVDV" => $trVDV_time-$aHist['trVDV_time'],
             "trVod" => $trVod_time-$aHist['trVod_time'],
             "trSkid" => $trSkid_time-$aHist['trSkid_time'],
             "trDpv" => $trDpv_time-$aHist['trDpv_time'],
             "ifvBTR90" => $ifvBTR90_time-$aHist['ifvBTR90_time'],
             "jfx1F35JSF" => $jfx1F35JSF_time-$aHist['jfx1F35JSF_time']
             );
            arsort($aVehicles);
             $Fvehicles = array_keys($aVehicles);
             $Hvehicles = $Fvehicles[0];
             $HvehiclesTime = round($aVehicles[$Fvehicles[0]]);
       
       
        $starsALL = 0;
        foreach ($aWeapons as $key => $wSkills){
        	$starsALL += $aHist[$key.'_count'];
        }
       
       $starsALLnew = 0;
        foreach ($aWeapons as $key => $wSkills){
        	$starsALLnew += $aPlayer['stats']['weapons'][$key]['star']['count'];
        }
       
       $Hstars = $starsALLnew-$starsALL;
       
       
				$oHistory = new history($pid);
				$aPlayerHistory = array(
					'pid' => $pid,
					'totalscore' => $Hscore,
					'kills' => $Hkills,
					'deaths' => $Hdeaths,
					'games' => $Hrounds,
					'time' => $Htime,
					'rank' => $Hg_rank,
					'rankimg' => $Hrank,
					'dogtag' => $Hdogtags,
					'resupplies' => $Hresupplies,
					'revives' => $Hrevives,
					'headshots' => $Hheadshots,
					'heals' => $Hheals,
					'team' => $Hteam,
					'wins' => $Hwins,
					'looses' => $Hlooses,
					'shots' => $Hshots,
					'hits' => $Hhits,
					'ribbons' => $Hribbons,
					'skill' => $Hskill,
					'medals' => $HMedals,
					'class' => $Hclass,
					'weapon' => $Hweapons,
					'wkills' => $HweponsaKills,
					'vehicles' => $Hvehicles,
					'vehiclesTime' => $HvehiclesTime,
					'stars' => $Hstars
				);
	
				$oHistory->saveHistory($aPlayerHistory);
				
				$sSql ="UPDATE ".DBPrefix."generalStats SET HistoryUpdate = '{$HTime}' WHERE soldiername = '{$aPlayer['name']}'";
				    mysql_query($sSql) OR die(mysql_error());
			}
		
	/* Histroy Funktion END*/
		
		
		$xpma01_count = $aPlayer['stats']['assignments']['xpma01']['xpma01']['count'];
		$xpma01_date = $aPlayer['stats']['assignments']['xpma01']['xpma01']['date'];
		$xpma01_criteria1 = $aPlayer['stats']['assignments']['xpma01']['xpma01']['criteria'][0]['curr'];
		$xpma01_criteria2 = $aPlayer['stats']['assignments']['xpma01']['xpma01']['criteria'][1]['curr'];
		
		$xpma02_count = $aPlayer['stats']['assignments']['xpma01']['xpma02']['count'];
		$xpma02_date = $aPlayer['stats']['assignments']['xpma01']['xpma02']['date'];
		$xpma02_criteria1 = $aPlayer['stats']['assignments']['xpma01']['xpma02']['criteria'][0]['curr'];
		$xpma02_criteria2 = $aPlayer['stats']['assignments']['xpma01']['xpma02']['criteria'][1]['curr'];
		$xpma02_criteria3 = $aPlayer['stats']['assignments']['xpma01']['xpma02']['criteria'][2]['curr'];
		
		$xpma03_count = $aPlayer['stats']['assignments']['xpma03']['xpma03']['count'];
		$xpma03_date = $aPlayer['stats']['assignments']['xpma03']['xpma03']['date'];
		$xpma03_criteria1 = $aPlayer['stats']['assignments']['xpma03']['xpma03']['criteria'][0]['curr'];
		$xpma03_criteria2 = $aPlayer['stats']['assignments']['xpma03']['xpma03']['criteria'][1]['curr'];
		
		$xpma04_count = $aPlayer['stats']['assignments']['xpma03']['xpma04']['count'];
		$xpma04_date = $aPlayer['stats']['assignments']['xpma03']['xpma04']['date'];
		$xpma04_criteria1 = $aPlayer['stats']['assignments']['xpma03']['xpma04']['criteria'][0]['curr'];
		$xpma04_criteria2 = $aPlayer['stats']['assignments']['xpma03']['xpma04']['criteria'][1]['curr'];
		$xpma04_criteria3 = $aPlayer['stats']['assignments']['xpma03']['xpma04']['criteria'][2]['curr'];
		
		
		$xpma05_count = $aPlayer['stats']['assignments']['xpma05']['xpma05']['count'];
		$xpma05_date = $aPlayer['stats']['assignments']['xpma05']['xpma05']['date'];
		$xpma05_criteria1 = $aPlayer['stats']['assignments']['xpma05']['xpma05']['criteria'][0]['curr'];
		$xpma05_criteria2 = $aPlayer['stats']['assignments']['xpma05']['xpma05']['criteria'][1]['curr'];
		
		$xpma06_count = $aPlayer['stats']['assignments']['xpma05']['xpma06']['count'];
		$xpma06_date = $aPlayer['stats']['assignments']['xpma05']['xpma06']['date'];
		$xpma06_criteria1 = $aPlayer['stats']['assignments']['xpma05']['xpma06']['criteria'][0]['curr'];
		$xpma06_criteria2 = $aPlayer['stats']['assignments']['xpma05']['xpma06']['criteria'][1]['curr'];
		$xpma06_criteria3 = $aPlayer['stats']['assignments']['xpma05']['xpma06']['criteria'][2]['curr'];
		
		$xpma07_count = $aPlayer['stats']['assignments']['xpma07']['xpma07']['count'];
		$xpma07_date = $aPlayer['stats']['assignments']['xpma07']['xpma07']['date'];
		$xpma07_criteria1 = $aPlayer['stats']['assignments']['xpma07']['xpma07']['criteria'][0]['curr'];
		$xpma07_criteria2 = $aPlayer['stats']['assignments']['xpma07']['xpma07']['criteria'][1]['curr'];
		
		$xpma08_count = $aPlayer['stats']['assignments']['xpma07']['xpma08']['count'];
		$xpma08_date = $aPlayer['stats']['assignments']['xpma07']['xpma08']['date'];
		$xpma08_criteria1 = $aPlayer['stats']['assignments']['xpma07']['xpma08']['criteria'][0]['curr'];
		$xpma08_criteria2 = $aPlayer['stats']['assignments']['xpma07']['xpma08']['criteria'][1]['curr'];
		$xpma08_criteria3 = $aPlayer['stats']['assignments']['xpma07']['xpma08']['criteria'][2]['curr'];
		
		$xpma09_count = $aPlayer['stats']['assignments']['xpma09']['xpma09']['count'];
		$xpma09_date = $aPlayer['stats']['assignments']['xpma09']['xpma09']['date'];
		$xpma09_criteria1 = $aPlayer['stats']['assignments']['xpma09']['xpma09']['criteria'][0]['curr'];
		$xpma09_criteria2 = $aPlayer['stats']['assignments']['xpma09']['xpma09']['criteria'][1]['curr'];
		$xpma09_criteria3 = $aPlayer['stats']['assignments']['xpma09']['xpma09']['criteria'][2]['curr'];
		
		$xpma10_count = $aPlayer['stats']['assignments']['xpma09']['xpma10']['count'];
		$xpma10_date = $aPlayer['stats']['assignments']['xpma09']['xpma10']['date'];
		$xpma10_criteria1 = $aPlayer['stats']['assignments']['xpma09']['xpma10']['criteria'][0]['curr'];
		$xpma10_criteria2 = $aPlayer['stats']['assignments']['xpma09']['xpma10']['criteria'][1]['curr'];
		$xpma10_criteria3 = $aPlayer['stats']['assignments']['xpma09']['xpma10']['criteria'][2]['curr'];
		$xpma10_criteria4 = $aPlayer['stats']['assignments']['xpma09']['xpma10']['criteria'][3]['curr'];
		$xpma10_criteria5 = $aPlayer['stats']['assignments']['xpma09']['xpma10']['criteria'][4]['curr'];
		
		
		$xp2prema01_count = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema01']['count'];
		$xp2prema01_date = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema01']['date'];
		$xp2prema01_criteria1 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema01']['criteria'][0]['curr'];
		$xp2prema01_criteria2 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema01']['criteria'][1]['curr'];
		$xp2prema01_criteria3 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema01']['criteria'][2]['curr'];
    
    $xp2prema02_count = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema02']['count'];
		$xp2prema02_date = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema02']['date'];
		$xp2prema02_criteria1 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema02']['criteria'][0]['curr'];
		$xp2prema02_criteria2 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema02']['criteria'][1]['curr'];
		
		
    $xp2prema03_count = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema03']['count'];
		$xp2prema03_date = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema03']['date'];
		$xp2prema03_criteria1 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema03']['criteria'][0]['curr'];
		$xp2prema03_criteria2 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema03']['criteria'][1]['curr'];
		$xp2prema03_criteria3 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema03']['criteria'][2]['curr'];

    $xp2prema04_count = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema04']['count'];
		$xp2prema04_date = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema04']['date'];
		$xp2prema04_criteria1 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema04']['criteria'][0]['curr'];
		$xp2prema04_criteria2 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema04']['criteria'][1]['curr'];
		$xp2prema04_criteria3 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema04']['criteria'][2]['curr'];
    
    $xp2prema05_count = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema05']['count'];
		$xp2prema05_date = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema05']['date'];
		$xp2prema05_criteria1 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema05']['criteria'][0]['curr'];
		$xp2prema05_criteria2 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema05']['criteria'][1]['curr'];
		$xp2prema05_criteria3 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema05']['criteria'][2]['curr'];
    $xp2prema05_criteria4 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema05']['criteria'][3]['curr'];
		$xp2prema05_criteria5 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema05']['criteria'][4]['curr'];
		
		$xp2prema06_count = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema06']['count'];
		$xp2prema06_date = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema06']['date'];
		$xp2prema06_criteria1 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema06']['criteria'][0]['curr'];
		$xp2prema06_criteria2 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema06']['criteria'][1]['curr'];
		$xp2prema06_criteria3 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema06']['criteria'][2]['curr'];
    
    
    $xp2prema07_count = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema07']['count'];
		$xp2prema07_date = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema07']['date'];
		$xp2prema07_criteria1 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema07']['criteria'][0]['curr'];
		$xp2prema07_criteria2 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema07']['criteria'][1]['curr'];
		$xp2prema07_criteria3 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema07']['criteria'][2]['curr'];
    
    
    $xp2prema08_count = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema08']['count'];
		$xp2prema08_date = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema08']['date'];
		$xp2prema08_criteria1 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema08']['criteria'][0]['curr'];
		$xp2prema08_criteria2 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema08']['criteria'][1]['curr'];
		$xp2prema08_criteria3 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema08']['criteria'][2]['curr'];
    
    
    $xp2prema09_count = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema09']['count'];
		$xp2prema09_date = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema09']['date'];
		$xp2prema09_criteria1 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema09']['criteria'][0]['curr'];
		$xp2prema09_criteria2 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema09']['criteria'][1]['curr'];
		$xp2prema09_criteria3 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema09']['criteria'][2]['curr'];
    
    
    $xp2prema10_count = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema10']['count'];
		$xp2prema10_date = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema10']['date'];
		$xp2prema10_criteria1 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema10']['criteria'][0]['curr'];
		$xp2prema10_criteria2 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema10']['criteria'][1]['curr'];
		$xp2prema10_criteria3 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema10']['criteria'][2]['curr'];
    $xp2prema10_criteria4 = $aPlayer['stats']['assignments']['PREMIUM']['xp2prema10']['criteria'][3]['curr'];

		
		
		
		$xp2ma01_count = $aPlayer['stats']['assignments']['xp2ma01']['xp2ma01']['count'];
		$xp2ma01_date = $aPlayer['stats']['assignments']['xp2ma01']['xp2ma01']['date'];
		$xp2ma01_criteria1 = $aPlayer['stats']['assignments']['xp2ma01']['xp2ma01']['criteria'][0]['curr'];
		$xp2ma01_criteria2 = $aPlayer['stats']['assignments']['xp2ma01']['xp2ma01']['criteria'][1]['curr'];
		
		$xp2ma02_count = $aPlayer['stats']['assignments']['xp2ma01']['xp2ma02']['count'];
		$xp2ma02_date = $aPlayer['stats']['assignments']['xp2ma01']['xp2ma02']['date'];
		$xp2ma02_criteria1 = $aPlayer['stats']['assignments']['xp2ma01']['xp2ma02']['criteria'][0]['curr'];
		$xp2ma02_criteria2 = $aPlayer['stats']['assignments']['xp2ma01']['xp2ma02']['criteria'][1]['curr'];
		
		$xp2ma03_count = $aPlayer['stats']['assignments']['xp2ma03']['xp2ma03']['count'];
		$xp2ma03_date = $aPlayer['stats']['assignments']['xp2ma03']['xp2ma03']['date'];
		$xp2ma03_criteria1 = $aPlayer['stats']['assignments']['xp2ma03']['xp2ma03']['criteria'][0]['curr'];
		$xp2ma03_criteria2 = $aPlayer['stats']['assignments']['xp2ma03']['xp2ma03']['criteria'][1]['curr'];
		
		$xp2ma04_count = $aPlayer['stats']['assignments']['xp2ma03']['xp2ma04']['count'];
		$xp2ma04_date = $aPlayer['stats']['assignments']['xp2ma03']['xp2ma04']['date'];
		$xp2ma04_criteria1 = $aPlayer['stats']['assignments']['xp2ma03']['xp2ma04']['criteria'][0]['curr'];
		$xp2ma04_criteria2 = $aPlayer['stats']['assignments']['xp2ma03']['xp2ma04']['criteria'][1]['curr'];
		
		$xp2ma05_count = $aPlayer['stats']['assignments']['xp2ma05']['xp2ma05']['count'];
		$xp2ma05_date = $aPlayer['stats']['assignments']['xp2ma05']['xp2ma05']['date'];
		$xp2ma05_criteria1 = $aPlayer['stats']['assignments']['xp2ma05']['xp2ma05']['criteria'][0]['curr'];
		$xp2ma05_criteria2 = $aPlayer['stats']['assignments']['xp2ma05']['xp2ma05']['criteria'][1]['curr'];
		
		$xp2ma06_count = $aPlayer['stats']['assignments']['xp2ma05']['xp2ma06']['count'];
		$xp2ma06_date = $aPlayer['stats']['assignments']['xp2ma05']['xp2ma06']['date'];
		$xp2ma06_criteria1 = $aPlayer['stats']['assignments']['xp2ma05']['xp2ma06']['criteria'][0]['curr'];
		$xp2ma06_criteria2 = $aPlayer['stats']['assignments']['xp2ma05']['xp2ma06']['criteria'][1]['curr'];
		
		$xp2ma07_count = $aPlayer['stats']['assignments']['xp2ma07']['xp2ma07']['count'];
		$xp2ma07_date = $aPlayer['stats']['assignments']['xp2ma07']['xp2ma07']['date'];
		$xp2ma07_criteria1 = $aPlayer['stats']['assignments']['xp2ma07']['xp2ma07']['criteria'][0]['curr'];
		$xp2ma07_criteria2 = $aPlayer['stats']['assignments']['xp2ma07']['xp2ma07']['criteria'][1]['curr'];
		
		$xp2ma08_count = $aPlayer['stats']['assignments']['xp2ma07']['xp2ma08']['count'];
		$xp2ma08_date = $aPlayer['stats']['assignments']['xp2ma07']['xp2ma08']['date'];
		$xp2ma08_criteria1 = $aPlayer['stats']['assignments']['xp2ma07']['xp2ma08']['criteria'][0]['curr'];
		$xp2ma08_criteria2 = $aPlayer['stats']['assignments']['xp2ma07']['xp2ma08']['criteria'][1]['curr'];
		
		$xp2ma09_count = $aPlayer['stats']['assignments']['xp2ma09']['xp2ma09']['count'];
		$xp2ma09_date = $aPlayer['stats']['assignments']['xp2ma09']['xp2ma09']['date'];
		$xp2ma09_criteria1 = $aPlayer['stats']['assignments']['xp2ma09']['xp2ma09']['criteria'][0]['curr'];
		$xp2ma09_criteria2 = $aPlayer['stats']['assignments']['xp2ma09']['xp2ma09']['criteria'][1]['curr'];
		
		$xp2ma10_count = $aPlayer['stats']['assignments']['xp2ma09']['xp2ma10']['count'];
		$xp2ma10_date = $aPlayer['stats']['assignments']['xp2ma09']['xp2ma10']['date'];
		$xp2ma10_criteria1 = $aPlayer['stats']['assignments']['xp2ma09']['xp2ma10']['criteria'][0]['curr'];
		$xp2ma10_criteria2 = $aPlayer['stats']['assignments']['xp2ma09']['xp2ma10']['criteria'][1]['curr'];


					$sSql ="	UPDATE 
					".DBPrefix."assignments 
				SET 
		xpma01_count = '{$xpma01_count}',
	  xpma01_date = '{$xpma01_date}',
	  xpma01_criteria1 = '{$xpma01_criteria1}',
	  xpma01_criteria2 = '{$xpma01_criteria2}',  
	  xpma02_count = '{$xpma02_count}',
	  xpma02_date = '{$xpma02_date}',
	  xpma02_criteria1 = '{$xpma02_criteria1}',
	  xpma02_criteria2 = '{$xpma02_criteria2}',
	  xpma02_criteria3 = '{$xpma02_criteria3}',	  
	  xpma03_count = '{$xpma03_count}',
	  xpma03_date = '{$xpma03_date}',
	  xpma03_criteria1 = '{$xpma03_criteria1}',
	  xpma03_criteria2 = '{$xpma03_criteria2}',  
	  xpma04_count = '{$xpma04_count}',
	  xpma04_date = '{$xpma04_date}',
	  xpma04_criteria1 = '{$xpma04_criteria1}',
	  xpma04_criteria2 = '{$xpma04_criteria2}',
	  xpma04_criteria3 = '{$xpma04_criteria3}',	  
	  xpma05_count = '{$xpma05_count}',
	  xpma05_date = '{$xpma05_date}',
	  xpma05_criteria1 = '{$xpma05_criteria1}',
	  xpma05_criteria2 = '{$xpma05_criteria2}',	  
	  xpma06_count = '{$xpma06_count}',
	  xpma06_date = '{$xpma06_date}',
	  xpma06_criteria1 = '{$xpma06_criteria1}',
	  xpma06_criteria2 = '{$xpma06_criteria2}',
	  xpma06_criteria3 = '{$xpma06_criteria3}',	  
	  xpma07_count = '{$xpma07_count}',
	  xpma07_date = '{$xpma07_date}',
	  xpma07_criteria1 = '{$xpma07_criteria1}',
	  xpma07_criteria2 = '{$xpma07_criteria2}',  
	  xpma08_count = '{$xpma08_count}',
	  xpma08_date = '{$xpma08_date}',
	  xpma08_criteria1 = '{$xpma08_criteria1}',
	  xpma08_criteria2 = '{$xpma08_criteria2}',
	  xpma08_criteria3 = '{$xpma08_criteria3}',  
	  xpma09_count = '{$xpma09_count}',
	  xpma09_date = '{$xpma09_date}',
	  xpma09_criteria1 = '{$xpma09_criteria1}',
	  xpma09_criteria2 = '{$xpma09_criteria2}',
	  xpma09_criteria3 = '{$xpma09_criteria3}',  
	  xpma10_count = '{$xpma10_count}',
	  xpma10_date = '{$xpma10_date}',
	  xpma10_criteria1 = '{$xpma10_criteria1}',
	  xpma10_criteria2 = '{$xpma10_criteria2}',
	  xpma10_criteria3 = '{$xpma10_criteria3}',
	  xpma10_criteria4 = '{$xpma10_criteria4}',
	  xpma10_criteria5 = '{$xpma10_criteria5}',
	  xp2prema01_count = '{$xp2prema01_count}',
	  xp2prema01_date = '{$xp2prema01_date}',
	  xp2prema01_criteria1 = '{$xp2prema01_criteria1}',
	  xp2prema01_criteria2 = '{$xp2prema01_criteria2}',
	  xp2prema01_criteria3 = '{$xp2prema01_criteria3}',
	  xp2prema02_count = '{$xp2prema02_count}',
	  xp2prema02_date = '{$xp2prema02_date}',
	  xp2prema02_criteria1 = '{$xp2prema02_criteria1}',
	  xp2prema02_criteria2 = '{$xp2prema02_criteria2}',
	  xp2prema03_count = '{$xp2prema03_count}',
	  xp2prema03_date = '{$xp2prema03_date}',
	  xp2prema03_criteria1 = '{$xp2prema03_criteria1}',
	  xp2prema03_criteria2 = '{$xp2prema03_criteria2}',
	  xp2prema03_criteria3 = '{$xp2prema03_criteria3}',
	  xp2prema04_count = '{$xp2prema04_count}',
	  xp2prema04_date = '{$xp2prema04_date}',
	  xp2prema04_criteria1 = '{$xp2prema04_criteria1}',
	  xp2prema04_criteria2 = '{$xp2prema04_criteria2}',
	  xp2prema04_criteria3 = '{$xp2prema04_criteria3}',
	  xp2prema05_count = '{$xp2prema05_count}',
	  xp2prema05_date = '{$xp2prema05_date}',
	  xp2prema05_criteria1 = '{$xp2prema05_criteria1}',
	  xp2prema05_criteria2 = '{$xp2prema05_criteria2}',
	  xp2prema05_criteria3 = '{$xp2prema05_criteria3}',
	  xp2prema05_criteria4 = '{$xp2prema05_criteria4}',
	  xp2prema05_criteria5 = '{$xp2prema05_criteria5}',
	  xp2prema06_count = '{$xp2prema06_count}',
	  xp2prema06_date = '{$xp2prema06_date}',
	  xp2prema06_criteria1 = '{$xp2prema06_criteria1}',
	  xp2prema06_criteria2 = '{$xp2prema06_criteria2}',
	  xp2prema06_criteria3 = '{$xp2prema06_criteria3}',
	  xp2prema07_count = '{$xp2prema07_count}',
	  xp2prema07_date = '{$xp2prema07_date}',
	  xp2prema07_criteria1 = '{$xp2prema07_criteria1}',
	  xp2prema07_criteria2 = '{$xp2prema07_criteria2}',
	  xp2prema07_criteria3 = '{$xp2prema07_criteria3}',
	  xp2prema08_count = '{$xp2prema08_count}',
	  xp2prema08_date = '{$xp2prema08_date}',
	  xp2prema08_criteria1 = '{$xp2prema08_criteria1}',
	  xp2prema08_criteria2 = '{$xp2prema08_criteria2}',
	  xp2prema08_criteria3 = '{$xp2prema08_criteria3}',
	  xp2prema09_count = '{$xp2prema09_count}',
	  xp2prema09_date = '{$xp2prema09_date}',
	  xp2prema09_criteria1 = '{$xp2prema09_criteria1}',
	  xp2prema09_criteria2 = '{$xp2prema09_criteria2}',
	  xp2prema09_criteria3 = '{$xp2prema09_criteria3}',
	  xp2prema10_count = '{$xp2prema10_count}',
	  xp2prema10_date = '{$xp2prema10_date}',
	  xp2prema10_criteria1 = '{$xp2prema10_criteria1}',
	  xp2prema10_criteria2 = '{$xp2prema10_criteria2}',
	  xp2prema10_criteria3 = '{$xp2prema10_criteria3}', 
	  xp2prema10_criteria4 = '{$xp2prema10_criteria4}',
	  xp2ma01_count = '{$xp2ma01_count}',
	  xp2ma01_date = '{$xp2ma01_date}',
	  xp2ma01_criteria1 = '{$xp2ma01_criteria1}',
	  xp2ma01_criteria2 = '{$xp2ma01_criteria2}',
	  xp2ma02_count = '{$xp2ma02_count}',
	  xp2ma02_date = '{$xp2ma02_date}',
	  xp2ma02_criteria1 = '{$xp2ma02_criteria1}',
	  xp2ma02_criteria2 = '{$xp2ma02_criteria2}',
	  xp2ma03_count = '{$xp2ma03_count}',
	  xp2ma03_date = '{$xp2ma03_date}',
	  xp2ma03_criteria1 = '{$xp2ma03_criteria1}',
	  xp2ma03_criteria2 = '{$xp2ma03_criteria2}',
	  xp2ma04_count = '{$xp2ma04_count}',
	  xp2ma04_date = '{$xp2ma04_date}',
	  xp2ma04_criteria1 = '{$xp2ma04_criteria1}',
	  xp2ma04_criteria2 = '{$xp2ma04_criteria2}',
	  xp2ma05_count = '{$xp2ma05_count}',
	  xp2ma05_date = '{$xp2ma05_date}',
	  xp2ma05_criteria1 = '{$xp2ma05_criteria1}',
	  xp2ma05_criteria2 = '{$xp2ma05_criteria2}',
	  xp2ma06_count = '{$xp2ma06_count}',
	  xp2ma06_date = '{$xp2ma06_date}',
	  xp2ma06_criteria1 = '{$xp2ma06_criteria1}',
	  xp2ma06_criteria2 = '{$xp2ma06_criteria2}',
	  xp2ma07_count = '{$xp2ma07_count}',
	  xp2ma07_date = '{$xp2ma07_date}',
	  xp2ma07_criteria1 = '{$xp2ma07_criteria1}',
	  xp2ma07_criteria2 = '{$xp2ma07_criteria2}',
	  xp2ma08_count = '{$xp2ma08_count}',
	  xp2ma08_date = '{$xp2ma08_date}',
	  xp2ma08_criteria1 = '{$xp2ma08_criteria1}',
	  xp2ma08_criteria2 = '{$xp2ma08_criteria2}',
	  xp2ma09_count = '{$xp2ma09_count}',
	  xp2ma09_date = '{$xp2ma09_date}',
	  xp2ma09_criteria1 = '{$xp2ma09_criteria1}',
	  xp2ma09_criteria2 = '{$xp2ma09_criteria2}',
	  xp2ma10_count = '{$xp2ma10_count}',
	  xp2ma10_date = '{$xp2ma10_date}',
	  xp2ma10_criteria1 = '{$xp2ma10_criteria1}',
	  xp2ma10_criteria2 = '{$xp2ma10_criteria2}'
		 WHERE 
					stats_pid = '{$pid}'";
	mysql_query($sSql) OR die(mysql_error());
	
		
		
			$sSql ="	UPDATE 
					".DBPrefix."equipment 
				SET 
		waeM67_time = '{$waeM67_time}',
		waeM67_kills = '{$waeM67_kills}',
		waeM67_shots = '{$waeM67_shots}',
		waeM67_hits = '{$waeM67_hits}',
		waeM67_headshots = '{$waeM67_headshots}', 
	  wasDef_time = '{$wasDef_time}',
		wasDef_kills = '{$wasDef_kills}',
		wasDef_shots = '{$wasDef_shots}',
		wasDef_hits = '{$wasDef_hits}',
		wasDef_revives = '{$wasDef_revives}',
		wasDef_headshots = '{$wasDef_headshots}',
		waeC4_time = '{$waeC4_time}',
		waeC4_kills = '{$waeC4_kills}',
		waeC4_shots = '{$waeC4_shots}',
		waeC4_hits = '{$waeC4_hits}',
		waeC4_headshots = '{$waeC4_headshots}',	
		seqUGS_time = '{$seqUGS_time}',
		seqUGS_kills = '{$seqUGS_kills}',
		seqUGS_spots = '{$seqUGS_spots}',	
		waeMine_time = '{$waeMine_time}',
		waeMine_kills = '{$waeMine_kills}',
		waeMine_shots = '{$waeMine_shots}',
		waeMine_hits = '{$waeMine_hits}',
		waeMine_headshots = '{$waeMine_headshots}',
		waeClay_time = '{$waeClay_time}',
		waeClay_kills = '{$waeClay_kills}',
		waeClay_shots = '{$waeClay_shots}',
		waeClay_hits = '{$waeClay_hits}',
		waeClay_headshots = '{$waeClay_headshots}',
		seqEOD_time = '{$seqEOD_time}',
		seqEOD_kills = '{$seqEOD_kills}',
		seqRad_time = '{$seqRad_time}',
		seqRad_kills = '{$seqRad_kills}',
		seqRad_spawns = '{$seqRad_spawns}',
		seqSOF_time = '{$seqSOF_time}',
		seqSOF_kills = '{$seqSOF_kills}',
	  waeMort_time = '{$waeMort_time}',
		waeMort_kills = '{$waeMort_kills}',
		seqMAV_spots = '{$seqMAV_spots}',
	  seqMAV_time = '{$seqMAV_time}',
		seqMAV_kills = '{$seqMAV_kills}',
		wasRT_time = '{$wasRT_time}',
		wasRT_kills = '{$wasRT_kills}',
		wasRT_shots = '{$wasRT_shots}',
		wasRT_hits = '{$wasRT_hits}',
		wasRT_headshots = '{$wasRT_headshots}'
		 WHERE 
					stats_pid = '{$pid}'";
	mysql_query($sSql) OR die(mysql_error());
		
		
		
		
						$sSql ="	UPDATE 
					".DBPrefix."weapons 
				SET 
		      arAEK_time = '{$arAEK_time}',
		      arAEK_kills = '{$arAEK_kills}',
		      arAEK_shots = '{$arAEK_shots}',
		      arAEK_headshots = '{$arAEK_headshots}',
		      arAEK_hits = '{$arAEK_hits}',	      
		      arAK74_time = '{$arAK74_time}',
		      arAK74_kills = '{$arAK74_kills}',
		      arAK74_shots = '{$arAK74_shots}',
		      arAK74_headshots = '{$arAK74_headshots}',
		      arAK74_hits = '{$arAK74_hits}',		           
		      arAN94_time = '{$arAN94_time}',
		      arAN94_kills = '{$arAN94_kills}',
		      arAN94_shots = '{$arAN94_shots}',
		      arAN94_headshots = '{$arAN94_headshots}',
		      arAN94_hits = '{$arAN94_hits}',		      	      
		      arF2_time = '{$arF2_time}',
		      arF2_kills = '{$arF2_kills}',
		      arF2_shots = '{$arF2_shots}',
		      arF2_headshots = '{$arF2_headshots}',
		      arF2_hits = '{$arF2_hits}',		      		        
		      arG3_time = '{$arG3_time}',
		      arG3_kills = '{$arG3_kills}',
		      arG3_shots = '{$arG3_shots}',
		      arG3_headshots = '{$arG3_headshots}',
		      arG3_hits = '{$arG3_hits}',		      		      
		      arKH_time = '{$arKH_time}',
		      arKH_kills = '{$arKH_kills}',
		      arKH_shots = '{$arKH_shots}',
		      arKH_headshots = '{$arKH_headshots}',
		      arKH_hits = '{$arKH_hits}',		      	      
		      arM16_time = '{$arM16_time}',
		      arM16_kills = '{$arM16_kills}',
		      arM16_shots = '{$arM16_shots}',
		      arM16_headshots = '{$arM16_headshots}',
		      arM16_hits = '{$arM16_hits}',		      		      
		      arM416_time = '{$arM416_time}',
		      arM416_kills = '{$arM416_kills}',
		      arM416_shots = '{$arM416_shots}',
		      arM416_headshots = '{$arM416_headshots}',
		      arM416_hits = '{$arM416_hits}',		      	      
		      caA91_time = '{$caA91_time}',
		      caA91_kills = '{$caA91_kills}',
		      caA91_shots = '{$caA91_shots}',
		      caA91_headshots = '{$caA91_headshots}',
		      caA91_hits = '{$caA91_hits}',		      		      
		      caAKS_time = '{$caAKS_time}',
		      caAKS_kills = '{$caAKS_kills}',
		      caAKS_shots = '{$caAKS_shots}',
		      caAKS_headshots = '{$caAKS_headshots}',
		      caAKS_hits = '{$caAKS_hits}',	            
		      caG36_time = '{$caG36_time}',
		      caG36_kills = '{$caG36_kills}',
		      caG36_shots = '{$caG36_shots}',
		      caG36_headshots = '{$caG36_headshots}',
		      caG36_hits = '{$caG36_hits}',		            
		      caM4_time = '{$caM4_time}',
		      caM4_kills = '{$caM4_kills}',
		      caM4_shots = '{$caM4_shots}',
		      caM4_headshots = '{$caM4_headshots}',
		      caM4_hits = '{$caM4_hits}',	      	      
		      caSCAR_time = '{$caSCAR_time}',
		      caSCAR_kills = '{$caSCAR_kills}',
		      caSCAR_shots = '{$caSCAR_shots}',
		      caSCAR_headshots = '{$caSCAR_headshots}',
		      caSCAR_hits = '{$caSCAR_hits}',	      	      
		      caSG553_time = '{$caSG553_time}',
		      caSG553_kills = '{$caSG553_kills}',
		      caSG553_shots = '{$caSG553_shots}',
		      caSG553_headshots = '{$caSG553_headshots}',
		      caSG553_hits = '{$caSG553_hits}',	      	      
		      mgM240_time = '{$mgM240_time}',
		      mgM240_kills = '{$mgM240_kills}',
		      mgM240_shots = '{$mgM240_shots}',
		      mgM240_headshots = '{$mgM240_headshots}',
		      mgM240_hits = '{$mgM240_hits}',		      	      
		      mgM249_time = '{$mgM249_time}',
		      mgM249_kills = '{$mgM249_kills}',
		      mgM249_shots = '{$mgM249_shots}',
		      mgM249_headshots = '{$mgM249_headshots}',
		      mgM249_hits = '{$mgM249_hits}',		      	      
		      mgM27_time = '{$mgM27_time}',
		      mgM27_kills = '{$mgM27_kills}',
		      mgM27_shots = '{$mgM27_shots}',
		      mgM27_headshots = '{$mgM27_headshots}',
		      mgM27_hits = '{$mgM27_hits}',		     	      
		      mgM60_time = '{$mgM60_time}',
		      mgM60_kills = '{$mgM60_kills}',
		      mgM60_shots = '{$mgM60_shots}',
		      mgM60_headshots = '{$mgM60_headshots}',
		      mgM60_hits = '{$mgM60_hits}',		     	      
		      mgPech_time = '{$mgPech_time}',
		      mgPech_kills = '{$mgPech_kills}',
		      mgPech_shots = '{$mgPech_shots}',
		      mgPech_headshots = '{$mgPech_headshots}',
		      mgPech_hits = '{$mgPech_hits}',		      		      
		      mgRPK_time = '{$mgRPK_time}',
		      mgRPK_kills = '{$mgRPK_kills}',
		      mgRPK_shots = '{$mgRPK_shots}',
		      mgRPK_headshots = '{$mgRPK_headshots}',
		      mgRPK_hits = '{$mgRPK_hits}',		     	      
		      mgT88_time = '{$mgT88_time}',
		      mgT88_kills = '{$mgT88_kills}',
		      mgT88_shots = '{$mgT88_shots}',
		      mgT88_headshots = '{$mgT88_headshots}',
		      mgT88_hits = '{$mgT88_hits}',		      	      
		      pG17S_time = '{$pG17S_time}',
		      pG17S_kills = '{$pG17S_kills}',
		      pG17S_shots = '{$pG17S_shots}',
		      pG17S_headshots = '{$pG17S_headshots}',
		      pG17S_hits = '{$pG17S_hits}',		            
		      pG17_time = '{$pG17_time}',
		      pG17_kills = '{$pG17_kills}',
		      pG17_shots = '{$pG17_shots}',
		      pG17_headshots = '{$pG17_headshots}',
		      pG17_hits = '{$pG17_hits}',
		      pg18S_time = '{$pg18S_time}',
		      pg18S_kills = '{$pg18S_kills}',
		      pg18S_shots = '{$pg18S_shots}',
		      pg18S_headshots = '{$pg18S_headshots}',
		      pg18S_hits = '{$pg18S_hits}',		            
		      pg18_time = '{$pg18_time}',
		      pg18_kills = '{$pg18_kills}',
		      pg18_shots = '{$pg18_shots}',
		      pg18_headshots = '{$pg18_headshots}',
		      pg18_hits = '{$pg18_hits}',		      	      
		      pM1911L_time = '{$pM1911L_time}',
		      pM1911L_kills = '{$pM1911L_kills}',
		      pM1911L_shots = '{$pM1911L_shots}',
		      pM1911L_headshots = '{$pM1911L_headshots}',
		      pM1911L_hits = '{$pM1911L_hits}',		         
		      pM1911_time = '{$pM1911_time}',
		      pM1911_kills = '{$pM1911_kills}',
		      pM1911_shots = '{$pM1911_shots}',
		      pM1911_headshots = '{$pM1911_headshots}',
		      pM1911_hits = '{$pM1911_hits}',		           
		      pM1911S_time = '{$pM1911S_time}',
		      pM1911S_kills = '{$pM1911S_kills}',
		      pM1911S_shots = '{$pM1911S_shots}',
		      pM1911S_headshots = '{$pM1911S_headshots}',
		      pM1911S_hits = '{$pM1911S_hits}',		      	      
		      pM1911T_time = '{$pM1911T_time}',
		      pM1911T_kills = '{$pM1911T_kills}',
		      pM1911T_shots = '{$pM1911T_shots}',
		      pM1911T_headshots = '{$pM1911T_headshots}',
		      pM1911T_hits = '{$pM1911T_hits}',		      		      
		      pM412_time = '{$pM412_time}',
		      pM412_kills = '{$pM412_kills}',
		      pM412_shots = '{$pM412_shots}',
		      pM412_headshots = '{$pM412_headshots}',
		      pM412_hits = '{$pM412_hits}',		     	      
		      pM9F_time = '{$pM9F_time}',
		      pM9F_kills = '{$pM9F_kills}',
		      pM9F_shots = '{$pM9F_shots}',
		      pM9F_headshots = '{$pM9F_headshots}',
		      pM9F_hits = '{$pM9F_hits}',		      		      
		      pM9S_time = '{$pM9S_time}',
		      pM9S_kills = '{$pM9S_kills}',
		      pM9S_shots = '{$pM9S_shots}',
		      pM9S_headshots = '{$pM9S_headshots}',
		      pM9S_hits = '{$pM9S_hits}',		      	      
		      pM9_time = '{$pM9_time}',
		      pM9_kills = '{$pM9_kills}',
		      pM9_shots = '{$pM9_shots}',
		      pM9_headshots = '{$pM9_headshots}',
		      pM9_hits = '{$pM9_hits}',		      	      
		      pM93R_time = '{$pM93R_time}',
		      pM93R_kills = '{$pM93R_kills}',
		      pM93R_shots = '{$pM93R_shots}',
		      pM93R_headshots = '{$pM93R_headshots}',
		      pM93R_hits = '{$pM93R_hits}',	     	      
		      pMP443L_time = '{$pMP443L_time}',
		      pMP443L_kills = '{$pMP443L_kills}',
		      pMP443L_shots = '{$pMP443L_shots}',
		      pMP443L_headshots = '{$pMP443L_headshots}',
		      pMP443L_hits = '{$pMP443L_hits}',		      	      
		      pMP443S_time = '{$pMP443S_time}',
		      pMP443S_kills = '{$pMP443S_kills}',
		      pMP443S_shots = '{$pMP443S_shots}',
		      pMP443S_headshots = '{$pMP443S_headshots}',
		      pMP443S_hits = '{$pMP443S_hits}',		     	      
		      pMP443_time = '{$pMP443_time}',
		      pMP443_kills = '{$pMP443_kills}',
		      pMP443_shots = '{$pMP443_shots}',
		      pMP443_headshots = '{$pMP443_headshots}',
		      pMP443_hits = '{$pMP443_hits}',		            
		      pTaurS_time = '{$pTaurS_time}',
		      pTaurS_kills = '{$pTaurS_kills}',
		      pTaurS_shots = '{$pTaurS_shots}',
		      pTaurS_headshots = '{$pTaurS_headshots}',
		      pTaurS_hits = '{$pTaurS_hits}',		      	      
		      pTaur_time = '{$pTaur_time}',
		      pTaur_kills = '{$pTaur_kills}',
		      pTaur_shots = '{$pTaur_shots}',
		      pTaur_headshots = '{$pTaur_headshots}',
		      pTaur_hits = '{$pTaur_hits}',		            
		      sg870_time = '{$sg870_time}',
		      sg870_kills = '{$sg870_kills}',
		      sg870_shots = '{$sg870_shots}',
		      sg870_headshots = '{$sg870_headshots}',
		      sg870_hits = '{$sg870_hits}',		            
		      sgDAO_time = '{$sgDAO_time}',
		      sgDAO_kills = '{$sgDAO_kills}',
		      sgDAO_shots = '{$sgDAO_shots}',
		      sgDAO_headshots = '{$sgDAO_headshots}',
		      sgDAO_hits = '{$sgDAO_hits}',		      	      
		      sgM1014_time = '{$sgM1014_time}',
		      sgM1014_kills = '{$sgM1014_kills}',
		      sgM1014_shots = '{$sgM1014_shots}',
		      sgM1014_headshots = '{$sgM1014_headshots}',
		      sgM1014_hits = '{$sgM1014_hits}',		      		      
		      sgSaiga_time = '{$sgSaiga_time}',
		      sgSaiga_kills = '{$sgSaiga_kills}',
		      sgSaiga_shots = '{$sgSaiga_shots}',
		      sgSaiga_headshots = '{$sgSaiga_headshots}',
		      sgSaiga_hits = '{$sgSaiga_hits}',		      	      
  	      sgUSAS_time = '{$sgUSAS_time}',
		      sgUSAS_kills = '{$sgUSAS_kills}',
		      sgUSAS_shots = '{$sgUSAS_shots}',
		      sgUSAS_headshots = '{$sgUSAS_headshots}',
		      sgUSAS_hits = '{$sgUSAS_hits}',		      
		      smMP7_time = '{$smMP7_time}',
		      smMP7_kills = '{$smMP7_kills}',
		      smMP7_shots = '{$smMP7_shots}',
		      smMP7_headshots = '{$smMP7_headshots}',
		      smMP7_hits = '{$smMP7_hits}',		      		      
		      smP90_time = '{$smP90_time}',
		      smP90_kills = '{$smP90_kills}',
		      smP90_shots = '{$smP90_shots}',
		      smP90_headshots = '{$smP90_headshots}',
		      smP90_hits = '{$smP90_hits}',		      		      
		      smPDR_time = '{$smPDR_time}',
		      smPDR_kills = '{$smPDR_kills}',
		      smPDR_shots = '{$smPDR_shots}',
		      smPDR_headshots = '{$smPDR_headshots}',
		      smPDR_hits = '{$smPDR_hits}',
		      smPP2000_time = '{$smPP2000_time}',
		      smPP2000_kills = '{$smPP2000_kills}',
		      smPP2000_shots = '{$smPP2000_shots}',
		      smPP2000_headshots = '{$smPP2000_headshots}',
		      smPP2000_hits = '{$smPP2000_hits}',		      	      
		      smUMP_time = '{$smUMP_time}',
		      smUMP_kills = '{$smUMP_kills}',
		      smUMP_shots = '{$smUMP_shots}',
		      smUMP_headshots = '{$smUMP_headshots}',
		      smUMP_hits = '{$smUMP_hits}',		      	      
		      smVAL_time = '{$smVAL_time}',
		      smVAL_kills = '{$smVAL_kills}',
		      smVAL_shots = '{$smVAL_shots}',
		      smVAL_headshots = '{$smVAL_headshots}',
		      smVAL_hits = '{$smVAL_hits}',		            
		      srM39_time = '{$srM39_time}',
		      srM39_kills = '{$srM39_kills}',
		      srM39_shots = '{$srM39_shots}',
		      srM39_headshots = '{$srM39_headshots}',
		      srM39_hits = '{$srM39_hits}',		      		      
		      srM40_time = '{$srM40_time}',
		      srM40_kills = '{$srM40_kills}',
		      srM40_shots = '{$srM40_shots}',
		      srM40_headshots = '{$srM40_headshots}',
		      srM40_hits = '{$srM40_hits}',		           
		      srM98_time = '{$srM98_time}',
		      srM98_kills = '{$srM98_kills}',
		      srM98_shots = '{$srM98_shots}',
		      srM98_headshots = '{$srM98_headshots}',
		      srM98_hits = '{$srM98_hits}',		     	      
		      srMK11_time = '{$srMK11_time}',
		      srMK11_kills = '{$srMK11_kills}',
		      srMK11_shots = '{$srMK11_shots}',
		      srMK11_headshots = '{$srMK11_headshots}',
		      srMK11_hits = '{$srMK11_hits}',		      	      
		      srSKS_time = '{$srSKS_time}',
		      srSKS_kills = '{$srSKS_kills}',
		      srSKS_shots = '{$srSKS_shots}',
		      srSKS_headshots = '{$srSKS_headshots}',
		      srSKS_hits = '{$srSKS_hits}',		     		      
		      srSV98_time = '{$srSV98_time}',
		      srSV98_kills = '{$srSV98_kills}',
		      srSV98_shots = '{$srSV98_shots}',
		      srSV98_headshots = '{$srSV98_headshots}',
		      srSV98_hits = '{$srSV98_hits}',		           
		      srSVD_time = '{$srSVD_time}',
		      srSVD_kills = '{$srSVD_kills}',
		      srSVD_shots = '{$srSVD_shots}',
		      srSVD_headshots = '{$srSVD_headshots}',
		      srSVD_hits = '{$srSVD_hits}',		           
		      srSVD_time = '{$srSVD_time}',
		      srSVD_kills = '{$srSVD_kills}',
		      srSVD_shots = '{$srSVD_shots}',
		      srSVD_headshots = '{$srSVD_headshots}',
		      srSVD_hits = '{$srSVD_hits}',	     	      
		      wahUSG_time = '{$wahUSG_time}',
		      wahUSG_kills = '{$wahUSG_kills}',
		      wahUSG_shots = '{$wahUSG_shots}',
		      wahUSG_headshots = '{$wahUSG_headshots}',
		      wahUSG_hits = '{$wahUSG_hits}',		      
		      wahUGL_time = '{$wahUGL_time}',
		      wahUGL_kills = '{$wahUGL_kills}',
		      wahUGL_shots = '{$wahUGL_shots}',
		      wahUGL_headshots = '{$wahUGL_headshots}',
		      wahUGL_hits = '{$wahUGL_hits}',	     
		      wasK_time = '{$wasK_time}',
		      wasK_kills = '{$wasK_kills}',
		      wasK_shots = '{$wasK_shots}',
		      wasK_headshots = '{$wasK_headshots}',
		      wasK_hits = '{$wasK_hits}',		      		      
		      wLAAFIM_time = '{$wLAAFIM_time}',
		      wLAAFIM_kills = '{$wLAAFIM_kills}',
		      wLAAFIM_shots = '{$wLAAFIM_shots}',
		      wLAAFIM_headshots = '{$wLAAFIM_headshots}',
		      wLAAFIM_hits = '{$wLAAFIM_hits}',		      	      
		      wLAAIGL_time = '{$wLAAIGL_time}',
		      wLAAIGL_kills = '{$wLAAIGL_kills}',
		      wLAAIGL_shots = '{$wLAAIGL_shots}',
		      wLAAIGL_headshots = '{$wLAAIGL_headshots}',
		      wLAAIGL_hits = '{$wLAAIGL_hits}',		            
		      wLATJAV_time = '{$wLATJAV_time}',
		      wLATJAV_kills = '{$wLATJAV_kills}',
		      wLATJAV_shots = '{$wLATJAV_shots}',
		      wLATJAV_headshots = '{$wLATJAV_headshots}',
		      wLATJAV_hits = '{$wLATJAV_hits}',		            
		      wLATRPG_time = '{$wLATRPG_time}',
		      wLATRPG_kills = '{$wLATRPG_kills}',
		      wLATRPG_shots = '{$wLATRPG_shots}',
		      wLATRPG_headshots = '{$wLATRPG_headshots}',
		      wLATRPG_hits = '{$wLATRPG_hits}',		            
		      wLATSMAW_time = '{$wLATSMAW_time}',
		      wLATSMAW_kills = '{$wLATSMAW_kills}',
		      wLATSMAW_shots = '{$wLATSMAW_shots}',
		      wLATSMAW_headshots = '{$wLATSMAW_headshots}',
		      wLATSMAW_hits = '{$wLATSMAW_hits}',	      
		      arFAMAS_time = '{$arFAMAS_time}',
		      arFAMAS_kills = '{$arFAMAS_kills}',
		      arFAMAS_shots = '{$arFAMAS_shots}',
		      arFAMAS_headshots = '{$arFAMAS_headshots}',
		      arFAMAS_hits = '{$arFAMAS_hits}',		      
		      arL85A2_time = '{$arL85A2_time}',
		      arL85A2_kills = '{$arL85A2_kills}',
		      arL85A2_shots = '{$arL85A2_shots}',
		      arL85A2_headshots = '{$arL85A2_headshots}',
		      arL85A2_hits = '{$arL85A2_hits}',		      
		      caHK53_time = '{$caHK53_time}',
		      caHK53_kills = '{$caHK53_kills}',
		      caHK53_shots = '{$caHK53_shots}',
		      caHK53_headshots = '{$caHK53_headshots}',
		      caHK53_hits = '{$caHK53_hits}',		      
		      caQBZ95B_time = '{$caQBZ95B_time}',
		      caQBZ95B_kills = '{$caQBZ95B_kills}',
		      caQBZ95B_shots = '{$caQBZ95B_shots}',
		      caQBZ95B_headshots = '{$caQBZ95B_headshots}',
		      caQBZ95B_hits = '{$caQBZ95B_hits}',		      
		      mgQBB95_time = '{$mgQBB95_time}',
		      mgQBB95_kills = '{$mgQBB95_kills}',
		      mgQBB95_shots = '{$mgQBB95_shots}',
		      mgQBB95_headshots = '{$mgQBB95_headshots}',
		      mgQBB95_hits = '{$mgQBB95_hits}',		      
		      mgMG36_time = '{$mgMG36_time}',
		      mgMG36_kills = '{$mgMG36_kills}',
		      mgMG36_shots = '{$mgMG36_shots}',
		      mgMG36_headshots = '{$mgMG36_headshots}',
		      mgMG36_hits = '{$mgMG36_hits}',		      
		      srQBU88_time = '{$srQBU88_time}',
		      srQBU88_kills = '{$srQBU88_kills}',
		      srQBU88_shots = '{$srQBU88_shots}',
		      srQBU88_headshots = '{$srQBU88_headshots}',
		      srQBU88_hits = '{$srQBU88_hits}',		      
		      srL96_time = '{$srL96_time}',
		      srL96_kills = '{$srL96_kills}',
		      srL96_shots = '{$srL96_shots}',
		      srL96_headshots = '{$srL96_headshots}',
		      srL96_hits = '{$srL96_hits}',		      
		      smPP19_time = '{$smPP19_time}',
		      smPP19_kills = '{$smPP19_kills}',
		      smPP19_shots = '{$smPP19_shots}',
		      smPP19_headshots = '{$smPP19_headshots}',
		      smPP19_hits = '{$smPP19_hits}',		      
		      sgJackH_time = '{$sgJackH_time}',
		      sgJackH_kills = '{$sgJackH_kills}',
		      sgJackH_shots = '{$sgJackH_shots}',
		      sgJackH_headshots = '{$sgJackH_headshots}',
		      sgJackH_hits = '{$sgJackH_hits}',		      
		      arAUG_time = '{$arAUG_time}',
		      arAUG_kills = '{$arAUG_kills}',
		      arAUG_shots = '{$arAUG_shots}',
		      arAUG_headshots = '{$arAUG_headshots}',
		      arAUG_hits = '{$arAUG_hits}', 	      
		      arSCARL_time = '{$arSCARL_time}',
		      arSCARL_kills = '{$arSCARL_kills}',
		      arSCARL_shots = '{$arSCARL_shots}',
		      arSCARL_headshots = '{$arSCARL_headshots}',
		      arSCARL_hits = '{$arSCARL_hits}', 	      
		      mgL86A1_time = '{$mgL86A1_time}',
		      mgL86A1_kills = '{$mgL86A1_kills}',
		      mgL86A1_shots = '{$mgL86A1_shots}',
		      mgL86A1_headshots = '{$mgL86A1_headshots}',
		      mgL86A1_hits = '{$mgL86A1_hits}', 		      
		      mgLSAT_time = '{$mgLSAT_time}',
		      mgLSAT_kills = '{$mgLSAT_kills}',
		      mgLSAT_shots = '{$mgLSAT_shots}',
		      mgLSAT_headshots = '{$mgLSAT_headshots}',
		      mgLSAT_hits = '{$mgLSAT_hits}', 		      
		      caACR_time = '{$caACR_time}',
		      caACR_kills = '{$caACR_kills}',
		      caACR_shots = '{$caACR_shots}',
		      caACR_headshots = '{$caACR_headshots}',
		      caACR_hits = '{$caACR_hits}', 		      
		      caMTAR21_time = '{$caMTAR21_time}',
		      caMTAR21_kills = '{$caMTAR21_kills}',
		      caMTAR21_shots = '{$caMTAR21_shots}',
		      caMTAR21_headshots = '{$caMTAR21_headshots}',
		      caMTAR21_hits = '{$caMTAR21_hits}', 		      
		      srHK417_time = '{$srHK417_time}',
		      srHK417_kills = '{$srHK417_kills}',
		      srHK417_shots = '{$srHK417_shots}',
		      srHK417_headshots = '{$srHK417_headshots}',
		      srHK417_hits = '{$srHK417_hits}', 		      
		      srJNG90_time = '{$srJNG90_time}',
		      srJNG90_kills = '{$srJNG90_kills}',
		      srJNG90_shots = '{$srJNG90_shots}',
		      srJNG90_headshots = '{$srJNG90_headshots}',
		      srJNG90_hits = '{$srJNG90_hits}', 		      
		      sgSPAS12_time = '{$sgSPAS12_time}',
		      sgSPAS12_kills = '{$sgSPAS12_kills}',
		      sgSPAS12_shots = '{$sgSPAS12_shots}',
		      sgSPAS12_headshots = '{$sgSPAS12_headshots}',
		      sgSPAS12_hits = '{$sgSPAS12_hits}', 		      
		      smM5K_time = '{$smM5K_time}',
		      smM5K_kills = '{$smM5K_kills}',
		      smM5K_shots = '{$smM5K_shots}',
		      smM5K_headshots = '{$smM5K_headshots}',
		      smM5K_hits = '{$smM5K_hits}'   	      		      	      
		    WHERE 
					stats_pid = '{$pid}'";
	mysql_query($sSql) OR die(mysql_error());
					
					
					
	$sSql ="	UPDATE 
					".DBPrefix."stars 
				SET 		      
		      arAEK_date = '{$arAEK_date}',		     		      
		      arAK74_date = '{$arAK74_date}',	      		      
	        arAN94_date = '{$arAN94_date}',	      		    
		      arF2_date = '{$arF2_date}',		        		      
		      arG3_date = '{$arG3_date}',		      	     
		      arKH_date = '{$arKH_date}',		      		      
		      arM16_date = '{$arM16_date}',		      		      
		      arM416_date = '{$arM416_date}',	      		      
		      caA91_date = '{$caA91_date}',		      		      
		      caAKS_date = '{$caAKS_date}',		      	      
		      caG36_date = '{$caG36_date}',	      		     
		      caM4_date = '{$caM4_date}',		      	      
		      caSCAR_date = '{$caSCAR_date}',		      		     
		      caSG553_date = '{$caSG553_date}',		      		     
		      mgM240_date = '{$mgM240_date}',		      		     
		      mgM249_date = '{$mgM249_date}',		      		      
		      mgM27_date = '{$mgM27_date}',	      		      
		      mgM60_date = '{$mgM60_date}',	      	     
		      mgPech_date = '{$mgPech_date}',		      		     
		      mgRPK_date = '{$mgRPK_date}',		      	      
		      mgT88_date = '{$mgT88_date}',		            
		      pG17S_date = '{$pG17S_date}',	      	     
		      pG17_date = '{$pG17_date}',	      		     
		      pg18S_date = '{$pg18S_date}',	      	     
		      pg18_date = '{$pg18_date}',	      		      
		      pM1911L_date = '{$pM1911L_date}',    		     
		      pM1911_date = '{$pM1911_date}',	      	      
		      pM1911S_date = '{$pM1911S_date}',	      	      
		      pM1911T_date = '{$pM1911T_date}',		      		      
		      pM412_date = '{$pM412_date}',		      		     
		      pM9F_date = '{$pM9F_date}',		      		     
		      pM9S_date = '{$pM9S_date}',	      	      
		      pM9_date = '{$pM9_date}',		      		      
		      pM93R_date = '{$pM93R_date}',		      		      
		      pMP443L_date = '{$pMP443L_date}',		      		      
		      pMP443S_date = '{$pMP443S_date}',		      		      
		      pMP443_date = '{$pMP443_date}',	      		      
		      pTaurS_date = '{$pTaurS_date}',	      		     
		      pTaur_date = '{$pTaur_date}',	      		      
		      sg870_date = '{$sg870_date}',	      		     
		      sgDAO_date = '{$sgDAO_date}',	      	      
		      sgM1014_date = '{$sgM1014_date}',		      		      
		      sgSaiga_date = '{$sgSaiga_date}',		       	      
		      sgUSAS_date = '{$sgUSAS_date}',		      	      
		      smMP7_date = '{$smMP7_date}',		      		      
		      smP90_date = '{$smP90_date}',		      		      
		      smPDR_date = '{$smPDR_date}',	      		     
		      smPP2000_date = '{$smPP2000_date}',		      		      
		      smUMP_date = '{$smUMP_date}',		      		     
		      smVAL_date = '{$smVAL_date}',	      		      
		      srM39_date = '{$srM39_date}',		      		     
		      srM40_date = '{$srM40_date}',	      	      
		      srM98_date = '{$srM98_date}',	      
		      srMK11_date = '{$srMK11_date}',	      		      
		      srSKS_date = '{$srSKS_date}',		      		      
		      srSV98_date = '{$srSV98_date}',	      		      
		      srSVD_date = '{$srSVD_date}',	      	      
		      srSVD_date = '{$srSVD_date}',		      		     
		      wahUSG_date = '{$wahUSG_date}',			      
		      wahUGL_date = '{$wahUGL_date}',		      
		      wasK_date = '{$wasK_date}',		      		      
		      wLAAFIM_date = '{$wLAAFIM_date}',		      		     
		      wLAAIGL_date = '{$wLAAIGL_date}',		      		      
		      wLATJAV_date = '{$wLATJAV_date}',		      		     
		      wLATRPG_date = '{$wLATRPG_date}',	      		     
		      wLATSMAW_date = '{$wLATSMAW_date}',		      
		      arAEK_count = '{$arAEK_count}',		     		      
		      arAK74_count = '{$arAK74_count}',	      		      
	        arAN94_count = '{$arAN94_count}',	      		    
		      arF2_count = '{$arF2_count}',		        		      
		      arG3_count = '{$arG3_count}',		      	     
		      arKH_count = '{$arKH_count}',		      		      
		      arM16_count = '{$arM16_count}',		      		      
		      arM416_count = '{$arM416_count}',	      		      
		      caA91_count = '{$caA91_count}',		      		      
		      caAKS_count = '{$caAKS_count}',		      	      
		      caG36_count = '{$caG36_count}',	      		     
		      caM4_count = '{$caM4_count}',		      	      
		      caSCAR_count = '{$caSCAR_count}',		      		     
		      caSG553_count = '{$caSG553_count}',		      		     
		      mgM240_count = '{$mgM240_count}',		      		     
		      mgM249_count = '{$mgM249_count}',		      		      
		      mgM27_count = '{$mgM27_count}',	      		      
		      mgM60_count = '{$mgM60_count}',	      	     
		      mgPech_count = '{$mgPech_count}',		      		     
		      mgRPK_count = '{$mgRPK_count}',		      	      
		      mgT88_count = '{$mgT88_count}',		            
		      pG17S_count = '{$pG17S_count}',	      	     
		      pG17_count = '{$pG17_count}',	      		     
		      pg18S_count = '{$pg18S_count}',	      	     
		      pg18_count = '{$pg18_count}',	      		      
		      pM1911L_count = '{$pM1911L_count}',    		     
		      pM1911_count = '{$pM1911_count}',	      	      
		      pM1911S_count = '{$pM1911S_count}',	      	      
		      pM1911T_count = '{$pM1911T_count}',		      		      
		      pM412_count = '{$pM412_count}',		      		     
		      pM9F_count = '{$pM9F_count}',		      		     
		      pM9S_count = '{$pM9S_count}',	      	      
		      pM9_count = '{$pM9_count}',		      		      
		      pM93R_count = '{$pM93R_count}',		      		      
		      pMP443L_count = '{$pMP443L_count}',		      		      
		      pMP443S_count = '{$pMP443S_count}',		      		      
		      pMP443_count = '{$pMP443_count}',	      		      
		      pTaurS_count = '{$pTaurS_count}',	      		     
		      pTaur_count = '{$pTaur_count}',	      		      
		      sg870_count = '{$sg870_count}',	      		     
		      sgDAO_count = '{$sgDAO_count}',	      	      
		      sgM1014_count = '{$sgM1014_count}',		      		      
		      sgSaiga_count = '{$sgSaiga_count}',		       	      
		      sgUSAS_count = '{$sgUSAS_count}',		      	      
		      smMP7_count = '{$smMP7_count}',		      		      
		      smP90_count = '{$smP90_count}',		      		      
		      smPDR_count = '{$smPDR_count}',	      		     
		      smPP2000_count = '{$smPP2000_count}',		      		      
		      smUMP_count = '{$smUMP_count}',		      		     
		      smVAL_count = '{$smVAL_count}',	      		      
		      srM39_count = '{$srM39_count}',		      		     
		      srM40_count = '{$srM40_count}',	      	      
		      srM98_count = '{$srM98_count}',	      
		      srMK11_count = '{$srMK11_count}',	      		      
		      srSKS_count = '{$srSKS_count}',		      		      
		      srSV98_count = '{$srSV98_count}',	      		      
		      srSVD_count = '{$srSVD_count}',	      	      
		      srSVD_count = '{$srSVD_count}',		      		     
		      wahUSG_count = '{$wahUSG_count}',			      
		      wahUGL_count = '{$wahUGL_count}',		      
		      wasK_count = '{$wasK_count}',		      		      
		      wLAAFIM_count = '{$wLAAFIM_count}',		      		     
		      wLAAIGL_count = '{$wLAAIGL_count}',		      		      
		      wLATJAV_count = '{$wLATJAV_count}',		      		     
		      wLATRPG_count = '{$wLATRPG_count}',	      		     
		      wLATSMAW_count = '{$wLATSMAW_count}',	 		      		      
		      arAEK_curr = '{$arAEK_curr}',		     		      
		      arAK74_curr = '{$arAK74_curr}',	      		      
	        arAN94_curr = '{$arAN94_curr}',	      		    
		      arF2_curr = '{$arF2_curr}',		        		      
		      arG3_curr = '{$arG3_curr}',		      	     
		      arKH_curr = '{$arKH_curr}',		      		      
		      arM16_curr = '{$arM16_curr}',		      		      
		      arM416_curr = '{$arM416_curr}',	      		      
		      caA91_curr = '{$caA91_curr}',		      		      
		      caAKS_curr = '{$caAKS_curr}',		      	      
		      caG36_curr = '{$caG36_curr}',	      		     
		      caM4_curr = '{$caM4_curr}',		      	      
		      caSCAR_curr = '{$caSCAR_curr}',		      		     
		      caSG553_curr = '{$caSG553_curr}',		      		     
		      mgM240_curr = '{$mgM240_curr}',		      		     
		      mgM249_curr = '{$mgM249_curr}',		      		      
		      mgM27_curr = '{$mgM27_curr}',	      		      
		      mgM60_curr = '{$mgM60_curr}',	      	     
		      mgPech_curr = '{$mgPech_curr}',		      		     
		      mgRPK_curr = '{$mgRPK_curr}',		      	      
		      mgT88_curr = '{$mgT88_curr}',		            
		      pG17S_curr = '{$pG17S_curr}',	      	     
		      pG17_curr = '{$pG17_curr}',	      		     
		      pg18S_curr = '{$pg18S_curr}',	      	     
		      pg18_curr = '{$pg18_curr}',	      		      
		      pM1911L_curr = '{$pM1911L_curr}',    		     
		      pM1911_curr = '{$pM1911_curr}',	      	      
		      pM1911S_curr = '{$pM1911S_curr}',	      	      
		      pM1911T_curr = '{$pM1911T_curr}',		      		      
		      pM412_curr = '{$pM412_curr}',		      		     
		      pM9F_curr = '{$pM9F_curr}',		      		     
		      pM9S_curr = '{$pM9S_curr}',	      	      
		      pM9_curr = '{$pM9_curr}',		      		      
		      pM93R_curr = '{$pM93R_curr}',		      		      
		      pMP443L_curr = '{$pMP443L_curr}',		      		      
		      pMP443S_curr = '{$pMP443S_curr}',		      		      
		      pMP443_curr = '{$pMP443_curr}',	      		      
		      pTaurS_curr = '{$pTaurS_curr}',	      		     
		      pTaur_curr = '{$pTaur_curr}',	      		      
		      sg870_curr = '{$sg870_curr}',	      		     
		      sgDAO_curr = '{$sgDAO_curr}',	      	      
		      sgM1014_curr = '{$sgM1014_curr}',		      		      
		      sgSaiga_curr = '{$sgSaiga_curr}',		       	      
		      sgUSAS_curr = '{$sgUSAS_curr}',		      	      
		      smMP7_curr = '{$smMP7_curr}',		      		      
		      smP90_curr = '{$smP90_curr}',		      		      
		      smPDR_curr = '{$smPDR_curr}',	      		     
		      smPP2000_curr = '{$smPP2000_curr}',		      		      
		      smUMP_curr = '{$smUMP_curr}',		      		     
		      smVAL_curr = '{$smVAL_curr}',	      		      
		      srM39_curr = '{$srM39_curr}',		      		     
		      srM40_curr = '{$srM40_curr}',	      	      
		      srM98_curr = '{$srM98_curr}',	      
		      srMK11_curr = '{$srMK11_curr}',	      		      
		      srSKS_curr = '{$srSKS_curr}',		      		      
		      srSV98_curr = '{$srSV98_curr}',	      		      
		      srSVD_curr = '{$srSVD_curr}',	      	      
		      srSVD_curr = '{$srSVD_curr}',		      		     
		      wahUSG_curr = '{$wahUSG_curr}',			      
		      wahUGL_curr = '{$wahUGL_curr}',		      
		      wasK_curr = '{$wasK_curr}',		      		      
		      wLAAFIM_curr = '{$wLAAFIM_curr}',		      		     
		      wLAAIGL_curr = '{$wLAAIGL_curr}',		      		      
		      wLATJAV_curr = '{$wLATJAV_curr}',		      		     
		      wLATRPG_curr = '{$wLATRPG_curr}',	      		     
		      wLATSMAW_curr = '{$wLATSMAW_curr}',	 	      
		      arAEK_needed = '{$arAEK_needed}',		     		      
		      arAK74_needed = '{$arAK74_needed}',	      		      
	        arAN94_needed = '{$arAN94_needed}',	      		    
		      arF2_needed = '{$arF2_needed}',		        		      
		      arG3_needed = '{$arG3_needed}',		      	     
		      arKH_needed = '{$arKH_needed}',		      		      
		      arM16_needed = '{$arM16_needed}',		      		      
		      arM416_needed = '{$arM416_needed}',	      		      
		      caA91_needed = '{$caA91_needed}',		      		      
		      caAKS_needed = '{$caAKS_needed}',		      	      
		      caG36_needed = '{$caG36_needed}',	      		     
		      caM4_needed = '{$caM4_needed}',		      	      
		      caSCAR_needed = '{$caSCAR_needed}',		      		     
		      caSG553_needed = '{$caSG553_needed}',		      		     
		      mgM240_needed = '{$mgM240_needed}',		      		     
		      mgM249_needed = '{$mgM249_needed}',		      		      
		      mgM27_needed = '{$mgM27_needed}',	      		      
		      mgM60_needed = '{$mgM60_needed}',	      	     
		      mgPech_needed = '{$mgPech_needed}',		      		     
		      mgRPK_needed = '{$mgRPK_needed}',		      	      
		      mgT88_needed = '{$mgT88_needed}',		            
		      pG17S_needed = '{$pG17S_needed}',	      	     
		      pG17_needed = '{$pG17_needed}',	      		     
		      pg18S_needed = '{$pg18S_needed}',	      	     
		      pg18_needed = '{$pg18_needed}',	      		      
		      pM1911L_needed = '{$pM1911L_needed}',    		     
		      pM1911_needed = '{$pM1911_needed}',	      	      
		      pM1911S_needed = '{$pM1911S_needed}',	      	      
		      pM1911T_needed = '{$pM1911T_needed}',		      		      
		      pM412_needed = '{$pM412_needed}',		      		     
		      pM9F_needed = '{$pM9F_needed}',		      		     
		      pM9S_needed = '{$pM9S_needed}',	      	      
		      pM9_needed = '{$pM9_needed}',		      		      
		      pM93R_needed = '{$pM93R_needed}',		      		      
		      pMP443L_needed = '{$pMP443L_needed}',		      		      
		      pMP443S_needed = '{$pMP443S_needed}',		      		      
		      pMP443_needed = '{$pMP443_needed}',	      		      
		      pTaurS_needed = '{$pTaurS_needed}',	      		     
		      pTaur_needed = '{$pTaur_needed}',	      		      
		      sg870_needed = '{$sg870_needed}',	      		     
		      sgDAO_needed = '{$sgDAO_needed}',	      	      
		      sgM1014_needed = '{$sgM1014_needed}',		      		      
		      sgSaiga_needed = '{$sgSaiga_needed}',		       	      
		      sgUSAS_needed = '{$sgUSAS_needed}',		      	      
		      smMP7_needed = '{$smMP7_needed}',		      		      
		      smP90_needed = '{$smP90_needed}',		      		      
		      smPDR_needed = '{$smPDR_needed}',	      		     
		      smPP2000_needed = '{$smPP2000_needed}',		      		      
		      smUMP_needed = '{$smUMP_needed}',		      		     
		      smVAL_needed = '{$smVAL_needed}',	      		      
		      srM39_needed = '{$srM39_needed}',		      		     
		      srM40_needed = '{$srM40_needed}',	      	      
		      srM98_needed = '{$srM98_needed}',	      
		      srMK11_needed = '{$srMK11_needed}',	      		      
		      srSKS_needed = '{$srSKS_needed}',		      		      
		      srSV98_needed = '{$srSV98_needed}',	      		      
		      srSVD_needed = '{$srSVD_needed}',	      	      
		      srSVD_needed = '{$srSVD_needed}',		      		     
		      wahUSG_needed = '{$wahUSG_needed}',			      
		      wahUGL_needed = '{$wahUGL_needed}',		      
		      wasK_needed = '{$wasK_needed}',		      		      
		      wLAAFIM_needed = '{$wLAAFIM_needed}',		      		     
		      wLAAIGL_needed = '{$wLAAIGL_needed}',		      		      
		      wLATJAV_needed = '{$wLATJAV_needed}',		      		     
		      wLATRPG_needed = '{$wLATRPG_needed}',	      		     
		      wLATSMAW_needed = '{$wLATSMAW_needed}',		      
		      arFAMAS_curr = '{$arFAMAS_curr}',
		      arL85A2_curr = '{$arL85A2_curr}',
		      caHK53_curr = '{$caHK53_curr}',
		      caQBZ95B_curr = '{$caQBZ95B_curr}',
		      mgQBB95_curr = '{$mgQBB95_curr}',
		      mgMG36_curr = '{$mgMG36_curr}',
		      srQBU88_curr = '{$srQBU88_curr}',
		      srL96_curr = '{$srL96_curr}',
		      smPP19_curr = '{$smPP19_curr}',
		      sgJackH_curr = '{$sgJackH_curr}',		      
		      arFAMAS_needed = '{$arFAMAS_needed}',
		      arL85A2_needed = '{$arL85A2_needed}',
		      caHK53_needed = '{$caHK53_needed}',
		      caQBZ95B_needed = '{$caQBZ95B_needed}',
		      mgQBB95_needed = '{$mgQBB95_needed}',
		      mgMG36_needed = '{$mgMG36_needed}',
		      srQBU88_needed = '{$srQBU88_needed}',
		      srL96_needed = '{$srL96_needed}',
		      smPP19_needed = '{$smPP19_needed}',
		      sgJackH_needed = '{$sgJackH_needed}',			      
		      arFAMAS_date = '{$arFAMAS_date}',
		      arL85A2_date = '{$arL85A2_date}',
		      caHK53_date = '{$caHK53_date}',
		      caQBZ95B_date = '{$caQBZ95B_date}',
		      mgQBB95_date = '{$mgQBB95_date}',
		      mgMG36_date = '{$mgMG36_date}',
		      srQBU88_date = '{$srQBU88_date}',
		      srL96_date = '{$srL96_date}',
		      smPP19_date = '{$smPP19_date}',
		      sgJackH_date = '{$sgJackH_date}',			      
		      arFAMAS_count = '{$arFAMAS_count}',
		      arL85A2_count = '{$arL85A2_count}',
		      caHK53_count = '{$caHK53_count}',
		      caQBZ95B_count = '{$caQBZ95B_count}',
		      mgQBB95_count = '{$mgQBB95_count}',
		      mgMG36_count = '{$mgMG36_count}',
		      srQBU88_count = '{$srQBU88_count}',
		      srL96_count = '{$srL96_count}',
		      smPP19_count = '{$smPP19_count}',
		      sgJackH_count = '{$sgJackH_count}',		      
		      arAUG_count = '{$arAUG_count}',
		      arAUG_date = '{$arAUG_date}',
		      arAUG_curr = '{$arAUG_curr}',
		      arAUG_needed = '{$arAUG_needed}',			      
		      arSCARL_count = '{$arSCARL_count}',
		      arSCARL_date = '{$arSCARL_date}',
		      arSCARL_curr = '{$arSCARL_curr}',
		      arSCARL_needed = '{$arSCARL_needed}',			      
		      mgL86A1_count = '{$mgL86A1_count}',
		      mgL86A1_date = '{$mgL86A1_date}',
		      mgL86A1_curr = '{$mgL86A1_curr}',
		      mgL86A1_needed = '{$mgL86A1_needed}',			      
		      mgLSAT_count = '{$mgLSAT_count}',
		      mgLSAT_date = '{$mgLSAT_date}',
		      mgLSAT_curr = '{$mgLSAT_curr}',
		      mgLSAT_needed = '{$mgLSAT_needed}',		      
		      caACR_count = '{$caACR_count}',
		      caACR_date = '{$caACR_date}',
		      caACR_curr = '{$caACR_curr}',
		      caACR_needed = '{$caACR_needed}',			      
		      caMTAR21_count = '{$caMTAR21_count}',
		      caMTAR21_date = '{$caMTAR21_date}',
		      caMTAR21_curr = '{$caMTAR21_curr}',
		      caMTAR21_needed = '{$caMTAR21_needed}',			      
		      srHK417_count = '{$srHK417_count}',
		      srHK417_date = '{$srHK417_date}',
		      srHK417_curr = '{$srHK417_curr}',
		      srHK417_needed = '{$srHK417_needed}',			      
		      srJNG90_count = '{$srJNG90_count}',
		      srJNG90_date = '{$srJNG90_date}',
		      srJNG90_curr = '{$srJNG90_curr}',
		      srJNG90_needed = '{$srJNG90_needed}',			      
		      sgSPAS12_count = '{$sgSPAS12_count}',
		      sgSPAS12_date = '{$sgSPAS12_date}',
		      sgSPAS12_curr = '{$sgSPAS12_curr}',
		      sgSPAS12_needed = '{$sgSPAS12_needed}',			      
		      smM5K_count = '{$smM5K_count}',
		      smM5K_date = '{$smM5K_date}',
		      smM5K_curr = '{$smM5K_curr}',
		      smM5K_needed = '{$smM5K_needed}'      	     	      		      	      
		    WHERE 
					stats_pid = '{$pid}'";
	mysql_query($sSql) OR die(mysql_error());
	
	
		
		
		$sSql ="	UPDATE 
					".DBPrefix."vehicles
				SET 
				aa9k22_time = '{$aa9k22_time}',
				aa9k22_kills = '{$aa9k22_kills}',			
				aaLAV_time = '{$aaLAV_time}',
				aaLAV_kills = '{$aaLAV_kills}',	
				ahAH1Z_time = '{$ahAH1Z_time}',
				ahAH1Z_kills = '{$ahAH1Z_kills}',			
				ahMi28_time = '{$ahMi28_time}',
				ahMi28_kills = '{$ahMi28_kills}',				
				atTOW_time = '{$atTOW_time}',
				atTOW_kills = '{$atTOW_kills}',				
				ifvBMP_time = '{$ifvBMP_time}',
				ifvBMP_kills = '{$ifvBMP_kills}',				
				ifvLAV_time = '{$ifvLAV_time}',
				ifvLAV_kills = '{$ifvLAV_kills}',				
				jaA10_time = '{$jaA10_time}',
				jaA10_kills = '{$jaA10_kills}',				
				jaSU25_time = '{$jaSU25_time}',
				jaSU25_kills = '{$jaSU25_kills}',				
				jfF18_time = '{$jfF18_time}',
				jfF18_kills = '{$jfF18_kills}',			
				jfSu35_time = '{$jfSu35_time}',
				jfSu35_kills = '{$jfSu35_kills}',			
				mbtM1A_time = '{$mbtM1A_time}',
				mbtM1A_kills = '{$mbtM1A_kills}',				
				mbtT90_time = '{$mbtT90_time}',
				mbtT90_kills = '{$mbtT90_kills}',				
				saaCRAM_time = '{$saaCRAM_time}',
				saaCRAM_kills = '{$saaCRAM_kills}',				
				saaPant_time = '{$saaPant_time}',
				saaPant_kills = '{$saaPant_kills}',				
				shAH6_time = '{$shAH6_time}',
				shAH6_kills = '{$shAH6_kills}',				
				shz11_time = '{$shz11_time}',
				shz11_kills = '{$shz11_kills}',				
				sKorn_time = '{$sKorn_time}',
				sKorn_kills = '{$sKorn_kills}',				
				trAAV_time = '{$trAAV_time}',
				trAAV_kills = '{$trAAV_kills}',		
				trHum_time = '{$trHum_time}',
				trHum_kills = '{$trHum_kills}',
				trITV_time = '{$trITV_time}',
				trITV_kills = '{$trITV_kills}',
				trKA60_time = '{$trKA60_time}',
				trKA60_kills = '{$trKA60_kills}',
				trRIB_time = '{$trRIB_time}',
				trRIB_kills = '{$trRIB_kills}',
				trUH1_time = '{$trUH1_time}',
				trUH1_kills = '{$trUH1_kills}',
				trVDV_time = '{$trVDV_time}',
				trVDV_kills = '{$trVDV_kills}',
				trVod_time = '{$trVod_time}',
				trVod_kills = '{$trVod_kills}',
				trSkid_time = '{$trSkid_time}',
				trSkid_kills = '{$trSkid_kills}',
				trDpv_time = '{$trDpv_time}',
				trDpv_kills = '{$trDpv_kills}',
				ifvBTR90_time = '{$ifvBTR90_time}',
				ifvBTR90_kills = '{$ifvBTR90_kills}',
				jfx1F35JSF_time = '{$jfx1F35JSF_time}',
				jfx1F35JSF_kills = '{$jfx1F35JSF_kills}',				
				aa9k22_destroys = '{$aa9k22_destroys}',							
				aaLAV_destroys = '{$aaLAV_destroys}',			
				ahAH1Z_destroys = '{$ahAH1Z_destroys}',						
				ahMi28_destroys = '{$ahMi28_destroys}',								
				atTOW_destroys = '{$atTOW_destroys}',						
				ifvBMP_destroys = '{$ifvBMP_destroys}',								
				ifvLAV_destroys = '{$ifvLAV_destroys}',								
				jaA10_destroys = '{$jaA10_destroys}',								
				jaSU25_destroys = '{$jaSU25_destroys}',								
				jfF18_destroys = '{$jfF18_destroys}',							
				jfSu35_destroys = '{$jfSu35_destroys}',							
				mbtM1A_destroys = '{$mbtM1A_destroys}',								
				mbtT90_destroys = '{$mbtT90_destroys}',								
				saaCRAM_destroys = '{$saaCRAM_destroys}',								
			  saaPant_destroys = '{$saaPant_destroys}',								
				shAH6_destroys = '{$shAH6_destroys}',								
				shz11_destroys = '{$shz11_destroys}',							
				sKorn_destroys = '{$sKorn_destroys}',								
				trAAV_destroys = '{$trAAV_destroys}',						
				trHum_destroys = '{$trHum_destroys}',				
				trITV_destroys = '{$trITV_destroys}',			
				trKA60_destroys = '{$trKA60_destroys}',				
				trRIB_destroys = '{$trRIB_destroys}',				
				trUH1_destroys = '{$trUH1_destroys}',				
				trVDV_destroys = '{$trVDV_destroys}',				
				trVod_destroys = '{$trVod_destroys}',				
				trSkid_destroys = '{$trSkid_destroys}',				
				trDpv_destroys = '{$trDpv_destroys}',				
				ifvBTR90_destroys = '{$ifvBTR90_destroys}',				
				jfx1F35JSF_destroys = '{$jfx1F35JSF_destroys}'				
		  WHERE 
					stats_pid = '{$pid}'";
	mysql_query($sSql) OR die(mysql_error());
		
		
			$sSql ="	UPDATE 
					".DBPrefix."team 
				SET 
				time_us = '{$time_us}',
				assault_us = '{$assault_us}',
				support_us = '{$support_us}',
				recon_us = '{$recon_us}',
				engineer_us = '{$engineer_us}',
				time_ru = '{$time_ru}',
				assault_ru = '{$assault_ru}',
				support_ru = '{$support_ru}',
				recon_ru = '{$recon_ru}',
				engineer_ru = '{$engineer_ru}'
		  WHERE 
					stats_pid = '{$pid}'";
	mysql_query($sSql) OR die(mysql_error());
		
		
		$sSql ="	UPDATE 
					".DBPrefix."coop 
				SET 
				coop_kills = '{$kills_coop}',
				coop_headshots = '{$headshots_coop}',
				coop_mdrevives = '{$mdrevives_coop}',
				coop_killassists = '{$killassists_coop}',
				coop_vehicledestroyed = '{$vehicledestroyed_coop}',
				coop_avengerkills = '{$avengerkills_coop}',
				coop_saviorkills = '{$saviorkills_coop}',
				coop_score = '{$score_coop}',
				coop_indscore = '{$indscore_coop}',
				level1_easy_score = '{$level1_easy_score}',
				level1_medium_score = '{$level1_medium_score}',
				level1_hard_score = '{$level1_hard_score}',
				level1_easy_count = '{$level1_easy_count}',
				level1_medium_count = '{$level1_medium_count}',
				level1_hard_count = '{$level1_hard_count}',
				level1_easy_date = '{$level1_easy_date}',
				level1_medium_date = '{$level1_medium_date}',
				level1_hard_date = '{$level1_hard_date}',
				level3_easy_score = '{$level3_easy_score}',
				level3_medium_score = '{$level3_medium_score}',
				level3_hard_score = '{$level3_hard_score}',
				level3_easy_count = '{$level3_easy_count}',
				level3_medium_count = '{$level3_medium_count}',
				level3_hard_count = '{$level3_hard_count}',
				level3_easy_date = '{$level3_easy_date}',
				level3_medium_date = '{$level3_medium_date}',
				level3_hard_date = '{$level3_hard_date}',			
	      level6_easy_score = '{$level6_easy_score}',
				level6_medium_score = '{$level6_medium_score}',
				level6_hard_score = '{$level6_hard_score}',
				level6_easy_count = '{$level6_easy_count}',
				level6_medium_count = '{$level6_medium_count}',
				level6_hard_count = '{$level6_hard_count}',
				level6_easy_date = '{$level6_easy_date}',
				level6_medium_date = '{$level6_medium_date}',
				level6_hard_date = '{$level6_hard_date}',	
				level7_easy_score = '{$level7_easy_score}',
				level7_medium_score = '{$level7_medium_score}',
				level7_hard_score = '{$level7_hard_score}',
				level7_easy_count = '{$level7_easy_count}',
				level7_medium_count = '{$level7_medium_count}',
				level7_hard_count = '{$level7_hard_count}',
				level7_easy_date = '{$level7_easy_date}',
				level7_medium_date = '{$level7_medium_date}',
				level7_hard_date = '{$level7_hard_date}',	
				level9_easy_score = '{$level9_easy_score}',
				level9_medium_score = '{$level9_medium_score}',
				level9_hard_score = '{$level9_hard_score}',
				level9_easy_count = '{$level9_easy_count}',
				level9_medium_count = '{$level9_medium_count}',
				level9_hard_count = '{$level9_hard_count}',
				level9_easy_date = '{$level9_easy_date}',
				level9_medium_date = '{$level9_medium_date}',
				level9_hard_date = '{$level9_hard_date}',
				level10_easy_score = '{$level10_easy_score}',
				level10_medium_score = '{$level10_medium_score}',
				level10_hard_score = '{$level10_hard_score}',
				level10_easy_count = '{$level10_easy_count}',
				level10_medium_count = '{$level10_medium_count}',
				level10_hard_count = '{$level10_hard_count}',
				level10_easy_date = '{$level10_easy_date}',
				level10_medium_date = '{$level10_medium_date}',
				level10_hard_date = '{$level10_hard_date}'	 
		 WHERE 
					stats_pid = '{$pid}'";
	mysql_query($sSql) OR die(mysql_error());
	
		
		
		
		$sSql ="	UPDATE 
					".DBPrefix."ribbons 
				SET 
					r1_count ='{$r1_count}',
					r1_date ='{$r1_date}',
					r2_count ='{$r2_count}',
					r2_date ='{$r2_date}',
					r3_count ='{$r3_count}',
					r3_date ='{$r3_date}',
					r4_count ='{$r4_count}',
					r4_date ='{$r4_date}',
					r5_count ='{$r5_count}',
					r5_date ='{$r5_date}',
					r6_count ='{$r6_count}',
					r6_date ='{$r6_date}',
					r7_count ='{$r7_count}',
					r7_date ='{$r7_date}',
					r8_count ='{$r8_count}',
					r8_date ='{$r8_date}',
					r9_count ='{$r9_count}',
					r9_date ='{$r9_date}',
					r10_count ='{$r10_count}',
					r10_date ='{$r10_date}',
					r11_count ='{$r11_count}',
					r11_date ='{$r11_date}',
					r12_count ='{$r12_count}',
					r12_date ='{$r12_date}',
					r13_count ='{$r13_count}',
					r13_date ='{$r13_date}',
					r14_count ='{$r14_count}',
					r14_date ='{$r14_date}',
					r15_count ='{$r15_count}',
					r15_date ='{$r15_date}',
					r16_count ='{$r16_count}',
					r16_date ='{$r16_date}',
					r17_count ='{$r17_count}',
					r17_date ='{$r17_date}',
					r18_count ='{$r18_count}',
					r18_date ='{$r18_date}',
					r19_count ='{$r19_count}',
					r19_date ='{$r19_date}',
					r20_count ='{$r20_count}',
					r20_date ='{$r20_date}',
					r21_count ='{$r21_count}',
					r21_date ='{$r21_date}',
					r22_count ='{$r22_count}',
					r22_date ='{$r22_date}',
					r23_count ='{$r23_count}',
					r23_date ='{$r23_date}',
					r24_count ='{$r24_count}',
					r24_date ='{$r24_date}',
					r25_count ='{$r25_count}',
					r25_date ='{$r25_date}',
					r26_count ='{$r26_count}',
					r26_date ='{$r26_date}',
					r27_count ='{$r27_count}',
					r27_date ='{$r27_date}',
					r28_count ='{$r28_count}',
					r28_date ='{$r28_date}',
					r29_count ='{$r29_count}',
					r29_date ='{$r29_date}',
					r30_count ='{$r30_count}',
					r30_date ='{$r30_date}',
					r31_count ='{$r31_count}',
					r31_date ='{$r31_date}',
					r32_count ='{$r32_count}',
					r32_date ='{$r32_date}',
					r33_count ='{$r33_count}',
					r33_date ='{$r33_date}',
					r34_count ='{$r34_count}',
					r34_date ='{$r34_date}',
					r35_count ='{$r35_count}',
					r35_date ='{$r35_date}',
					r36_count ='{$r36_count}',
					r36_date ='{$r36_date}',
					r37_count ='{$r37_count}',
					r37_date ='{$r37_date}',
					r38_count ='{$r38_count}',
					r38_date ='{$r38_date}',
					r39_count ='{$r39_count}',
					r39_date ='{$r39_date}',
					r40_count ='{$r40_count}',
					r40_date ='{$r40_date}',
					r41_count ='{$r41_count}',
					r41_date ='{$r41_date}',
					r42_count ='{$r42_count}',
					r42_date ='{$r42_date}',
					r43_count ='{$r43_count}',
					r43_date ='{$r43_date}',
					r44_count ='{$r44_count}',
					r44_date ='{$r44_date}',
					r45_count ='{$r45_count}',
					r45_date ='{$r45_date}'
        WHERE 
					stats_pid = '{$pid}'";
	mysql_query($sSql) OR die(mysql_error());
		
		
		
		$sSql ="	UPDATE 
					".DBPrefix."medals 
				SET 
					m1_count ='{$m1_count}',
					m1_date ='{$m1_date}',
					m1_curr ='{$m1_curr}',
					m1_needed ='{$m1_needed}',
					m2_count ='{$m2_count}',
					m2_date ='{$m2_date}',
					m2_curr ='{$m2_curr}',
					m2_needed ='{$m2_needed}',
					m3_count ='{$m3_count}',
					m3_date ='{$m3_date}',
					m3_curr ='{$m3_curr}',
					m3_needed ='{$m3_needed}',
					m4_count ='{$m4_count}',
					m4_date ='{$m4_date}',
					m4_curr ='{$m4_curr}',
					m4_needed ='{$m4_needed}',
					m5_count ='{$m5_count}',
					m5_date ='{$m5_date}',
					m5_curr ='{$m5_curr}',
					m5_needed ='{$m5_needed}',
					m6_count ='{$m6_count}',
					m6_date ='{$m6_date}',
					m6_curr ='{$m6_curr}',
					m6_needed ='{$m6_needed}',
					m7_count ='{$m7_count}',
					m7_date ='{$m7_date}',
					m7_curr ='{$m7_curr}',
					m7_needed ='{$m7_needed}',
					m8_count ='{$m8_count}',
					m8_date ='{$m8_date}',
					m8_curr ='{$m8_curr}',
					m8_needed ='{$m8_needed}',
					m9_count ='{$m9_count}',
					m9_date ='{$m9_date}',
					m9_curr ='{$m9_curr}',
					m9_needed ='{$m9_needed}',
					m10_count ='{$m10_count}',
					m10_date ='{$m10_date}',
					m10_curr ='{$m10_curr}',
					m10_needed ='{$m10_needed}',
					m11_count ='{$m11_count}',
					m11_date ='{$m11_date}',
					m11_curr ='{$m11_curr}',
					m11_needed ='{$m11_needed}',
					m12_count ='{$m12_count}',
					m12_date ='{$m12_date}',
					m12_curr ='{$m12_curr}',
					m12_needed ='{$m12_needed}',
					m13_count ='{$m13_count}',
					m13_date ='{$m13_date}',
					m13_curr ='{$m13_curr}',
					m13_needed ='{$m13_needed}',
					m14_count ='{$m14_count}',
					m14_date ='{$m14_date}',
					m14_curr ='{$m14_curr}',
					m14_needed ='{$m14_needed}',
					m15_count ='{$m15_count}',
					m15_date ='{$m15_date}',
					m15_curr ='{$m15_curr}',
					m15_needed ='{$m15_needed}',	
					m16_count ='{$m16_count}',
					m16_date ='{$m16_date}',
					m16_curr ='{$m16_curr}',
					m16_needed ='{$m16_needed}',
					m17_count ='{$m17_count}',
					m17_date ='{$m17_date}',
					m17_curr ='{$m17_curr}',
					m17_needed ='{$m17_needed}',
					m18_count ='{$m18_count}',
					m18_date ='{$m18_date}',
					m18_curr ='{$m18_curr}',
					m18_needed ='{$m18_needed}',
					m19_count ='{$m19_count}',
					m19_date ='{$m19_date}',
					m19_curr ='{$m19_curr}',
					m19_needed ='{$m19_needed}',
					m20_count ='{$m20_count}',
					m20_date ='{$m20_date}',
					m20_curr ='{$m20_curr}',
					m20_needed ='{$m20_needed}',
					m21_count ='{$m21_count}',
					m21_date ='{$m21_date}',
					m21_curr ='{$m21_curr}',
					m21_needed ='{$m21_needed}',
					m22_count ='{$m22_count}',
					m22_date ='{$m22_date}',
					m22_curr ='{$m22_curr}',
					m22_needed ='{$m22_needed}',
					m23_count ='{$m23_count}',
					m23_date ='{$m23_date}',
					m23_curr ='{$m23_curr}',
					m23_needed ='{$m23_needed}',
					m24_count ='{$m24_count}',
					m24_date ='{$m24_date}',
					m24_curr ='{$m24_curr}',
					m24_needed ='{$m24_needed}',
					m25_count ='{$m25_count}',
					m25_date ='{$m25_date}',
					m25_curr ='{$m25_curr}',
					m25_needed ='{$m25_needed}',
					m26_count ='{$m26_count}',
					m26_date ='{$m26_date}',
					m26_curr ='{$m26_curr}',
					m26_needed ='{$m26_needed}',
					m27_count ='{$m27_count}',
					m27_date ='{$m27_date}',
					m27_curr ='{$m27_curr}',
					m27_needed ='{$m27_needed}',
					m28_count ='{$m28_count}',
					m28_date ='{$m28_date}',
					m28_curr ='{$m28_curr}',
					m28_needed ='{$m28_needed}',
					m29_count ='{$m29_count}',
					m29_date ='{$m29_date}',
					m29_curr ='{$m29_curr}',
					m29_needed ='{$m29_needed}',
					m30_count ='{$m30_count}',
					m30_date ='{$m30_date}',
					m30_curr ='{$m30_curr}',
					m30_needed ='{$m30_needed}',
					m31_count ='{$m31_count}',
					m31_date ='{$m31_date}',
					m31_curr ='{$m31_curr}',
					m31_needed ='{$m31_needed}',
					m32_count ='{$m32_count}',
					m32_date ='{$m32_date}',
					m32_curr ='{$m32_curr}',
					m32_needed ='{$m32_needed}',
					m33_count ='{$m33_count}',
					m33_date ='{$m33_date}',
					m33_curr ='{$m33_curr}',
					m33_needed ='{$m33_needed}',
					m34_count ='{$m34_count}',
					m34_date ='{$m34_date}',
					m34_curr ='{$m34_curr}',
					m34_needed ='{$m34_needed}',
					m35_count ='{$m35_count}',
					m35_date ='{$m35_date}',
					m35_curr ='{$m35_curr}',
					m35_needed ='{$m35_needed}',
					m36_count ='{$m36_count}',
					m36_date ='{$m36_date}',
					m36_curr ='{$m36_curr}',
					m36_needed ='{$m36_needed}',
					m37_count ='{$m37_count}',
					m37_date ='{$m37_date}',
					m37_curr ='{$m37_curr}',
					m37_needed ='{$m37_needed}',
					m38_count ='{$m38_count}',
					m38_date ='{$m38_date}',
					m38_curr ='{$m38_curr}',
					m38_needed ='{$m38_needed}',
					m39_count ='{$m39_count}',
					m39_date ='{$m39_date}',
					m39_curr ='{$m39_curr}',
					m39_needed ='{$m39_needed}',
					m40_count ='{$m40_count}',
					m40_date ='{$m40_date}',
					m40_curr ='{$m40_curr}',
					m40_needed ='{$m40_needed}',
					m41_count ='{$m41_count}',
					m41_date ='{$m41_date}',
					m41_curr ='{$m41_curr}',
					m41_needed ='{$m41_needed}',
					m42_count ='{$m42_count}',
					m42_date ='{$m42_date}',
					m42_curr ='{$m42_curr}',
					m42_needed ='{$m42_needed}',
					m43_count ='{$m43_count}',
					m43_date ='{$m43_date}',
					m43_curr ='{$m43_curr}',
					m43_needed ='{$m43_needed}',
					m44_count ='{$m44_count}',
					m44_date ='{$m44_date}',
					m44_curr ='{$m44_curr}',
					m44_needed ='{$m44_needed}',
					m45_count ='{$m45_count}',
					m45_date ='{$m45_date}',
					m45_curr ='{$m45_curr}',
					m45_needed ='{$m45_needed}',
					m46_count ='{$m46_count}',
					m46_date ='{$m46_date}',
					m46_curr ='{$m46_curr}',
					m46_needed ='{$m46_needed}',
					m47_count ='{$m47_count}',
					m47_date ='{$m47_date}',
					m47_curr ='{$m47_curr}',
					m47_needed ='{$m47_needed}',
					m48_count ='{$m48_count}',
					m48_date ='{$m48_date}',
					m48_curr ='{$m48_curr}',
					m48_needed ='{$m48_needed}',
					m49_count ='{$m49_count}',
					m49_date ='{$m49_date}',
					m49_curr ='{$m49_curr}',
					m49_needed ='{$m49_needed}',
					m50_count ='{$m50_count}',
					m50_date ='{$m50_date}',
					m50_curr ='{$m50_curr}',
					m50_needed ='{$m50_needed}'
        WHERE 
					stats_pid = '{$pid}'";
	mysql_query($sSql) OR die(mysql_error());
		
	  
	  $aStar = floor($assault/220000);
	  $sStar = floor($support/170000);
	  $eStar = floor($engineer/145000);
	  $rStar = floor($recon/195000);
	  
	  
	  $vehicleahStar = floor($vehicleah/60000);
    $vehicleshStar = floor($vehiclesh/48000);
    $vehiclejetStar = floor($vehiclejet/35000);
    $vehiclembtStar = floor($vehiclembt/100000);
    $vehicleaaStar = floor($vehicleaa/32000);
    $vehicleifvStar = floor($vehicleifv/90000);
	  
	  	
		if ($aHist['points'] != $points){
			$status = "1";
		}else{
			$status ="2";
		}
		
		
		  
		
		$sSql ="	UPDATE 
					".DBPrefix."generalStats 
				SET 
					rank ='{$g_rank}',
					rankscore ='{$s_rank}',
					nextrank ='{$n_rank}',
					points ='{$points}',
					award ='{$award}',
					assault ='{$assault}',
					bonus ='{$bonus}',
					engineer ='{$engineer}',
					general ='{$general}',
					objective ='{$objective}',
					recon ='{$recon}',
					squad ='{$squad}',
					support ='{$support}',
					team ='{$team}',
					vehicleaa ='{$vehicleaa}',
					aunlock ='{$unlock}',
					vehicleah ='{$vehicleah}',
					vehicleall ='{$vehicleall}',
					vehicleifv ='{$vehicleifv}',
					vehiclejet ='{$vehiclejet}',
					vehiclembt ='{$vehiclembt}',
					vehiclesh ='{$vehiclesh}',
					wins ='{$wins}',
					losses ='{$losses}',
					shots ='{$shots}',
					hits ='{$hits}',
					headshots ='{$headshots}',
					longesths ='{$longesths}',
					playtime ='{$time}',
					revives ='{$revives}',
					killassists ='{$killassists}',
					resupplies ='{$resupplies}',
					heals ='{$heals}',
					repairs ='{$repairs}',
					rounds ='{$rounds}',
					elo ='{$elo}',
					elo_games ='{$elo_games}',
					killstreakbonus ='{$killstreakbonus}',
					vehicledestroyassist ='{$vehicledestroyassist}',
					vehicledestroyed ='{$vehicledestroyed}',
					dogtags ='{$dogtags}',
					avengerkills ='{$avengerkills}',
					saviorkills ='{$saviorkills}',
					damagaassists ='{$damagaassists}',
					kills ='{$kills}',
					deaths ='{$deaths}',
					date_insert_bf3s = '{$date_insert_bf3s}',
					date_check_bf3s = '{$date_check_bf3s}',
					date_update_bf3s = '{$date_update_bf3s}',
					battlelogurl = '{$battlelogurl}',
					bf3statsurl = '{$bf3surl}',
					last_update='$tTime',
					serviceStar_a='{$aStar}',
					serviceStar_s='{$sStar}',
					serviceStar_e='{$eStar}',
					serviceStar_r='{$rStar}',
					suppression='{$suppression}',
					nemesisstreak='{$nemesisstreak}',
					nemesiskills='{$nemesiskills}',
					mcomdest='{$mcomdest}',
					mcomdefkills='{$mcomdefkills}',
					flagcaps='{$flagcaps}',
					flagdef='{$flagdef}',
					longesthandhs='{$longesthandhs}',
					status='{$status}',
					vehicleahStar='{$vehicleahStar}',
					vehicleshStar='{$vehicleshStar}',
					vehiclejetStar='{$vehiclejetStar}',
					vehiclembtStar='{$vehiclembtStar}',
					vehicleaaStar='{$vehicleaaStar}',
					vehicleifvStar='{$vehicleifvStar}',
					battlelogID='{$bID}',
					expansion='{$expansions}'
        WHERE 
					soldiername = '{$aPlayer['name']}'";
	mysql_query($sSql) OR die(mysql_error());
		
		
		
			$sSql ="	UPDATE 
					".DBPrefix."gamemodes 
				SET 
				losses_cq = '{$looses_cq}',
				wins_cq = '{$wins_cq}',
				losses_rush = '{$looses_rush}',
				wins_rush = '{$wins_rush}',
				losses_sqr = '{$looses_sqr}',
				wins_sqr = '{$wins_sqr}',
				losses_teamdm = '{$looses_teamdm}',
				wins_teamdm = '{$wins_teamdm}',
				losses_squaddm = '{$looses_squaddm}',
				wins_squaddm = '{$wins_squaddm}'		
		  WHERE 
					stats_pid = '{$pid}'";
	mysql_query($sSql) OR die(mysql_error());
			
			
			
			
			
		include("updateDogtag.php");	
			
			
			
			
			
			$fTime += $oTimer->stop();
			if ($oTimer->iLaufzeit > $fTimeMax) $fTimeMax = $oTimer->iLaufzeit;
			++$iCounter;
		}
	}


if ($sError == '' && $bError === false){
	if ($fTime == 0){
		$fTime = 0;
	}else{
	$fTime = number_format($fTime/$iCounter, 2, ',', '.');
}
	$fTimeMax = number_format($fTimeMax, 2, ',', '.');
	$sAllgemein = LANG_UPDATE_COUNT." {$iCounter} | ".LANG_UPDATE_TIME." " . $oTime->stop() . " / &oslash; ".$fTime." / Max ".$fTimeMax." ".LANG_UPDATE_SECONDS;
} else {
	if (!is_string($bError))
		$bError = true;
	$sAllgemein = $sError;
	
}


echo $APIUPDATE;

