-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpatients.php
More file actions
59 lines (52 loc) · 1.5 KB
/
patients.php
File metadata and controls
59 lines (52 loc) · 1.5 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
<?php
include_once "inc/prelude.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>COJO OLYMPIC GAMES PROJECT :: Residences
</title>
<style>
body {
background-image: url(" r/residence.jpg");
} </style>
<?php include "inc/resources.php" ?>
</head>
<body>
<div class="wrapper ">
<header>
<h1>COJO OLYMPIC GAMES PROJECT</h1>
<?php breadcrumb("Residence") ?>
</header>
<a href="newPatientView.php" class="new">New</a>
<?php
connectDB();
$sql = <<<EOF
select * from cojodatabase.Residence order by id;
EOF;
$ret = pg_query($db, $sql);
closeDB();
if(!$ret) {
echo pg_last_error($db);
}
else {
datatable(["id", "nomResidence", "capaciteResidence", "adresseResidence", "telephoneResidence"]);
while ($row = pg_fetch_row($ret)) {
echo "<tr>";
for ($i = 0; $i < 5; $i++) {
echo "<td>", $row[$i], "</td>";
}
if(isset ($_SESSION['loggedin']) && $_SESSION['loggedin'])
{
editCell("Patient", $row[0]);
deleteCell("Patient", $row[0]);
}
echo "</tr>";
}
endDatatable();
}
?>
</div>
</body>
</html>