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



Your IP : 18.217.89.130


Current Path : /var/www/lhjmq-records.qc.ca/public_html/lang_en/honors/
Upload File :
Current File : /var/www/lhjmq-records.qc.ca/public_html/lang_en/honors/playerofmonth.php

<?php

// Constants
$monthNames[1] = "January";
$monthNames[2] = "February";
$monthNames[3] = "March";
$monthNames[4] = "April";
$monthNames[5] = "May";
$monthNames[6] = "June";
$monthNames[7] = "July";
$monthNames[8] = "August";
$monthNames[9] = "September";
$monthNames[10] = "October";
$monthNames[11] = "November";
$monthNames[12] = "December";

// Get the season
$current_season = season_get_current_regular($mysql_link);

// Tweak of current season
$sCur_season = $current_season['date_start'];
$sCur_season[8] = 0;
$sCur_season[9] = 1;

// First get the latest date from today then get the honnors on that date
$nearest_date = mysql_fetch_assoc(mysql_query($sql = 'SELECT honnor_date FROM honnors_monthly WHERE honnor_date >= "'.$sCur_season.'" AND honnor_date <= "'.date('Y-m-d').'" GROUP BY honnor_date ORDER BY honnor_date DESC', $mysql_link));
$res = mysql_query($sql = 'SELECT * FROM honnors_monthly AS hm LEFT JOIN register_histo AS rh ON rh.id = hm.id_register_histo LEFT JOIN register AS r ON r.id = rh.id_register WHERE honnor_date = "'.$nearest_date['honnor_date'].'" ORDER BY honnor_type', $mysql_link);

// Setup the base data (No base data, we just don't show it if it doesn't exist)
$honnors = array(
	1 => array(
		'honnor_data' => NULL,
		'team_data' => NULL
	),
	2 => array(
		'honnor_data' => NULL,
		'team_data' => NULL
	),
	3 => array(
		'honnor_data' => NULL,
		'team_data' => NULL
	)
);

// Prepare the data
while ($row = mysql_fetch_assoc($res)) {
	$teamdata = team_get_data($mysql_link, $row['histo_directdata'], $row['honnor_date']);
	$photos = @mysql_fetch_assoc(@mysql_query($sql = 'SELECT rp.id AS photoid, rp.pic_large, rp.pic_small FROM register_photos AS rp, secur_usagersgroupes AS sug1, secur_usagersgroupes AS sug2  WHERE sys_date <= "'.date('Y-m-d').'" AND id_register = '.$row['id_register'].' AND rp.sys_scope <= '.SCOPE_PUBLIC.' AND rp.sys_status = '.STATUS_ACTIVE.' GROUP BY photoid ORDER BY rp.sys_status DESC, rp.sys_date DESC, rp.id DESC', $mysql_link));
	$honnors[$row['honnor_type']] = array(
		'honnor_data' => $row,
		'team_data' => $teamdata[$row['histo_directdata']],
		'photos' => $photos
	);
}

// PORTION DU BAS
// Get all the seasons
$seasons = season_list($mysql_link, SEASON_TYPE_REG, 'DESC');

if (!isset($seasons[$_GET['id_saison']])) {
	if (isset($seasons['currentseason'])) {
		$_GET['id_saison'] = $seasons['currentseason']['id'];
	} else {
		$keys = array_keys($seasons);
		$_GET['id_saison'] = $keys[0];
	}
}

//Get all the matching seasons items
$res = mysql_query($sql = 'SELECT hm.honnor_date, hm.honnor_type, hm.comm_link_fr AS comm_link, rh.histo_directdata, r.info_lname, r.info_fname, r.id AS id_register FROM honnors_monthly AS hm LEFT JOIN register_histo AS rh ON rh.id = hm.id_register_histo LEFT JOIN register AS r ON r.id = rh.id_register WHERE honnor_date >= "'.substr($seasons[$_GET['id_saison']]['date_start'],0,7).'-01 00:00:00" AND honnor_date <= "'.substr($seasons[$_GET['id_saison']]['date_end'], 0,7).'-01 23:59:59" ORDER BY honnor_date DESC, honnor_type ASC', $mysql_link);

//Prepare the data
while ($row = mysql_fetch_assoc($res)) {
	$teamdata = team_get_data($mysql_link, $row['histo_directdata'], $row['honnor_date']);
	$season_honnors[$row['honnor_date']][$row['honnor_type']] = array(
		'honnor_data' => $row,
		'team_data' => $teamdata[$row['histo_directdata']]
	);
}

?>

<script type="text/javascript">
var gwhl_videoPreview = null;

function video_preview(video_path) {
	if (gwhl_videoPreview != null && gwhl_videoPreview.closed == false) {
		gwhl_videoPreview.close();
	}
	gwhl_videoPreview = window.open('/video/video_preview_en.php?video_path=' + video_path, 'video_preview', 'width=340, height=330, top=50, left=50, scrollbars=no, menu=no');
}
</script>

<table width="631" border="0" cellspacing="0" cellpadding="5">
	<tr>
		<td>
			<table width="621" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td height="3"><img src="../../images/honors/imaequipe-doublelignetop.gif" height="3" width="621"></td>
				</tr>
				<tr>
					<td height="16" align="left" valign="top">
						<!--##### NAVIGATION SECTION  ##### -->
						<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="30">&nbsp;</td>
								<td><a href="index.php?page=6523454" onFocus="if (this.blur)this.blur()"><img src="images/honors/buthonors-jdesemaine_normal.gif" border="0"></a></td>
								<td><a href="index.php?page=3567821" onFocus="if (this.blur)this.blur()"><img src="images/honors/buthonors-jdumois_active.gif" border="0"></a></td>
								<?php if ($honnors[1]['honnor_data'] != NULL || $honnors[2]['honnor_data'] != NULL || $honnors[3]['honnor_data'] != NULL) { ?>
								<td width="300" align="center"><span class="blackText12px"><b>Players of the month, <?php echo $monthNames[(int)substr($nearest_date['honnor_date'], 5, 2)].' '.substr($nearest_date['honnor_date'], 0, 4); ?></b></span></td>
								<?php } ?>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			<table width="621" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td valign="top"><br />
						
						<?php if ($honnors[1]['honnor_data'] != NULL) { ?>
						<table width="100%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td valign="top" background="../../images/spacer.gif" align="right" width="180">
									<table border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="121"><img src="../../images/honors/imahonors-hautlinktable.gif" width="121" height="13"></td>
											<td rowspan="3" width="20">&nbsp;</td>
										</tr>
										<tr>
											<td bgcolor="#FFFFFF" valign="top">
												<!--##### TAB LINKS ##### -->
												<table width="121" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td width="1" bgcolor="#A6ACBF"><img src="../../images/spacer.gif" width="1" height="1"></td>
														<td width="119" valign="top" align="center"><a href="index.php?page=2147483647&id_register=<?= $honnors[1]['honnor_data']['id_register'] ?>">
															<?php if ($honnors[1]['photos']['pic_large'] == '') { ?>
															<img src="images/personnels/photo_nd.jpg" width="95" height="141" border="0">
															<?php } else { ?>
															<img src="<?= $honnors[1]['photos']['pic_large']; ?>" border="0">
															<?php } ?>
															</a></td>
														<td width="1" bgcolor="#A6ACBF"><img src="../../images/spacer.gif" width="1" height="1"></td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td><img src="../../images/honors/imahonors-baslinktable.gif" width="121" height="18"></td>
										</tr>
									</table>
								</td>
								<td valign="top" background="../../images/spacer.gif">
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td valign="top">
												<table width="100%" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td><strong>Offensive player of the month</strong></td>
													</tr>
													<tr>
														<td height="15"></td>
													</tr>
													<tr>
														<td><a href="index.php?page=2147483647&id_register=<?= $honnors[1]['honnor_data']['id_register'] ?>" class="lnkBase16px"><strong><?= $honnors[1]['honnor_data']['info_fname'] . " " . $honnors[1]['honnor_data']['info_lname']; ?></strong></a></td>
													</tr>
													<tr>
														<td><span class="blackText12px"><?= $honnors[1]['team_data']['hist_city'] ?></span></td>
													</tr>
												</table>
											</td>
											<td width="20" valign="top">&nbsp;</td>
											<td valign="top" align="right">
												<?php
												if ($honnors[1][honnor_data][commandite_url_en] != '') {
													echo '<a href="'.$honnors[1][honnor_data][commandite_url_en].'">';
												}
												
												if ($honnors[1][honnor_data][commandite_big] != '') {
													echo '<img src="'.$honnors[1][honnor_data][commandite_big].'" border="0" style="margin-bottom: 5px" />';
												}
												
												if ($honnors[1][honnor_data][commandite_url_en] != '') {
													echo '</a>';
												}
												?>
											</td>
										</tr>
										<tr>
											<td colspan="3" height="10"></td>
										</tr>
										
										<?php
										print_video_part(1);
										?>
										
										<tr>
											<td colspan="3" height="10"></td>
										</tr>
									</table>
									
									<?php if ($honnors[1]['honnor_data']['stats_type'] == 1) { ?>
									<table border="0" cellspacing="0" cellpadding="3" class="outlinetab" width="250">
										<tr class="darkblueRow">
											<td class="whiteText12px" align="center">GP</td>
											<td class="whiteText12px" align="center">G</td>
											<td class="whiteText12px" align="center">A</td>
											<td class="whiteText12px" align="center">Pts</td>
											<td class="whiteText12px" align="center">PiM</td>
											<td class="whiteText12px" align="center">PPG</td>
											<td class="whiteText12px" align="center">SHG</td>
											<td class="whiteText12px" align="center">+/-</td>
											<td class="whiteText12px" align="center">WG</td>
										</tr>
										<tr>
											<td class="blackText9px" align="center"><?= $honnors[1]['honnor_data']['stats_pj']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[1]['honnor_data']['stats_b']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[1]['honnor_data']['stats_a']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[1]['honnor_data']['stats_pts']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[1]['honnor_data']['stats_pem']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[1]['honnor_data']['stats_ban']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[1]['honnor_data']['stats_bdn']; ?></td>
											<td class="blackText9px" align="center"><?php if ($honnors[1]['honnor_data']['stats_pm'] > 0) { echo "+"; } echo $honnors[1]['honnor_data']['stats_pm']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[1]['honnor_data']['stats_bg']; ?></td>
										</tr>
									</table>
									
									<?php } else { ?>
									
									<table border="0" cellspacing="0" cellpadding="3" class="outlinetab" width="350">
										<tr class="darkblueRow">
											<td class="whiteText12px" align="center">GP</td>
											<td class="whiteText12px" align="center">Min</td>
											<td class="whiteText12px" align="center">GA</td>
											<td class="whiteText12px" align="center">SH</td>
											<td class="whiteText12px" align="center">W</td>
											<td class="whiteText12px" align="center">L</td>
											<td class="whiteText12px" align="center">T</td>
											<td class="whiteText12px" align="center">GAA</td>
											<td class="whiteText12px" align="center">Shots</td>
											<td class="whiteText12px" align="center">Sav%</td>
										</tr>
										<tr>
											<td class="blackText9px" align="center"><?= $honnors[1]['honnor_data']['stats_pj']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[1]['honnor_data']['stats_temps']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[1]['honnor_data']['stats_bc']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[1]['honnor_data']['stats_bl']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[1]['honnor_data']['stats_v']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[1]['honnor_data']['stats_d']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[1]['honnor_data']['stats_n']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[1]['honnor_data']['stats_moy']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[1]['honnor_data']['stats_lab']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[1]['honnor_data']['stats_eff']; ?></td>
										</tr>
									</table>
									<?php } ?>
									
								</td>
							</tr>
						</table>
						
						<?php } else { ?>
						
						<table border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td valign="top" background="../../images/spacer.gif" align="right" width="180">
									<table border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="121"><img src="../../images/honors/imahonors-hautlinktable.gif" width="121" height="13"></td>
											<td rowspan="3" width="20">&nbsp;</td>
										</tr>
										<tr>
											<td bgcolor="#FFFFFF" valign="top">
												<!--##### TAB LINKS ##### -->
												<table width="121" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td width="1" bgcolor="#A6ACBF"><img src="../../images/spacer.gif" width="1" height="1"></td>
														<td width="119" valign="top" align="center"> <img src="images/personnels/photo_nd.jpg" width="95" height="141" border="0"> </td>
														<td width="1" bgcolor="#A6ACBF"><img src="../../images/spacer.gif" width="1" height="1"></td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td><img src="../../images/honors/imahonors-baslinktable.gif" width="121" height="18"></td>
										</tr>
									</table>
								</td>
								<td valign="top" background="../../images/spacer.gif">
									<p><span class="blackText16px"><strong>Offensive player of the month</strong></span></p>
									<p><span class="blackText12px">No data available for now</span></p>
								</td>
							</tr>
						</table>
						<?php } ?>
						
						<br />
						
						<?php if ($honnors[2]['honnor_data'] != NULL) { ?>
						<table width="100%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td valign="top" background="../../images/spacer.gif" align="right" width="180">
									<table border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="121"><img src="../../images/honors/imahonors-hautlinktable.gif" width="121" height="13"></td>
											<td rowspan="3" width="20">&nbsp;</td>
										</tr>
										<tr>
											<td bgcolor="#FFFFFF" valign="top">
												<!--##### TAB LINKS ##### -->
												<table width="121" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td width="1" bgcolor="#A6ACBF"><img src="../../images/spacer.gif" width="1" height="1"></td>
														<td width="119" valign="top" align="center"><a href="index.php?page=2147483647&id_register=<?= $honnors[2]['honnor_data']['id_register'] ?>">
															<?php if ($honnors[2]['photos']['pic_large'] == '') { ?>
															<img src="images/personnels/photo_nd.jpg" width="95" height="141" border="0">
															<?php } else { ?>
															<img src="<?= $honnors[2]['photos']['pic_large']; ?>" border="0">
															<?php } ?>
															</a></td>
														<td width="1" bgcolor="#A6ACBF"><img src="../../images/spacer.gif" width="1" height="1"></td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td><img src="../../images/honors/imahonors-baslinktable.gif" width="121" height="18"></td>
										</tr>
									</table>
								</td>
								<td valign="top" background="../../images/spacer.gif">
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td valign="top">
												<table width="100%" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td><strong>Defensive player of the month</strong></td>
													</tr>
													<tr>
														<td height="15"></td>
													</tr>
													<tr>
														<td><a href="index.php?page=2147483647&id_register=<?= $honnors[2]['honnor_data']['id_register'] ?>" class="lnkBase16px"><strong><?= $honnors[2]['honnor_data']['info_fname'] . " " . $honnors[2]['honnor_data']['info_lname']; ?></strong></a></td>
													</tr>
													<tr>
														<td><span class="blackText12px"><?= $honnors[2]['team_data']['hist_city'] ?></span></td>
													</tr>
												</table>
											</td>
											<td width="20" valign="top">&nbsp;</td>
											<td valign="top" align="right">
												<?php
												if ($honnors[2][honnor_data][commandite_url_en] != '') {
													echo '<a href="'.$honnors[2][honnor_data][commandite_url_en].'">';
												}
												
												if ($honnors[2][honnor_data][commandite_big] != '') {
													echo '<img src="'.$honnors[2][honnor_data][commandite_big].'" border="0" style="margin-bottom: 5px" />';
												}
												
												if ($honnors[2][honnor_data][commandite_url_en] != '') {
													echo '</a>';
												}
												?>
											</td>
										</tr>
										<tr>
											<td colspan="3" height="10"></td>
										</tr>
										
										<?php
										print_video_part(2);
										?>
										
										<tr>
											<td colspan="3" height="10"></td>
										</tr>
									</table>
									
									<?php if ($honnors[2]['honnor_data']['stats_type'] == 1) { ?>
									<table border="0" cellspacing="0" cellpadding="3" class="outlinetab" width="250">
										<tr class="darkblueRow">
											<td class="whiteText12px" align="center">GP</td>
											<td class="whiteText12px" align="center">G</td>
											<td class="whiteText12px" align="center">A</td>
											<td class="whiteText12px" align="center">Pts</td>
											<td class="whiteText12px" align="center">PiM</td>
											<td class="whiteText12px" align="center">PPG</td>
											<td class="whiteText12px" align="center">SHG</td>
											<td class="whiteText12px" align="center">+/-</td>
											<td class="whiteText12px" align="center">WG</td>
										</tr>
										<tr>
											<td class="blackText9px" align="center"><?= $honnors[2]['honnor_data']['stats_pj']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[2]['honnor_data']['stats_b']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[2]['honnor_data']['stats_a']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[2]['honnor_data']['stats_pts']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[2]['honnor_data']['stats_pem']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[2]['honnor_data']['stats_ban']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[2]['honnor_data']['stats_bdn']; ?></td>
											<td class="blackText9px" align="center"><?php if ($honnors[2]['honnor_data']['stats_pm'] > 0) { echo "+"; } echo $honnors[2]['honnor_data']['stats_pm']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[2]['honnor_data']['stats_bg']; ?></td>
										</tr>
									</table>
									
									<?php } else { ?>
									
									<table border="0" cellspacing="0" cellpadding="3" class="outlinetab" width="350">
										<tr class="darkblueRow">
											<td class="whiteText12px" align="center">GP</td>
											<td class="whiteText12px" align="center">Min</td>
											<td class="whiteText12px" align="center">GA</td>
											<td class="whiteText12px" align="center">SH</td>
											<td class="whiteText12px" align="center">W</td>
											<td class="whiteText12px" align="center">L</td>
											<td class="whiteText12px" align="center">T</td>
											<td class="whiteText12px" align="center">GAA</td>
											<td class="whiteText12px" align="center">Shots</td>
											<td class="whiteText12px" align="center">Sav%</td>
										</tr>
										<tr>
											<td class="blackText9px" align="center"><?= $honnors[2]['honnor_data']['stats_pj']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[2]['honnor_data']['stats_temps']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[2]['honnor_data']['stats_bc']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[2]['honnor_data']['stats_bl']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[2]['honnor_data']['stats_v']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[2]['honnor_data']['stats_d']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[2]['honnor_data']['stats_n']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[2]['honnor_data']['stats_moy']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[2]['honnor_data']['stats_lab']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[2]['honnor_data']['stats_eff']; ?></td>
										</tr>
									</table>
									<?php } ?>
									
								</td>
							</tr>
						</table>
						
						<?php } else { ?>
						
						<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td valign="top" background="../../images/spacer.gif" align="right" width="180">
									<table border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="121"><img src="../../images/honors/imahonors-hautlinktable.gif" width="121" height="13"></td>
											<td rowspan="3" width="20">&nbsp;</td>
										</tr>
										<tr>
											<td bgcolor="#FFFFFF" valign="top">
												<!--##### TAB LINKS ##### -->
												<table width="121" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td width="1" bgcolor="#A6ACBF"><img src="../../images/spacer.gif" width="1" height="1"></td>
														<td width="119" valign="top" align="center"> <img src="images/personnels/photo_nd.jpg" width="95" height="141" border="0"> </td>
														<td width="1" bgcolor="#A6ACBF"><img src="../../images/spacer.gif" width="1" height="1"></td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td><img src="../../images/honors/imahonors-baslinktable.gif" width="121" height="18"></td>
										</tr>
									</table>
								</td>
								<td valign="top" background="../../images/spacer.gif">
									<p><span class="blackText16px"><strong>Defensive player of the month</strong></span></p>
									<p><span class="blackText12px">No data available for now</span></p>
								</td>
							</tr>
						</table>
						<?php } ?>
						
						<br />
						
						<?php if ($honnors[3]['honnor_data'] != NULL) { ?>
						<table width="100%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td valign="top" background="../../images/spacer.gif" align="right" width="180">
									<table border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="121"><img src="../../images/honors/imahonors-hautlinktable.gif" width="121" height="13"></td>
											<td rowspan="3" width="20">&nbsp;</td>
										</tr>
										<tr>
											<td bgcolor="#FFFFFF" valign="top">
												<!--##### TAB LINKS ##### -->
												<table width="121" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td width="1" bgcolor="#A6ACBF"><img src="../../images/spacer.gif" width="1" height="1"></td>
														<td width="119" valign="top" align="center"><a href="index.php?page=2147483647&id_register=<?= $honnors[3]['honnor_data']['id_register'] ?>">
															<?php if ($honnors[3]['photos']['pic_large'] == '') { ?>
															<img src="images/personnels/photo_nd.jpg" width="95" height="141" border="0">
															<?php } else { ?>
															<img src="<?= $honnors[3]['photos']['pic_large']; ?>" border="0">
															<?php } ?>
															</a></td>
														<td width="1" bgcolor="#A6ACBF"><img src="../../images/spacer.gif" width="1" height="1"></td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td><img src="../../images/honors/imahonors-baslinktable.gif" width="121" height="18"></td>
										</tr>
									</table>
								</td>
								<td valign="top" background="../../images/spacer.gif">
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td valign="top">
												<table width="100%" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td><strong>Rookie of the month</strong></td>
													</tr>
													<tr>
														<td height="15"></td>
													</tr>
													<tr>
														<td><a href="index.php?page=2147483647&id_register=<?= $honnors[3]['honnor_data']['id_register'] ?>" class="lnkBase16px"><strong><?= $honnors[3]['honnor_data']['info_fname'] . " " . $honnors[3]['honnor_data']['info_lname']; ?></a></span></td>
													</tr>
													<tr>
														<td><span class="blackText12px"><?= $honnors[3]['team_data']['hist_city'] ?></span></td>
													</tr>
												</table>
											</td>
											<td width="20" valign="top">&nbsp;</td>
											<td valign="top" align="right">
												<?php
												if ($honnors[3][honnor_data][commandite_url_en] != '') {
													echo '<a href="'.$honnors[3][honnor_data][commandite_url_en].'">';
												}
												
												if ($honnors[3][honnor_data][commandite_big] != '') {
													echo '<img src="'.$honnors[3][honnor_data][commandite_big].'" border="0" style="margin-bottom: 5px" />';
												}
												
												if ($honnors[3][honnor_data][commandite_url_en] != '') {
													echo '</a>';
												}
												?>
											</td>
										</tr>
										<tr>
											<td colspan="3" height="10"></td>
										</tr>
										
										<?php
										print_video_part(3);
										?>
										
										<tr>
											<td colspan="3" height="10"></td>
										</tr>
									</table>
									
									<?php if ($honnors[3]['honnor_data']['stats_type'] == 1) { ?>
									<table border="0" cellspacing="0" cellpadding="3" class="outlinetab" width="250">
										<tr class="darkblueRow">
											<td class="whiteText12px" align="center">GP</td>
											<td class="whiteText12px" align="center">G</td>
											<td class="whiteText12px" align="center">A</td>
											<td class="whiteText12px" align="center">Pts</td>
											<td class="whiteText12px" align="center">PiM</td>
											<td class="whiteText12px" align="center">PPG</td>
											<td class="whiteText12px" align="center">SHG</td>
											<td class="whiteText12px" align="center">+/-</td>
											<td class="whiteText12px" align="center">WG</td>
										</tr>
										<tr>
											<td class="blackText9px" align="center"><?= $honnors[3]['honnor_data']['stats_pj']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[3]['honnor_data']['stats_b']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[3]['honnor_data']['stats_a']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[3]['honnor_data']['stats_pts']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[3]['honnor_data']['stats_pem']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[3]['honnor_data']['stats_ban']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[3]['honnor_data']['stats_bdn']; ?></td>
											<td class="blackText9px" align="center"><?php if ($honnors[3]['honnor_data']['stats_pm'] > 0) { echo "+"; } echo $honnors[3]['honnor_data']['stats_pm']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[3]['honnor_data']['stats_bg']; ?></td>
										</tr>
									</table>
									
									<?php } else { ?>
									
									<table border="0" cellspacing="0" cellpadding="3" class="outlinetab" width="350">
										<tr class="darkblueRow">
											<td class="whiteText12px" align="center">GP</td>
											<td class="whiteText12px" align="center">Min</td>
											<td class="whiteText12px" align="center">GA</td>
											<td class="whiteText12px" align="center">SH</td>
											<td class="whiteText12px" align="center">W</td>
											<td class="whiteText12px" align="center">L</td>
											<td class="whiteText12px" align="center">T</td>
											<td class="whiteText12px" align="center">GAA</td>
											<td class="whiteText12px" align="center">Shots</td>
											<td class="whiteText12px" align="center">Sav%</td>
										</tr>
										<tr>
											<td class="blackText9px" align="center"><?= $honnors[3]['honnor_data']['stats_pj']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[3]['honnor_data']['stats_temps']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[3]['honnor_data']['stats_bc']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[3]['honnor_data']['stats_bl']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[3]['honnor_data']['stats_v']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[3]['honnor_data']['stats_d']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[3]['honnor_data']['stats_n']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[3]['honnor_data']['stats_moy']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[3]['honnor_data']['stats_lab']; ?></td>
											<td class="blackText9px" align="center"><?= $honnors[3]['honnor_data']['stats_eff']; ?></td>
										</tr>
									</table>
									<?php } ?>
									
								</td>
							</tr>
						</table>
						
						<?php } else { ?>
						
						<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td valign="top" background="../../images/spacer.gif" align="right" width="180">
									<table border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="121"><img src="../../images/honors/imahonors-hautlinktable.gif" width="121" height="13"></td>
											<td rowspan="3" width="20">&nbsp;</td>
										</tr>
										<tr>
											<td bgcolor="#FFFFFF" valign="top">
												<!--##### TAB LINKS ##### -->
												<table width="121" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td width="1" bgcolor="#A6ACBF"><img src="../../images/spacer.gif" width="1" height="1"></td>
														<td width="119" valign="top" align="center"> <img src="images/personnels/photo_nd.jpg" width="95" height="141" border="0"> </td>
														<td width="1" bgcolor="#A6ACBF"><img src="../../images/spacer.gif" width="1" height="1"></td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td><img src="../../images/honors/imahonors-baslinktable.gif" width="121" height="18"></td>
										</tr>
									</table>
								</td>
								<td valign="top" background="../../images/spacer.gif">
									<p><span class="blackText16px"><strong>Rookie of the month</strong></span></p>
									<p><span class="blackText12px">No data available for now</span></p>
								</td>
							</tr>
						</table>
						<?php } ?>
					</td>
				</tr>
			</table>
			<br />
			<table width="621" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td class="blackText12px"><strong><a name="Others"></a>Other players of the month</strong></td>
				</tr>
				<tr>
					<td><img src="../../images/tabbar/tabligneshadow.gif" width="621" height="3"><br />
						<p align="left" class="blackText12px">Season:
							<select name="id_saison" id="id_saison" onChange="window.location = this.value">
								<?php foreach ($seasons as $season_key => $season) {
								if ($season_key != 'currentseason') { ?>
								<option value="?page=3567821&id_saison=<?= $season['id'] ?>"<?php if ($season['id'] == $_GET['id_saison']) { echo " selected"; } ?>><?= $season['desc_en'] ?></option>
								<?php } } ?>
							</select>
						</p>
						<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>
					</td>
				</tr>
			</table>
			<table border="0" cellspacing="0" cellpadding="3" width="621">
				<tr>
					<td align="center" class="blueText10px">&nbsp;</td>
					<td align="center" class="blueText10px">&nbsp;</td>
					<td width="25%" align="left" class="blueText10px"><img src="images/honors/imahonors-offensif.gif"></td>
					<td width="25%" align="left" class="blueText10px"><img src="images/honors/imahonors-defensif.gif"></td>
					<td width="25%" align="left" class="blueText10px"><img src="images/honors/imahonors-recrue.gif"></td>
				</tr>
				<tr>
					<td align="left" class="blueText10px"><strong>Release</strong></td>
					<td align="left" class="blueText10px"><b>Month</b></td>
					<td width="25%" align="left" class="blueText10px"><b>Name</b></td>
					<td width="25%" align="left" class="blueText10px"><b>Name</b></td>
					<td width="25%" align="left" class="blueText10px"><b>Name</b></td>
				</tr>
				<?php
				if (count($season_honnors)) {
				foreach ($season_honnors as $honnor_date => $monthly_honnors) {
				?>
				<tr>
						<td align="left" class="blackText9px">
						<?php
						if ($monthly_honnors[1]['honnor_data']['comm_link'] != "") {
							echo '<a href="'.$monthly_honnors[1]['honnor_data']['comm_link'].'" class="lnkBase9px">View</a>';
						} else {
							echo "Not Avail.";
						}
						?>
					</td>
					<td align="left" class="blackText9px"><?php echo $monthNames[(int)substr($honnor_date,5,2)]; ?></td>
					<td width="25%" align="left" nowrap class="blackText9px">
						<?php if ($monthly_honnors[1] != NULL) { ?>
						<a href="index.php?page=2147483647&id_register=<?= $monthly_honnors[1]['honnor_data']['id_register']; ?>" class="lnkBase9px"><?= $monthly_honnors[1]['honnor_data']['info_fname'] . " " . $monthly_honnors[1]['honnor_data']['info_lname'] . " (" . $monthly_honnors[1]['team_data']['hist_abbrev'] . ")"; ?></a>
						<?php } else { echo '-'; } ?>
					</td>
					<td width="25%" align="left" nowrap class="blackText9px">
						<?php if ($monthly_honnors[2] != NULL) { ?>
						<a href="index.php?page=2147483647&id_register=<?= $monthly_honnors[2]['honnor_data']['id_register']; ?>" class="lnkBase9px"><?= $monthly_honnors[2]['honnor_data']['info_fname'] . " " . $monthly_honnors[2]['honnor_data']['info_lname'] . " (" . $monthly_honnors[2]['team_data']['hist_abbrev'] . ")"; ?></a>
						<?php } else { echo '-'; } ?>
					</td>
					<td width="25%" align="left" nowrap class="blackText9px">
						<?php if ($monthly_honnors[3] != NULL) { ?>
						<a href="index.php?page=2147483647&id_register=<?= $monthly_honnors[3]['honnor_data']['id_register']; ?>" class="lnkBase9px"><?= $monthly_honnors[3]['honnor_data']['info_fname'] . " " . $monthly_honnors[3]['honnor_data']['info_lname'] . " (" . $monthly_honnors[3]['team_data']['hist_abbrev'] . ")"; ?></a>
						<?php } else { echo '-'; } ?>
					</td>
				</tr>
				<?php }
				} else {
				?>
				<tr align="center">
					<td colspan="5" class="blackText9px">No player of the month</td>
				</tr>
				<?php } ?>
			</table>
			<br />
			<table width="621" border="0" cellspacing="0" cellpadding="0" bgcolor="#A6ACBF">
				<tr>
					<td><img src="../images/spacer.gif" width="621" height="1"></td>
				</tr>
			</table>
		</td>
	</tr>
</table>

<?php

function print_video_part($i) {
	global $honnors;
	
	
	if ($honnors[$i][honnor_data][video_link] != '') {
		echo '
			<tr>
				<td colspan="3">
					<table cellpadding="0" cellspacing="0" border="0" width="350">
						<tr>
		';
		
		if ($honnors[$i][honnor_data][video_photo] != '') {
			echo '
				<td width="1" valign="top">
				<a href="javascript:;" onclick="video_preview(\''.$honnors[$i][honnor_data][video_link].'\')">
					<img src="'.$honnors[$i][honnor_data][video_photo].'" border="0" alt="" style="border: solid 1px #546085" />
				</a>
				</td>
				<td width="5"></td>
			';
		}
		
		echo '
							<td class="blackText11px" valign="middle">
								<a href="javascript:;" onclick="video_preview(\''.$honnors[$i][honnor_data][video_link].'\')">
								<img src="/images/misc/video_icon3.gif" border="0" alt="" /></a>
								<a href="javascript:;" onclick="video_preview(\''.$honnors[$i][honnor_data][video_link].'\')" class="lnkBase11px">
								'.$honnors[$i][honnor_data][video_comment_en].'</a>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		';
	}
}

?>