<?php
require "../commonincludefiles.php";

$designation_id=Escape($_POST['designation_id']);

//$member_id=implode(',',json_decode(stripslashes($_POST['member_id'])));

$present="";

if($designation_id != ""){
	
	/*$qry = "SELECT designation_id FROM lms_designation WHERE designation_id = $designation_id ";
	$result = dbQuery($qry);
	if(dbRows($result)>0){
		$present .="designation,";
	}
	else
	{
		$present .="";
	}
	dbFreeResult($result);*/
	
	$qry1 = "SELECT lem.employee_id 
			FROM lms_employeemaster lem,lms_designation ld
			WHERE lem.company_id = '".$_SESSION["cCompany_id"]."' 
				AND lem.designation_id = ld.designation_id AND lem.designation_id = $designation_id";
	$result = dbQuery($qry1);
	if(dbRows($result)>0){
		$present .="Employee Master,";
	}
	else
	{
		$present .="";
	}
	
	dbFreeResult($result);
	
	$present = substr($present, 0, strlen($present)-1);
	
	if($present != ""){
		$present .= ".";
	}
}	
echo $present;	
?>