本文整理汇总了PHP中Player::display_name方法的典型用法代码示例。如果您正苦于以下问题:PHP Player::display_name方法的具体用法?PHP Player::display_name怎么用?PHP Player::display_name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Player
的用法示例。
在下文中一共展示了Player::display_name方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exit
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: checkclash
$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: htmlspecialchars
?>
<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: Player
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: Player
$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: listmessages
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: News
<?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: formvalid
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: exit
</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: switch
// 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: formvalid
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:
<!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:
$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: while
}
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>
<td>{$p->Club->display_name()}</td>
</tr>
EOT;
示例15:
?>
<!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 £{$amount} on behalf of {$team->display_name()}.</p>
EOT;
} else {
print <<<EOT
<p>Recorded payment of £{$amount} on behalf of {$pplayer->display_name()}.</p>
EOT;
}
?>
<p><strong>Thank you!</strong></p>
</div>
</div>
</body>
</html>