<?php
			session_start();
			include('database.php');
			DB_connexion(); 
			error_reporting(0);
?>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Description" content="Site perso,cours,ouvrages" />
<meta name="Keywords" content="WEBSITE perso " />
<meta name="Distribution" content="Global" />
<meta name="Robots" content="" />
<meta http-equiv="Content-Language" content="fr" />
<meta name="rating" content="general" />
<meta name="author" content="Patrice DELPY" />
<meta name="copyright" content="Copyright 2013" />
<meta name="generator" content="Patoche" />
<title>Patoche WEBSITE - 2013 - Template du site - en cours de développemment ...</title>
<script language="JavaScript" src="include/chartembed.js"></script>

<!---------------------------------------------------------->	
<?php
		include('include_css_template_commun.php');
		include('include_css.php');
		include('css_tools_skill.php');
		include('include_javascript.php');

?> 

<style type="text/css">
#bloc_filtre { float: left;
					width: 831px; 
					padding: 50px 50px 25px 50px;

					}	
					
#bloc_stats { float: left;
			  width: 850px; 
			  padding: 50px 10px 25px 10px;

					}	
					
					
#navigation_tournoi{
					float: left;
					width: 885px;
					padding: 10px 0px 0px 10px;
					text-align: center;
				}
		
label
{   
	display: block;
	width: 150px;
	float: left;
	//padding: 28px;
}

select
{
width: 100px;
}
		

#alignement
{
	
	text-align: center;
	
}
		
dddtd {
    text-align: left;
}
		
</style>

<script type="text/javascript">
function call_update()
{
			ajax_routine(); 
			setTimeout("call_update()", 1000); //appelle la fonction 1 fois par  seconde
}
		
function getXhr()
{
			var xhr = null; 
			if(window.XMLHttpRequest) // Firefox et autres
			      xhr = new XMLHttpRequest(); 
			else if(window.ActiveXObject)
			     { // Internet Explorer 
					try { 
							xhr = new ActiveXObject("Msxml2.XMLHTTP");
						} 
					catch (e) 
						{ 
							xhr = new ActiveXObject("Microsoft.XMLHTTP");
						}
				}
				else 
				{ 
					// XMLHttpRequest non supporté par le navigateur 
					alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
					xhr = false; 
				 } 
                
				return xhr;
}
			
function mise_jour_joueur2()
{
			
			var xhr = getXhr();
			document.getElementById("div_joueur2").style.visibility='visible';
			document.getElementById('affiche_resultat').innerHTML = "";
			
			document.getElementById('bloc_listing').style.display = "none";
			
			xhr.onreadystatechange = function()
			{
					//  le serveur est ok
					if(xhr.readyState == 4 && xhr.status == 200)
					{
						leselect = xhr.responseText;
						document.getElementById('div_joueur2').innerHTML = leselect;
					}
			}

			xhr.open("POST","ajax_mise_jour_joueur2.php",true);
			xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
			sel = document.getElementById('J1');
			joueur = sel.options[sel.selectedIndex].value;
			xhr.send("joueur="+joueur);
}

function filtre()
{
	
			var J1 = document.getElementById("J1").value;
			var J2 = document.getElementById("J2").value;
		
			window.location.href="chart_multi.php?J1="+J1+"&J2="+J2;
		
			//alert("TRACE");
						
			//xhr.send("J1="+J1+"&J2="+J2);
			
}


</script>

<!---------------------------------------------------------->	
</head>

<body>
<!---------------------------------------------------------->	
	<div class="main"> <!-- main -->
<!---------------------------------------------------------->	

          <div class="header">
                <div class="balise_titre">Patoche</div>
                <div class="balise_citation">
                &quot;Etre conscient que l'on est ignorant est un grand pas vers le savoir&quot;
                </div>
          </div> 
 
          <div class="banniere"></div>  

<!---------------------------------------------------------->
<?php
/*	include("include_barre_login.php");
	echo '<div id="box_icon">';
	include("debug_connexion_membre.php");
	echo '</div>';
	include("include_menu.php");*/
	
	echo '<div id="box_infos">';
			include("include_menu.php");
			
			echo '<div id="box_icon2">';
			include("connexion_membre.php");
			echo	'</div>';
			
			echo '<div id="box_icon3">';
			include("include_barre_login.php");
			echo	'</div>';

	echo	'</div>';
	$_SESSION['page_active'] = basename (__FILE__ );
?>
		

<!---------------------------------------------------------->	
            <div class="contenu"> <!-- contenu -->
<!---------------------------------------------------------->	
	
			<div class="barre_vide"></div>
			
			<div id="navigation_tournoi">
				<ul id="menu_horiz">
				<li class="tournoi_back_tag_selected"><a href="joueurs_echec.php" title="Retour au menu principal">Retour</a></li>
				<!--
				<li class="tournoi_partie_tag"><a href="partie.php" title="aller à la section">Partie</a></li>
				<li class="tournoi_classement_tag"><a href="classement.php" title="aller à la section">classement</a></li>
				<li class="tournoi_liste_joueurs_tag"><a href="liste_joueurs.php" title="aller à la section">Joueurs</a></li>
				<li class="tournoi_stats_tag_selected"><a href="selection_filtre.php" title="aller à la section">stats</a></li>
				<li class="tournoi_securite_tag"><a href="admin.php" title="aller à la section">Admin</a></li>
				!-->
				</ul>
			</div>
			
			<div id="bloc_stats">


	
	
	
<!------------------------------------------------------------------------------>

			<div id="bloc_filtre">

			<input type="hidden" name="valide_form" id="valide_form" value="" />
			<input type="hidden" name="filtrage" id="filtrage" value="" />
			
			<fieldset style="width: 600px">
			<legend>Paramétre du filtre </legend>
				
			<p>
			<label for="nom">Joueur1 :</label>
			<select name='J1' id='J1' onchange='mise_jour_joueur2()'>
<?php
			$sql = "SELECT * FROM classement";
			$sql = "SELECT * FROM classement_new";
			
			//$sql = "SELECT * FROM " .$_SESSION['classement_new'];
				
			
			$results = mysql_query($sql);
			while($val = mysql_fetch_array($results)) 
			{
				echo "<option>".$val["joueur"]."</option>\n";
			}
?>
			</select>
			</p>
				
			<div id="div_joueur2" style="visibility: hidden;"  >  
			</div> 
				
			
			<div id="affiche_resultat"></div>		
			
			</fieldset>
			</div>	
	
<!------------------------------------------------------------------------------>	
<!--
			<div id="bloc_listing">
			<div align='center'>Parties disputées:</div>
			<br>

			<table width="750" align="center">
			<tr>
			<div id = "alignement"> 
			<td width="15" align='center' bgcolor="#CCCCCC">ID</td>
			<td width="15" align='center' bgcolor="#CCCCCC">Resultat</td>
			<td width="120" align='center' bgcolor="#CCCCCC">ELO</td>
			<td width="40" align='center' nowrap="nowrap" bgcolor="#CCCCCC">Couleur</td>
			<td width="200" align='center' bgcolor="#CCCCCC">Adversaire</td>
			<td width="120" align='center' bgcolor="#CCCCCC">Date</td>
			</div>	
			</tr>
	  
<?php 

			
?>
	  
			</table>
			<br/>
			<br/>
			</div>
-->			
<!-------------------------------------------------------------------------->
 
			</div> 

			<br/>
			<br/>
			<br/>
			<br/>
			<br/>

<!---------------------------------------------------------->	
<?php			
			include('include_pied_page.php');
			include('include_publicite.php');
?>
<!---------------------------------------------------------->	
			</div>  <!-- contenu -->
<!---------------------------------------------------------->	
			</div>   <!-- main -->
<!---------------------------------------------------------->	

			<script type="text/javascript">
			call_update();
			</script>

</body>
</html>


