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