-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile_admin.php
243 lines (216 loc) · 10.8 KB
/
profile_admin.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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<?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'] != 'Admin') {
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_jabatan
INNER JOIN tb_pegawai
ON tb_pegawai.id_jabatan = tb_jabatan.id_jabatan
WHERE id_pegawai = :id_pegawai';
$statement = $pdo->prepare($sql);
$statement->bindParam(':id_pegawai', $_SESSION["id_pegawai"], PDO::PARAM_STR);
$statement->execute();
$user_jabatan = $statement->fetch(PDO::FETCH_ASSOC);
$sql = 'SELECT *
FROM tb_bidang
INNER JOIN tb_pegawai
ON tb_pegawai.id_bidang = tb_bidang.id_bidang
WHERE id_pegawai = :id_pegawai';
$statement = $pdo->prepare($sql);
$statement->bindParam(':id_pegawai', $_SESSION["id_pegawai"], PDO::PARAM_STR);
$statement->execute();
$user_bidang = $statement->fetch(PDO::FETCH_ASSOC);
$sql = 'SELECT *
FROM tb_ruangan
INNER JOIN tb_pegawai
ON tb_pegawai.id_ruangan = tb_ruangan.id_ruangan
WHERE id_pegawai = :id_pegawai';
$statement = $pdo->prepare($sql);
$statement->bindParam(':id_pegawai', $_SESSION["id_pegawai"], PDO::PARAM_STR);
$statement->execute();
$user_ruangan = $statement->fetch(PDO::FETCH_ASSOC);
$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);
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Profile</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.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;">
<!-- Nav bar div -->
<div class="d-flex flex-column justify-content-start header fixed-top">
<nav class="navbar navbar-expand-sm">
<div class="container-fluid">
<img src="img/char-logo.png" alt="logo-rumah-sakit" height="60" class="kiri" style="padding-right: 8vw;">
<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 text-center">
<li class="nav-item">
<a class="nav-link" aria-current="page" href="beranda-after_admin.php">Beranda</a>
</li>
<li class="nav-item">
<a class="nav-link" href="jadwal_admin.php">Jadwal</a>
</li>
<li class="nav-item">
<a class="nav-link" href="akun.php">Akun</a>
</li>
<li class="nav-item">
<a class="nav-link" href="jabatan.php">Jabatan</a>
</li>
<li class="nav-item">
<a class="nav-link" href="bidang.php">Bidang</a>
</li>
<li class="nav-item">
<a class="nav-link" href="ruangan.php">Ruangan</a>
</li>
<li class="nav-item">
<a class="nav-link" href="pengumuman_admin.php">Pengumuman</a>
</li>
<li class="nav-item">
<a class="nav-link" href="panduan_admin.php">Panduan</a>
</li>
<li class="nav-item">
<a class="nav-link" href="pengajuan_admin.php">Pengajuan</a>
</li>
<li class="nav-item">
<a class="nav-link" href="profile_admin.php">Profile</a>
</li>
</ul>
</div>
</div>
</nav>
</div>
<!-- END Nav bar div -->
<!-- Informasi Umum Pegawai Div -->
<div class="container" style="padding-top:20vh;">
<div class="d-lg-flex flex-row justify-content-center">
<img class="foto-profile" src="data:image/png;charset=utf8;base64,<?php echo base64_encode($user['foto_profile']); ?>" height="250px" style="margin-right: 9vw; margin-left: 1vw; margin-top: 5vh; border-radius:30px;"/>
<div class="container" style="background-color: #ffff; border-radius: 26px; width: 70%;">
<div class="d-flex flex-column justify-content-evenly" style="margin-top: 3vh; margin-left: 3vw; margin-right: 3vw; margin-bottom: 5vh;">
<h2>Informasi Umum Pegawai</h2>
<table class="table table-bordered" style="margin-top: 2vh; width:100%">
<tbody>
<tr>
<td>NIP<br><?= $user['nip']; ?></td>
<td>Jabatan<br><?= $user_jabatan['nama_jabatan']; ?></td>
</tr>
<tr>
<td>Bidang<br><?= $user_bidang['nama_bidang']; ?></td>
<td>Jenis Kontrak<br><?= $user['jenis_kontrak']; ?></td>
</tr>
<tr>
<td>Ruang Kerja<br><?= $user_ruangan['nama_ruangan']; ?></td>
<td>Tahun Masuk<br><?= $user['tahun_masuk']; ?></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- END Informasi Umum Pegawai Div -->
<!-- Identitas Pribadi Div -->
<div class="container" style="background-color: #ffff; border-radius: 26px; padding-top:3vh; margin-top:5vh;">
<div class="d-flex flex-column justify-content-evenly" style="margin-top: 3vh; margin-left: 3vw; margin-right: 3vw; margin-bottom: 5vh;">
<h2>Identitas Pribadi</h2>
<table class="table table-bordered" style="margin-top: 2vh; width:100%">
<tbody>
<tr>
<td colspan="2">Nama Lengkap<br><?= $user['nama']; ?></td>
</tr>
<tr>
<td>Tempat Lahir<br><?= $user['tempat_lahir']; ?></td>
<td>Tanggal Lahir<br><?= $user['tgl_lahir']; ?></td>
</tr>
<tr>
<td>Jenis Kelamin<br><?= $user['jenis_kelamin']; ?></td>
<td>Agama<br><?= $user['agama']; ?></td>
</tr>
<tr>
<td>Status Perkawinan<br><?= $user['status_kawin']; ?></td>
<td>Golongan Darah<br><?= $user['golongan_darah']; ?></td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- END Identitas Pribadi Div -->
<!-- Informasi Pribadi Div -->
<div class="container" style="background-color: #ffff; border-radius: 26px; padding-top:3vh; margin-top:5vh;">
<div class="d-flex flex-column justify-content-evenly" style="margin-top: 3vh; margin-left: 3vw; margin-right: 3vw; margin-bottom: 5vh;">
<h2>Informasi Pribadi</h2>
<table class="table table-bordered" style="margin-top: 2vh; width:100%">
<tbody>
<tr>
<td colspan="2">Negara<br><?= $user['negara']; ?></td>
</tr>
<tr>
<td>Kabupaten<br><?= $user['kabupaten']; ?></td>
<td>Kecamatan<br><?= $user['kecamatan']; ?></td>
</tr>
<tr>
<td colspan="2">Alamat<br><?= $user['alamat']; ?></td>
</tr>
<tr>
<td>Nomor KTP<br><?= $user['no_ktp']; ?></td>
<td>File KTP<br><a download="file_ktp.PDF" href="data:application/pdf;base64, <?php echo base64_encode($user['file_ktp']) ?>">Download</a></td>
</tr>
<tr>
<td>Nomor Telepon<br><?= $user['no_hp']; ?></td>
<td>Email<br><?= $user['email']; ?></td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- END Informasi Pribadi Div -->
<!-- Button Div -->
<div class="container d-lg-flex flex-row justify-content-between" style="margin-top: 5vh;">
<a href="logout.php">
<button type="button" class="btn btn-primary btn-lg">Logout</button>
</a>
<a href="profile_admin_edit.php">
<button type="button" class="btn btn-primary btn-lg">Edit</button>
</a>
</div>
<!-- END Button Div -->
<!-- Footer 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="70px" 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>
<!-- END Footer 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>