-
Notifications
You must be signed in to change notification settings - Fork 0
/
detail-terbit.php
121 lines (93 loc) · 2.81 KB
/
detail-terbit.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
<?php
session_start();
//membatasi halaman sebelum login
if(!isset($_SESSION)){
echo "<script>
alert('login dulu');
document.location.href = 'login.php';
</script>";
exit;
}
$title = 'detail terbit';
include 'layout/navbar.php';
// mengambil id mahasiswa dari url
$id_judul = (int)$_GET['id_judul'];
//menampilkan data mahasiswa
$terbit = select("SELECT * FROM terbit WHERE id_judul = $id_judul")[0];
$episodes = select("SELECT * FROM episode WHERE id_judul = $id_judul ORDER BY episode")
?>
<br>
<br>
<br>
<div class="container mt-5">
<h1>Judul Komik : <?= $terbit['judul']; ?></h1>
<hr>
<h7 >Peringatan : </h7><br><br>
<p>Tambahkan episode agar karya mu dapat dilihat banyak orang</p>
<br>
<div class=" text-right">
<a href="tambah-episode.php?id_judul=<?= $terbit['id_judul']; ?>" class="btn btn-sm btn-success">Tambah Episode+</a>
<a href="approve.php" class="btn btn-secondary btn-sm" >Kembali</a>
</div>
<hr>
<div class="row">
<div class="col-8">
<table class="table table-bordered table-striped mt-3">
<tr>
<td>Judul</td>
<td>: <?= $terbit['judul']; ?></td>
</tr>
<tr>
<td>Genre</td>
<td>: <?= $terbit['genre']; ?></td>
</tr>
<tr>
<td>Email</td>
<td>: <?= $terbit['email']; ?></td>
</tr>
<tr>
<td>Ringkasan</td>
<td>: <?= $terbit['ringkasan']; ?></td>
</tr>
<tr>
<td width="50%">Cover</td>
<td>
<a href="assets/img/<?= $terbit['foto']; ?>">
<img src="assets/img/<?= $terbit['foto']; ?>" alt="foto" width="50%">
</a>
</td>
</tr>
</table>
</div>
<div class="col-4">
<div class="row">
<div class="col"><br>
<h3>View Episode</h3>
</div><hr>
<div class="col" align="right">
<?php if ($terbit['disetujui'] == 1) : ?>
<?php endif; ?>
</div>
</div>
<!-- peringatan notifikasi -->
<ul class="list-group">
<?php if(!count($episodes)) : ?>
<li class="list-group-item">
Data Episode Kosong
</li>
<?php endif; ?>
<?php foreach($episodes as $episode) : ?>
<li class="list-group-item">
<a href="detail-episode.php?id_episode=<?= $episode['id_episode']; ?>">
Episode <?= $episode['episode']; ?> : <?= $episode['judul']; ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
</div>
<br>
<br>
<br>
<?php include 'layout/footer.php'; ?>