<?php
ob_start();
session_start();
date_default_timezone_set('asia/Kuala_Lumpur');
include "../db/connection.php";
ini_set('display_errors',0);
if(isset($_SESSION) && $_SESSION['logged']!=1){
  header("Location:https://ytyhub.com/Dashboard/Authenticate/login.php");
  die;
}
$_SESSION['global_comment']="";
$_SESSION['global_category']="";
$_SESSION['global_ename']="";
$_SESSION['global_eid']="";

if($_POST['download_excel']=='Yes')
{
  //echo "<pre>";print_r($_POST);die;
  $pdf ='<table border="1" id="">
      <thead class="thead-light">
         <tr>
            <th>S.No.</th>
            <th>Application No.</th>
            <th>Task Name</th>
            <th>Status</th>
            <th>Created Date</th>
      </tr>
      </thead>
  <tbody>';
  $queryClms= "SELECT ''''||E.EMP_GRV_APPLICATION_ID || ' ' GRIEVANCE_NUMBER,
       
       TASK_NAME,
       TASK_STATUS,
       CREATION_DATE,
       CREATED_BY,
       LAST_UPDATED_BY,
       LAST_UPDATE_DATE,
       SRNO
  FROM PRODUCTION.EMPLOYEE_GRIEVANCE_TASK E
 WHERE 1 = 1
 ORDER BY EMP_GRV_APPLICATION_ID, SRNO"; 
  $tableColmnDetails = oci_parse($dbcon, $queryClms);
  oci_execute($tableColmnDetails);
  if(count($tableColmnDetails)>0)
  {
     $sn=1;
     while($val=oci_fetch_array($tableColmnDetails))
     {
      $pdf.='<tr>
               <td>'.$val['SRNO'].'</td>
               <td>'.substr($val['GRIEVANCE_NUMBER'],2,12).'</td>
               <td>'.$val['TASK_NAME'].'</td>
               <td>';
                 if($val['TASK_STATUS']=='O')
                {
                  $pdf.='Open';
                }
                else
                {
                   $pdf.='Close';
                }

                $pdf.='</td>
               <td>'.$val['CREATION_DATE'].'</td>              
            </tr>';
     }
  }
  $pdf.='</tbody>
</table>';
   //echo"<pre>";print_r($pdf);die;
   $file_name ="task_action_item_list_".date('Y-m-d h:i:s').".xls";
   header("Content-type: application/vnd.ms-excel");
   header("Content-Disposition: attachment; filename=$file_name");
   echo $pdf;
   exit();
}
if(isset($_POST['status_by']))
  $_POST['status']=$_POST['status_by'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <title>EMPLOYEE GRIEVANCE AND REDRESSAL</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="shortcut icon" href="favicon.png" />
     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
  <link rel="stylesheet" href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.min.css">
  <link rel="stylesheet" href="https://cdn.datatables.net/1.10.24/css/dataTables.bootstrap.min.css">
  
  <link rel="stylesheet" href="css/mystyle-table.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js"></script>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  <script type="text/javascript" src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.min.js"></script>
  <script type="text/javascript" src="https://cdn.datatables.net/fixedheader/3.1.8/js/dataTables.fixedHeader.min.js"></script>
   <script src="limit.text.min.js"></script>
<script type="text/javascript" class="init">
$(document).ready(function() {
  // Setup - add a text input to each footer cell
  $('#example thead tr').clone(true).appendTo( '#example thead' );
  $('#example thead tr:eq(1) th').each( function (i) {
    var title = $(this).text();
    $(this).html( '<input type="text" placeholder="Search '+title+'" />' );

    $( 'input', this ).on( 'keyup change', function () {
      if ( table.column(i).search() !== this.value ) {
        table
          .column(i)
          .search( this.value )
          .draw();
      }
    } );
  } );

  var table = $('#example').DataTable( {
    orderCellsTop: true,
    fixedHeader: true
  } );
} );
</script>
<!--  <script>
  $(function() {
  $(".table-wrap").each(function() {
    var nmtTable = $(this);
    var nmtHeadRow = nmtTable.find("thead tr");
    nmtTable.find("tbody tr").each(function() {
      var curRow = $(this);
      for (var i = 0; i < curRow.find("td").length; i++) {
        var rowSelector = "td:eq(" + i + ")";
        var headSelector = "th:eq(" + i + ")";
        curRow.find(rowSelector).attr('data-title', nmtHeadRow.find(headSelector).text());
      }
    });
  });
});
  </script>-->
<script src="js/limit.text.min.js"></script>
<script src="js/tablefix.js"></script>
<script src="js/floatingscroll.js"></script>
<style>
div.dataTables_wrapper div.dataTables_length label {
    margin-top: -175px !important;
}
div.dataTables_wrapper div.dataTables_filter label {
  margin-top: -175px !important;
}
</style>
</head>
<body>

<header id="myHeader">
  <div class="container-fluid">
   <div class="col-md-12 col-sm-12 col-xs-12">
   <img src="medi-logo1.png" alt="YTY"><span>EMPLOYEE GRIEVANCE AND REDRESSAL</span>
   </div>
  </div>
</header>
 <div class="mydesignform"> 
 <div class="col-lg-12 col-12 formheading">EMPLOYEE GRIEVANCE SUMMARY (ADMIN)</div>
 </div>
 <div class="container-fluid mydesignform"> 
   <div class="row">
    
     <div class="col-sm-12 col-xs-12"  style="margin-top: 40px;">
                    <?php
          if($_REQUEST['msg'])
          {
            ?>
                        <div class="alert alert-success" id="success-alert">
                          <button type="button" class="close" data-dismiss="alert">x</button>
                          <strong><?php echo $_REQUEST['msg'];?></strong></a>
                        </div>  
          <?php
          }
          ?>
          </div>
   </div>
   <style>
    .closeBtn {
        background: #66FF66;
        padding: 1px 8px 3px;
        border-radius: 45px;
        color: #000;
        font-size: 11px;
        margin-left: 15px;
    }
    .openBtn {
        background: #FF6666;
        padding: 1px 8px 3px;
        border-radius: 45px;
        color: #000;
        font-size: 11px;
        margin-left: 15px;
    }
    .assignBtn {
        background: #99FFFF;
        padding: 1px 8px 3px;
        border-radius: 45px;
        color: #000;
        font-size: 11px;
        margin-left: 15px;
    }
    .openBtnAll {
        background: #66b3f1;
        padding: 1px 8px 3px;
        border-radius: 45px;
        color: #000;
        font-size: 11px;
        margin-left: 15px;
    }

    .respondedBtn {
        background: #99FFCC;
        padding: 1px 8px 3px;
        border-radius: 45px;
        color: #000;
        font-size: 11px;
        margin-left: 15px;
    }
  .mydesignform  .open{
    background: #ff5722 !important;
    padding: 5px 7px;
    border-radius: 50px;
    font-size: 3px;
    position: relative;
    top: -2px;
    margin-left: 5px;
  }
  .mydesignform .assign {
    background: #99FFFF;
    padding: 5px 7px;
    border-radius: 50px;
    font-size: 3px;
    position: relative;
    top: -2px;
    margin-left: 5px;
  }
  .mydesignform .respond {
    background: #99FFCC;
    padding: 5px 7px;
    border-radius: 50px;
    font-size: 3px;
    position: relative;
    top: -2px;
    margin-left: 5px;
  }
    /* Tooltip container */
  .tooltip1 {
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted black; /* If you want dots under the hoverable text */
  }
  
  /* Tooltip text */
  .tooltip1 .tooltiptext1 {
    visibility: hidden;
    width: auto;
    background-color: black;
    color: #fff;
    text-align: center;
    padding: 5px 13px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    left: -75px;
    top: -32px;
  }
  
  /* Show the tooltip text when you mouse over the tooltip container */
  .tooltip1:hover .tooltiptext1 {
    visibility: visible;
  }
  .mydesignform .indicatorbg1 {
    background: #0e4b80;
    padding: 6px 15px 6px;
    border-radius: 45px;
    color: aliceblue;
    /* font-size: 11px; */
    margin-left: 8px;
    margin-bottom: 10px;
  }
   </style>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  <link rel="stylesheet" href="/resources/demos/style.css">
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  <script>
  $( function() {
    $( "#datepicker" ).datepicker({ dateFormat: 'dd-MM-yy' });
  } );
  $( function() {
    $( "#datepicker1" ).datepicker({ dateFormat: 'dd-MM-yy' });
  } );
  </script>

   <div class="row">
      
      <div class="section1bg">
      <div style="top: 25px;"><a href="javascript:void(0)" onclick="window.open('../phprunner/empgrv/yty_vw_employee_grievance_list.php','targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=SomeSize,height=SomeSize'); return false;" title="Click to download excel/pdf/print"><button type="button" class="indicatorbg1" style="text-align:end;"><i class="fa fa-download" style="color: #fff;font-size: large;" aria-hidden="true"></i></button></a>
      <a href="javascript:void(0)" title="Action item list"><button type="button"  class="indicatorbg1" title="Action item list" style="text-align:end;"  onclick="return downloadExecl()"><i class="fa fa-file-excel-o" title="Action item list" style="color: #fff;font-size: large;" aria-hidden="true"></i></button></a>
      </div>

      <!--heading Start-->  
      <!--heading End-->
      <!--table Start-->
     <div class="table-wrap">
     <form action="" method="POST" id="date_range">
     <table style="margin-bottom:5px">
          <tr>
            <td>
            <div style="text-align:left"><b>Quick Filters-</b>
            <button type="button" onclick="return showStatusWiseRecord('')" class="openBtnAll tooltip1" style="text-align:end; <?php if($_POST['status']=='' || !isset($_POST['status'])) echo 'box-shadow: 1px 1px 17px #000; border: 3px solid #000;';?>">All<span class="tooltiptext1">All records</span></button>
            <button type="button" onclick="return showStatusWiseRecord('0')" class="openBtn tooltip1" style="text-align:end;<?php if($_POST['status']=='0') echo 'box-shadow: 1px 1px 17px #000; border: 3px solid #000;';?>">Open<span class="tooltiptext1">Grievance received but not yet assigned to PIC</span></button>
            <button type="button" onclick="return showStatusWiseRecord('2')" class="assignBtn tooltip1" style="text-align:end;<?php if($_POST['status']=='2') echo 'box-shadow: 1px 1px 17px #000; border: 3px solid #000;';?>">Assigned<span class="tooltiptext1">Grievance has been assigned to PIC</span></button>
            <button type="button" onclick="return showStatusWiseRecord('3')" class="respondedBtn tooltip1" style="text-align:end;<?php if($_POST['status']=='3') echo 'box-shadow: 1px 1px 17px #000; border: 3px solid #000;';?>">PIC Responded<span class="tooltiptext1">Response has been received from PIC on the grievance</span></button>
            <button type="button" onclick="return showStatusWiseRecord('1')" class="closeBtn tooltip1" style="text-align:end;<?php if($_POST['status']=='1') echo 'box-shadow: 1px 1px 17px #000; border: 3px solid #000;' ;?>">Close<span class="tooltiptext1">Grievance has been finally closed</span></button>
            &nbsp;&nbsp;&nbsp;&nbsp;<input type="text" readonly placeholder="From date" required id="datepicker" name="from_date" value="<?php if($_POST['from_date']) echo $_POST['from_date'];?>" />
            <input type="hidden" name="status_by" id="status_by" value="<?php if($_POST['status_by']) echo $_POST['status_by']; else echo $_POST['status'];?>" />
            <input type="text" name="to_date" id="datepicker1" required readonly placeholder="To date" value="<?php if($_POST['to_date']) echo $_POST['to_date'];?>" />
            <input type="submit" onclick="return submitdaterange()" class="openBtnAll tooltip1" style="text-align:end;" value="Search">
            </div> 
            </td>
          </tr>
    </table>
    </form>
    <script>
    function submitdaterange()
    {
      if(document.getElementById('datepicker').value=="") {
        document.getElementById('datepicker').focus();
        alert('From date is required.');
        return false;
      }
      if(document.getElementById('datepicker1').value=="") {
        document.getElementById('datepicker1').focus();
        alert('To date is required.');
        return false;
      }
      document.getElementById('date_range').submit();
    }
    </script>
     <form action="" method="post" enctype="multipart/form-data" id="submit_form">
          <table class="table align-items-center table-flush" id="example">
            <thead class="thead-light">
                <tr>
                  <th>Action</th>
                  <th>APPLICATION ID</th>
                  <th>STATUS</th>
                  <th>ASSIGN TO</th>
                  <th>EMPLOYEE NAME</th>
                  <th>DATE FORM SUBMITTED</th>
                  <th>POSITION</th>
                  <th>LOCATION OF EVENT</th>
                  <th>WITNESSES</th>
                  <th>ACCOUNT OF EVENT</th>
                  <th>VIOLATIONS</th>
                  <th>HANDLED BY GRIEVANCE ADMINISTRATOR TEAM</th>
                  <th>ADDITONAL INFO</th>
                  <th>CATEGORY</th>
                  <th>RECEIVED BY</th>
                  <th>RECEIVED DATE</th>
                  <th>ADMIN REMARK</th>
                  <th>CLOSURE REMARK</th>
                  <th>CLOSURE DATE</th>
                </tr>
            </thead>
            <tbody>
            <?php
            $dateRangeWhereClause="";
            if($_POST['from_date']!="" && $_POST['to_date']!=""){ 
               $dateRangeWhereClause="  AND SUBMISSION_DATE BETWEEN '".$_POST['from_date']."' AND '".$_POST['to_date']."' ";
               $dateRangeWhereClause.=($_POST['status']) ? " AND  STATUS_OF_GRIEVANCE='".$_POST['status']."'" : "";
               if($_POST['status']=='0')
                 $dateRangeWhereClause.=" AND STATUS_OF_GRIEVANCE='".$_POST['status']."'";
   
            }
            else{
                $statusWhereClause=($_POST['status']) ? " AND STATUS_OF_GRIEVANCE='".$_POST['status']."'" : "";
                if($_POST['status']=='0')
                  $statusWhereClause=" AND STATUS_OF_GRIEVANCE='".$_POST['status']."'";  
              }
              $queryClms= "SELECT EG.*,ur.EMPLOYEE_NAME as emp_name FROM EMPLOYEE_GRIEVANCE EG LEFT JOIN YTY_VW_EMP_INFO UR ON eg.ASSIGN_TO_EMPLOYEE_GRV=ur.emp_main_id  WHERE NVL(EMP_GRV_FLAG,'N') = 'N' $statusWhereClause $dateRangeWhereClause ORDER BY SUBSTR(eg.APPLICATION_ID,7,6) DESC"; 
            $tableColmnDetails = oci_parse($dbcon, $queryClms);
            oci_execute($tableColmnDetails);
            if(count($tableColmnDetails)>0)
            {
                $sn=1;
                while($val=oci_fetch_array($tableColmnDetails))
                {
          // Lengens---Status 0 means open,1 means close, 2 means assigned,3 means PIC Responded----
                  ?>
                            <tr style="background:<?php if($val['STATUS_OF_GRIEVANCE']==0) echo '#FF6666';else if($val['STATUS_OF_GRIEVANCE']==1) echo '#66FF66'; else if($val['STATUS_OF_GRIEVANCE']==2) echo '#99FFFF'; else if($val['STATUS_OF_GRIEVANCE']==3) echo '#99FFCC'; else "";?>">
                              <td><a href="javascript:void(0)" onclick="return submitForm('<?php echo $val['EMP_ID'];?>','<?php echo $val['APPLICATION_ID'];?>')"><i class="fa fa-edit" style="font-size:24px"></i></a></td>
                              <td <?php if($val['EMP_NAME']=="") { ?>data-toggle="tooltip" data-placement="bottom" title="Not assigned!" <?php } ?>><?php echo $val['APPLICATION_ID'];?></td>
                              <td><strong class="indicatorbg"><?php if($val['STATUS_OF_GRIEVANCE']==1) echo 'Close'; else if($val['STATUS_OF_GRIEVANCE']==0) echo 'Open'; else if($val['STATUS_OF_GRIEVANCE']==2) echo 'Assigned'; else if($val['STATUS_OF_GRIEVANCE']==3) echo 'PIC Responded';?> <strong class="<?php if($val['STATUS_OF_GRIEVANCE']==1) echo 'close'; else if($val['STATUS_OF_GRIEVANCE']==0) echo 'open'; else if($val['STATUS_OF_GRIEVANCE']==2) echo 'assign'; else if($val['STATUS_OF_GRIEVANCE']==3) echo 'respond';?>"></strong></strong></td>
                              <td><?php echo $val['EMP_NAME'];?></td>
                              <td><?php echo $val['EMPLOYEE_NAME'];?></td>
                              <td><?php echo $val['SUBMISSION_DATE'];?></td>
                              <td><?php echo $val['POSITION'];?></td>
                              <td>
                                <div  class="locationofevent" style="display:contents;"><?php echo $val['GRIEVANCE_DETAILS_HR'];?></div> 
                                <div id="locationEvent_<?php echo $val['APPLICATION_ID'];?>" style="display:none"><?php echo $val['GRIEVANCE_DETAILS_HR'];?></div> 
                                <button type="button" class="textlimitbtn" onclick="return openPopup('locationEvent_<?php echo $val['APPLICATION_ID'];?>');">Read More</button>
                              </td>
                              <td>
                                <div  class="locationofevent" style="display:contents;"><?php echo $val['WITNESS_NAME_HR'];?></div> 
                                <div id="WITNESS_NAME_HR_<?php echo $val['APPLICATION_ID'];?>" style="display:none"><?php echo $val['WITNESS_NAME_HR'];?></div> 
                                <button type="button" class="textlimitbtn" onclick="return openPopup('WITNESS_NAME_HR_<?php echo $val['APPLICATION_ID'];?>');">Read More</button>
                              </td>
                              <td>
                                <div  class="locationofevent" style="display:contents;"><?php echo $val['ACCOUNT_OF_EVENT_HR'];?></div> 
                                <div id="ACCOUNT_OF_EVENT_HR_<?php echo $val['APPLICATION_ID'];?>" style="display:none"><?php echo $val['ACCOUNT_OF_EVENT_HR'];?></div> 
                                <button type="button" class="textlimitbtn" onclick="return openPopup('ACCOUNT_OF_EVENT_HR_<?php echo $val['APPLICATION_ID'];?>');">Read More</button>
                              </td>
                              <td>
                                <div  class="locationofevent" style="display:contents;"><?php echo $val['VIOLATIONS_HR'];?></div> 
                                <div id="VIOLATIONS_HR_<?php echo $val['APPLICATION_ID'];?>" style="display:none"><?php echo $val['VIOLATIONS_HR'];?></div> 
                                <button type="button" class="textlimitbtn" onclick="return openPopup('VIOLATIONS_HR_<?php echo $val['APPLICATION_ID'];?>');">Read More</button>
                              </td>
                              <td>
                              <div  class="locationofevent" style="display:contents;"><?php echo $val['HANDLED_BY'];?></div> 
                                <div id="HANDLED_BY_<?php echo $val['APPLICATION_ID'];?>" style="display:none"><?php echo $val['HANDLED_BY'];?></div> 
                                <button type="button" class="textlimitbtn" onclick="return openPopup('HANDLED_BY_<?php echo $val['APPLICATION_ID'];?>');">Read More</button>
                              </td>
                              <td>
                              <div  class="locationofevent" style="display:contents;"><?php echo $val['ADDITIONAL_INFO'];?></div> 
                                  <button type="button" class="textlimitbtn" data-toggle="modal" data-target="#ADDITIONAL_INFO<?php echo $val['APPLICATION_ID'];?>">Read More</button>
                                   <!-- Modal -->
                                  <div class="modal fade" id="ADDITIONAL_INFO<?php echo $val['APPLICATION_ID'];?>" role="dialog">
                                    <div class="modal-dialog">
                                    
                                      <!-- Modal content-->
                                      <div class="modal-content">
                                        <div class="modal-header">
                                          <button type="button" class="close" data-dismiss="modal">&times;</button>
                                          <h4 class="modal-title">ADDITIONAL INFO</h4>
                                        </div>
                                        <div class="modal-body">
                                          <p style="white-space: break-spaces;"><?php echo $val['ADDITIONAL_INFO'];?></p>
                                        </div>      
                                      </div>                                    
                                    </div>
                                  </div> 
                              </td>
                              <td><?php echo $val['CATEGORY_GRV'];?></td>
                              <td><?php echo $val['RECEIVED_BY'];?></td>
                              <td><?php echo $val['RECEIVED_DATE'];?></td>
                              <td>
                              <div  class="locationofevent" style="display:contents;"><?php echo $val['ADMIN_COMMENT_GRV'];?></div> 
                                <div id="ADMIN_COMMENT_GRV_<?php echo $val['APPLICATION_ID'];?>" style="display:none"><?php echo $val['ADMIN_COMMENT_GRV'];?></div> 
                                <button type="button" class="textlimitbtn" onclick="return openPopup('ADMIN_COMMENT_GRV_<?php echo $val['APPLICATION_ID'];?>');">Read More</button>
                              </td>
                              </td>
                              <td>
                              <div  class="locationofevent" style="display:contents;"><?php echo $val['CLOSURE_ACTIONS_REMARK_GRV'];?></div> 
                                <div id="CLOSURE_ACTIONS_REMARK_GRV_<?php echo $val['APPLICATION_ID'];?>" style="display:none"><?php echo $val['CLOSURE_ACTIONS_REMARK_GRV'];?></div> 
                                <button type="button" class="textlimitbtn" onclick="return openPopup('CLOSURE_ACTIONS_REMARK_GRV_<?php echo $val['APPLICATION_ID'];?>');">Read More</button>
                              </td>
                              <td><?php echo $val['CLOSE_DATE_GRV'];?></td>
                            </tr>
                  <?php
                }
            }
            else
            {
            ?>
                        <tr>
                            <td style="color:red; font-weight:bold" colspan="14">No record found.</td>
                        </tr>
            <?php
            }
            ?>
            </tbody>
          </table>
      </form>
      <!--table End--> 
     </div>      
      <!--Form Column Start-->     
     </div>   
      </form>
     </div>  
  </div>
  <form action="yty-grievance-moderator-edit.php" method="post" id="submitHiddenForm">
    <input type="hidden" name="emp_id" id="emp_id" />
    <input type="hidden" name="app_id" id="app_id" />
  </form>
  <!---------------------SEARCHING FORM BY STATUS---------------------->
  <form action="" method="post" id="searchForm">
    <input type="hidden" name="status" id="status" />
  </form>
  <form action="" method="post" id="excel">
    <input type="hidden" name="download_excel" value="Yes" id="download_excel" />
  </form>
  <script type="text/javascript">
 $(function () {
  $('.locationofevent').limitText({ length:50, ellipsisText: '...'})
  });
</script>
  <script>
  function showStatusWiseRecord(status)
  {
    document.getElementById('status').value=status;
    document.getElementById('searchForm').submit();
  }
  function submitForm(emp_id,app_id)
  {
    document.getElementById('emp_id').value=emp_id;
    document.getElementById('app_id').value=app_id;
    document.getElementById('submitHiddenForm').submit();
  }
  function openPopup(id)
  {
    $('#myModal').modal('show');
    var content=document.getElementById(id).innerHTML;
    document.getElementById('content').innerHTML=content;
  }
  function downloadExecl()
  {
    document.getElementById('excel').submit();
  }
  </script>
<script>
    $(document).ready(function(){
      $('[data-toggle="tooltip"]').tooltip();   
    });
</script>
      <!-- Modal -->
    <div class="modal fade" id="myModal" role="dialog">
      <div class="modal-dialog">
      

        <!-- Modal content-->
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">&times;</button>
            <h4 class="modal-title">Read More</h4>
          </div>
          <div class="modal-body">
            <p style="white-space: break-spaces;" id="content"><?php echo $val['GRIEVANCE_DETAILS_HR'];?></p>
          </div>      
        </div>
        
      </div>
    </div>                            

</body>
</html>
