-
Notifications
You must be signed in to change notification settings - Fork 0
/
beranda-after_kepala.php
178 lines (158 loc) · 8.49 KB
/
beranda-after_kepala.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<?php
session_start();
// jika waktu session habis (tak set 30m)
if (!isset($_SESSION['EXPIRES']) || time() >= $_SESSION['EXPIRES']) {
session_destroy();
$_SESSION = array();
}
if (!isset($_SESSION["id_pegawai"]) || $_SESSION['nama_jabatan'] != 'Kepala Bidang' && $_SESSION['nama_jabatan'] != 'Kepala Ruangan') {
header("location:login.php");
} else {
require "./dbConnection.php";
// $sql = "SELECT * FROM tb_pegawai
// WHERE id_pegawai = {$_SESSION["id_pegawai"]}";
// $result = mysqli_query($conn, $sql);
// $user = mysqli_fetch_array($result);
$sql = 'SELECT *
FROM tb_pegawai
WHERE id_pegawai = :id_pegawai';
$statement = $pdo->prepare($sql);
$statement->bindParam(':id_pegawai', $_SESSION["id_pegawai"], PDO::PARAM_STR);
$statement->execute();
$user = $statement->fetch(PDO::FETCH_ASSOC);
$sql = "SELECT p.*
FROM tb_pengumuman AS p
INNER JOIN tb_pengumuman_detail AS pd
ON pd.id_pengumuman = p.id_pengumuman
INNER JOIN tb_pegawai AS pg
ON pg.id_pegawai = pd.id_pegawai
WHERE pg.id_pegawai = :id_pegawai
AND p.status_pengumuman = 'Y'
;
";
$stmt_pngm = $pdo->prepare($sql);
$stmt_pngm->bindParam(':id_pegawai', $_SESSION["id_pegawai"], PDO::PARAM_STR);
$stmt_pngm->execute();
// $pengumuman = $stmt_pngm->fetch(PDO::FETCH_ASSOC);
$sql = "SELECT p.*
FROM tb_panduan AS p
INNER JOIN tb_panduan_detail AS pd
ON pd.id_panduan = p.id_panduan
INNER JOIN tb_pegawai AS pg
ON pg.id_pegawai = pd.id_pegawai
WHERE pg.id_pegawai = :id_pegawai
AND p.status_panduan = 'Y'
;
";
$stmt_pdn = $pdo->prepare($sql);
$stmt_pdn->bindParam(':id_pegawai', $_SESSION["id_pegawai"], PDO::PARAM_STR);
$stmt_pdn->execute();
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Beranda</title>
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style/beranda-after.css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
</head>
<body class="d-flex flex-column min-vh-100" style="background-color: #F8F2DE;">
<div class="d-flex flex-column justify-content-start header">
<nav class="navbar navbar-expand-sm">
<div class="container-fluid">
<img src="img/char-logo.png" alt="logo-rumah-sakit" height="60" style="padding-right: 8vw ;margin-left: 16vw;";>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" aria-current="page" href="beranda-after_kepala.php">Beranda</a>
</li>
<li class="nav-item">
<a class="nav-link" href="jadwal_kepala.php">Jadwal</a>
</li>
<li class="nav-item">
<a class="nav-link" href="pengajuan_kepala.php">Pengajuan</a>
</li>
<li class="nav-item">
<a class="nav-link" href="profile_kepala.php">Profile</a>
</li>
</ul>
</div>
</div>
</nav>
</div>
</div>
</div>
<div class="container" style="padding-top:5vh;">
<div id="carouselExampleControls" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="img/rs-1.png" class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="img/rs-2.png" class="d-block w-100" alt="...">
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
</div>
<div class="container" style="background-color: #ffff; margin-top: 5vh; border-radius: 26px;">
<div class="d-flex flex-column justify-content-evenly" style="margin-top: 3vh; margin-left: 3vw; margin-right: 3vw; margin-bottom: 5vh;">
<h2>Pengumuman</h2>
<table class="table table-bordered" style="margin-top: 2vh;">
<tbody>
<?php while ($pengumuman = $stmt_pngm->fetch(PDO::FETCH_ASSOC)) : ?>
<tr>
<th>
<a href="./pengumuman_k.php?id_pengumuman=<?= $pengumuman['id_pengumuman'] ?>" style="text-decoration:none; color: black"><?php echo $pengumuman['tgl'] ?></a>
</th>
<td>
<a href="./pengumuman_k.php?id_pengumuman=<?= $pengumuman['id_pengumuman'] ?>" style="text-decoration:none; color: black"><?php echo $pengumuman['judul'] ?></a>
</td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
</div>
<div class="container panduan" style="background-color: #ffff; margin-top: 5vh; border-radius: 26px;">
<div class="d-flex flex-column justify-content-evenly" style="margin-top: 3vh; margin-left: 3vw; margin-right: 3vw; margin-bottom: 5vh;">
<h2>Panduan</h2>
<table class="table table-bordered" style="margin-top: 2vh;">
<tbody>
<?php while ($panduan = $stmt_pdn->fetch(PDO::FETCH_ASSOC)) : ?>
<tr>
<td>
<a href="./panduan_k.php?id_panduan=<?= $panduan['id_panduan'] ?>" style="text-decoration:none; color: black"><?php echo $panduan['judul'] ?></a>
</td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
</div>
<div class="d-flex flex-row-lg justify-content-evenly footer">
<div class="d-lg-flex flex-row justify-content-between">
<img src="img/title-logo-black-2.png" alt="logo pegawai" height="70" style="padding-right: 80px">
<p class="desc">Website ini adalah Sistem Informasi Kepegawaian Rumah Sakit Teknologi Informasi yang digunakan sebagai platform kepegawaian dalam bentuk digital.</p>
</div>
<div class="d-flex flex-column justify-content-start informasi">
<p class="kontak">Kontak Pengaduan</p>
<p class="nomor">0812-345-67897</p>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
</body>
</html>