<?php 
// Include main file
include_once('../libs/main.php');
// Check admin Login
include_once('checkLogin.php');
// Logical section of page
$practiceObj = new practice();

if(isset($_REQUEST['act']) && $_REQUEST['act']=='submitValue'){

    $practiceData =array(
     "practice_reactivation_delete"=>$_REQUEST['practice_reactivation_delete']
    );
    $rs  = $practiceObj->updateRecords($practiceData,$_REQUEST['hdn_practice_id']);
    if($rs){
    	echo json_encode(array("msg" => "Update successfully.Process will start within few minutes."));
        return true;
    }else{
    	return false;
    }
}
if(isset($_REQUEST['check']) && $_REQUEST['check']=='checkProgress'){

    $practiceDetails  =$practiceObj->fromId($_GET['id']);
    if($practiceDetails->practice_deleted_log!=""){
    	$json =json_decode($practiceDetails->practice_deleted_log,1);
    	if(is_array($json)){
    		foreach ($json as $key => $value) {
    			?>
    				<h5><?php echo $key ?></h5><br/>
    			<?php
    				foreach ($value as $akey => $v) {
    			?>		
    					<p><b><?php echo $akey ?>:</b> <?php echo $v ?></p>
    			<?php	}?>
    			<p>======</p>
    	<?php }
    	}
    }
    exit;
}
$practiceDetails = $practiceObj->fromId($_REQUEST['id']);
// Include Template 
include_once('../libs/routs.php')

?>