Version 1.2.5 -Various Fixes

Everything about SIM Hockey League Web Portal Version 1:; request, support, suggestions, etc / Tout ce qui touche au SIM Hockey League Web Portal: demandes, support, suggestions, etc
Locked
Webal
The Passion One / Le Passionné
Posts: 181
Joined: Sat Jun 27, 2009 6:36 pm

Version 1.2.5 -Various Fixes

Post by Webal » Mon Jan 18, 2010 1:01 pm

Pending Free Agents Not in Menu Fix:

you have to open your includes file and after you open your league menu files... now you see all your league menu

copy that <li><a href="pending-free-agents.php"><?php echo $l_nav_pending_free_agents;?></a></li> and insert it under that line

<li><a href="restricted-free-agents.php"><?php echo $l_nav_restricted_free_agents;?></a></li>

and it sould be appearing in your menu

sorry for my english
Alain

Commissaire, http://www.ln-c.com

User avatar
dmon69
The Accomplished One / L'Accompli
Posts: 111
Joined: Wed Sep 27, 2006 10:32 pm
Contact:

Version 2.5 - Point streak/games without point stats Fix

Post by dmon69 » Wed Jan 20, 2010 8:04 pm

In the pro_stats.php find $query_GetSkaters and replace it with:
$query_GetSkaters = sprintf("SELECT SUM(ProGP) as ProGP,SUM(ProShots) as ProShots,SUM(ProG) as ProG,SUM(ProA) as ProA,SUM(ProPoint) as ProPoint,SUM(ProPlusMinus) as ProPlusMinus,SUM(ProPim) as ProPim,SUM(ProShotsBlock) as ProShotsBlock,SUM(ProHits) as ProHits,SUM(ProHitsTook) as ProHitsTook,SUM(ProPP) as ProPP,SUM(ProSH) as ProSH,SUM(ProGW) as ProGW,SUM(ProGT) as ProGT,SUM(ProFaceOffWon) as ProFaceOffWon,SUM(ProFaceOffTotal) as ProFaceOffTotal, SUM(ProPenalityShotsScore) as ProPenalityShotsScore,SUM(ProPenalityShotsTotal) as ProPenalityShotsTotal,SUM(ProEmptyNetGoal) as ProEmptyNetGoal,SUM(ProMinutePlay) as ProMinutePlay, SUM(ProHatTrick) as ProHatTrick, SUM(GameInRowWithAGoal) as GameInRowWithAGoal,SUM(GameInRowWithAPoint) as GameInRowWithAPoint,SUM(GameInRowWithOutAGoal) as GameInRowWithOutAGoal,SUM(GameInRowWithOutAPoint) as GameInRowWithOutAPoint, players.Name, players.Team FROM playerstats, players WHERE players.Team='%s' AND playerstats.ProGP > 0 AND playerstats.Season_ID=%s AND players.Name=playerstats.Name GROUP BY playerstats.Name ORDER BY %s desc", $TID_GetSkaters,$SID_GetSkaters, $SORT);
$GetSkaters = mysql_query($query_GetSkaters, $simhl) or die(mysql_error());
$row_GetSkaters = mysql_fetch_assoc($GetSkaters);

In the farm_stats.php find $query_GetSkaters and replace it with:
$query_GetSkaters = sprintf("SELECT farmteam.Abbre, SUM(FarmGP) as FarmGP,SUM(FarmShots) as FarmShots,SUM(FarmG) as FarmG,SUM(FarmA) as FarmA,SUM(FarmPoint) as FarmPoint,SUM(FarmPlusMinus) as FarmPlusMinus,SUM(FarmPim) as FarmPim,SUM(FarmShotsBlock) as FarmShotsBlock,SUM(FarmHits) as FarmHits,SUM(FarmHitsTook) as FarmHitsTook,SUM(FarmPP) as FarmPP,SUM(FarmSH) as FarmSH,SUM(FarmGW) as FarmGW,SUM(FarmGT) as FarmGT,SUM(FarmFaceOffWon) as FarmFaceOffWon,SUM(FarmFaceOffTotal) as FarmFaceOffTotal,SUM(FarmPenalityShotsScore) as FarmPenalityShotsScore,SUM(FarmPenalityShotsTotal) as FarmPenalityShotsTotal,SUM(FarmEmptyNetGoal) as FarmEmptyNetGoal,SUM(FarmMinutePlay) as FarmMinutePlay,SUM(FarmHatTrick) as FarmHatTrick,SUM(GameInRowWithAGoal) as GameInRowWithAGoal,SUM(GameInRowWithAPoint) as GameInRowWithAPoint,SUM(GameInRowWithOutAGoal) as GameInRowWithOutAGoal,SUM(GameInRowWithOutAPoint) as GameInRowWithOutAPoint, players.Name, players.Team FROM playerstats, players, farmteam WHERE players.Team='%s' AND players.Team = farmteam.ProTeamName AND playerstats.FarmGP > 0 AND playerstats.Season_ID=%s AND players.Name=playerstats.Name GROUP BY playerstats.Name ORDER BY %s desc", $TID_GetSkaters,$SID_GetSkaters, $SORT);
$GetSkaters = mysql_query($query_GetSkaters, $simhl) or die(mysql_error());
$row_GetSkaters = mysql_fetch_assoc($GetSkaters);

Save both file and upload to your site
Yves
RFHL Commissioner
http://newrfhl.net/

User avatar
dmon69
The Accomplished One / L'Accompli
Posts: 111
Joined: Wed Sep 27, 2006 10:32 pm
Contact:

2.5 - Goaltender Stats

Post by dmon69 » Fri Jan 22, 2010 6:09 pm

Below is the whole tab of the current stats tab in the goalie.php, to fix your problem, replace the content of your div id="stats1" with the following. Basically calculation for the Farmteam stats were missing and pointing to pro stats.
<div id="stats1" class="tabcontent">
<?php
$RowCounter = 0;
$MultiTeam = 0;
$tmpRowColor="";
$LastSeason = "";
$tmpRowColor="0000C0";
$tmpRowCount=0;
$tmpTotGP=0;
$tmpTotW=0;
$tmpTotL=0;
$tmpTotOTL=0;
$tmpTotPCT=0;
$tmpTotGA=0;
$tmpTotGAA=0;
$tmpTotMinPlay=0;
$tmpTotPim=0;
$tmpTotShutouts=0;
$tmpTotSA=0;
$tmpTotA=0;
$tmpTotEmptyNetGoal=0;
$tmpTotPenalityShotsGoals=0;
$tmpTotPenalityShotsShots=0;

if ($tmpStatus > 0){ ?>
<table cellspacing="0" border="0" width="100%">
<tr style="background-color:#<?php echo $_SESSION['current_SecondaryColor']; ?>">
<td colspan="22" style="padding-top: 2px; font-weight: bold;;"><?php echo $_SESSION['current_Season']." ".$_SESSION['current_SeasonType']; ?> </td>
</tr>
<tr class="rowHeader" style="background-color:#<?php echo $_SESSION['current_PrimaryColor']; ?>">
<td class="playerHeaderCell"><a>Team</a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_GP_D;?>"><?php echo $l_GP;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_W_D;?>"><?php echo $l_W;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_L_D;?>"><?php echo $l_L;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_OTL_D;?>"><?php echo $l_OTL;?></a></td>
<td class="headerCell" width="50"><a title="<?php echo $l_PCT_D;?>"><?php echo $l_PCT;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_AVE_D;?>"><?php echo $l_AVE;?></a></td>
<td class="headerCell" width="50"><a title="<?php echo $l_MP_D;?>"><?php echo $l_MP;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_PIM_D;?>"><?php echo $l_PIM;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_SO_D;?>"><?php echo $l_SO;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_GA_D;?>"><?php echo $l_GA;?></a></td>
<td class="headerCell" width="50"><a title="<?php echo $l_SA_D;?>"><?php echo $l_SA;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_A_D;?>"><?php echo $l_A;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_EG_D;?>"><?php echo $l_EG;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_PSPCT_D;?>"><?php echo $l_PSPCT;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_PSA_D;?>"><?php echo $l_PSA;?></a></td>
</tr>
<?php do { ?>
<tr class="evenRowColor">
<td class="leftAlignedColumn"><?php echo $row_GetCurrentStats['Team']; ?></td>
<td align="center" ><?php echo $row_GetCurrentStats['ProGP']; $tmpTotGP=$tmpTotGP+$row_GetCurrentStats['ProGP'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['ProW']; $tmpTotW=$tmpTotW+$row_GetCurrentStats['ProW'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['ProL']; $tmpTotL=$tmpTotL+$row_GetCurrentStats['ProL'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['ProOTL']; $tmpTotOTL=$tmpTotOTL+$row_GetCurrentStats['ProOTL'];?></td>
<td align="center" ><?php echo number_format($row_GetCurrentStats['ProPCT'],3); $tmpTotPCT=$tmpTotPCT+$row_GetCurrentStats['ProPCT']?>%</td>
<td align="center" ><?php echo number_format($row_GetCurrentStats['ProGAA'],2); $tmpTotGAA=$tmpTotGAA+$row_GetCurrentStats['ProGAA']?></td>
<td align="center" ><?php echo $row_GetCurrentStats['ProMinPlay']; $tmpTotMinPlay=$tmpTotMinPlay+$row_GetCurrentStats['ProMinPlay'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['ProPim']; $tmpTotPim=$tmpTotPim+$row_GetCurrentStats['ProPim'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['ProShutouts']; $tmpTotShutouts=$tmpTotShutouts+$row_GetCurrentStats['ProShutouts'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['ProGA']; $tmpTotGA=$tmpTotGA+$row_GetCurrentStats['ProGA'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['ProSA']; $tmpTotSA=$tmpTotSA+$row_GetCurrentStats['ProSA'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['ProA']; $tmpTotA=$tmpTotA+$row_GetCurrentStats['ProA'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['ProEmptyNetGoal']; $tmpTotEmptyNetGoal=$tmpTotEmptyNetGoal+$row_GetCurrentStats['ProEmptyNetGoal'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['ProPenalityShotsGoals']; $tmpTotPenalityShotsGoals=$tmpTotPenalityShotsGoals+$row_GetCurrentStats['ProPenalityShotsGoals'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['ProPenalityShotsShots']; $tmpTotPenalityShotsShots=$tmpTotPenalityShotsShots+$row_GetCurrentStats['ProPenalityShotsShots'];?></td>
</tr>
<?php } while ($row_GetCurrentStats = mysql_fetch_assoc($GetCurrentStats)); ?>
<tr style="background-color:#<?php echo $_SESSION['current_PrimaryColor']; ?>">
<td colspan="24" style="padding-top: 5px; font-weight: bold;;"></td>
</tr>
<tr>
<td class="leftAlignedColumn" style="font-weight:bold;"><?php echo $l_Total; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotGP; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotW; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotL; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotOTL; ?></td>
<td align="center" style="font-weight:bold;"><?php if ($tmpTotSA > 0){ echo number_format($tmpTotSA / ($tmpTotGA + $tmpTotSA) ,3);} ?>%</td>
<td align="center" style="font-weight:bold;"><?php if ($tmpTotMinPlay > 0){echo number_format(($tmpTotGA / ($tmpTotMinPlay / 60)) ,2);} ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotMinPlay; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotPim; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotShutOuts; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotGA; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotSA; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotA; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotEmptyNetGoal; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotPenalityShotsGoals; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotPenalityShotsShots; ?></td>
</tr>
</table>
<?php } else { ?>
<table cellspacing="0" border="0" width="100%">
<tr style="background-color:#<?php echo $_SESSION['current_SecondaryColor']; ?>">
<td colspan="22" style="padding-top: 2px; font-weight: bold;;"><?php echo $_SESSION['current_Season']." ".$_SESSION['current_SeasonType']; ?> </td>
</tr>
<tr class="rowHeader" style="background-color:#<?php echo $_SESSION['current_PrimaryColor']; ?>">
<td class="playerHeaderCell" width="30"><a>Team</a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_GP_D;?>"><?php echo $l_GP;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_W_D;?>"><?php echo $l_W;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_L_D;?>"><?php echo $l_L;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_OTL_D;?>"><?php echo $l_OTL;?></a></td>
<td class="headerCell" width="50"><a title="<?php echo $l_PCT_D;?>"><?php echo $l_PCT;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_GA_D;?>"><?php echo $l_GA;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_AVE_D;?>"><?php echo $l_AVE;?></a></td>
<td class="headerCell" width="50"><a title="<?php echo $l_MP_D;?>"><?php echo $l_MP;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_PIM_D;?>"><?php echo $l_PIM;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_SO_D;?>"><?php echo $l_SO;?></a></td>
<td class="headerCell" width="50"><a title="<?php echo $l_SA_D;?>"><?php echo $l_SA;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_A_D;?>"><?php echo $l_A;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_EG_D;?>"><?php echo $l_EG;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_PSPCT_D;?>"><?php echo $l_PSPCT;?></a></td>
<td class="headerCell" width="35"><a title="<?php echo $l_PSA_D;?>"><?php echo $l_PSA;?></a></td>
</tr>
<?php do { ?>
<tr class="evenRowColor">
<td class="leftAlignedColumn"><?php echo $row_PlayerInfo['Name']; ?></td>
<td align="center" ><?php echo $row_GetCurrentStats['FarmGP']; $tmpTotGP=$tmpTotGP+$row_GetCurrentStats['FarmGP'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['FarmW']; $tmpTotW=$tmpTotW+$row_GetCurrentStats['FarmW'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['FarmL']; $tmpTotL=$tmpTotL+$row_GetCurrentStats['FarmL'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['FarmOTL']; $tmpTotOTL=$tmpTotOTL+$row_GetCurrentStats['FarmOTL'];?></td>
<td align="center" ><?php echo number_format($row_GetCurrentStats['FarmPCT'],3); $tmpTotPCT=$tmpTotPCT+$row_GetCurrentStats['FarmPCT']?>%</td>
<td align="center" ><?php echo number_format($row_GetCurrentStats['FarmGAA'],2); $tmpTotGAA=$tmpTotGAA+$row_GetCurrentStats['FarmGAA']?></td>
<td align="center" ><?php echo $row_GetCurrentStats['FarmMinPlay']; $tmpTotMinPlay=$tmpTotMinPlay+$row_GetCurrentStats['FarmMinPlay'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['FarmPim']; $tmpTotPim=$tmpTotPim+$row_GetCurrentStats['FarmPim'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['FarmShutouts']; $tmpTotShutouts=$tmpTotShutouts+$row_GetCurrentStats['FarmShutouts'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['FarmGA']; $tmpTotGA=$tmpTotGA+$row_GetCurrentStats['FarmGA'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['FarmSA']; $tmpTotSA=$tmpTotSA+$row_GetCurrentStats['FarmSA'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['FarmA']; $tmpTotA=$tmpTotA+$row_GetCurrentStats['FarmA'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['FarmEmptyNetGoal']; $tmpTotEmptyNetGoal=$tmpTotEmptyNetGoal+$row_GetCurrentStats['FarmEmptyNetGoal'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['FarmPenalityShotsGoals']; $tmpTotPenalityShotsGoals=$tmpTotPenalityShotsGoals+$row_GetCurrentStats['FarmPenalityShotsGoals'];?></td>
<td align="center" ><?php echo $row_GetCurrentStats['FarmPenalityShotsShots']; $tmpTotPenalityShotsShots=$tmpTotPenalityShotsShots+$row_GetCurrentStats['FarmPenalityShotsShots'];?></td>
</tr>
<?php } while ($row_GetCurrentStats = mysql_fetch_assoc($GetCurrentStats)); ?>
<tr style="background-color:#<?php echo $_SESSION['current_PrimaryColor']; ?>">
<td colspan="24" style="padding-top: 5px; font-weight: bold;;"></td>
</tr>
<tr>
<td class="leftAlignedColumn" style="font-weight:bold;"><?php echo $l_Total; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotGP; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotW; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotL; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotOTL; ?></td>
<td align="center" style="font-weight:bold;"><?php if ($tmpTotSA > 0){ echo number_format($tmpTotSA / ($tmpTotGA + $tmpTotSA) ,3);} ?>%</td>
<td align="center" style="font-weight:bold;"><?php if ($tmpTotMinPlay > 0){echo number_format(($tmpTotGA / ($tmpTotMinPlay / 60)) ,2);} ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotMinPlay; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotPim; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotShutOuts; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotGA; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotSA; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotA; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotEmptyNetGoal; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotPenalityShotsGoals; ?></td>
<td align="center" style="font-weight:bold;"><?php echo $tmpTotPenalityShotsShots; ?></td>
</tr>
</table>
<?php } ?>

<br />
<table cellspacing="0" border="0" width="100%">
<tr style="background-color:#<?php echo $_SESSION['current_SecondaryColor']; ?>">
<td colspan="22" style="padding-top: 2px; font-weight: bold;;"><?php echo $l_PlayerRatings;?></td>
</tr>
<tr class="rowHeader" style="background-color:#<?php echo $_SESSION['current_PrimaryColor']; ?>">
<td class="headerCell" ><a title="<?php echo $l_SK_D;?>">SK</a></td>
<td class="headerCell" ><a title="<?php echo $l_DU_D;?>">DU</a></td>
<td class="headerCell" ><a title="<?php echo $l_ST_D;?>">ST</a></td>
<td class="headerCell" ><a title="<?php echo $l_SZ_D;?>">SZ</a></td>
<td class="headerCell" ><a title="<?php echo $l_AG_D;?>">AG</a></td>
<td class="headerCell" ><a title="<?php echo $l_RB_D;?>">RB</a></td>
<td class="headerCell" ><a title="<?php echo $l_SC_D;?>">SC</a></td>
<td class="headerCell" ><a title="<?php echo $l_HS_D;?>">HS</a></td>
<td class="headerCell" ><a title="<?php echo $l_RT_D;?>">RT</a></td>
<td class="headerCell" ><a title="<?php echo $l_EX_D;?>">EX</a></td>
<td class="headerCell" ><a title="<?php echo $l_LD_D;?>">LD</a></td>
<td class="headerCell" ><a title="<?php echo $l_MO_D;?>">MO</a></td>
<td class="headerCell" ><a title="<?php echo $l_PO_D;?>">PO</a></td>
<td class="headerCell" ><a title="<?php echo $l_OV_D;?>">OV</a></td>
</tr>
<tr class="evenRowColor">
<td align="right" ><?php echo $row_GetGoalie['SK']; ?></td>
<td align="right" ><?php echo $row_GetGoalie['DU']; ?></td>
<td align="right" ><?php echo $row_GetGoalie['ST']; ?></td>
<td align="right" ><?php echo $row_GetGoalie['SZ']; ?></td>
<td align="right" ><?php echo $row_GetGoalie['AG']; ?></td>
<td align="right" ><?php echo $row_GetGoalie['RB']; ?></td>
<td align="right" ><?php echo $row_GetGoalie['SC']; ?></td>
<td align="right" ><?php echo $row_GetGoalie['HS']; ?></td>
<td align="right" ><?php echo $row_GetGoalie['RT']; ?></td>
<td align="right" ><?php echo $row_GetGoalie['EX']; ?></td>
<td align="right" ><?php echo $row_GetGoalie['LD']; ?></td>
<td align="right" ><?php echo $row_GetGoalie['MO']; ?></td>
<td align="right" ><?php echo $row_GetGoalie['PO']; ?></td>
<td align="right" ><?php if ($_SESSION['DisplayOV'] == 1) { echo $row_GetGoalie['OV'];} ?></td>
</tr>
</table>
<br />
<table cellspacing="0" border="0" width="100%">
<tr style="background-color:#<?php echo $_SESSION['current_SecondaryColor']; ?>">
<td colspan="22" style="padding-top: 2px; font-weight: bold;;"><?php echo $l_PlayerNotes;?></td>
</tr>
</table>

<?php if ($row_GetGoalie['BIO'] <> ""){echo $row_GetGoalie['BIO']; } else { echo $l_NoNotes; } ?>

</div>
Yves
RFHL Commissioner
http://newrfhl.net/

User avatar
dmon69
The Accomplished One / L'Accompli
Posts: 111
Joined: Wed Sep 27, 2006 10:32 pm
Contact:

Re: 2.5 - Goaltender Stats

Post by dmon69 » Sat Jan 23, 2010 8:22 pm

This fix has now been tested and working, please make sure to replace only the from the <div id="stats1" to the </div>, nothing more nothing less. If by any chance your pro turn out to have the same problem after this fix, find the $query_GetCurrentStats and replace it with:
$query_GetCurrentStats = sprintf("SELECT goaliestats.*, ((goaliestats.ProGA / goaliestats.ProMinPlay) * 60) as ProGAA, (goaliestats.ProSA / (goaliestats.ProGA + goaliestats.ProSA)) as ProPCT, ((goaliestats.FarmGA / goaliestats.FarmMinPlay) * 60) as FarmGAA, (goaliestats.FarmSA / (goaliestats.FarmGA + goaliestats.FarmSA)) as FarmPCT FROM goaliestats WHERE goaliestats.Name='%s' AND goaliestats.Season_ID=%s",$PID_GetGoalie, $_SESSION['current_SeasonID']);
$GetCurrentStats = mysql_query($query_GetCurrentStats, $simhl) or die(mysql_error());
$row_GetCurrentStats = mysql_fetch_assoc($GetCurrentStats);
$totalRows_GetCurrentStats = mysql_num_rows($GetCurrentStats);
Yves
RFHL Commissioner
http://newrfhl.net/

apokai
New in Town / Le Ptit Nouveau
Posts: 2
Joined: Mon Feb 08, 2010 1:37 pm

1.1.7 - Different tag names in ProTeam.xml

Post by apokai » Mon Feb 08, 2010 1:45 pm

Hi,

In the ProTeam.xml file, there is 54x a tag named "GamesRemaining" and (for unknown reason), it is being renamed "GameRemaining" (Without an "s") 6x upon 60 entries.
...
<FarmPayroll>1587873</FarmPayroll>
<CoachPayroll>450000</CoachPayroll>
<LuxuryTaxeTotal>229880</LuxuryTaxeTotal>
<GamesRemaining>79</GamesRemaining>
<ExpensesPerGame>631714</ExpensesPerGame>
<EstimatedSeasonExpenses>49905406</EstimatedSeasonExpenses>

...

<FarmPayroll>888187</FarmPayroll>
<CoachPayroll>750000</CoachPayroll>
<LuxuryTaxeTotal>0</LuxuryTaxeTotal>
<GameRemaining>78</GameRemaining>
<ExpensesPerGame>537431</ExpensesPerGame>
<EstimatedSeasonExpenses>41919618</EstimatedSeasonExpenses>

Icepilot
Moderator / Modérateur
Posts: 1701
Joined: Thu May 18, 2006 10:05 am
Location: Duncan, BC
Contact:

Re: Version 2.5 -Various Fixes

Post by Icepilot » Thu Jun 10, 2010 5:13 pm

To Fix the Restricted Free Agents Page where the forwards and d-man are not showing up, Just reload the restricted-free-agents.php file from the 2.2 upgrade that was sent out.

Or copy the following and replace what you have:

<?php include('Connections/simhl-setup.php'); ?>
<?php include("includes/sessionInfo.php") ?>
<?php include("includes/langfile.php") ?>
<?php include("includes/langs.php") ?>
<?php include("includes/langs_stats.php") ?>
<?php
switch ($lang){
case 'en':
$l_Offer = "Offer Contract";
$l_Deadline = "Deadline";
$l_Owner = "OWNER";
$l_OfferSent = "Offer&nbsp;Sheet&nbsp;Sent";
$l_OfferAccepted = "Contract&nbsp;Accepted";
break;

case 'fr':
$l_Offer = "Offre";
$l_Deadline = "Date limite";
$l_Owner = "PROPRIÉTAIRE";
$l_OfferSent = "Feuille d'Offre Envoyée";
$l_OfferAccepted = "Offre Acceptée";
break;
}

$SORT = "OV";
if (isset($_GET['sort'])) {
$SORT = (get_magic_quotes_gpc()) ? $_GET['sort'] : addslashes($_GET['sort']);
}
$SORT_GOALIE = "OV";
if (isset($_GET['sort_goalie'])) {
$SORT_GOALIE = (get_magic_quotes_gpc()) ? $_GET['sort_goalie'] : addslashes($_GET['sort_goalie']);
}
$UFA=27;
mysql_select_db($database_simhl, $simhl);
$query_GetInfo = sprintf("SELECT UFA FROM config");
$GetInfo = mysql_query($query_GetInfo, $simhl) or die(mysql_error());
$row_GetInfo = mysql_fetch_assoc($GetInfo);
$UFA=$row_GetInfo['UFA'];
mysql_free_result($GetInfo);
$query_GetSkaters = sprintf("SELECT players.* FROM players WHERE players.Contract = 0 AND players.Age < ".$UFA." ORDER BY %s desc",$SORT );
$GetSkaters = mysql_query($query_GetSkaters, $simhl) or die(mysql_error());
$row_GetSkaters = mysql_fetch_assoc($GetSkaters);
$totalRows_GetSkaters = mysql_num_rows($GetSkaters);
$query_GetGoalies = sprintf("SELECT goalies.* FROM goalies WHERE goalies.Contract = 0 AND goalies.Age < ".$UFA." ORDER BY %s desc", $SORT_GOALIE );
$GetGoalies = mysql_query($query_GetGoalies, $simhl) or die(mysql_error());
$row_GetGoalies = mysql_fetch_assoc($GetGoalies);
$totalRows_GetGoalies = mysql_num_rows($GetGoalies);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?php echo $l_nav_restricted_free_agents;?> - <?php echo $_SESSION['SiteName'] ; ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['DomainName']; ?>/css/global.css">
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['DomainName']; ?>/css/cssmenu.css">
<script src="<?php echo $_SESSION['DomainName']; ?>/js/cssmenu.js" language="javascript"></script>
<style>
a {
color:#000000;
}
</style>
</head>
<body>
<div align="center" style="height:100%">
<div id="wrapper">
<fieldset id="LoginColum"><?php include("includes/login.php"); ?></fieldset>
<table border="0" cellpadding="0" cellspacing="0" width="998" id="HEADER">
<tr> <td background="<?php echo $_SESSION['DomainName']; ?>/image/common/topbarbg.gif" align="center" height="35"><a href="simhl.php" ><img src="<?php echo $_SESSION['DomainName']; ?>/image/common/simhl-title.gif" alt="<?php echo $_SESSION['SiteName'] ; ?>" width="200" height="35" border="0" /></a></td><td background="<?php echo $_SESSION['DomainName']; ?>/image/common/topbarbg.gif"><img src="<?php echo $_SESSION['DomainName']; ?>/image/topnav_teamslogo.gif" width="789" height="18" border="0" usemap="#Map" /></td>
</tr>
<tr>
<td valign="top" align="left" colspan="2"><img src="<?php echo $_SESSION['DomainName']; ?>/image/headers/<?php echo $_SESSION['current_HeaderImage']; ?>" alt="<?php echo $_SESSION['current_City']." ".$_SESSION['current_Team']; ?>" width="998" height="100" border="0"></td>
</tr>
<tr>
<td height="30" align="left" colspan="2" bgcolor="#<?php echo $_SESSION['current_PrimaryColor']; ?>">
<?php if ($_SESSION['current_Team_ID'] == 0) {
include("includes/leagueMenu.php");
} else {
include("includes/teamMenu.php") ;
}
?></td>
</tr>
</table>
<div id="Content">
<table width="100%" cellpadding="10" cellspacing="0" border="0">
<tr>
<td valign="top">
<h1><?php echo $l_nav_restricted_free_agents;?></h1>
<table width="100%" cellspacing="0" border="0" >
<tr style="background-color:#<?php echo $_SESSION['current_SecondaryColor']; ?>">
<td colspan="16" style="padding-top: 2px; font-weight: bold;;"><?php echo $l_nav_players;?></td>
<td colspan="8" align="right">
<table><tr><td>
<table width="15" height="15" border="0" bgcolor="#FFFF00"><tr><td style="font-size:6px;">&nbsp;</td></tr></table>
</td><td><?php echo $l_OfferSent;?></td>
</td>
<td>
<table width="15" height="15" border="0" bgcolor="#FF99FF"><tr><td style="font-size:6px;">&nbsp;</td></tr></table>
</td><td><?php echo $l_OfferAccepted;?></td>
</td>
</tr>
</table>
</td>
</tr>
<tr class="rowHeader" style="background-color:#<?php echo $_SESSION['current_PrimaryColor']; ?>">
<td class="playerHeaderCell"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>"><?php echo $l_Name;?></a></td>
<td class="headerCell" width="75"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=Position" title="<?php echo $l_Position;?>">POS</a></td>
<td class="headerCell" width="40"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=Age" title="<?php echo $l_Age;?>"><?php echo $l_Age;?></a></td>
<td class="headerCell" width="40"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=Con" title="<?php echo $l_Country;?>"><?php echo $l_Country;?></a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=CK" title="<?php echo $l_CK_D;?>">CK</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=FG" title="<?php echo $l_FG_D;?>">FG</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=DI" title="<?php echo $l_DI_D;?>">DI</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=SK" title="<?php echo $l_SK_D;?>">SK</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=ST" title="<?php echo $l_ST_D;?>">ST</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=DU" title="<?php echo $l_DU_D;?>">DU</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=PH" title="<?php echo $l_PH_D;?>">PH</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=FO" title="<?php echo $l_FO_D;?>">FO</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=PA" title="<?php echo $l_PA_D;?>">PA</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=SC" title="<?php echo $l_SC_D;?>">SC</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=DF" title="<?php echo $l_DF_D;?>">DF</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=EX" title="<?php echo $l_EX_D;?>">EX</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=LD" title="<?php echo $l_LD_D;?>">LD</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=MO" title="<?php echo $l_MO_D;?>">MO</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=PO" title="<?php echo $l_PO_D;?>">PO</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=OV" title="<?php echo $l_OV_D;?>">OV</a></td>
<td class="headerCell" width="100" align="right"><a href="free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=Team" title=""><?php echo $l_Owner;?></a></td>
<td class="headerCell" width="100"><a></a></td>
<td class="headerCell" width="100"><a><?php echo $l_Deadline;?></a></td>

</tr>
<?php
$tmpRowColor="000000";
$tmpRowCount=0;
$contractAccepted=0;
if ($totalRows_GetSkaters > 0) {
do {
$contractAccepted=0;
if ($tmpRowCount==1){
$tmpRowColor="E9ECF3";
$tmpRowCount=0;
} else {
$tmpRowColor="FFFFFF";
$tmpRowCount=1;
}
$query_GetStatus= sprintf("SELECT Type, DateCreated, PR_ID FROM playerscontractoffers WHERE Player='%s' Order By DateCreated Desc Limit 0,1",addslashes($row_GetSkaters['Name']) );
$GetStatus = mysql_query($query_GetStatus, $simhl) or die(mysql_error());
$row_GetStatus = mysql_fetch_assoc($GetStatus);
$totalRows_GetStatus = mysql_num_rows($GetStatus);


if ($row_GetStatus['Type'] == 'Restricted Offer Sheet'){
$timeStamp = strtotime($row_GetStatus['DateCreated']);
$timeStamp += 24 * 60 * 60 * 2; // (add 7 days)
$newDate = date("Y-m-d", $timeStamp);
if ($newDate > strftime('%Y-%m-%d', strtotime('now'))){
$tmpRowColor="FFFF00";
$contractAccepted=0;
} else {
$tmpRowColor="FF99FF";
$contractAccepted=1;
}
}
?>
<tr class="statsRow" bgcolor="#<?php echo $tmpRowColor; ?>" >
<td class="leftAlignedColumn" width="100"><a href="player.php?team=<?php echo $_SESSION['current_Team_ID']; ?>&Player=<?php echo $row_GetSkaters['Name']; ?>"><?php echo $row_GetSkaters['Name']; ?></a></td>
<td align="right" <?php if ($SORT=="Position") echo"bgcolor='#cccccc'" ?>><?php
if ($row_GetSkaters['Position']==1){
echo $l_Center;
} elseif ($row_GetSkaters['Position']==2){
echo $l_LeftWing;
} elseif ($row_GetSkaters['Position']==3){
echo $l_RightWing;
} elseif ($row_GetSkaters['Position']==4){
echo $l_Defence;
}
?></td>
<td align="right" <?php if ($SORT=="Age") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetSkaters['Age']; ?></td>
<td align="right" <?php if ($SORT=="Country") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetSkaters['Country']; ?></td>
<td align="right" <?php if ($SORT=="CK") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetSkaters['CK']; ?></td>
<td align="right" <?php if ($SORT=="FG") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetSkaters['FG']; ?></td>
<td align="right" <?php if ($SORT=="DI") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetSkaters['DI']; ?></td>
<td align="right" <?php if ($SORT=="SK") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetSkaters['SK']; ?></td>
<td align="right" <?php if ($SORT=="ST") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetSkaters['ST']; ?></td>
<td align="right" <?php if ($SORT=="DU") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetSkaters['DU']; ?></td>
<td align="right" <?php if ($SORT=="PH") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetSkaters['PH']; ?></td>
<td align="right" <?php if ($SORT=="FO") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetSkaters['FO']; ?></td>
<td align="right" <?php if ($SORT=="PA") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetSkaters['PA']; ?></td>
<td align="right" <?php if ($SORT=="SC") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetSkaters['SC']; ?></td>
<td align="right" <?php if ($SORT=="DF") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetSkaters['DF']; ?></td>
<td align="right" <?php if ($SORT=="EX") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetSkaters['EX']; ?></td>
<td align="right" <?php if ($SORT=="LD") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetSkaters['LD']; ?></td>
<td align="right" <?php if ($SORT=="MO") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetSkaters['MO']; ?></td>
<td align="right" <?php if ($SORT=="PO") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetSkaters['PO']; ?></td>
<td align="right" <?php if ($SORT=="OV") echo"bgcolor='#cccccc'" ?>><?php if ($_SESSION['DisplayOV'] == 1) { echo $row_GetSkaters['OV'];} ?></td>
<td align="right" <?php if ($SORT=="Team") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetSkaters['Team']; ?></td>
<td align="right" nowrap="nowrap">
<?php
if ($contractAccepted==1){
echo "Done";
} else {
if(isset($_SESSION['U_ID'])){

if ($row_GetStatus['Approved'] == 'True'){
echo 'Final Offer';
} else{
echo '<a href="restricted_offer_sheet.php?team='.$_SESSION["U_ID"].'&player='.$row_GetSkaters["Name"].'">'.$l_Offer.'</a>';
}

} else {
echo '<a href="login.php">'.$l_login.'</a>';
}
}
?>
</td>
<td align="right" ><?php
if ($row_GetStatus['Type'] == 'Restricted Offer Sheet'){
$timeStamp = strtotime($row_GetStatus['DateCreated']);
$timeStamp += 24 * 60 * 60 * 2; // (add 7 days)
$newDate = date("Y-m-d", $timeStamp);
echo '<a href="restricted_offer_details.php?player='.$row_GetSkaters["Name"].'&status='.$contractAccepted.'">'.$newDate.'</a>';
}
?></td>
</tr>
<?php
mysql_free_result($GetStatus);
} while ($row_GetSkaters = mysql_fetch_assoc($GetSkaters));
}
?>
</table>

<br /><br />

<table width="100%" cellspacing="0" border="0" >
<tr style="background-color:#<?php echo $_SESSION['current_SecondaryColor']; ?>">
<td colspan="16" style="padding-top: 2px; font-weight: bold;;"><?php echo $l_Goalie;?></td>
<td colspan="8" align="right">
<table><tr><td>
<table width="15" height="15" border="0" bgcolor="#FFFF00"><tr><td style="font-size:6px;">&nbsp;</td></tr></table>
</td><td><?php echo $l_OfferSent;?></td>
</td>
<td>
<table width="15" height="15" border="0" bgcolor="#FF99FF"><tr><td style="font-size:6px;">&nbsp;</td></tr></table>
</td><td><?php echo $l_OfferAccepted;?></td>
</td>
</tr>
</table>
</td>
</tr>
<tr class="rowHeader" style="background-color:#<?php echo $_SESSION['current_PrimaryColor']; ?>">
<td class="playerHeaderCell" width="150"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>"><?php echo $l_Name;?></a></td>
<td class="headerCell" width="75"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort_goalie=Position" title="<?php echo $l_Position;?>">POS</a></td>
<td class="headerCell" width="40"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort_goalie=Age" title="<?php echo $l_Age;?>"><?php echo $l_Age;?></a></td>
<td class="headerCell" width="40"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort=Con" title="<?php echo $l_Country;?>"><?php echo $l_Country;?></a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort_goalie=SK" title="<?php echo $l_SK_D;?>">SK</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort_goalie=DU" title="<?php echo $l_DU_D;?>">DU</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort_goalie=ST" title="<?php echo $l_ST_D;?>">ST</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort_goalie=SZ" title="<?php echo $l_SZ_D;?>">SZ</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort_goalie=AG" title="<?php echo $l_AG_D;?>">AG</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort_goalie=RB" title="<?php echo $l_RB_D;?>">RB</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort_goalie=SC" title="<?php echo $l_STC_D;?>">SC</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort_goalie=HS" title="<?php echo $l_HS_D;?>">HS</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort_goalie=RT" title="<?php echo $l_RT_D;?>">RT</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort_goalie=EX" title="<?php echo $l_EX_D;?>">EX</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort_goalie=LD" title="<?php echo $l_LD_D;?>">LD</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort_goalie=MO" title="<?php echo $l_MO_D;?>">MO</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort_goalie=PO" title="<?php echo $l_PO_D;?>">PO</a></td>
<td class="headerCell" width="25"><a href="restricted-free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort_goalie=OV" title="<?php echo $l_OV_D;?>">OV</a></td>
<td class="headerCell" width="100" align="right"><a href="free-agents.php?team=<?php echo $_SESSION['current_Team_ID'];?>&sort_goalie=Team" title=""><?php echo $l_Owner;?></a></td>
<td class="headerCell" width="100"><a></a></td>
<td class="headerCell" width="100"><a><?php echo $l_Deadline;?></a></td>

</tr>

<?php
$tmpRowColor="000000";
$tmpRowCount=0;
$contractAccepted=0;
if ($totalRows_GetGoalies > 0) {
do {
$contractAccepted=0;
if ($tmpRowCount==1){
$tmpRowColor="E9ECF3";
$tmpRowCount=0;
} else {
$tmpRowColor="FFFFFF";
$tmpRowCount=1;
}
$query_GetStatus= sprintf("SELECT Type, DateCreated, PR_ID FROM playerscontractoffers WHERE Player='%s' Order By DateCreated Desc Limit 0,1",addslashes($row_GetGoalies['Name']) );
$GetStatus = mysql_query($query_GetStatus, $simhl) or die(mysql_error());
$row_GetStatus = mysql_fetch_assoc($GetStatus);
$totalRows_GetStatus = mysql_num_rows($GetStatus);

if ($row_GetStatus['Type'] == 'Restricted Offer Sheet'){
$timeStamp = strtotime($row_GetStatus['DateCreated']);
$timeStamp += 24 * 60 * 60 * 2; // (add 7 days)
$newDate = date("Y-m-d", $timeStamp);
if ($newDate > strftime('%Y-%m-%d', strtotime('now'))){
$tmpRowColor="FFFF00";
$contractAccepted=0;
} else {
$tmpRowColor="FF99FF";
$contractAccepted=1;
}
}
?>
<tr class="statsRow" bgcolor="#<?php echo $tmpRowColor; ?>">
<td class="leftAlignedColumn" ><a href="goalie.php?team=<?php echo $_SESSION['current_Team_ID']; ?>&Player=<?php echo $row_GetGoalies['Name']; ?>"><?php echo $row_GetGoalies['Name']; ?></a></td>
<td align="right" <?php if ($SORT_GOALIE=="Position") echo"bgcolor='#cccccc'" ?>><?php echo $l_Goalie;?></td>
<td align="right" <?php if ($SORT_GOALIE=="Age") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetGoalies['Age']; ?></td>
<td align="right" <?php if ($SORT_GOALIE=="Country") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetGoalies['Country']; ?></td>
<td align="right" <?php if ($SORT_GOALIE=="SK") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetGoalies['SK']; ?></td>
<td align="right" <?php if ($SORT_GOALIE=="DU") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetGoalies['DU']; ?></td>
<td align="right" <?php if ($SORT_GOALIE=="ST") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetGoalies['ST']; ?></td>
<td align="right" <?php if ($SORT_GOALIE=="SZ") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetGoalies['SZ']; ?></td>
<td align="right" <?php if ($SORT_GOALIE=="AG") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetGoalies['AG']; ?></td>
<td align="right" <?php if ($SORT_GOALIE=="RB") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetGoalies['RB']; ?></td>
<td align="right" <?php if ($SORT_GOALIE=="SC") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetGoalies['SC']; ?></td>
<td align="right" <?php if ($SORT_GOALIE=="HS") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetGoalies['HS']; ?></td>
<td align="right" <?php if ($SORT_GOALIE=="RT") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetGoalies['RT']; ?></td>
<td align="right" <?php if ($SORT_GOALIE=="EX") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetGoalies['EX']; ?></td>
<td align="right" <?php if ($SORT_GOALIE=="LD") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetGoalies['LD']; ?></td>
<td align="right" <?php if ($SORT_GOALIE=="MO") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetGoalies['MO']; ?></td>
<td align="right" <?php if ($SORT_GOALIE=="PO") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetGoalies['PO']; ?></td>
<td align="right" <?php if ($SORT_GOALIE=="OV") echo"bgcolor='#cccccc'" ?>><?php if ($_SESSION['DisplayOV'] == 1) { echo $row_GetGoalies['OV'];} ?></td>
<td align="right" <?php if ($SORT_GOALIE=="Team") echo"bgcolor='#cccccc'" ?>><?php echo $row_GetGoalies['Team']; ?></td>
<td align="right" nowrap="nowrap">
<?php
if ($contractAccepted==1){
echo "Done";
} else {
if(isset($_SESSION['U_ID'])){

if ($row_GetStatus['Approved'] == 'True'){
echo 'Final Offer';
} else{
echo '<a href="restricted_offer_sheet.php?team='.$_SESSION["U_ID"].'&player='.$row_GetGoalies["Name"].'&type=Goalie">'.$l_Offer.'</a>';
}

} else {
echo '<a href="login.php">'.$l_login.'</a>';
}
}
?>
</td>
<td align="right" ><?php
if ($row_GetStatus['Type'] == 'Restricted Offer Sheet'){
$timeStamp = strtotime($row_GetStatus['DateCreated']);
$timeStamp += 24 * 60 * 60 * 2; // (add 7 days)
$newDate = date("Y-m-d", $timeStamp);
echo '<a href="restricted_offer_details.php?player='.$row_GetGoalies["Name"].'&status='.$contractAccepted.'"&type=Goalie>'.$newDate.'</a>';
}
?></td>
</tr>
<?php
mysql_free_result($GetStatus);
} while ($row_GetGoalies = mysql_fetch_assoc($GetGoalies));
}
?>
</table>

</td>
</tr>
</table>
</div>
<?php include("includes/footer.php"); ?>
</div>
<?php include("Connections/topbarNav.php"); ?>
</body>
</html>
<?php
mysql_free_result($GetSkaters);
mysql_free_result($GetGoalies);
?>

Locked