Размер файла: 525B
<?php
require_once('../wu_init.php');
include('wu_checkadmin.php');
if (!wu_token()) { exit('wu-error'); }
if (!USER_LOGGED) { exit('wu-error'); }
if(isset($_POST['id'])){
if(!empty($_POST['id'])){
$id = intval($_POST['id']);
$inu = mysqli_fetch_assoc(mysqli_query($connect_db, "SELECT * FROM ".DB_PREFIX."_es_i WHERE id='$id' LIMIT 1"));
mysqli_query($connect_db, "DELETE FROM `".DB_PREFIX."_es_i` WHERE id = '$id' LIMIT 1");
unlink("../../eshop/images/$inu[img]");
exit('1');
} else { exit('3'); }
} else { exit('3'); }
?>