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

     $branch=$_SESSION['branch'];

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


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

.tdStyle{border-bottom:1px solid lightgray;}
.thStyle{background-color:#00AFEF;color:white;}

</style>  
  </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">

            <a href="<?php echo $_SESSION['dashboard'];?>">Dashboard </a> &nbsp; <i style="" class="fa fa-angle-double-right"></i>  &nbsp; 
              
          Online Staff List
              <br><br>
              
          <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>
    <br>

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


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


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

      

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


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

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


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


            <div class="alert alert-danger" id="msg">
             <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
              <strong>Warning!</strong> You cannot add duplicated record, Please change name or password!
            </div>

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

 
 
  <h3>Online Staff List</h3>


<input type="hidden" value="<?php echo $_REQUEST['class_id']; ?>" name="class_id" />
<input type="hidden" value="<?php echo $_REQUEST['section']; ?>" name="section" />


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

<table id="listofstudents" class="table table-striped table-bordered" style="width:100%">
        <thead>
            <tr>

                <th width="5%">S.No</th>
                <th width="20%">Name</th>
                <th width="12%">Designation</th>
                <th width="15%">Cell </th>
                <th width="20%">Last Login </th>
                <th width="20%">Last Logout </th>
   
            </tr>
        </thead>
        <tbody>


   
     
     <?php 

     $count=1;
      foreach($WorkAssignListings as $WorkAssignListVal)
      { 

        $m->where("designation_id", $WorkAssignListVal['designation_id']);
        $designation=$m->get("eduportal_designation_config");

      ?>

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

<td>

  <!-- making a link   -->
<a style="padding: 0px 5px; font-size:14px;"  href="emp_details.php?<?php echo session_id().session_id().session_id().session_id().session_id(); ?>&emp=<?php echo $WorkAssignListVal['user_id'];?>" style="cursor:pointer;">

      <?php if($WorkAssignListVal['attach_image']!=NULL){?>

        <img style="border-radius:50%;height:35px;with:35px;" src="<?php echo DOMAIN;?>Production/staff_pics/<?php echo $WorkAssignListVal['attach_image'];?>"  />
      <?php }else {?>

        <img style="border-radius:50%;height:35px;with:35px;" src="images/student.png" />

      <?php }?>
      
       &nbsp;&nbsp; <?php echo $WorkAssignListVal['user_fname'];?>
</a>
                   
                   
</td>

      <td> <?php echo $designation[0]['designation_name'];?> </td>
      <td style="text-align:center;"> <?php echo $WorkAssignListVal['cell_no'];?> </td>
      <td> 

      <?php echo date("d-M-Y",strtotime($WorkAssignListVal['lastlogin_date']))." ".$WorkAssignListVal['lastlogin_time'];?> </td>

    
      <td> <?php echo date("d-M-Y",strtotime($WorkAssignListVal['lastlogout_date']))." ".$WorkAssignListVal['lastlogout_time'];?> </td>
      

</tr>


<?php
} ?>



           
            
           
        </tbody>
        
    </table>

  </div>

  

    <br><br>


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

           
          </div>
        </div>

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

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

  <script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
  <script src="https://cdn.ckeditor.com/4.12.1/standard/ckeditor.js"></script>
   <!-- jQuery -->
    <script src="js/ajax_functions.js"></script> 
  </body>
</html>
