<?php
// config.php ফাইল ইনক্লুড করা হলো
include 'config.php';

header('Content-Type: application/json');

// appinfo টেবিল থেকে withdraw_block_time আনা
$sql = "SELECT withdraw_block_time FROM appinfo WHERE id = 1 LIMIT 1";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
    $row = $result->fetch_assoc();
    $block_time = $row['withdraw_block_time'];

    // আপনার রিকোয়ারমেন্ট অনুযায়ী JSON রেসপন্স Echo করা
    echo json_encode([
        "status" => "success",
        "message" => "Time Fetched Successfully",
        "new_time" => $block_time
    ], JSON_PRETTY_PRINT);
} else {
    // যদি ডাটা না থাকে
    echo json_encode([
        "status" => "error",
        "message" => "No data found",
        "new_time" => "00/00/0000 At 00:00 AM"
    ], JSON_PRETTY_PRINT);
}

$conn->close();
?>
