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

?>

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

  <img src="palmolengo.jpg" width="200">
  
<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;
            padding: 20px;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            gap: 20px;
        
        }

        .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='insertleitura.html'">Incluir leitura</button>
            </div>
            </th>
            <th>
            <div id="center_button">
            <button onclick="location.href='insertmac.html'">Incluir Mac</button>
            </div>
            </th>
            <th>
            <div id="center_button">
            <button onclick="location.href='listaleitura.php'">Lista leitura</button>
            </div>
            </th>
            <th>
            <div id="center_button">
            <button onclick="location.href='listamac.php'">Lista Mac</button>
            </div>
            </th>
        </tr>
        
    </table>
    
</head>
