<?php
require_once __DIR__ . '/auth.php';
dm_require_login();
$user    = dm_user();
$clients = dm_get_clients();
$isAdmin = dm_is_admin();
$defaultClient = (!$isAdmin && count($clients)===1) ? $clients[0]['id'] : 'all';
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Test</title>
</head>
<body>
<p>Usuario: <?= htmlspecialchars($user['name']) ?></p>
<p>Clientes: <?= count($clients) ?></p>
<p>Admin: <?= $isAdmin ? 'si' : 'no' ?></p>
</body>
</html>