2011-06-02 12:00:58 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
include("seguridad.php");
|
|
|
|
|
include("functions.php");
|
|
|
|
|
include_once("Objects/CapacidadProfesional.php");
|
|
|
|
|
$idCapacidad=$_GET['id'];
|
|
|
|
|
$idCandidato=$_GET['idCandidato'];
|
2011-06-06 17:41:05 +00:00
|
|
|
$origen=$_GET['origen'];
|
2011-06-02 12:00:58 +00:00
|
|
|
$capacidad = new CapacidadProfesional($idCapacidad,"candidato");
|
|
|
|
|
|
|
|
|
|
/* ELIMINAR_CAPACIDAD.PHP */
|
|
|
|
|
try{
|
|
|
|
|
$resultado=$capacidad->eliminar();
|
2011-06-06 17:41:05 +00:00
|
|
|
|
2011-06-02 12:00:58 +00:00
|
|
|
if($resultado){
|
2011-06-06 17:41:05 +00:00
|
|
|
switch ($origen) {
|
|
|
|
|
case "gestion_candidato": header("Location: ".$origen.".php?oid=".$idCandidato."#capacidades"); break;
|
|
|
|
|
case "detalle_candidato": header("Location: ".$origen.".php?oid=".$idCandidato."#capacidades"); break;
|
|
|
|
|
case "lista_Candidatos": header("Location: lista_candidatos.php?order=nombre&modo=asc&byEstado=0"); break;
|
|
|
|
|
}
|
2011-06-02 12:00:58 +00:00
|
|
|
} else {
|
2011-06-06 17:41:05 +00:00
|
|
|
header("Location: gestion_candidato.php?oid=".$idCandidato."#capacidades");
|
2011-06-02 12:00:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (Exception $e) {
|
|
|
|
|
$msg=$e->getMessage();
|
|
|
|
|
include_once("showError.php");
|
|
|
|
|
}
|
|
|
|
|
?>
|