Booked"; } else $yell = 0; if ($row1['PLGE_R1'] == $player or $row1['PLGE_R2'] == $player or $row1['PLGE_R3'] == $player or $row1['PLGE_R4'] == $player or $row1['PLGE_R5'] == $player) { $red = 100; $title .= "
Sent off"; } else $red = 0; $goal = 0; if ($row1['PLGE_G1'] == $player) { $goal = 100; $title .= "
Goal {$row1['PLGE_G1T']}'"; if ($row1['PLGE_G1P'] != "") $title .= " (pen)"; } if ($row1['PLGE_G2'] == $player) { $goal = 100; $title .= "
Goal {$row1['PLGE_G2T']}'"; if ($row1['PLGE_G2P'] != "") $title .= " (pen)"; } if ($row1['PLGE_G3'] == $player) { $goal = 100; $title .= "
Goal {$row1['PLGE_G3T']}'"; if ($row1['PLGE_G3P'] != "") $title .= " (pen)"; } if ($row1['PLGE_G4'] == $player) { $goal = 100; $title .= "
Goal {$row1['PLGE_G4T']}'"; if ($row1['PLGE_G4P'] != "") $title .= " (pen)"; } if ($row1['PLGE_G5'] == $player) { $goal = 100; $title .= "
Goal {$row1['PLGE_G5T']}'"; if ($row1['PLGE_G5P'] != "") $title .= " (pen)"; } if ($row1['PLGE_G6'] == $player) { $goal = 100; $title .= "
Goal {$row1['PLGE_G6T']}'"; if ($row1['PLGE_G6P'] != "") $title .= " (pen)"; } if ($row1['PLGE_G7'] == $player) { $goal = 100; $title .= "
Goal {$row1['PLGE_G7T']}'"; if ($row1['PLGE_G7P'] != "") $title .= " (pen)"; } if ($row1['PLGE_G8'] == $player) { $goal = 100; $title .= "
Goal {$row1['PLGE_G8T']}'"; if ($row1['PLGE_G8P'] != "") $title .= " (pen)"; } if ($row1['PLGE_G9'] == $player) { $goal = 100; $title .= "
Goal {$row1['PLGE_G9T']}'"; if ($row1['PLGE_G9P'] != "") $title .= " (pen)"; } if ($row1['PLGE_G10'] == $player) { $goal = 100; $title .= "
Goal {$row1['PLGE_G10T']}'"; if ($row1['PLGE_G10P'] != "") $title .= " (pen)"; } $x = 0; $suboff = ""; foreach ($sub1 as &$value) { if ($player == $value) { $suboff = "border-bottom:1px solid " . $col[$x] . ";"; $title .= "
Sub on {$sub1T[$x]}'"; } $x = $x + 1; } $x = 0; $subon = ""; foreach ($sub1R as &$value) { if ($player == $value) { $subon = "border-top:1px solid " . $col[$x] . ";"; $title .= "
Sub off {$sub1T[$x]}'"; } $x = $x + 1; } $teamsheet .= "
$squadno
"; } } } function playerName($player) { $sql = "select PLP_ID, PLP_Surname, PLP_Forename from Football_PL_Players where PLP_ID = $player"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $forename = stripslashes($row['PLP_Forename']); $surname = stripslashes($row['PLP_Surname']); return ("$forename $surname"); }} function ratingBox($player) { global $locked, $ratings_user, $PARM_MATCH, $proc_team, $SITE_ID; if ($locked == "Y") { # rating is locked, display the results $sql = "select avg(PRV_Vote) as vote from Football_PV_PlayerVotes where PRV_Match = $PARM_MATCH and PRV_Player = $player"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) $content = "" . number_format($row['vote'],1) . ""; if ($SITE_ID != 1) { # this should be temporary. it's used to recalculate the ratings $site = -1 * $SITE_ID; $sqlx = "select avg(PRV_Vote) as vote from Football_PV_PlayerVotes where PRV_Match = $PARM_MATCH and PRV_Player = $player"; $resx = mysql_query($sqlx); $x = 0; $a = 0; while ($rowx = mysql_fetch_array($resx)) {$a = $a + $rowx['vote'];$x = $x + 1;} $newavg = $a / $x; $sqlx = "delete from Football_PV_PlayerVotes where PRV_Match = $PARM_MATCH and PRV_Player = $player and PRV_User = $site"; $resx = mysql_query($sqlx); $sqlx = "insert into Football_PV_PlayerVotes values ($PARM_MATCH, $player, '$newavg', $site)"; $resx = mysql_query($sqlx); $sqlx = "delete from Football_PV_PlayerVotes where PRV_Vote = 0"; $resx = mysql_query($sqlx); } } else { # rating is not locked, get their rating and build dropdown $sql = "select PRV_Vote from Football_PV_PlayerVotes where PRV_Match = $PARM_MATCH and PRV_User = $ratings_user and PRV_Player = $player"; $res = mysql_query($sql); $currentrating = "?"; while ($row = mysql_fetch_array($res)) { $currentrating = $row['PRV_Vote']; } $sel = ""; $sel[$currentrating] = "selected"; $content = ""; } return ($content);} function menu($PARAMETER1) { global $PARAMETER2, $PARAMETER3, $PARAMETER4, $PATH, $team, $postcode, $TEAM_NAME, $TM_StreetMap; print "
\n"; } $AdserverPageType = "RATINGS"; require("fb_start.php"); $STYLESHEET = ".forename { font-size: 0.8em; font-style: italic; } .surname { font-size: 1.2em; } .ratingbox { font-size: 1.2em; width:45px; text-align:center} .b10 { background: #666 } .b9 { background: #777 } .b8 { background: #888 } .b7 { background: #999 } .b6 { background: #aaa } .b5 { background: #bbb } .b4 { background: #ccc } .b3 { background: #ddd } .b2 { background: #eee } .b1 { background: #fff } "; $STYLESHEET .= "#submenu{ padding: 0 5px 0 0; width: 100%; background: transparent; voice-family: inherit;} #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 }"; if (isset($US_ID)) $ratings_user = $US_ID; else $ratings_user = $_SERVER['REMOTE_ADDR']; $today = date("Ymd"); $timenow = date("Hi"); if (!isset($PARM_MATCH)) { header("Location: $PATH/$RESULTS/"); exit; } else { $sql = "select * from Football_GA_Games where PLG_ID = $PARM_MATCH limit 1"; $res = mysql_query($sql); $row = mysql_fetch_array($res); $PAGE_TITLE = "Player ratings for {$row['PLG_HomeTeam']} v {$row['PLG_AwayTeam']}"; $PAGE_DESCRIPTION = "{$row['PLG_HomeTeam']} v {$row['PLG_AwayTeam']} player ratings as submitted by our visitors"; } if (substr($PARAMETER1, 0, 4) == "rate") { # rate, rateup and ratedown if (isset($US_ID)) { if ($PARAMETER1 == "rateup") { $sql = "select * from Football_YR_YourReport where YR_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { if ($US_ID == $row['YR_User']) print "You can't vote for yourself "; else if (strpos($row['YR_GoodPost'], "[$US_ID]") === false) { $sql = "update Football_YR_YourReport set YR_GoodPost = concat(YR_GoodPost, \"[$US_ID]\") where YR_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; mysql_query($sql); } else { print "You have already voted"; exit; } } } if ($PARAMETER1 == "ratedown") { $sql = "select * from Football_YR_YourReport where YR_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { if ($US_ID == $row['YR_User']) print "You can't vote for yourself "; else if (strpos($row['YR_BadPost'], "[$US_ID]") === false) { $sql = "update Football_YR_YourReport set YR_BadPost = concat(YR_BadPost, \"[$US_ID]\") where YR_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; mysql_query($sql); } else { print "You have already voted"; exit; } } } } else { print "Please log in to vote"; exit; } $sql = "select * from Football_YR_YourReport where YR_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { print "
" . ((substr_count($row['YR_GoodPost'], '[')) - (substr_count($row['YR_BadPost'], '['))) . "
"; } exit; } if ($PARAMETER1 == "report-abuse" and is_numeric($PARAMETER2)) { # report abuse $sql = "select US_ID from US_Users where US_Type = 'A' and US_Domain = $SITE_ID"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $sql2 = "select * from Football_YR_YourReport where YR_ID = " . mysql_real_escape_string($PARAMETER2); $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_array($res2)) { $post = $row2['YR_Text']; $storyid = $row2['YR_Match']; } $subject = "Abuse reported in a match report"; $url = "The following match report has been marked as being abusive:\n\n$post\n\nClick here to delete the message:\nhttp://{$SITE_DOMAIN}{$PATH}/your-report/remove-post/$PARAMETER2/match:$storyid"; $sql_upd = "update YR_YourReport set YR_Text = concat(YR_Text,'') where YR_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; mysql_query($sql_upd); sendPM($US_ID, $row['US_ID'], $subject, $url); } header("location: $PATH/your-report/display/$PARAMETER2/"); exit; } if ($PARAMETER1 == "remove-post" and is_numeric($PARAMETER2) and ($US_TYPE == 'A' or $US_TYPE == 'S')) { # report abuse $sql2 = "update Football_YR_YourReport set YR_Flag = 'D' where YR_ID = " . mysql_real_escape_string($PARAMETER2); mysql_query($sql2); $sql2 = "select * from Football_YR_YourReport where YR_ID = " . mysql_real_escape_string($PARAMETER2); $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_array($res2)) $storyid = $row2['YR_Match']; header("location: $PATH/match-ratings/display/$PARM_MATCH/"); exit; } if ($PARAMETER1 == "add-votes" and isset($PARM_MATCH)) { # process vote $sql = "delete from Football_PV_PlayerVotes where PRV_Match = $PARM_MATCH and PRV_User = '$ratings_user'"; mysql_query($sql); $screenmsg = ""; foreach($_POST as $field => $rating) { if (substr($field, 0, 7) == "player_" and $rating != "?") { $player = intval(str_replace("player_", "", $field)); $valid = "n"; $sql = "select * from Football_GE_GamesExtra, Football_GA_Games where PLGE_Match = PLG_ID and PLGE_Match = $PARM_MATCH"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) if (($row['PLGE_1'] == $player) or ($row['PLGE_2'] == $player) or ($row['PLGE_3'] == $player) or ($row['PLGE_4'] == $player) or ($row['PLGE_5'] == $player) or ($row['PLGE_6'] == $player) or ($row['PLGE_7'] == $player) or ($row['PLGE_8'] == $player) or ($row['PLGE_9'] == $player) or ($row['PLGE_10'] == $player) or ($row['PLGE_11'] == $player) or ($row['PLGE_S1'] == $player) or ($row['PLGE_S2'] == $player) or ($row['PLGE_S3'] == $player) or ($row['PLGE_S4'] == $player) or ($row['PLGE_S5'] == $player) or ($row['PLGE_S6'] == $player) or ($row['PLGE_S7'] == $player) or ($row['PLGE_S8'] == $player) or ($row['PLGE_S9'] == $player) or ($player <= -1 and $player >= -5)) { $valid = "y"; $team = $row['PLGE_Team']; } if ($valid == "y") { $sql = "insert into Football_PV_PlayerVotes values ($PARM_MATCH, $player, " . intval($rating) . ", '$ratings_user')"; mysql_query($sql); $screenmsg = "Thanks for submitting your votes
"; $site = ($SITE_ID * -1); if ($TEAM_NUMBER == $team) { $sql = "select avg(PRV_Vote) as vote from Football_PV_PlayerVotes where PRV_Match = $PARM_MATCH and PRV_Player = $player"; $res = mysql_query($sql); $x = 0; $a = 0; while ($row = mysql_fetch_array($res)) {$a = $a + $row['vote'];$x = $x + 1;} $newavg = $a / $x; $sql = "delete from Football_PV_PlayerVotes where PRV_Match = $PARM_MATCH and PRV_Player = $player and PRV_User = $site"; $res = mysql_query($sql); $sql = "insert into Football_PV_PlayerVotes values ($PARM_MATCH, $player, '$newavg', $site)"; $res = mysql_query($sql); # $sql = "select avg(PRV_Vote) as vote from Football_PV_PlayerVotes, Football_GA_Games where PRV_Match = PLG_ID and (PLG_HomeTeam = \"$TEAM_NAME\" or PLG_AwayTeam = \"$TEAM_NAME\") and PLG_Date > $MINDATE and PRV_Player = $player"; # $res = mysql_query($sql); # $x = 0; $a = 0; # while ($row = mysql_fetch_array($res)) {$a = $a + $row['vote'];$x = $x + 1;} # $newavg = $a / $x; # $sql = "delete from Football_PV_PlayerVotes where PRV_Match = 0 and PRV_Player = $player and PRV_User = $site"; $res = mysql_query($sql); # $sql = "insert into Football_PV_PlayerVotes values (0, $player, '$newavg', $site)"; $res = mysql_query($sql); } } } } $commenterror = "n"; if ($_POST['comment'] != "") { $swearerr = swearcheck($_POST['comment']); if ($swearerr == "Y") { $commenterror = "y"; } else { $sql = "insert into Football_YR_YourReport values (0, $SITE_ID, $PARM_MATCH, $US_ID, '" . mysql_real_escape_string($_POST['comment']) . "', now(), '" . $_SERVER['REMOTE_ADDR'] . "', 'A', '', '')"; mysql_query($sql); $sql = "insert into LV_Live values ($SITE_ID, 'Y', now(), $US_ID, $PARM_MATCH, '', '" . mysql_real_escape_string($_POST['comment']) . "')"; mysql_query($sql); $update_users = "update US_Users set US_YourReport = US_YourReport + 1 where US_ID = " . $US_ID; } } $PARAMETER1 = "display"; } if ($PARAMETER1 == "summary") { # summary require("fb_top.php"); subMenu('r', $PARM_MATCH, 0); menu($PARAMETER1); $site = $SITE_ID * -1; $sql = "select min(PRV_Vote) as min, max(PRV_Vote) as max, avg(PRV_Vote) as avg, count(*) as count, PLP_ID, PLP_Surname, PLP_Forename from Football_PV_PlayerVotes, Football_PL_Players where PRV_PLayer = PLP_ID and PRV_User = $site and PRV_Match > 0 and (PLP_Team = $TEAM_NUMBER or PLP_LoanedTo = $TEAM_NUMBER) group by PRV_Player order by avg desc"; $res = mysql_query($sql); print "

$TEAM_NAME Player Ratings For $YEARDESC

"; $x = 0; while ($row = mysql_fetch_array($res)) { $player = playerName($row['PRV_Player']); $x = $x + 1; #$sql1 = "select min(PRV_Vote) as min, max(PRV_Vote), avg(PRV_Vote) from Football_PV_PlayerVotes where PRV_User = -1 and PRV_Player = 4895 and PRV_Match > 0 group by PRV_Player order by PRV_Vote desc"; printf("",playerName($row['PLP_ID']), $row['avg'], $x, $row['min'], $row['max'], $row['count']); } print "
#PlayerPlayedAverageMinimumMaximum
%3\$u%1\$s%6\$.0f%2\$.2f%4\$.2f%5\$.2f
"; $adtype = "SuperMPU"; include ("adserver.php"); print "
"; } if ($PARAMETER1 == "myratings") { # summary require("fb_top.php"); subMenu('r', $PARM_MATCH, 0); menu($PARAMETER1); if (isset($US_ID)) { $site = $SITE_ID * -1; $sql = "select min(PRV_Vote) as min, max(PRV_Vote) as max, avg(PRV_Vote) as avg, count(*) as count, PLP_ID, PLP_Surname, PLP_Forename from Football_PV_PlayerVotes, Football_PL_Players where PRV_PLayer = PLP_ID and PRV_User = $US_ID and PRV_Match > 0 and (PLP_Team = $TEAM_NUMBER or PLP_LoanedTo = $TEAM_NUMBER) group by PRV_Player order by avg desc"; $res = mysql_query($sql); print "

$TEAM_NAME Player Ratings Summary for $YEARDESC by $US_USERNAME

"; $x = 0; while ($row = mysql_fetch_array($res)) { $player = playerName($row['PRV_Player']); $x = $x + 1; printf("",playerName($row['PLP_ID']), $row['avg'], $x, $row['min'], $row['max'], $row['count']); } print "
#PlayerMatch VotesAverageMinimumMaximum
%3\$u%1\$s%6\$.0f%2\$.2f%4\$.2f%5\$.2f
"; $adtype = "SuperMPU"; include ("adserver.php"); print "
"; } else { print "

Personalised $TEAM_NAME Player Ratings Summary for $YEARDESC

You are not logged in so we can't show you your personalised ratings. Make sure you log in each time you rate the players which builds up your own unique list over the season.

"; print "
"; $adtype = "SuperMPU"; include ("adserver.php"); print "
"; } } if ($PARAMETER1 == "display") { # match ratings $sql = "select * from Football_GA_Games where PLG_ID = $PARM_MATCH limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $PLG_HomeTeam = $row['PLG_HomeTeam']; $PLG_AwayTeam = $row['PLG_AwayTeam']; $PLG_Date = $row['PLG_Date']; $PLG_Time = $row['PLG_Time']; if ($PLG_Time < 1000) $PLG_Time = 0 . $PLG_Time; } $sql = "select * from Football_TM_Teams where TM_TeamName = '$PLG_HomeTeam' limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $PLG_HomeTeamNo = $row['TM_ID']; } $sql = "select * from Football_TM_Teams where TM_TeamName = '$PLG_AwayTeam' limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $PLG_AwayTeamNo = $row['TM_ID']; } $JAVASCRIPT = ""; require("fb_top.php"); subMenu('r', $PARM_MATCH, 0); menu($PARAMETER1); # if (date('YmdHi', strtotime($PLG_Date."0000 + 2 days")) < date("YmdHi")) $locked = "Y"; else $locked = "N"; if (date('YmdHi', strtotime($PLG_Date."0000 + 5 days")) < date("YmdHi")) $locked = "Y"; else $locked = "N"; $lockdate = "midnight on " . date('l jS F', strtotime($PLG_Date."0000 + 1 days")); print "
"; if (isset($screenmsg)) print "
$screenmsg
"; if ($locked == "N") print "

Voting is OPEN. Click here to submit your votes.

"; else print "

Voting was locked for this match at $lockdate but you may still add your mini match reports. Note that members and non-members alike were able to vote.

"; print "
"; $locked = "Y"; # home team $proc_team = $PLG_HomeTeamNo; $sql = "select * from Football_GE_GamesExtra where PLGE_Match = $PARM_MATCH and PLGE_Team = $proc_team limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { print ""; $playerno = $row['PLGE_1']; print "\n"; $playerno = $row['PLGE_2']; print "\n"; $playerno = $row['PLGE_3']; print "\n"; $playerno = $row['PLGE_4']; print "\n"; $playerno = $row['PLGE_5']; print "\n"; $playerno = $row['PLGE_6']; print "\n"; $playerno = $row['PLGE_7']; print "\n"; $playerno = $row['PLGE_8']; print "\n"; $playerno = $row['PLGE_9']; print "\n"; $playerno = $row['PLGE_10']; print "\n"; $playerno = $row['PLGE_11']; print "\n"; print "\n"; if ($row['PLGE_S1R'] > 0) { $playerno = $row['PLGE_S1']; print "\n"; } if ($row['PLGE_S2R'] > 0) { $playerno = $row['PLGE_S2']; print "\n"; } if ($row['PLGE_S3R'] > 0) { $playerno = $row['PLGE_S3']; print "\n"; } if ($row['PLGE_S4R'] > 0) { $playerno = $row['PLGE_S4']; print "\n"; } if ($row['PLGE_S5R'] > 0) { $playerno = $row['PLGE_S5']; print "\n"; } if ($row['PLGE_S6R'] > 0) { $playerno = $row['PLGE_S6']; print "\n"; } if ($row['PLGE_S7R'] > 0) { $playerno = $row['PLGE_S7']; print "\n"; } if ($row['PLGE_S8R'] > 0) { $playerno = $row['PLGE_S8']; print "\n"; } if ($row['PLGE_S9R'] > 0) { $playerno = $row['PLGE_S9']; print "\n"; } #print "\n"; #$playerno = -2; print "\n"; print "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
Manager Tactics" . ratingBox($playerno) . "
"; } print "
"; # away team $proc_team = $PLG_AwayTeamNo; $sql = "select * from Football_GE_GamesExtra where PLGE_Match = $PARM_MATCH and PLGE_Team = $proc_team limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { print ""; $playerno = $row['PLGE_1']; print "\n"; $playerno = $row['PLGE_2']; print "\n"; $playerno = $row['PLGE_3']; print "\n"; $playerno = $row['PLGE_4']; print "\n"; $playerno = $row['PLGE_5']; print "\n"; $playerno = $row['PLGE_6']; print "\n"; $playerno = $row['PLGE_7']; print "\n"; $playerno = $row['PLGE_8']; print "\n"; $playerno = $row['PLGE_9']; print "\n"; $playerno = $row['PLGE_10']; print "\n"; $playerno = $row['PLGE_11']; print "\n"; print "\n"; if ($row['PLGE_S1R'] > 0) { $playerno = $row['PLGE_S1']; print "\n"; } if ($row['PLGE_S2R'] > 0) { $playerno = $row['PLGE_S2']; print "\n"; } if ($row['PLGE_S3R'] > 0) { $playerno = $row['PLGE_S3']; print "\n"; } if ($row['PLGE_S4R'] > 0) { $playerno = $row['PLGE_S4']; print "\n"; } if ($row['PLGE_S5R'] > 0) { $playerno = $row['PLGE_S5']; print "\n"; } if ($row['PLGE_S6R'] > 0) { $playerno = $row['PLGE_S6']; print "\n"; } if ($row['PLGE_S7R'] > 0) { $playerno = $row['PLGE_S7']; print "\n"; } if ($row['PLGE_S8R'] > 0) { $playerno = $row['PLGE_S8']; print "\n"; } if ($row['PLGE_S9R'] > 0) { $playerno = $row['PLGE_S9']; print "\n"; } #print "\n"; #$playerno = -2; print "\n"; print "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "Manager Tactics
"; } print "

"; print ""; $playerno = -1; print ""; $playerno = -5; print ""; print "
Referee" . ratingBox($playerno) . " 
Match Rating" . ratingBox($playerno) . " 
"; if (isset($US_ID)) { print "
Optionally, add a mini report of the match:

"; $button = "Submit Ratings/Report"; } else $button = "Submit Ratings"; print "
"; $sql = "select count(*) as cnt from Football_YR_YourReport, US_Users where YR_User = US_ID and YR_Match = $PARM_MATCH and YR_Flag != 'D'"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) $reports = $row['cnt']; if ($reports > 0) { print "

Your $PLG_HomeTeam v $PLG_AwayTeam Match Reports

"; $sql = "select * from Football_YR_YourReport, US_Users where YR_User = US_ID and YR_Match = $PARM_MATCH and YR_Flag != 'D' order by YR_DateTime"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $topics = $topics + 1; $noofcomments++; $user = "{$row['US_Username']} added " . date("H:i - M j", strtotime($row['YR_DateTime'])) . ""; $comment = processText($row['YR_Text']); if ($US_TYPE == 'A') $abuse = ""; else if ($US_TYPE == 'U') $abuse = "

"; $thumbs = "
" . ((substr_count($row['YR_GoodPost'], '[')) - (substr_count($row['YR_BadPost'], '['))) . "
"; print "
$user

$comment
"; userPanel($row['YR_User']); print "
$abuse$thumbs


"; } } echo "
"; echo "
"; $adtype = "SuperMPU"; include ("adserver.php"); echo "
"; } if ($PARAMETER1 == "rating") { # match ratings $sql = "select * from Football_GA_Games where PLG_ID = $PARM_MATCH limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $PLG_HomeTeam = $row['PLG_HomeTeam']; $PLG_AwayTeam = $row['PLG_AwayTeam']; $PLG_Date = $row['PLG_Date']; $PLG_Time = $row['PLG_Time']; if ($PLG_Time < 1000) $PLG_Time = 0 . $PLG_Time; } $sql = "select * from Football_TM_Teams where TM_TeamName = '$PLG_HomeTeam' limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $PLG_HomeTeamNo = $row['TM_ID']; } $sql = "select * from Football_TM_Teams where TM_TeamName = '$PLG_AwayTeam' limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $PLG_AwayTeamNo = $row['TM_ID']; } $JAVASCRIPT = ""; require("fb_top.php"); subMenu('r', $PARM_MATCH, 0); menu($PARAMETER1); # if (date('YmdHi', strtotime($PLG_Date."0000 + 2 days")) < date("YmdHi")) $locked = "Y"; else $locked = "N"; if (date('YmdHi', strtotime($PLG_Date."0000 + 5 days")) < date("YmdHi")) $locked = "Y"; else $locked = "N"; # $lockdate = "midnight on " . date('l jS F', strtotime($PLG_Date."0000 + 1 days")); $lockdate = "midnight on " . date('l jS F', strtotime($PLG_Date."0000 + 5 days")); print "
"; if (isset($screenmsg)) print "
$screenmsg
"; if ($locked == "N") print "

Voting is OPEN. Click here to submit your votes.

"; else print "

Voting was locked for this match at $lockdate but you may still add your mini match reports. Note that members and non-members alike were able to vote.

"; print "
"; # home team $proc_team = $PLG_HomeTeamNo; $sql = "select * from Football_GE_GamesExtra where PLGE_Match = $PARM_MATCH and PLGE_Team = $proc_team limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { print ""; $playerno = $row['PLGE_1']; print "\n"; $playerno = $row['PLGE_2']; print "\n"; $playerno = $row['PLGE_3']; print "\n"; $playerno = $row['PLGE_4']; print "\n"; $playerno = $row['PLGE_5']; print "\n"; $playerno = $row['PLGE_6']; print "\n"; $playerno = $row['PLGE_7']; print "\n"; $playerno = $row['PLGE_8']; print "\n"; $playerno = $row['PLGE_9']; print "\n"; $playerno = $row['PLGE_10']; print "\n"; $playerno = $row['PLGE_11']; print "\n"; print "\n"; if ($row['PLGE_S1R'] > 0) { $playerno = $row['PLGE_S1']; print "\n"; } if ($row['PLGE_S2R'] > 0) { $playerno = $row['PLGE_S2']; print "\n"; } if ($row['PLGE_S3R'] > 0) { $playerno = $row['PLGE_S3']; print "\n"; } if ($row['PLGE_S4R'] > 0) { $playerno = $row['PLGE_S4']; print "\n"; } if ($row['PLGE_S5R'] > 0) { $playerno = $row['PLGE_S5']; print "\n"; } if ($row['PLGE_S6R'] > 0) { $playerno = $row['PLGE_S6']; print "\n"; } if ($row['PLGE_S7R'] > 0) { $playerno = $row['PLGE_S7']; print "\n"; } if ($row['PLGE_S8R'] > 0) { $playerno = $row['PLGE_S8']; print "\n"; } if ($row['PLGE_S9R'] > 0) { $playerno = $row['PLGE_S9']; print "\n"; } #print "\n"; #$playerno = -2; print "\n"; print "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
" . playerName($playerno) . "" . ratingBox($playerno) . "
Manager Tactics" . ratingBox($playerno) . "
"; } print "
"; # away team $proc_team = $PLG_AwayTeamNo; $sql = "select * from Football_GE_GamesExtra where PLGE_Match = $PARM_MATCH and PLGE_Team = $proc_team limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { print ""; $playerno = $row['PLGE_1']; print "\n"; $playerno = $row['PLGE_2']; print "\n"; $playerno = $row['PLGE_3']; print "\n"; $playerno = $row['PLGE_4']; print "\n"; $playerno = $row['PLGE_5']; print "\n"; $playerno = $row['PLGE_6']; print "\n"; $playerno = $row['PLGE_7']; print "\n"; $playerno = $row['PLGE_8']; print "\n"; $playerno = $row['PLGE_9']; print "\n"; $playerno = $row['PLGE_10']; print "\n"; $playerno = $row['PLGE_11']; print "\n"; print "\n"; if ($row['PLGE_S1R'] > 0) { $playerno = $row['PLGE_S1']; print "\n"; } if ($row['PLGE_S2R'] > 0) { $playerno = $row['PLGE_S2']; print "\n"; } if ($row['PLGE_S3R'] > 0) { $playerno = $row['PLGE_S3']; print "\n"; } if ($row['PLGE_S4R'] > 0) { $playerno = $row['PLGE_S4']; print "\n"; } if ($row['PLGE_S5R'] > 0) { $playerno = $row['PLGE_S5']; print "\n"; } if ($row['PLGE_S6R'] > 0) { $playerno = $row['PLGE_S6']; print "\n"; } if ($row['PLGE_S7R'] > 0) { $playerno = $row['PLGE_S7']; print "\n"; } if ($row['PLGE_S8R'] > 0) { $playerno = $row['PLGE_S8']; print "\n"; } if ($row['PLGE_S9R'] > 0) { $playerno = $row['PLGE_S9']; print "\n"; } #print "\n"; #$playerno = -2; print "\n"; print "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "" . playerName($playerno) . "
" . ratingBox($playerno) . "Manager Tactics
"; } print "

"; print ""; $playerno = -1; print ""; $playerno = -5; print ""; print "
Referee" . ratingBox($playerno) . " 
Match Rating" . ratingBox($playerno) . " 
"; if (isset($US_ID)) { print "
Optionally, add a mini report of the match:

"; $button = "Submit Ratings/Report"; } else $button = "Submit Ratings"; print "
"; $sql = "select count(*) as cnt from Football_YR_YourReport, US_Users where YR_User = US_ID and YR_Match = $PARM_MATCH and YR_Flag != 'D'"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) $reports = $row['cnt']; if ($reports > 0) { print "

Your $PLG_HomeTeam v $PLG_AwayTeam Match Reports

"; $sql = "select * from Football_YR_YourReport, US_Users where YR_User = US_ID and YR_Match = $PARM_MATCH and YR_Flag != 'D' order by YR_DateTime"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $topics = $topics + 1; $noofcomments++; $user = "{$row['US_Username']} added " . date("H:i - M j", strtotime($row['YR_DateTime'])) . ""; $comment = processText($row['YR_Text']); if ($US_TYPE == 'A') $abuse = ""; else if ($US_TYPE == 'U') $abuse = "

"; $thumbs = "
" . ((substr_count($row['YR_GoodPost'], '[')) - (substr_count($row['YR_BadPost'], '['))) . "
"; print "
$user

$comment
"; userPanel($row['YR_User']); print "
$abuse$thumbs


"; } } echo "
"; echo "
"; $adtype = "SuperMPU"; include ("adserver.php"); echo "
"; } print "
"; require("fb_bottom.php"); ?>