require_once "functions.php";
require_once "../classes/Confirm.class.php";
if (!isset($_SESSION['logged_in_user_id'])) {
    header("Location: login.php");
}
if (isset($_GET["logout"])) {
    session_destroy();
    header("Location: login.php");
}
$Confirm = new Confirm($mysqli);
if (isset($_GET["edit"])) {
    $Confirm->saveNewEntry($_GET["edit"], $_SESSION['logged_in_user_id']);
}
$contest_array = $Confirm->getAllData();
if (isset($_GET["update"])) {
    $Confirm->updateConfirmData($_GET["confirm_id"], $_GET["result"], $_GET["grade"], $_GET["run_comment"]);
    header("Location: confirm.php");
    exit;
}
?>

<?php 
// lehe nimi
$page_title = "Tulemused ja kommentaarid";
?>

<?php 
require_once "../header.php";
?>

<br><br>