Incam_Intranet/eliminar_oferta.php

24 lines
475 B
PHP

<?php
include("seguridad.php");
include("functions.php");
include_once("Objects/Oferta.php");
$idOferta=$_GET['idOferta'];
$usuario = $_SESSION["usuario"];
$oferta = new Oferta($idOferta,$usuario);
/* ELIMINAR_OFERTA.PHP */
try{
$resultado=$oferta->eliminar();
if($resultado){
header("Location: lista_ofertas.php?msg=1");
} else {
header("Location: lista_ofertas.php?msg=2");
}
} catch (Exception $e) {
$msg=$e->getMessage();
include_once("showError.php");
}
?>