<header id="fh5co-header" class="fh5co-cover fh5co-cover-sm" role="banner" style="background-image:url(images/future-of-books.png);" data-stellar-background-ratio="0.5">
	<div class="overlay"></div>
	<div class="container">
		<div class="row">
			<div class="col-md-8 col-md-offset-2 text-center">
				<div class="display-t">
					<div class="display-tc animate-box" data-animate-effect="fadeIn">
						<h1>e-Book</h1>
						<h2>cek Koleksi e-Book kami.</h2>
					</div>
				</div>
			</div>
		</div>
	</div>
</header>

<div id="fh5co-blog">
	<div class="container">
		<div class="row">
		    <div class="col-lg-12 col-md-12" style="margin-bottom: 20px;">
				<form method=POST action='ebook-1-cari.html' enctype='multipart/form-data'>
				<div class="fh5co-blog animate-box">
				    <div class="col-lg-8 col-md-12">
				    <input type='hidden' name='acts'  id="acts" class="form-control" value='acts' readonly/>
				    <input type='text' name='key'  id="key" class="form-control" placeholder='masukkan judul buku'/>
				    </div>
				    <div class="col-lg-4 col-md-12">
				    <input type="submit" value="Cari" class="btn btn-primary">
				    </div>
				</div>
				</form>
			</div>
		<?Php
					$id_jurusan = $_GET['id'];
					$act = $_GET['act'];
					$key = $_POST['key'];
					$acts = $_POST['acts'];
				// 	echo"act : $acts , key : $key";
					if($acts=='acts'){
					    $AND = "AND a.judul LIKE ('%$key%')";
					}else{
					    $AND = "";
					}
					$ebook = mysqli_query($conn,"SELECT
											a.kode,a.judul,a.kd_kategori,a.file_name,b.judul_kategori
										FROM
											m_ebook a
											INNER JOIN m_kategori_ebook b ON a.kd_kategori=b.id
										WHERE
										    a.kd_jurusan = '$id_jurusan' $AND
										LIMIT 9
											");
									
					while($eb = mysqli_fetch_array($ebook)){
		?>
			<div class="col-lg-6 col-md-6">
				<div class="fh5co-blog animate-box">
				<?Php
					if(empty($eb[file_name])){

					}else{
				?>
						<embed src="admin/files_ebook/<?Php echo"$eb[file_name]";?>#toolbar=0" width="555px" height="350px"> </embed>
			
				<?Php
					}
				?>
					<div class="blog-text">
						<span class="posted_on"><?Php echo"$eb[judul_kategori]";?></span>
						<p><?Php echo"$eb[judul]";?></p>
					</div>
				</div>
			</div>
		<?Php
					}
				?>
		</div>
	</div>
</div>