<?php $PageSecurity = 4;
include('includes/session.inc');
if($_GET['sheet_type']==1 ||$_GET['revishedsal']==1)
{
 	$emp_sql=DB_query("Select id, emp_code,emp_name,employee_type from empmaster where    emp_site='".$_GET['q']."' order by emp_name",$db);
 }
 else if($_GET['emptype']!='')
 {
 	$emp_sql=DB_query("Select id, emp_code,emp_name,employee_type from empmaster where  employee_type='".$_GET['emptype']."' and  employment_type='".$_GET['q']."'    and emp_site='".$_GET['site']."' order by emp_name",$db);
		}
 else{
 	if($_REQUEST['type']=='mysal')
	{
	//echo "Select id, emp_code,emp_name,employee_type from empmaster where   id='".$_SESSION['empcode']."'  employment_type='".$_GET['q']."'    and emp_site='".$_GET['site']."' order by emp_name";
	$emp_sql=DB_query("Select id, emp_code,emp_name,employee_type from empmaster where   id='".$_SESSION['empcode']."'  and  employment_type='".$_GET['q']."'    and emp_site='".$_GET['site']."' order by emp_name",$db);
	}

	else{
	 
  		$emp_sql=DB_query("Select id, emp_code,emp_name,employee_type from empmaster where employment_type='".$_GET['q']."' and emp_site='".$_GET['site']."' order by emp_name",$db);
		}
	
 }


if($_GET['sheet_type']==1 || $_GET['emptype']!=''){ 

?>
 <select name="empcode" id="empcode" style="width:107px"  onchange="ShowDiv(this.value,'hid_revised','revised_salary.php')">
 <?php }
 else{
 ?>
 <select name="employee_code" id="employee_code" style="width:200px" >
 <?php }?>
		<option value="All" selected="selected">--ALL--</option>
		<?php 
		
		while($emp_row=DB_fetch_array($emp_sql))
		{?>
			<option value="<?php echo $emp_row['id'];?>"<?php if($_REQUEST['employee_code']==$emp_row['id'])echo "selected";?>><?php echo $emp_row['emp_name'].' ( '.$emp_row['emp_code'].' ) ' ;?></option>
		<?php 	
		}
		?>
		
	</select>	
