30 lines
849 B
PHP
30 lines
849 B
PHP
<?php
|
|
include('includes/config/config.php');
|
|
include('includes/auth/auth.php');
|
|
include('includes/functions.php');
|
|
include('access.php');
|
|
error_reporting(E_ERROR | E_PARSE);
|
|
begin();
|
|
$indent_id = $_POST['indent_id'];
|
|
if (!empty($indent_id)) {
|
|
$query = "delete from indent_master where indent_id='" . $indent_id . "'";
|
|
|
|
$result = mysqli_query($conn, $query);
|
|
if (!$result = @mysqli_query($conn, $query)) {
|
|
error_log("error " . mysqli_error($conn));
|
|
rollback();
|
|
} else {
|
|
$query1 = "delete from indent_items where indent_id='" . $indent_id . "'";
|
|
if (!$result = @mysqli_query($conn, $query1)) {
|
|
error_log("error " . mysqli_error($conn));
|
|
rollback();
|
|
} else {
|
|
$data = "SUCCESS";
|
|
}
|
|
}
|
|
} else {
|
|
$data = "FAIL";
|
|
}
|
|
commit();
|
|
echo json_encode($data);
|