-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
107 lines (93 loc) · 2.64 KB
/
index.php
File metadata and controls
107 lines (93 loc) · 2.64 KB
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
<?php
require_once("db.php");
$sql = "SELECT * FROM despesas ORDER BY despesaId DESC";
$result = mysqli_query($conn,$sql);
?>
<html>
<head>
<title>Listagem de Despesas</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet">
</head>
<body>
<style type="text/css">
.brand{
font-family: 'Lobster', cursive;
font-size:40px;
}
.add{
font-family: 'Lobster', cursive;
font-size:30px;
margin-bottom: -30px;
font-weight: bold;
margin-top: -10px;
}
.hr{
margin-left: -20px;
}
thead{
font-weight: bold;
color: #777;
}
.bigger{
padding: 10px;
}
table{
margin-top: -20px;
}
.navbar-default{
background-color: #7fffd4;
}
.navbar-default .navbar-brand {
color: White;
text-shadow: 2px 2px #777;
}
.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus {
color: GhostWhite;
background-color: transparent;
}
#nav1{
margin-right: -20px;
margin-top: 2px;
}
</style>
<nav class="navbar navbar-default">
<form name="frmUser" method="post" action="">
<div class="message"><?php if(isset($message)) { echo $message; } ?></div>
<div class="container-fluid hr">
<div class="navbar-header">
<a href="index.php" class="brand navbar-brand">Despesas Pessoais</a></div>
<div class="collapse navbar-collapse navbar-right" id="nav1">
<ul class="nav navbar-nav">
<li><a class="scroll add" href="add_desp.php"><img alt='Adicionar Despesa' title='Adicionar Despesa' src='images/adicionar.png' width='40px' height='50px'/><span class="sr-only">(current)</span></a></li>
</nav>
<table border="0" class=" table table-hover table-striped ">
<thead>
<tr>
<td>Nome de usuário</td>
<td>Nome da Despesa</td>
<td>Descrição da Despesa</td>
<td>Valor</td>
<td>Editar/Excluir</td>
</tr>
</thead>
<?php
$i=0;
while($row = mysqli_fetch_array($result)) {
?>
<tr class="<?php if(isset($classname)) echo $classname;?>">
<td><?php echo $row["user"]; ?></td>
<td><?php echo $row["despesa"]; ?></td>
<td><?php echo $row["descDespesa"]; ?></td>
<td><?php echo $row["valor"]; ?></td>
<td><a href="edit_desp.php?despesaId=<?php echo $row["despesaId"]; ?>" class="link"><img alt='Edit' title='Editar' src='images/modificar.png' width='15px' height='15px' hspace='10' /></a> <a href="delete_desp.php?despesaId=<?php echo $row["despesaId"]; ?>" class="link"><img alt='Delete' title='Deletar' src='images/deletar.png' width='15px' height='15px'hspace='10' /></a></td>
</tr>
<?php
$i++;
}
?>
</table>
</form>
</div>
</body></html>