-
Notifications
You must be signed in to change notification settings - Fork 0
/
veranuncio.php
98 lines (85 loc) · 2.54 KB
/
veranuncio.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
<?php
require_once('crud/functions.php');
include('header.php');
index();
?>
<div class="fh5co-page-title" style="background-image: url(images/slide_6.jpg);">
<div class="overlay"></div>
<div class="container">
<div class="row">
<div class="col-md-12 animate-box">
<h1><span class="colored">Meus <span> Anúncios</h1>
</div>
</div>
</div>
</div>
<div id="best-deal">
<div class="container">
<div class="row">
<div class="col-sm-6">
<h2>Para vender</h2>
</div>
<div class="col-sm-6 text-right h2">
<a class="btn btn-primary" href="criaranuncio.php"><i class="fa fa-plus"></i>Novo Anúncio</a>
</div>
</div>
<?php if (!empty($_SESSION['message'])) : ?>
<div class="alert alert-<?php echo $_SESSION['type']; ?> alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<?php echo $_SESSION['message']; ?>
</div>
<?php clear_messages(); ?>
<?php endif; ?>
<hr>
<table class="table table-hover">
<thead>
<tr>
<th>Nome</th>
<th width="30%">Valor</th>
<th>Descrição</th>
<th>Endereço</th>
<th>Telefone</th>
<th>Inserido por</th>
</tr>
</thead>
<tbody>
<?php if ($anuncios) : ?>
<?php foreach ($anuncios as $anuncio) : ?>
<tr>
<td><?php echo $anuncio['nome']; ?></td>
<td><?php echo $anuncio['valor']; ?></td>
<td><?php echo $anuncio['descricao']; ?></td>
<td><?php echo $anuncio['endereco']; ?></td>
<td><?php echo $anuncio['telefone']; ?></td>
<td class="actions text-right">
<a href="view.php?id=<?php echo $anuncio['id']; ?>" class="btn btn-sm btn-success"><i class="fa fa-eye"></i> Visualizar</a>
<a href="edit.php?id=<?php echo $anuncio['id']; ?>" class="btn btn-sm btn-warning"><i class="fa fa-pencil"></i> Editar</a>
<a href="#" class="btn btn-sm btn-danger" data-toggle="modal" data-target="#delete-modal" data-anuncio="<?php echo $anuncio['id']; ?>">
<i class="fa fa-trash"></i> Excluir
</a>
</td>
</tr>
<?php endforeach; ?>
<?php else : ?>
<tr>
<td colspan="6">Nenhum registro encontrado.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
<!-- jQuery -->
<script src="js/jquery.min.js"></script>
<!-- jQuery Easing -->
<script src="js/jquery.easing.1.3.js"></script>
<!-- Bootstrap -->
<script src="js/bootstrap.min.js"></script>
<!-- Waypoints -->
<script src="js/jquery.waypoints.min.js"></script>
<!-- Flexslider -->
<script src="js/jquery.flexslider-min.js"></script>
<!-- MAIN JS -->
<script src="js/main.js"></script>
</body>
</html>