<?php 
require "../commonincludefiles.php";

if($_SESSION["aCollegeId"]!="" && isset($_SESSION["aCollegeId"])){

	$objBook = new BookMgmt();
	$result = $objBook ->getBookRegister();	

	$i=0;
	$registerDate = array("count" =>dbRows($result), "rows" => array());

	if(dbRows($result) > 0){

		$temparray = array();

		while($row = dbArray($result)){
			$temparray["register_id"]  	 = $row["register_id"];
			$temparray["register_name"]  = $row["register_name"];
			$registerDate["rows"][$i] = $temparray;   
			$i++;
		}										
	}				   		 
 	echo json_encode($registerDate);
}
?>