//Query Overall & Actual STHS Stats //
$QueryActualStats="SELECT Team, Name, Country, Age, Weight, Height, Position, Contract, Rookie, Salary, CK, FG, DI, SK, ST, DU, PH, FO, PA, SC, DF, EX, LD, MO, PO, ProGP, ProShots, ProGoal, ProAssist, ProPlusMoins, ProPim, ProShotsBlock, ProHits, ProHitTook, ProPP, ProSH, ProGW, ProGT, ProFOWon, ProFOTotal, ProPenaltyShotScore, ProPenaltyShotTotal, ProEmptyNetGoal, ProMinutesPlayed, ProHatTrick, FarmGP, FarmShots, FarmGoal, FarmAssist, FarmPlusMoins, FarmPim, FarmShotsBlock, FarmHits, FarmHitTook, FarmPP, FarmSH, FarmGW, FarmGT, FarmFOWon, FarmFOTotal, FarmPenaltyShotsScore, FarmPenaltyShotsTotal, FarmEmptyNetGoal, FarmMinutesPlayed, FarmHatTrick FROM GDEPlayersStats WHERE Name Like '%$PlayerName%'";
$ResultActualStats=mysql_query($QueryActualStats);
$NumActualStats=mysql_num_rows($ResultActualStats);
$Team = mysql_result($ResultActualStats,$i,"Team");
$PlayerName = mysql_result($ResultActualStats,$i,"Name");
$Country = mysql_result($ResultActualStats,$i,"Country");
$Age = mysql_result($ResultActualStats,$i,"Age");
$Weight = mysql_result($ResultActualStats,$i,"Weight");
$Height = mysql_result($ResultActualStats,$i,"Height");
if ($Height=='64') {$HeightTexte='5' 4"';}
if ($Height=='65') {$HeightTexte='5' 5"';}
if ($Height=='66') {$HeightTexte='5' 6"';}
if ($Height=='67') {$HeightTexte='5' 7"';}
if ($Height=='68') {$HeightTexte='5' 8"';}
if ($Height=='69') {$HeightTexte='5' 9"';}
if ($Height=='70') {$HeightTexte='5' 10"';}
if ($Height=='71') {$HeightTexte='5' 11"';}
if ($Height=='72') {$HeightTexte='6'';}
if ($Height=='73') {$HeightTexte='6' 1"';}
if ($Height=='74') {$HeightTexte='6' 2"';}
if ($Height=='75') {$HeightTexte='6' 3"';}
if ($Height=='76') {$HeightTexte='6' 4"';}
if ($Height=='77') {$HeightTexte='6' 5"';}
if ($Height=='78') {$HeightTexte='6' 6"';}
if ($Height=='79') {$HeightTexte='6' 7"';}
if ($Height=='80') {$HeightTexte='6' 8"';}
if ($Height=='81') {$HeightTexte='6' 9"';}
if ($Height=='82') {$HeightTexte='6' 10"';}
if ($Height=='83') {$HeightTexte='6' 11"';}
if ($Height=='84') {$HeightTexte='7'';}
if ($Height=='85') {$HeightTexte='7' 1"';}
$Position = mysql_result($ResultActualStats,$i,"Position");
$Rookie = mysql_result($ResultActualStats,$i,"Rookie");
if ($Rookie=='False') {$RookieTexte='Veteran';}
if ($Rookie=='True') {$RookieTexte='Rookie';}
$Contract = mysql_result($ResultActualStats,$i,"Contract");
if ($Contract=='1' AND $Age>='28') {$ContractTexte='<font color="red"><b>UFA</font></b>';}
if ($Contract=='1' AND $Age<'28') {$ContractTexte='<font color="red"><b>RFA 2</font></b>';}
if ($Contract=='1' AND $Age<='23') {$ContractTexte='<font color="red"><b>RFA 1</font></b>';}
if ($Contract!='1') {$ContractTexte=$Contract;}
$Salary = mysql_result($ResultActualStats,$i,"Salary");
$CK = mysql_result($ResultActualStats,$i,"CK");
$FG = mysql_result($ResultActualStats,$i,"FG");
$DI = mysql_result($ResultActualStats,$i,"DI");
$SK = mysql_result($ResultActualStats,$i,"SK");
$ST = mysql_result($ResultActualStats,$i,"ST");
$DU = mysql_result($ResultActualStats,$i,"DU");
$PH = mysql_result($ResultActualStats,$i,"PH");
$FO = mysql_result($ResultActualStats,$i,"FO");
$PA = mysql_result($ResultActualStats,$i,"PA");
$SC = mysql_result($ResultActualStats,$i,"SC");
$DF = mysql_result($ResultActualStats,$i,"DF");
$EX = mysql_result($ResultActualStats,$i,"EX");
$LD = mysql_result($ResultActualStats,$i,"LD");
$MO = mysql_result($ResultActualStats,$i,"MO");
if ($MO<='20') {$MOTexte='Suicidaire';}
if ($MO>'21') {$MOTexte='Dépressif';}
if ($MO>'35') {$MOTexte='Malheureux';}
if ($MO>'45') {$MOTexte='Normal';}
if ($MO>'55') {$MOTexte='Content';}
if ($MO>'65') {$MOTexte='Heureux';}
if ($MO>'75') {$MOTexte='En feu';}
$PO = mysql_result($ResultActualStats,$i,"PO");
$ProGP = mysql_result($ResultActualStats,$i,"ProGP");
$ProShots = mysql_result($ResultActualStats,$i,"ProShots");
$ProGoal = mysql_result($ResultActualStats,$i,"ProGoal");
$ProAssist = mysql_result($ResultActualStats,$i,"ProAssist");
$ProPlusMoins = mysql_result($ResultActualStats,$i,"ProPlusMoins");
$ProPim = mysql_result($ResultActualStats,$i,"ProPim");
$ProShotsBlock = mysql_result($ResultActualStats,$i,"ProShotsBlock");
$ProHits = mysql_result($ResultActualStats,$i,"ProHits");
$ProHitTook = mysql_result($ResultActualStats,$i,"ProHitTook");
$ProPP = mysql_result($ResultActualStats,$i,"ProPP");
$ProSH = mysql_result($ResultActualStats,$i,"ProSH");
$ProGW = mysql_result($ResultActualStats,$i,"ProGW");
$ProGT = mysql_result($ResultActualStats,$i,"ProGT");
$ProFOWon = mysql_result($ResultActualStats,$i,"ProFOWon");
$ProFOTotal = mysql_result($ResultActualStats,$i,"ProFOTotal");
$ProPenaltyShotScore = mysql_result($ResultActualStats,$i,"ProPenaltyShotScore");
$ProPenaltyShotTotal = mysql_result($ResultActualStats,$i,"ProPenaltyShotTotal");
$ProEmptyNetGoal = mysql_result($ResultActualStats,$i,"ProEmptyNetGoal");
$ProMinutesPlayed = mysql_result($ResultActualStats,$i,"ProMinutesPlayed");
$ProHatTrick = mysql_result($ResultActualStats,$i,"ProHatTrick");
$ProPts = $ProGoal + $ProAssist;
if ($Position=='2') {$PositionTexte='LW';}
if ($Position=='1') {$PositionTexte='C';}
if ($Position=='3') {$PositionTexte='RW';}
if ($Position=='4') {$PositionTexte='D';}
$ProGPFarm = mysql_result($ResultActualStats,$i,"FarmGP");
$ProShotsFarm = mysql_result($ResultActualStats,$i,"FarmShots");
$ProGoalFarm = mysql_result($ResultActualStats,$i,"FarmGoal");
$ProAssistFarm = mysql_result($ResultActualStats,$i,"FarmAssist");
$ProPlusMoinsFarm = mysql_result($ResultActualStats,$i,"FarmPlusMoins");
$ProPimFarm = mysql_result($ResultActualStats,$i,"FarmPim");
$ProShotsBlockFarm = mysql_result($ResultActualStats,$i,"FarmShotsBlock");
$ProHitsFarm = mysql_result($ResultActualStats,$i,"FarmHits");
$ProHitTookFarm = mysql_result($ResultActualStats,$i,"FarmHitTook");
$ProPPFarm = mysql_result($ResultActualStats,$i,"FarmPP");
$ProSHFarm = mysql_result($ResultActualStats,$i,"FarmSH");
$ProGWFarm = mysql_result($ResultActualStats,$i,"FarmGW");
$ProGTFarm = mysql_result($ResultActualStats,$i,"FarmGT");
$ProFOWonFarm = mysql_result($ResultActualStats,$i,"FarmFOWon");
$ProFOTotalFarm = mysql_result($ResultActualStats,$i,"FarmFOTotal");
//$ProPenaltyShotScoreFarm = mysql_result($ResultActualStats,$i,"FarmPenaltyShotScore");
//$ProPenaltyShotTotalFarm = mysql_result($ResultActualStats,$i,"FarmPenaltyShotTotal");
//$ProEmptyNetGoalFarm = mysql_result($ResultActualStats,$i,"FarmEmptyNetGoal");
//$ProMinutesPlayedFarm = mysql_result($ResultActualStats,$i,"FarmMinutesPlayed");
//$ProHatTrickFarm = mysql_result($ResultActualStats,$i,"FarmHatTrick");
$ProPtsFarm = $ProGoalFarm + $ProAssistFarm;
$TeamName = $Team;
include_once "Includes/LogoTeamName.php";
//Saison 1 STHS Stats //
$QueryActualStats="SELECT Team, Name, Country, Age, Weight, Height, Position, Contract, Salary, CK, FG, DI, SK, ST, DU, PH, FO, PA, SC, DF, EX, LD, PO, MO, ProGP, ProShots, ProGoal, ProAssist, ProPlusMoins, ProPim, ProShotsBlock, ProHits, ProHitTook, ProPP, ProSH, ProGW, ProGT, ProFOWon, ProFOTotal, ProPenaltyShotScore, ProPenaltyShotTotal, ProEmptyNetGoal, ProMinutesPlayed, ProHatTrick, FarmGP, FarmShots, FarmGoal, FarmAssist, FarmPlusMoins, FarmPim, FarmShotsBlock, FarmHits, FarmHitTook, FarmPP, FarmSH, FarmGW, FarmGT, FarmFOWon, FarmFOTotal, FarmPenaltyShotsScore, FarmPenaltyShotsTotal, FarmEmptyNetGoal, FarmMinutesPlayed, FarmHatTrick FROM GDEPlayersStats1 WHERE Name Like '%$PlayerName%'";
$ResultActualStats=mysql_query($QueryActualStats);
$NumActualStats=mysql_num_rows($ResultActualStats);
$Team1 = mysql_result($ResultActualStats,$i,"Team");
$PlayerName = mysql_result($ResultActualStats,$i,"Name");
$Country1 = mysql_result($ResultActualStats,$i,"Country");
$Age1 = mysql_result($ResultActualStats,$i,"Age");
$Weight1 = mysql_result($ResultActualStats,$i,"Weight");
$Height1 = mysql_result($ResultActualStats,$i,"Height");
$Position1 = mysql_result($ResultActualStats,$i,"Position");
$Contract1 = mysql_result($ResultActualStats,$i,"Contract");
$Salary1 = mysql_result($ResultActualStats,$i,"Salary");
$CK1 = mysql_result($ResultActualStats,$i,"CK");
$FG1 = mysql_result($ResultActualStats,$i,"FG");
$DI1 = mysql_result($ResultActualStats,$i,"DI");
$SK1 = mysql_result($ResultActualStats,$i,"SK");
$ST1 = mysql_result($ResultActualStats,$i,"ST");
$DU1 = mysql_result($ResultActualStats,$i,"DU");
$PH1 = mysql_result($ResultActualStats,$i,"PH");
$FO1 = mysql_result($ResultActualStats,$i,"FO");
$PA1 = mysql_result($ResultActualStats,$i,"PA");
$SC1 = mysql_result($ResultActualStats,$i,"SC");
$DF1 = mysql_result($ResultActualStats,$i,"DF");
$EX1 = mysql_result($ResultActualStats,$i,"EX");
$LD1 = mysql_result($ResultActualStats,$i,"LD");
$PO1 = mysql_result($ResultActualStats,$i,"PO");
$MO1 = mysql_result($ResultActualStats,$i,"MO");
$Pro1GP = mysql_result($ResultActualStats,$i,"ProGP");
$Pro1Shots = mysql_result($ResultActualStats,$i,"ProShots");
$Pro1Goal = mysql_result($ResultActualStats,$i,"ProGoal");
$Pro1Assist = mysql_result($ResultActualStats,$i,"ProAssist");
$Pro1PlusMoins = mysql_result($ResultActualStats,$i,"ProPlusMoins");
$Pro1Pim = mysql_result($ResultActualStats,$i,"ProPim");
$Pro1ShotsBlock = mysql_result($ResultActualStats,$i,"ProShotsBlock");
$Pro1Hits = mysql_result($ResultActualStats,$i,"ProHits");
$Pro1HitTook = mysql_result($ResultActualStats,$i,"ProHitTook");
$Pro1PP = mysql_result($ResultActualStats,$i,"ProPP");
$Pro1SH = mysql_result($ResultActualStats,$i,"ProSH");
$Pro1GW = mysql_result($ResultActualStats,$i,"ProGW");
$Pro1GT = mysql_result($ResultActualStats,$i,"ProGT");
$Pro1FOWon = mysql_result($ResultActualStats,$i,"ProFOWon");
$Pro1FOTotal = mysql_result($ResultActualStats,$i,"ProFOTotal");
$Pro1PenaltyShotScore = mysql_result($ResultActualStats,$i,"ProPenaltyShotScore");
$Pro1PenaltyShotTotal = mysql_result($ResultActualStats,$i,"ProPenaltyShotTotal");
$Pro1EmptyNetGoal = mysql_result($ResultActualStats,$i,"ProEmptyNetGoal");
$Pro1MinutesPlayed = mysql_result($ResultActualStats,$i,"ProMinutesPlayed");
$Pro1HatTrick = mysql_result($ResultActualStats,$i,"ProHatTrick");
$Pro1Pts = $Pro1Goal + $Pro1Assist;
if ($Position=='2') {$PositionTexte='LW';}
if ($Position=='1') {$PositionTexte='C';}
if ($Position=='3') {$PositionTexte='RW';}
if ($Position=='4') {$PositionTexte='D';}
$Pro1GPFarm = mysql_result($ResultActualStats,$i,"FarmGP");
$Pro1ShotsFarm = mysql_result($ResultActualStats,$i,"FarmShots");
$Pro1GoalFarm = mysql_result($ResultActualStats,$i,"FarmGoal");
$Pro1AssistFarm = mysql_result($ResultActualStats,$i,"FarmAssist");
$Pro1PlusMoinsFarm = mysql_result($ResultActualStats,$i,"FarmPlusMoins");
$Pro1PimFarm = mysql_result($ResultActualStats,$i,"FarmPim");
$Pro1ShotsBlockFarm = mysql_result($ResultActualStats,$i,"FarmShotsBlock");
$Pro1HitsFarm = mysql_result($ResultActualStats,$i,"FarmHits");
$Pro1HitTookFarm = mysql_result($ResultActualStats,$i,"FarmHitTook");
$Pro1PPFarm = mysql_result($ResultActualStats,$i,"FarmPP");
$Pro1SHFarm = mysql_result($ResultActualStats,$i,"FarmSH");
$Pro1GWFarm = mysql_result($ResultActualStats,$i,"FarmGW");
$Pro1GTFarm = mysql_result($ResultActualStats,$i,"FarmGT");
$Pro1FOWonFarm = mysql_result($ResultActualStats,$i,"FarmFOWon");
$Pro1FOTotalFarm = mysql_result($ResultActualStats,$i,"FarmFOTotal");
//$ProPenaltyShotScoreFarm = mysql_result($ResultActualStats,$i,"FarmPenaltyShotScore");
//$ProPenaltyShotTotalFarm = mysql_result($ResultActualStats,$i,"FarmPenaltyShotTotal");
//$ProEmptyNetGoalFarm = mysql_result($ResultActualStats,$i,"FarmEmptyNetGoal");
//$ProMinutesPlayedFarm = mysql_result($ResultActualStats,$i,"FarmMinutesPlayed");
//$ProHatTrickFarm = mysql_result($ResultActualStats,$i,"FarmHatTrick");
$Pro1PtsFarm = $ProGoalFarm + $ProAssistFarm;
include_once "Includes/LogoTeamName.php";
Le probleme c que dans la DB GDEPlayersStats il y a des joueurs qui ne sont pas présent dans GDEPlayersStats1… Donc lorsqu’il veut setter les variables 1, il ne trouve rien dans la DB