"; $label = ""; while ($row = mysql_fetch_array($result)) { if ($row["playerID"]) { $infos = $row["rating"] ."" .$row["date"]; $_xml .="\t\r\n"; //$_xml .=" value='" . $row["rating"] ."'/>\r\n"; } else { $_xml .="\t\r\n"; $_xml .="\t\tnone\r\n"; $_xml .="\t\r\n"; } } $_xml .=""; fwrite($file, $_xml); fclose($file); } /*********************************************************************************/ if(!empty($_POST) ) { $_SESSION['sauvegarde_formulaire'] = $_POST ; $page_actuelle = $_SERVER['PHP_SELF'] ; if(!empty($_SERVER['QUERY_STRING'])) { $page_actuelle .= '?' . $_SERVER['QUERY_STRING'] ; } header('Location: ' . $page_actuelle); exit; } if(isset($_SESSION['sauvegarde_formulaire'])) { $_POST = $_SESSION['sauvegarde_formulaire'] ; unset($_SESSION['sauvegarde_formulaire']); } if( isset($_POST['valide_form']) && $_POST['valide_form'] == "ok" ) { //header ('Location: salut.php'); $_SESSION['message'] = "ok"; echo $_POST['selection_score']; switch ($_POST['selection_score']) { case "J1 gagne": $elo_J1 = $_SESSION['$J1_gagne_score'] ; $elo_J2 = $_SESSION['$J2_perd_score'] ; break; case "J1 perd": $elo_J1 = $_SESSION['$J1_perd_score'] ; $elo_J2 = $_SESSION['$J2_gagne_score'] ; break; case "J2 gagne": $elo_J1 = $_SESSION['$J1_perd_score'] ; $elo_J2 = $_SESSION['$J2_gagne_score'] ; break; case "J2 perd": $elo_J1 = $_SESSION['$J1_gagne_score'] ; $elo_J2 = $_SESSION['$J2_perd_score'] ; break; case "Match nul": $elo_J1 = $_SESSION['$J1_match_nul'] ; $elo_J2 = $_SESSION['$J2_match_nul'] ; break; default: echo "erreur dans le traitement"; } echo '
'; echo $elo_J1; echo '
'; echo $elo_J2; $sql = "SELECT * FROM joueurs WHERE nom = '".$_SESSION['$J1_nom']."' "; echo $sql; $result = mysql_query($sql); $data = mysql_fetch_assoc($result); $id = $data['id']; echo $id; $sql = "UPDATE joueurs SET score = '".$elo_J1."' WHERE id = '$id' " ; echo $sql; //$requete = mysql_query($sql); $sql = "SELECT * FROM joueurs WHERE nom = '".$_SESSION['$J2_nom']."' "; echo $sql; $result = mysql_query($sql); $data = mysql_fetch_assoc($result); $id = $data['id']; echo $id; $sql = "UPDATE joueurs SET score = '".$elo_J2."' WHERE id = '$id' " ; echo $sql; //$requete = mysql_query($sql); $heure = date("H:i"); $J1_nom = $_SESSION['$J1_nom']; $J2_nom = $_SESSION['$J2_nom']; $resultat_partie = $_POST['selection_score']; $sql = "INSERT INTO partie( id, joueur1, joueur2, resultat_partie, score_joueur1, score_joueur2 ,date_partie, heure_partie) VALUES('', '$J1_nom', '$J2_nom', '$resultat_partie' , '$elo_J1' , '$elo_J2' , NOW(), '$heure' )"; echo $sql; $requete = mysql_query($sql); } ?> Patoche WEBSITE - 2013 - Template du site - en cours de développemment ...
Patoche
"Etre conscient que l'on est ignorant est un grand pas vers le savoir"
'; include("debug_connexion_membre.php"); echo '
'; include("include_menu.php");*/ echo '
'; include("include_menu.php"); echo '
'; include("connexion_membre.php"); echo '
'; echo '
'; include("include_barre_login.php"); echo '
'; echo '
'; $_SESSION['page_active'] = basename (__FILE__ ); ?>
Joueur:
ELO: 0 && $oldrating !=0) { echo "(+".$incr.") 
Meilleur ELO:
Parties:
Victoires:
Défaites:
Match nul:
var myChart = new FusionCharts(\"include/Line.swf\", \"myChartId\", \"900\", \"350\", \"0\", \"0\"); myChart.setDataURL(escape(\"include/data.xml?currTime=\" + getTimeForURL())); myChart.render(\"chartdiv\"); function getTimeForURL(){ var dt = new Date(); var strOutput = \"\"; strOutput = dt.getHours() + \"_\" + dt.getMinutes() + \"_\" + dt.getSeconds() + \"_\" + dt.getMilliseconds(); return strOutput; } " ); } elseif ($gcount == 0) { echo "
Pas de données pour ce joueur!
"; } ?>


Paramétre du filtre

Parties disputées:

"; } if($result==2) { echo " "; } if ($result==3) { if($diff_w < 0) { $s1 = ""; $s2 = ""; } else { $s1 = ""; $s2 = ""; } echo " "; echo $s1; echo " "; echo $s2; echo " "; } } if ($black==$playerID) { if($result==1) { echo " "; } if ($result==2) { echo " "; } if ($result==3) { if($diff_w < 0) { $s1 = ""; $s2 = ""; } else { $s1 = ""; $s2 = ""; } echo " "; echo $s1; echo " "; echo $s2; echo " "; } } $id = $id + 1; } } else { echo ""; } ?>
ID Resultat ELO Couleur Adversaire Date
".$id." ".$w_rating. " (" .$w_brating ." " .$diff_w ." ) White ".$b_name." ".$b_rating ." (" .$b_brating ." " .$diff_b .") Black ".$date."
".$id." ".$w_rating. " (" .$w_brating ." " .$diff_w ." ) White ".$b_name." ".$b_rating ." (" .$b_brating ." " .$diff_b .") Black ".$date."
".$w_rating. " (" .$w_brating ." " .$diff_w .")".$b_name." ".$b_rating ." (" .$b_brating ." " .$diff_b .") Black ".$w_rating. " (" .$w_brating ." " .$diff_w .")".$b_name." ".$b_rating ." (" .$b_brating ." " .$diff_b .") Black
".$id." White".$date."
".$id." ".$b_rating. " (" .$b_brating ." " .$diff_b .") Black ".$w_name." ".$w_rating ." (" .$w_brating ." " .$diff_w .") White ".$date."
".$id." ".$b_rating. " (" .$b_brating ." " .$diff_b.") Black ".$w_name." ".$w_rating ." (" .$w_brating ." " .$diff_w .") White ".$date."
".$b_rating. " (" .$b_brating ." " .$diff_b .")".$w_name." ".$w_rating ." (" .$w_brating ." " .$diff_w .") Black ".$b_rating. " (" .$b_brating ." " .$diff_b .")".$w_name." ".$w_rating ." (" .$w_brating ." " .$diff_w .") Black
".$id." Black".$date."
Aucunes parties disputées!