<?php
@session_start();
include "control/activity.php";
$dd = new activity();

$type = $_REQUEST['type'];
$iid = $_REQUEST['iid'];

if($type == "approved")
{
    $table = "userdetails";
    $value = "kyc_status='approved'";
    $condition = " user_key='$iid'";
    $result = $dd->updateData($table,$value,$condition);
    if($result){
        echo "<script>window.open('kyc_request_page.php','_self')</script>";
    }
}


if($type == "rejected")
{
    $table = "userdetails";
    $value = "kyc_status='empty'";
    $condition = " user_key='$iid'";
    $result = $dd->updateData($table,$value,$condition);
    if($result){
        echo "<script>window.open('kyc_request_page.php','_self')</script>";
    }
}

?>