本文整理汇总了PHP中Player::fromsel方法的典型用法代码示例。如果您正苦于以下问题:PHP Player::fromsel方法的具体用法?PHP Player::fromsel怎么用?PHP Player::fromsel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Player
的用法示例。
在下文中一共展示了Player::fromsel方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
$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;
示例2: exit
<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>
示例3: Player
// 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>
示例4: catch
}
} 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) {
示例5: Player
// 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"];
}