-
Notifications
You must be signed in to change notification settings - Fork 1
/
agendados.php
145 lines (103 loc) · 3.82 KB
/
agendados.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
<?php
include "conexao.php";
$query = "SELECT horario,nome,YEAR(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(dtnasc))) AS idade,endereco,telefone,plano,sessoes,DATE_FORMAT(dtcons, '%d/%m/%Y') AS data_agendamento,precoCons,total FROM agendamento order by idAgend";
$result = mysql_query($query);
?>
<DOCTYPE html>
<html>
<head>
<title>Pacientes Agendados</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/tabela.css">
<script type="text/javascript" src="http://localhost/clinica/js/idade.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="//cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="//cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.4.0/css/buttons.dataTables.min.css">
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.4.0/js/dataTables.buttons.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.4.0/js/buttons.flash.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/bpampuch/pdfmake/0.1.27/build/pdfmake.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/bpampuch/pdfmake/0.1.27/build/vfs_fonts.js"></script>
<script type="text/javascript" src="//cdn.datatables.net/buttons/1.4.0/js/buttons.html5.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<?php
$login_cookie = $_COOKIE['login'];
if(isset($login_cookie)){
echo"Bem-Vindo(a), <b> $login_cookie </b><br>";
}
?>
<body>
<hr>
<div id="header">
<header>
<h3 align="center"> +Psico - Pacientes Agendados</h1>
</header>
</div>
<hr>
<div id="mainnav">
<?php
include 'menu.html';
?>
</div>
<div class="container">
<div class="table-responsive">
<table id="agendados" class="table table-striped table-bordered">
<thead>
<tr>
<th>Horário</th>
<th>Nome</th>
<th>Idade</th>
<th>Endereço</th>
<th>Telefone</th>
<th>Plano</th>
<th>Sessões</th>
<th>Data Consulta</th>
<th>Preço Consulta</th>
<th>Total</th>
</tr>
<tfoot>
<tr>
<th>Total</th>
</tr>
</tfoot>
</thead>
<?php
while($row=mysql_fetch_array($result)){
echo '
<tr>
<td>'.$row["horario"].'</td>
<td>'.$row["nome"].'</td>
<td>'.$row["idade"].'</td>
<td>'.$row["endereco"].'</td>
<td>'.$row["telefone"].'</td>
<td>'.$row["plano"].'</td>
<td>'.$row["sessoes"].'</td>
<td>'.$row["data_agendamento"].'</td>
<td>'.$row["precoCons"].'</td>
<td>'.$row["total"].'</td>
</tr>
';
}
?>
</table>
</div>
</div>
<div id="footer">
<footer><center>Copyright © - Desenvolvido por @Vasconcellos </center></footer>
<div>
<script type="text/javascript">
$(document).ready(function(){
$('#agendados').DataTable({
dom: 'Bfrtip',
buttons: ['copy', 'excel', 'pdf']
});
});
</script>
</body>
</html>