Esempio n. 1
0
include 'php/histteam.php';
include 'php/histteammemb.php';
include 'php/histmatch.php';
include 'php/matchdate.php';
include 'php/season.php';
try {
    $seas = new Season();
    $seas->fromget();
    $seas->fetchdets();
} catch (SeasonException $e) {
    $mess = $e->getMessage();
    include 'php/wrongentry.php';
    exit(0);
}
try {
    $team = new Histteam($seas);
    $team->fromget();
    $team->fetchdets();
} catch (TeamException $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 
$Title = "Historic Team {$team->display_name()}";
include 'php/head.php';
?>
<body>
Esempio n. 2
0
}
$ret = mysql_query("select matchdate from lgmatch order by matchdate desc limit 1");
if ($ret && mysql_num_rows($ret) > 0) {
    $row = mysql_fetch_array($ret);
    if ($row) {
        $latest->enctime($row[0]);
    }
}
$Seas->Startdate = $earliest;
$Seas->Enddate = $latest;
$Seas->create();
//  Create the historic teams from the current ones
$Full_teams = list_all_teams();
foreach ($Full_teams as $team) {
    $team->fetchdets();
    $hteam = new Histteam($Seas);
    $hteam->Name = $team->Name;
    $hteam->Description = $team->Description;
    $hteam->Division = $team->Division;
    $hteam->Playing = $team->Playing;
    $hteam->Sortrank = $team->get_scores($Pars);
    // Also sets Wonm etc
    $hteam->Playedm = $team->Playedm;
    $hteam->Wonm = $team->Wonm;
    $hteam->Drawnm = $team->Drawnm;
    $hteam->Lostm = $team->Lostm;
    $hteam->Wong = $team->Wong;
    $hteam->Drawng = $team->Drawng;
    $hteam->Lostg = $team->Lostg;
    $hteam->create();
    // Create the members