require_once($_SERVER['DOCUMENT_ROOT']."/football/wins/include/game.inc"); class page { public $base = null; public $visual = null; function page() { $this->base = new football_wins(); if (!$this->base->isMobile) $this->visual = new visual_desktop($this->base); else $this->visual = new visual_mobile($this->base); $this->visual->Header($this->base->user->logged_in); $this->base->sportBar(); $this->content(); $this->visual->Footer(); } function content() { $totalwins = 0; $showinputs = false; $q = "SELECT team, averagewins, afcper, nfcper, sbper FROM ".$GLOBALS['football_wins_short']."_average WHERE season = ".$GLOBALS['football_wins_season']; $r = mysql_query($q); while ($row = mysql_fetch_assoc($r)) { $averagewins[$row['team']] = $row['averagewins']; $afcper[$row['team']] = $row['afcper']; $nfcper[$row['team']] = $row['nfcper']; $sbper[$row['team']] = $row['sbper']; } if ($this->base->user->logged_in) { $q = "SELECT team, wins FROM ".$GLOBALS['football_wins_short']."_predictions WHERE season = ".$GLOBALS['football_wins_season']." AND userid = ".$this->base->user->id; $r = mysql_query($q); if (mysql_num_rows($r) > 0) { while ($row = mysql_fetch_assoc($r)) { if ($row['team'] == 1) { $afcchamp = $row['wins']; } else if ($row['team'] == 2) { $nfcchamp = $row['wins']; } else if ($row['team'] == 3) { $sbchamp = $row['wins']; } else { $totalwins += $row['wins']; $teamWins[$row['team']] = $row['wins']; } } } if (!$GLOBALS['football_wins_pastdeadline']) $showinputs = true; } ?>
Predict the number of wins for each team during the regular season and the season's Conference and Super Bowl champions.
if ($this->base->user->logged_in) { ?>Create Group - Invite your friends to compete against each other. Users only need to make 1 set of predictions, they will be used for all groups and overall scoring.
} ?>View distribution of user predictions.
Deadline: echo date("l, F jS, g:ia", strtotime($GLOBALS['football_wins_deadline'])); ?> ET