本文整理汇总了PHP中Match::summ_score方法的典型用法代码示例。如果您正苦于以下问题:PHP Match::summ_score方法的具体用法?PHP Match::summ_score怎么用?PHP Match::summ_score使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Match
的用法示例。
在下文中一共展示了Match::summ_score方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
</p>
<p>Team captains are {$mtch->Hteam->display_captain(true)} for {$mtch->Hteam->display_name()}
and {$mtch->Ateam->display_captain(true)} for {$mtch->Ateam->display_name()}.
</p>
EOT;
if ($mtch->Defaulted) {
$wdef = $mtch->Result == 'A' ? $mtch->Ateam : $mtch->Hteam;
print <<<EOT
<p>This match was defaulted in favour of {$wdef->display_name()}.</p>
EOT;
} else {
if ($mtch->Result == 'H' || $mtch->Result == 'A' || $mtch->Result == 'D') {
print <<<EOT
<p>The final score was {$mtch->summ_score()}.</p>
<p>Player and board assignments were:</p>
EOT;
} else {
if ($mtch->Result == 'P') {
print "<p>Score to date is {$mtch->summ_score()}</p>\n";
}
print <<<EOT
<p>Player and board assignments are as follows:</p>
EOT;
}
print <<<EOT
<table class="showmatch">
<tr><th colspan="5" align="center">White</th><th colspan="4" align="center">Black</th><th>Result</th></tr>
示例2: elseif
$hndref = $andref = "</a>";
} else {
$c = $mtch->is_captain($username);
if ($c == 'H' || $c == 'B') {
$href = "<a href=\"tcupdmatch.php?{$mtch->urlof()}&hora=H\" class=\"noundm\">";
$hndref = "</a>";
}
if ($c == 'A' || $c == 'B') {
$aref = "<a href=\"tcupdmatch.php?{$mtch->urlof()}&hora=A\" class=\"noundm\">";
$andref = "</a>";
}
}
print "<td>{$href}{$ht}{$hndref}</td><td>{$aref}{$at}{$andref}</td>\n";
}
if ($mtch->Result == 'H' || $mtch->Result == 'A' || $mtch->Result == 'D') {
print "<td>Played ({$mtch->summ_score()})</td>";
} elseif ($mtch->is_allocated()) {
if ($mtch->Result == 'P') {
print "<td>Part played ({$mtch->summ_score()})</td>";
} else {
print "<td>Not played</td>";
}
} else {
print "<td>TBA</td>";
}
print "</tr>\n";
}
} else {
print "<tr><td colspan=\"3\" align=\"center\">No matches yet for the current season</td></tr>\n";
}
?>
示例3:
EOT;
$ht = $mtch->Hteam->display_name();
$at = $mtch->Ateam->display_name();
if ($mtch->teamalloc()) {
if ($mtch->Result == 'H') {
$ht = "<b>{$ht}</b>";
} else {
if ($mtch->Result == 'A') {
$at = "<b>{$at}</b>";
}
}
$ref = "<a href=\"showmtch.php?{$mtch->urlof()}\" class=\"nound\">";
print "<td>{$ref}{$ht}</a></td><td>{$ref}{$at}</a></td>\n";
} else {
print "<td>{$ht}</td><td>{$at}</td>\n";
}
print "<td>{$mtch->summ_score()}</td></tr>\n";
}
} else {
print "<tr><td colspan=\"4\" align=\"center\">No matches yet</td></tr>\n";
}
?>
</table>
<h2>Previous Seasons</h2>
<p><a href="league.php">Click here</a> to view the league
table and/or league tables and matches from previous seasons.</p>
</div>
</div>
</body>
</html>