git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_Intranet/trunk/src@1 e2b1556b-49f8-d141-9351-52d6861a72d9
66 lines
1.6 KiB
PHP
66 lines
1.6 KiB
PHP
<?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");
|
|
|
|
/* BUSQUEDA.PHP */
|
|
include_once("Objects/HTML.php");
|
|
$html = new HTML($locale);
|
|
|
|
echo $html->menuCandidatos();
|
|
|
|
?>
|
|
<h2><?php echo $locale['820']; ?></h2>
|
|
<?php
|
|
|
|
$where = "";
|
|
$tabla = "";
|
|
|
|
include_once("Objects/ListaCandidatos.php");
|
|
|
|
// Agregamos el estado de los pedidos que queremos mostrar
|
|
if(($_GET['byEstado']!="") && ($_GET['byEstado']!="0")){
|
|
$tipoPedidos=$_GET['byEstado'];
|
|
$whereTipo=" and estado=".$tipoPedidos;
|
|
} else {
|
|
$tipoPedidos="0";
|
|
$whereTipo="";
|
|
}
|
|
|
|
// Variables por si es una ordenacion
|
|
$order_by="";
|
|
if($_GET["order"]!=""){
|
|
$order_by = " ORDER by ".stripinput($_GET["order"])." ".$_GET["modo"];
|
|
}
|
|
if($_GET['reutilizar']=="si"){
|
|
$listaCandidatos = unserialize($_SESSION["ultimaBusquedaCandidatos"]);
|
|
// creamos el nuevo objeto con el orden
|
|
$sql=$listaCandidatos->getSQL();
|
|
$listaCandidatos=new ListaCandidatos($usuario,$order_by,$sql,$tipoPedidos);
|
|
}else{
|
|
// Recuperamos todos los valores
|
|
include_once("campos_persona.php");
|
|
// Construimos la sql
|
|
$condicion = "usuarios.tipo = 'candidato',";
|
|
include_once("busqueda_personas_multiple.php");
|
|
$listaCandidatos=new ListaCandidatos($usuario,$order_by,$consulta,$tipoPedidos);
|
|
}
|
|
$s = serialize($listaCandidatos);
|
|
$_SESSION["ultimaBusquedaCandidatos"]=$s;
|
|
$variablesExtra="reutilizar=si";
|
|
|
|
|
|
include_once("ver_lista_candidatos.php");
|
|
|
|
include_once("html/pie.php");
|
|
|
|
?>
|