예제 #1
0
        $result = 'W';
    }
} else {
    $g->Wplayer = $player;
    $g->Bplayer = $opp;
    $bkgs = $opp->KGS;
    $wkgs = $player->KGS;
    if ($myres == 'W') {
        $result = 'W';
    } elseif ($myres == 'L') {
        $result = 'B';
    }
}
$g->setup_restype($result, $myrt);
try {
    $g->Sgf = kgsfetchsgf($g);
    $msg = "";
} catch (GameException $e) {
    $msg = htmlspecialchars($e->getMessage());
}
$g->create_game();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<?php 
$Title = "Add Game Result";
include 'php/head.php';
?>
<body class="il">
<script language="javascript" src="webfn.js"></script>
<?php 
예제 #2
0
    exit(0);
}
$date_played = new Matchdate();
$date_played->fromget();
//  Change date and set result
if ($date_played->unequal($g->Date)) {
    $g->reset_date($date_played);
}
$mtch = $g->set_result($_GET["r"], $_GET["rt"]);
// Fix reversed colours
if (isset($_GET["rev"])) {
    $g->reversecolours();
}
//  Try to load KGS file
try {
    $g->set_sgf(kgsfetchsgf($g));
    $msg = "";
} catch (GameException $e) {
    $msg = htmlspecialchars($e->getMessage());
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<?php 
$Title = "Game Result Added";
include 'php/head.php';
?>
<body>
<script language="javascript" src="webfn.js"></script>
<?php 
include 'php/nav.php';