<?php class EMP_Master
	{
 		public function EMP_Master()  
		{
		 
		}
		   function Emp_shift($title,$seldata)
		   { 
 					global $db;
					$ClientSQL=DB_query(" Select id , site,shift_for,shift_category  from shift_master where  CompanyId='".$_SESSION['ACGCompanyId']."' ",$db);		
					if(!$ClientSQL)
					{
					   die('Error.'.DB_error_msg($db));
					}
  					echo "<select name='".$title."' style='width:100%' >";
					echo "<option value='000'>--Select Shift--</option>";
					while($Row=DB_fetch_array($ClientSQL))
					{
					   $p='';
					   if($Row['id']==$seldata)
					   $p='selected';
					   $locname=DB_fetch_array(DB_query("Select locationname from locations where loccode='".$Row['site']."'",$db));
					   
					  echo "<option value='". $Row['id']."' $p >".$locname['locationname'].' - '.$Row['shift_for']."(".$Row['shift_category'].")"."</option>";
					}
					echo "</select>";
			}
	
	}
	
	$Class_EMP=new EMP_Master();
	?>
