Файл: EROCMS 11.2 ДЛЯ ADULT/Script/pages/deletion.php
Строк: 14
<?php
/*
Автор скрипта https://bymas.ru/id85823
Скрипты, программы на заказ.
Быстро, качественно, недорого.
*/
if ($user['access'] < 1) {
header('location: /');
exit;
}
$view = $mysqli -> query("select id, screenshot, recoil, name from ero_files where id = '".abs(intval($_GET['id']))."'") -> fetch_assoc();
if (!$view){
header('location: /');
exit;
}
$mysqli -> query("INSERT INTO ero_logs SET id_user = '$user[id]', act = 'Удалил видео $view[name].', id_file = '$view[id]', date = '".time()."'");
if (file_exists($_SERVER['DOCUMENT_ROOT'].$view['screenshot'])) unlink($_SERVER['DOCUMENT_ROOT'].$view['screenshot']);
if (file_exists($_SERVER['DOCUMENT_ROOT'].$view['recoil'])) unlink($_SERVER['DOCUMENT_ROOT'].$view['recoil']);
$mysqli -> query("delete from ero_files where id = '$view[id]'");
header('location: /');
$view -> free();