
<link rel="stylesheet" href="css/new_mxerp.css">
<div class="body_contain">
<div class="tab_div"> 
<h1>Profile Master</h1>	
<p align="left"><a href="index.php?route=HRModule/Master/profile_master&modid=<?php echo $_REQUEST['modid'] ?>&frmid=<?php echo $_REQUEST['frmid'] ?>"><input type="button" value="Add New" class="search"></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="12%"><strong>Profile Code</strong></th>
	<th width="18%"><strong>Designation</strong></th>
    <th width="18%"><strong>Department</strong></th>
    <th width="10%"><strong>Job Type</strong></th>
    <th width="8%"><strong>Date</strong></th>
</tr>
<?php $i=0; $SQL=DB_query("SELECT * FROM hr_profile_master where companyid='".$_SESSION['ACGCompanyId']."'",$db);
if(DB_num_rows($SQL)>0){
while($GetRec=DB_fetch_array($SQL)) { ?>
<tr bgcolor="#fff">
	<td><?php echo $i+1; ?></td>
	<td><?php echo $sitename=$s->GetFieldValue('locations',"loccode='".$GetRec['branch']."'",'locationname'); ?></td>
    <td><?php echo $GetRec['profile_code']; ?></td>
    <td><?php $desig= DB_fetch_assoc(DB_query("select * from desigmaster where id='".$GetRec['designation']."' ",$db)); echo $desig['designame']; ?></td>
    <td><?php $dept= DB_fetch_assoc(DB_query("select * from deptmaster where id='".$GetRec['department']."' ",$db)); echo $dept['deptname']; ?></td>
	<td><?php if($GetRec['job_type']=="p"){ echo "Permanent"; } else if($GetRec['job_type']=="c"){ echo "Contract" ;} ?></td>
    <td><?php echo ConvertSQLDate($GetRec['pdate'])   ?></td>
</tr>
<?php $i++;} }else{?>
<tr>
    <td colspan="7">No Result Found.</td>
</tr>
<?php } ?>
</table>
</div>
</div>