コード例 #1
0
ファイル: delplayer.php プロジェクト: Britgo/Online-League
if (!$ret) {
    $mess = "Cannot delete player";
    include 'php/dataerror.php';
    exit(0);
}
$nrows = mysql_affected_rows();
if ($nrows == 0) {
    $mess = "No player deleted";
    include 'php/dataerror.php';
    exit(0);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<?php 
$Title = "Deletion of {$player->display_name(false)} complete";
include 'php/head.php';
?>
<body>
<script language="javascript" src="webfn.js"></script>
<?php 
$showadmmenu = true;
include 'php/nav.php';
print <<<EOT
<h1>Deletion of {$player->display_name(false)} complete</h1>
<p>
Deletion of player {$player->display_name(false)} was successful.</p>

EOT;
?>
<p>Click <a href="playupd.php" title="Go back to editing players">here</a> to return to the player update menu.</p>
コード例 #2
0
ファイル: newacct2.php プロジェクト: Britgo/Online-League
    $mess = "No user name given";
    include 'php/wrongentry.php';
    exit(0);
}
//  Get player name and check he doesn't clash
try {
    $player = new Player($playname);
} catch (PlayerException $e) {
    $mess = $e->getMessage();
    include 'php/wrongentry.php';
    exit(0);
}
$ret = mysql_query("select first,last from player where {$player->queryof()}");
if ($ret && mysql_num_rows($ret) != 0) {
    $column = "name";
    $value = $player->display_name(false);
    include 'php/nameclash.php';
    exit(0);
}
function checkclash($column, $value)
{
    if (strlen($value) == 0) {
        return;
    }
    $qvalue = mysql_real_escape_string($value);
    $ret = mysql_query("select {$column} from player where {$column}='{$qvalue}'");
    if ($ret && mysql_num_rows($ret) != 0) {
        include 'php/nameclash.php';
        exit(0);
    }
}
コード例 #3
0
ファイル: dispmessage.php プロジェクト: Britgo/Online-League
?>
<body>
<?php 
include 'php/nav.php';
$mhdr = $hasr ? "Message" : "New message";
print <<<EOT
<h1>{$mhdr}</h1>

<table class="resultsb">
<tr>
\t<td><strong>From:</strong></td>
\t<td>{$fp->display_name()}<td>
</tr>
<tr>
\t<td><strong>To:</strong></td>
\t<td>{$tp->display_name()}<td>
</tr>
<tr>
\t<td><strong>Sent:</strong</td>
\t<td>{$dat} at {$tim}</td>
</tr>
<tr>
\t<td><strong>Subject:</strong</td>
\t<td>{$hsubj}</td>
</tr>

EOT;
concmatch($mid, $mtch);
concmatch($gid, $gmtch);
$hcont = htmlspecialchars($cont);
$hcont = preg_replace("/(\r\n)+\$/", "", $hcont);
コード例 #4
0
ファイル: rempw2.php プロジェクト: Britgo/Online-League
include 'php/player.php';
include 'php/club.php';
try {
    $player = new Player();
    $player->fromget();
    $player->fetchdets();
} catch (PlayerException $e) {
    $mess = $e->getMessage();
    include 'php/wrongentry.php';
    exit(0);
}
$em = $player->Email;
$pw = $player->get_passwd();
if (strlen($em) == 0) {
    $Title = "No email address";
    $Mess = "Player {$player->display_name(false)} has no email address set up.";
} elseif (strlen($pw) == 0) {
    $Title = "No password";
    $Mess = "Player {$player->display_name(false)} has no password set.";
} else {
    $Title = "Reminder sent";
    $Mess = "Reminder was sent OK.";
    $fh = popen("mail -s 'Go League email - password reminder' {$em}", "w");
    fwrite($fh, "Your userid is {$player->Userid}.\n");
    fwrite($fh, "Your password is {$pw}\n");
    pclose($fh);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<?php 
コード例 #5
0
ファイル: sendreply.php プロジェクト: Britgo/Online-League
$recip = new Player();
$recip->fromid($recipid);
$qfrom = mysql_real_escape_string($player->Userid);
$qto = mysql_real_escape_string($recipid);
$qsubj = mysql_real_escape_string($subj);
$qmsgt = mysql_real_escape_string($msgt);
mysql_query("insert into message (fromuser,touser,created,gameind,matchind,subject,contents) values ('{$qfrom}','{$qto}',now(),{$gid},{$mid},'{$qsubj}','{$qmsgt}')");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<?php 
$Qun = htmlspecialchars($username);
$Sun = mysql_real_escape_string($userid);
$Title = "Reply Sent";
include 'php/head.php';
?>
<body>
<?php 
include 'php/nav.php';
print <<<EOT
<h1>Reply Sent</h1>
<p>I believe your reply was sent OK to {$recip->display_name()}.</p>
<p><a href="messages.php">Click Here</a> to go back to messages.</p>

EOT;
?>
</div>
</div>
</body>
</html>
コード例 #6
0
ファイル: messages.php プロジェクト: Britgo/Online-League
function listmessages($userid, $sent)
{
    if ($sent) {
        $searchid = 'touser';
        $fetchid = 'fromuser';
        $msgt = "Sent";
        $fl = "&sent=y";
        $th = "To";
    } else {
        $searchid = 'fromuser';
        $fetchid = 'touser';
        $msgt = "Received";
        $fl = "";
        $th = "From";
    }
    print "<h1>{$msgt} messages</h1>";
    $Sun = mysql_real_escape_string($userid);
    $ret = mysql_query("select {$searchid},created,matchind,gameind,subject,hasread,ind from message where {$fetchid}='{$Sun}' order by created,subject");
    if (!$ret || mysql_num_rows($ret) == 0) {
        print "<p>No messages found.</p>\n";
    } else {
        print <<<EOT
<table class="resultsb">
<tr>
\t<th>{$th}</th>
\t<th>Date</th>
\t<th>Time</th>
\t<th>Match</th>
\t<th>Game</th>
\t<th>Subject</th>
EOT;
        while ($row = mysql_fetch_assoc($ret)) {
            $fu = $row[$searchid];
            $cr = $row["created"];
            $mid = $row["matchind"];
            $gid = $row["gameind"];
            $subj = $row["subject"];
            $qsubj = htmlspecialchars($subj);
            $hasr = $row["hasread"];
            $ind = $row["ind"];
            $fp = new Player();
            $fp->fromid($fu);
            $pre = $post = "";
            if (!$hasr) {
                $pre = "<strong>";
                $post = "</strong>";
            }
            if (preg_match("/(\\d+)-(\\d+)-(\\d+)\\s+(\\d+):(\\d+):(\\d+)/", $cr, $matches)) {
                $dat = $matches[3] . '/' . $matches[2] . '/' . $matches[1];
                $tim = $matches[4] . ':' . $matches[5] . ':' . $matches[6];
            } else {
                $dat = $tim = $cr;
            }
            $am = $mid == 0 ? "-" : "About match";
            $ag = $gid == 0 ? "-" : "About game";
            print <<<EOT
<tr>
\t<td>{$pre}{$fp->display_name()}{$post}</td>
\t<td>{$pre}{$dat}{$post}</td>
\t<td>{$pre}{$tim}{$post}</td>
\t<td>{$pre}{$am}{$post}</td>
\t<td>{$pre}{$ag}{$post}</td>
\t<td><a href="dispmessage.php?msgi={$ind}{$fl}">{$pre}{$qsubj}{$post}</a></td>
</tr>

EOT;
        }
        print "</table>\n";
    }
}
コード例 #7
0
ファイル: loadkgsil.php プロジェクト: Britgo/Online-League
<?php 
include 'php/nav.php';
?>
<h1>Add Game Result</h1>
<p>
Finished adding result with game record for Game between
<?php 
print <<<EOT
<b>{$g->Wplayer->display_name()}</b>
({$g->Wplayer->display_rank()}) as White and
<b>{$g->Bplayer->display_name()}</b>
({$g->Bplayer->display_rank()}) as Black was {$g->display_result()}.
</p>

EOT;
if (strlen($msg) != 0) {
    print <<<EOT
<p>However the game SGF could not be added because of
{$msg}.</p>

EOT;
}
$n = new News($userid, "Individual League game completed between {$player->display_name(false)} and {$opp->display_name(false)} in Division {$player->ILdiv}");
$n->addnews();
?>
<p>Click <a href="ileague.php">here</a> to see the league status now.</p>
</div>
</div>
</body>
</html>
コード例 #8
0
ファイル: ownupd.php プロジェクト: Britgo/Online-League
EOT;
include 'php/nav.php';
print <<<EOT
<h1>Update Details userid {$player->display_userid(0)}</h1>
<p>Please update your details as required using the form below.</p>
EOT;
?>
<p>Please note that email addresses are <b>not</b> published anywhere. The "send email" links are
all indirect.</p>
<?php 
print <<<EOT
<form name="playform" action="ownupd2.php" method="post" enctype="application/x-www-form-urlencoded" onsubmit="javascript:return formvalid();">
{$player->save_hidden()}
<table cellpadding="2" cellspacing="5" border="0">
<tr><td>Player Name</td>
<td><input type="text" name="playname" value="{$player->display_name(false)}"></td></tr>
<tr><td>Club</td>
<td>
EOT;
$player->clubopt();
print <<<EOT
</td></tr>
<tr><td>Rank</td><td>
EOT;
$player->rankopt();
print "</td></tr>\n";
$dp = $player->disp_passwd();
if (strlen($dp) != 0) {
    $dp = " value=\"" . $dp . "\"";
}
$okemch = $player->OKemail ? " checked" : "";
コード例 #9
0
ファイル: addilresult.php プロジェクト: Britgo/Online-League
</body>
</html>

EOT;
    exit(0);
}
if ($player->ILdiv == 0) {
    print <<<EOT
<html>
<head>
<title>Not in league</title>
<link href="/league/bgaleague-style.css" type="text/css" rel="stylesheet"></link>
</head>
<body class="il">
<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" title="Edit you own details, including joining the Individual League">here</a>,
otherwise please go back to the top by  <a href="index.php" title="Go back to home page">clicking here</a>.</p>
</body>
</html>

EOT;
    exit(0);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<?php 
$Title = "Add result in individual League";
コード例 #10
0
ファイル: sendmail2.php プロジェクト: Britgo/Online-League
//   along with this program.  If not, see <http://www.gnu.org/licenses/>.
//   No frame-ish stuff - done in new window
include 'php/session.php';
include 'php/checklogged.php';
include 'php/club.php';
include 'php/rank.php';
include 'php/player.php';
include 'php/opendatabase.php';
try {
    $via = $_POST["via"];
    switch ($via) {
        default:
            $player = new Player();
            $player->frompost();
            $player->fetchdets();
            $name = $player->display_name(false);
            $dest = $player->Email;
            break;
        case "club":
            $club = new Club();
            $club->frompost();
            $club->fetchdets();
            $name = $club->display_contact();
            $dest = $club->Contactemail;
            break;
    }
} catch (PlayerException $e) {
    $mess = $e->getMessage();
    include 'php/wrongentry.php';
    exit(0);
} catch (ClubException $e) {
コード例 #11
0
ファイル: updindplayer.php プロジェクト: Britgo/Online-League
include 'php/player.php';
try {
    $player = new Player();
    $player->fromget();
    $player->fetchdets();
    $player->fetchclub();
} catch (PlayerException $e) {
    $mess = $e->getMessage();
    include 'php/wrongentry.php';
    exit(0);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<?php 
$Title = "Update Player {$player->display_name(false)}";
include 'php/head.php';
?>
<body>
<script language="javascript" src="webfn.js"></script>
<script language="javascript">
function formvalid()
{
      var form = document.playform;
      if  (!nonblank(form.playname.value))  {
         alert("No player name given");
         return false;
      }
      if  (!nonblank(form.userid.value))  {
         alert("No userid given");
         return false;
コード例 #12
0
ファイル: paycanc.php プロジェクト: Britgo/Online-League
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<?php 
$Title = "Payment Cancelled";
include 'php/head.php';
?>
<body>
<?php 
include 'php/nav.php';
?>
<h1>Payment OK</h1>
<?php 
if ($type == 'T') {
    print <<<EOT
<p>Payment on behalf of {$team->display_name()} has been cancelled.</p>

EOT;
} else {
    print <<<EOT
<p>Payment on behalf of {$pplayer->display_name()} has been cancelled.</p>

EOT;
}
?>
<p>Please re-enter the <a href="https://league.britgo.org/payments.php">payments page</a>
when you are ready to start again.</p>
</div>
</div>
</body>
</html>
コード例 #13
0
            $origplayer->Admin = $admin;
        }
        $origplayer->update();
        if ($origplayer->ILpaid) {
            if (!$ilpaid) {
                $origplayer->setpaid(false);
            }
        } else {
            if ($ilpaid) {
                $origplayer->setpaid(true);
            }
        }
        if (strlen($passw) != 0 && $passw != $origplayer->get_passwd()) {
            $origplayer->set_passwd($passw);
        }
        $Title = "Player {$origplayer->display_name(false)} updated OK";
        break;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<?php 
$Title = "Completed player update";
include 'php/head.php';
?>
<body>
<script language="javascript" src="webfn.js"></script>
<?php 
$showadmmenu = true;
include 'php/nav.php';
print <<<EOT
コード例 #14
0
ファイル: pbt.php プロジェクト: Britgo/Online-League
}
print <<<EOT
<tr><th colspan={$cs} align="center">Not in a team</th></tr>
EOT;
$ret = mysql_query("select first,last from player order by last,first,rank desc");
if ($ret) {
    while ($row = mysql_fetch_assoc($ret)) {
        $p = new Player($row["first"], $row["last"]);
        if ($p->count_teams() != 0) {
            continue;
        }
        $p->fetchdets();
        $p->fetchclub();
        print <<<EOT
<tr>
<td>{$p->display_name()}</td>
<td>{$p->display_rank()}</td>
<td>{$p->display_online()}</td>
<td>{$p->played_games(true, 'T')}</td>
<td>{$p->won_games(true, 'T')}</td>
<td>{$p->drawn_games(true, 'T')}</td>
<td>{$p->lost_games(true, 'T')}</td>
<td>&nbsp;&nbsp;&nbsp;</td>
<td>{$p->played_games()}</td>
<td>{$p->won_games()}</td>
<td>{$p->drawn_games()}</td>
<td>{$p->lost_games()}</td>
<td>{$p->Club->display_name()}</td>
</tr>

EOT;
コード例 #15
0
ファイル: payok.php プロジェクト: Britgo/Online-League
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<?php 
$Title = "Payment OK";
include 'php/head.php';
?>
<body>
<?php 
include 'php/nav.php';
?>
<h1>Payment OK</h1>
<?php 
if ($type == 'T') {
    print <<<EOT
<p>Recorded payment of &pound;{$amount} on behalf of {$team->display_name()}.</p>

EOT;
} else {
    print <<<EOT
<p>Recorded payment of &pound;{$amount} on behalf of {$pplayer->display_name()}.</p>

EOT;
}
?>
<p><strong>Thank you!</strong></p>
</div>
</div>
</body>
</html>
コード例 #16
0
ファイル: payver.php プロジェクト: Britgo/Online-League
include 'php/head.php';
?>
<body>
<?php 
include 'php/nav.php';
?>
<h1>Please Confirm Payment OK</h1>
<?php 
if ($type == 'T') {
    print <<<EOT
<p>About to record payment of &pound;{$amount} on behalf of {$team->display_name()}.</p>

EOT;
} else {
    print <<<EOT
<p>About to record payment of &pound;{$amount} on behalf of {$pplayer->display_name()}.</p>

EOT;
}
print <<<EOT
<p>The payment has been entered by {$player->display_name(false)}, PayPal account details are for
EOT;
print " ";
print htmlspecialchars($parsedresp["FIRSTNAME"] . " " . $parsedresp["LASTNAME"]);
print <<<EOT
.</p>

<p>Please confirm this is OK and click the button below:</p>
<form action="payok.php" method="post" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="ind" value="{$ind}" />
<input type="hidden" name="token" value="{$utok}" />
コード例 #17
0
ファイル: sendgmsg.php プロジェクト: Britgo/Online-League
    $mid = $_POST["mi"];
}
if (isset($_POST["gn"])) {
    $gid = $_POST["gn"];
}
$qfrom = mysql_real_escape_string($player->Userid);
$qto = mysql_real_escape_string($recip->Userid);
$qsubj = mysql_real_escape_string($subj);
$qmsgt = mysql_real_escape_string($msgt);
mysql_query("insert into message (fromuser,touser,created,gameind,matchind,subject,contents) values ('{$qfrom}','{$qto}',now(),{$gid},{$mid},'{$qsubj}','{$qmsgt}')");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<?php 
$Title = "Message Sent";
include 'php/head.php';
?>
<body>
<?php 
include 'php/nav.php';
print <<<EOT
<h1>Message Sent</h1>
<p>I believe your message was sent OK to {$recip->display_name()}.</p>
<p><a href="messages.php">Click Here</a> to go back to messages.</p>

EOT;
?>
</div>
</div>
</body>
</html>