<?php
//salary-process.php
  session_start();
  if(empty($_SESSION['branch']) || $_SESSION['branch'] == ''){
    header("Location: index.php");
    die();
  }
    require_once 'system/conn.php';
?>
 <center>
 <h1>
    Salary calculation is in process...
</h1>
<br><br><br><br><br><br><br><br><br><br>
<img src="img/gif.gif" alt="">
</center>
<script>
    var str=10;
   var xmlhttp = new XMLHttpRequest();
        xmlhttp.onreadystatechange = function() {
            if (this.readyState == 4 && this.status == 200) {
                document.getElementById("advance").innerHTML = this.responseText;
                window.location.assign('gross-sheet.php');
            }
        }
        xmlhttp.open("GET", "salary-gen-step-2.php?q="+str, true);
        xmlhttp.send();
</script>
<div id="advance">
       
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<?php
$_SESSION['s_sa']="All calculation done and salary generate successfully";
?>