Пример #1
0
//   along with this program.  If not, see <http://www.gnu.org/licenses/>.
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';
include 'php/teammemb.php';
include 'php/match.php';
include 'php/matchdate.php';
include 'php/game.php';
$g = new Game();
try {
    $g->fromget();
    $g->fetchdets();
} catch (GameException $e) {
    $mess = $e->getMessage();
    include 'php/wrongentry.php';
    exit(0);
}
$g->delete_result();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<?php 
$Title = "Game Result Delete";
include 'php/head.php';
?>
<body>
<script language="javascript" src="webfn.js"></script>
Пример #2
0
        $mess = $e->getMessage();
        include 'php/wrongentry.php';
        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;
Пример #3
0
} else {
    $dat = $tim = $cr;
}
if ($mid != 0) {
    $mtch = new Match($mid);
    try {
        $mtch->fetchdets();
        $mtch->fetchteams();
    } catch (MatchException $e) {
        $mid = 0;
    }
}
if ($gid != 0) {
    $gam = new Game($gid);
    try {
        $gam->fetchdets();
        $gmtch = new Match($gam->Matchind);
        $gmtch->fetchdets();
        $gmtch->fetchteams();
    } catch (GameException $e) {
        $gid = 0;
    } catch (MatchException $e) {
        $gid = 0;
    }
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<?php 
$Title = "Display Message";
include 'php/head.php';
Пример #4
0
 public function fetchgames()
 {
     $result = array();
     if (!$this->Defaulted) {
         $ret = mysql_query("select ind from game where {$this->queryof('match')} order by ind");
         if (!$ret) {
             throw new MatchException("Game read fail " . mysql_error());
         }
         try {
             while ($row = mysql_fetch_array($ret)) {
                 $g = new Game($row[0], $this->Ind, $this->Division);
                 $g->fetchdets();
                 array_push($result, $g);
             }
         } catch (GameException $e) {
             throw new MatchException($e->getMessage());
         }
     }
     $this->Games = $result;
 }