-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrmedis.php
103 lines (94 loc) · 4.11 KB
/
rmedis.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
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rekam Medis - Klinik Gaspol</title>
<link rel="stylesheet" href="css/styleberanda.css">
<link rel="stylesheet" href="css/styles.css">
</head>
<?php
session_start();
if ($_SESSION['hak_akses'] == "0") {
echo "<script>
alert('Anda tidak memiliki hak akses')
</script>";
echo "<script>
window.location.replace('Beranda.php')
</script>";
}
?>
<body>
<header class="modern-navbar">
<div class="container">
<div class="logo-container">
<img src="image/logonav/logo.png" alt= "logo" class="logo">
<h1>Klinik Gaspol</h1>
</div>
<nav>
<ul>
<li><a href="beranda.php">Beranda</a></li>
<li><a href="pasien.php">Data Pasien</a></li>
<li><a href="rmedis.php">Rekam Medis</a></li>
<li><a href="dokter.php">Data Dokter</a></li>
<li><a style="text-decoration:none;color: #0ae7ff;font-weight: bold;" href="logout.php" class="logout">Logout</a></li>
</ul>
</nav>
</div>
</header>
<main class="container">
<h2>Rekam Medis</h2>
<div style="overflow: auto;">
<a href="form_tambah_rek.php" class="button">Tambah Data Baru</a>
<table border="1" class="table">
<thead>
<tr>
<th>No Rekam</th>
<th>Nama Pasien</th>
<th>Tanggal Kunjungan</th>
<th>Nama Dokter</th>
<th>Keluhan</th>
<th>Diagnosis</th>
<th>Terapi</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
<?php
include 'koneksi.php';
$sql = "SELECT * FROM rkmedis";
$result = $koneksi->query($sql);
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) { ?>
<tr>
<td><?php echo $row['no_rek']; ?></td>
<td><?php echo $row['nama_pasien']; ?></td>
<td><?php echo $row['tgl_kunjung']; ?></td>
<td><?php echo $row['nama_dokter']; ?></td>
<td><?php echo $row['keluhan']; ?></td>
<td><?php echo $row['diagnosis']; ?></td>
<td><?php echo $row['terapi']; ?></td>
<td style=" display: flex; justify-content: space-between; align-items: center; padding: 5px; gap: 5px;">
<a href="form_edit_rek.php?nama_pasien=<?php echo $row['nama_pasien']; ?>" class="button" style="background-color: #007bff; padding: 5px 10px; text-decoration: none;">Edit</a>
<a href="detail_pasien.php?no_rek=<?php echo $row['no_rek']; ?>" class="button" style="background-color: #007bff; padding: 5px 10px; text-decoration: none;">Detail</a>
<a href="proses_hapus_rek.php?nama_pasien=<?php echo $row['nama_pasien']; ?>" onclick="return confirm('Yakin hapus data?')" class="button" style="background-color: #dc3545; padding: 5px 10px; text-decoration: none;">Hapus</a>
</td>
</tr>
<?php
}
} else {
echo "<tr><td colspan='6'>Tidak ada data rekam medis</td></tr>";
}
$koneksi->close();
?>
</tbody>
</table>
</div>
</main>
<footer>
<p>© 2023 Klinik Gaspol. Semua hak dilindungi.</p>
<p>Alamat: Jl. Kesehatan No. 123, Kota Sehat</p>
<p>Telepon: (021) 123-4567</p>
</footer>
</body>
</html>