<?php include("parent/callMe.php"); ?>
<?php  include("sessioncheck.php"); ?>
<?php

$branch=$brid;

   $m->where("status", '0');
   $m->where("branch_id", $_SESSION['branch']);
   $m->orderBy("user_id", 'desc');
   $WorkAssignListings = $m->get("edu_user_config");

?>


<!DOCTYPE html>
<html lang="en">
  <head>
    
    <title>Update Staff Salary | EduPortal</title>
    <?php include('RootMe/css_links.php');?>


   
  </head>
  

  <body class="nav-md">
    <div class="container body">
      <div class="main_container">
        <div class="col-md-3 left_col">
     
            <?php include('RootMe/sidebar.php');?>

              <?php include('RootMe/header.php');?>
     
        <!-- page content -->
          <div class="right_col" role="main">
          <div class="" style="background-color: white;">
           
  <section class="add_sub_agent" id="table_sub_agent">
  <div class="container">

 <div class="" style="margin-top:10px;">

     
      <div class="clearfix"></div>
    </div>
    <br>

     
          
          
          <?php  if(isset($_SESSION['updateStaffSalary'])){?>


            <div class="alert alert-success" id="msg">
             <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
              <strong>Success!</strong> Salary updated successfully...
            </div>

          <?php  unset($_SESSION['updateStaffSalary']); }?>

      
<div style="overflow-x:auto;">

<form class="form-style-7" action="<?php echo DOMAIN.AgentDirectory;?>parent/InsertMe.php" method="post"  onSubmit="return student_check();"  enctype="multipart/form-data">


  <input type="hidden" name="action" value="SaveStaffUpdateSalary">

  <input type="hidden" id="class_id"  name="class_id" value="<?php echo $_GET['class_id']; ?>" />
  <input type="hidden" id="session"  name="session" value="<?php echo $_GET['session']; ?>" />
  
       



        <div class="col-md-1 pull-right" style="margin-bottom:1%;">
              <input type="submit" name="submit" class="pull-right btn btn-primary"  value="Save Salary Update"  />
        </div>

 



 
    <table data-page-length='100' class="table table-striped table-bordered" style="width:100%">
          
          <thead>
            <tr>
                <th width="5%">S.No</th>
                <th width="15%">Name</th>
                <th width="8%">Baic Salary</th>
                <th width="8%">Travelling Allowance</th>
                <th width="8%">Reimbursement Allowance</th>
                <th width="8%">Other Allowance</th>
                
  
            </tr>
        </thead>
        <tbody>
   
     
     <?php $count=1;

      foreach($WorkAssignListings as $WorkAssignListVal)
      { 
        
      	  $m->where("student_id", $WorkAssignListVal['student_id']);
          $m->where("session_id", $_REQUEST['session']);

          $m->where("class_id", $_REQUEST['class_id']);
		  $m->where("branch_id", $_SESSION['branch']);		  
          $fees=$m->get("eduportal_student_fee_structure");
        
	        //print_r($fees);
	       $show_fee=0;
	       $misc_fee=0;

        if(count($fees)>0){
         
         $show_fee=$fees[0]['std_tution_fee'];
         $misc_fee=$fees[0]['std_misc_fee'];
        }else {

         $m->where("class_id", $WorkAssignListVal['class_id']);
         $fees1=$m->get("eduportal_class_fee_details");

         $show_fee=$fees1[0]['tution_fee'];
         $misc_fee=$fees1[0]['misc_fee'];


        }



       
       $id=$WorkAssignListVal['user_id'];  

    
   

      ?>

    <tr>
              <td style="text-align:center;"> <?php echo $count; $count+=1;?> </td>
              <td>

                 <input name="staff[]" id="staff[]" type="hidden" value="<?php echo $WorkAssignListVal['user_id'];?>">
                 <?php echo $WorkAssignListVal['user_fname'];?>

               </td>        

                         

              <td> <input type="text" class="form-control" name="user_salary[]" value="<?php echo $WorkAssignListVal['user_salary'];?>"> </td>

              <td><input type="text" class="form-control" name="emp_trav[]" value="<?php echo $WorkAssignListVal['emp_trav'];?>"></td>

              <td><input type="text" class="form-control" name="emp_reimbersement[]" value="<?php echo $WorkAssignListVal['emp_reimbersement'];?>"></td>

              <td> <input type="text"  class="form-control"name="emp_other[]"  value="<?php echo $WorkAssignListVal['emp_other'];?>" /> </td>           
              
             
          </tr>


              <?php
      } ?>



           
            
           
        </tbody>
        
    </table>
 

</form>
</div>
    <br><br>


  </div>
  <div class="clearfix"></div>
</section>          
    

           
          </div>
        </div>

            </div>
          </div>
        </div>
        <!-- /page content -->
  

    
  <?php include('RootMe/js_linksscript.php');?>
  </body>
</html>
