function existe($rm, $rv, $ma, $vi) { if (!pesquisa($ma, $rm) && !pesquisa($vi, $rm) && !pesquisa($ma, $rv) && !pesquisa($vi, $rv)) { // echo("<tr><td> false</td></tr>"); return false; } else { // echo("<tr><td> true</td></tr>"); return true; } }
function abrirArquivotxt($arquivo, $opcoes) { if (isset($arquivo) && !empty($arquivo)) { $ponteiro = fopen($arquivo, "r"); while (!feof($ponteiro)) { $cpf = str_replace('-', '', str_replace('.', '', !is_null(fgets($ponteiro, 4096)) ? str_replace("\n", '', str_replace("\r", '', fgets($ponteiro, 4096))) : NULL)); pesquisa(isset($cpf) && !empty($cpf) ? $cpf : NULL, $opcoes); } fclose($ponteiro); } else { banner(" ALGO DE ERRO NA OPÇÃO ARQUIVO "); } }
<div class="container"> <?php echo "<h1>Pesquisa</h1>"; echo "<p>Resultado sobre: <strong>" . $_POST["chave"] . "</strong></p>"; $resultados = pesquisa($_POST["chave"]); ?> <table class="table table-striped table-hover "> <thead> <tr> <th>#</th> <th>Link</th> <th>Local</th> </tr> </thead> <tbody> <?php $contador = 0; foreach ($resultados as $item) { echo "<tr>"; $contador += 1; echo "<td>" . $contador . "</td>"; echo "<td><a href=http://" . $_SERVER['HTTP_HOST'] . "/" . $item['pagina'] . ">" . $item['pagina'] . "</td>"; echo "<td>" . $item['conteudo'] . "</td>"; echo "</tr>"; } ?> </tbody> </table> </div>