Tarea #583 -> En candidatos añadir un campo que sea “Ubicaciones no deseadas” git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_Intranet/trunk/src@50 e2b1556b-49f8-d141-9351-52d6861a72d9
110 lines
2.8 KiB
PHP
110 lines
2.8 KiB
PHP
<?php
|
|
include("seguridad.php");
|
|
include("functions.php");
|
|
|
|
/*
|
|
* Sólo RRHH y Admin
|
|
*/
|
|
if(!$usuario->tieneRol("4")
|
|
&& !$usuario->tieneRol("1")){
|
|
header("Location: aplicacion.php?e=permiso");
|
|
exit;
|
|
}
|
|
|
|
|
|
include_once("Objects/Candidato.php");
|
|
|
|
try {
|
|
$oid = "";
|
|
if (isset($_GET['oid'])) {
|
|
$oid = stripinput($_GET['oid']);
|
|
}
|
|
$persona = new Candidato($usuario, $oid);
|
|
|
|
// Comprobamos mensajes que pueden llegar hasta aqui
|
|
$mensaje = "";
|
|
if(!empty($_GET["msg"])) {
|
|
switch ($_GET["msg"]) {
|
|
case "1":$mensaje="<div class=\"aviso ok\">".$locale['1085']."</div>";
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(!empty($_GET["action"])) {
|
|
$error=false;
|
|
switch ($_GET['action']) {
|
|
case "cambEst": if($_GET['idEst']!="") {
|
|
$camb=$persona->transita($_GET['idEst'], "");
|
|
if($camb){
|
|
$mensaje.="<div class=\"aviso ok\">".$locale['1087']."</div>";
|
|
}else{
|
|
$mensaje="<div class=\"aviso error\">".$locale['1088']."</div>";
|
|
}
|
|
$error=!$camb;
|
|
|
|
}
|
|
break;
|
|
case "cambEstObs": if($_POST['idEstado']!="") {
|
|
$dias=$_POST['fechObsCamb'];
|
|
$diasInt="";
|
|
if(is_numeric($dias))
|
|
$diasInt="#&dias;".$dias;
|
|
$camb=$persona->transita($_POST['idEstado'], $_POST['txtObsCamb'].$diasInt);
|
|
if($camb){
|
|
$mensaje.="<div class=\"aviso ok\">".$locale['1087'];
|
|
if(is_numeric($dias))
|
|
$mensaje.=" ".$locale['1092']." ".$dias." ".$locale['1093'];
|
|
$mensaje.="</div>";
|
|
}else{
|
|
$mensaje="<div class=\"aviso error\">".$locale['1088']."</div>";
|
|
}
|
|
$error=!$camb;
|
|
|
|
}
|
|
break;
|
|
default: $error=true;
|
|
$mensaje=$locale['1057'];
|
|
break;
|
|
} // switch
|
|
/*
|
|
* Si hemos cambiado de estado candidato a empleado, nos vamos a detalle_empleado.php
|
|
*
|
|
*/
|
|
if($persona->getValor("tipo")=="usuario"){
|
|
header("Location: detalle_empleado.php?oid=".$persona->getValor("oid")."&msg=2");
|
|
exit;
|
|
}
|
|
} // if(!empty($_GET["action"]))
|
|
|
|
|
|
include_once("html/cabecera.php");
|
|
include_once("Objects/HTML.php");
|
|
$html=new HTML($locale);
|
|
$html->menuCandidatos();
|
|
|
|
$back="detalle_candidato.php?oid=".stripinput($_GET['oid']);
|
|
|
|
//Mostramos los detalles de un candidato
|
|
$mostrarDetalle = array();
|
|
array_push($mostrarDetalle,"personales");
|
|
array_push($mostrarDetalle,"laborables");
|
|
array_push($mostrarDetalle,"curriculum");
|
|
array_push($mostrarDetalle,"candidaturas");
|
|
array_push($mostrarDetalle,"historial");
|
|
array_push($mostrarDetalle,"addCurriculum");
|
|
array_push($mostrarDetalle,"cambEstado");
|
|
|
|
|
|
include_once("detalles_usuario.php");
|
|
}catch(Exception $e){
|
|
$msg=$e->getMessage();
|
|
include_once("showError.php");
|
|
}
|
|
|
|
include_once("html/pie.php");
|
|
?>
|
|
|
|
|