<?php  session_start(); error_reporting(0); 
require_once("../j_conn/url.php");
require_once("../j_conn/dbc.php");
require_once("../j_incs/functions.php");
if(isset($_SESSION['j_admin'])){  }else{ die("Error");}
if(isset($_GET['r'])){ }else{ die("Error");}
$item_id = RMC($_GET['r']);
//
$sql = "SELECT * FROM j_pays where j_deleted < 1 AND j_id='".$item_id."'";
$result = runSQL($sql);
$data = mysqli_fetch_array($result);
$transact_id = $data['j_transact_id'];
$item_id = $data['j_id'];
//
$sql = "UPDATE j_pays SET j_deleted='1' WHERE j_deleted < 1 AND j_id='".$item_id."'";
$result = runSQL($sql);
$msg = "with reference ID: $transact_id has been deleted."; 
?>
<script type="text/javascript">
    alert("Payment <?php echo $msg; ?>");
    window.location.href=".";
</script>
