<?php
$PageSecurity = 2;
include('includes/session.inc');
$title = _('View/Search Items') ;
include('includes/SQL_CommonFunctions.inc');
include('includes/function_lib.php');

      switch ($_POST['action']) {
      	case 'updateEdit':
      		 DB_query("update emp_loan_opening set opening_year='".$_POST['forYear']."',opening='".$_POST['opening']."',advance='".$_POST['advanceOpning']."'
                    where emp_id='".$_POST['emp_id']."'",$db);
       echo "success";
      		break;

      			case 'getDesignation':
      		  $resultDesig=DB_query("select * from desigmaster where mst_departmentid='".$_POST['dept_id']."'",$db);
      		  ?>
      		  <option value="0">---Select---</option>
      		  <?php 
      		 while($rowDesig=DB_fetch_array($resultDesig))
      		 {?>
               <option value="<?php echo $rowDesig['id']; ?>"><?php echo $rowDesig['designame']; ?></option>
      		 <?php }
      		break;
      	
      	default:
      		# code...
      		break;
      }
 
      
?>