<!DOCTYPE html>
<html lang="es">

<head>
    <meta charset="UTF-8">
    <title>Lista de Jugadores</title>
    <link rel="stylesheet" href="../public/css/style.css">
</head>

<body>
    <div class="wb">
        <div class="head">
            <div class="tittle">Lista de Jugadores</div>
            <a href="../public/index.php">
                <div class="pic iClose"></div>
            </a>
        </div>
        <div class="container">
            <a href="../public/player.php?action=create" class="button">Crear Jugador</a>
            <?php if (!empty($players)): ?>
                <?php foreach ($players as $player): ?>
                    <a href="../public/player.php?action=edit&id=<?= $player['id'] ?>" class="button">
                        <div class="mainCard">
                            <div class="tittle"><?= htmlspecialchars($player['pNombre'] . ' ' . $player['pApellido']) ?></div>
                        </div>
                    </a>
                <?php endforeach; ?>
            <?php endif; ?>
        </div>
    </div>
</body>

</html>