<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <h1>Pizzeria Peachepe</h1> <a href="nuevo.php">Nueva oferta</a> <hr> <?php require_once 'Oferta.php'; $ofertas = Oferta::getOfertas(); foreach ($ofertas as $oferta) { ?> <h3><?php echo $oferta->getTitulo(); ?> </h3> <img src="imagenes/<?php echo $oferta->getImagen(); ?> " width="400"><br> <p><?php echo $oferta->getDescripcion(); ?> </p><br> <a href="borrar.php?id=<?php echo $oferta->getId(); ?> ">Borrar</a>
<?php require_once '../Model/Oferta.php'; // Obtiene todas las ofertas $data['ofertas'] = Oferta::getOfertas(); // Carga la vista de listado include '../View/listado.php';