本文整理汇总了PHP中Player::fetchdets方法的典型用法代码示例。如果您正苦于以下问题:PHP Player::fetchdets方法的具体用法?PHP Player::fetchdets怎么用?PHP Player::fetchdets使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Player
的用法示例。
在下文中一共展示了Player::fetchdets方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
</tr>
EOT;
}
}
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> </td>
<td>{$p->played_games()}</td>
<td>{$p->won_games()}</td>
<td>{$p->drawn_games()}</td>
<td>{$p->lost_games()}</td>
示例2: Team
$last = $row["descr2"];
break;
}
try {
if ($type == 'T') {
$team = new Team($teamname);
$team->fetchdets();
// Error if this team has paid
if ($team->Paid) {
$mess = "Team {$teamname} have already paid??";
include 'php/wrongentry.php';
exit(0);
}
} else {
$pplayer = new Player($first, $last);
$pplayer->fetchdets();
// Error if this player has paid
if ($pplayer->ILpaid) {
$mess = "{$first} {$last} is already paid??";
include 'php/wrongentry.php';
exit(0);
}
}
} catch (PlayerException $e) {
$mess = $e->getMessage();
include 'php/wrongentry.php';
exit(0);
} catch (TeamException $e) {
$mess = $e->getMessage();
include 'php/wrongentry.php';
exit(0);
示例3: isset
$playname = $_POST["playname"];
$email = $_POST["email"];
$phone = $_POST["phone"];
$kgs = $_POST["kgs"];
$igs = $_POST["igs"];
$club = $_POST["club"];
$rank = $_POST["rank"];
$passw = $_POST["passw"];
$okem = isset($_POST["okem"]);
$trivia = isset($_POST["trivia"]);
$notes = $_POST["notes"];
$latest = $_POST["latesttime"];
try {
$origplayer = new Player();
$origplayer->frompost();
$origplayer->fetchdets();
} catch (PlayerException $e) {
$mess = $e->getMessage();
include 'php/wrongentry.php';
exit(0);
}
// Check name changes and perform update if applicable
// Note that the "updatename" function does any consequent
// updates like changing team captain name if the player is a
// team captain.
$chname = false;
$newplayer = new Player($playname);
if (!$origplayer->is_same($newplayer)) {
checkname($newplayer);
$origplayer->updatename($newplayer);
$chname = true;
示例4: Player
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;
$colset = true;
break;
示例5: exit
<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>
<p>Problem was {$msg}.</p>
示例6: 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) {
$g->Bteam = $Myteam;
示例7: Player
// 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"];
}
$qfrom = mysql_real_escape_string($player->Userid);