<!doctype html>
<html lang="en">

<head>
<title>Brisanje</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="description" content="">
<meta name="author" content="LaktusDev, design by: laktusdev.com">

<link rel="icon" href="favicon.ico" type="image/x-icon">
<!-- VENDOR CSS -->
<link rel="stylesheet" href="assets/vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/vendor/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="assets/vendor/animate-css/vivify.min.css">

<link rel="stylesheet" href="assets/vendor/sweetalert/sweetalert.css"/>

<!-- MAIN CSS -->
<link rel="stylesheet" href="assets/css/mooli.min.css">

</head>
<body>

<?php
include('session.php');
$id=get_safe_value($leld,$_REQUEST['menu_cat_id']);

global $leld;
global $id;
global $images_dir;

$imagename_query = mysqli_query($leld, "SELECT slika FROM le_menu_category_photo WHERE lemcatid='$id'");
 
 while ($row = mysqli_fetch_array($imagename_query))
{
  $bigimage = "../../uploads/menu/category/{$row['slika']}";
  unlink($bigimage);
  // etc
  $thumb = "../../uploads/menu/category/tb_{$row['slika']}";
    unlink($thumb);
}

$gallery_query = mysqli_query($leld, "DELETE FROM le_menu_category_photo WHERE lemcatid='$id'"); 

$query = mysqli_query($leld, "DELETE FROM le_menu_category WHERE menu_cat_id='$id'");

$status_edit = "
<div class='sweet-overlay' tabindex='-1' style='opacity: 1.02; display: block;'></div>
<div class='sweet-alert showSweetAlert visible' data-custom-class='' data-has-cancel-button='false' data-has-confirm-button='true' data-allow-outside-click='false' data-has-done-function='false' data-animation='pop' data-timer='null' style='display: block; margin-top: -165px;'><div class='sa-icon sa-error' style='display: none;'>
      <span class='sa-x-mark'>
        <span class='sa-line sa-left'></span>
        <span class='sa-line sa-right'></span>
      </span>
    </div><div class='sa-icon sa-warning' style='display: none;'>
      <span class='sa-body'></span>
      <span class='sa-dot'></span>
    </div><div class='sa-icon sa-info' style='display: none;'></div><div class='sa-icon sa-success animate' style='display: block;'>
      <span class='sa-line sa-tip animateSuccessTip'></span>
      <span class='sa-line sa-long animateSuccessLong'></span>

      <div class='sa-placeholder'></div>
      <div class='sa-fix'></div>
    </div><div class='sa-icon sa-custom' style='display: none; background-image: url(&quot;assets/images/sm/avatar1.jpg&quot;); width: 80px; height: 80px;'></div><h4>Menu obrisan!</h4>
    <p style='display: block;'></p>
    <fieldset>
      <input type='text' tabindex='3' placeholder=''>
      <div class='sa-input-error'></div>
    </fieldset><div class='sa-error-container'>
      <div class='icon'>!</div>
      <p>Not valid!</p>
    </div><div class='sa-button-container'>
      <button class='cancel' tabindex='2' style='display: none; box-shadow: none;'>Cancel</button>
      <div class='sa-confirm-button-container'>
        <script>setTimeout(\"location.href = 'settings_menu.php';\",2000);</script>
		<div class='la-ball-fall'>
          <div></div>
          <div></div>
          <div></div>
        </div>
      </div>
    </div></div>
";
echo ''.$status_edit.'';
?>

<!-- Javascript -->
<script src="assets/bundles/libscripts.bundle.js"></script>    
<script src="assets/bundles/vendorscripts.bundle.js"></script>

<!-- Vedor js file and create bundle with grunt  --> 
<script src="assets/vendor/sweetalert/sweetalert.min.js"></script><!-- SweetAlert Plugin Js -->


<!-- Project core js file minify with grunt --> 
<script src="assets/bundles/mainscripts.bundle.js"></script>
<script src="../js/pages/ui/dialogs.js"></script>
</body>
</html>
