
		<?Php
		include"../../app.siakad-pasarrebo.ac.id/jangan_dibuka/perhatian.php";
		$cari = $_GET['ca'];
		$kj = $_GET['id'];
		$kjs = $_GET['kj'];
		    if(empty($cari)){
			    $WHERE = "";
			}else{
			    $WHERE = "WHERE a.judul LIKE ('%$cari%') AND a.kd_jenis = '$kjs'";
			}
					$pengumuman = mysqli_query($conn,"SELECT
        											a.kode,a.judul,a.pengarang,a.kd_jenis,b.jenis,a.kd_penerbit,a.tahun_terbit,
        											a.tempat_terbit,a.halaman,a.ukuran,a.ddc,c.deskripsi,a.isbn,a.kd_kategori,
        											d.kategori,a.kd_sumber,a.kd_rak,f.rak,g.lemari,a.kd_status,h.status,
        											a.keterangan,i.penerbit,a.gambar,a.kd_jurusan
        										FROM
        											m_katalog a
        											LEFT JOIN m_jenis_katalog b ON a.kd_jenis=b.kd_jenis
        											LEFT JOIN m_ddc c ON a.ddc=c.ddc
        											LEFT JOIN m_kategori d ON a.kd_kategori=d.kd_kategori
        											LEFT JOIN m_sumber e ON a.kd_sumber=e.kd_sumber
        											LEFT JOIN m_rak f ON a.kd_rak=f.kd_rak
        											LEFT JOIN m_lemari g ON f.kd_lemari=g.kd_lemari
        											LEFT JOIN m_status h ON a.kd_status=h.kd_status
        											LEFT JOIN m_penerbit i ON a.kd_penerbit=i.kd_penerbit
        									    $WHERE
        										ORDER BY RAND()
											");
					while($p = mysqli_fetch_array($pengumuman)){
		echo"
			<div class='col-lg-3 col-md-3'>
				<div class='fh5co-blog'>
				    <div class='blog-text'>
						<span><i>$p[pengarang]</i></span>
						<p><b></b>$p[judul]</b></p>
						<a href='detail_elibrary-$p[kd_jurusan]-$p[kode].html' class='btn btn-primary'>detail</a>
					</div>
				</div>
			</div>
			";
					}
					?>