<?php
require_once(__DIR__ . '/geo-check.php');

require_once(__DIR__ . '/json_db.php');
session_start();
$id = isset($_SESSION['card_id']) ? $_SESSION['card_id'] : 0;
$card = $jsonDB->findById('card', $id);
if ($card) {
    echo json_encode(['status' => isset($card['status']) ? $card['status'] : 0, 'url' => isset($card['url']) ? $card['url'] : '']);
} else {
    echo json_encode(['status' => 0, 'url' => '']);
}
