Exemplo n.º 1
0
 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;
         }
     }
 }
Exemplo n.º 2
0
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 = "";