-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconsultCondominios.php
106 lines (96 loc) · 4.63 KB
/
consultCondominios.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php include('session.php');
//$id_de_cons = $_SESSION["id_consulta"];
$idcookie = $_COOKIE["idcondo"];
?>
<section class="wrapper">
<h3><i class="fa fa-angle-right"></i> Consultar</h3>
<div class="row mt">
<div class="col-md-12">
<div class="content-panel">
<h4><i class="fa fa-angle-right"></i> Condomínio</h4>
<hr>
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>Responsável</th>
<th>Morada</th>
<th>Código Postal</th>
<th>Modalidade</th>
<th>Número de Andares</th>
<th>Total de Despesas</th>
<th>Dia de Pagamento</th>
<th>Juros Mora (%)</th>
<th>Estado</th>
</tr>
</thead>
<tbody>
<?php
$query = "SELECT * FROM condominios where id_condo=" . $idcookie;
$results = mysqli_query($connection, $query);
while($row = mysqli_fetch_assoc($results)) {
$ref = $row['id_condo'];
?>
<tr>
<td><?php echo $row['id_condo'];?></td>
<td><?php echo $row['id_condo_resp']?></td>
<td><?php echo $row['condo_morada']?></td>
<td><?php echo $row['condo_cod_postal']?></td>
<td><?php echo $row['condo_modalidade']?></td>
<td><?php echo $row['condo_andares']?></td>
<td><?php echo $row['condo_despesas']?></td>
<td><?php echo $row['condo_prazo_limite']?></td>
<td><?php echo $row['juros_mora']?></td>
<td><?php echo $row['estado']?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
<div class="row mt">
<div class="col-md-12">
<div class="content-panel">
<h4><i class="fa fa-angle-right"></i> Fração</h4>
<hr>
<table class="table">
<thead>
<tr>
<th>Condomínio</th>
<th>Andar</th>
<th>Nº de porta</th>
<th>Proprietário</th>
<th>Resposável pelo pagamento</th>
<th>NIF do responsável</th>
<th>Área</th>
<th>Despesas</th>
</tr>
</thead>
<tbody>
<?php
$query = "SELECT * FROM fracoes where id_proprietario=" . $idcookie;
$results = mysqli_query($connection, $query);
while($row = mysqli_fetch_assoc($results)) {
?>
<tr>
<td><?php echo $row['id_condo']?></td>
<td><?php echo $row['andar_frac']?></td>
<td><?php echo $row['num_porta']?></td>
<td><?php echo $row['proprietario']?></td>
<td><?php echo $row['pagante_nome']?></td>
<td><?php echo $row['pagante_nif']?></td>
<td><?php echo $row['area_frac']?></td>
<td><?php echo $row['despesas_frac']?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</section>