|
|
echo "Welcome, " . $_SESSION['username']; ?> |
|
| |
if ($error) {
?>
| echo $error_msg ?> |
| |
}
if ($_SESSION['user_id'] != '') {
$check_sql = "SELECT COUNT(team_id) AS count FROM picks WHERE user_id = " . $_SESSION['user_id'];
$check_result = mysql_query($check_sql);
list ($count) = mysql_fetch_row($check_result);
if ($count > 0) {
echo "| You have made your picks.";
} else {
echo " | | You have NOT made your picks.";
}
} else {
echo " | | You must login to make your picks.";
}
if ((int)(date("n") < 9) && ((int)date("Y") <= 2004)) {
echo " You can make/change your picks until Sept. 1 @ 12 AM.";
if ($count > 0) {
echo " Click here to change them.";
} else {
echo " Click here to make them.";
}
} else {
echo " Picks were locked on Sept. 1 @ 12 AM.";
}
echo " | ";
?>
| |
current standings |
$score_sql = "select users.user_id, username, sum(abs(wins.wins-picks.wins)) as score from picks, users, wins where picks.team_id = wins.team_id and users.user_id = picks.user_id group by user_id order by score";
$score_result = mysql_query($score_sql) or trigger_error ('error getting scoreboard: ' . mysql_error() . "\nquery was: $score_sql\n", E_USER_ERROR);
while (list($id, $username, $score) = mysql_fetch_row($score_result)) {
echo "| $username | $score | ";
}
?>
|
|