<?php SESSION_START();if(!isset($_SESSION['admin_id'])){	header("location: ../index.php");}?><?php  include("../config/config.php");?>
<?php include("head.php"); ?>
<body>
<div class="wrapper">
<header>
<?php include("navigation.php"); ?>
</header>

<div class="col-main">
<content>
		
<div class="demo_jui">
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
	<thead>
		<tr>
			<th>Title</th>
			<th>Author</th>
			<th>Publisher Name</th>
			<th>Status</th>
			<th>ISBN</th>
			<th>Class Number</th>
			<th>Actions</th>
		</tr>
	</thead>
	<tbody>
	
<?php $sql = mysql_query("SELECT * FROM books")or die(mysql_query());
		WHILE($book=mysql_fetch_array($sql)){ 
		$id = $book['accession_no'];
		?>
		
		<tr class="gradeX del<?php echo $id; ?>" id="<?php echo $id; ?>" >
			<td><?php echo $book['title']; ?></td>
			<td><?php echo $book['author']; ?></td>
			<td><?php echo $book['publisher_name']; ?></td>
			<td><?php echo $book['status']; ?></td>
			<td><?php echo $book['isbn_no']; ?></td>
			<td><?php echo $book['call_number']; ?></td>
			<td><a href="editbook.php?id=<?php echo $id; ?>"><img src="media/images/data_edit.ico" alt="delete" /></a></td>
		</tr>
<?php } ?>
	</tbody>
</table>
</div>
</content>
<?php include("left.php"); ?>
</div>
<!--<span class="del" id="<?php echo $id;?>"><img src="media/images/data_delete.ico" alt="delete" /></span>-->

<?php include("footer.php"); ?>
</div>
</body>
</html>