diff --git a/functions.php b/functions.php
index 62b5192..a69a0e6 100644
--- a/functions.php
+++ b/functions.php
@@ -2066,19 +2066,18 @@ function nick5_1($id, $st)
function del_efs($uid, $id, $type)
{
global $user;
- $arr = array(2, 3, 4, 5, 8, 10, 11, 12, 13, 14, 20);
+ $arr = [2, 3, 4, 5, 8, 10, 11, 12, 13, 14, 20];
if ($uid == $user['id']) {
if ($id != null) {
if (!in_array($type, $arr)) {
- mysql_query('DELETE FROM `effects` WHERE `owner` = "' . $uid . '" AND `id` = "' . $id . '" LIMIT 1');
+ db::c()->query('DELETE FROM `effects` WHERE `owner` = ?i AND `id` = ?i', $uid, $id);
if ($type == 1022) {
- mysql_query('UPDATE `users` SET `invis` = 0 WHERE `id` = "' . $uid . '" LIMIT 1');
+ db::c()->query('UPDATE `users` SET `invis` = ?i WHERE `id` = ?i', 0, $uid);
$user['invis'] = 0;
}
- echo mysql_error();
- echo 'Эффект удалён.';
+ err('Эффект удалён.');
} else {
- echo 'Данный эффект нельзя удалить ...';
+ err('Данный эффект нельзя удалить.');
}
}
}