Example #1
0
        exit(0);
    }
    $hteam = $match->Hteam;
    $ateam = $match->Ateam;
    $recip = $hteam->Captain;
    if ($recip->is_same($player)) {
        $recip = $ateam->Captain;
    }
    $subj = htmlspecialchars("Match: {$hteam->display_name()} -v- {$ateam->display_name()}");
} else {
    // About game, recipient isn't me
    try {
        $game = new Game($gid);
        $game->fetchdets();
        $match = new Match($game->Matchind);
        $match->fetchdets();
        $match->fetchteams();
        // Prefer to get from match although should be the same
    } catch (GameException $e) {
        $mess = $e->getMessage();
        include 'php/wrongentry.php';
        exit(0);
    } catch (MatchException $e) {
        $mess = $e->getMessage();
        include 'php/wrongentry.php';
        exit(0);
    }
    $hteam = $match->Hteam;
    $ateam = $match->Ateam;
    $recip = $game->Wplayer;
    if ($recip->is_same($player)) {
Example #2
0
         $mtch->fetchteams();
         $mtch->delmatch();
     }
     $unplayed_matches = count($inds);
 }
 // Mark unfinished games as drawn
 $ret = mysql_query("select ind from lgmatch where result='P'");
 if ($ret) {
     $inds = array();
     while ($row = mysql_fetch_array($ret)) {
         array_push($inds, $row[0]);
     }
     $today = new Matchdate();
     foreach ($inds as $ind) {
         $mtch = new Match($ind);
         $mtch->fetchdets();
         $mtch->fetchteams();
         $mtch->fetchgames();
         foreach ($mtch->Games as $g) {
             if ($g->Result == 'N') {
                 $g->set_result('J', 'Jigo');
                 $g->reset_date($today);
                 $setdrawn_games++;
             }
         }
     }
 }
 //  Create news item if we actually did anything
 $matchmsg = "{$unplayed_matches} match";
 if ($unplayed_matches != 1) {
     $matchmsg .= 'es';
Example #3
0
 public function delete_result()
 {
     if ($this->League == 'I') {
         mysql_query("delete from game where {$this->queryof()}");
     } else {
         $mtch = new Match($this->Matchind);
         $mtch->fetchdets();
         $this->adj_match($mtch, -1);
         $this->Result = 'N';
         $this->Resultdet = '';
         $mtch->updscore();
         mysql_query("update game set result='N',reshow='',sgf='' where {$this->queryof()}");
     }
 }