';
print "$PAGE_TITLE";
print "| Pos | Team | P | | W | D | L | GF | GA | | W | D | L | GF | GA | | GD | Pts | \n";
$sql = "select *, (LG_HF + LG_AF) as GS from Football_LG_Leagues where LG_Season = '$PARM_SEASON' and LG_Type = 'L' and LG_League = '$div' order by LG_PTS desc, LG_GD desc, GS desc, LG_Team";
if (isset($PARAMETER2) and $PARAMETER2 == "form") $sql = "select *, (LG_HF + LG_AF) as GS from Football_LG_Leagues where LG_Season = '$PARM_SEASON' and LG_Type = 'L' and LG_League = '$div' order by LG_PTS desc, LG_GD desc, GS desc, LG_Team";
if (isset($PARAMETER2) and $PARAMETER2 == "daterange") $sql = "select *, (LG_HF + LG_AF) as GS from Football_LG_Leagues where LG_Season = '$PARM_SEASON' and LG_Type = 'L' and LG_League = '$div' order by LG_PTS desc, LG_GD desc, GS desc, LG_Team";
$res = mysql_query($sql);
$pos = 0;
$cls = "";
while ($row = mysql_fetch_array($res)) {
$pos = $pos + 1;
if ($cls != "r1") $cls = "r1"; else $cls = "r2";
if ($row['LG_Team'] == $highlight1 or $row['LG_Team'] == $highlight2) $cls = "sel";
print "| $pos | {$row['LG_Team']} | {$row['LG_P']} | | {$row['LG_HW']} | {$row['LG_HD']} | {$row['LG_HL']} | {$row['LG_HF']} | {$row['LG_HA']} | | {$row['LG_AW']} | {$row['LG_AD']} | {$row['LG_AL']} | {$row['LG_AF']} | {$row['LG_AA']} | | {$row['LG_GD']} | {$row['LG_PTS']} | \n";
}
print " ";
print " | "; $adtype = "Skyscraper"; include("adserver.php"); echo ' |