-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPesquisaFuncionarioemail.php
74 lines (70 loc) · 2.86 KB
/
PesquisaFuncionarioemail.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
include "Confere_3.php";
include "cabecalho2.php";
include "conexao.php";
?>
<div style="background-color: #343a40; width:100%; height: 100%;">
<title>Pesquisar Funcionario por Email</title>
<h2 style="color:white; text-align:center;">Pesquisar Funcionario por Email</h2>
<table class="table table-hover table-dark" border="1">
<tr>
<th style="color:white; text-align:center;">Nome do funcionario</th>
<th style="color:white; text-align:center;">CPF</th>
<th style="color:white; text-align:center;">CTPS</th>
<th style="color:white; text-align:center;">Telefone</th>
<th style="color:white; text-align:center;">Email</th>
<th style="color:white; text-align:center;">ID</th>
</tr>
<?php
$ctps = $_REQUEST["txtfuncionarioctps"]; // RETOMA A VARIAVEL DE CONSULTA
$sql = "SELECT * FROM funcionarios where ctps like '%$ctps%'"; // SELECIONA OS FUNCIONARIOS
// --> CRIAR JOIN COM ENDERECO <--
//DE ACORDO COM O METODO UTILIZADO
if ($result = $mysqli->query($sql)) {
while ($row = $result->fetch_assoc()) {
echo '<tr>';
echo '<td>' . $row["nome"] . '</td>';
echo '<td>' . $row["cpf"] . '</td>';
echo '<td>' . $row["ctps"] . '</td>';
echo '<td>' . $row["telefone"] . '</td>';
echo '<td>' . $row["email"] . '</td>';
echo '<td>' . $row["id_funcionario"] . '</td>';
echo '</tr>';
}
}
include "desconecta.php";
?>
</table>
<form method="post" action="PesquisaFuncionarioCpf.php">
<!-- ENVIA NOVAMENTE PARA A PESQUISA -->
<table class="table table-hover table-dark" border="1">
<tr>
<td style="text-align:right">Nova busca:</td>
<td><input type="text" name="txtcliente" size="40" /></td>
</tr>
<tr>
<td style="text-align:right"> </td>
<td><input type="submit" value="PESQUISAR" /></td>
</tr>
</form>
<form method="post" action="ApagaCompleto.php">
<!-- ENVIA PARA A EXCLUSÃO -->
<input type="hidden" id="tabcliempfun" name="tabcliempfun" value="funcionarios" />
<!-- INDICA DE QUAL TABELA IRA APAGAR-->
<input type="hidden" id="idcliempfun" name="idcliempfun" value="cod_fun" />
<!-- INDICA DE QUAL ATRIBUTO IRA APAGAR-->
<input type="hidden" id="cncpcnt" name="cncpcnt" value="cpf" />
<!-- INDICA DE QUAL ATRIBUTO DE COMPARAÇÃO IRA APAGAR-->
<tr>
<td style="text-align:right">ID do cliente:</td>
<td><input type="text" name="id" size="5" /></td>
</tr>
<tr>
<td style="text-align:right"> </td>
<td><input type="submit" value="APAGAR" /></td>
</tr>
</table>
</form>
<?php
include "rodape.php";
?>