-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.php
165 lines (142 loc) · 6.29 KB
/
profile.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
<?php
session_start();
include "koneksi.php";
if(!empty($_SESSION['stat_login'])){
}
@$nik = $_SESSION['nik_login'];
$sql = "SELECT * FROM penduduk where nik = '$nik'";
$eksekusi = mysqli_query($conn,$sql);
$data = mysqli_fetch_array($eksekusi);
// while($data = mysqli_fetch_array($eksekusi))
// {
// $tgl_lahir = $_POST['tgl_lahir'] = $data = ['tgl_lahir'];
// $no_telp = $_POST['no_telp'] = $data = ['no_telp'];
// $email = $_POST['email'] = $data = ['email'];
// }
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/all.css">
<link rel="stylesheet" href="css/bootstrap.css">
<title>Document</title>
<style>
body {
/* background-color: #999999; */
background-image: url(image/ist.jpg);
}
.container {
border-radius: 15px;
}
/* a{
float:right;
} */
</style>
</head>
<body>
<div class="bg-white container border mt-3 p-3 shadow" style="width: 90%;">
<h5 class="text-primary"><i class="fa-solid fa-id-card-clip me-2"></i>Profile</h5>
<hr>
<a href="perjalanan.php" class="btn btn-danger rounded-pill" name=""><i class="fa-solid fa-right-from-bracket me-2"></i>kembali</a>
<!-- Button trigger modal -->
<button type="button" class=" btn btn-primary rounded-pill" data-bs-toggle="modal" data-bs-target="#exampleModal">
<i class="fa-solid fa-repeat me-2"></i>Ubah
</button>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel"><i class="text-primary fa-solid fa-square-plus me-2"></i>Form Ubah</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form action="ubah_data_profile.php" method="POST">
<div class="modal-body">
<div class="row">
<div class="col">
<i class="fa-solid fa-map-location-dot me-2"></i>Nomor Induk Kependudukan
<input type="hidden" class="form-control mb-2" name="nik_lama" value="<?php echo $data['nik']?>" >
<input type="text" class="form-control mb-2" name="nik" value="<?php echo $data['nik']?>" >
</div>
</div>
<div class="row">
<div class="col">
<i class="fa-solid fa-map-location-dot me-2"></i>Nama Lengkap
<input type="text" class="form-control mb-2" name="nama_lengkap" value="<?php echo $data['nama_lengkap']?>" >
</div>
</div>
<div class="row">
<div class="col">
<i class="fa-solid fa-calendar-days me-2"></i>Tanggal Lahir
<input type="date" class="form-control mb-2" name="tgl_lahir" value="<?php echo $data['tgl_lahir']?>">
</div>
</div>
<div class="row">
<div class="col">
<i class="fa-solid fa-clock me-2"></i>No Telepon
<input type="text" class="form-control mb-2" name="no_telp" value="<?php echo $data['no_telp']?>">
</div>
</div>
<div class="row">
<div class="col">
<i class="fa-solid fa-temperature-high me-2"></i>Email
<input type="email" class="form-control mb-2" name="email" value="<?php echo $data['email']?>">
</div>
</div>
<div class="row">
<div class="col">
<i class="fa-solid fa-temperature-high me-2"></i>Jabatan
<input type="text" class="form-control mb-2" name="jabatan" value="<?php echo $data['jabatan']?>">
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary"><i class="fa-solid fa-angles-right me-2"></i>Ubah</button>
</div>
</form>
</div>
</div>
</div>
<div class="bg-white pt-3 pb-3">
<div class="row ms-3 me-3">
<form>
<fieldset disabled>
<div class="row">
<div class="col-12">
<label class="form-label">Nomor Induk Kependudukan</label>
<input type="text" class="form-control" value="<?php echo $data['nik']?>">
</div>
<div class="col-md-6">
<label class="form-label">Nama Lengkap</label>
<input type="text" class="form-control" value="<?php echo $data['nama_lengkap']?>">
</div>
<div class="col-md-6">
<label class="form-label">Tanggal Lahir</label>
<input type="text" class="form-control" value="<?php echo $data['tgl_lahir']?>">
</div>
<div class="col-md-6">
<label class="form-label">No Telepon</label>
<input type="text" class="form-control" value="<?php echo $data['no_telp']?>">
</div>
<div class="col-md-6">
<label class="form-label">Email</label>
<input type="text" class="form-control" value="<?php echo $data['email']?>">
</div>
<div class="col-md-6">
<label class="form-label">Jabatan</label>
<input type="text" class="form-control" value="<?php echo $data['jabatan']?>">
</div>
</div>
</fieldset>
</form>
</div>
</div>
</div>
<?php include "footer.php";?>
<script type="text/javascript" src="js/bootstrap.bundle.js"></script>
<script type="text/javascript" src="js/all.js"></script>
</body>
</html>