Sorry, you need to be a member of $SITE_NAME in order to participate in the Prediction League. Please click here to log in or here to register.

"; } function plPlayer ($player) { if ($player == "0") return "No Scorer"; else if ($player == "99") return "Own Goal"; else { $sql = "select PLP_ID, PLP_Surname, PLP_Forename from Football_PL_Players where PLP_ID = " . mysql_real_escape_string($player); $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) return stripslashes($row['PLP_Forename'] . " " . $row['PLP_Surname']); } } $today = date("Ymd"); if (isset($_REQUEST['match']) and ($_REQUEST['match'] == "")) $_REQUEST['match'] = 0; if (isset($_REQUEST['match'])) $PARM_MATCH = intval($_REQUEST['match']); if (!isset($PARM_MATCH)) { # get next match if not supplied $sql = "select PLG_ID from Football_GA_Games where (PLG_HomeTeam = '$TEAM_NAME' or PLG_AwayTeam = '$TEAM_NAME') and ((PLG_Date > $today) or ((PLG_Date = $today) and (PLG_Time > " . date("Hi") . "))) and PLG_Type = 'L' order by PLG_Date limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) $PARM_MATCH = $row['PLG_ID']; } if (isset($PARM_MATCH)) { # get match details for page titles $sql = "select * from Football_GA_Games where PLG_ID = " . intval($PARM_MATCH) . " limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $KEYWORDS = "prediction league, predict, {$row['PLG_HomeTeam']}, {$row['PLG_AwayTeam']}"; $PAGE_TITLE = "Prediction League: {$row['PLG_HomeTeam']} v {$row['PLG_AwayTeam']}"; $match_dets = "{$row['PLG_HomeTeam']} v {$row['PLG_AwayTeam']}"; } } $STYLESHEET = "#submenu{ padding: 0 5px 0 0; width: 100%; background: transparent; font-family: arial; } #submenu ul{ font: bold 10pt Calibri; margin:0; margin-left: 0px; padding: 0; list-style: none; } #submenu li{ display: inline; margin: 0 2px 0 0; padding: 0; } #submenu a{ float: left; display: block; color: white; margin: 0 1px 0 0; padding: 5px 10px; text-decoration: none; letter-spacing: 1px; background-color: black; border-bottom: 1px solid white; border-top: 1px solid white; } #submenu a:hover{ background-color: #$TP_BORDER2; } #submenu #current a{ background-color: #$TP_BORDER1; border-color: #$TP_BORDER1; } #submenuline {clear:both; padding:0 5px 0 0; height:5px; line-height:5px; background:#$TP_BORDER1; margin-bottom:0px; } label { width: 160px; float: left; text-align: left; margin-right: 0.5em; display: block; font-weight: bold }"; $JAVASCRIPT = ""; require("fb_top.php"); if ($PARM_MATCH == "") $PARM_MATCH = 0; subMenu("predictions", $PARM_MATCH); if (!isset($PARAMETER2)) $PARAMETER2 = ""; print "
\n"; print "
"; $adtype = "PredictionLeague"; include ("adserver.php"); $loggedin = "n"; if (isset($US_ID)) { # log them in $sql = "select * from Football_PL_Users where PLU_Key = " . $US_ID; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $loggedin = 'y'; $US_IDname = $row['PLU_Team']; $PLU_POSITION = $row['PLU_Position']; $PLU_REMINDER = $row['PLU_Reminder']; $PLU_ACTIVE = $row['PLU_Active']; } } if (isset($US_ID) and $loggedin == "n") { # register user for PL $sql = "insert into Football_PL_Users values(" . $US_ID . ", '', 'Y', '', '0', '0', '0', '0', '0', '0', '999999', '9999', '', 'Y', 'N', 0, '', 'Y', 0, 0)"; mysql_query($sql); $sql = "select * from Football_PL_Users where PLU_Key = " . $US_ID; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $loggedin = 'y'; $US_IDname = $row['PLU_Team']; $PLU_POSITION = $row['PLU_Position']; $PLU_REMINDER = $row['PLU_Reminder']; $PLU_ACTIVE = $row['PLU_Active']; } } if ($PARAMETER1 == "summary" or $PARAMETER1 == "") { # summary/homescreen $today = date("Ymd"); print "

The $SITE_NAME Prediction League

Welcome to the $SITE_NAME Prediction League for the $YEARDESC season. Predict the results of $TEAM_NAME league matches and get points awarded for their accuracy.

"; if (isset($US_ID)) { $preds = ""; $sql1 = "select * from Football_PL_Predictions where PLE_User = $US_ID and PLE_Match = $PARM_MATCH limit 1"; $res1 = mysql_query($sql1); while ($row1 = mysql_fetch_array($res1)) $preds = "You have already registered your prediction for $match_dets, but you may change your mind prior to kick-off. Click here to enter your new prediction."; if ($preds == "") $preds = "You have yet to register your prediction for $match_dets. Click here to make your prediction."; print "

$preds

"; } else print "

Please log in or register to predict the scoreline and scorer of $match_dets

"; $other = ""; $data00 = ""; $data01 = ""; $data02 = ""; $data03 = ""; $data04 = ""; $data05 = ""; $data10 = ""; $data11 = ""; $data12 = ""; $data13 = ""; $data14 = ""; $data15 = ""; $data20 = ""; $data21 = ""; $data22 = ""; $data23 = ""; $data24 = ""; $data25 = ""; $data30 = ""; $data31 = ""; $data32 = ""; $data33 = ""; $data34 = ""; $data35 = ""; $data40 = ""; $data41 = ""; $data42 = ""; $data43 = ""; $data44 = ""; $data45 = ""; $data50 = ""; $data51 = ""; $data52 = ""; $data53 = ""; $data54 = ""; $data55 = ""; $homewin = 0; $draw = 0; $awaywin = 0; $sql = "select count(*) count, PLE_HomeScore, PLE_AwayScore from Football_PL_Predictions , Football_PL_Users where PLE_User = PLU_Key and PLE_Match = " . mysql_real_escape_string($PARM_MATCH) . " and (PLE_Flag = 'P' or PLE_Flag = ' ') group by PLE_HomeScore, PLE_AwayScore"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $homescore = $row['PLE_HomeScore']; $awayscore = $row['PLE_AwayScore']; if (($homescore < 6) & ($awayscore < 6)) { if (($homescore == 0) & ($awayscore == 0)) { $data00 = $row['count']; } if (($homescore == 0) & ($awayscore == 1)) { $data01 = $row['count']; } if (($homescore == 0) & ($awayscore == 2)) { $data02 = $row['count']; } if (($homescore == 0) & ($awayscore == 3)) { $data03 = $row['count']; } if (($homescore == 0) & ($awayscore == 4)) { $data04 = $row['count']; } if (($homescore == 0) & ($awayscore == 5)) { $data05 = $row['count']; } if (($homescore == 1) & ($awayscore == 0)) { $data10 = $row['count']; } if (($homescore == 1) & ($awayscore == 1)) { $data11 = $row['count']; } if (($homescore == 1) & ($awayscore == 2)) { $data12 = $row['count']; } if (($homescore == 1) & ($awayscore == 3)) { $data13 = $row['count']; } if (($homescore == 1) & ($awayscore == 4)) { $data14 = $row['count']; } if (($homescore == 1) & ($awayscore == 5)) { $data15 = $row['count']; } if (($homescore == 2) & ($awayscore == 0)) { $data20 = $row['count']; } if (($homescore == 2) & ($awayscore == 1)) { $data21 = $row['count']; } if (($homescore == 2) & ($awayscore == 2)) { $data22 = $row['count']; } if (($homescore == 2) & ($awayscore == 3)) { $data23 = $row['count']; } if (($homescore == 2) & ($awayscore == 4)) { $data24 = $row['count']; } if (($homescore == 2) & ($awayscore == 5)) { $data25 = $row['count']; } if (($homescore == 3) & ($awayscore == 0)) { $data30 = $row['count']; } if (($homescore == 3) & ($awayscore == 1)) { $data31 = $row['count']; } if (($homescore == 3) & ($awayscore == 2)) { $data32 = $row['count']; } if (($homescore == 3) & ($awayscore == 3)) { $data33 = $row['count']; } if (($homescore == 3) & ($awayscore == 4)) { $data34 = $row['count']; } if (($homescore == 3) & ($awayscore == 5)) { $data35 = $row['count']; } if (($homescore == 4) & ($awayscore == 0)) { $data40 = $row['count']; } if (($homescore == 4) & ($awayscore == 1)) { $data41 = $row['count']; } if (($homescore == 4) & ($awayscore == 2)) { $data42 = $row['count']; } if (($homescore == 4) & ($awayscore == 3)) { $data43 = $row['count']; } if (($homescore == 4) & ($awayscore == 4)) { $data44 = $row['count']; } if (($homescore == 4) & ($awayscore == 5)) { $data45 = $row['count']; } if (($homescore == 5) & ($awayscore == 0)) { $data50 = $row['count']; } if (($homescore == 5) & ($awayscore == 1)) { $data51 = $row['count']; } if (($homescore == 5) & ($awayscore == 2)) { $data52 = $row['count']; } if (($homescore == 5) & ($awayscore == 3)) { $data53 = $row['count']; } if (($homescore == 5) & ($awayscore == 4)) { $data54 = $row['count']; } if (($homescore == 5) & ($awayscore == 5)) { $data55 = $row['count']; } } else { $other = $other + $row['count']; } if ($homescore > $awayscore) { $homewin = $homewin + $row['count']; } else { if ($homescore < $awayscore) { $awaywin = $awaywin + $row['count']; } else { $draw = $draw + $row['count']; } } } $total = $homewin + $draw + $awaywin; if ($total == 0) { $total = 1; } $total++; $homewidth = $homewin / $total * 350; $drawwidth = $draw / $total * 350; $awaywidth = $awaywin / $total * 350; $sql = "select PLG_HomeTeam, PLG_AwayTeam from Football_GA_Games where PLG_ID = " . mysql_real_escape_string($PARM_MATCH); $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $hometeam = $row['PLG_HomeTeam']; $awayteam = $row['PLG_AwayTeam']; } # display screen print "

Prediction Summary

$hometeam v $awayteam"; print "

"; print ""; print ""; print ""; print ""; print ""; print ""; print "
Away
012345
Home0$data00$data01$data02$data03$data04$data05
1$data10$data11$data12$data13$data14$data15
2$data20$data21$data22$data23$data24$data25
3$data30$data31$data32$data33$data34$data35
4$data40$data41$data42$data43$data44$data45
5$data50$data51$data52$data53$data54$data55
Other Scores: $other

"; print "
"; $sql = "select count(*) count, PLP_Surname, PLP_Forename from Football_PL_Players, Football_PL_Predictions, Football_PL_Users where PLE_User = PLU_Key and PLE_Match = " . mysql_real_escape_string($PARM_MATCH) . " and PLE_Scorer=PLP_ID and (PLE_Flag=' ' or PLE_Flag='P') group by PLE_Scorer order by count desc"; $res = mysql_query($sql); $chartdata = ""; while ($row = mysql_fetch_array($res)) { if ($chartdata != "") $chartdata .= ","; $chartdata .= "['" . addslashes($row['PLP_Surname']) . "', {$row['count']}]"; } print "
"; } if ($PARAMETER1 == "predict") { # place prediction if ($loggedin != "y") { fError(); print "
"; require("fb_bottom.php"); exit; } $sql = "select US_Domain from US_Users where US_ID = " . $US_ID; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) if ($row['US_Domain'] != $SITE_ID) { fError(); print ""; require("fb_bottom.php"); exit; } print "

Enter Prediction

"; $sql = "select PLG_ID, PLG_HomeTeam, PLG_AwayTeam from Football_GA_Games where PLG_ID = " . mysql_real_escape_string($PARM_MATCH); $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) print "
{$row['PLG_HomeTeam']}{$row['PLG_AwayTeam']}
First to score for $TEAM_NAME:

or click here to select a different match

"; } if ($PARAMETER1 == "validate-prediction" and isset($_POST['scorer'])) { # validate prediction if ($loggedin != "y") { fError(); print ""; require("fb_bottom.php"); exit; } $err = ""; $ErrorText = ""; $playervalid = "n"; $sql= "select PLP_ID, PLP_Surname, PLP_Forename from Football_PL_Players where ((PLP_Team = $TEAM_NUMBER and (PLP_SquadNo > 0 and PLP_SquadNo <= 99)) or (PLP_LoanedTo = $TEAM_NUMBER and (PLP_LoanedToSquad > 0 and PLP_LoanedToSquad <= 99))) and PLP_ID = " . mysql_real_escape_string($_REQUEST['scorer']); $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $player = stripslashes($row['PLP_Forename'] . " " . $row['PLP_Surname']); $playervalid = "y"; } if (($playervalid == "n") and ($_REQUEST['scorer'] != 0) and ($_REQUEST['scorer'] != 99)) { $err = "p"; $ErrorText = $ErrorText . "Player invalid. Please reselect from the list.
"; } $matchvalid = 'n'; $sql = "select PLG_HomeTeam, PLG_AwayTeam, PLG_Date, PLG_Time from Football_GA_Games where PLG_ID = " . mysql_real_escape_string($PARM_MATCH); $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $hometeam = $row['PLG_HomeTeam']; $awayteam = $row['PLG_AwayTeam']; if (($row['PLG_Date'] > $today) or (($row['PLG_Date'] == $today) and ($row['PLG_Time'] > date("Hi")))) { $matchvalid = 'y'; } } # match has elapsed if ($matchvalid == "n") { $err = "m"; } if ($err != "") { print "

Sorry, there was an error processing your match prediction. Please select an option from the menu above.

"; print ""; require("fb_bottom.php"); exit; } else { $sql = "update Football_PL_Predictions set PLE_Flag = 'X' where PLE_Match = " . mysql_real_escape_string($PARM_MATCH) . " and PLE_User = " . $US_ID; mysql_query($sql); if ($_REQUEST['scorer'] == "") { $_REQUEST['scorer'] = 0; $testemail .= "

ERROR CAUGHT!



"; } $sql = "insert into Football_PL_Predictions values (0, " . $US_ID . ", " . mysql_real_escape_string($PARM_MATCH) . ", " . mysql_real_escape_string($_REQUEST['homescore']) . ", " . mysql_real_escape_string($_REQUEST['awayscore']) . ", " . mysql_real_escape_string($_REQUEST['scorer']) . ", now(), ' ')"; if (mysql_query($sql)) { $valid = "y"; $testemail .= "
Passed validation 1
";} else { $valid = "n"; $testemail .= "Error: " . mysql_errno($link) . ": " . mysql_error($link) . "

$sql
\n"; } # Check entry was successful $valid = "n"; $sql = "select PLE_ID from Football_PL_Predictions where PLE_User = $US_ID and PLE_Match = " . mysql_real_escape_string($PARM_MATCH) . " and PLE_HomeScore = " . mysql_real_escape_string($_REQUEST['homescore']) . " and PLE_AwayScore = " . mysql_real_escape_string($_REQUEST['awayscore']) . " and PLE_Scorer = " . mysql_real_escape_string($_REQUEST['scorer']) . " and PLE_Flag = ' '"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $valid = "y"; } if ($valid == "y") { $adtype = "Interstitial"; include ("adserver.php"); print "

Prediction Logged


Your prediction has been logged, but please click here to verify as mistakes cannot be rectified after the match has kicked off.

"; $sql = "insert into LV_Live values($SITE_ID, 'Q', now(), $US_ID, $PARM_MATCH, 'Prediction logged', '$USERNAME has logged his/her prediction for the $match_dets match')"; mysql_query($sql); #$selected_merchant = "WillHill"; $selected_merchant = "888"; $longmatch = "$hometeam v $awayteam"; # print "

How confident are you of your prediction? Fancy a bet? Selected odds from $selected_merchant


"; # print "

Your Score Prediction

"; # print "
"; # $row_bet['BT_SubEvent'] = '90 Minutes'; # print "
"; # $sql_bet2 = "select * from BT_Betting888 where BT_Merchant = \"$selected_merchant\" and BT_Event = \"$longmatch\" and BT_SubEvent = \"Correct Score\" and BT_Selection = \"" . mysql_real_escape_string($_REQUEST['homescore']) . "-" . mysql_real_escape_string($_REQUEST['awayscore']) . "\" limit 1"; $res_bet2 = mysql_query($sql_bet2); # while ($row_bet2 = mysql_fetch_array($res_bet2)) print ""; # print "
{$row_bet2['BT_Selection']}" . displayOdds($row_bet2['BT_Odds'], $row_bet2['BT_Fractional'], $selected_merchant, $row_bet2['BT_URL']) . "
"; # print "

90 Minutes - What will the result be at the end of 90 minutes?

"; # print "
"; # $row_bet['BT_SubEvent'] = '90 Minutes'; # print "
"; # $sql_bet2 = "select * from BT_Betting888 where BT_Merchant = \"$selected_merchant\" and BT_Event = \"$longmatch\" and BT_SubEvent = \"90 Minutes\" and BT_Selection = \"$hometeam\""; $res_bet2 = mysql_query($sql_bet2); # while ($row_bet2 = mysql_fetch_array($res_bet2)) print ""; # $sql_bet2 = "select * from BT_Betting888 where BT_Merchant = \"$selected_merchant\" and BT_Event = \"$longmatch\" and BT_SubEvent = \"90 Minutes\" and BT_Selection = \"Draw\""; $res_bet2 = mysql_query($sql_bet2); # while ($row_bet2 = mysql_fetch_array($res_bet2)) print ""; # $sql_bet2 = "select * from BT_Betting888 where BT_Merchant = \"$selected_merchant\" and BT_Event = \"$longmatch\" and BT_SubEvent = \"90 Minutes\" and BT_Selection = \"$awayteam\""; $res_bet2 = mysql_query($sql_bet2); # while ($row_bet2 = mysql_fetch_array($res_bet2)) print ""; # print "
{$row_bet2['BT_Selection']}" . displayOdds($row_bet2['BT_Odds'], $row_bet2['BT_Fractional'], $selected_merchant, $row_bet2['BT_URL']) . "
{$row_bet2['BT_Selection']}" . displayOdds($row_bet2['BT_Odds'], $row_bet2['BT_Fractional'], $selected_merchant, $row_bet2['BT_URL']) . "
{$row_bet2['BT_Selection']}" . displayOdds($row_bet2['BT_Odds'], $row_bet2['BT_Fractional'], $selected_merchant, $row_bet2['BT_URL']) . "
"; # print "

Top Scorer Markets - Who will score, and how many?

"; # print "
"; # print "
"; # print ""; # $playervalid = "n"; $player = ""; # $sql = "select PLP_ID, PLP_Surname, PLP_Forename from Football_PL_Players where ((PLP_Team = $TEAM_NUMBER and (PLP_SquadNo > 0 and PLP_SquadNo <= 99)) or (PLP_LoanedTo = $TEAM_NUMBER and (PLP_LoanedToSquad > 0 and PLP_LoanedToSquad <= 99))) and PLP_ID = " . mysql_real_escape_string($_REQUEST['scorer']); # $res = mysql_query($sql); # while ($row = mysql_fetch_array($res)) { # $player = trim(stripslashes($row['PLP_Forename'] . " " . $row['PLP_Surname'])); # $sql_bet2 = "select * from BT_Betting888 where BT_Merchant = \"$selected_merchant\" and BT_Event = \"$longmatch\" and BT_SubEvent = \"First Goalscorer\" and BT_Selection = '$player' limit 1"; # $res_bet2 = mysql_query($sql_bet2); # while ($row_bet2 = mysql_fetch_array($res_bet2)) { # $player = $row_bet2['BT_Selection']; # print ""; # print ""; # } # } # $sql_bet2 = "select * from BT_Betting888 where BT_Merchant = \"$selected_merchant\" and BT_Event = \"$longmatch\" and BT_SubEvent = \"First Goalscorer\" and BT_Selection != 'No Goalscorer' and BT_Selection != '$player' order by BT_Odds limit 5"; # $res_bet2 = mysql_query($sql_bet2); # while ($row_bet2 = mysql_fetch_array($res_bet2)) { # $player = $row_bet2['BT_Selection']; # print ""; # } # $sql_bet2 = "select * from BT_Betting888 where BT_Merchant = \"$selected_merchant\" and BT_Event = \"$longmatch\" and BT_SubEvent = \"First Goalscorer\" and BT_Selection = 'No Goalscorer' order by BT_Odds"; # $res_bet2 = mysql_query($sql_bet2); # while ($row_bet2 = mysql_fetch_array($res_bet2)) { # $player = $row_bet2['BT_Selection']; # print ""; # } # print ""; print ""; } else { print "

Prediction NOT Logged



Sorry, there was a problem with your prediction and has NOT been logged. Please try again and if the problem persists, please contact us via the contact us at the bottom of the page.
"; } } } if ($PARAMETER1 == "prediction-history") { # prediction history if ($loggedin != "y") { fError(); print "
PlayerFirstLastAnyTwo +Three +
$player" . displayOdds($row_bet2['BT_Odds'], $row_bet2['BT_Fractional'], $selected_merchant, $row_bet2['BT_URL']) . ""; # # $sql_bet = "select * from BT_Betting888 where BT_Merchant = \"$selected_merchant\" and BT_Event = \"$longmatch\" and BT_SubEvent = \"Last Goalscorer\" and BT_Selection = \"{$row_bet2['BT_Selection']}\" limit 1"; # $res_bet = mysql_query($sql_bet); # while ($row_bet = mysql_fetch_array($res_bet)) print displayOdds($row_bet['BT_Odds'], $row_bet['BT_Fractional'], $selected_merchant, $row_bet['BT_URL']); # print ""; # # $sql_bet = "select * from BT_Betting888 where BT_Merchant = \"$selected_merchant\" and BT_Event = \"$longmatch\" and BT_SubEvent = \"Anytime Goalscorer\" and BT_Selection = \"{$row_bet2['BT_Selection']}\" limit 1"; # $res_bet = mysql_query($sql_bet); # while ($row_bet = mysql_fetch_array($res_bet)) print displayOdds($row_bet['BT_Odds'], $row_bet['BT_Fractional'], $selected_merchant, $row_bet['BT_URL']); # print ""; # # $sql_bet = "select * from BT_Betting888 where BT_Merchant = \"$selected_merchant\" and BT_Event = \"$longmatch\" and BT_SubEvent = \"Player to Score 2 or More\" and BT_Selection = \"{$row_bet2['BT_Selection']}\" limit 1"; # $res_bet = mysql_query($sql_bet); # while ($row_bet = mysql_fetch_array($res_bet)) print displayOdds($row_bet['BT_Odds'], $row_bet['BT_Fractional'], $selected_merchant, $row_bet['BT_URL']); # print ""; # # $sql_bet = "select * from BT_Betting888 where BT_Merchant = \"$selected_merchant\" and BT_Event = \"$longmatch\" and BT_SubEvent = \"Hat-trick Scorer\" and BT_Selection = \"{$row_bet2['BT_Selection']}\" limit 1"; # $res_bet = mysql_query($sql_bet); # while ($row_bet = mysql_fetch_array($res_bet)) print displayOdds($row_bet['BT_Odds'], $row_bet['BT_Fractional'], $selected_merchant, $row_bet['BT_URL']); # print "
Other goalscorer odds:
$player" . displayOdds($row_bet2['BT_Odds'], $row_bet2['BT_Fractional'], $selected_merchant, $row_bet2['BT_URL']) . ""; # # $sql_bet = "select * from BT_Betting888 where BT_Merchant = \"$selected_merchant\" and BT_Event = \"$longmatch\" and BT_SubEvent = \"Last Goalscorer\" and BT_Selection = \"{$row_bet2['BT_Selection']}\" limit 1"; # $res_bet = mysql_query($sql_bet); # while ($row_bet = mysql_fetch_array($res_bet)) print displayOdds($row_bet['BT_Odds'], $row_bet['BT_Fractional'], $selected_merchant, $row_bet['BT_URL']); # print ""; # # $sql_bet = "select * from BT_Betting888 where BT_Merchant = \"$selected_merchant\" and BT_Event = \"$longmatch\" and BT_SubEvent = \"Anytime Goalscorer\" and BT_Selection = \"{$row_bet2['BT_Selection']}\" limit 1"; # $res_bet = mysql_query($sql_bet); # while ($row_bet = mysql_fetch_array($res_bet)) print displayOdds($row_bet['BT_Odds'], $row_bet['BT_Fractional'], $selected_merchant, $row_bet['BT_URL']); # print ""; # # $sql_bet = "select * from BT_Betting888 where BT_Merchant = \"$selected_merchant\" and BT_Event = \"$longmatch\" and BT_SubEvent = \"Player to Score 2 or More\" and BT_Selection = \"{$row_bet2['BT_Selection']}\" limit 1"; # $res_bet = mysql_query($sql_bet); # while ($row_bet = mysql_fetch_array($res_bet)) print displayOdds($row_bet['BT_Odds'], $row_bet['BT_Fractional'], $selected_merchant, $row_bet['BT_URL']); # print ""; # # $sql_bet = "select * from BT_Betting888 where BT_Merchant = \"$selected_merchant\" and BT_Event = \"$longmatch\" and BT_SubEvent = \"Hat-trick Scorer\" and BT_Selection = \"{$row_bet2['BT_Selection']}\" limit 1"; # $res_bet = mysql_query($sql_bet); # while ($row_bet = mysql_fetch_array($res_bet)) print displayOdds($row_bet['BT_Odds'], $row_bet['BT_Fractional'], $selected_merchant, $row_bet['BT_URL']); # print "
$player" . displayOdds($row_bet2['BT_Odds'], $row_bet2['BT_Fractional'], $selected_merchant, $row_bet2['BT_URL']) . ""; # # $sql_bet = "select * from BT_Betting888 where BT_Merchant = \"$selected_merchant\" and BT_Event = \"$longmatch\" and BT_SubEvent = \"Last Goalscorer\" and BT_Selection = \"{$row_bet2['BT_Selection']}\" limit 1"; # $res_bet = mysql_query($sql_bet); # while ($row_bet = mysql_fetch_array($res_bet)) print displayOdds($row_bet['BT_Odds'], $row_bet['BT_Fractional'], $selected_merchant, $row_bet['BT_URL']); # print "


Many more markets available on our betting page
"; require("fb_bottom.php"); exit; } print "

Your Prediction History

"; print ""; $lastrow = 0; $sql = "select PLE_HomeScore, PLE_DateTime, PLE_AwayScore, PLG_HomeTeam, PLG_AwayTeam, PLG_Date, PLE_Scorer, PLE_Flag, PLG_HomeScorer, PLG_AwayScorer, PLG_HomeScore, PLG_AwayScore from Football_PL_Predictions, Football_GA_Games where PLE_User = $US_ID and PLG_ID = PLE_Match order by PLG_Date desc, PLE_DateTime desc"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $prediction = $row['PLE_HomeScore'] . " - " . $row['PLE_AwayScore']; $date = $row['PLG_Date']; $day = substr($date, 6, 2); $month = substr($date, 4, 2); $year = substr($date, 0, 4); if ($TEAM_NAME == $row['PLG_HomeTeam']) { $venue = "H"; } else { $venue = "A"; } if ($row['PLG_HomeScore'] == -1) { $row['PLG_HomeScore'] = ""; $row['PLG_AwayScore'] = ""; } $scorer = " " . plPlayer($row['PLE_Scorer']); if ($row['PLE_Flag'] == "X") { $prediction = "" . $prediction . " " . $scorer . ""; } else { $prediction = $prediction . " " .$scorer; } #if ($PLG_HomeScorer == -1) { $PLG_HomeScorer = 0; } #if ($PLG_AwayScorer == -1) { $PLG_AwayScorer = 0; } if ($venue == "H") { print ""; } else { print ""; } } print "
DateOpponentsVH - A ActualH - A Prediction
$day/$month/$year{$row['PLG_AwayTeam']}$venue{$row['PLG_HomeScore']} - {$row['PLG_AwayScore']} " . plPlayer($row['PLG_HomeScorer']) . "$prediction
$day/$month/$year{$row['PLG_HomeTeam']}$venue{$row['PLG_HomeScore']} - {$row['PLG_AwayScore']} " . plPlayer($row['PLG_AwayScorer']) . "$prediction
"; } if ($PARAMETER1 == "future-matches") { # future predictions if ($loggedin != "y") { fError(); print "

"; require("fb_bottom.php"); exit; } # get next 10 matches print "

Select Match


"; } if ($PARAMETER1 == "table") { # table print "

$SITE_NAME Prediction League Table $YEARDESC

"; $topics = 1; $pagelength = 20; $pages = mysql_real_escape_string($_REQUEST['pages']); if ($pages == "") { if ($loggedin == "n") { $pages = 1; } else { $pages = 1; if ((intval($PLU_POSITION / $pagelength)) == ($PLU_POSITION / $pagelength)) { $pages = intval($PLU_POSITION / $pagelength); } else { $pages = intval($PLU_POSITION / $pagelength) + 1; } if ($PLU_POSITION == 999999) $pages = 1; } } $topics = 0; $starttopic = ($pages * $pagelength) - ($pagelength - 1); $endtopic = ($pages * $pagelength); print "

"; $sql = "select * from Football_PL_Users, US_Users where PLU_Key = US_ID and US_Domain = $SITE_ID and PLU_Active = 'Y' order by PLU_Position"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $pos = $row['PLU_Position']; if ($pos == 999999) { $pos = "[new]"; } if ($PLU_Position < $PLU_Previous) { $graphic = ""; } else { if ($PLU_Position > $PLU_Previous) { $graphic = ""; } else { $graphic = ""; } } $topics = $topics + 1; if (($topics >= $starttopic) & ($topics <= $endtopic)) { if ($row['PLU_Team'] != "") { $player = $row['PLU_Team']; } else { $player = $row['US_Username']; } print ""; } } print "
PosNamePlayedResultsBonusScorersOutcomesPoints
$pos
$graphic$player
" . $row['PLU_Played'] . "
" . $row['PLU_Scores'] . "
" . $row['PLU_Bonus'] . "
" . $row['PLU_Scorer'] . "
" . $row['PLU_Outcome'] . "
" . $row['PLU_Points'] . "
"; $maxpages = $topics/$pagelength; if (intval($maxpages) < $maxpages) { $maxpages = intval($maxpages) + 1; } for ($x=1; $x <= $maxpages; $x++) { if ($x == $pages) { $selected = "SELECTED"; } else { $selected = ""; } $selector = $selector . "