<?php
session_start();
include('../function/db.php');
include_once('../function/function_main.php');
$__data_action = 'false';
$_name_in_jsnj  = $__go_to = $errData = $__data_action= $__notif_title=$__notif_disc=$__notif_type=$__go_to='';
if(isset($_POST["deleteData"]))
{

    if(isset($_POST["for"]) && $_POST["for"] == 'track_details') {
            $deletData = validate_jsnj_data($_POST['deleteData']);
        $query_ut = mysqli_query($_conn_db,"select tracking_id from tbl_courier_track where tracking_id = '$deletData'");
        $filter_rows =  mysqli_num_rows($query_ut);
        if($filter_rows > 0) {
            if ($result) {
                $__notif_title = 'Congratulations!';
                $__notif_disc = 'Data delete successfully.';
                $__notif_type = 'success';
                $__data_action = 'true';
            } else {
                $__notif_title = 'Oops!';
                $__notif_disc = 'Something want wrong.';
                $__notif_type = 'warning';
            }
        } else {
            $__notif_title = 'Oops!';
            $__notif_disc = 'Something want wrong.';
            $__notif_type = 'warning';
        }
    }
}

$dataResult = array('page' => 'deleteData', 'res' => $__data_action, 'notif_title' => $__notif_title, 'notif_disc' => $__notif_disc,  'notif_type' => $__notif_type, 'go_to' => $__go_to);
echo json_encode($dataResult);