<?php
$subModules = array(
    'settings' => 'settings.php',
    'items' => 'items.php',
    'form' => 'form.php',
    'bulk' => 'bulk.php',
    'collections' => 'collections.php',
    'campaigns' => 'campaigns.php',
    'operations' => 'operations.php',
    'analytics' => 'analytics.php',
    'support' => 'support.php',
    'logs' => 'logs.php',
);

$page = isset($_REQUEST['page']) ? (string)$_REQUEST['page'] : 'items';
if(!array_key_exists($page, $subModules)) throw new Exception('Sección de tienda inválida.');
$path = __PATH_ADMINCP_MODULES__.'itemshop/'.$subModules[$page];
if(!is_file($path)) throw new Exception('Falta un archivo del módulo Arsenal Nexora.');
try {
    include $path;
} catch(Throwable $e) {
    message('error', htmlspecialchars($e->getMessage(), ENT_QUOTES, 'UTF-8'));
}
