
<link rel="stylesheet" href="css/new_mxerp.css">
<div class="body_contain">
<div class="tab_div"> 
<h1>Job Criteria Detail Master</h1>	
<p align="left"><a href="index.php?route=HRModule/Master/job_criteria_detail_master&modid=<?php echo $_REQUEST['modid'] ?>&frmid=<?php echo $_REQUEST['frmid'] ?>"><button type="button" >Add New</button></a></p>
<table width="100%" cellpadding="3" cellspacing="0" border="1" style="border:#808080 1px solid; border-collapse:collapse;">
<tr>
    <th width="4%"><strong>S. No.</strong></th>
	<th><strong>Branch</strong></th>
	<th width="18%"><strong>Desigantion</strong></th>
	<th width="18%"><strong>Department</strong></th>
    <th width="10%"><strong>Job Type</strong></th>
	<!--<td class="tabledata">
		<table width="50%" cellpadding="3" cellspacing="0">
		<tr>
			<td colspan="2" style="text-align:center;"><strong>Action</strong></td>
		</tr>
		<tr>
			<td style="text-align:center;" class="tabledata1">Edit</td>
			<td style="text-align:center;" class="tabledata1">Delete</td>
		</tr>
		</table>
	</td>-->
</tr>
<?php $i=0; 
$branch="";
$designation="";
$SQL=DB_query("SELECT * FROM hr_criteria_form_table where companyid='".$_SESSION['ACGCompanyId']."'",$db);
if(DB_num_rows($SQL)>0){
while($GetRec=DB_fetch_array($SQL)) { 
   
   $join =DB_fetch_array(DB_query("SELECT b.branch,b.designation,b.job_type FROM hr_criteria_form_table a, hr_job_criteria b, hr_job_criteria_details c WHERE a.parameter_id=c.id AND b.id=c.masterid AND a.parameter_id='".$GetRec['parameter_id']."' ",$db));
if($branch!=$join['branch'] && $designation!=$join['designation']){
$branch=$join['branch'];
$designation=$join['designation'];
    ?>
<tr bgcolor="#fff">
	<td><?php echo $i+1; ?></td>
	<td><?php echo $sitename=$s->GetFieldValue('locations',"loccode='".$join['branch']."'",'locationname'); ?></td>
    <td><?php if($join['designation']!="0"){ echo $s->GetFieldValue('desigmaster',"id='".$join['designation']."'",'designame'); } else{ echo "All" ;} ?></td>
    <td><?php if($join['designation']!="0"){ $deptid=$s->GetFieldValue('desigmaster',"id='".$join['designation']."'",'mst_departmentid'); echo $s->GetFieldValue('deptmaster',"id='".$deptid."'",'deptname'); } else{ echo "All" ;} ?></td>
    <td><?php if($join['job_type']=="p") echo "Permanent"; else echo "Contract"; ?></td>
	<!--<td>
		<table width="50%" cellpadding="3" cellspacing="0">
		<tr>
			<td style="text-align:center;">
			<a href="index.php?route=HRModule/ESI_Master<?php echo $rurl; ?>&action=Edit&EID=<?php echo $GetRec['id']; ?>"><img src="images/icon_edit.gif"></a></td>
			<td style="text-align:center;">
			<a href="index.php?route=HRModule/ESI_Master<?php echo $rurl; ?>&action=Delete&DELID=<?php echo $GetRec['id']; ?>"><img src="images/Icon_Delete3.gif"></a></td>
		</tr>
		</table>
	</td>-->
</tr>
<?php $i++; } }}else{?>
<tr>
    <td colspan="5">No Result Found.</td>
</tr>
<?php } ?>
</table>
</div>
</div>