<? include("../settings.php"); ?>
<?

    $bind = array(
        ":search1" => $_REQUEST['lastname'],
        ":search2" => $_REQUEST['papernumber'],
        ":search3" => "2"
    );
    $results = $db->select("tbl_abstract as a, tbl_country as b", "a.country_id=b.country_id AND a.registrant_lastname=:search1 AND a.abstract_number=:search2 AND a.abstract_status=:search3 AND a.abstract_deleted='0'", $bind);
    
	if (count($results)>0){
		$return = $results[0];
        $return["status"]=1;
		echo json_encode($return);
	}else{
		$return = array("status" => 0);
		echo json_encode($return);
	}
?>