
    <?php
    $thisid =  $_GET["id"];

    include 'DBConnection.php';
    $sql       = 'select * from hs_hr_employee where emp_number = '.$thisid;

    $results   = mysqli_query($connection, $sql);


    $row_count = mysqli_num_rows($results);
    $id = 0;
    $emp_name = 'sdsaddsad';
    while ($row = mysqli_fetch_array($results)) {
      /*  echo '<tr><td><a href="OBApprove.php?id='.$row['obid'].'">'.$row['emp_number'].'</a></td></tr>';
        echo '<td>'.$row['emp_id'].'</td>';
        echo '<td>'.$row['dept_from'].'</td>';
        echo '<td>'.$row['dept_to'].'</td>';
        echo '<td>'.$row['purpose'].'</td>';
        echo '<td>'.$row['dept_time'].'</td>';
        echo '<td>'.$row['return_time'].'</td>';
        echo '<td>'.$row['status'].'</td>';*/

        $emp_name = $row['emp_lastname']." ".$row['emp_firstname'];
        $emp_id = $row['employee_id'];
        $joined_date = $row['joined_date'];
        $job_title_code = $row['job_title_code'];



    }


    if (($job_title_code == 4) || ($job_title_code == 16)){
      header('location:http://192.168.2.117/Otm2/HrView.php?id='.$emp_id);
    }
     else if (($job_title_code <=3 ) || ($job_title_code <= 64) || ($job_title_code != 4) || ($job_title_code != 16) || ($job_title_code =="NULL")) {
      header('location:http://192.168.2.117/Otm2/UserView.php?id='.$emp_id);

}
   
?>