<?php
if (session_status() === PHP_SESSION_NONE) {
    session_start();
}
?>
<!DOCTYPE html>
<html lang="es">
<head>
  <meta charset="UTF-8">
  <title>Tabla estilo DataTables</title>
  <link rel="stylesheet" href="<?php echo URL_PATH; ?>/public/css/table.css">
  <link rel="stylesheet" href="<?php echo URL_PATH; ?>/public/colors.css">
  <link rel="stylesheet" href="<?php echo URL_PATH; ?>/public/menu.css">
  <link rel="stylesheet" href="<?php echo URL_PATH; ?>/public/app.css">
  <link rel="stylesheet" href="<?php echo URL_PATH; ?>/public/css/admin.css">

</head>
<body>
<?php include APP_PATH .'/views/components/navbar.php'; ?>
  <h1>Programas</h1>
  <div class="datatable-container">
    <table class="datatable">
      <thead>
        <tr>
          <th>Codigo Programa</th>
          <th>Nombre Programa</th>
          <th>Accion</th>
        </tr>
      </thead>
      <tbody>
        <?php foreach ($data['programs'] as $program): ?>
        <tr>
          <td><?php echo $program['Codigo']; ?></td>
          <td><?php echo $program['Nombre']; ?></td>
          <td>
          <a href="<?php echo URL_PATH; ?>/programs/edit/<?php echo $program['Codigo']; ?>" class="btn-edit"> <i class="fas fa-edit"></i> Editar </a>
          </td>
        </tr>
        <?php endforeach; ?>
        <!-- Agrega más filas según necesites -->
      </tbody>
    </table>

    <div class="datatable-footer">
      <div class="info">
        Showing 1 to 10 of 57 entries
      </div>
      <div class="pagination">
        <button disabled>Previous</button>
        <button class="active">1</button>
        <button>2</button>
        <button>3</button>
        <button>4</button>
        <button>5</button>
        <button>6</button>
        <button>Next</button>
      </div>
    </div>
  </div>
</body>
<?php include APP_PATH .'/views/components/footer.php'; ?>
</html>
