Drawn: {$team->Drawnm} Lost: {$team->Lostm}. </p> <img src="php/piewdl.php?w={$team->Wonm}&d={$team->Drawnm}&l={$team->Lostm}"> <br /> <table class="teamdisp"> <tr> \t<th>Date</th> \t<th>Opponent</th> \t<th>Result</th> </tr> EOT; $ret = mysql_query("select ind from histmatch where {$seas->queryof()} and result!='N' and result!='P' and ({$team->queryof('hteam')} or {$team->queryof('ateam')}) order by matchdate"); if ($ret) { while ($row = mysql_fetch_array($ret)) { $mtch = new HistMatch($seas, $row[0]); $mtch->fetchdets(); $oppteam = $mtch->Hteam; if ($oppteam->is_same($team)) { $oppteam = $mtch->Ateam; switch ($mtch->Result) { case 'H': $res = 'Won'; break; case 'D': $res = 'Drawn'; break; case 'A': $res = 'Lost'; break; }
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. include 'php/session.php'; include 'php/opendatabase.php'; include 'php/club.php'; include 'php/rank.php'; include 'php/player.php'; include 'php/season.php'; include 'php/histteam.php'; include 'php/histteammemb.php'; include 'php/histmatch.php'; include 'php/matchdate.php'; include 'php/game.php'; $mtch = new HistMatch(null); try { $mtch->fromget(); $mtch->getseason(); $mtch->fetchdets(); $mtch->fetchteams(); $mtch->fetchgames(); } catch (MatchException $e) { $mess = $e->getMessage(); include 'php/wrongentry.php'; exit(0); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <?php
?> <table class="matchesd"> <tr> <th>Date</th> <th>Team A</th> <th>Team B</th> <th>Score</th> </tr> <?php $ret = mysql_query("select ind from histmatch where {$seas->queryof()} order by divnum,matchdate,hteam,ateam"); if ($ret && mysql_num_rows($ret) > 0) { $lastdiv = -99; while ($row = mysql_fetch_array($ret)) { $ind = $row[0]; $mtch = new HistMatch($seas, $ind); $mtch->fetchdets(); try { $mtch->fetchteams(); $mtch->fetchgames(); } catch (MatchException $e) { continue; } if ($mtch->Division != $lastdiv) { $lastdiv = $mtch->Division; print "<tr><th colspan=\"3\" align=\"center\">Division {$lastdiv}</th></tr>\n"; } print <<<EOT <tr> <td>{$mtch->Date->display_month()}</td> EOT;
$mess = mysql_error(); include 'php/dataerror.php'; exit(0); } try { while ($row = mysql_fetch_array($ret)) { $matchind = $row[0]; $mtch = new Match($matchind); $mtch->fetchdets(); $mtch->fetchgames(); foreach ($mtch->Games as $g) { $g->set_current(false, $Seas->Ind); } // Now set up the hist match unless it's not been played at all if ($mtch->Result != 'N') { $hmtch = new HistMatch($Seas, $mtch->query_ind(), $mtch->Division); $hmtch->Hteam = $mtch->Hteam; $hmtch->Ateam = $mtch->Ateam; $hmtch->Date = $mtch->Date; $hmtch->Hwins = $mtch->Hwins; $hmtch->Awins = $mtch->Awins; $hmtch->Draws = $mtch->Draws; $hmtch->Result = $mtch->Result; $hmtch->Defaulted = $mtch->Defaulted; $hmtch->create(); } } } catch (MatchException $e) { $mess = $e->getMessage(); include 'php/dataerror.php'; exit(0);