ok

Mini Shell

Direktori : /home2/selectio/public_html/tnpsctestbatch.com/admin/old/
Upload File :
Current File : /home2/selectio/public_html/tnpsctestbatch.com/admin/old/retired-employee-view.php

<?php  include "header.php";
if(isset($_POST['add_approval'])){
        try{
            $statement = $pdo->prepare("UPDATE tbl_employees SET status=? WHERE id=?");
            $result=$statement->execute(array($_POST['approved_status'],$_GET['id']));
                    
                    if($result){
                        $message = 'Login Approved is updated successfully!';
                        unset($_POST);      
                    }else{
                        $warning="Something went wrong try again...";
                    }  
                }catch(Exception $e){
                    $error=$e;
                }   
    }




$ids=$_GET['id'];
$statement = $pdo->prepare("SELECT * FROM tbl_employees e where e.id=".$ids);
$statement->execute();
$emp_data = $statement->fetchAll(PDO::FETCH_ASSOC);
$totalData = $statement->rowCount();

?>

<div class="content-wrapper" style="background:white;">
        <div class="col-lg-12 alerts">
            <div id="custom-alerts" style="display:none;">
                <div class="alert alert-dismissable">
                    <div class="custom-msg"></div>
                </div>
            </div>
            <?php if ($error)  { ?>
            <div class="alert alert-danger alert-dismissable">
                <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
                <h4><i class="icon fa fa-ban"></i> Error</h4>
                <?= $error; ?>
            </div>
            <?php $error=0;} if ($warning) { ?>
            <div class="alert alert-warning alert-dismissable">
                <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
                <h4><i class="icon fa fa-warning"></i> warning</h4>
                <?= $warning; ?>
            </div>
            <?php  $warning=0;} if ($message) { ?>
            <div class="alert alert-success alert-dismissable">
                <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
                <h4>    <i class="icon fa fa-check"></i> Success</h4>
                <?= $message; ?>
            </div>
            <?php $message=0; } ?>
        </div>
        <div class="clearfix"></div>







<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div>
                <div class="box-header">
                    <h3 class="box-title"><b>RETIREMENT EMPLOYEE VIEW</b></h3>
                </div>
                <div class="box-body">
                    
                <?php foreach($emp_data as $data){ ?>    
                    
                    <div class="row">
                        <div class="col-md-6">
                            <div class="row">
                                <div class="col-md-5">
                                  <b>Employee Name</b>  
                                </div>
                                <div class="col-md-2">
                                  <b> :</b>  
                                </div>
                                <div class="col-md-5">
                                   <b><?=$data['employee_name']?></b> 
                                </div>
                            </div><br>
                            <div class="row">
                                <div class="col-md-5">
                                  <b>Retirement Type</b>  
                                </div>
                                <div class="col-md-2">
                                  <b> :</b>  
                                </div>
                                <div class="col-md-5">
                                   <b><?php if($data['retairement_type']=='1'){ ?>Normal Retirement <?php } else{ ?>Voluntary Retirement<?php } ?>
                                       
                                       </b> 
                                </div>
                            </div><br>
                            <div class="row">
                                <div class="col-md-5">
                                  <b>Mobile Number</b>  
                                </div>
                                <div class="col-md-2">
                                  <b> :</b>  
                                </div>
                                <div class="col-md-5">
                                   <b><?=$data['mobile_no']?></b> 
                                </div>
                            </div><br>
                            <div class="row">
                                <div class="col-md-5">
                                  <b>Date</b>  
                                </div>
                                <div class="col-md-2">
                                  <b> :</b>  
                                </div>
                                <div class="col-md-5">
                                   <b><?=date('d-m-Y',strtotime($data["date_of_birth"]));?></b> 
                                </div>
                            </div><br>
                            <div class="row">
                                <div class="col-md-5">
                                  <b>Current Address</b>  
                                </div>
                                <div class="col-md-2">
                                  <b> :</b>  
                                </div>
                                <div class="col-md-5">
                                   <b><?=$data['current_address']?></b> 
                                </div>
                            </div><br>
                        </div>
                        <div class="col-md-6">
                           <div class="row">
                                <div class="col-md-5">
                                  <b>Employee No</b>  
                                </div>
                                <div class="col-md-2">
                                  <b> :</b>  
                                </div>
                                <div class="col-md-5">
                                   <b><?=$data['employee_no']?></b> 
                                </div>
                            </div><br> 
                            <div class="row">
                                <div class="col-md-5">
                                  <b>Registering as</b>  
                                </div>
                                <div class="col-md-2">
                                  <b> :</b>  
                                </div>
                                <div class="col-md-5">
                                   <b><?php if($data['registering_as']=='1'){ ?> Self Registering <?php } else{ ?>Dependant Registering <?php } ?></b> 
                                </div>
                            </div><br>
                            <div class="row">
                                <div class="col-md-5">
                                  <b>Alternative Number</b>  
                                </div>
                                <div class="col-md-2">
                                  <b> :</b>  
                                </div>
                                <div class="col-md-5">
                                   <b><?=$data['alter_no']?></b> 
                                </div>
                            </div><br>
                            <div class="row">
                                <div class="col-md-5">
                                  <b>Email</b>  
                                </div>
                                <div class="col-md-2">
                                  <b> :</b>  
                                </div>
                                <div class="col-md-5">
                                   <b><?=$data['email']?></b> 
                                </div>
                            </div><br>
                            <div class="row">
                                <div class="col-md-5">
                                  <b>Permanent Address</b>  
                                </div>
                                <div class="col-md-2">
                                  <b> :</b>  
                                </div>
                                <div class="col-md-5">
                                   <b><?=$data['permanent_address']?></b> 
                                </div>
                            </div><br>
                        </div>
                    </div>
                    
                    <div class="row">
                        <div class="col-md-12">
                            <center style="font-weight: bolder;font-size: 23px;color: darkgreen;font-family: 'Glyphicons Halflings';">Certificate Verifications</center>
                        </div>
                    </div><br><br>
                    
                    <div class="row">
                        <div class="col-md-4">
                            <center><b>Service Or Insurance</b></center>
                           <a href="<?=$data['service_or_insurance']?>" target="_blank" view><img src="<?=$data['service_or_insurance']?>" style="width:100%;height:200px;"></a> 
                        </div>
                        <div class="col-md-4">
                            <center><b>Photo</b></center>
                           <a href="<?=$data['photo']?>" target="_blank"><img src="<?=$data['photo']?>" style="width:100%;height:200px;"></a>   
                        </div>
                        <div class="col-md-4">
                            <center><b>Aadhar</b></center>
                            <a href="<?=$data['image']?>" target="_blank"><img src="<?=$data['image']?>" style="width:100%;height:200px;"></a> 
                        </div>
                    </div><br>
                    
                    <div class="row">
                        <div class="col-md-12">
                            <center style="font-weight: bolder;font-size: 23px;color: darkgreen;font-family: 'Glyphicons Halflings';">Update Approved Register Employee </center>
                        
                        </div>
                    </div>
                    <form method="post" enctype="multipart/form-data">
                    
                        <div class="row" style="display:flex;align-items:center;justify-content:center;">
                            <br>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label class="control-label required" for="departement_id">Login Approved Status</label>
                                         <select name="approved_status" class="form-control select2" style="width:100%" id="approved_status" required>
                                                <option value="">Select Approved Status</option>
                                                <option value="3" <?php if($data['status']==3){ echo "selected";} ?>>Approved</option>
                                                <option value="1" <?php if($data['status']==1){ echo "selected";} ?>>Not Approved</option>
                                         </select>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <center><input type="submit" class="btn btn-warning" name="add_approval"  value="Approved Employee"/> </center>
                            </div>
                        </div>
                    </form>
                    <div class="clearfix"></div>
                    
                <?php } ?>
                </div>
            </div>
        </div>
    </div>
</section>
<?php include "footer.php";?>

Zerion Mini Shell 1.0