<?php
include "conectabanco.php";
$sql = "SELECT * FROM leitura ";
$stm = $conn->prepare($sql);
$stm->execute();
$macs = $stm->fetchAll(PDO::FETCH_ASSOC);

?>

<!DOCTYPE html>

<html lang="pt-br">    

  <img src="images.jfif" width="100">
  
<head>
    <meta charset="UTF-8">
    <title>Dashboard</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        body {background: #f8f9fa;}

        .dashboard-card {transition: box-shadow .2s;}
        .dashboard-card:hover {
            box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15);
        }
          
    </style>
    <h2>Painel de controle</h2>
    <table>
        <tr>
            <th>
            <div id="center_button">
            <button onclick="location.href='listamac.php'">Lista MAC</button>
            </div>
            </th>
            <th>
            <div id="center_button">
            <button onclick="location.href='insertmac.html'">Inclui MAC</button>
            </div>
            </th>
            <th>
            <div id="center_button">
            <button onclick="location.href='listaleitura.php'">Lista leituras</button>
            </div>
            </th>
            <th>
            <div id="center_button">
            <button onclick="location.href='insertleitura.html'">Inclui leituras</button>
            </div>
            </th>            
            
            <th>
            <div id="center_button">
            <button onclick="location.href='logout.php'">LogOut</button>
            </div>
            </th>

            <th>
            <div id="center_button">
            <button onclick="location.href='insertusuario.html'">insert usuário</button>
            </div>
            </th>
        </tr>
        
    </table>
    
</head>
