#707 Indicar de algún modo al usuario la búsqueda que ha introducido

git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_Intranet/trunk@107 e2b1556b-49f8-d141-9351-52d6861a72d9
This commit is contained in:
roberto 2011-08-16 11:26:48 +00:00
parent ad52331af2
commit 01e78511c4

View File

@ -17,13 +17,13 @@ $errores = "";
include_once("Objects/ListaCandidatos.php");
$listaCandidatos=new ListaCandidatos($usuario,"","","10");
//CAMPOS EN LOS QUE BUSCAR LA PALABRA
$resultado=$listaCandidatos->getCamposBusqueda();
$camposPermitidos = array("nombre", "apellidos", "observaciones");
////////////////////////////
// Proceso del Formulario
///////////////////////////
if(isset($_POST['buscar'])) {
$palabra=$_POST['palabra'];
$campos=$_POST['campo'];
@ -97,7 +97,7 @@ if(isset($_POST['buscar'])) {
if ($whereTecnologias != "")
$query = $query . " and (". $whereTecnologias .")";
//echo $query;
// echo $query;
$listaCandidatos=new ListaCandidatos($usuario,"",$query,"");
}
}
@ -117,21 +117,32 @@ if($errores!=""){
<table align="center" width="100%" border="0">
<tr>
<td width="10%">
<?php echo $locale['01901']; ?> <br><input type="text" name="palabra">
</td>
<td width="90%">
<?php echo $locale['01902']; ?> <br><select multiple name="campo[]" id="campo" size="10">
<?php echo $locale['01901'] .'<br><input type="text" name="palabra" value="'. $_POST['palabra'] .'"></td>';
echo '<td width="90%"';
if ($errores != "") echo " class=\"errorcampo\"";
echo '>'. $locale['01902'];
?>
<br><select multiple name="campo[]" id="campo" size="10">
<?php
while($row = mysql_fetch_row($resultado)) {
?>
<option value="<?php echo $row[0]; ?>"><?php echo $row[0]; ?></option>
<?php
if (in_array($row[0], $camposPermitidos)){
if (in_array($row[0], $_POST['campo']))
echo '<option selected ';
else
echo '<option ';
echo 'value="'. $row[0] .'">'. $row[0] .'</option>';
}
}
?>
</select>
</td>
</tr></table>
<input type="submit" value="Buscar" name="buscar">
<br>
<div class="encabezado"><?php echo $locale['Capacidades004']; ?></div>
<table align="center" width="100%" border="0">
<tr>
@ -155,13 +166,10 @@ echo $html->listaSelect("perfil_funcional","oid","id","id_perfil_funcional",arra
</td>
</tr>
</table>
<br>
<input type="submit" value="Buscar" name="buscar">
</form>
<?php
if(count($listaCandidatos)==0)
include_once("ver_lista_candidatos.php");
include_once("ver_lista_candidatos.php");
include_once("html/pie.php");
?>