echo $n_team_d['t_team_name']; ?> </B></H1> Race: <?php echo ucwords(strtolower($n_team_d['t_race_name'])); ?> <BR> Coached By: <?php echo $n_team_d['t_team_coach']; ?> <BR> <?php printroster($_REQUEST['team'], $_REQUEST['jbb']); ?> <table bordercolorlight="#FFFFF0" bordercolordark="#BFBF90" bgcolor="#ffffd0" border="1"> <tbody><tr align="center" bgcolor="#d0d0a0"><th>Result</th><th>Opponent</th><th>Race</th><th>Score</th><th>Cas</th><th>Gate</th><th>Winnings</th><th>Notes & Highlights</th></tr> <?php $q_res = 'SELECT g.*, h.t_team_name home, hr.t_race_name h_race, a.t_team_name visitors, ar.t_race_name a_race FROM t_game g, t_team h, t_team a, t_race hr, t_race ar WHERE' . ' t_h_team_ID = h.t_team_ID' . ' AND t_a_team_ID = a.t_team_ID' . ' AND h.t_race_ID = hr.t_race_ID' . ' AND a.t_race_ID = ar.t_race_ID' . ' AND (t_h_team_ID = ' . $_REQUEST['team'] . ' OR t_a_team_ID = ' . $_REQUEST['team'] . ')' . ' ORDER BY t_game_date'; $r_res = mysql_query($q_res) or die("Error fetching games! " . mysql_error() . " # " . $q_res); while ($n_res = mysql_fetch_array($r_res)) { echo "<tr><td align=center>" . ($n_res['t_game_h_td'] == $n_res['t_game_a_td'] ? 'Draw' : ''); if ($n_res['t_h_team_ID'] == $_REQUEST['team']) { echo $n_res['t_game_h_td'] > $n_res['t_game_a_td'] ? 'Win' : ''; echo $n_res['t_game_h_td'] < $n_res['t_game_a_td'] ? 'Loss' : ''; echo "</td><td>" . $n_res['visitors']; echo "</td><td>" . ucwords(strtolower($n_res['a_race']));
echo $n_team_d['t_team_name']; ?> </B></H1> <P>Race: <?php echo ucwords(strtolower($n_team_d['t_race_name'])); ?> </P> <P>Coached By: <?php echo $n_team_d['t_team_coach']; ?> </P> <P><FORM method=post action="view_teams_preview.php?team=<?php echo $_POST['team'] . '&jbb=' . $_POST['jbb']; ?> "> <input type=hidden name=team value="<?php echo $_POST['team']; ?> "> <input type=submit value="Print/Export team"> </FORM></P> <?php printroster($_POST['team'], $_POST['jbb']); // : End if } ?> </table> </center> </body> </html>