<?php $PageSecurity = 2;
include('includes/DefineSuppTransClass.php');
include('includes/DefinePOClass.php');
include('includes/SQL_CommonFunctions.inc');
include('includes/session.inc');
include('includes/function_lib.php');
?>
<form>
    <table>
        <tr>
             <th>Department</th>
            <td>
                <select name="" onchange="javascript:getdesignation(this);">
                    <option>Select</option>
                <?php $dept1=DB_query("select* from deptmaster where CompanyId='".$_SESSION['ACGCompanyId']."' ",$db); 
            while($dept=DB_fetch_assoc($dept1)){ ?>
        <option value="<?php echo $dept['id'] ?>"><?php echo $dept['deptname'] ?></option>
           <?php  }
            ?></select></td>
             <th>Designation</th>
            <td><select>
                    <option>Select</option>
                        <?php $desig1=DB_query("select* from desigmaster where  CompanyId='".$_SESSION['ACGCompanyId']."' ",$db); 
            while($desig=DB_fetch_assoc($desig1)){ ?>
        <option value="<?php echo $desig['id'] ?>"><?php echo $desig['designame'] ?></option>
           <?php  }
            ?></select></td>
            <th>Code</th>
            <td><input type="text" value="" name="emp" id="emp"></td>
        </tr>
    </table>
    
</form>
<table width="100%">
    <tr bgcolor="#d4d4d4">
	 <td class="tabledata"><strong>Select</strong></td>
         <td class="tabledata"><strong>Employee Code</strong></td>
         <td class="tabledata"><strong>Employee Name</strong></td>
         <td class="tabledata"><strong>Department</strong></td>		 
         <td class="tabledata"><strong>Designation</strong></td>
</tr>
<?php
$empsql=DB_query("select* from empmaster where CompanyId='".$_SESSION['ACGCompanyId']."' ",$db);
$i=1;
while($empres=DB_fetch_assoc($empsql)){
    $desig=DB_fetch_assoc(DB_query("select* from desigmaster where id='".$empres['designation']."' ",$db)); 
    $dept=DB_fetch_assoc(DB_query("select* from deptmaster where id='".$empres['department']."' ",$db));
?>
<tr bgcolor="#c1c1c1">
	<td><input type="checkbox" name="row_id[<?php echo $i;?>]" id="row_id_<?php echo $i;?>" value="" onclick="javascript:move_employee_data('<?php echo $i;?>','<?php echo $empres['id'] ?>','<?php echo $empres['emp_code'] ?>','<?php echo $empres['emp_name'] ?>','<?php echo $desig['designame'] ?>','<?php echo $dept['deptname'] ?>')"/></td>
	<td><strong><?php echo $empres['emp_code'];?></strong></td>
	<td><?php echo $empres['emp_name'];?></td>
	<td><?php echo $desig['designame']; ?></td>
	<td><?php echo $dept['deptname']; ?></td>
	
</tr>
	<?php  $i++;} ?>
 </table>

<script>
    
    
</script>
