-
Notifications
You must be signed in to change notification settings - Fork 1
/
tambah buku.php
170 lines (145 loc) · 4.7 KB
/
tambah buku.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
<?php include 'koneksi/koneksi.php';
session_start();
$user=$_SESSION['user'];
if($user=="" || $user==" "){
header('Location: indexlogin admin.php');
}
?>
<!DOCTYPE html>
<html>
<head>
<title> Tambah Buku</title>
<link href="https://fonts.googleapis.com/css?family=Concert+One" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Yatra+One" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="icon" type="image/gif/png" href="logo4.png">
</head>
<body>
<!-- Start of Header -->
<div class="navi">
<div class="top-head">
<ul>
<li><button onclick="document.getElementById('id01').style.display='block'" style="width:auto;">LOGOUT</button></li>
<?php $datanya = "SELECT * FROM admin WHERE email='$user'";
$query = mysqli_query($conn, $datanya);
$data = mysqli_fetch_assoc($query);?>
<a href="profil admin.php"><li style="border-right: 1px solid white;"><?php echo $data['nama']; ?></li></a>
</ul>
</div>
<div class="mid-head">
<ul>
<li><img style="height:35px; width:35px; margin-right:-100px" src="logo3.jpg"></li>
<li><img style="width:180px; height:30px; margin-right:-50px; margin-left:-40px; float:right; padding-top:1px;" src="logo2.jpg"></li>
<li><a href="index admin.php"><b>BERANDA</b></a></li>
<li><a href="manage buku.php"><b>MANAGE BUKU</b></a></li>
<li><a href="manage event.php"><b>MANAGE EVENT</b></a></li>
<li><a href="kelolamember.php"><b>MANAGE USER</b></a></li>
</ul>
</div>
<div class="bot-head"></div>
</div>
<!-- End of Header -->
<div class="header-gap">
<img class="header-gap-white" src="white.jpg">
</div>
<div class="daftar">
<h2 style="font-family: 'Yatra One'; margin-left:20px">Tambah buku</h2>
<form action="proses/addbook.php" enctype="multipart/form-data" method="POST">
<table class="daftar-table">
<tr>
<td>Judul</td>
</tr>
<tr>
<td><input type="text" placeholder="Masukkan Judul" name="judul" required></td>
</tr>
<tr>
<td>Pengarang</td>
</tr>
<tr>
<td><input type="text" placeholder="Masukkan Pengarang" name="pengarang" required></td>
</tr>
<tr>
<td>Tahun Terbit</td>
</tr>
<tr>
<td><input type="number" placeholder="Masukkan Thn Terbit" name="tahun" required></td>
</tr>
<tr>
<td>Genre</td>
</tr>
<tr>
<td> <select name="genre">
<option value="ilmiah">ILMIAH</option>
<option value="anak-anak">ANAK-ANAK</option>
<option value="edukatif">EDUKATIF</option>
<option value="fiksi">FIKSI</option>
<option value="novel">NOVEL</option>
</select></td>
</tr>
<tr>
<td>Buku Fisik</td>
</tr>
<tr>
<td> <input type="radio" name="fisik" value="tersedia" checked> Tersedia<br>
<input type="radio" name="fisik" value="tidak tersedia"> tidak tersedia<br></td>
</tr>
<tr>
<td>Stok</td>
</tr>
<tr>
<td><input type="number" placeholder="Masukkan Stok Buku" name="stok" required></td>
</tr>
<tr>
<td>Lokasi Buku Fisik</td>
</tr>
<tr>
<td><input type="lokasi" placeholder="Masukkan Lokasi Buku" name="lokasi"></td>
</tr>
<tr>
<td>Deskripsi</td>
</tr>
<tr>
<td><textarea cols="90" rows="10" placeholder="Masukkan Deskripsi Buku" name="deskripsi" required></textarea></td>
</tr>
<tr>
<td>Upload Foto Buku</td>
</tr>
<tr>
<td><input style="margin-top: 10px;" type="file" name="foto" required></td>
</tr>
<tr>
<td>Upload Buku</td>
</tr>
<tr>
<td><input style="margin-top: 10px;" type="file" name="file"></td>
</tr>
<tr>
<td><input style="margin-top: 10px;" type="submit" name="submit" value="Tambah"></td>
</tr>
</table>
</form>
</div>
<br><br><br><br><br><br><br><br><br><br><br><br>
<footer>
<p class="footer-text">Copyright</p>
</footer>
<!--Start of logout form-->
<div id="id01" class="modal">
<form class="modal-content animate" action="/action_page.php">
<div class="imgcontainer">
<span onclick="document.getElementById('id01').style.display='none'" class="close" title="Close Modal">×</span>
<img style="width:300px; height:300px;" src="logo.jpg" alt="Avatar" class="avatar">
</div>
<div style="margin-top:-50px;" class="container">
<h2 style="text-align: center; margin-bottom:20px; font-family: 'Yatra One';">Apakah anda yakin?</h2>
<div style="display: block; margin-left:40%;">
<a href="proses/logout admin.php"><button style="margin-right:30px;" type="button" class="buku-popup-baca">Ya</button></a>
<a href="index admin.php"><button style="background-color:red" type="button" class="buku-popup-baca">Tidak</button>
</div></a>
</div>
</form>
</div>
<!--End of logout form-->
<script src="javascript.js"></script>
</body>
</html>