<?php

/**
 * Created by PhpStorm.
 * User: Lars
 * Date: 14.01.2016
 * Time: 16:04
 */
require 'gameTableFunctions.php';
$requestHandler = new gameTableFunctions();
$requestHandler->addCustomGame($_POST['name'], $_POST['genre'], $_POST['metacritic'], $_POST['timetobeat']);
header("Location: gameTable.html");
<?php

/**
 * Created by PhpStorm.
 * User: Lars
 * Date: 19.01.2016
 * Time: 08:53
 */
require 'gameTableFunctions.php';
$deleteHandler = new gameTableFunctions();
if (isset($_POST['action'])) {
    if ($_POST['action'] == "delete") {
        $deleteHandler->deleteGameFromDb($_POST['game']);
    }
}
header("Refresh:0");
<?php

/**
 * Created by PhpStorm.
 * User: Lars
 * Date: 18.01.2016
 * Time: 13:40
 */
require 'gameTableFunctions.php';
$requestHandler = new gameTableFunctions();
if (isset($_POST['webAPI'])) {
    if ($_POST['webAPI'] != "") {
        $requestHandler->updateSteamGameList($_POST['webAPI'], $_POST['id'], $_POST['owner']);
        print_r($_POST['webAPI']);
    }
}
<?php

/**
 * Created by PhpStorm.
 * User: Lars
 * Date: 21.01.2016
 * Time: 13:55
 */
require 'gameTableFunctions.php';
$playedHandler = new gameTableFunctions();
if (isset($_POST['action'])) {
    if ($_POST['action'] == "mark") {
        $playedHandler->markAsPlayed($_POST['game']);
    }
}
header("Refresh:0");
<?php

/**
 * Created by PhpStorm.
 * User: Lars
 * Date: 03.02.2016
 * Time: 13:50
 */
require 'gameTableFunctions.php';
$externalGameHandler = new gameTableFunctions();
if (isset($_POST['filename'])) {
    if ($_POST['filename'] != "") {
        $externalGameHandler->extractGamesFromList($_POST['filename']);
    }
}