Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64
Your IP : 3.129.71.13
<?php
$str_url = $_SERVER["SCRIPT_NAME"];
$server_name = $_SERVER['SERVER_NAME'];
$xsl_record_call = '';
if($str_url)
$str_lang = strpos($str_url, 'lang_fr') ? 'fr' : 'en';
else
$str_lang = 'fr';
if(isset($_REQUEST['status_type']))
{
$status_type_path = 'status_' . $_REQUEST['status_type'] . '/';
}
else
{
$status_type_path = 'status_1/';
}
if (isset($_GET['currentseason']) && $_GET['currentseason'] != "") {
$season = season_get($mysql_link, $_GET['currentseason']);
}
else
{
//Get the current season
$season = season_get_current($mysql_link);
}
$temp_season_id = mysql_fetch_assoc(mysql_query($sql = "SELECT date_start FROM seasons WHERE id = " . $season['id'] . "", $mysql_link));
$temp_var = explode("-", $temp_season_id[date_start]);
$season_id = $temp_var[0];
//$season_xml_file_name = $status_type_path . $_GET['id_equipe'] . '.xml';
$xml_file_name = $_GET['id_equipe'] . '.xml';
$team_xml_file_history_selection = file_exists('../xsl/teams_stats/hist/' . $xml_file_name) ? $xml_file_name : 'false';
echo '<script>
var default_currentseason = \'' . $_GET['currentseason'] . '\';
var default_xml_file = \'' . $team_xml_file_history_selection . '\';
</script>';
if (isset($_GET['currentseason']) && $_GET['currentseason'] != "")
{
$season = season_get($mysql_link, $_GET['currentseason']);
//Get the team data
$equipe = team_get_data($mysql_link, $id_equipe, $season['date_start']);
$nearest_reg_season = $season;
$id_reg_saison = $_GET['currentseason'];
$nearest_pyf_season = playoff_get($mysql_link, $season['date_start'], $season['date_end']);
$id_pyf_saison = $nearest_pyf_season['id'];
}
else
{
//Nearest regular season
$seasons = season_list($mysql_link, SEASON_TYPE_REG, 'DESC');
$keys = array_keys($seasons);
$id_reg_saison = $keys[0];
$nearest_reg_season = $seasons[$id_reg_saison];
//Nearest regular season
$seasons = season_list($mysql_link, SEASON_TYPE_PYF, 'DESC');
$keys = array_keys($seasons);
$id_pyf_saison = $keys[0];
$nearest_pyf_season = $seasons[$id_pyf_saison];
//Get the team data
$equipe = team_get_data($mysql_link, $id_equipe, date('Y-m-d'));
}
$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($mysql_link);
if ($season['id'] == $check_season_id['id'] ){
$showcheckplayers = "true";
}
?>
<link href="../css/tabpane.css" rel="stylesheet" type="text/css">
<script src="../scripts/tabpane_mini.js" type="text/javascript"></script>
<script src="../xsl/js/_functions00.js" type="text/javascript"></script>
<?php
echo '
<script>
window.onload = function()
{
if(document.getElementById("team_spec"))
{
load_and_transform(\'../xsl/teams_stats/xml/root.xml\', \'../xsl/teams_stats/xsl/hist.xsl\', \'historique\', {xml_file_name: \'' . $team_xml_file_history_selection . '\', lang: \'' . $str_lang . '\', tab02:\'false\', id_num: \'0\', status_type: \'' . $status_type_path . '\', seasonsid: \'123456\', id_equipe: \'' . $_REQUEST['id_equipe'] . '\', currentseason: \'' . $_REQUEST['currentseason'] . '\'})
document.getElementById("team_spec").style.display = "block";
}
}
</script>
';
?>
<div id="pteam">
<br />
<?php include('teams/teamdata.php'); ?>
<table width="631" border="0" cellspacing="0" cellpadding="5" id="team_spec">
<tr>
<td valign="top">
<!--table width=100%>
<tr>
<td valign="top" align=right class="blackText12px"> <br />
<form name="francform" method="get">
<strong>Franchises</strong>
<br>
<select name="currentseason" onchange="javascript:francform.submit();">
<?
while ($franchisid = @mysql_fetch_assoc($franchisids))
{
$fBeginYear = substr($franchisid['date_start'], 0, 4);
$fEndYear = substr($franchisid['date_end'], 0, 4);
?>
<option value="<?php echo $franchisid['id'];?>" <?php if ($season['id'] == $franchisid['id']){echo "selected";}?> >Saison <?php echo $fBeginYear.'-'.$fEndYear;?></option>
<?
}
?>
</select>
<input type="hidden" name="id_equipe" value="<?php echo $id_equipe;?>">
<input type="hidden" name="page" value="<?php echo $_GET['page'];?>">
</form>
</td>
</tr>
</table-->
<?php
$result = mysql_fetch_assoc(mysql_query($sql = "SELECT * FROM lhjmq_variables WHERE id_var = '".$_GET[id_equipe]."-fr-equipes-historique'", $mysql_link));
?>
<a name="top"></a>
<div id="print_title_div">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" style="padding:0px 15px 0px 15px;">
<tr>
<td colspan="2" class="team_title"><strong><br>Historique <?= $iBeginYear.'-'.$iEndYear ?></strong></td>
</tr>
<tr>
<td colspan="2">
<hr class="shr" />
</td>
</tr>
</table>
</div>
<div id="table_content" name="table_content">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" style="padding:0px 15px 0px 15px;">
<tr>
<td colspan="2" align="center">
<div class="<?php echo 'history_head_' . $str_lang; ?>" style="width:100%;height:28px;"></div>
</td>
</tr>
<tr>
<td height="13"></td>
</tr>
<tr>
<td colspan="2">
<div style="float:left; padding:2px;">
<a href="javascript:;" class="sbtn_a" onClick="hide_and_show(true, hist_text, historique)">
<img src="/images/players/sbtn_l.png" border="0" class="float_l" />
<div class="sbtn_m" style="text-decoration:none; color:#ff9900;" id="hist_btn_text">Historique</div>
<img src="/images/players/sbtn_r.png" border="0" />
</a>
</div>
<div style="float:left; padding:2px;">
<a href="javascript:;" class="sbtn_a" onClick="hide_and_show(false, hist_text, historique)">
<img src="/images/players/sbtn_l.png" border="0" class="float_l" />
<div class="sbtn_m" style="text-decoration:none;" id="hist_btn_compl_text">Complément historique</div>
<img src="/images/players/sbtn_r.png" border="0" />
</a>
</div>
<div style="float:left; padding:2px;">
<img src="/images/players/print.png" alt="" border="0" style="margin:2px 0 0 20px;cursor:pointer;" onclick="print_teams()" />
</div>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<div id="historique" style="display:none"></div>
<div id="hist_text" style="display:block; text-align:left;">
<?= $result[var_text] ?>
</div>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<?php
$footer_background_color = '#ececec';
?>
|