-
Notifications
You must be signed in to change notification settings - Fork 0
/
ketua_detail_group.php
127 lines (113 loc) · 2.99 KB
/
ketua_detail_group.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
<?php
include 'connect.php';
$url = $_SERVER['REQUEST_URI'];
$url_components = parse_url($url);
parse_str($url_components['query'], $params);
?>
<!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">
</head>
<body>
<style>
#container{
padding: 20px;
}
.row {
margin-left:-5px;
margin-right:-5px;
}
.column {
float: left;
width: 50%;
padding: 5px;
}
/* Clearfix (clear floats) */
.row::after {
content: "";
clear: both;
display: table;
}
</style>
<div id="container">
<div class="row">
<div class="column">
<div id="konten-user" style="margin-top:30px;">
<h3><i class="fa-solid fa-book-bible"></i> Baca Alkitab </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">Ayat</th>
</tr>
</thead>
<tbody>
<?php
$sql = "SELECT dg.*, u.nama AS nama, a.ayat AS ayat
FROM detail_group AS dg
JOIN user AS u
ON u.id = dg.id_user
JOIN alkitab AS a
ON a.id = dg.id_alkitab
WHERE dg.id_group = ? AND
id_alkitab != 0";
$stmt = $pdo->prepare($sql);
$stmt->execute([$params['idg']]);
while($row = $stmt->fetch()){
?>
<td><?php echo $row['nama'];?></td>
<td><?php echo $row['ayat'];?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
<div class="column">
<div id="konten-user" style="margin-top:30px;">
<h3><i class="fas fa-microphone"></i> Event </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">Tanggal</th>
</tr>
</thead>
<tbody>
<?php
$sql = "SELECT e.nama AS nama_event,
e.createdAt AS tanggal,
e.jenis AS jenis,
e.tempat AS tempat,
e.link AS link,
e.id AS id_event
FROM detail_event AS de
JOIN event AS e
WHERE de.id_group = ? AND e.nama != 'Empty'
GROUP BY nama_event, tanggal, jenis, tempat, link";
$stmt = $pdo->prepare($sql);
$stmt->execute([$params['idg']]);
while($row = $stmt->fetch()){
?>
<td><?php echo '<a href=user_details.php?idg='. $params['idg'] .'&ide='.$row['id_event'] .'>'. $row['nama_event'] . '</a>'?></td>
<td><?php echo $row['tanggal'];?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</body>
</html>