<?php

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

//include 'connections/customPDO.php';

//}



// $mysqlpo=new customPDO('rxapp_healthac','sy^HM-TKZ%RE','rxapp_clientapi','64.150.189.33');

class Policy{



private $mysqlpol;

// function Policy($con)

// {

// 	# code...

// 	// $this->mysqlpol=$con;

	

// }



function checkAPIExpiry($apikey,$provider_id)

{

	# code...

	// $provider_id=$this->mysqlpol->quote($provider_id);

	// $apikey=$this->mysqlpol->quote($apikey);

	// $ins=$this->mysqlpol->selectData("SELECT * FROM activate_clients WHERE provider_id=$provider_id AND apikey=$apikey");

	$ins = true;

	if ($ins==false) {

		# code...

		$data = array(

                "STATUSCODE"=>"888",

                "STATUSMSG"=>"Sorry, Please Contact RX for Your API KEY"

            );

	}else{



		// $expiry=$ins[0]["endDate"];

		// $today=date("Y-m-d");

		// if ($today>$expiry) {

		// 	# code...

		// 	$data = array(

        //         "STATUSCODE"=>"888",

        //         "STATUSMSG"=>"Sorry,Your API KEY Has expired,Please Contact RX for Renewal"

        //     );

		// }else{

				$data = array(

                "STATUSCODE"=>"777",

                "STATUSMSG"=>"ok"

            	);

		// }

	}



return $data;

}







}









