<?php
session_start();
require_once '../utils/errorhandler.php';
require_once '../utils/response.php';
require_once '../model/dbclass.php';
require_once '../model/model.php';
require_once '../model/organisationinfo.php';

$organisation = new OrganisationInfo();
//$status = (isset($_POST["status"]) && $_POST["status"] !== "") ? $_POST["status"] : "ACCEPTED";
$pageno = $_POST["pageno"] > 0 ? $_POST["pageno"] : 1;
$limit = 1;

$query = "companyname NOT LIKE '-'";
$result = $organisation->retrieveOrganisationByQuery($query, $pageno, $limit);

if($result){
	echo success($result,200, "Successful" ,"Successful");
}else{
	echo badRequest(204, "Not successful");
}


//echo $result;
?>