HEX
Server: Apache
System: Linux clpupre 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64
User: undanet (1000)
PHP: 7.4.3
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/undanet/www//PortalEmpleo/src/Views/CandidatoBuscadorView.php
<html> 

<head> 
<title>Listado de Candidatos</title>

</head>

<body>

<?php
    if(isset($data))
    {
        $_SERVER['HTTPS'] = $_SERVER['HTTPS'] == 'off' ? '' : $_SERVER['HTTPS'];
        $root = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/';
        $rootwp = "";

         $root = get_site_url() . '/';

         $lang = pll_current_language();

            echo '<label id="lblfiltrar" class="link" onclick ="toggle();">' . __('+ Filter', 'panoramic_child') . '</label>';

      
		

        echo '<section id="no-more-tables"><div id="divFiltar" hidden="true">';        

			echo '<input id="txtBuscar" type="text" placeholder="' . __('Type something to filter', 'panoramic_child') . '" />';

       
               
        echo '</div></section>';
        echo '<table border="0" class="azul" id="tbResultados"><thead>';
				
            echo '<tr><th>' . __('Last Name', 'panoramic_child') . '</th><th>' . __('Last Name 2', 'panoramic_child') . '</th><th>' . __('First Name', 'panoramic_child') . '</th><th>Email</th><th>' . __('Document', 'panoramic_child') . '</th><th>' . __('Job', 'panoramic_child') . '</th></tr>';
				
        
        echo '</thead><tbody>';

       /*if($lang == 'en')
        {*/
            foreach ($data as $candidato) 
            {
				/*$pathurl =  ($lang == 'en') ? 'en/candidate-tab/?id=' : 'es/ficha-candidato/?id=';*/
				
				$pathurl =   __('en/candidate-tab/?id=', 'panoramic_child');
                
			
                echo '<tr class="cebra link" onclick="window.location=\'' . $root . $pathurl . $candidato[0]->getIdcandidato() . '\';">';
                echo '<td>' . $candidato[0]->getApellido1() . '</td>';
                echo '<td>' . $candidato[0]->getApellido2() . '</td>';
                echo '<td>' . $candidato[0]->getNombre() . '</td>';
                echo '<td>' . ($candidato[0]->getCodigousuariowp())->getUserEmail() . '</td>';
                echo '<td>' . $candidato[0]->getDocumento() . '</td>'; 
               if($candidato[1])
                {
                    echo '<td>' . ($candidato[1]->getCodigoperfil())->getPerfil() . '</td>';
                }
                else
                {
                    echo '<td></td>';
                }
				
				
				
                echo '</tr>';
            }
        
        
        echo '</tbody></table>';
    }
?>


<script language="javascript">
    function toggle() {
        var lbl = document.getElementById('lblfiltrar');
        var divFiltrar = document.getElementById('divFiltar');

        if(divFiltrar.hidden)
        {
            divFiltrar.hidden = false;
            lbl.innerHTML = "- Filter";
        }
        else
        {
            divFiltrar.hidden = true;
            lbl.innerHTML = "+ Filter";
        }
    }

    function cambiar() {
        var lbl = document.getElementById('lblfiltrar');
        var divFiltrar = document.getElementById('divFiltar');

        if(divFiltrar.hidden)
        {
            divFiltrar.hidden = false;
            lbl.innerHTML = "- Filtrar";
        }
        else
        {
            divFiltrar.hidden = true;
            lbl.innerHTML = "+ Filtrar";
        }
    }

    var busqueda = document.getElementById('txtBuscar');

    buscaTabla = function(){
      var table = document.getElementById("tbResultados").tBodies[0];
      texto = busqueda.value.toLowerCase();
      var r=0;
      while(row = table.rows[r++])
      {
        if ( row.innerText.toLowerCase().indexOf(texto) !== -1 )
          row.style.display = null;
        else
          row.style.display = 'none';
      }
    }

    busqueda.addEventListener('keyup', buscaTabla);

</script>
</body>

</html>