<!DOCTYPE html>
<html lang="es">
<head>
	<meta charset="UTF-8">
	<title>Lista Tipo Muestra</title>
	<link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.min.css">
  	<script src="../js/jquery.min.js"></script>
  	<script src="../bootstrap/js/bootstrap.min.js"></script>
  	<link href="../css/ionicons.css" rel="stylesheet" type="text/css">
</head>
<body>
	<div class="table-responsive">
	<?php
		include_once('../php_conexion.php');
		include_once('../Class/funciones.php');
		if (!$conexion) {
		    die('Could not connect: ' . mysqli_error($con));
		}

		$sql="SELECT * FROM tipo_muestra";
		$result = mysqli_query($conexion,$sql);

		echo "<table class='table table-hover table-sm btn-table'>
		<tr class='bg-primary'>
		<th>ID</th>
		<th>Tipo Muestra</th>
		<th>ACCIONES</th>
		</tr>";
		while($row = mysqli_fetch_array($result)) {
		    echo "<tr>";
		    echo "<td>" . $row['id'] . "</td>";
		    echo "<td>" . $row['descripcion'] . "</td>";
		    echo "<td><button class='btn btn-secondary btn-sm active' type='button' onclick='actualizarmuestra(".$row['id'].");return false;'><span class='ion-edit'></span> Modificar</button></td>";
		    echo "</tr>";
		}
		echo "</table>";
	?>
	</div>
	<?php mysqli_close($conexion); ?>
</body>
</html>