<?php
// =====================================================
// POST /setting.php
// Response: { notice }
// =====================================================
require_once 'config.php';

$conn = getConnection();

$result = $conn->query("SELECT notice FROM setting WHERE id = 1 LIMIT 1");

if ($result->num_rows > 0) {
    $row = $result->fetch_assoc();
    echo json_encode(["notice" => $row['notice'] ?? '']);
} else {
    echo json_encode(["notice" => ""]);
}

$conn->close();
