-
Notifications
You must be signed in to change notification settings - Fork 0
/
user_details_edit.php
104 lines (99 loc) · 2.66 KB
/
user_details_edit.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
<?php
include "connect.php";
$host = "localhost";
$user = "root";
$password = "";
$database = "manpro";
$conn = mysqli_connect($host, $user, $password, $database);
$idg = $_GET['idg'];
$ide = $_GET['ide'];
$idu = $_GET['idu'];
$email = $_SESSION['email'];
$query = "SELECT user.nama, detail_event.absen, detail_event.alasan, detail_event.id_group, detail_event.id_event, detail_event.id_user\n" . "FROM user\n" . "RIGHT JOIN detail_event ON user.id = detail_event.id_user\n" . "WHERE detail_event.id_user = $idu;";
$result = mysqli_query($conn, $query);
?>
<!DOCTYPE html>
<html>
<head>
<title>Proyek Manpro</title>
<?php include('assets/header.php'); ?>
<link rel="stylesheet" type="text/css" href="assets/css/admin_sidebar.css">
<link rel="stylesheet" type="text/css" href="assets/css/admin_home.css">
<link rel="stylesheet" href="assets/css/admin_files.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<style>
#container{
padding: 20px;
}
.accordion{
width: 400px;
}
.accordion-button{
height: 40px;
}
.accordion-body {
margin-top:-10px;
}
.accordion-button:not(.collapsed){
color:black;
}
.form-control{
font-size: 15px;
}
.form-label{
margin-top: 8px;
margin-bottom: 0px;
}
</style>
<form method="post" action=<?php echo 'user_details_edit_action.php?idg='.$idg . '&ide=' .$ide . '&idu=' .$idu;?>>
<div id="container">
<!-- awal buat detail kehadiran -->
<div id="konten-user" style="margin-top:30px;">
<h3><i class="fa-solid fa-user-group"></i> Edit Detail Group </h3>
<table id="dtOrderExample" class="table table-striped table-bordered table-sm" cellspacing="0" width="100%">
<thead class="table-secondary">
<tr>
<th class="col" scope="col">Nama</th>
<th class="col" scope="col">Status Kehadiran</th>
<th class="col" scope="col">Keterangan</th>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($result)){
?>
<tr>
<td><?php echo htmlspecialchars($row['nama']); ?></td>
<td>
<input type="radio" name="absen" value=
"1"
<?php
if($row['absen']=='1')
{?>
checked="true"
<?php } ?>
>Hadir
<input type="radio" name="absen" value=
"0"
<?php
if($row['absen']=='0')
{?>
checked='true'
<?php } ?>
>Absen
</td>
<td>
<input value="<?php echo $row['alasan'];?>" type="text" name="alasan">
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<input type='submit' value='Submit' name='submit' class="button-1"/>
</form>
</body>
</html>