<?php
/**
 * MJ Marketplace v3.0.4 lead router.
 * Keeps the existing v3.0.3 CRM pages active:
 * - Admin session -> admin/leads.php
 * - User/seller session -> my-leads.php
 */
require_once __DIR__ . '/includes/functions.php';
$qs = $_SERVER['QUERY_STRING'] ?? '';
if (current_admin()) {
    redirect('admin/leads.php' . ($qs ? ('?' . $qs) : ''));
}
if (current_user()) {
    redirect('my-leads.php' . ($qs ? ('?' . $qs) : ''));
}
redirect('login.php');
