<?php

echo "<link rel='stylesheet' href='css/style.css' type='text/css' media='all'>";
include "../persistence_layer/conect.php";
include "../bussines_layer/gestion_empresa_bussines.php";
if (isset($_GET["borra"]) and isset($_GET["eliminar"])) {
    alta_baja_empresa($_GET["eliminar"], $_GET["borra"]);
    echo "<div align=center><h1>SU EMPRESA SE HA DADO DE BAJA CON EXITO!!\n\t\t<meta http-equiv='Refresh' content='2;url=gestion_empresa.php'></font></h1></div>";
} else {
    $empresa = recuperar_empresa($_GET["id"]);
    echo "<div align=center><h1>ELIMINAR EMPRESA</h1><br><h2>" . $empresa->get_nombre() . "<br>direccion: " . $empresa->get_direccion() . "<br><br><br>";
    echo "<notif>ESTA SEGURO?</notif><br><br>";
    echo "<h3>SE DARA DE BAJA LA EMPRESA Y TODOS LOS PRODUCTOS QUE OFRECE LA MISMA</h3>";
    echo "<table class=tablas><tr>";
    echo "<td width=50%><a href=gestion_empresa_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>";
}
					<li>
						<?php 
if ($sesion) {
    ?>
						<a href="../bussines_layer/logout.php">(Cerrar Sesion)</a>
						<?php 
}
?>
Administrador
					</li>


					<?php 
echo "</ul>\t\n\t\t</nav>\n\n\t</header>\n<body>";
if (isset($_GET["id"]) and isset($_GET["alta"])) {
    alta_baja_empresa($_GET["id"], $_GET["alta"]);
    echo "<div align=center><h1>SU EMPRESA 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"])) {
        $empresa = busqueda_emp(0, $_GET['busqueda']);
    } else {
        if (!isset($_GET["busqueda"])) {
            $empresa = catalogo_empresa(0);
        }
    }
}
if (!isset($_GET["id"]) and !isset($_GET["alta"])) {
    for ($i = 0; $i < count($empresa); $i++) {
        echo "<section id=contenidos class='cols'>";
        echo "<h3><br> " . $empresa[$i]->get_nombre() . " </h3>\n\t\t\t\t\t<p class='pad_bot1'> " . $empresa[$i]->get_categoria() . "</p>\n\t\t\t\t\t<img src='" . $empresa[$i]->get_url() . "'<height='50' width='50' /img>";
        echo "<br><a href='gestion_empresa_dar_alta.php?alta=1 &id=" . $empresa[$i]->get_id_empresa() . "'class='button1'>Reactivar</a></section>";