prepare($sql);
    $stmt->execute([
        "id" => $_GET["game"],
    ]);
    $game = $stmt->fetch();
    unset($stmt);
    $title = "Game: " . $game["name"];
    $description = "View details about the " . $game["name"] . " vote.";
}
include "partials/head.php";
?>
    
        
        
        
        
            prepare($sql);
                $stmt->execute();
                while ($game = $stmt->fetch()) {
                    static $one_second = new DateInterval("PT1S");
                    static $time_zone = new DateTimeZone("America/New_York");
                    $stmt2 = $db["data"]->prepare('SELECT rank_round_1 AS one, rank_round_2 AS two, rank_round_3 AS three, rank_final AS final FROM submissions
                    WHERE game_id = :game_id AND member_id = :member_id');
                    $stmt2->execute([
                        'game_id' => $game['id'],
                        'member_id' => $_SESSION['account']->id,
                    ]);
                    $ranks = $stmt2->fetch(PDO::FETCH_OBJ);
                    $dates = [
                        "submitstart" => DateTimeImmutable::createFromFormat(
                            "U",
                            $game["submitstart"]
                        )->setTimezone($time_zone),
                        "submitend" => DateTimeImmutable::createFromFormat(
                            "U",
                            $game["submitend"]
                        )->setTimezone($time_zone),
                        "onestart" => DateTimeImmutable::createFromFormat(
                            "U",
                            $game["onestart"]
                        )->setTimezone($time_zone),
                        "twostart" => DateTimeImmutable::createFromFormat(
                            "U",
                            $game["twostart"]
                        )->setTimezone($time_zone),
                        "threestart" => DateTimeImmutable::createFromFormat(
                            "U",
                            $game["threestart"]
                        )->setTimezone($time_zone),
                        "gameend" => DateTimeImmutable::createFromFormat(
                            "U",
                            $game["gameend"]
                        )->setTimezone($time_zone),
                    ];
                    ?>
                
                        
                        = $game["name"] ?>
                        Status: = get_status_message(
                            $game["status_id"]
                        ) ?>
                        Your ranking: = $ranks->one ?? $ranks->two ?? $ranks->three ?? $ranks->final ?? 'N/A' ?>