예제 #1
0
<h2>Match Record</h2>
<p>
Match record is Played: {$team->Playedm} Won: {$team->Wonm}
Drawn: {$team->Drawnm} Lost: {$team->Lostm}.
</p>
<img src="php/piewdl.php?w={$team->Won}&d={$team->Drawn}&l={$team->Lost}">
<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 lgmatch where 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 Match($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':
예제 #2
0
include 'php/session.php';
include 'php/checklogged.php';
include 'php/opendatabase.php';
include 'php/club.php';
include 'php/rank.php';
include 'php/player.php';
include 'php/team.php';
try {
    $team = new Team();
    $team->fromget();
    $team->fetchdets();
} catch (TeamException $e) {
    include 'php/wrongentry.php';
    exit(0);
}
$ret = mysql_query("delete from team where {$team->queryof()}");
if (!$ret) {
    $mess = "Cannot delete team";
    include 'php/dataerror.php';
    exit(0);
}
$nrows = mysql_affected_rows();
if ($nrows == 0) {
    $mess = "No team deleted";
    include 'php/dataerror.php';
    exit(0);
}
//  Next is no error if nothing gets deleted.
mysql_query("delete from teammemb where {$team->queryof('teamname')}");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
예제 #3
0
    $mess = "Total {$tot} does not match amount {$amount}";
    include 'php/wrongentry.php';
    exit(0);
}
try {
    if ($type == 'T') {
        $team = new Team($teamname);
        $team->fetchdets();
        // Error if this team has paid
        if ($team->Paid) {
            $mess = "Team {$teamname} have already paid??";
            include 'php/wrongentry.php';
            exit(0);
        }
        // Check we haven't already got a pending payment for this team
        $ret = mysql_query("select ind from pendpay where league='T' and {$team->queryof('descr1')}");
        if (!$ret) {
            $mess = mysql_error();
            include 'php/dataerror.php';
            exit(0);
        }
        if (mysql_num_rows($ret) > 0) {
            $mess = "Duplicated payment record for {$teamname}";
            include 'php/probpay.php';
            exit(0);
        }
        // Create a payment record for the team
        $qteam = mysql_real_escape_string($teamname);
        $ret = mysql_query("insert into paycompl (league,descr1,amount,paypal) values ('T','{$qteam}',{$amount},0)");
        if (!$ret) {
            $mess = mysql_error();