<?php

include_once 'SportOut.php';
use SportOut\SportOut;
$sportOut = new SportOut();
$sportOut->updatePlayerData($_GET['playerId'], $_GET['updateType']);
Exemple #2
0
<?php

include_once 'SportOut.php';
include_once 'common.php';
use SportOut\SportOut;
$sportOut = new SportOut();
$action = 'getPlayers';
switch ($_GET['action']) {
    case 'getPlayers':
        $type = common\getvar('type', 'all');
        $data = $sportOut->getPlayers($type);
        error_log(print_r($data, true));
        break;
    case 'updateArrivals':
        error_log(print_r($_GET, true));
        $date = getvar('date');
        $data = $sportOut->updateArrivals(getvar('arrivals', array(), true));
        error_log($date . " - " . print_r($data, true));
        break;
}
$data = json_encode($data);
if (array_key_exists('callback', $_GET)) {
    header('Content-Type: text/javascript; charset=utf8');
    $callback = $_GET['callback'];
    echo $callback . '(' . $data . ');';
} else {
    header('Content-Type: application/json; charset=utf8');
    echo $data;
}
Exemple #3
0
<?php

include_once 'SportOut.php';
use SportOut\SportOut;
$sportOut = new SportOut();
$lastMatch = $sportOut->getLastMatch();
$lastMatchClass = $lastMatch['isLive'] ? "live" : "past";
$matchStart = date('U', strtotime($lastMatch['startTime']));
// Test
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">

    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/cyborg/bootstrap.min.css">
    <link rel="stylesheet" href="css/pickadate/default.css">
    <link rel="stylesheet" href="css/pickadate/default.date.css">
    <link rel="stylesheet" href="css/styles.min.css">

    <title>SportOut</title>
</head>
<body>
    <div class="main-container" touch-action="pan-y">
        <nav class="navbar navbar-default navbar-fixed-top">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#topNavBar" aria-expanded="false">