-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopisUnesenihPacijenata.php
136 lines (94 loc) · 2.93 KB
/
popisUnesenihPacijenata.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
<!doctype html>
<?php
session_start();
?>
<html>
<head>
<meta charset="UTF-8">
<title>Osobni Podaci</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header class="headerWrapper">
<div class="container">
<img src="img/logo.png" alt="">
<div class="logoutButton">
<?php
if (!isset($_SESSION["username"]) || (empty($_SESSION["username"]))) {
header('Location: login.html');
}
echo "Dobrodosao " .$_SESSION["username"];
?>
<form action="ubijSession.php" method="post">
<input type="submit" value="Logout" />
</form>
</div>
</div>
</header>
<div class="wrapperLogin">
<div class="meniWrapper">
<h3>Meni</h3>
<nav class="">
<ul>
<li><a href="osobniPodaci.php">Osobni Podaci</a></li>
<li><a href="popisPacijenata.php">Popis Pacijenata</a></li>
<li><a href="unosPacijenta.php">Unos Pacijenta</a></li>
<li><a href="popisUnesenihPacijenata.php">Popis Unesenih pacijenata</a></li>
<li><a href="filter.php">Generiraj pdf</a></li>
<li><a href="odaberiGraf.php">Generiraj Graf</a></li>
<li><a href="json.php">Doktori</a></li>
<li><a href="lab8/mobileSite.php">Unos Pacijenta Mobile</a></li>
</ul>
</nav>
</div>
<div class="sadrzajWrapper">
<h3>Popis unesenih pacijenata</h3>
<div class="popisUnesenihWrapper">
<?php
include 'connectToDatabase.php';
$mysqlConnection = new mysqli($host, $user, $pass, $database);
$upit = $mysqlConnection -> prepare("SET NAMES 'utf8'");
$upit -> execute();
$upit = $mysqlConnection -> prepare("SET CHARACTER SET utf8");
$upit -> execute();
$upit = $mysqlConnection -> prepare("SET COLLATION_CONNECTION = 'utf8_general_ci'");
$upit -> execute();
$stmt = $mysqlConnection -> prepare("SELECT idUneseniPacijenti, ime, prezime, spol, datumRodjenja, adresaStanovanja, krvnaGrupa FROM unesenipacijenti");
$stmt -> execute();
$stmt -> bind_result($id, $ime, $prezime, $spol, $datum, $adresa, $krvnagrupa);
echo "<div>";
echo <<< EOT
<table border="1" class="" style="border-collapse:collapse;" >
<tr>
<th> ID#: </td>
<th> Ime: </td>
<th> Prezime: </td>
<th> Spol: </td>
<th> Datum rođenja: </td>
<th> Adresa stanovanja: </td>
<th> Krvna grupa: </td>
</tr>
EOT;
while ($stmt->fetch()) {
echo <<< EOT
<tr class='red'>
<td> {$id} </td>
<td> {$ime} </td>
<td> {$prezime} </td>
<td> {$spol} </td>
<td> {$datum} </td>
<td> {$adresa} </td>
<td> {$krvnagrupa} </td>
</tr>
EOT;
}
echo "</table></div>";
?>
</div>
</div>
</div>
<footer class="footerWrapper">
<p>CopyRight ZDK.2014</p>
</footer>
</body>
</html>