56 lines
1.8 KiB
PHP
56 lines
1.8 KiB
PHP
<?php include("../includes/_config.php")?>
|
|
|
|
<?php
|
|
require_once('../models/alumno.php');
|
|
$alumnos = Alumno::getAll();
|
|
?>
|
|
|
|
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<?php include("../includes/_head.php")?>
|
|
</head>
|
|
<body>
|
|
<?php include("../includes/_navbar.php")?>
|
|
<div class="container main">
|
|
<div class="row align-items-center">
|
|
<div class="col-10">
|
|
<p class="display-1">Alumnos</p>
|
|
</div>
|
|
<div class="col">
|
|
<a class="btn btn-success btn-block" href="/alumnos/registrar.php">Crear</a>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<table class="table table-bordered">
|
|
<thead class="thead-dark">
|
|
<tr>
|
|
<th scope="col">#</th>
|
|
<th scope="col">Rut</th>
|
|
<th scope="col">Nombre</th>
|
|
<th scope="col" class="control-cell"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach($alumnos as $alumno){?>
|
|
<tr>
|
|
<th scope="row"><?php echo $alumno->get_id() ?></th>
|
|
<td><?php echo $alumno->get_rut() ?></td>
|
|
<td><?php echo $alumno->get_nombre() ?></td>
|
|
<td class="control-cell">
|
|
<form class="form-inline" action="delete_post.php" method="post">
|
|
<a class="btn btn-primary btn-fix-width" href="/alumnos/modificar.php?id=<?php echo $alumno->get_id()?>" role="button">Modificar</a>
|
|
<input type="hidden" class="form-control" id="id" name="id" value="<?php echo $alumno->get_id()?>">
|
|
<button type="submit" class="btn btn-danger btn-fix-width">Eliminar</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
<?php }?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<?php include("../includes/_scripts.php")?>
|
|
</body>
|
|
</html>
|