del_efs() function fixes
This commit is contained in:
parent
8ee5ee1008
commit
a8ff0a54f0
@ -2066,19 +2066,18 @@ function nick5_1($id, $st)
|
|||||||
function del_efs($uid, $id, $type)
|
function del_efs($uid, $id, $type)
|
||||||
{
|
{
|
||||||
global $user;
|
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 ($uid == $user['id']) {
|
||||||
if ($id != null) {
|
if ($id != null) {
|
||||||
if (!in_array($type, $arr)) {
|
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) {
|
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;
|
$user['invis'] = 0;
|
||||||
}
|
}
|
||||||
echo mysql_error();
|
err('Эффект удалён.');
|
||||||
echo '<b style=\'color: Red;\'>Эффект удалён.</b>';
|
|
||||||
} else {
|
} else {
|
||||||
echo '<b style=\'color: Red;\'>Данный эффект нельзя удалить ...</b>';
|
err('Данный эффект нельзя удалить.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user