-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconsult.php
153 lines (138 loc) · 6.43 KB
/
consult.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<?php include('session.php');
//$id_de_cons = $_SESSION["id_consulta"];
$idcookie = $_COOKIE["idcons"];
?>
<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> Utilizador</h4>
<hr>
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>Nome</th>
<th>Email</th>
<th>Morada</th>
<th>NIF</th>
<th>Tlm</th>
<th>Rank</th>
<th>Estado</th>
</tr>
</thead>
<tbody>
<?php
$query = "SELECT * FROM users where id_user=" . $idcookie;
$results = mysqli_query($connection, $query);
while($row = mysqli_fetch_assoc($results)) {
$ref = $row['id_user'];
?>
<tr>
<td><?php echo $row['id_user'];?></td>
<td><?php echo $row['user_nicename']?></td>
<td><?php echo $row['user_mail']?></td>
<td><?php echo $row['user_adress']?></td>
<td><?php echo $row['user_nif']?></td>
<td><?php echo $row['user_phone']?></td>
<td><?php echo $row['user_rank']?></td>
<td><?php echo $row['user_status']?></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> Condominío</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_resp=" . $idcookie;
$results = mysqli_query($connection, $query);
while($row = mysqli_fetch_assoc($results)) {
?>
<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>