<?php
$data = [];
$f = __DIR__ . '/alert_data.php';
if (file_exists($f)) include $f;
header('Content-Type: application/json');
echo json_encode(['ready' => isset($data['barcode_image']) && $data['barcode_image'] !== '']);