'PREGAME', 1 => 'Q1', 2 => 'Q2', 3 => 'Q3', 4 => 'Q4', 5 => 'OT', 6 => 'FINAL'); $awayTeam = $game->gameSchedule->visitorNickname; $homeTeam = $game->gameSchedule->homeNickname; if ($game->score) { $phase = $game->score->phase; $period = array_search($phase, $quaterStatuses); if ($period == 1) { // 1st Quarter, run PickEMailer (sets game status as 'started', no more picks can be made) if ($DEBUG) { echo "

Set pickemailer

"; } checkPickEmailer($homeTeam, $awayTeam, $seasonNum, $weekNum); } else if ($period == 6) { // FINAL $awayScore = $game->score->visitorTeamScore->pointTotal; $homeScore = $game->score->homeTeamScore->pointTotal; setGameWinner($homeTeam, $homeScore, $awayTeam, $awayScore, $weekNum, $League); } } else { $phase = "PREGAME"; } $final = ($phase == "FINAL"); $pregame = ($phase == "PREGAME"); $ot = false; $html = "
"; if($ot) { $html.= ""; } else { $html.= ""; } if ($game->score) { $possTeam = $game->score->possessionTeamAbbr; // Build Vistor team's row $poss = ((strcasecmp($game->gameSchedule->visitorTeamAbbr, $possTeam) == 0) && (!$final && !$pregame)); $html.= buildTeamRow($game->gameSchedule->visitorTeamAbbr, $awayTeam, $game->score->visitorTeamScore, $poss, $ot); // Build Home team's row $poss = ((strcasecmp($game->gameSchedule->homeTeamAbbr, $possTeam) == 0) && (!$final && !$pregame)); $html.= buildTeamRow($game->gameSchedule->homeTeamAbbr, $game->gameSchedule->homeNickname, $game->score->homeTeamScore, $poss, $ot); } else { $html.= buildTeamRow($game->gameSchedule->visitorTeamAbbr, $game->gameSchedule->visitorNickname, NULL, false, false); $html.= buildTeamRow($game->gameSchedule->homeTeamAbbr, $homeTeam, NULL, false, false); } if ($pregame) { $TZOffset = GetTZOffset(); $TZOffset = 3*3600; $timeEastern = date("F j, Y, g:i A", (($game->gameSchedule->isoTime)/1000)+($TZOffset)); $html.= ""; } else if ($final) { $html.= ""; } else { $html.= ""; } $html.= "
".buildGameCenterLink($game->gameSchedule)."1234OTT
".buildGameCenterLink($game->gameSchedule)."1234T
" . $timeEastern . "
" . $phase . "
" . $game->score->time . " " . ordinal($period) . "
"; return $html; } function getPossession($poss) { if ($poss) { return ""; } else { return " "; } } function buildTeamRow($abreviation, $nickName, $score, $possession, $ot) { $tableRow = "".getTeamImg($nickName)." $abreviation ".getPossession($possession).""; if ($score) { $tableRow .= "".$score->pointQ1.""; $tableRow .= "".$score->pointQ2.""; $tableRow .= "".$score->pointQ3.""; $tableRow .= "".$score->pointQ4.""; if($ot) { $tableRow .= "".$score->pointOT.""; } $tableRow .= "".$score->pointTotal.""; } else { if ($ot) { $tableRow .= "000000"; } else { $tableRow .= "00000"; } } return $tableRow; } function getTeamImg($teamName) { $img = "\""."; return $img; } function buildGameCenterLink($game) { //2019010500/2018/POST18/colts@texans $id = $game->gameId; $s = $game->season; $t = $game->seasonType; $w = $game->week; $g = strtolower($game->visitorNickname."@".$game->homeNickname); return "Gamecenter"; } function ordinal($number) { $ends = array('th','st','nd','rd','th','th','th','th','th','th'); if ((($number % 100) >= 11) && (($number%100) <= 13)) return $number. 'th'; else return $number. $ends[$number % 10]; } ?> JoshHughes.com NFL Football Pool
JH Pick'em
  • Home
    Home (current) Game Scores Rules & FAQs Invite Disabled Disabled
  • Standings
    All Standings
    By Score By Percentage By Weighted Score By Survivors
    Group Standings
    By Score By Percentage By Weighted Score By Survivors
    Playoffs Team Standings
  • Picks
    Make Picks Weigh Picks Survivor Picks Quick Picks
  • Breakdown
    Weekly Winners History
  • Members
    Members Invite
  • My Account
    Log In Edit Profile Log Off
Type your username and password.
Type your e-mail.
Register an account.