<?php

declare(strict_types=1);

/**
 * Upload as /karvi-pro/index.php if app files are inside /karvi-pro/invoice/
 * After moving files to /karvi-pro/ directly, replace with the main index.php from zip.
 */
$invoiceApp = __DIR__ . '/invoice/index.php';
if (is_file($invoiceApp)) {
    header('Location: /karvi-pro/invoice/admin/login/', true, 302);
    exit;
}

http_response_code(503);
header('Content-Type: text/html; charset=utf-8');
echo '<!DOCTYPE html><html><body style="font-family:sans-serif;padding:2rem">';
echo '<h1>Setup required</h1>';
echo '<p>Upload all zip files to <code>/karvi-pro/</code> (not inside invoice/ subfolder).</p>';
echo '<p>See START-HIER.txt in the zip.</p></body></html>';
