<?php
include('../include/header.php');
$emp_id = $_REQUEST['emp_id'];
?>

 <!-- Page wrapper  -->
        <div class="page-wrapper">
            <!-- Bread crumb -->
            <div class="row page-titles">
                <div class="col-md-5 align-self-center">
                    <h3 class="text-primary">Dashboard</h3> </div>
                <div class="col-md-7 align-self-center">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item"><a href="javascript:void(0)">Home</a></li>
                        <li class="breadcrumb-item active">Add Identity</li>
                    </ol>
                </div>
            </div>
            <!-- End Bread crumb -->
            <!-- Container fluid  -->
           <div class="container-fluid">
                <!-- Start Page Content -->
                <div class="row justify-content-center">
                    <div class="col-lg-6">
                        <div class="card">
                            <div class="card-body">
                                <div class="form-validation">
                                    <form class="form-valide" method="post">
                                        <div class="form-group row">
                                            <label class="col-lg-4 col-form-label" for="val-username">Terminate Date <span class="text-danger">*</span></label>
                                            <div class="col-lg-6">
                                                <input type="date" class="form-control" id="date1" name="date1" required >
                                            </div>
                                        </div>
										
										<div class="form-group row">
                                            <label class="col-lg-4 col-form-label" for="val-username">Termination Remark <span class="text-danger">*</span></label>
                                            <div class="col-lg-6">
                                                <input type="text" class="form-control" id="remark" name="remark" required  />
                                            </div>
                                        </div>
										
                                        
                                        <div class="form-group row">
                                            <div class="col-lg-8 ml-auto">
                                                <button type="submit" name="ok" class="btn btn-danger" >Terminate</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
                <!-- End PAge Content -->
            </div>
			
<?php 
if(isset($_POST["ok"]))
{
	$date = $_POST["date1"];
	$date= date('Y-m-d', strtotime($date));
	$remark = $_POST["remark"];

 $sqlupdate = "UPDATE tbl_emp_master SET emp_terminate_date = '$date', termination_remark ='$remark', del_status ='1' WHERE md5(id) = '$emp_id' ";
$result = $objhr->updation($sqlupdate);

?>
<script>
alert('Success');
location='employee_terminate_list.php';
</script>
<?php

}

 ?>	
<?php
include('../include/footer.php');
?>