<?php
	require_once("koneksi.php");
    include 'header.php';
?>

	<!-- breadcrumbs -->
		<div class="breadcrumbs">
			<div class="container">
				<ol class="breadcrumb breadcrumb1">
					<li><span><i class="fa fa-sign-in" aria-hidden="true"></i><a href="login.php"> Masuk</a></span></li>
					<li class="active">Form Kelola Buku</li>
				</ol>
			</div>
		</div>
	<!-- //breadcrumbs -->
	<!-- register -->
		<div class="register">
			<div class="container">
				<h2>Tambah Data Buku</h2>
				<div class="login-form-grids">
					<h5>Data Buku</h5>
					<form  action="addbook_process.php" method="POST" enctype="multipart/form-data">
						<input type="text" name="isbn" placeholder="ISBN" required=" " ><br>
						<input type="text" name="judul" placeholder="Judul Buku" required=" " ><br>
						<input type="text" name="pengarang" placeholder="Nama Pengarang" required=" " ><br>
						<select class="form-control" name="penerbit" required="Pilih Penerbit">
								<?php
									$penerbit   = mysqli_query($koneksi, "SELECT * FROM t_penerbit ORDER BY id_penerbit");
									while($pilih = mysqli_fetch_array($penerbit)) {
								?>
									<option value="<?= $pilih['id_penerbit'];?>"><i class="fa fa-arrow-right" aria-hidden="true"></i><?php echo $pilih['nama_penerbit']; ?></option>
								<?php   
									}
							 	?>
						</select><br>
						<select class="form-control" name="kategori" required="Pilih Kategori">
								<?php
									$kategori   = mysqli_query($koneksi, "SELECT * FROM t_kategori ORDER BY id_kategori");
									while($pilih = mysqli_fetch_array($kategori)) {
								?>
									<option value="<?= $pilih['id_kategori'];?>"><i class="fa fa-arrow-right" aria-hidden="true"></i><?php echo $pilih['nama_kategori']; ?></option>
								<?php   
									}
							 	?>
						</select><br>
						<input type="text" name="tahun" placeholder="Tahun Terbit" required=" " ><br>
						<input type="text" name="harga" placeholder="Harga per Eksemplar" required=" " ><br>
						<input type="text" name="jumlah" placeholder="Jumlah Tersedia" required=" " ><br>
						<select class="form-control" name="keterangan" required>
									<option value="1"><i class="fa fa-arrow-right" aria-hidden="true"></i>Tidak ada penawaran khusus</option>
									<option value="2"><i class="fa fa-arrow-right" aria-hidden="true"></i>Penjualan Terbaik</option>
									<option value="3"><i class="fa fa-arrow-right" aria-hidden="true"></i>Potongan Harga</option>
									<option value="4"><i class="fa fa-arrow-right" aria-hidden="true"></i>Rilis Terbaru</option>
								
						</select><br>
						Pilih File Gambar : <br><br>
						<input type="file" name="gambar" accept="img/*" required="Pilih file gambar">
						<input type="submit" name="tambah" value="tambah">
					</form>
				</div>
				<div class="register-home">
					<a href="processbook.php">BATAL</a>
				</div>
			</div>
		</div>
	<!-- //register -->
	
<?php
	include 'footer.php';
?>