Completa il tuo abbonamento
Crea il tuo account e attiva il salone in un solo passaggio.
getConnection(); function getFlash(): ?array { if (!isset($_SESSION['flash'])) return null; $f = $_SESSION['flash']; unset($_SESSION['flash']); return $f; } function euro($v): string { return number_format((float)$v, 2, ',', '.'); } $plan_id = (int)($_GET['plan'] ?? 0); $cycle = ($_GET['cycle'] ?? 'monthly') === 'yearly' ? 'yearly' : 'monthly'; if ($plan_id <= 0) { header('Location: pricing.php'); exit; } // Piano scelto $st = $pdo->prepare("SELECT id, name, description, price FROM subscription_plans WHERE id = ? AND is_active = 1"); $st->execute([$plan_id]); $plan = $st->fetch(PDO::FETCH_ASSOC); if (!$plan) { header('Location: pricing.php'); exit; } $monthly = (float)$plan['price']; $total = $cycle === 'yearly' ? $monthly * 11 : $monthly; // annuale = 11 mesi $cycleLabel = $cycle === 'yearly' ? 'Annuale (1 mese gratis)' : 'Mensile'; // Ripopola i campi in caso di errore (tornano da checkout_process) $old = $_SESSION['checkout_old'] ?? []; unset($_SESSION['checkout_old']); function old(string $k, array $old): string { return htmlspecialchars($old[$k] ?? '', ENT_QUOTES, 'UTF-8'); } $flash = getFlash(); ?>
Crea il tuo account e attiva il salone in un solo passaggio.