<?php

echo "<link rel='stylesheet' href='css/style.css' type='text/css' media='all'>";
include "../persistence_layer/conect.php";
include "../bussines_layer/gestion_producto_bussines.php";
if (isset($_GET["borra"]) and isset($_GET["eliminar"])) {
    baja_alta_product($_GET["eliminar"], $_GET["borra"]);
    echo "<div align=center><h1>SU PRODUCTO SE HA DADO DE BAJA CON EXITO!!\n\t\t<meta http-equiv='Refresh' content='2;url=gestion_empresa.php'></font></h1></div>";
} else {
    $producto = recuperar_producto($_GET["id"]);
    echo "<div align=center><h1>DAR DE BAJA PRODUCTO</h1><br><h2>" . $producto->get_nombre() . "<br>Descripcion: " . $producto->get_descripcion() . "<br><br><br>";
    echo "<notif>ESTA SEGURO?</notif><br><br>";
    echo "<h3>SE DARA DE BAJA EL PRODUCTO!</h3>";
    echo "<table class=tablas><tr>";
    echo "<td width=50%><a href=gestion_producto_eliminar.php?eliminar=" . $_GET["id"] . "&borra=0><notifsi>SI</notifsi></a></td>";
    echo "<td width=50%><a href=gestion_empresa.php><notifno>NO</notifno></a></td>";
    echo "</tr></table>";
}
<?php

echo "<link rel='stylesheet' href='css/style.css' type='text/css' media='all'>";
include "../bussines_layer/gestion_producto_bussines.php";
include "../class/producto.php";
include "../persistence_layer/conect.php";
echo "<!DOCTYPE html>\n<html lang = 'es'>\n<head>\n\t<meta charset = 'utf-8'>\n\t<link rel='stylesheet' type='text/css' href='css/estilo.css'>\n\t\n</head>\n\t<header>\n\t\t<section id='log'>\n\t\t\t\t<h1>Gestión de Productos<h1/>\n\n\t\t</section>\n\n\t\t<nav id='banners'>\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a href='gestion_producto_nuevo.php'><img src='images/nuevo.jpg' height='25' width='25'><br>Nuevo producto </a></li>\n\t\t\t\t\t<li>\n\t\t<form method='get' action='gestion_producto_dar_alta.php'>\n\t\t<input type='text' name='busqueda' size='15' maxlength='20' value=''>\n\t\t<input type='hidden' name='id_empres' size='15' maxlength='20' value='" . $_GET['id_empres'] . "' />\n\t\t<input type='submit' value='Buscar'/>\n\t\t</form>\t\n\t\t\t\t</ul>\t\n\t\t</nav>\n\n\t</header>\n<body>";
if (isset($_GET["id_empres"]) and isset($_GET["alta"])) {
    baja_alta_product($_GET["id_empres"], $_GET["alta"]);
    echo "<div align=center><h1>SU PRODUCTO SE HA REACTIVADO CON EXITO!!\n\t\t<meta http-equiv='Refresh' content='2;url=gestion_empresa.php'></font></h1></div>";
} else {
    if (isset($_GET["busqueda"])) {
        $categoria = busqueda_producto(0, $_GET['id_empres'], $_GET['busqueda']);
    } else {
        if (!isset($_GET["busqueda"])) {
            $categoria = catalogo_producto(0, $_GET["id_empres"]);
        }
    }
}
if (!isset($_GET["id"]) and !isset($_GET["alta"])) {
    echo "<div name=empresas>";
    for ($i = 0; $i < count($categoria); $i++) {
        echo "<section id=contenidos class='cols'>";
        echo "<h3><br> " . $categoria[$i]->get_nombre() . " </h3>\n\t\t\t\t\t<p class='pad_bot1'>Precio \$ " . $categoria[$i]->get_precio() . "</p>\n\t\t\t\t\t<p class='pad_bot1'>Empresa " . $categoria[$i]->get_empresa() . "</p>\n\t\t\t\t\t<img src='" . $categoria[$i]->get_url() . "'<height='80' width='80' /img>";
        echo "<br><a href='gestion_producto_dar_alta.php?alta=1 &id_empres=" . $categoria[$i]->get_id_producto() . "'class='button1'>Reactivar</a></section>";
    }
    echo "</div>";
}