当前位置: 首页>>代码示例>>PHP>>正文


PHP Match::summ_score方法代码示例

本文整理汇总了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>
开发者ID:Britgo,项目名称:Online-League,代码行数:31,代码来源:showmtch.php

示例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";
}
?>
开发者ID:Britgo,项目名称:Online-League,代码行数:31,代码来源:matches.php

示例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>
开发者ID:Britgo,项目名称:Online-League,代码行数:30,代码来源:results.php


注:本文中的Match::summ_score方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。