$hadb = false; $forcing = isset($_POST["forceass"]); try { for ($b = 0; $b < 3; $b++) { $h = new Player(); $a = new Player(); $hn = $_POST["htm{$b}"]; $an = $_POST["atm{$b}"]; if (strlen($hn) == 0) { throw new PlayerException("Home team {$b} is null"); } if (strlen($an) == 0) { throw new PlayerException("Away team {$b} is null"); } $h->fromsel($hn); $a->fromsel($an); $h->fetchdets(); $a->fetchdets(); $cols[$b] = $_POST["colours{$b}"]; switch ($cols[$b]) { default: $hadnig = true; break; case 1: // Home player white $hadw = true; $colset = true; break; case 2: // Home player black $hadb = true;
<h1>Not in individual league</h1> <p>Sorry, but you, {$player->display_name(false)} are not currently in the individual league.</p> <p>If you want to join it, please update your account <a href="ownupd.php">here</a>, otherwise start again from the top by <a href="index.php">clicking here</a>.</p> </p> </body> </html> EOT; exit(0); } $opp = new Player(); try { $opp->fromsel($_GET["opp"]); $opp->fetchdets(); if (strlen($opp->KGS) == 0) { throw new PlayerException("Opponent has no KGS name"); } } catch (PlayerException $e) { $msg = htmlspecialchars($e->getMessage()); print <<<EOT <html> <head> <title>No opponent</title> <link href="/league/bgaleague-style.css" type="text/css" rel="stylesheet"></link> </head> <body class="il"> <h1>No opponent</h1> <p>Sorry but I failed to work out who your opponent was.</p>
// 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/matchdate.php'; include 'php/game.php'; include 'php/news.php'; $player = new Player(); $opp = new Player(); try { $player->frompost("pl"); $opp->fromsel($_POST["opp"]); $player->fetchdets(); $opp->fetchdets(); } catch (PlayerException $e) { print <<<EOT <html> <head> <title>Trouble with player details</title> <link href="/league/bgaleague-style.css" type="text/css" rel="stylesheet"></link> </head> <body> <h1>Trouble fetching player details</h1> <p>Sorry something has gone wrong with your player detail posting.</p> <p>Please start again from the top by <a href="index.php" title="Go back to home page">clicking here</a>.</p> </body> </html>
} } catch (MatchException $e) { $mess = $e->getMessage(); include 'php/wrongentry.php'; exit(0); } catch (TeamException $e) { $mess = $e->getMessage(); include 'php/wrongentry.php'; exit(0); } // Is this a "handicappable" division $hcapable = $mtch->Division >= $pars->Hdiv; $hred = $pars->Hreduct; for ($b = 0; $b < 3; $b++) { $h = new Player(); $h->fromsel($_POST["tm{$b}"]); $h->fetchdets(); $player[$b] = $h; } // Sort players by rank unless turned off if (!isset($_POST["forceass"])) { sortrank($player, $pars->Rankfuzz); } // If we haven't got any games yet, select colours as WBW or BWB and create the game // with our team filled in $gnum = $mtch->ngames(); if ($gnum == 0) { $col = rand(0, 1); for ($b = 0; $b < 3; $b++) { $g = $mtch->newgame(); if ($col > 0) {
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // 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'; // Get who I am try { $player = new Player(); $player->fromid($userid); $recip = new Player(); $recip->fromsel($_POST["recip"]); $recip->fetchdets(); } catch (PlayerException $e) { $mess = $e->getMessage(); include 'php/wrongentry.php'; exit(0); } $subj = $_POST["subject"]; $msgt = $_POST["mcont"]; $mid = $gid = 0; if (isset($_POST["mi"])) { $mid = $_POST["mi"]; } if (isset($_POST["gn"])) { $gid = $_POST["gn"]; }