Compare commits
No commits in common. "master" and "1.1.1@85" have entirely different histories.
@ -12,66 +12,6 @@ include_once("BD.php");
|
|||||||
include_once("Persona.php");
|
include_once("Persona.php");
|
||||||
include_once("Automata.php");
|
include_once("Automata.php");
|
||||||
include_once("ListaCapacidadesProfesionales.php");
|
include_once("ListaCapacidadesProfesionales.php");
|
||||||
include_once("upload.class.php");
|
|
||||||
|
|
||||||
function limpia($imagen){
|
|
||||||
if(file_exists($imagen)) {
|
|
||||||
unlink($imagen);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function tieneImagen($OID){
|
|
||||||
$cadena = 'imagenes/' . $OID . '_150.jpg';
|
|
||||||
return file_exists($cadena);
|
|
||||||
}
|
|
||||||
|
|
||||||
function rutaImagen($OID){
|
|
||||||
$cadena = 'imagenes/' . $OID . '_150.jpg';
|
|
||||||
return $cadena;
|
|
||||||
}
|
|
||||||
|
|
||||||
function uploadImagenCandidato($OID, $size1_w, $size1_h, $size2_w=0, $size2_h=0, $mascara='') {
|
|
||||||
$path = "imagenes/"; // este directorio tiene que tener chmod 777
|
|
||||||
$upload_file_name = "candidato_imagen"; // el nombre del campo tipo file de nuestro formulario
|
|
||||||
$acceptable_file_types = "image/gif|image/jpeg|image/pjpeg"; // acepta GIF et JPEG
|
|
||||||
$default_extension = "";
|
|
||||||
$mode = 1; // OPTIONS:
|
|
||||||
// 1 = overwrite mode
|
|
||||||
// 2 = create new with incremental extention
|
|
||||||
// 3 = do nothing if exists, highest protection
|
|
||||||
|
|
||||||
// un poco de limpieza previa
|
|
||||||
// este es el temporal
|
|
||||||
$glob = glob($path . $OID, '_tmp');
|
|
||||||
limpia($glob);
|
|
||||||
limpia($path . '_' . $size1_w . '.jpg');
|
|
||||||
limpia($path . '_' . $size2_w . '.jpg');
|
|
||||||
// fin de la limpia
|
|
||||||
|
|
||||||
if(strlen($_FILES['candidato_imagen']['name'])) {
|
|
||||||
$my_uploader = new uploader('es'); // Create a new instance of the class
|
|
||||||
$my_uploader->max_filesize(1500000); // OPTIONAL: set the max filesize of uploadable files in bytes
|
|
||||||
$my_uploader->max_image_size(1600, 1600); // OPTIONAL: if you're uploading images, you can set the max pixel dimensions
|
|
||||||
// UPLOAD the file
|
|
||||||
if ($my_uploader->upload($upload_file_name, $acceptable_file_types, $default_extension)) {
|
|
||||||
$my_uploader->save_file($path, $OID . '_tmp', $mode);
|
|
||||||
if (!$my_uploader->error) {
|
|
||||||
$my_uploader->resize($OID . '_' . $size1_w . '.jpg', $size1_w, $size1_h, 60);
|
|
||||||
if($size2_w) {
|
|
||||||
$my_uploader->resize($OID . '_' . $size2_w . '.jpg', $size2_w, $size2_h, 60);
|
|
||||||
}
|
|
||||||
$my_uploader->delete_file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($my_uploader->error) {
|
|
||||||
echo $my_uploader->error;
|
|
||||||
}
|
|
||||||
|
|
||||||
$glob = glob($path . $OID, '_tmp');
|
|
||||||
limpia($glob);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class Candidato extends Persona {
|
class Candidato extends Persona {
|
||||||
|
|
||||||
@ -103,35 +43,11 @@ class Candidato extends Persona {
|
|||||||
*/
|
*/
|
||||||
$sesion = $this->usuario->getValor("oid");
|
$sesion = $this->usuario->getValor("oid");
|
||||||
if ($this->usuario->tieneRol(1) || $this->usuario->tieneRol(4)) {
|
if ($this->usuario->tieneRol(1) || $this->usuario->tieneRol(4)) {
|
||||||
$viejo = $this->getValor($nombre);
|
return parent::setCampo($nombre, $valor);
|
||||||
$resultado = parent::setCampo($nombre, $valor);
|
|
||||||
///////////////////////////////////////////////////
|
|
||||||
//SOLO ACTUALIZA EL HISTORIAL LOS CAMBIOS DE ESTADO
|
|
||||||
///////////////////////////////////////////////////
|
|
||||||
if ($nombre == "estado") {
|
|
||||||
$estado_viejo = $this->darNombreEstado($viejo, "sp");
|
|
||||||
$estado_nuevo = $this->darNombreEstado($valor, "sp");
|
|
||||||
$historial = "Cambio de estado (". $estado_viejo ." a ". $estado_nuevo .")";
|
|
||||||
$this->actualizarHistorial($historial);
|
|
||||||
}
|
|
||||||
return $resultado;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//Campos que se pueden editar por el gerente, ya sea directamente o mediante una transición.
|
//Campos que se pueden editar por el gerente, ya sea directamente o mediante una transición.
|
||||||
if (($nombre == "observaciones" || $nombre == "msgEstado" || $nombre = "diasEspera" || $nombre == "estado") && $this->usuario->tieneRol(3)) {
|
if (($nombre == "observaciones" || $nombre == "msgEstado" || $nombre = "diasEspera" || $nombre == "estado") && $this->usuario->tieneRol(3)) {
|
||||||
$viejo = $this->getValor($nombre);
|
return parent::setCampo($nombre, $valor);
|
||||||
$resultado = parent::setCampo($nombre, $valor);
|
|
||||||
///////////////////////////////////////////////////
|
|
||||||
//SOLO ACTUALIZA EL HISTORIAL LOS CAMBIOS DE ESTADO
|
|
||||||
///////////////////////////////////////////////////
|
|
||||||
if ($nombre == "estado") {
|
|
||||||
$estado_viejo = $this->darNombreEstado($viejo, "sp");
|
|
||||||
$estado_nuevo = $this->darNombreEstado($valor, "sp");
|
|
||||||
$historial = "Cambio de estado (". $estado_viejo ." a ". $estado_nuevo .")";
|
|
||||||
$this->actualizarHistorial($historial);
|
|
||||||
}
|
|
||||||
return $resultado;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$error = "El usuario no tiene permisos para editar al candidato.";
|
$error = "El usuario no tiene permisos para editar al candidato.";
|
||||||
throw new Exception($error);
|
throw new Exception($error);
|
||||||
@ -141,13 +57,7 @@ return $resultado;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function darNombreEstado($cod, $idioma) {
|
function addCurriculum($fichero) {
|
||||||
$consulta = "SELECT NOMBRE from candidatos_estados WHERE cod=\"" . $cod . "\" AND idioma=\"" . $idioma . "\"";
|
|
||||||
$bd = new BD();
|
|
||||||
return $bd->getCampo($consulta);
|
|
||||||
}
|
|
||||||
|
|
||||||
function addCurriculum($fichero, $tipo) {
|
|
||||||
//PERMISOS:
|
//PERMISOS:
|
||||||
/*
|
/*
|
||||||
* Admin (1) - Todos
|
* Admin (1) - Todos
|
||||||
@ -156,7 +66,7 @@ return $resultado;
|
|||||||
*/
|
*/
|
||||||
$sesion = $this->usuario->getValor("oid");
|
$sesion = $this->usuario->getValor("oid");
|
||||||
if ($this->usuario->tieneRol(3) || $this->usuario->tieneRol(1) || $this->usuario->tieneRol(4)) {
|
if ($this->usuario->tieneRol(3) || $this->usuario->tieneRol(1) || $this->usuario->tieneRol(4)) {
|
||||||
return parent::addCurriculum($fichero, $tipo, $this->usuario->getValor("nombre"));
|
return parent::addCurriculum($fichero, $this->usuario->getValor("nombre"));
|
||||||
} else {
|
} else {
|
||||||
$error = "El usuario no tiene permisos para asociar CV al candidato.";
|
$error = "El usuario no tiene permisos para asociar CV al candidato.";
|
||||||
throw new Exception($error);
|
throw new Exception($error);
|
||||||
@ -213,8 +123,8 @@ return $resultado;
|
|||||||
* Otro - Excepción
|
* Otro - Excepción
|
||||||
*/
|
*/
|
||||||
$sesion = $this->usuario->getValor("oid");
|
$sesion = $this->usuario->getValor("oid");
|
||||||
//Nos declaramos un array de estados eliminables: se cambia a los nuevos estados #723 Peticion
|
//Nos declaramos un array de estados eliminables:
|
||||||
$estados_eliminables = array("510","511","520","600");
|
$estados_eliminables = array("510","521","522","523","540");
|
||||||
if ($this->usuario->tieneRol(1) || $this->usuario->tieneRol(4)) {
|
if ($this->usuario->tieneRol(1) || $this->usuario->tieneRol(4)) {
|
||||||
$estado = $this->getValor("estado");
|
$estado = $this->getValor("estado");
|
||||||
if (in_array($estado, $estados_eliminables)) {
|
if (in_array($estado, $estados_eliminables)) {
|
||||||
@ -41,15 +41,16 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Devuelve una lista de tecnolog<EFBFBD>as asociadas a la capacidad
|
* Devuelve una lista de tecnolog<EFBFBD>as asociadas a la capacidad
|
||||||
* (LO QUITAMOS)OJO ESTA TABLA TAMBIEN GUARDA EL ID_PERFIL_TECNICO POR SI EN UN FUTURO, SE REQUIERE QUE UNA CAPACIDAD TENGA VARIOS PERFILES TECNICOS
|
* OJO ESTA TABLA TAMBIEN GUARDA EL ID_PERFIL_TECNICO POR SI EN UN FUTURO, SE REQUIERE QUE UNA CAPACIDAD TENGA VARIOS PERFILES TECNICOS
|
||||||
*/
|
*/
|
||||||
private function _getTecnologias(){
|
private function _getTecnologias(){
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
$consulta = "";
|
$consulta = "";
|
||||||
$consulta = "SELECT CPT.id_capacidad, CPT.id_tecnologia, CPT.meses, T.id ";
|
$consulta = "SELECT CPT.id_capacidad, CPT.id_perfil_tecnico, CPT.id_tecnologia, CPT.meses, T.id ";
|
||||||
$consulta = $consulta. "FROM capacidades_perfil_tecnologias as CPT ";
|
$consulta = $consulta. "FROM capacidades_perfil_tecnologias as CPT ";
|
||||||
$consulta = $consulta. "left join tecnologia as T on (T.oid = CPT.id_tecnologia) ";
|
$consulta = $consulta. "left join tecnologia as T on (T.oid = CPT.id_tecnologia) ";
|
||||||
$consulta = $consulta. "where CPT.id_capacidad = ". $this->campos["id"];
|
$consulta = $consulta. "where CPT.id_capacidad = ". $this->campos["id"];
|
||||||
|
// $consulta = $consulta. " and CPT.id_perfil_tecnico = ". $this->campos["id_perfil_tecnico"];
|
||||||
$resultado = $bd->execQuery($consulta);
|
$resultado = $bd->execQuery($consulta);
|
||||||
if (mysql_num_rows($resultado) != 0) {
|
if (mysql_num_rows($resultado) != 0) {
|
||||||
$this->tecnologias = null;
|
$this->tecnologias = null;
|
||||||
@ -84,8 +85,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Insertamos en la BD
|
//Insertamos en la BD
|
||||||
$consulta = "INSERT INTO capacidades ($inserto) VALUES ($valores)";
|
$consulta = "INSERT INTO capacidades ($inserto) VALUES ($valores)";
|
||||||
//echo $consulta;
|
echo $consulta;
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
if(!$bd->execQuery($consulta)){
|
if(!$bd->execQuery($consulta)){
|
||||||
$error = "Campos de la capacidad incorrectos. Por favor, avise al webmaster de este error.";
|
$error = "Campos de la capacidad incorrectos. Por favor, avise al webmaster de este error.";
|
||||||
@ -106,12 +107,13 @@
|
|||||||
*/
|
*/
|
||||||
private function addTecnologia($id_tecnologia,$meses){
|
private function addTecnologia($id_tecnologia,$meses){
|
||||||
$id_capacidad = $this->campos["id"];
|
$id_capacidad = $this->campos["id"];
|
||||||
if(($id_tecnologia>0) && (!in_array($id_tecnologia, $this->tecnologias))){
|
$id_perfil_tecnico = $this->campos["id_perfil_tecnico"];
|
||||||
|
if(!in_array($id_tecnologia, $this->tecnologias)){
|
||||||
$consulta = "DELETE FROM capacidades_perfil_tecnologias where id_capacidad='$id_capacidad' and id_tecnologia='$id_tecnologia'";
|
$consulta = "DELETE FROM capacidades_perfil_tecnologias where id_capacidad='$id_capacidad' and id_tecnologia='$id_tecnologia'";
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
$bd->execQuery($consulta);
|
$bd->execQuery($consulta);
|
||||||
$consulta = "INSERT INTO capacidades_perfil_tecnologias (id_capacidad, id_tecnologia, meses) VALUES('$id_capacidad', '$id_tecnologia', '$meses')";
|
$consulta = "INSERT INTO capacidades_perfil_tecnologias (id_capacidad, id_perfil_tecnico, id_tecnologia, meses) VALUES('$id_capacidad', '$id_perfil_tecnico', '$id_tecnologia', '$meses')";
|
||||||
//echo $consulta;
|
echo $consulta;
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
if($bd->execQuery($consulta)){
|
if($bd->execQuery($consulta)){
|
||||||
$mensaje = "Nueva tecno: $nombre_tecno";
|
$mensaje = "Nueva tecno: $nombre_tecno";
|
||||||
@ -168,7 +170,7 @@
|
|||||||
// $fecha = "'".date('Y'."-".'m'."-".'d')."'";
|
// $fecha = "'".date('Y'."-".'m'."-".'d')."'";
|
||||||
// $consulta .= " fecha_modificacion = $fecha ";
|
// $consulta .= " fecha_modificacion = $fecha ";
|
||||||
$consulta .= " WHERE id=". $this->campos['id'];
|
$consulta .= " WHERE id=". $this->campos['id'];
|
||||||
//echo $consulta;
|
echo $consulta;
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
$bd->execQuery($consulta);
|
$bd->execQuery($consulta);
|
||||||
}
|
}
|
||||||
@ -180,11 +182,11 @@
|
|||||||
function eliminar(){
|
function eliminar(){
|
||||||
//Eliminamos de la tabla detalle
|
//Eliminamos de la tabla detalle
|
||||||
$consulta = "DELETE FROM capacidades_perfil_tecnologias WHERE id_capacidad='".$this->campos["id"]."'";
|
$consulta = "DELETE FROM capacidades_perfil_tecnologias WHERE id_capacidad='".$this->campos["id"]."'";
|
||||||
//echo $consulta;
|
echo $consulta;
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
$bd->execQuery($consulta);
|
$bd->execQuery($consulta);
|
||||||
$consulta = "DELETE FROM capacidades WHERE id='".$this->campos["id"]."'";
|
$consulta = "DELETE FROM capacidades WHERE id='".$this->campos["id"]."'";
|
||||||
//echo $consulta;
|
echo $consulta;
|
||||||
if($bd->execQuery($consulta))
|
if($bd->execQuery($consulta))
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
85
Objects/Capacidad_profesional.php
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Clase Capacidad Profesional
|
||||||
|
*
|
||||||
|
* Contiene toda la informaci<EFBFBD>n relativa a la capacidad.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
include_once("BD.php");
|
||||||
|
|
||||||
|
class Capacidad_profesional{
|
||||||
|
|
||||||
|
private $tipo_capacidad; /* Esta propiedad de la clase nos informará si estamos ante una capadidad profesional de candidato o de solicitud*/
|
||||||
|
public $campos = array();
|
||||||
|
private $listaTecnologias = array();
|
||||||
|
|
||||||
|
function Capacidad_profesional($campos_nuevos){
|
||||||
|
$this->campos = $campos_nuevos;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inserta una nueva capacidad profesional a la lista de capacidades.
|
||||||
|
* @param campos - datos de la capacidad.
|
||||||
|
*/
|
||||||
|
function addCapacidad($campos) {
|
||||||
|
$inserto = "";//,id_solicitud,id_perfil_tecnico, id_perfil_funcional, meses_tecnico, meses_funcional, observaciones";
|
||||||
|
$valores = ""; //, $fecha, $fecha";
|
||||||
|
|
||||||
|
//Procesamos los datos
|
||||||
|
$i=1;
|
||||||
|
foreach($campos as $key => $value){
|
||||||
|
if ($i>1) {
|
||||||
|
$inserto .= ",";
|
||||||
|
$valores .= ",";
|
||||||
|
}
|
||||||
|
$inserto .= " $key";
|
||||||
|
$valores .= " '$value'";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Insertamos en la BD
|
||||||
|
$consulta = "INSERT INTO capacidades ($inserto) VALUES ($valores)";
|
||||||
|
|
||||||
|
$bd = new BD();
|
||||||
|
if(!$bd->execQuery($consulta)){
|
||||||
|
$error = "Campos de la capacidad incorrectos. Por favor, avise al webmaster de este error.";
|
||||||
|
throw new Exception($error);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$id = mysql_insert_id();
|
||||||
|
return $id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Lista_capacidad_profesional{
|
||||||
|
|
||||||
|
public $capacidad = array();
|
||||||
|
|
||||||
|
function Lista_capacidad_profesional($id, $tipo){
|
||||||
|
$bd = new BD();
|
||||||
|
$consulta = "";
|
||||||
|
$tipo_capacidad = $tipo;
|
||||||
|
$consulta = "select C.id, C.id_usuario, C.id_solicitud, C.id_perfil_tecnico, C.id_perfil_funcional, C.meses_tecnico, C.meses_funcional, C.observaciones, ";
|
||||||
|
$consulta = $consulta . "PT.id as perfil_tecnico, PT.abrev, PF.id as perfil_funcional, PF.abrev ";
|
||||||
|
$consulta = $consulta . "from capacidades as C left join perfil as PT on (PT.oid = C.id_perfil_tecnico) ";
|
||||||
|
$consulta = $consulta . "left join perfil_funcional as PF on (PF.oid = C.id_perfil_funcional) ";
|
||||||
|
|
||||||
|
switch ($tipo_capacidad) {
|
||||||
|
case "candidato": $consulta = $consulta. "WHERE id_usuario = ".$id; break;
|
||||||
|
case "solicitud": $consulta = $consulta. "WHERE id_solicitud = ".$id; break;
|
||||||
|
}
|
||||||
|
$resultado = $bd->execQuery($consulta);
|
||||||
|
|
||||||
|
//Procesamos las capacidades
|
||||||
|
if (mysql_num_rows($resultado) != 0) {
|
||||||
|
while ($row = mysql_fetch_array($resultado)) {
|
||||||
|
$this->capacidad[] = new Capacidad_profesional($row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $this->capacidad;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
@ -73,7 +73,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function addCurriculum($fichero, $tipo){
|
function addCurriculum($fichero){
|
||||||
//PERMISOS:
|
//PERMISOS:
|
||||||
/*
|
/*
|
||||||
* Admin (1) - Todos
|
* Admin (1) - Todos
|
||||||
@ -82,7 +82,7 @@
|
|||||||
*/
|
*/
|
||||||
$sesion = $this->usuario->getValor("oid");
|
$sesion = $this->usuario->getValor("oid");
|
||||||
if($this->usuario->tieneRol(3) || $this->usuario->tieneRol(1) || $this->usuario->tieneRol(4)){
|
if($this->usuario->tieneRol(3) || $this->usuario->tieneRol(1) || $this->usuario->tieneRol(4)){
|
||||||
return parent::addCurriculum($fichero, $tipo, $this->usuario->getValor("nombre"));
|
return parent::addCurriculum($fichero, $this->usuario->getValor("nombre"));
|
||||||
}else{
|
}else{
|
||||||
$error = "El usuario no tiene permisos para asociar CV al empleado.";
|
$error = "El usuario no tiene permisos para asociar CV al empleado.";
|
||||||
throw new Exception($error);
|
throw new Exception($error);
|
||||||
@ -66,8 +66,7 @@
|
|||||||
if($usuario->tieneRol("3") ||$usuario->tieneRol("1")){
|
if($usuario->tieneRol("3") ||$usuario->tieneRol("1")){
|
||||||
echo '<a href="addPedido.php" class="menuOption" style="color:#000000">'.$this->locale['1008'].'</a>';
|
echo '<a href="addPedido.php" class="menuOption" style="color:#000000">'.$this->locale['1008'].'</a>';
|
||||||
}
|
}
|
||||||
|
echo '<a href="buscar_pedido.php" class="menuOption" style="color:#000000">'.$this->locale['1009'].'</a>';
|
||||||
//echo '<a href="buscar_pedido.php" class="menuOption" style="color:#000000">'.$this->locale['1009'].'</a>';
|
|
||||||
// Buscar candidatos
|
// Buscar candidatos
|
||||||
/*if(substr_count($_SERVER['REQUEST_URI'],"/pedido.php?idPedido")==1){
|
/*if(substr_count($_SERVER['REQUEST_URI'],"/pedido.php?idPedido")==1){
|
||||||
echo '<a href="buscar.php" class="menuOption" target="_blank" style="color:#000000">'.$this->locale['820'].'</a>';
|
echo '<a href="buscar.php" class="menuOption" target="_blank" style="color:#000000">'.$this->locale['820'].'</a>';
|
||||||
@ -94,22 +93,12 @@
|
|||||||
} else {
|
} else {
|
||||||
$opcionesThis = $opciones;
|
$opcionesThis = $opciones;
|
||||||
}
|
}
|
||||||
|
echo '<a href="lista_ofertas.php" class="menuOption" style="color:#000000">'.$this->locale['5100'].'</a>';
|
||||||
echo '<a href="lista_ofertas.php" class="menuOption" style="color:#000000">'.$this->locale['5100'].'</a>';
|
if($usuario->tieneRol("3") ||$usuario->tieneRol("1")){
|
||||||
|
echo '<a href="addOferta.php" class="menuOption" style="color:#000000">'.$this->locale['5101'].'</a>';
|
||||||
if((!$usuario->tieneRol("7")) && (substr_count($_SERVER['REQUEST_URI'],"/oferta.php?idOferta")==1)){
|
}
|
||||||
echo '<a href="gestion_oferta.php?idOferta='.$_GET['idOferta'].'" class="menuOption" style="color:#000000">'.$this->locale['ed'].'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if(substr_count($_SERVER['REQUEST_URI'],"/gestion_oferta.php?idOferta")==1){
|
|
||||||
echo '<a href="oferta.php?idOferta='.$_GET['idOferta'].'" class="menuOption" style="color:#000000">'.$this->locale['im'].'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// if($usuario->tieneRol("3") ||$usuario->tieneRol("1")){
|
|
||||||
// echo '<a href="addOferta.php" class="menuOption" style="color:#000000">'.$this->locale['5101'].'</a>';
|
|
||||||
// }
|
|
||||||
/*echo '<a href="buscar_oferta.php" class="menuOption" style="color:#000000">'.$this->locale['5102'].'</a>';*/
|
/*echo '<a href="buscar_oferta.php" class="menuOption" style="color:#000000">'.$this->locale['5102'].'</a>';*/
|
||||||
/*
|
|
||||||
if(!in_array("gestionar", $opcionesThis)){
|
if(!in_array("gestionar", $opcionesThis)){
|
||||||
if(substr_count($_SERVER['REQUEST_URI'],"/oferta.php?idOferta")==1){
|
if(substr_count($_SERVER['REQUEST_URI'],"/oferta.php?idOferta")==1){
|
||||||
echo '<a href="gestion_oferta.php?idOferta='.$_GET['idOferta'].'" class="menuOption" style="color:#000000">'.$this->locale['284'].'</a>';
|
echo '<a href="gestion_oferta.php?idOferta='.$_GET['idOferta'].'" class="menuOption" style="color:#000000">'.$this->locale['284'].'</a>';
|
||||||
@ -118,7 +107,6 @@
|
|||||||
echo '<a href="oferta.php?idOferta='.$_GET['idOferta'].'" class="menuOption" style="color:#000000">'.$this->locale['5103'].'</a>';
|
echo '<a href="oferta.php?idOferta='.$_GET['idOferta'].'" class="menuOption" style="color:#000000">'.$this->locale['5103'].'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function menuCandidatos(){
|
function menuCandidatos(){
|
||||||
@ -46,28 +46,16 @@ class ListaCandidatos extends ListaPersonas {
|
|||||||
return $bd->keyValueQuery($consulta, "cod", "nombre");
|
return $bd->keyValueQuery($consulta, "cod", "nombre");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Devuelve una lista de los campos por los que buscar del candidato.
|
|
||||||
*/
|
|
||||||
function getCamposBusqueda() {
|
|
||||||
$consulta = "SHOW FIELDS FROM usuarios";
|
|
||||||
$bd = new BD();
|
|
||||||
$resultado = $bd->execQuery($consulta);
|
|
||||||
return $resultado;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserta un nuevo candidato en la lista de candidatos.
|
* Inserta un nuevo candidato en la lista de candidatos.
|
||||||
* @param campos - datos del candidato.
|
* @param campos - datos del candidato.
|
||||||
*/
|
*/
|
||||||
function addCandidato($campos) {
|
function addCandidato($campos) {
|
||||||
$campos["estado"] = 510; //Borrador se cambia a los nuevos estados #723 Peticion
|
$campos["estado"] = 510;
|
||||||
$id = parent::addPersona($campos);
|
$id = parent::addPersona($campos);
|
||||||
$candidato = new Candidato($this->usuario, $id);
|
$candidato = new Candidato($this->usuario, $id);
|
||||||
$mensaje = "Nuevo candidato";
|
$mensaje = "Nuevo candidato";
|
||||||
$candidato->actualizarHistorial($mensaje);
|
$candidato->actualizarHistorial($mensaje);
|
||||||
$mensaje = "Estado inicial ( ". $candidato->darNombreEstado($campos["estado"],"sp") ." )";
|
|
||||||
$candidato->actualizarHistorial($mensaje);
|
|
||||||
return $id;
|
return $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,14 +41,7 @@ class ListaOfertas {
|
|||||||
function getOfertas() {
|
function getOfertas() {
|
||||||
// sacado de http://patrickallaert.blogspot.com/2007/09/building-dynamic-sql-queries-elegant.html
|
// sacado de http://patrickallaert.blogspot.com/2007/09/building-dynamic-sql-queries-elegant.html
|
||||||
|
|
||||||
// $consulta = "SELECT * FROM candidato_pedido";
|
$consulta = "SELECT * FROM candidato_pedido";
|
||||||
$consulta = "SELECT
|
|
||||||
candidato_pedido.`oid`, candidato_pedido.`referencia`, candidato_pedido.`candidato`, CONCAT(usuarios.nombre, ' ', usuarios.apellidos) as nombre_candidato, candidato_pedido.`pedido`, pedidos.nombre as nombre_solicitud,
|
|
||||||
candidato_pedido.`afinidad`, candidato_pedido.`estado`, candidato_pedido.`RRHH`, candidato_pedido.`fecha`,
|
|
||||||
candidato_pedido.`obsGerente`, candidato_pedido.`obsRRHH`, candidato_pedido.`gerente`, candidato_pedido.`salario_ofertado`
|
|
||||||
FROM candidato_pedido
|
|
||||||
LEFT JOIN usuarios on usuarios.oid = candidato_pedido.candidato
|
|
||||||
LEFT JOIN pedidos on pedidos.oid = candidato_pedido.pedido";
|
|
||||||
|
|
||||||
if (count($this->condiciones)) {
|
if (count($this->condiciones)) {
|
||||||
$consulta .= ' WHERE ' . implode(' AND ', $this->condiciones);
|
$consulta .= ' WHERE ' . implode(' AND ', $this->condiciones);
|
||||||
@ -60,7 +53,6 @@ LEFT JOIN pedidos on pedidos.oid = candidato_pedido.pedido";
|
|||||||
|
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
$resultado = $bd->execQuery($consulta);
|
$resultado = $bd->execQuery($consulta);
|
||||||
//echo $consulta;
|
|
||||||
// Procesamos las ofertas.
|
// Procesamos las ofertas.
|
||||||
if (mysql_num_rows($resultado) == 0) {
|
if (mysql_num_rows($resultado) == 0) {
|
||||||
$this->ofertas = array();
|
$this->ofertas = array();
|
||||||
@ -110,7 +102,7 @@ LEFT JOIN pedidos on pedidos.oid = candidato_pedido.pedido";
|
|||||||
// Calculamos el id
|
// Calculamos el id
|
||||||
$referencia = $this->calculaReferencia($campos["pedido"]);
|
$referencia = $this->calculaReferencia($campos["pedido"]);
|
||||||
$inserto = "fecha, referencia";
|
$inserto = "fecha, referencia";
|
||||||
$fecha = "'" . date("Y-m-d H:i:s") . "'";
|
$fecha = "'" . date("Y-m-d") . "'";
|
||||||
$valores = "$fecha, $referencia";
|
$valores = "$fecha, $referencia";
|
||||||
// Procesamos los datos
|
// Procesamos los datos
|
||||||
foreach ($campos as $key => $value) {
|
foreach ($campos as $key => $value) {
|
||||||
@ -72,7 +72,7 @@ include_once("Objects/Pedido.php");
|
|||||||
$estado = $this->tipo;
|
$estado = $this->tipo;
|
||||||
if($this->pedidos == null){
|
if($this->pedidos == null){
|
||||||
//Modificamos la consulta en función del rol.
|
//Modificamos la consulta en función del rol.
|
||||||
if($this->gestor->tieneRol(4) || $this->gestor->tieneRol(1) || $this->gestor->tieneRol(7)){
|
if($this->gestor->tieneRol(4) || $this->gestor->tieneRol(1)){
|
||||||
if($this->sql != ""){
|
if($this->sql != ""){
|
||||||
// metemos el tipo si es >0
|
// metemos el tipo si es >0
|
||||||
if($estado > 0){
|
if($estado > 0){
|
||||||
@ -94,23 +94,9 @@ include_once("Objects/Pedido.php");
|
|||||||
$consulta = $sqlNueva." ".$this->order_by;
|
$consulta = $sqlNueva." ".$this->order_by;
|
||||||
}else{
|
}else{
|
||||||
if($estado > 0){
|
if($estado > 0){
|
||||||
$consulta = "SELECT * from pedidos WHERE estado='".$estado."'";
|
$consulta = "SELECT * from pedidos WHERE estado='".$estado."'".$this->orden ;
|
||||||
|
|
||||||
//En el caso de ser un usuario de cliente para ver sus pedidos filtramos por cliente
|
|
||||||
if (($this->gestor->tieneRol(7)) && ($this->gestor->getValor("cliente_actual")>0)){
|
|
||||||
$consulta .= " and cliente = ". $this->gestor->getValor("cliente_actual") . " ";
|
|
||||||
}
|
|
||||||
|
|
||||||
$consulta .= $this->orden;
|
|
||||||
}else{
|
}else{
|
||||||
$consulta = "SELECT * from pedidos ";
|
$consulta = "SELECT * from pedidos ".$this->orden."";
|
||||||
|
|
||||||
//En el caso de ser un usuario de cliente para ver sus pedidos filtramos por cliente
|
|
||||||
if (($this->gestor->tieneRol(7)) && ($this->gestor->getValor("cliente_actual")>0)){
|
|
||||||
$consulta .= " where cliente = ". $this->gestor->getValor("cliente_actual") . " ";
|
|
||||||
}
|
|
||||||
|
|
||||||
$consulta .= $this->orden;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else if($this->gestor->tieneRol(3)){
|
}else if($this->gestor->tieneRol(3)){
|
||||||
@ -146,7 +132,6 @@ include_once("Objects/Pedido.php");
|
|||||||
}
|
}
|
||||||
|
|
||||||
$bd=new BD();
|
$bd=new BD();
|
||||||
|
|
||||||
$resultado = $bd->execQuery($consulta);
|
$resultado = $bd->execQuery($consulta);
|
||||||
//Procesamos los pedidos.
|
//Procesamos los pedidos.
|
||||||
if(mysql_num_rows($resultado) == 0){
|
if(mysql_num_rows($resultado) == 0){
|
||||||
@ -192,7 +177,7 @@ include_once("Objects/Pedido.php");
|
|||||||
//Calculamos el id
|
//Calculamos el id
|
||||||
$id = $this->calculaIdProyecto($campos["procedencia"], $campos["cliente"]);
|
$id = $this->calculaIdProyecto($campos["procedencia"], $campos["cliente"]);
|
||||||
$inserto = "oid, fecha";
|
$inserto = "oid, fecha";
|
||||||
$fecha = "'".date("Y-m-d H:i:s")."'";
|
$fecha = "'".date("Y-m-d")."'";
|
||||||
$valores = "$id, $fecha";
|
$valores = "$id, $fecha";
|
||||||
|
|
||||||
//Procesamos los datos
|
//Procesamos los datos
|
||||||
@ -211,8 +196,6 @@ include_once("Objects/Pedido.php");
|
|||||||
$p = new Pedido($id, $this->gestor);
|
$p = new Pedido($id, $this->gestor);
|
||||||
$mensaje = "Nueva solicitud de oferta";
|
$mensaje = "Nueva solicitud de oferta";
|
||||||
$p->actualizarHistorial($mensaje);
|
$p->actualizarHistorial($mensaje);
|
||||||
$mensaje = "Estado inicial ( ". $p->darNombreEstado($campos["estado"],"sp") ." )";
|
|
||||||
$p->actualizarHistorial($mensaje);
|
|
||||||
}
|
}
|
||||||
return $id;
|
return $id;
|
||||||
}
|
}
|
||||||
@ -94,8 +94,8 @@ include_once("Empleado.php");
|
|||||||
}else{
|
}else{
|
||||||
if($estado > 0){
|
if($estado > 0){
|
||||||
$consulta = "SELECT * from usuarios where tipo = '".$this->tipo."' and estado='".$estado."' ".$this->orden;
|
$consulta = "SELECT * from usuarios where tipo = '".$this->tipo."' and estado='".$estado."' ".$this->orden;
|
||||||
} else{ //se cambia a los nuevos estados #723 Peticion
|
} else{
|
||||||
$consulta = "SELECT * from usuarios where tipo = '".$this->tipo."' and estado in ('510', '511', '520', '530', '540', '560', '600')$this->orden";
|
$consulta = "SELECT * from usuarios where tipo = '".$this->tipo."' and estado in ('510', '520', '521', '522', '523','530', '540', '550', '560')$this->orden";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,7 +105,6 @@ include_once("Empleado.php");
|
|||||||
}
|
}
|
||||||
$bd=new BD();
|
$bd=new BD();
|
||||||
$resultado = $bd->execQuery($consulta);
|
$resultado = $bd->execQuery($consulta);
|
||||||
|
|
||||||
//Procesamos los candidatos.
|
//Procesamos los candidatos.
|
||||||
if(mysql_num_rows($resultado) == 0){
|
if(mysql_num_rows($resultado) == 0){
|
||||||
$this->personas = array();
|
$this->personas = array();
|
||||||
@ -30,32 +30,26 @@ class Oferta {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function esEliminable() {
|
|
||||||
return ($oferta->getValor("estado") == 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
function eliminar() {
|
function eliminar() {
|
||||||
return false;
|
//Antes de nada quitamos el candidato asociado a la oferta para que se haga la lógica que corresponda
|
||||||
if ($this->esEliminable()) {
|
$idCand = $this->getValor("candidato");
|
||||||
//Antes de nada quitamos el candidato asociado a la oferta para que se haga la lógica que corresponda
|
if (!empty($idCand)) {
|
||||||
$idCand = $this->getValor("candidato");
|
if (!$this->quitarCandidato()) {
|
||||||
if (!empty($idCand)) {
|
return false;
|
||||||
if (!$this->quitarCandidato()) {
|
}
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// eliminamos en la oferta de la BD
|
// eliminamos en la oferta de la BD
|
||||||
$consulta = "DELETE FROM candidato_pedido WHERE oid = ".$this->campos['oid'];
|
$consulta = "DELETE FROM candidato_pedido WHERE oid = ".$this->campos['oid'];
|
||||||
$bd = new BD();
|
|
||||||
if (!$bd->execQuery($consulta)) {
|
$bd = new BD();
|
||||||
return false;
|
if (!$bd->execQuery($consulta)) {
|
||||||
} else {
|
return false;
|
||||||
$mensaje = "Oferta eliminada";
|
} else {
|
||||||
$this->actualizarHistorial($mensaje);
|
$mensaje = "Oferta eliminada";
|
||||||
return true;
|
$this->actualizarHistorial($mensaje);
|
||||||
}
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function actualizarHistorial($mensaje) {
|
function actualizarHistorial($mensaje) {
|
||||||
@ -66,22 +60,12 @@ class Oferta {
|
|||||||
return $bd->execQuery($consulta);
|
return $bd->execQuery($consulta);
|
||||||
}
|
}
|
||||||
|
|
||||||
function darNombreEstado($cod, $idioma) {
|
|
||||||
$consulta = "SELECT NOMBRE from candidaturas_estados WHERE cod=\"" . $cod . "\" AND idioma=\"" . $idioma . "\"";
|
|
||||||
$bd = new BD();
|
|
||||||
return $bd->getCampo($consulta);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getValor($nombre) {
|
function getValor($nombre) {
|
||||||
if (array_key_exists($nombre, $this->campos)) {
|
if (array_key_exists($nombre, $this->campos)) {
|
||||||
// El campo ya lo habíamos recuperamos, lo mostramos
|
// El campo ya lo habíamos recuperamos, lo mostramos
|
||||||
return $this->campos[$nombre];
|
return $this->campos[$nombre];
|
||||||
} else {
|
} else {
|
||||||
switch ($nombre) {
|
switch ($nombre) {
|
||||||
case "nombre_gerente":$idGerente = $this->getValor("gerente");
|
|
||||||
$consulta = "SELECT CONCAT(nombre,\" \",apellidos) FROM usuarios WHERE oid=\"" . $idGerente . "\"";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "nombre_estado":
|
case "nombre_estado":
|
||||||
$idEstado = $this->getValor("estado");
|
$idEstado = $this->getValor("estado");
|
||||||
$idioma = $this->usuario->getValor("idioma");
|
$idioma = $this->usuario->getValor("idioma");
|
||||||
@ -164,9 +148,9 @@ class Oferta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* En proceso -> presentada
|
* En configuración -> Configurada
|
||||||
*/
|
*/
|
||||||
private function ejecutar100120() {
|
private function ejecutar110120() {
|
||||||
// Comprobamos que haya un candidato asignado.
|
// Comprobamos que haya un candidato asignado.
|
||||||
$candidato = $this->getValor("candidato");
|
$candidato = $this->getValor("candidato");
|
||||||
if (!empty($candidato)) {
|
if (!empty($candidato)) {
|
||||||
@ -179,7 +163,6 @@ class Oferta {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function setCampo($nombre, $valor) {
|
function setCampo($nombre, $valor) {
|
||||||
// PERMISOS:
|
// PERMISOS:
|
||||||
/*
|
/*
|
||||||
@ -187,9 +170,9 @@ class Oferta {
|
|||||||
* Gestor (3) - Los suyos
|
* Gestor (3) - Los suyos
|
||||||
* Otro - Excepción
|
* Otro - Excepción
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$gerente = $this->getValor("gerente");
|
$gerente = $this->getValor("gerente");
|
||||||
$sesion = $this->usuario->getValor("oid");
|
$sesion = $this->usuario->getValor("oid");
|
||||||
|
|
||||||
if ($this->usuario->tieneRol(1) || ($this->usuario->tieneRol(3) && $sesion == $gerente) || $this->setAutomatico) {
|
if ($this->usuario->tieneRol(1) || ($this->usuario->tieneRol(3) && $sesion == $gerente) || $this->setAutomatico) {
|
||||||
$viejo = $this->getValor($nombre);
|
$viejo = $this->getValor($nombre);
|
||||||
if ($viejo != $valor) {
|
if ($viejo != $valor) {
|
||||||
@ -200,29 +183,17 @@ class Oferta {
|
|||||||
$consulta = "UPDATE candidato_pedido SET $nombre = '$valor' WHERE oid='$oid'";
|
$consulta = "UPDATE candidato_pedido SET $nombre = '$valor' WHERE oid='$oid'";
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
if ($bd->execQuery($consulta)) {
|
if ($bd->execQuery($consulta)) {
|
||||||
|
|
||||||
// Guardar en el historial
|
// Guardar en el historial
|
||||||
$valor = $this->getValorMulti($nombre, $valor);
|
$valor = $this->getValorMulti($nombre, $valor);
|
||||||
|
if ($viejo == "" && $valor != "") {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
$historial = "$nombre (de - a $valor)";
|
||||||
//SOLO ACTUALIZA EL HISTORIAL LOS CAMBIOS DE ESTADO Y ASIGNACIONES DE CANDIDATOS
|
} else {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
$historial = "$nombre (de $viejo a $valor)";
|
||||||
if ($nombre == "estado") {
|
}
|
||||||
$estado_viejo = $this->darNombreEstado($viejo, "sp");
|
if ($nombre = "estado") {
|
||||||
$estado_nuevo = $this->darNombreEstado($valor, "sp");
|
$this->actualizarHistorial($historial);
|
||||||
$historial = "Cambio de estado (". $estado_viejo ." a ". $estado_nuevo .")";
|
}
|
||||||
$this->actualizarHistorial($historial);
|
|
||||||
|
|
||||||
//Una vez cambiado de estado la oferta, si el nuevo estado es Rechazado o Retirada, liberamos al candidato
|
|
||||||
if (($valor=='160')||($valor=='170')) {
|
|
||||||
$idCand = $this->getValor("candidato");
|
|
||||||
if (!empty($idCand)) {
|
|
||||||
if (!$this->quitarCandidato()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -256,10 +227,10 @@ if ($nombre == "estado") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Devuelve una lista de candidatos disponibles para una oferta, se cambia a los nuevos estados #723 Peticion
|
* Devuelve una lista de candidatos disponibles para una oferta, que son todos menos los no disponibles #679 Peticion
|
||||||
*/
|
*/
|
||||||
function getCandidatosDisponibles() {
|
function getCandidatosDisponibles() {
|
||||||
return $this->getCandidatos("520,530,540,560,600");
|
return $this->getCandidatos("510,521,522,523,540,550,560");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -274,7 +245,7 @@ if ($nombre == "estado") {
|
|||||||
$historial = "";
|
$historial = "";
|
||||||
$oid = $this->getValor("oid");
|
$oid = $this->getValor("oid");
|
||||||
|
|
||||||
$consulta = "SELECT * FROM historial_oferta WHERE oid_h='$oid' ORDER BY id DESC";
|
$consulta = "SELECT * FROM historial_oferta WHERE oid_h='$oid' ORDER BY fecha_h DESC";
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
$resultado = $bd->execQuery($consulta);
|
$resultado = $bd->execQuery($consulta);
|
||||||
|
|
||||||
@ -295,43 +266,29 @@ if ($nombre == "estado") {
|
|||||||
return $resultado;
|
return $resultado;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getNumOfertasCandidato($oid) {
|
|
||||||
$consulta = "SELECT * FROM candidato_pedido WHERE candidato='$oid' and estado not in (160,170) ORDER BY fecha DESC";
|
|
||||||
$bd = new BD();
|
|
||||||
$resultado = $bd->execQuery($consulta);
|
|
||||||
return mysql_num_rows($resultado);
|
|
||||||
}
|
|
||||||
|
|
||||||
function quitarCandidato() {
|
function quitarCandidato() {
|
||||||
$idCand = $this->getValor("candidato");
|
$idCand = $this->getValor("candidato");
|
||||||
$this->setCampo("candidato", "");
|
|
||||||
if (!empty($idCand)) {
|
if (!empty($idCand)) {
|
||||||
$candidato = new Candidato($this->usuario, $idCand);
|
$candidato = new Candidato($this->usuario, $idCand);
|
||||||
$estadoCand = $candidato->getValor("estado");
|
$estadoCand = $candidato->getValor("estado");
|
||||||
$numOfertasCandidato = $this->getNumOfertasCandidato($idCand);
|
$numOfertasCandidato = $this->getOfertasCandidato($idCand);
|
||||||
|
|
||||||
switch ($estadoCand) {
|
switch ($estadoCand) {
|
||||||
//TODO CANDIDATO ASOCIADO A UNA OFERTA (este como este su situación) pasará a En proceso:disponible si no tiene alguna otra oferta distinta de Rechazada 160 o Retirada 170,
|
//Disponible asignado exclusivo, Disponible asignado, No disponible.
|
||||||
//el estado del candidato no cambia si está asociado a alguna otra oferta que no sea Rechazada 160 o Retirada 170. se cambia a los nuevos estados #723 Peticion
|
//El estado del candidato no cambia si está asociado a alguna otra oferta, sino pasará a Disponible
|
||||||
case 600:;
|
case "560":
|
||||||
case 560:;
|
case "550":
|
||||||
case 510:;
|
case "530":
|
||||||
case 511:;
|
if (count($numOfertasCandidato) <= 1) {
|
||||||
case 520:;
|
|
||||||
case 530:;
|
|
||||||
case 540:
|
|
||||||
//Modificamos historial de candidato
|
|
||||||
$mensaje = "Se quita en oferta ". $this->getValor("referencia");
|
|
||||||
$candidato->actualizarHistorial($mensaje);
|
|
||||||
//Modificamos historial de la oferta
|
|
||||||
$nombre_candidato = $candidato->getValor("nombre") . " " . $candidato->getValor("apellidos");
|
|
||||||
$mensaje = "El candidato ".$nombre_candidato." se quita de la oferta";
|
|
||||||
$this->actualizarHistorial($mensaje);
|
|
||||||
//Cambiamos de estado al candidato
|
|
||||||
if ($numOfertasCandidato < 1) {
|
|
||||||
$candidato->transita("540", "");
|
$candidato->transita("540", "");
|
||||||
|
$nombre_candidato = $candidato->getValor("nombre") . " " . $candidato->getValor("apellidos");
|
||||||
|
$mensaje = "El candidato ".$nombre_candidato." pasa a estado Disponible";
|
||||||
|
$this->actualizarHistorial($mensaje);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
|
//Pendiente de clasificar, Rechazados tipo1, tipo2, tipo3, Disponible.
|
||||||
|
//No podrá darse el caso ya que todo candidato asociado a una oferta debe estar Disponible asignado, Disponible asignado exclusivo, o no disponible
|
||||||
default:
|
default:
|
||||||
$error = "[quitarCandidato]. El candidato tiene un estado no permitido ('" . $estadoCand . "')";
|
$error = "[quitarCandidato]. El candidato tiene un estado no permitido ('" . $estadoCand . "')";
|
||||||
throw new Exception($error);
|
throw new Exception($error);
|
||||||
@ -340,7 +297,6 @@ if ($nombre == "estado") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function asignarCandidato($idCandidato) {
|
function asignarCandidato($idCandidato) {
|
||||||
//Lo primero es tratar el candidato asociado actualmente antes de asignar el pasado por parametro
|
|
||||||
$idCand = $this->getValor("candidato");
|
$idCand = $this->getValor("candidato");
|
||||||
if (!empty($idCand)) {
|
if (!empty($idCand)) {
|
||||||
if (!$this->quitarCandidato()) {
|
if (!$this->quitarCandidato()) {
|
||||||
@ -350,38 +306,26 @@ if ($nombre == "estado") {
|
|||||||
|
|
||||||
$candidato = new Candidato($this->usuario, $idCandidato);
|
$candidato = new Candidato($this->usuario, $idCandidato);
|
||||||
$estadoCand = $candidato->getValor("estado");
|
$estadoCand = $candidato->getValor("estado");
|
||||||
$numOfertasCandidato = $this->getNumOfertasCandidato($idCand);
|
$numOfertasCandidato = $this->getOfertasCandidato($idCand);
|
||||||
|
|
||||||
switch ($estadoCand) {
|
switch ($estadoCand) {
|
||||||
//En proceso:Disponible asignado, el estado del candidato no cambia, solo se asigna a la oferta y ya está.
|
//Disponible asignado, el estado del candidato no cambia, solo se asigna a la oferta y ya está.
|
||||||
case 560:
|
case "560":
|
||||||
$this->setCampo("candidato", $idCandidato);
|
$this->setCampo("candidato", $idCandidato);
|
||||||
//Modificamos historial de candidato
|
|
||||||
$mensaje = "Asignado en oferta ". $this->getValor("referencia");
|
|
||||||
$candidato->actualizarHistorial($mensaje);
|
|
||||||
//Modificamos historial de oferta
|
|
||||||
$nombre_candidato = $candidato->getValor("nombre") . " " . $candidato->getValor("apellidos");
|
|
||||||
$mensaje = "Asignado el candidato ".$nombre_candidato;
|
|
||||||
$this->actualizarHistorial($mensaje);
|
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//Rechazado, Sin más adelante, En proceso:Disponible, Otras provincias. se cambia a los nuevos estados #723 Peticion
|
//Pendiente de clasificar, Rechazados tipo1, tipo2, tipo3, Disponible. Todos los candidatos con alguno de estos estados cambiarán a Disponible asignado (560)
|
||||||
//Todos los candidatos con alguno de estos estados cambiarán a En proceso:Disponible asignado (560)
|
case "510":
|
||||||
case 600:;
|
case "521":
|
||||||
case 520:;
|
case "522":
|
||||||
case 530:;
|
case "523":
|
||||||
case 540:
|
case "540":
|
||||||
$this->setCampo("candidato", $idCandidato);
|
$this->setCampo("candidato", $idCandidato);
|
||||||
//Modificamos historial de candidato
|
|
||||||
$mensaje = "Asignado en oferta ". $this->getValor("referencia");
|
|
||||||
$candidato->actualizarHistorial($mensaje);
|
|
||||||
//Modificamos historial de oferta
|
|
||||||
$nombre_candidato = $candidato->getValor("nombre") . " " . $candidato->getValor("apellidos");
|
|
||||||
$mensaje = "Asignado el candidato ".$nombre_candidato;
|
|
||||||
$this->actualizarHistorial($mensaje);
|
|
||||||
//Cambiamos el estado del candidato
|
|
||||||
if ($candidato->transita("560", "")){
|
if ($candidato->transita("560", "")){
|
||||||
|
$nombre_candidato = $candidato->getValor("nombre") . " " . $candidato->getValor("apellidos");
|
||||||
|
$mensaje = "Asignado el candidato ".$nombre_candidato. "-->".$candidato->getValor("estado");
|
||||||
|
$this->actualizarHistorial($mensaje);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -390,9 +334,9 @@ if ($nombre == "estado") {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//("")
|
//("550")Disponible asignado exclusivo,u otro que no exista
|
||||||
default:
|
default:
|
||||||
$error = "El candidato tiene un estado no permitido ('" . $candidato->getValor("nombre_estado") . "')";
|
$error = "El candidato tiene un estado no permitido ('" . $candidato->getValor("estado") . "')";
|
||||||
throw new Exception($error);
|
throw new Exception($error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -11,8 +11,6 @@ include_once("Objects/Empleado.php");
|
|||||||
include_once("Objects/Afinidad.php");
|
include_once("Objects/Afinidad.php");
|
||||||
include_once("Objects/Automata.php");
|
include_once("Objects/Automata.php");
|
||||||
include_once("Objects/Oferta.php");
|
include_once("Objects/Oferta.php");
|
||||||
include_once("ListaCapacidadesProfesionales.php");
|
|
||||||
include_once("Objects/ListaOfertas.php");
|
|
||||||
|
|
||||||
class Pedido {
|
class Pedido {
|
||||||
|
|
||||||
@ -23,7 +21,6 @@ class Pedido {
|
|||||||
/* Contiene una lista con todos los atributos y su valor */
|
/* Contiene una lista con todos los atributos y su valor */
|
||||||
private $campos = array();
|
private $campos = array();
|
||||||
private $listaOfertas = null;
|
private $listaOfertas = null;
|
||||||
private $totalOfertas = 0;
|
|
||||||
|
|
||||||
|
|
||||||
/* Lista de perfiles */
|
/* Lista de perfiles */
|
||||||
@ -105,10 +102,6 @@ class Pedido {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCapacidadesProfesionales(){
|
|
||||||
return new ListaCapacidadesProfesionales($this->getValor("oid"),"solicitud");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Procesa el resultado de una query para añadir campos al pedido.
|
* Procesa el resultado de una query para añadir campos al pedido.
|
||||||
*
|
*
|
||||||
@ -179,14 +172,6 @@ class Pedido {
|
|||||||
return $this->campos;
|
return $this->campos;
|
||||||
}
|
}
|
||||||
|
|
||||||
function darNombreEstado($cod, $idioma) {
|
|
||||||
$consulta = "SELECT NOMBRE from pedidos_estados WHERE cod=\"" . $cod . "\" AND idioma=\"" . $idioma . "\"";
|
|
||||||
$bd = new BD();
|
|
||||||
echo $consulta;
|
|
||||||
return $bd->getCampo($consulta);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Asigna un nuevo campo al pedido.
|
* Asigna un nuevo campo al pedido.
|
||||||
*
|
*
|
||||||
@ -214,14 +199,12 @@ class Pedido {
|
|||||||
if ($bd->execQuery($consulta)) {
|
if ($bd->execQuery($consulta)) {
|
||||||
// Comprobamos multivaluado y casos especiales:
|
// Comprobamos multivaluado y casos especiales:
|
||||||
$valor = $this->getValorMulti($nombre, $valor);
|
$valor = $this->getValorMulti($nombre, $valor);
|
||||||
|
if ($viejo == "" && $valor != "") {
|
||||||
///////////////////////////////////////////////////
|
$historial = "$nombre (de - a $valor)";
|
||||||
//SOLO ACTUALIZA EL HISTORIAL LOS CAMBIOS DE ESTADO
|
} else {
|
||||||
///////////////////////////////////////////////////
|
$historial = "$nombre (de $viejo a $valor)";
|
||||||
if ($nombre == "estado") {
|
}
|
||||||
$historial = "Cambio de estado (". $viejo ." a ". $valor .")";
|
//$this->actualizarHistorial($historial);
|
||||||
$this->actualizarHistorial($historial);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -275,29 +258,15 @@ if ($nombre == "estado") {
|
|||||||
* Gestor (3) - Los suyos
|
* Gestor (3) - Los suyos
|
||||||
* Otro - Excepción
|
* Otro - Excepción
|
||||||
*/
|
*/
|
||||||
|
$gerente = $this->getValor("gerente");
|
||||||
//Recogemos todas las ofertas del pedido para proceder a eliminarlas y dejar su candidato libre
|
$sesion = $this->usuario->getValor("oid");
|
||||||
$cond = array();
|
if ($this->usuario->tieneRol(1) || ($this->usuario->tieneRol(3) && $sesion == $gerente)) {
|
||||||
$cond[] = "pedido = '".$this->getValor("oid")."'";
|
$oid = $this->getValor("oid");
|
||||||
$orden = array();
|
$consulta = "DELETE FROM pedidos WHERE oid='$oid'";
|
||||||
$orden[] = "referencia";
|
$bd = new BD();
|
||||||
$listaOfertas = new ListaOfertas($this->usuario, $cond, $orden);
|
return $bd->execQuery($consulta);
|
||||||
$ofertas = $listaOfertas->getOfertas();
|
} else {
|
||||||
$totalOfertas = count($ofertas);
|
return false;
|
||||||
for ($i = 0; $i < $totalOfertas; $i++)
|
|
||||||
$ofertas[$i]->eliminar();
|
|
||||||
|
|
||||||
if (count($listaOfertas->getOfertas()) == 0) {
|
|
||||||
$gerente = $this->getValor("gerente");
|
|
||||||
$sesion = $this->usuario->getValor("oid");
|
|
||||||
if ($this->usuario->tieneRol(1) || ($this->usuario->tieneRol(3) && $sesion == $gerente)) {
|
|
||||||
$oid = $this->getValor("oid");
|
|
||||||
$consulta = "DELETE FROM pedidos WHERE oid='$oid'";
|
|
||||||
$bd = new BD();
|
|
||||||
return $bd->execQuery($consulta);
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -915,7 +884,7 @@ if ($nombre == "estado") {
|
|||||||
$pesoPerfil = $this->getValor("pesoPerfil");
|
$pesoPerfil = $this->getValor("pesoPerfil");
|
||||||
// Eliminamos a los usuario de la tabla de candidatos en pedido que se encuentren
|
// Eliminamos a los usuario de la tabla de candidatos en pedido que se encuentren
|
||||||
// en proceso para este pedido.
|
// en proceso para este pedido.
|
||||||
$consulta = "DELETE FROM candidato_pedido WHERE pedido='$id' AND estado='100'";
|
$consulta = "DELETE FROM candidato_pedido WHERE pedido='$id' AND estado='110'";
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
$bd->execQuery($consulta);
|
$bd->execQuery($consulta);
|
||||||
// Si el pedido no está cerrado calculamos su afinidad para los usuarios:
|
// Si el pedido no está cerrado calculamos su afinidad para los usuarios:
|
||||||
@ -945,7 +914,7 @@ if ($nombre == "estado") {
|
|||||||
$afi = $afinidad->calculaAfinidad($pesoIdioma, $pesoPerfil, $pesoTecno);
|
$afi = $afinidad->calculaAfinidad($pesoIdioma, $pesoPerfil, $pesoTecno);
|
||||||
echo $afi . "<br/>";
|
echo $afi . "<br/>";
|
||||||
if ($afi > 0) {
|
if ($afi > 0) {
|
||||||
$consulta = "INSERT INTO candidato_pedido (candidato, pedido, afinidad, estado, fecha) VALUES('$idUsuario', '$id', '$afi', '100', curdate())";
|
$consulta = "INSERT INTO candidato_pedido (candidato, pedido, afinidad, estado, fecha) VALUES('$idUsuario', '$id', '$afi', '110', curdate())";
|
||||||
|
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
$bd->execQuery($consulta);
|
$bd->execQuery($consulta);
|
||||||
@ -969,7 +938,7 @@ if ($nombre == "estado") {
|
|||||||
$historial = "";
|
$historial = "";
|
||||||
$oid = $this->getValor("oid");
|
$oid = $this->getValor("oid");
|
||||||
|
|
||||||
$consulta = "SELECT * FROM historial_pedido WHERE oid_h='$oid' ORDER BY id DESC";
|
$consulta = "SELECT * FROM historial_pedido WHERE oid_h='$oid' ORDER BY fecha_h DESC";
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
$resultado = $bd->execQuery($consulta);
|
$resultado = $bd->execQuery($consulta);
|
||||||
|
|
||||||
@ -1119,40 +1088,6 @@ if ($nombre == "estado") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setOfertaElaborada() {
|
|
||||||
$resultado = false;
|
|
||||||
$estado = $this->getValor("estado");
|
|
||||||
switch ($estado) {
|
|
||||||
case 120;
|
|
||||||
case 140;
|
|
||||||
case 150: $resultado=true;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 110;
|
|
||||||
case 130: $consulta = "UPDATE pedidos SET estado=140 where oid='".$this->getValor("oid")."'";
|
|
||||||
$bd = new BD();
|
|
||||||
return $bd->execQuery($consulta);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default: $resultado=false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $resultado;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getListaOfertas() {
|
|
||||||
//Recogemos todas las ofertas del pedido para proceder a eliminarlas y dejar su candidato libre
|
|
||||||
$cond = array();
|
|
||||||
$cond[] = "pedido = '".$this->getValor("oid")."'";
|
|
||||||
$orden = array();
|
|
||||||
$orden[] = "referencia";
|
|
||||||
$Ofertas = new ListaOfertas($this->usuario, $cond, $orden);
|
|
||||||
$listaOfertas = $Ofertas->getOfertas();
|
|
||||||
$totalOfertas = count($ofertas);
|
|
||||||
return $listaOfertas;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -10,7 +10,6 @@
|
|||||||
include_once("BD.php");
|
include_once("BD.php");
|
||||||
include_once("Rol.php");
|
include_once("Rol.php");
|
||||||
include_once("Objects/Administracion.php");
|
include_once("Objects/Administracion.php");
|
||||||
include_once("functions_solr.php");
|
|
||||||
|
|
||||||
class Persona{
|
class Persona{
|
||||||
|
|
||||||
@ -243,6 +242,19 @@
|
|||||||
// if($bd->execQuery($consulta)){
|
// if($bd->execQuery($consulta)){
|
||||||
//Comprobamos multivaluado y casos especiales:
|
//Comprobamos multivaluado y casos especiales:
|
||||||
$valor = $this->getValorMulti($nombre, $valor);
|
$valor = $this->getValorMulti($nombre, $valor);
|
||||||
|
|
||||||
|
if(($nombre == "observaciones") || ($nombre == "descripcion")){
|
||||||
|
$historial = $nombre;
|
||||||
|
}else if($viejo == "" && $valor != ""){
|
||||||
|
$historial = "$nombre (de - a $valor)";
|
||||||
|
}else{
|
||||||
|
$historial = "$nombre (de $viejo a $valor)";
|
||||||
|
}
|
||||||
|
//Hay campos que no actualizan el historial
|
||||||
|
if(($nombre != "msgEstado") && ($nombre != "diasEspera")){
|
||||||
|
//$this->actualizarHistorial($historial);
|
||||||
|
}
|
||||||
|
// }
|
||||||
return $dato;
|
return $dato;
|
||||||
}else{
|
}else{
|
||||||
return "";
|
return "";
|
||||||
@ -692,12 +704,11 @@
|
|||||||
/**
|
/**
|
||||||
* A<EFBFBD>ade un nuevo curr<EFBFBD>culum a la persona.
|
* A<EFBFBD>ade un nuevo curr<EFBFBD>culum a la persona.
|
||||||
*/
|
*/
|
||||||
protected function addCurriculum($archivo, $tipo, $usuario){
|
protected function addCurriculum($archivo, $usuario){
|
||||||
$cv = $this->getValor("cv") + 1;
|
$cv = $this->getValor("cv") + 1;
|
||||||
$oid = $this->getValor("oid");
|
$oid = $this->getValor("oid");
|
||||||
|
|
||||||
$nombre_archivo = $oid."-".$cv;
|
$nombre_archivo = $oid."-".$cv;
|
||||||
$tipo_curriculum = $tipo;
|
|
||||||
|
|
||||||
$directorio = constante("srcDocs").SLASH."cv".SLASH;
|
$directorio = constante("srcDocs").SLASH."cv".SLASH;
|
||||||
if (!@file_exists($directorio)){
|
if (!@file_exists($directorio)){
|
||||||
@ -717,15 +728,13 @@
|
|||||||
$nombre_ruta_tabla=addslashes($nombre_ruta_tabla);
|
$nombre_ruta_tabla=addslashes($nombre_ruta_tabla);
|
||||||
|
|
||||||
if($fichero_subido){
|
if($fichero_subido){
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
$consulta = "INSERT INTO curriculum_usuario (oid, curriculum, fecha, tipo_curriculum) values ('".$oid."', '".$nombre_ruta_tabla."', now(), ".$tipo_curriculum.")";
|
$consulta = "INSERT INTO curriculum_usuario (oid, curriculum, fecha) values ('".$oid."', '".$nombre_ruta_tabla."', now())";
|
||||||
$bd->execQuery($consulta);
|
$bd->execQuery($consulta);
|
||||||
//$this->actualizarHistorial("Nuevo CV", $usuario);
|
//$this->actualizarHistorial("Nuevo CV", $usuario);
|
||||||
$consulta = "update usuarios set cv=cv+1 where oid='$oid'";
|
$consulta = "update usuarios set cv=cv+1 where oid='$oid'";
|
||||||
$bd->execQuery($consulta);
|
$bd->execQuery($consulta);
|
||||||
|
return true;
|
||||||
solr_anadir_cv($oid, $destino);
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -736,20 +745,21 @@
|
|||||||
$consulta = "DELETE FROM curriculum_usuario WHERE oid = '".$oid."' and curriculum = '".$curriculum."' and fecha = '".$fecha."'";
|
$consulta = "DELETE FROM curriculum_usuario WHERE oid = '".$oid."' and curriculum = '".$curriculum."' and fecha = '".$fecha."'";
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
$resultado = $bd->execQuery($consulta);
|
$resultado = $bd->execQuery($consulta);
|
||||||
if ($resultado){
|
|
||||||
$consulta = "update usuarios set cv=cv-1 where oid='$oid'";
|
|
||||||
$bd->execQuery($consulta);
|
|
||||||
$cambios = "CV eliminado";
|
|
||||||
//$this->actualizarHistorial($cambios, $usuario);
|
|
||||||
|
|
||||||
$ruta = constante("srcDocs")."\\".$curriculum;
|
if ($resultado){
|
||||||
if (is_file($ruta) && unlink($ruta))
|
$consulta = "update usuarios set cv=cv-1 where oid='$oid'";
|
||||||
{
|
$bd->execQuery($consulta);
|
||||||
solr_eliminar_cv($ruta);
|
|
||||||
return true;
|
$cambios = "CV eliminado";
|
||||||
} else {
|
|
||||||
return false;
|
//$this->actualizarHistorial($cambios, $usuario);
|
||||||
}
|
$ruta = constante("srcDocs")."\\".$curriculum;
|
||||||
|
if (!@unlink($ruta)){
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -1022,7 +1032,7 @@
|
|||||||
$historial = "";
|
$historial = "";
|
||||||
$oid = $this->getValor("oid");
|
$oid = $this->getValor("oid");
|
||||||
|
|
||||||
$consulta = "SELECT * FROM historial_usuario WHERE oid_h='$oid' ORDER BY id desc";
|
$consulta = "SELECT * FROM historial_usuario WHERE oid_h='$oid' ORDER BY fecha_h DESC";
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
$resultado = $bd->execQuery($consulta);
|
$resultado = $bd->execQuery($consulta);
|
||||||
|
|
||||||
@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getRutaCV($id){
|
public function getRutaCV($id){
|
||||||
if($this->tieneRol(4) || $this->tieneRol(3) || $this->tieneRol(7)){
|
if($this->tieneRol(4) || $this->tieneRol(3)){
|
||||||
$consulta = "SELECT curriculum FROM curriculum_usuario WHERE cod = '".$id."'";
|
$consulta = "SELECT curriculum FROM curriculum_usuario WHERE cod = '".$id."'";
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
$ruta = $bd->getCampo($consulta);
|
$ruta = $bd->getCampo($consulta);
|
||||||
@ -41,7 +41,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getNombreCV($id){
|
public function getNombreCV($id){
|
||||||
if($this->tieneRol(4) || $this->tieneRol(3) || $this->tieneRol(7)){
|
if($this->tieneRol(4) || $this->tieneRol(3)){
|
||||||
$ruta = $this->getRutaCV($id);
|
$ruta = $this->getRutaCV($id);
|
||||||
$consulta="SELECT CONCAT(nombre,\" \",apellidos,\" (\",fecha,\")\") FROM usuarios, curriculum_usuario WHERE curriculum_usuario.cod=\"".$id."\" AND curriculum_usuario.oid = usuarios.oid";
|
$consulta="SELECT CONCAT(nombre,\" \",apellidos,\" (\",fecha,\")\") FROM usuarios, curriculum_usuario WHERE curriculum_usuario.cod=\"".$id."\" AND curriculum_usuario.oid = usuarios.oid";
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
@ -27,6 +27,12 @@ if(stripinput($_POST['action'])=="add"){
|
|||||||
$errores[]="22";
|
$errores[]="22";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*NO se valida el perfil para candidatos nuevos con estado 510 (pendiente de clasificacion) que es el por defecto
|
||||||
|
if((count($perfil)==1) && ($perfil["0"]=="")){
|
||||||
|
$errores_persona .= $locale['1705']."<br />";
|
||||||
|
$errores[]="23";
|
||||||
|
}
|
||||||
|
*/
|
||||||
include_once("verificar_candidato.php");
|
include_once("verificar_candidato.php");
|
||||||
|
|
||||||
if(count($errores)==0){
|
if(count($errores)==0){
|
||||||
@ -42,6 +48,7 @@ if(stripinput($_POST['action'])=="add"){
|
|||||||
$camposQuitar["disp_viajar"]=stripinput($_POST['disp_viajar']);
|
$camposQuitar["disp_viajar"]=stripinput($_POST['disp_viajar']);
|
||||||
$camposQuitar["disp_internacional"]=stripinput($_POST['disp_internacional']);
|
$camposQuitar["disp_internacional"]=stripinput($_POST['disp_internacional']);
|
||||||
$camposQuitar["disp_carnet"]=stripinput($_POST['disp_carnet']);
|
$camposQuitar["disp_carnet"]=stripinput($_POST['disp_carnet']);
|
||||||
|
|
||||||
$camposQuitar["dianac"]=stripinput($_POST['dianac']);
|
$camposQuitar["dianac"]=stripinput($_POST['dianac']);
|
||||||
$camposQuitar["mesnac"]=stripinput($_POST['mesnac']);
|
$camposQuitar["mesnac"]=stripinput($_POST['mesnac']);
|
||||||
$camposQuitar["anyonac"]=stripinput($_POST['anyonac']);
|
$camposQuitar["anyonac"]=stripinput($_POST['anyonac']);
|
||||||
@ -54,7 +61,6 @@ if(stripinput($_POST['action'])=="add"){
|
|||||||
$camposQuitar["titulaciones"]=$_POST['titulaciones'];
|
$camposQuitar["titulaciones"]=$_POST['titulaciones'];
|
||||||
$camposQuitar["provincia_deseada"]=$_POST['provincia_deseada'];
|
$camposQuitar["provincia_deseada"]=$_POST['provincia_deseada'];
|
||||||
$camposQuitar["provincias_no_deseadas"]=$_POST['provincias_no_deseadas'];
|
$camposQuitar["provincias_no_deseadas"]=$_POST['provincias_no_deseadas'];
|
||||||
$camposQuitar["tipo_curriculum"]=$_POST['tipo_curriculum'];
|
|
||||||
$camposQuitar["perfil"]=$_POST['perfil'];
|
$camposQuitar["perfil"]=$_POST['perfil'];
|
||||||
$camposQuitar["action"]=stripinput($_POST['action']);
|
$camposQuitar["action"]=stripinput($_POST['action']);
|
||||||
$camposQuitar["diaentre"]=stripinput($_POST['diaentre']);
|
$camposQuitar["diaentre"]=stripinput($_POST['diaentre']);
|
||||||
@ -100,10 +106,7 @@ if(stripinput($_POST['action'])=="add"){
|
|||||||
|
|
||||||
|
|
||||||
$candidatoNew->addPerfiles($_POST['perfil']);
|
$candidatoNew->addPerfiles($_POST['perfil']);
|
||||||
$candidatoNew->addCurriculum($_FILES['userfile'], $_POST['tipo_curriculum']);
|
$candidatoNew->addCurriculum($_FILES['userfile']);
|
||||||
//Subimos la foto
|
|
||||||
uploadImagenCandidato($idCandidatoNew, 250, 250, 150, 150);
|
|
||||||
|
|
||||||
header("Location: detalle_candidato.php?oid=".$idCandidatoNew);
|
header("Location: detalle_candidato.php?oid=".$idCandidatoNew);
|
||||||
} else {
|
} else {
|
||||||
$tipomsg="error";
|
$tipomsg="error";
|
||||||
@ -148,7 +151,7 @@ echo '<tr>';
|
|||||||
//CAMPO NOMBRE
|
//CAMPO NOMBRE
|
||||||
echo '<td ';
|
echo '<td ';
|
||||||
if(in_array("1",$errores)) echo " class=\"errorcampo\"";
|
if(in_array("1",$errores)) echo " class=\"errorcampo\"";
|
||||||
echo $en.' width="25%" textalign="right">'.$locale['100'].'<br><input type="text" name="nombre" value="'.$_POST['nombre'].'" size="30" maxlength="50"><br></td>';
|
echo $en.' width="25%" textalign="right">'.$locale['100'].'<br><input type="text" name="nombre" value="'.$_POST['nombre'].'" size="20" maxlength="50"><br></td>';
|
||||||
|
|
||||||
//CAMPO APELLIDOS
|
//CAMPO APELLIDOS
|
||||||
echo '<td ';
|
echo '<td ';
|
||||||
@ -158,10 +161,10 @@ echo ' width="25%" textalign="right">'.$locale['101'].'<br><input type="text" na
|
|||||||
//CAMPO DNI
|
//CAMPO DNI
|
||||||
echo '<td ';
|
echo '<td ';
|
||||||
if(in_array("4",$errores)) echo " class=\"errorcampo\"";
|
if(in_array("4",$errores)) echo " class=\"errorcampo\"";
|
||||||
echo ' width="15%" '.$edni.' textalign="right">'.$locale['1539'].'<br><input type="text" name="dni" value="'.$_POST['dni'].'" size="15" maxlength="9"></td>';
|
echo ' width="25%" '.$edni.' textalign="right">'.$locale['1539'].'<br><input type="text" name="dni" value="'.$_POST['dni'].'" size="9" maxlength="9"></td>';
|
||||||
|
|
||||||
//CAMPO FECHA NACIMIENTO
|
//CAMPO FECHA NACIMIENTO
|
||||||
echo '<td width="35%" textalign="right">'.$locale['116'].'<br>';
|
echo '<td width="25%" textalign="right">'.$locale['116'].'<br>';
|
||||||
rellena_fecha_select($fecha_nacimiento, "nac");
|
rellena_fecha_select($fecha_nacimiento, "nac");
|
||||||
|
|
||||||
//CAMPO SEXO
|
//CAMPO SEXO
|
||||||
@ -178,21 +181,21 @@ echo '<tr>';
|
|||||||
//CAMPO EMAIL
|
//CAMPO EMAIL
|
||||||
echo '<td ';
|
echo '<td ';
|
||||||
if(in_array("5",$errores)) echo ' class="errorcampo"';
|
if(in_array("5",$errores)) echo ' class="errorcampo"';
|
||||||
echo $locale['103'].'<br><input type="text" name="email" value="'.$_POST['email'].'" size="30" maxlength="50"></td>';
|
echo ' width="25%">'.$locale['103'].'<br><input type="text" name="email" value="'.$_POST['email'].'" size="30" maxlength="50"></td>';
|
||||||
|
|
||||||
//CAMPO MOVIL
|
//CAMPO MOVIL
|
||||||
echo '<td ';
|
echo '<td ';
|
||||||
if(in_array("6",$errores)) echo " class=\"errorcampo\"";
|
if(in_array("6",$errores)) echo " class=\"errorcampo\"";
|
||||||
echo $etm.' textalign="right">'.$locale['107'].'<br><input type="text" name="t_movil" value="'.$_POST['t_movil'].'" size="20" maxlength="9"></td>';
|
echo ' width="25%" '.$etm.' textalign="right" width=20%>'.$locale['107'].'<br><input type="text" name="t_movil" value="'.$_POST['t_movil'].'" size="9" maxlength="9"></td>';
|
||||||
|
|
||||||
//CAMPO TELEFONO
|
//CAMPO TELEFONO
|
||||||
echo '<td ';
|
echo '<td ';
|
||||||
if(in_array("7",$errores)) echo " class=\"errorcampo\"";
|
if(in_array("7",$errores)) echo " class=\"errorcampo\"";
|
||||||
echo $etc.' textalign="right">'.$locale['108'].'<br><input type="text" name="t_casa" value="'.$_POST['t_casa'].'" size="15" maxlength="9"></td>';
|
echo ' width="25%" '.$etc.' textalign="right" width=20%>'.$locale['108'].'<br><input type="text" name="t_casa" value="'.$_POST['t_casa'].'" size="9" maxlength="9"></td>';
|
||||||
|
|
||||||
//CAMPO LUGAR NACIMIENTO
|
//CAMPO LUGAR NACIMIENTO
|
||||||
echo '<td ';
|
echo '<td ';
|
||||||
echo $ett.' textalign="right">'.$locale['100117'].'<br><input type="text" name="lugar_nacimiento" value="'.$_POST['lugar_nacimiento'].'" size="50" maxlength="100"> </td>';
|
echo ' width="25%" '.$ett.' textalign="right" width=20%>'.$locale['100117'].'<input type="text" name="lugar_nacimiento" value="'.$_POST['lugar_nacimiento'].'" size="50" maxlength="100"> </td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
|
|
||||||
|
|
||||||
@ -222,8 +225,6 @@ echo '</td>';
|
|||||||
//CAMPO FOTO
|
//CAMPO FOTO
|
||||||
echo '<td ';
|
echo '<td ';
|
||||||
echo ' width="25%" '.$ett.' textalign="right">';
|
echo ' width="25%" '.$ett.' textalign="right">';
|
||||||
echo $locale['Candidato006'] .':<br>';
|
|
||||||
echo '<input name="candidato_imagen" type="file" style="width:250px" class="data">';
|
|
||||||
echo'</td>';
|
echo'</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
|
|
||||||
@ -387,12 +388,11 @@ echo '<div class="encabezado">'.$locale['1549'].'</div>';
|
|||||||
echo '<table align="center" width="100%">';
|
echo '<table align="center" width="100%">';
|
||||||
echo '<tr><td colspan="6">';
|
echo '<tr><td colspan="6">';
|
||||||
menu_curriculums($_GET['oid'], "candidato");
|
menu_curriculums($_GET['oid'], "candidato");
|
||||||
echo '</td></tr><td colspan="6" textalign="right">';
|
echo '</td></tr><tr>';
|
||||||
echo '<input type="hidden" name="MAX_FILE_SIZE" value="10000000">'.$locale['125'].' ';
|
echo '<input type="hidden" name="MAX_FILE_SIZE" value="10000000"><td colspan="6" textalign="right">'.$locale['125'].'<br>';
|
||||||
echo '<input name="userfile" type="file"> '.$locale['00208']. ' ';
|
echo '<input name="userfile" type="file">';
|
||||||
rellena_desplegable_select_oidCol("tipo_curriculum","oid","tipo","tipo_curriculum","","0");
|
|
||||||
echo ' <input value="Subir" type="submit">';
|
|
||||||
echo '</td></tr></table>';
|
echo '</td></tr></table>';
|
||||||
|
echo '<input type="submit" value="'.$locale['802'].'" class="button">';
|
||||||
|
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
include_once("html/pie.php");
|
include_once("html/pie.php");
|
||||||
@ -8,13 +8,11 @@ include LOCALE.LOCALESET."lenguaje.php";
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<base target="_self" />
|
|
||||||
<title><?php echo $locale['Capacidades004'];?></title>
|
<title><?php echo $locale['Capacidades004'];?></title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||||
<link rel="shortcut icon" href="css/favicon.ico">
|
<link rel="shortcut icon" href="css/favicon.ico">
|
||||||
<link rel="stylesheet" type="text/css" href="css/style.css" />
|
<link rel="stylesheet" type="text/css" href="css/style.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="css/tablas.css" />
|
<link rel="stylesheet" type="text/css" href="css/tablas.css" />
|
||||||
<script src="functions.js" language="JavaScript" type="text/javascript"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@ -32,16 +30,11 @@ $mensaje="";
|
|||||||
$errores=array();
|
$errores=array();
|
||||||
$errores_capacidad="";
|
$errores_capacidad="";
|
||||||
|
|
||||||
//Puede venir de varias pantallas (Candidatos(ListaCandidatos/EditarCandidato/VerCandidato); Solicitudes(ListaSolicitudes/EditarSolicitud/VerSolicitud))
|
//Al ser añadir sabemos siempre que viene de la pantalla del candidato con el id del canidato pasado por get
|
||||||
//Se establece parametro entidad(candidato,solicitud);
|
|
||||||
$entidad = $_GET['entidad'];
|
|
||||||
$id_candidato = $_GET['id_candidato'];
|
$id_candidato = $_GET['id_candidato'];
|
||||||
$id_solicitud = $_GET['id_solicitud'];
|
|
||||||
|
|
||||||
//Cuando se da a guardar todo viene por POST
|
//Cuando se da a guardar todo viene por POST
|
||||||
if(stripinput($_POST['action'])=="add"){
|
if(stripinput($_POST['action'])=="add"){
|
||||||
$entidad = $_POST['entidad'];
|
|
||||||
$id_solicitud = $_POST['id_solicitud'];
|
|
||||||
$id_candidato = $_POST["id_candidato"];
|
$id_candidato = $_POST["id_candidato"];
|
||||||
$perfil_tecnico = $_POST["id_perfil_tecnico"];
|
$perfil_tecnico = $_POST["id_perfil_tecnico"];
|
||||||
$perfil_funcional = $_POST["id_perfil_funcional"];
|
$perfil_funcional = $_POST["id_perfil_funcional"];
|
||||||
@ -54,15 +47,12 @@ if(stripinput($_POST['action'])=="add"){
|
|||||||
$arrayInsert=array();
|
$arrayInsert=array();
|
||||||
$camposQuitar=array();
|
$camposQuitar=array();
|
||||||
$camposQuitar["action"]=stripinput($_POST['action']);
|
$camposQuitar["action"]=stripinput($_POST['action']);
|
||||||
$camposQuitar["entidad"]=stripinput($_POST['entidad']);
|
|
||||||
$camposQuitar["id_solicitud"]=stripinput($_POST['id_solicitud']);
|
|
||||||
$camposQuitar["id_candidato"]=stripinput($_POST['id_candidato']);
|
$camposQuitar["id_candidato"]=stripinput($_POST['id_candidato']);
|
||||||
$camposQuitar["id_perfil_tecnico"]=stripinput($_POST['id_perfil_tecnico']);
|
$camposQuitar["id_perfil_tecnico"]=stripinput($_POST['id_perfil_tecnico']);
|
||||||
$camposQuitar["id_perfil_funcional"]=stripinput($_POST['id_perfil_funcional']);
|
$camposQuitar["id_perfil_funcional"]=stripinput($_POST['id_perfil_funcional']);
|
||||||
$camposQuitar["tecnologias"]=$_POST['tecnologias'];
|
$camposQuitar["tecnologias"]=$_POST['tecnologias'];
|
||||||
$camposInsertar=array_diff_assoc($_POST,$camposQuitar);
|
$camposInsertar=array_diff_assoc($_POST,$camposQuitar);
|
||||||
$camposInsertar["id_usuario"]=$id_candidato;
|
$camposInsertar["id_usuario"]=$_POST['id_candidato'];
|
||||||
$camposInsertar["id_solicitud"]=$id_solicitud;
|
|
||||||
$camposInsertar["id_perfil_tecnico"]=$perfil_tecnico[0]; //Sabemos que siempre va a tener un unico elemento el array ya que no le dejamos seleccionar mas de uno
|
$camposInsertar["id_perfil_tecnico"]=$perfil_tecnico[0]; //Sabemos que siempre va a tener un unico elemento el array ya que no le dejamos seleccionar mas de uno
|
||||||
$camposInsertar["id_perfil_funcional"]=$perfil_funcional[0]; //Sabemos que siempre va a tener un unico elemento el array ya que no le dejamos seleccionar mas de uno
|
$camposInsertar["id_perfil_funcional"]=$perfil_funcional[0]; //Sabemos que siempre va a tener un unico elemento el array ya que no le dejamos seleccionar mas de uno
|
||||||
$vacio=array();
|
$vacio=array();
|
||||||
@ -78,9 +68,9 @@ if(stripinput($_POST['action'])=="add"){
|
|||||||
try{
|
try{
|
||||||
$errorInsert=false;
|
$errorInsert=false;
|
||||||
include_once("Objects/CapacidadProfesional.php");
|
include_once("Objects/CapacidadProfesional.php");
|
||||||
$CapacidadProfesional = new CapacidadProfesional(-1, $entidad);
|
$CapacidadProfesional = new CapacidadProfesional(-1,"candidato");
|
||||||
$idCapacidadNew = $CapacidadProfesional->addCapacidad($arrayInsert);
|
$idCapacidadNew= $CapacidadProfesional->addCapacidad($arrayInsert);
|
||||||
$CapacidadProfesional = new CapacidadProfesional($idCapacidadNew, $entidad);
|
$CapacidadProfesional = new CapacidadProfesional($idCapacidadNew,"candidato");
|
||||||
if($idCapacidadNew!="-1"){
|
if($idCapacidadNew!="-1"){
|
||||||
//Este proceso se hace para que se agregen bien las tecnologías ya que en la edicion se espera despues del id de la tecnologia -meses de la misma
|
//Este proceso se hace para que se agregen bien las tecnologías ya que en la edicion se espera despues del id de la tecnologia -meses de la misma
|
||||||
for ($i=0; $i < count($tecnologias); $i++)
|
for ($i=0; $i < count($tecnologias); $i++)
|
||||||
@ -107,11 +97,10 @@ if($mensaje!=""){
|
|||||||
echo "<div class=\"aviso ".$tipomsg."\">".$mensaje."</div>";
|
echo "<div class=\"aviso ".$tipomsg."\">".$mensaje."</div>";
|
||||||
}
|
}
|
||||||
echo $locale['286'];
|
echo $locale['286'];
|
||||||
|
|
||||||
echo "<form action=\"addCapacidadProfesional.php\" method=\"POST\" enctype=\"multipart/form-data\">";
|
echo "<form action=\"addCapacidadProfesional.php\" method=\"POST\" enctype=\"multipart/form-data\">";
|
||||||
echo "<input type=\"hidden\" name=\"action\" value=\"add\" />";
|
echo "<input type=\"hidden\" name=\"action\" value=\"add\" />";
|
||||||
echo "<input type=\"hidden\" name=\"entidad\" value=\"".$entidad."\" />";
|
|
||||||
echo "<input type=\"hidden\" name=\"id_candidato\" value=\"".$id_candidato."\" />";
|
echo "<input type=\"hidden\" name=\"id_candidato\" value=\"".$id_candidato."\" />";
|
||||||
echo "<input type=\"hidden\" name=\"id_solicitud\" value=\"".$id_solicitud."\" />";
|
|
||||||
|
|
||||||
echo '<div class="encabezado">'.$locale['Capacidades005'].'</div>';
|
echo '<div class="encabezado">'.$locale['Capacidades005'].'</div>';
|
||||||
echo '<table align="center" width="100%">';
|
echo '<table align="center" width="100%">';
|
||||||
@ -157,6 +146,7 @@ echo ' ';
|
|||||||
echo '<input type="button" value=" '.$locale['cerrar'].' " class="button" onclick="window.close()">';
|
echo '<input type="button" value=" '.$locale['cerrar'].' " class="button" onclick="window.close()">';
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
@ -79,7 +79,7 @@ if(stripinput($_POST['action'])=="add"){
|
|||||||
}
|
}
|
||||||
$empleadoNew->addProvinciasDeseadas($_POST['provincia_deseada']);
|
$empleadoNew->addProvinciasDeseadas($_POST['provincia_deseada']);
|
||||||
$empleadoNew->addPerfiles($_POST['perfil']);
|
$empleadoNew->addPerfiles($_POST['perfil']);
|
||||||
$empleadoNew->addCurriculum($_FILES['userfile'], $_POST['tipo_curriculum']);
|
$empleadoNew->addCurriculum($_FILES['userfile']);
|
||||||
header("Location: detalle_empleado.php?oid=".$idEmpleadoNew);
|
header("Location: detalle_empleado.php?oid=".$idEmpleadoNew);
|
||||||
} else {
|
} else {
|
||||||
$tipomsg="error";
|
$tipomsg="error";
|
||||||
@ -251,11 +251,10 @@ echo $html->listaSelect("titulaciones","oid","id","titulaciones",array("",$local
|
|||||||
</tr>';
|
</tr>';
|
||||||
echo '<tr><td colspan="6">';
|
echo '<tr><td colspan="6">';
|
||||||
menu_curriculums($_GET['oid'], "candidato");
|
menu_curriculums($_GET['oid'], "candidato");
|
||||||
echo '</td></tr><td colspan="6" textalign="right">';
|
echo '</td></tr><tr>';
|
||||||
echo '<input type="hidden" name="MAX_FILE_SIZE" value="10000000">'.$locale['125'].' ';
|
echo '<input type="hidden" name="MAX_FILE_SIZE" value="10000000">
|
||||||
echo '<input name="userfile" type="file"> '.$locale['00208']. ' ';
|
<td colspan="6" textalign="right">'.$locale['125'].'<br>';
|
||||||
rellena_desplegable_select_oidCol("tipo_curriculum","oid","tipo","tipo_curriculum","","0");
|
echo '<input name="userfile" type="file">';
|
||||||
echo ' <input value="Subir" type="submit">';
|
|
||||||
echo '</td></tr></table>';
|
echo '</td></tr></table>';
|
||||||
|
|
||||||
echo '</table>';
|
echo '</table>';
|
||||||
@ -4,18 +4,17 @@ include("seguridad.php");
|
|||||||
include("functions.php");
|
include("functions.php");
|
||||||
include_once("Objects/ListaOfertas.php");
|
include_once("Objects/ListaOfertas.php");
|
||||||
include_once("Objects/Oferta.php");
|
include_once("Objects/Oferta.php");
|
||||||
include_once("Objects/Pedido.php");
|
|
||||||
include_once("Objects/HTML.php");
|
include_once("Objects/HTML.php");
|
||||||
|
|
||||||
$html = new HTML($locale);
|
$html = new HTML($locale);
|
||||||
|
|
||||||
$errores = array();
|
$errores = array();
|
||||||
$usuario = $_SESSION["usuario"];
|
|
||||||
$solicitud=$_GET['solicitud'];
|
|
||||||
|
|
||||||
// Todas las variables
|
// Todas las variables
|
||||||
if (!empty($_POST)) {
|
if (!empty($_POST)) {
|
||||||
print_r($_POST);
|
print_r($_POST);
|
||||||
|
|
||||||
|
$solicitud = "";
|
||||||
if (!empty($_POST['solicitud'])) {
|
if (!empty($_POST['solicitud'])) {
|
||||||
$solicitud = $_POST['solicitud'][0];
|
$solicitud = $_POST['solicitud'][0];
|
||||||
}
|
}
|
||||||
@ -34,8 +33,6 @@ if (!empty($_POST)) {
|
|||||||
$idiomas=$_POST['idiomas'];
|
$idiomas=$_POST['idiomas'];
|
||||||
$provincias=$_POST['provincias']; */
|
$provincias=$_POST['provincias']; */
|
||||||
$observaciones = $_POST['observaciones'];
|
$observaciones = $_POST['observaciones'];
|
||||||
$salario_ofertado = $_POST['salario_ofertado'];
|
|
||||||
$gerente=$usuario->getValor("oid");
|
|
||||||
/* $pesoTec=$_POST['pesoTec'];
|
/* $pesoTec=$_POST['pesoTec'];
|
||||||
$pesoIdi=$_POST['pesoIdi'];
|
$pesoIdi=$_POST['pesoIdi'];
|
||||||
$pesoPer=$_POST['pesoPer'];
|
$pesoPer=$_POST['pesoPer'];
|
||||||
@ -44,11 +41,10 @@ if (!empty($_POST)) {
|
|||||||
if($usuario->tieneRol("1")){
|
if($usuario->tieneRol("1")){
|
||||||
$gerente=$_POST['gerente'];
|
$gerente=$_POST['gerente'];
|
||||||
} else {
|
} else {
|
||||||
|
$gerente=$usuario->getValor("oid");
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if ($_POST['action'] == "add") {
|
if ($_POST['action'] == "add") {
|
||||||
|
|
||||||
// Comprobamos campos obligatorios
|
// Comprobamos campos obligatorios
|
||||||
if (empty($solicitud)) {
|
if (empty($solicitud)) {
|
||||||
$errores[] = "1";
|
$errores[] = "1";
|
||||||
@ -60,19 +56,18 @@ if (!empty($_POST)) {
|
|||||||
$arrayInsert = array();
|
$arrayInsert = array();
|
||||||
$arrayInsert["pedido"] = $solicitud;
|
$arrayInsert["pedido"] = $solicitud;
|
||||||
$arrayInsert["obsGerente"] = $observaciones;
|
$arrayInsert["obsGerente"] = $observaciones;
|
||||||
$arrayInsert["estado"] = "100";
|
$arrayInsert["estado"] = "110";
|
||||||
$arrayInsert["gerente"]=$gerente;
|
|
||||||
$arrayInsert["salario_ofertado"] = $salario_ofertado;
|
|
||||||
|
|
||||||
/* $arrayInsert["prioridad"]= $prioridad;
|
/* $arrayInsert["prioridad"]= $prioridad;
|
||||||
$arrayInsert["empleados"]=$empleados;
|
$arrayInsert["empleados"]=$empleados;
|
||||||
$arrayInsert["duracion"]=$duracion;
|
$arrayInsert["duracion"]=$duracion;
|
||||||
|
$arrayInsert["gerente"]=$gerente;
|
||||||
$arrayInsert["cliente"]=$clientes;
|
$arrayInsert["cliente"]=$clientes;
|
||||||
$arrayInsert["salario_min"]=$salario_min;
|
$arrayInsert["salario_min"]=$salario_min;
|
||||||
$arrayInsert["salario_max"]=$salario_max;
|
$arrayInsert["salario_max"]=$salario_max;
|
||||||
$arrayInsert["procedencia"]=$procedencia;
|
$arrayInsert["procedencia"]=$procedencia;
|
||||||
|
|
||||||
$arrayInsert["estado"]="100";
|
$arrayInsert["estado"]="110";
|
||||||
$arrayInsert["pesoIdioma"]=$pesoIdi;
|
$arrayInsert["pesoIdioma"]=$pesoIdi;
|
||||||
$arrayInsert["pesoPerfil"]=$pesoPer;
|
$arrayInsert["pesoPerfil"]=$pesoPer;
|
||||||
$arrayInsert["pesoTecno"]=$pesoTec; */
|
$arrayInsert["pesoTecno"]=$pesoTec; */
|
||||||
@ -85,23 +80,14 @@ if (!empty($_POST)) {
|
|||||||
$msg = "No se ha podido agregar la oferta";
|
$msg = "No se ha podido agregar la oferta";
|
||||||
$tipo = "error";
|
$tipo = "error";
|
||||||
} else {
|
} else {
|
||||||
$pedido = new Pedido($solicitud,$usuario);
|
$oferta = $listaOfertas->buscarOferta($idOferta);
|
||||||
if ($pedido->setOfertaElaborada()) {
|
header("Location: oferta.php?idOferta=" . $idOferta . "&msg=1");
|
||||||
$oferta = $listaOfertas->buscarOferta($idOferta);
|
|
||||||
header("Location: oferta.php?idOferta=" . $idOferta . "&msg=1");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// Se he producido un fallo al cambiar de estado la solicitud
|
|
||||||
$errores[] = "0";
|
|
||||||
$msg = "Se he producido un fallo al cambiar de estado la solicitud";
|
|
||||||
$tipo = "error";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$referencia = "";
|
$referencia = "";
|
||||||
$gerente = $usuario->getValor("oid");
|
$solicitud = "";
|
||||||
$observaciones = "";
|
$observaciones = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,7 +110,8 @@ if (in_array("1", $errores))
|
|||||||
echo " class=\"errorcampo\"";
|
echo " class=\"errorcampo\"";
|
||||||
|
|
||||||
echo ">" . $locale['1025'] . ":<br/>";
|
echo ">" . $locale['1025'] . ":<br/>";
|
||||||
rellena_desplegable_pedidos_estado("solicitud", "130, 140", array($solicitud));
|
|
||||||
|
rellena_desplegable_pedidos_estado("solicitud", "130", array($solicitud));
|
||||||
|
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
|
|
||||||
@ -136,10 +123,6 @@ echo '<tr>' .
|
|||||||
'<td colspan="3" align="center">' . $locale['135'] .
|
'<td colspan="3" align="center">' . $locale['135'] .
|
||||||
'<br><textarea name="observaciones" rows="10" cols="120" style="overflow: auto; width:100%;">' . nl2br($observaciones) . '</textarea></td>' .
|
'<br><textarea name="observaciones" rows="10" cols="120" style="overflow: auto; width:100%;">' . nl2br($observaciones) . '</textarea></td>' .
|
||||||
'</tr>';
|
'</tr>';
|
||||||
|
|
||||||
echo '<tr><td>'.$locale['Ofertas010'].'<br><input type="text" name="salario_ofertado" value="'.$salario_ofertado.'" size="15" maxlength="20"></td>';
|
|
||||||
|
|
||||||
|
|
||||||
// Botones de guardar y restablecer
|
// Botones de guardar y restablecer
|
||||||
echo "<tr><td colspan=\"3\" align=\"center\">";
|
echo "<tr><td colspan=\"3\" align=\"center\">";
|
||||||
echo '<input type="submit" value="' . $locale['gu'] . '" onclick="return comprobar_registro(this)" class="button">';
|
echo '<input type="submit" value="' . $locale['gu'] . '" onclick="return comprobar_registro(this)" class="button">';
|
||||||
231
addPedido.php
Normal file
@ -0,0 +1,231 @@
|
|||||||
|
<?php
|
||||||
|
include("seguridad.php");
|
||||||
|
include("functions.php");
|
||||||
|
include_once("Objects/Pedido.php");
|
||||||
|
include_once("Objects/HTML.php");
|
||||||
|
|
||||||
|
$html=new HTML($locale);
|
||||||
|
// Comprobamos los permisos
|
||||||
|
// Sólo los gerentes y administradores puede añadir pedidos
|
||||||
|
if(!$usuario->tieneRol("3")&&!$usuario->tieneRol("1")){
|
||||||
|
header("Location: aplicacion.php?e=permiso");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
$errores = array();
|
||||||
|
|
||||||
|
// Todas las variables
|
||||||
|
if(!empty($_POST)) {
|
||||||
|
$nombre=$_POST['nombre'];
|
||||||
|
$prioridad=$_POST['prioridad'];
|
||||||
|
$empleados=$_POST['empleados'];
|
||||||
|
$duracion=$_POST['duracion'];
|
||||||
|
$clientes=$_POST['clientes'];
|
||||||
|
$perfiles=$_POST['perfil'];
|
||||||
|
$salario_min=$_POST['salario_min'];
|
||||||
|
$salario_max=$_POST['salario_max'];
|
||||||
|
$procedencia=$_POST['procedencia'];
|
||||||
|
$tecnologias=$_POST['tecnologia'];
|
||||||
|
$idiomas=$_POST['idiomas'];
|
||||||
|
$provincias=$_POST['provincias'];
|
||||||
|
$observaciones=$_POST['observaciones'];
|
||||||
|
$pesoTec=$_POST['pesoTec'];
|
||||||
|
$pesoIdi=$_POST['pesoIdi'];
|
||||||
|
$pesoPer=$_POST['pesoPer'];
|
||||||
|
|
||||||
|
|
||||||
|
if($usuario->tieneRol("1")){
|
||||||
|
$gerente=$_POST['gerente'];
|
||||||
|
} else {
|
||||||
|
$gerente=$usuario->getValor("oid");
|
||||||
|
}
|
||||||
|
|
||||||
|
if($_POST['action']=="add"){
|
||||||
|
// Comprobamos campos obligatorios
|
||||||
|
if($nombre==""){
|
||||||
|
$errores[]= "1";
|
||||||
|
}
|
||||||
|
if(($prioridad=="") ||($empleados=="") || ($duracion=="") || (!($empleados>0)) ||(!($duracion>0))){
|
||||||
|
$errores[]= "2";
|
||||||
|
}
|
||||||
|
if($gerente==""){
|
||||||
|
$errores[]= "3";
|
||||||
|
}
|
||||||
|
if($clientes==""){
|
||||||
|
$errores[]= "4";
|
||||||
|
}
|
||||||
|
if($perfiles==""){
|
||||||
|
$errores[]= "5";
|
||||||
|
}
|
||||||
|
if(($salario_min=="") ||($salario_max=="") || ($salario_min>$salario_max)){
|
||||||
|
$errores[]= "6";
|
||||||
|
}
|
||||||
|
if($procedencia==""){
|
||||||
|
$errores[]= "7";
|
||||||
|
}
|
||||||
|
|
||||||
|
//BORRAR
|
||||||
|
/* if(($pesoTec=="") ||($pesoIdi=="") || ($pesoPer=="")
|
||||||
|
|| !is_numeric($pesoTec) || !is_numeric($pesoIdi) || !is_numeric($pesoPer)
|
||||||
|
|| (!($pesoTec>=0)) ||(!($pesoIdi>=0)) || (!($pesoPer>=0))
|
||||||
|
|| ($pesoTec + $pesoIdi + $pesoPer != 100)){
|
||||||
|
$errores[]="8";
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Si no hay errores insertamos el pedido
|
||||||
|
if(count($errores)==0){
|
||||||
|
include_once("Objects/ListaPedido.php");
|
||||||
|
$listaPedidos=new ListaPedido($usuario,"","","0");
|
||||||
|
$arrayInsert=array();
|
||||||
|
$arrayInsert["nombre"]=$nombre;
|
||||||
|
$arrayInsert["prioridad"]= $prioridad;
|
||||||
|
$arrayInsert["empleados"]=$empleados;
|
||||||
|
$arrayInsert["duracion"]=$duracion;
|
||||||
|
$arrayInsert["gerente"]=$gerente;
|
||||||
|
$arrayInsert["cliente"]=$clientes;
|
||||||
|
$arrayInsert["salario_min"]=$salario_min;
|
||||||
|
$arrayInsert["salario_max"]=$salario_max;
|
||||||
|
$arrayInsert["procedencia"]=$procedencia;
|
||||||
|
$arrayInsert["observaciones"]=$observaciones;
|
||||||
|
$arrayInsert["estado"]="110";
|
||||||
|
$arrayInsert["pesoIdioma"]=$pesoIdi;
|
||||||
|
$arrayInsert["pesoPerfil"]=$pesoPer;
|
||||||
|
$arrayInsert["pesoTecno"]=$pesoTec;
|
||||||
|
$idPedido=$listaPedidos->addPedido($arrayInsert);
|
||||||
|
if($idPedido=="-1"){
|
||||||
|
// Se he producido un fallo al insertar
|
||||||
|
$errores[]= "0";
|
||||||
|
$msg="No se ha podido agregar la solicitud de oferta";
|
||||||
|
$tipo="error";
|
||||||
|
} else {
|
||||||
|
$pedido=$listaPedidos->buscarPedido($idPedido);
|
||||||
|
$pedido->addPerfiles($perfiles);
|
||||||
|
$pedido->addTecnologias($tecnologias);
|
||||||
|
$pedido->addIdiomas($idiomas);
|
||||||
|
$pedido->addProvincias($provincias);
|
||||||
|
header("Location: pedido.php?idPedido=".$idPedido."&msg=1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$nombre="";
|
||||||
|
$prioridad="";
|
||||||
|
$empleados="";
|
||||||
|
$duracion="";
|
||||||
|
$clientes="";
|
||||||
|
$perfiles=array();
|
||||||
|
$salario_min="";
|
||||||
|
$salario_max="";
|
||||||
|
$procedencia="";
|
||||||
|
$tecnologias=array();
|
||||||
|
$idiomas=array();
|
||||||
|
$provincias=array();
|
||||||
|
$observaciones="";
|
||||||
|
$pesoTec="";
|
||||||
|
$pesoIdi="";
|
||||||
|
$pesoPer="";
|
||||||
|
}
|
||||||
|
|
||||||
|
include("html/cabecera.php");
|
||||||
|
|
||||||
|
if ((isset($pesoTec)) && ($pesoTec=="")) $pesoTec="40";
|
||||||
|
if ((isset($pesoIdi)) && ($pesoIdi=="")) $pesoIdi="10";
|
||||||
|
if ((isset($pesoPer)) && ($pesoPer=="")) $pesoPer="50";
|
||||||
|
|
||||||
|
echo $html->menuPedidos($usuario,"");
|
||||||
|
|
||||||
|
|
||||||
|
echo "<h2>".$locale['1058']."</h2>";
|
||||||
|
|
||||||
|
if (isset($msg) && ($msg != "")) {
|
||||||
|
echo "<div class=\"aviso ".$tipo."\">".$msg."</div>";
|
||||||
|
}
|
||||||
|
echo '<form method="POST" action="addPedido.php" name="form_registro" enctype="multipart/form-data">';
|
||||||
|
echo "<input type=\"hidden\" name=\"action\" value=\"add\" />";
|
||||||
|
echo "<table id=\"addPedido\">" .
|
||||||
|
"<tr>" .
|
||||||
|
" <td";
|
||||||
|
if(in_array("1",$errores)) echo " class=\"errorcampo\"";
|
||||||
|
echo ">".$locale['1043']." <input type=\"text\" name=\"nombre\" value=\"".$nombre."\" size=\"30\" maxlength=\"255\" ></td>"."<td";
|
||||||
|
if(in_array("2",$errores)) echo " class=\"errorcampo\"";
|
||||||
|
echo ">" .$locale['1022'].":";
|
||||||
|
rellena_prioridad_select("prioridad",$prioridad);
|
||||||
|
echo " - ".$locale['1024'].": <input type=\"text\" name=\"empleados\" value=\"".$empleados."\" maxlenght=\"3\" size=\"2\" />" .
|
||||||
|
"<br />".$locale['1026'].": <input type=\"text\" name=\"duracion\" value=\"".$duracion."\" maxlenght=\"3\" size=\"2\" />" .
|
||||||
|
"</td>";
|
||||||
|
echo "<td";
|
||||||
|
if(in_array("3",$errores)) echo " class=\"errorcampo\"";
|
||||||
|
echo ">".$locale['1027'];
|
||||||
|
// Si es Admin puede asignar un gerente, si no, sólo a él
|
||||||
|
if($usuario->tieneRol("1")){
|
||||||
|
$auxiliar = "";
|
||||||
|
rellena_personal_permiso("gerente","GP",$auxiliar,$usuario->getValor("oid"));
|
||||||
|
} else {
|
||||||
|
echo "<input type=\"text\" readonly value=\"".$usuario->getValor("nombre")." ".$usuario->getValor("apellidos")."\" />";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "</td></tr>" .
|
||||||
|
" <tr><td";
|
||||||
|
if(in_array("4",$errores)) echo " class=\"errorcampo\"";
|
||||||
|
echo ">".$locale['1504'];
|
||||||
|
$auxiliar = '<option selected value="">'.$locale['ns'].'</option>';
|
||||||
|
rellena_desplegable_select_oid("clientes","clientes",$auxiliar,$clientes);
|
||||||
|
echo "</td><td";
|
||||||
|
if(in_array("5",$errores)) echo " class=\"errorcampo\"";
|
||||||
|
echo ">".$locale['121']."<br/>";
|
||||||
|
// Ticket #565 -> En una solicitud de oferta, se deben poder indicar varios perfiles técnicos
|
||||||
|
echo $html->listaSelect("perfil","oid","id","perfil",array("",$locale['ns']),$perfiles,true,true,"15");
|
||||||
|
echo "</td><td>".$locale['132'].": ".$locale['2100'];
|
||||||
|
|
||||||
|
echo "</td></tr>";
|
||||||
|
|
||||||
|
echo "<tr><td colspan=\"2\"";
|
||||||
|
if(in_array("6",$errores)) echo " class=\"errorcampo\"";
|
||||||
|
echo ">";
|
||||||
|
echo $locale['129'];
|
||||||
|
rellena_desplegable_select_oidCol("salario","id","nombre","salario_min",$auxiliar,$salario_min);
|
||||||
|
echo ' - '.$locale['130'].'';
|
||||||
|
rellena_desplegable_select_oidCol("salario","id","nombre","salario_max",$auxiliar,$salario_max);
|
||||||
|
|
||||||
|
echo "</td><td";
|
||||||
|
if(in_array("7",$errores)) echo " class=\"errorcampo\"";
|
||||||
|
echo ">".$locale['1800'];
|
||||||
|
rellena_procedencias("procedencia",$auxiliar,$procedencia);
|
||||||
|
echo "</td></tr>";
|
||||||
|
echo "<tr><td colspan=\"3\">" .
|
||||||
|
"<table><tr><td>".$locale['122']."</td><td>";
|
||||||
|
|
||||||
|
echo $html->listaSelect("tecnologia","oid","id","tecnologia",array("",$locale['ns']),$tecnologias,true,true,"15");
|
||||||
|
|
||||||
|
|
||||||
|
echo "</td><td>".$locale['123']."</td><td>";
|
||||||
|
echo $html->listaSelect("idiomas","oid","id","idiomas",array("",$locale['ns']),$idiomas,true,true,"15");
|
||||||
|
|
||||||
|
echo "</td><td>".$locale['209']."</td><td>";
|
||||||
|
echo $html->listaSelect("provincias","oid","id","provincias",array("",$locale['ns']),$provincias,true,true,"15");
|
||||||
|
|
||||||
|
echo "</td>";
|
||||||
|
?>
|
||||||
|
<!--td <?php if(in_array("8",$errores)) echo " class=\"errorcampo\""; ?> width="200px">
|
||||||
|
<?php echo $locale['1078']; ?>: <input name="pesoTec" type="text" size="5" align="right" value="<?php echo $pesoTec; ?>" <?php if((!is_numeric($pesoTec))&& ($pesoTec!="")) echo " class=\"errorcampo\""; ?>> %<br />
|
||||||
|
<?php echo $locale['1079']; ?>: <input name="pesoIdi" type="text" size="5" value="<?php echo $pesoIdi; ?>" <?php if((!is_numeric($pesoIdi)) && ($pesoIdi!="")) echo " class=\"errorcampo\""; ?>> %<br />
|
||||||
|
<?php echo $locale['1080']; ?>: <input name="pesoPer" type="text" size="5" value="<?php echo $pesoPer; ?>" <?php if((!is_numeric($pesoPer))&& ($pesoPer!="")) echo " class=\"errorcampo\""; ?>> %<br />
|
||||||
|
<?php echo $locale['1081']; ?>
|
||||||
|
</td-->
|
||||||
|
<?php
|
||||||
|
|
||||||
|
echo "</tr></table></td></tr>";
|
||||||
|
echo '<tr>' .
|
||||||
|
'<td colspan="3" align="center">'.$locale['135'].
|
||||||
|
'<br><textarea name="observaciones" rows="30" cols="120" style="overflow: auto; width:100%;">'.nl2br($observaciones).'</textarea></td>'.
|
||||||
|
'</tr>';
|
||||||
|
|
||||||
|
// Botones de guardar y restablecer
|
||||||
|
echo "<tr><td colspan=\"3\" align=\"center\">";
|
||||||
|
echo '<input type="submit" value="'.$locale['gu'].'" onclick="return comprobar_registro(this)" class="button">';
|
||||||
|
echo '<input type="reset" value="'.$locale['res'].'" class="button"></td>';
|
||||||
|
echo "</tr></table>";
|
||||||
|
echo "</form>";
|
||||||
|
include_once("html/pie.php");
|
||||||
|
|
||||||
|
?>
|
||||||
@ -9,12 +9,7 @@ include_once("html/cabecera.php");
|
|||||||
|
|
||||||
echo "<h2>".$locale['002']."</h2>";
|
echo "<h2>".$locale['002']."</h2>";
|
||||||
|
|
||||||
if(!$usuario->tieneRol("7")) {
|
include("tablero.php");
|
||||||
include("tablero.php");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
header("Location: lista_pedidos.php");
|
|
||||||
}
|
|
||||||
|
|
||||||
if($_SESSION["oid"]){
|
if($_SESSION["oid"]){
|
||||||
include_once("alarmas.php");
|
include_once("alarmas.php");
|
||||||
@ -2,10 +2,9 @@
|
|||||||
|
|
||||||
include("seguridad.php");
|
include("seguridad.php");
|
||||||
include("functions.php");
|
include("functions.php");
|
||||||
include_once("Objects/Candidato.php");
|
|
||||||
|
|
||||||
$oid = stripinput($_GET["oid"]);
|
$oid = stripinput($_GET["oid"]);
|
||||||
$curriculum = $_GET["curriculum"];
|
$curriculum = stripinput($_GET["curriculum"]);
|
||||||
$fecha = stripinput($_GET["fecha"]);
|
$fecha = stripinput($_GET["fecha"]);
|
||||||
$tipo = stripinput($_GET["tipo"]);
|
$tipo = stripinput($_GET["tipo"]);
|
||||||
|
|
||||||
38
buscar_candidato.php
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
include("seguridad.php");
|
||||||
|
include("functions.php");
|
||||||
|
|
||||||
|
// Sólo los administradores y rrhh pueden buscar
|
||||||
|
if(!$usuario->tieneRol("1")
|
||||||
|
&& !$usuario->tieneRol("4")){
|
||||||
|
header("Location: aplicacion.php?e=permiso");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
include_once("html/cabecera.php");
|
||||||
|
|
||||||
|
/* BUSCAR.PHP */
|
||||||
|
include_once("Objects/HTML.php");
|
||||||
|
$html=new HTML($locale);
|
||||||
|
echo $html->menuCandidatos();
|
||||||
|
|
||||||
|
$tipobusqueda="candidato";
|
||||||
|
?>
|
||||||
|
<h2><?php echo $locale['820']; ?></h2>
|
||||||
|
|
||||||
|
<div id="ContTabul">
|
||||||
|
<form action="busqueda_candidato_multiple.php" method="POST" name="form_busqueda_multiple">
|
||||||
|
<?php include_once("formulario_buscar_persona.php"); ?>
|
||||||
|
<table align="center" width="100%" cellspacing="2" cellpadding="2" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="sinborde" align="center">
|
||||||
|
<input type="submit" name="enviar" value="Buscar" class="button" onclick="return comprobar_busqueda_multiple(this)">
|
||||||
|
<input type="reset" name="borrar" value="Borrar" class="button" >
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</form>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
include_once("html/pie.php");
|
||||||
|
?>
|
||||||
@ -9,7 +9,7 @@ if(!$_SESSION["oid"]){
|
|||||||
|
|
||||||
$consulta = "SELECT U.oid as idCandidato,CP.oid as idOferta, CP.referencia,
|
$consulta = "SELECT U.oid as idCandidato,CP.oid as idOferta, CP.referencia,
|
||||||
P.oid as idPedido, U.nombre,U.apellidos,P.nombre AS pedido, CE.nombre AS estado,
|
P.oid as idPedido, U.nombre,U.apellidos,P.nombre AS pedido, CE.nombre AS estado,
|
||||||
CP.obsRRHH,CP.obsGerente, CP.salario_ofertado
|
CP.obsRRHH,CP.obsGerente
|
||||||
FROM usuarios U,pedidos P,candidato_pedido CP,candidaturas_estados CE
|
FROM usuarios U,pedidos P,candidato_pedido CP,candidaturas_estados CE
|
||||||
WHERE U.oid='".$persona->getValor("oid")."'
|
WHERE U.oid='".$persona->getValor("oid")."'
|
||||||
AND CP.candidato=U.oid
|
AND CP.candidato=U.oid
|
||||||
@ -35,13 +35,11 @@ if ($resultado = consultar($consulta)){
|
|||||||
$oidOferta = $row["idOferta"];
|
$oidOferta = $row["idOferta"];
|
||||||
$obsRRHH = $row["obsRRHH"];
|
$obsRRHH = $row["obsRRHH"];
|
||||||
$obsGerente = $row["obsGerente"];
|
$obsGerente = $row["obsGerente"];
|
||||||
$salario_ofertado = $row["salario_ofertado"];
|
|
||||||
$idCandidato = $row["idCandidato"];
|
$idCandidato = $row["idCandidato"];
|
||||||
echo "<li>";
|
echo "<li>";
|
||||||
echo "Oferta <a href=\"oferta.php?idOferta=".$oidOferta."\" target=\"_blank\" />$referenciaOferta</a> ";
|
echo "Oferta <a href=\"oferta.php?idOferta=".$oidOferta."\" target=\"_blank\" />$referenciaOferta</a> ";
|
||||||
echo "($estado) ";
|
echo "($estado) ";
|
||||||
echo "- Solicitud \"<a href=\"pedido.php?idPedido=".$oid."\" target=\"_blank\" />$pedido</a>";
|
echo "- Solicitud \"<a href=\"pedido.php?idPedido=".$oid."\" target=\"_blank\" />$pedido</a>\"</li>";
|
||||||
echo " - Salario ofertado: ". $salario_ofertado. "</li>";
|
|
||||||
|
|
||||||
// desactivar el comentario por ahora
|
// desactivar el comentario por ahora
|
||||||
if (false) { //if($usuario->tieneRol("4")){
|
if (false) { //if($usuario->tieneRol("4")){
|
||||||
|
Before Width: | Height: | Size: 71 B After Width: | Height: | Size: 71 B |
|
Before Width: | Height: | Size: 71 B After Width: | Height: | Size: 71 B |
|
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 781 B |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 367 B After Width: | Height: | Size: 367 B |
|
Before Width: | Height: | Size: 368 B After Width: | Height: | Size: 368 B |
|
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 213 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |