<?php
require_once '../includes/config.php';
requireLogin();

$operator_id = intval($_GET['operator_id'] ?? 0);
if (!$operator_id) jsonResponse(false, 'Operator ID দিন');

$user = getCurrentUser();
$db   = getDB();

$stmt = $db->prepare("SELECT * FROM packages WHERE operator_id=? AND status='active' ORDER BY type, amount ASC");
$stmt->execute([$operator_id]);
$packages = $stmt->fetchAll();

jsonResponse(true, 'OK', ['packages' => $packages]);
