<?php
/*======================================================================*\
|| #################################################################### ||
|| # EoT-Clan BF3 Leaderboard                                         # ||
|| # ---------------------------------------------------------------- # ||
|| # Dieses Copyright darf nicht entfernet werden                     # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # -----------------BF3 Leaderboard is a free Software--------------# ||
|| #                   http://eot-clan.net                            # ||
|| #################################################################### ||
\*======================================================================*/

	if(isset($_GET['name']) && !empty($_GET['name']) && $_GET['name'] != '') {
	 $iPlayer = $_GET['name']; 
 }else{
	include ('error/errorPlayers.html');
   exit;
}
	
	   $sWhere = "a.soldiername = '{$iPlayer}'";	
    
	$sSql = "
		SELECT 
			a.*,
			b.*,
			d.*,
			e.*,
			f.*,
			g.*,
			h.*,
			l.*,
			m.*,
			n.*,
			o.*
		FROM 
			  ".DBPrefix."generalStats a
		Left JOIN 
         ".DBPrefix."weapons b ON a.pid = b.stats_pid
    Left JOIN 
         ".DBPrefix."vehicles d ON a.pid = d.stats_pid
    Left JOIN 
         ".DBPrefix."ribbons e ON a.pid = e.stats_pid
    Left JOIN 
         ".DBPrefix."team f ON a.pid = f.stats_pid
    Left JOIN 
         ".DBPrefix."coop g ON a.pid = g.stats_pid
    Left JOIN 
         ".DBPrefix."gamemodes h ON a.pid = h.stats_pid
    Left JOIN 
         ".DBPrefix."medals l ON a.pid = l.stats_pid
    Left JOIN 
         ".DBPrefix."stars m ON a.pid = m.stats_pid
    Left JOIN 
         ".DBPrefix."equipment n ON a.pid = n.stats_pid
    Left JOIN 
         ".DBPrefix."assignments o ON a.pid = o.stats_pid
	  WHERE 
			{$sWhere}";
	
		$rResult = mysql_query($sSql) or $sError = 'Error in Query: ' . mysql_error() . ' in SQL: ' . print_r($sSql, true);


			    $data= mysql_fetch_assoc($rResult);
			    $entrys = mysql_num_rows($rResult);
			    if ($entrys == 0){
		include ('error/errorPlayers.html');
		exit;
	}		 
