<?php

//if (count(get_included_files()) == 0){

//include 'connections/customPDO.php';

//}



class Insurance{



	function Insurance($local)

	{

		# code...

		$this->mysqllocal=$local;

	}



	function insList()

	{

		# code...

		$ins=$this->mysqllocal->selectData("SELECT * FROM insurance_company WHERE status='Active'");

		if ($ins==false) {

			# code...

			$data = array(

                "STATUSCODE"=>"888",

                "STATUSMSG"=>"Sorry, Please No Data Found"

            );

		}else{

            $data = array(

                "STATUSCODE"=>"000",

                "STATUSMSG"=>"Results Found"

            );

            foreach ($ins as $key ) {

            	# code...

            	$j["INS_COMPANY"]=$key["company_name"];

            	$j["INS_CODE"]=$key["company_code"];

				$w[]=$j;

            }

          

           $data["INS_DETAILS"]=$w;



		}



		return $data;

	}

}



