-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlistar_atleta.php
executable file
·85 lines (78 loc) · 3.39 KB
/
listar_atleta.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
75
76
77
78
79
80
81
82
83
84
85
<?php
require_once "config.php";
require_once "menu.php";
?>
<!DOCTYPE html>
<html lang="en">
<body>
<head>
<style>
body {
background-image: url("stdp_atletas.jpg"), url("stdp_resultados02.jpg");
background-repeat: no-repeat, repeat;
background-size:100% auto;
}
</style>
</head>
<div class="container">
<div class="row">
<br>
<br>
<h3 align="center">ATLETAS CADASTRADOS</h3>
</div>
<div class="row">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>CPF/RG</th>
<th>Nome</th>
<th>Nasc</th>
<th>Sexo</th>
<th>UF</th>
<th>Action</th>
<th>2020</th>
<th>CBSUP</th>
</tr>
</thead>
<tbody>
<?php
$count=1;
$sql = mysqli_query($con, "SELECT a.*, f.ano as ano from atleta a
left join filiacao f on f.atleta_cpf = a.cpf and f.ano = 2020
ORDER by nome");
while ($row = mysqli_fetch_assoc($sql)){
echo '<tr>';
echo '<td>'. $count . '</td>';
echo '<td>'. $row['cpf'] . '</td>';
echo '<td>'. ucwords(strtolower($row['nome'])) . '</td>';
echo '<td>'. $row['data_nascimento'] . '</td>';
# $interval = $date->diff( new DateTime( '2015-12-31' ) ); // data definida
# echo '<td>'. $interval->format( '%Y Anos' ). '</td>';
echo '<td>'. $row['sexo'] . '</td>';
echo '<td>'. $row['estado'] . '</td>';
echo '<td width=300>';
echo '<a class="btn btn-success" href="update.php?id='.$row['cpf'].'">Update</a>';
echo ' ';
echo '<a class="btn btn-danger" href="delete.php?id='.$row['cpf'].'">Delete</a>';
echo ' ';
echo '<a class="btn btn-info" href="inscricao.php?id='.$row['cpf'].'">SUP</a>';
echo ' ';
echo '<a class="btn btn-info" href="filiacao.php?id='.$row['cpf'].'">FILIAR</a>';
echo '</td>';
if ($row['ano'] <> null ) {
echo '<td>'. "ok" . '</td>';
} else {
echo '<td>'. "-" . '</td>';
}
echo '<td>'. $row['cod_cbsup'] . '</td>';
echo '</tr>';
$count++;
}
?>
</tbody>
</table>
</div>
</div> <!-- /container -->
</body>
</html>