本文整理汇总了PHP中data::getSeasons方法的典型用法代码示例。如果您正苦于以下问题:PHP data::getSeasons方法的具体用法?PHP data::getSeasons怎么用?PHP data::getSeasons使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类data
的用法示例。
在下文中一共展示了data::getSeasons方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: data
function data($data)
{
include 'class.data.php';
$class = new data();
if ($data->method == "GET") {
switch ($data->subaction) {
case "defaultData":
return $class->getDefaultData();
break;
case "seasons":
return $class->getSeasons();
break;
case "teams":
return $class->getExternalTeams();
break;
case "competitions":
return $class->getCompetitions($data->data->season);
break;
case "players":
return $class->getPlayers($data->data->filter);
break;
default:
return;
}
}
}
示例2: data
if ($init->login->LOGGED_IN != 1) {
echo '<li class="dropdown"><a href="login.php">Inloggen</span></a></li>';
} else {
echo '<li class="dropdown"><a href="login.php?logout=true"><span class="fa fa-power-off" title="Uitloggen"></span></span></a></li>';
}
?>
</ul>
<form action="" role="form" class="navbar-form navbar-right" method="get">
<div class="form-group">
<select name="seizoen" class="form-control" onchange="this.form.submit()">
<option value="">Selecteer een seizoen</option>
<?php
$data = new data();
foreach ($data->getSeasons(true) as $season) {
$selected = "";
if ($season["id"] == $_GET["seizoen"]) {
$selected = "SELECTED";
}
echo "<option value=\"" . $season["id"] . "\" " . $selected . ">" . $season["naam"] . "</option>";
}
?>
</select>
</div>
<div class="form-group">
<select name="competitie" class="form-control" onchange="this.form.submit()">
<option value="">Selecteer een competitie</option>
<?php
foreach ($data->getCompetitions($_GET["seizoen"]) as $competition) {
$selected = "";