Файл: upload/pages/admin/solutions/del-section.php
Строк: 16
<?php
require_once ($_SERVER['DOCUMENT_ROOT'] . '/core/core.php');
if ($users_perms['edit_solutions'] != 1) {
RedirectToPage('/');
exit();
}
$id = abs(intval($_POST['id']));
$section = FetchAssoc(dbquery("SELECT * FROM `solutions_section` WHERE `id` = ?", [$id]));
if (empty($section['id'])) {
header("HTTP/1.0 404 Not Found");
include ($_SERVER['DOCUMENT_ROOT'] . '/pages/err_pages/404.php');
exit();
}
if (isset($_POST['del-section'])) {
check_csrf();
deleteSolutionsection($section['id']);
showAlert('Успешно', 'success', 'Раздел успешно удален!');
RedirectToPage('/admin/solutions');
}
?>