<?php
	header('Access-Control-Allow-Origin: *');
	header('Access-Control-Allow-Methods: POST,GET,OPTIONS');
	header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, x-xsrf-token');
	header("Content-Type: application/json; charset=UTF-8");

	require_once('includes/initialize.php');
	
	date_default_timezone_set('Asia/Calcutta');

	if(isset($_GET['que_cat']) && !empty($_GET['que_cat'])){
		
		$que_cat = $_GET['que_cat'];
		
		$sql = "SELECT * FROM questions_set WHERE status = '1' order by id ASC Limit 10";
		$questions_set = QuestionsSet::find_by_sql($sql);
		
		if($questions_set){
			echo json_encode($questions_set) ;
		} else {
			echo json_encode([]);
		}
	} else {
		echo json_encode("ID not found.");
	}	
	
	
	

?>

