AlaK4X
Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64



Your IP : 3.133.143.118


Current Path : /var/www/lhjmq-records.qc.ca/public_html/lang_fr/calendars/lib/
Upload File :
Current File : /var/www/lhjmq-records.qc.ca/public_html/lang_fr/calendars/lib/statDetail.php

<?php

unset($equipe_dom_add_to);
unset($equipe_vis_add_to);
unset($pers_vis_arr);
unset($pers_dom_arr);

//Get the alignments
$playerAlignVis = mysql_query($sql = "SELECT * FROM parties_joueurs AS pj LEFT JOIN types_positions AS tpos ON tpos.id_type_pos = pj.id_position WHERE pj.id_type_pers = 4 AND id_partie = $id_partie AND id_equipe = $idVis ORDER BY LPAD(numero, 3, '0'), nom, prenom", $mysql_link);
$gbAlignVis     = mysql_query($sql = "SELECT * FROM parties_joueurs AS pj LEFT JOIN types_positions AS tpos ON tpos.id_type_pos = pj.id_position WHERE pj.id_type_pers = 6 AND id_partie = $id_partie AND id_equipe = $idVis ORDER BY LPAD(numero, 3, '0'), nom, prenom", $mysql_link);
$playerAlignDom = mysql_query($sql = "SELECT * FROM parties_joueurs AS pj LEFT JOIN types_positions AS tpos ON tpos.id_type_pos = pj.id_position WHERE pj.id_type_pers = 4 AND id_partie = $id_partie AND id_equipe = $idDom ORDER BY LPAD(numero, 3, '0'), nom, prenom", $mysql_link);
$gbAlignDom     = mysql_query($sql = "SELECT * FROM parties_joueurs AS pj LEFT JOIN types_positions AS tpos ON tpos.id_type_pos = pj.id_position WHERE pj.id_type_pers = 6 AND id_partie = $id_partie AND id_equipe = $idDom ORDER BY LPAD(numero, 3, '0'), nom, prenom", $mysql_link);

//Get the team's administration personnel
$map_role_personnel = array(
	11=>121,
	12=>149,
	13=>120,
	14=>148,
	15=>124,
	16=>118,
	17=>123,
	18=>122,
	19=>150,
	20=>133,
	21=>151,
	22=>132,
	23=>153,
	24=>125,
	25=>152
);

$items = mysql_query($sql = "SELECT p.id_partie_ent, p.id_register, p.nom, p.prenom, tpers.id_type_pers, tpers.description_fr AS tpers_desc FROM parties_ent AS p LEFT JOIN types_personnels AS tpers USING(id_type_pers) WHERE id_partie = $id_partie AND id_equipe = $idVis ORDER BY p.id_type_pers, nom, prenom", $mysql_link);
$pers_vis = array();

while($item = mysql_fetch_assoc($items)) {
	$pers_vis[array_search($item['id_type_pers'], $map_role_personnel).'-'.$item['id_register']] = $item;
}

ksort($pers_vis);

//Get the team's administration personnel
$items = mysql_query($sql="SELECT p.id_partie_ent, p.id_register, p.nom, p.prenom, tpers.id_type_pers, tpers.description_fr AS tpers_desc FROM parties_ent AS p LEFT JOIN types_personnels AS tpers USING(id_type_pers) WHERE id_partie = $id_partie AND id_equipe = $idDom ORDER BY p.id_type_pers, nom, prenom", $mysql_link);
$pers_dom = array();

while($item = mysql_fetch_assoc($items)) {
	$pers_dom[array_search($item['id_type_pers'], $map_role_personnel).'-'.$item['id_register']] = $item;
}

ksort($pers_dom);



// Changements pour checkbox "Afficher le total des lancers sur la page sommaire de la partie"
$sqlLancersPeriod = "SELECT show_total_on_summary FROM parties WHERE id_partie = ".$id_partie;
$aResultLancersPeriod = mysql_fetch_assoc(mysql_query($sqlLancersPeriod, $mysql_link));

if ($aResultLancersPeriod['show_total_on_summary'] == '1') {
	$bResultLancersPeriod = true;
} else {
	$bResultLancersPeriod = false;
}

$details = array();
for ($i=1; $i <= 9; $i++) {
	$events = mysql_query($sql = "SELECT * FROM parties_events WHERE id_partie = ".$id_partie." AND code_event = 6 AND periode = ".$i, $mysql_link);
	
	while ($event = mysql_fetch_assoc($events)) {
		$subevents = mysql_query($sql = "SELECT * FROM parties_subevents WHERE id_partie_event = ".$event[id_partie_event], $mysql_link);
		
		while ($subevent = mysql_fetch_assoc($subevents)) {
			switch ($subevent[code_subevent]) {
				case 9:
					$player = mysql_fetch_assoc(mysql_query($sql = "SELECT * FROM parties_joueurs WHERE id_partie_joueur = ".$subevent[id_partie_joueur], $mysql_link));
					
					$iThisId = $player[id_partie_joueur].'_'.$player[id_equipe].'_'.$player[numero];
					
					$details[$iThisId][numero] = $player[numero];
					$details[$iThisId][bc] = $details[$iThisId][bc] + $subevent[param1];
					$details[$iThisId][fd] = $details[$iThisId][fd] + $subevent[param2];
					$details[$iThisId][lan] = $details[$iThisId][lan] + $subevent[param3];
					
					break;
				
				case 8:
					$player = mysql_fetch_assoc(mysql_query($sql = "SELECT * FROM parties_joueurs WHERE id_partie_joueur = ".$subevent[id_partie_joueur], $mysql_link));
					
					$iThisId = $player[id_partie_joueur].'_'.$player[id_equipe].'_'.$player[numero];
					
					$details[$iThisId][numero] = $player[numero];
					$details[$iThisId][bc] = $details[$iThisId][bc] + $subevent[param1];
					$details[$iThisId][fd] = $details[$iThisId][fd] + $subevent[param2];
					$details[$iThisId][lan] = $details[$iThisId][lan] + $subevent[param3];
					
					break;
			}
		}
	}
}
// Fin de changements pour checkbox "Afficher le total des lancers sur la page sommaire de la partie"

?>

<span class="blueText14px"><b>Alignements et statistiques de match</b></span><br />
<table width="621" border="0" cellspacing="0" cellpadding="0" bgcolor="#546085">
	<tr>
		<td><img src="../images/spacer.gif" width="621" height="1"></td>
	</tr>
</table>

<br />

<table width="621" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td valign="top"> 
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="5" background="../../../images/onglets/onglets-TL.gif" class="blackText12px"><img src="../../../images/spacer.gif" width="10" height="4"></td>
					<td background="../../../images/onglets/onglets-T.gif" class="blackText12px"><img src="../../../images/spacer.gif" width="10" height="4"></td>
					<td width="5" background="../../../images/onglets/onglets-TR.gif" class="blackText12px"><img src="../../../images/spacer.gif" width="10" height="4"></td>
				</tr>
				<tr>
					<td background="../../../images/onglets/onglets-L.gif" class="blackText12px"><img src="../../../images/spacer.gif" width="10" height="5"></td>
					<td class="blackText12px"><?= $equipe_vis[$idVis]['hist_name'] ?> de <?= $equipe_vis[$idVis]['hist_city'] ?></td>
					<td background="../../../images/onglets/onglets-R.gif" class="blackText12px"><img src="../../../images/spacer.gif" width="10" height="5"></td>
				</tr>
			</table>
			
			<!-- EQUIPE 1 -->
			<table border="0" cellspacing="0" cellpadding="3" class="outlinetab">
				<tr class="darkblueRow"> 
					<td align="center" class="whiteText10px">Pos</td>
					<td align="center" class="whiteText10px">No</td>
					<td class="whiteText10px">Nom</td>
					<td width="10" align="center" class="whiteText10px">&nbsp;</td>
					<td align="center" class="whiteText10px">B</td>
					<td align="center" class="whiteText10px">A</td>
					<td align="center" class="whiteText10px">Pts</td>
					<td align="center" class="whiteText10px">Pem</td>
					<td align="center" class="whiteText10px">+/-</td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="whiteText10px">Lan</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="whiteText10px">Ld</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="whiteText10px">Mj</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="whiteText10px">Mjg</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="whiteText10px">Mjp</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="whiteText10px">Mecd</td> <?php } ?>
					<td align="center" class="whiteText10px">Ban</td>
					<td align="center" class="whiteText10px">Bdn</td>
					<td align="center" class="whiteText10px">Bfd</td>
					<td align="center" class="whiteText10px">Blp</td>
					<td align="center" class="whiteText10px">Lp</td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="whiteText10px">Bf/Lf</td> <?php } ?>
				</tr>
				
				<?php
				while($player = mysql_fetch_assoc($playerAlignVis)) {
					//Color change
					if ($rowClass == "list1Reg") {
						$rowClass = "list2Reg";
					} else {
						$rowClass = "list1Reg";
					}
					
					if ($player[cap_ass] == 1) { $sPCapAss = ' (C)'; }
					else if ($player[cap_ass] == 2) { $sPCapAss = ' (A)'; }
					else { $sPCapAss = ''; }
				?>
				
				<tr class="<?= $rowClass ?>">
					<td align="center" class="blackText9px"><?= $player['description_fr'] ?></td>
					<td align="center" class="blackText9px"><?= $player['numero'] ?></td>
					<td nowrap class="blackText9px"><a href="index.php?page=2147483647&id_register=<?= $player[id_register] ?>" class="lnkBase9px"><?= $player[nom].", ".$player[prenom].'</a>'.$sPCapAss ?></td>
					<td align="center" class="blackText9px">&nbsp;</td>
					<td align="center" class="blackText9px"><?= $player['b'] == 0 ? '-' : $player['b'] ?></td>
					<td align="center" class="blackText9px"><?= $player['a'] == 0 ? '-' : $player['a'] ?></td>
					<td align="center" class="blackText9px"><?= $player['pts'] == 0 ? '-' : $player['pts'] ?></td>
					<td align="center" class="blackText9px"><?= $player['pem'] == 0 ? '-' : $player['pem'] ?></td>
					<td align="center" class="blackText9px"><?= $player['pm'] == 0 ? '-' : $player['pm'] ?></td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= $player['lan'] == 0 ? '-' : $player['lan'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= $player['ld'] == 0 ? '-' : $player['ld'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= $player['mj'] == 0 ? '-' : $player['mj'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= $player['mjg'] == 0 ? '-' : $player['mjg'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= $player['mjp'] == 0 ? '-' : $player['mjp'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= $player['mecd'] == 0 ? '-' : $player['mecd']; $equipe_vis_add_to['mecd'] += $player['mecd'] ?></td> <?php } ?>
					<td align="center" class="blackText9px"><?= $player['ban'] == 0 ? '-' : $player['ban'] ?></td>
					<td align="center" class="blackText9px"><?= $player['bdn'] == 0 ? '-' : $player['bdn'] ?></td>
					<td align="center" class="blackText9px"><?= $player['bfd'] == 0 ? '-' : $player['bfd'] ?></td>
					<td align="center" class="blackText9px"><?= $player['blp'] == 0 ? '-' : $player['blp'] ?></td>
					<td align="center" class="blackText9px"><?= $player['lp'] == 0 ? '-' : $player['lp'] ?></td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= $player['lf'] == 0 ? '-' : $player['bf'].'/'.$player['lf'] ?></td> <?php } ?>
				</tr>
				
				<?php
				}
				
				if ($rowClass == "list1Reg") {
					$rowClass = "list2Reg";
				} else {
					$rowClass = "list1Reg";
				}
				?>
				
				<tr class="<?= $rowClass ?>">
					<td align="center" class="blackText9px">-</td>
					<td align="center" class="blackText9px">-</td>
					<td nowrap class="blackText9px">Banc (&Eacute;quipe)</td>
					<td align="center" class="blackText9px">&nbsp;</td>
					<td align="center" class="blackText9px">-</td>
					<td align="center" class="blackText9px">-</td>
					<td align="center" class="blackText9px">-</td>
					<td align="center" class="blackText9px"><?= $teamVis['benchpem'] == 0 ? '-' : $teamVis['benchpem'] ?></td>
					<td align="center" class="blackText9px">-</td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px">-</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px">-</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px">-</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px">-</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px">-</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= ($teamVis['mecd'] - $equipe_vis_add_to['mecd']) == 0 ? '-' : ($teamVis['mecd'] - $equipe_vis_add_to['mecd']) ?></td> <?php } ?>
					<td align="center" class="blackText9px">-</td>
					<td align="center" class="blackText9px">-</td>
					<td align="center" class="blackText9px">-</td>
					<td align="center" class="blackText9px">-</td>
					<td align="center" class="blackText9px">-</td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px">-</td> <?php } ?>
				</tr>
				<tr class="darkBlueRow">
					<td colspan="3" align="center" class="whiteText9px">Total</td>
					<td align="center" class="blackText9px">&nbsp;</td>
					<td align="center" class="orangeText9px"><?= $teamVis['b'] == 0 ? '-' : $teamVis['b'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamVis['a'] == 0 ? '-' : $teamVis['a'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamVis['pts'] == 0 ? '-' : $teamVis['pts'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamVis['pem'] == 0 ? '-' : $teamVis['pem'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamVis['pm'] == 0 ? '-' : $teamVis['pm'] ?></td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="orangeText9px"><?= $teamVis['lan'] == 0 ? '-' : $teamVis['lan'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="orangeText9px"><?= $teamVis['ld'] == 0 ? '-' : $teamVis['ld'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="orangeText9px"><?= $teamVis['mj'] == 0 ? '-' : $teamVis['mj'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="orangeText9px"><?= $teamVis['mjg'] == 0 ? '-' : $teamVis['mjg'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="orangeText9px"><?= $teamVis['mjp'] == 0 ? '-' : $teamVis['mjp'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="orangeText9px"><?= $teamVis['mecd'] == 0 ? '-' : $teamVis['mecd'] ?></td> <?php } ?>
					<td align="center" class="orangeText9px"><?= $teamVis['ban'] == 0 ? '-' : $teamVis['ban'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamVis['bdn'] == 0 ? '-' : $teamVis['bdn'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamVis['bfd'] == 0 ? '-' : $teamVis['bfd'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamVis['blp'] == 0 ? '-' : $teamVis['blp'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamVis['lp'] == 0 ? '-' : $teamVis['lp'] ?></td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="orangeText9px"><?= $teamVis['lf'] == 0 ? '-' : $teamVis['bf'].'/'.$teamVis['lf'] ?></td> <?php } ?>
				</tr>
			</table>
			<!-- EQUIPE 1 -->
			
			<br />
			
			<!-- GARDIENS 1 -->
			<table border="0" cellspacing="0" cellpadding="3" class="outlinetab">
				<tr class="darkblueRow"> 
					<td align="center" class="whiteText10px">Pos</td>
					<td align="center" class="whiteText10px">No</td>
					<td class="whiteText10px">Nom</td>
					<td width="10" align="center" class="whiteText10px">&nbsp;</td>
					<td align="center" class="whiteText10px">Min</td>
					<td width="10" align="center" class="whiteText10px">&nbsp;</td>
					<td align="center" class="whiteText10px">Bc</td>
					<td align="center" class="whiteText10px">Fd</td>
					<td width="10" align="center" class="whiteText10px">&nbsp;</td>
					<td align="center" class="whiteText10px">Lan</td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="whiteText10px">Ld</td> <?php } ?>
					<td width="10" align="center" class="whiteText10px">&nbsp;</td>
					<td align="center" class="whiteText10px">B</td>
					<td align="center" class="whiteText10px">A</td>
					<td align="center" class="whiteText10px">Pts</td>
					<td align="center" class="whiteText10px">Pem</td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="whiteText10px">Bcf/Lcf</td> <?php } ?>
					<td align="center" class="whiteText10px">D&eacute;cision</td>
				</tr>
				
				<?php
				$iBcVisTotal = 0;
				$iLdVisTotal = 0;
				$iLanVisTotal = 0;
				
				while ($player = mysql_fetch_assoc($gbAlignVis)) {
					//Color change
					if ($rowClass == "list1Reg") {
						$rowClass = "list2Reg";
					} else {
						$rowClass = "list1Reg";
					}
					
					if ($player[cap_ass] == 1) { $sPCapAss = ' (C)'; }
					else if ($player[cap_ass] == 2) { $sPCapAss = ' (A)'; }
					else { $sPCapAss = ''; }
					
					if ($bResultLancersPeriod) {
						$iThisId = $player[id_partie_joueur].'_'.$player[id_equipe].'_'.$player[numero];
						
						$player['bc'] = $details[$iThisId]['bc'];
						$player['ld'] = $details[$iThisId]['fd'];
						$player['lan'] = $details[$iThisId]['lan'];
						
						$iBcVisTotal  += $details[$iThisId]['bc'];
						$iLdVisTotal  += $details[$iThisId]['fd'];
						$iLanVisTotal += $details[$iThisId]['lan'];
						
						$teamVis['bc'] = $iBcVisTotal;
						$teamVis['fd'] = $iLdVisTotal;
						$teamVis['gblan'] = $iLanVisTotal;
					}
				?>
				
				<tr class="<?= $rowClass ?>">
					<td align="center" class="blackText9px"><?= $player['description_fr'] ?></td>
					<td align="center" class="blackText9px"><?= $player['numero'] ?></td>
					<td nowrap class="blackText9px"><a href="index.php?page=2147483647&id_register=<?= $player[id_register] ?>" class="lnkBase9px"><?= $player[nom].", ".$player[prenom].'</a>'.$sPCapAss ?></td>
					<td align="center" class="blackText9px">&nbsp;</td>
					<td align="center" class="blackText9px"><?= numtotime_asmin(timetonum($player['min'])) ?></td>
					<td align="center" class="blackText9px">&nbsp;</td>
					<td align="center" class="blackText9px"><?= $player['bc'] == 0 ? '-' : $player['bc'] ?></td>
					<td align="center" class="blackText9px"><?= $player['fd'] == 0 ? '-' : $player['fd'] ?></td>
					<td align="center" class="blackText9px">&nbsp;</td>
					<td align="center" class="blackText9px"><?= $player['lan'] == 0 ? '-' : $player['lan'] ?></td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= $player['ld'] == 0 ? '-' : $player['ld'] ?></td> <?php } ?>
					<td align="center" class="blackText9px">&nbsp;</td>
					<td align="center" class="blackText9px"><?= $player['b'] == 0 ? '-' : $player['b'] ?></td>
					<td align="center" class="blackText9px"><?= $player['a'] == 0 ? '-' : $player['a'] ?></td>
					<td align="center" class="blackText9px"><?= $player['pts'] == 0 ? '-' : $player['pts'] ?></td>
					<td align="center" class="blackText9px"><?= $player['pem'] == 0 ? '-' : $player['pem'] ?></td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= $player['lcf'] == 0 ? '-' : $player['bcf'].'/'.$player['lcf']; $teamVis['gblcf'] += $player['lcf']; $teamVis['gbbcf'] += $player['bcf'] ?></td> <?php } ?>
					<td align="center" class="blackText9px"><?= $player['decision'] ?></td>
				</tr>
				
				<?php
				}
				?>
				
				<tr class="darkblueRow">
					<td colspan="3" align="center" class="whiteText9px">Total</td>
					<td align="center" class="blackText9px">&nbsp;</td>
					<td align="center" class="orangeText9px"><?= numtotime_asmin(timetonum($teamVis[min])) ?></td>
					<td align="center" class="orangeText9px">&nbsp;</td>
					<td colspan="2" align="center" class="orangeText9px"><?= (($teamVis['bc'] + $teamVis['fd']) == 0 ? '-' : ($teamVis['bc'] + $teamVis['fd']))." / ".($teamVis['fd'] == 0 ? '-' : $teamVis['fd']) ?></td>
					<td align="center" class="orangeText9px">&nbsp;</td>
					<td align="center" class="orangeText9px"><?= $teamVis['gblan'] == 0 ? '-' : $teamVis['gblan'] ?></td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="orangeText9px"><?= $teamVis['gbld'] == 0 ? '-' : $teamVis['gbld'] ?></td> <?php } ?>
					<td align="center" class="orangeText9px">&nbsp;</td>
					<td align="center" class="orangeText9px"><?= $teamVis['gbb'] == 0 ? '-' : $teamVis['gbb'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamVis['gba'] == 0 ? '-' : $teamVis['gba'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamVis['gbpts'] == 0 ? '-' : $teamVis['gbpts'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamVis['gbpem'] == 0 ? '-' : $teamVis['gbpem'] ?></td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="orangeText9px"><?= $teamVis['gblcf'] == 0 ? '-' : $teamVis['gbbcf'].'/'.$teamVis['gblcf'] ?></td> <?php } ?>
					<td align="center" class="blackText9px">&nbsp;</td>
				</tr>
			</table>
			<!-- GARDIENS 1 -->
			
			<p class="blackText10px"><b>PERSONNEL DE L'&Eacute;QUIPE</b></p>
			
			<?php
			foreach($pers_vis as $personnel) {
				echo '<span class="blackText10px"><b>'.$personnel['tpers_desc'].' : </b><a href="index.php?page=2147483648&id_register='.$personnel[id_register].'" class="lnkBase9px">'.$personnel[prenom].' '.$personnel[nom].'</a></span><br />';
			}
			?>
			
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td valign="top"> 
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="5" background="../../../images/onglets/onglets-TL.gif" class="blackText12px"><img src="../../../images/spacer.gif" width="10" height="4"></td>
					<td background="../../../images/onglets/onglets-T.gif" class="blackText12px"><img src="../../../images/spacer.gif" width="10" height="4"></td>
					<td width="5" background="../../../images/onglets/onglets-TR.gif" class="blackText12px"><img src="../../../images/spacer.gif" width="10" height="4"></td>
				</tr>
				<tr>
					<td background="../../../images/onglets/onglets-L.gif" class="blackText12px"><img src="../../../images/spacer.gif" width="10" height="5"></td>
					<td class="blackText12px"><?= $equipe_dom[$idDom]['hist_name'] ?> de <?= $equipe_dom[$idDom]['hist_city'] ?></td>
					<td background="../../../images/onglets/onglets-R.gif" class="blackText12px"><img src="../../../images/spacer.gif" width="10" height="5"></td>
				</tr>
			</table>
			
			<!-- EQUIPE 2 -->
			<table border="0" cellspacing="0" cellpadding="3" class="outlinetab">
				<tr class="darkblueRow"> 
					<td align="center" class="whiteText10px">Pos</td>
					<td align="center" class="whiteText10px">No</td>
					<td class="whiteText10px">Nom</td>
					<td width="10" align="center" class="whiteText10px">&nbsp;</td>
					<td align="center" class="whiteText10px">B</td>
					<td align="center" class="whiteText10px">A</td>
					<td align="center" class="whiteText10px">Pts</td>
					<td align="center" class="whiteText10px">Pem</td>
					<td align="center" class="whiteText10px">+/-</td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="whiteText10px">Lan</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="whiteText10px">Ld</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="whiteText10px">Mj</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="whiteText10px">Mjg</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="whiteText10px">Mjp</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="whiteText10px">Mecd</td> <?php } ?>
					<td align="center" class="whiteText10px">Ban</td>
					<td align="center" class="whiteText10px">Bdn</td>
					<td align="center" class="whiteText10px">Bfd</td>
					<td align="center" class="whiteText10px">Blp</td>
					<td align="center" class="whiteText10px">Lp</td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="whiteText10px">Bf/Lf</td> <?php } ?>
				</tr>
				
				<?php
				while($player = mysql_fetch_assoc($playerAlignDom)) {
					//Color change
					if ($rowClass == "list1Reg") {
						$rowClass = "list2Reg";
					} else {
						$rowClass = "list1Reg";
					}
					
					if ($player[cap_ass] == 1) { $sPCapAss = ' (C)'; }
					else if ($player[cap_ass] == 2) { $sPCapAss = ' (A)'; }
					else { $sPCapAss = ''; }
				?>
				
				<tr class="<?= $rowClass ?>">
					<td align="center" class="blackText9px"><?= $player['description_fr'] ?></td>
					<td align="center" class="blackText9px"><?= $player['numero'] ?></td>
					<td nowrap class="blackText9px"><a href="index.php?page=2147483647&id_register=<?= $player[id_register] ?>" class="lnkBase9px"><?= $player[nom].", ".$player[prenom].'</a>'.$sPCapAss ?></td>
					<td align="center" class="blackText9px">&nbsp;</td>
					<td align="center" class="blackText9px"><?= $player['b'] == 0 ? '-' : $player['b'] ?></td>
					<td align="center" class="blackText9px"><?= $player['a'] == 0 ? '-' : $player['a'] ?></td>
					<td align="center" class="blackText9px"><?= $player['pts'] == 0 ? '-' : $player['pts'] ?></td>
					<td align="center" class="blackText9px"><?= $player['pem'] == 0 ? '-' : $player['pem'] ?></td>
					<td align="center" class="blackText9px"><?= $player['pm'] == 0 ? '-' : $player['pm'] ?></td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= $player['lan'] == 0 ? '-' : $player['lan'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= $player['ld'] == 0 ? '-' : $player['ld'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= $player['mj'] == 0 ? '-' : $player['mj'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= $player['mjg'] == 0 ? '-' : $player['mjg'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= $player['mjp'] == 0 ? '-' : $player['mjp'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= $player['mecd'] == 0 ? '-' : $player['mecd']; $equipe_dom_add_to['mecd'] += $player['mecd'] ?></td> <?php } ?>
					<td align="center" class="blackText9px"><?= $player['ban'] == 0 ? '-' : $player['ban'] ?></td>
					<td align="center" class="blackText9px"><?= $player['bdn'] == 0 ? '-' : $player['bdn'] ?></td>
					<td align="center" class="blackText9px"><?= $player['bfd'] == 0 ? '-' : $player['bfd'] ?></td>
					<td align="center" class="blackText9px"><?= $player['blp'] == 0 ? '-' : $player['blp'] ?></td>
					<td align="center" class="blackText9px"><?= $player['lp'] == 0 ? '-' : $player['lp'] ?></td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= $player['lf'] == 0 ? '-' : $player['bf'].'/'.$player['lf'] ?></td> <?php } ?>
				</tr>
				
				<?php
				}
				
				if ($rowClass == "list1Reg") {
					$rowClass = "list2Reg";
				} else {
					$rowClass = "list1Reg";
				}
				?>
				
				<tr class="<?= $rowClass ?>">
					<td align="center" class="blackText9px">-</td>
					<td align="center" class="blackText9px">-</td>
					<td nowrap class="blackText9px">Banc (&Eacute;quipe)</td>
					<td align="center" class="blackText9px">&nbsp;</td>
					<td align="center" class="blackText9px">-</td>
					<td align="center" class="blackText9px">-</td>
					<td align="center" class="blackText9px">-</td>
					<td align="center" class="blackText9px"><?= $teamDom['benchpem'] == 0 ? '-' : $teamDom['benchpem'] ?></td>
					<td align="center" class="blackText9px">-</td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px">-</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px">-</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px">-</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px">-</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px">-</td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= ($teamDom['mecd'] - $equipe_dom_add_to['mecd']) == 0 ? '-' : ($teamDom['mecd'] - $equipe_dom_add_to['mecd']) ?></td> <?php } ?>
					<td align="center" class="blackText9px">-</td>
					<td align="center" class="blackText9px">-</td>
					<td align="center" class="blackText9px">-</td>
					<td align="center" class="blackText9px">-</td>
					<td align="center" class="blackText9px">-</td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px">-</td> <?php } ?>
				</tr>
				<tr class="darkblueRow">
					<td colspan="3" align="center" class="whiteText9px">Total</td>
					<td align="center" class="blackText9px">&nbsp;</td>
					<td align="center" class="orangeText9px"><?= $teamDom['b'] == 0 ? '-' : $teamDom['b'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamDom['a'] == 0 ? '-' : $teamDom['a'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamDom['pts'] == 0 ? '-' : $teamDom['pts'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamDom['pem'] == 0 ? '-' : $teamDom['pem'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamDom['pm'] == 0 ? '-' : $teamDom['pm'] ?></td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="orangeText9px"><?= $teamDom['lan'] == 0 ? '-' : $teamDom['lan'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="orangeText9px"><?= $teamDom['ld'] == 0 ? '-' : $teamDom['ld'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="orangeText9px"><?= $teamDom['mj'] == 0 ? '-' : $teamDom['mj'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="orangeText9px"><?= $teamDom['mjg'] == 0 ? '-' : $teamDom['mjg'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="orangeText9px"><?= $teamDom['mjp'] == 0 ? '-' : $teamDom['mjp'] ?></td> <?php } ?>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="orangeText9px"><?= $teamDom['mecd'] == 0 ? '-' : $teamDom['mecd'] ?></td> <?php } ?>
					<td align="center" class="orangeText9px"><?= $teamDom['ban'] == 0 ? '-' : $teamDom['ban'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamDom['bdn'] == 0 ? '-' : $teamDom['bdn'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamDom['bfd'] == 0 ? '-' : $teamDom['bfd'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamDom['blp'] == 0 ? '-' : $teamDom['blp'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamDom['lp'] == 0 ? '-' : $teamDom['lp'] ?></td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="orangeText9px"><?= $teamDom['lf'] == 0 ? '-' : $teamDom['bf'].'/'.$teamDom['lf'] ?></td> <?php } ?>
				</tr>
			</table>
			<!-- EQUIPE 2 -->
			
			<br />
			
			<!-- GARDIENS 2 -->
			<table border="0" cellspacing="0" cellpadding="3" class="outlinetab">
				<tr class="darkblueRow"> 
					<td align="center" class="whiteText10px">Pos</td>
					<td align="center" class="whiteText10px">No</td>
					<td class="whiteText10px">Nom</td>
					<td width="10" align="center" class="whiteText10px">&nbsp;</td>
					<td align="center" class="whiteText10px">Min</td>
					<td width="10" align="center" class="whiteText10px">&nbsp;</td>
					<td align="center" class="whiteText10px">Bc</td>
					<td align="center" class="whiteText10px">Fd</td>
					<td width="10" align="center" class="whiteText10px">&nbsp;</td>
					<td align="center" class="whiteText10px">Lan</td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="whiteText10px">Ld</td> <?php } ?>
					<td width="10" align="center" class="whiteText10px">&nbsp;</td>
					<td align="center" class="whiteText10px">B</td>
					<td align="center" class="whiteText10px">A</td>
					<td align="center" class="whiteText10px">Pts</td>
					<td align="center" class="whiteText10px">Pem</td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="whiteText10px">Bcf/Lcf</td> <?php } ?>
					<td align="center" class="whiteText10px">D&eacute;cision</td>
				</tr>
				
				<?php
				$iBcDomTotal = 0;
				$iLdDomTotal = 0;
				$iLanDomTotal = 0;
				
				while ($player = mysql_fetch_assoc($gbAlignDom)) {
					//Color change
					if ($rowClass == "list1Reg") {
						$rowClass = "list2Reg";
					} else {
						$rowClass = "list1Reg";
					}
					
					//Get the player for this player
					$sql = "SELECT * FROM parties_joueurs WHERE id_partie_joueur = ".$player[id_partie_joueur];
					$player = mysql_fetch_assoc(mysql_query($sql, $mysql_link));
					
					if ($player[cap_ass] == 1) { $sPCapAss = ' (C)'; }
					else if ($player[cap_ass] == 2) { $sPCapAss = ' (A)'; }
					else { $sPCapAss = ''; }
					
					if ($bResultLancersPeriod) {
						$iThisId = $player[id_partie_joueur].'_'.$player[id_equipe].'_'.$player[numero];
						
						$player['bc'] = $details[$iThisId]['bc'];
						$player['ld'] = $details[$iThisId]['fd'];
						$player['lan'] = $details[$iThisId]['lan'];
						
						$iBcDomTotal  += $details[$iThisId]['bc'];
						$iLdDomTotal  += $details[$iThisId]['fd'];
						$iLanDomTotal += $details[$iThisId]['lan'];
						
						$teamDom['bc'] = $iBcDomTotal;
						$teamDom['fd'] = $iLdDomTotal;
						$teamDom['gblan'] = $iLanDomTotal;
					}
				?>
				
				<tr class="<?= $rowClass ?>">
					<td align="center" class="blackText9px"><?= $player['description_fr'] ?></td>
					<td align="center" class="blackText9px"><?= $player['numero'] ?></td>
					<td nowrap class="blackText9px"><a href="index.php?page=2147483647&id_register=<?= $player[id_register] ?>" class="lnkBase9px"><?= $player[nom].", ".$player[prenom].'</a>'.$sPCapAss ?></td>
					<td align="center" class="blackText9px">&nbsp;</td>
					<td align="center" class="blackText9px"><?= numtotime_asmin(timetonum($player[min])) ?></td>
					<td align="center" class="blackText9px">&nbsp;</td>
					<td align="center" class="blackText9px"><?= $player['bc'] == 0 ? '-' : $player['bc'] ?></td>
					<td align="center" class="blackText9px"><?= $player['fd'] == 0 ? '-' : $player['fd'] ?></td>
					<td align="center" class="blackText9px">&nbsp;</td>
					<td align="center" class="blackText9px"><?= $player['lan'] == 0 ? '-' : $player['lan'] ?></td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= $player['ld'] == 0 ? '-' : $player['ld'] ?></td> <?php } ?>
					<td align="center" class="blackText9px">&nbsp;</td>
					<td align="center" class="blackText9px"><?= $player['b'] == 0 ? '-' : $player['b'] ?></td>
					<td align="center" class="blackText9px"><?= $player['a'] == 0 ? '-' : $player['a'] ?></td>
					<td align="center" class="blackText9px"><?= $player['pts'] == 0 ? '-' : $player['pts'] ?></td>
					<td align="center" class="blackText9px"><?= $player['pem'] == 0 ? '-' : $player['pem'] ?></td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="blackText9px"><?= $player['lcf'] == 0 ? '-' : $player['bcf'].'/'.$player['lcf']; $teamDom['gblcf'] += $player['lcf']; $teamDom['gbbcf'] += $player['bcf'] ?></td> <?php } ?>
					<td align="center" class="blackText9px"><?= $player['decision'] ?></td>
				</tr>
				
				<?php
				}
				?>
				
				<tr class="darkblueRow">
					<td colspan="3" align="center" class="whiteText9px">Total</td>
					<td align="center" class="blackText9px">&nbsp;</td>
					<td align="center" class="orangeText9px"><?= numtotime_asmin(timetonum($teamDom[min])) ?></td>
					<td align="center" class="orangeText9px">&nbsp;</td>
					<td colspan="2" align="center" class="orangeText9px"><?= (($teamDom['bc'] + $teamDom['fd']) == 0 ? '-' : ($teamDom['bc'] + $teamDom['fd']))." / ".($teamDom['fd'] == 0 ? '-' : $teamDom['fd']) ?></td>
					<td align="center" class="orangeText9px">&nbsp;</td>
					<td align="center" class="orangeText9px"><?= $teamDom['gblan'] == 0 ? '-' : $teamDom['gblan'] ?></td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="orangeText9px"><?= $teamDom['gbld'] == 0 ? '-' : $teamDom['gbld'] ?></td> <?php } ?>
					<td align="center" class="orangeText9px">&nbsp;</td>
					<td align="center" class="orangeText9px"><?= $teamDom['gbb'] == 0 ? '-' : $teamDom['gbb'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamDom['gba'] == 0 ? '-' : $teamDom['gba'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamDom['gbpts'] == 0 ? '-' : $teamDom['gbpts'] ?></td>
					<td align="center" class="orangeText9px"><?= $teamDom['gbpem'] == 0 ? '-' : $teamDom['gbpem'] ?></td>
					<?php if ( ! $bResultLancersPeriod) { ?> <td align="center" class="orangeText9px"><?= $teamDom['gblcf'] == 0 ? '-' : $teamDom['gbbcf'].'/'.$teamDom['gblcf'] ?></td> <?php } ?>
					<td align="center" class="blackText9px">&nbsp;</td>
				</tr>
			</table>
			<!-- GARDIENS 2 -->
			
			<p class="blackText10px"><b>PERSONNEL DE L'&Eacute;QUIPE</b></p>
			
			<?php
			foreach($pers_dom as $personnel) {
				echo '<span class="blackText10px"><b>'.$personnel['tpers_desc'].' : </b><a href="index.php?page=2147483648&id_register='.$personnel[id_register].'" class="lnkBase9px">'.$personnel[prenom].' '.$personnel[nom].'</a></span><br />';
			}
			?>
			
		</td>
	</tr>
</table>