This commit is contained in:
Igor Barkov [iwork] 2018-11-01 17:21:32 +02:00
parent f803801042
commit 6dbcf227a3

View File

@ -2253,7 +2253,7 @@ function ref_drop()
function derj($id) function derj($id)
{ {
//global $user; //global $user;
$ts = mysql_fetch_array(mysql_query('SELECT `id`, `nalign` FROM `inventory` WHERE `id` = "' . $id . '" LIMIT 1')); $ts = db::c()->query('SELECT `id`, `nalign` FROM `inventory` WHERE `id` = ?i',$id)->fetch_assoc();
$al = '(1 = 1)'; $al = '(1 = 1)';
if ($ts['nalign'] > 0) { if ($ts['nalign'] > 0) {
if ($ts['nalign'] == 1.1) { if ($ts['nalign'] == 1.1) {
@ -2264,7 +2264,7 @@ function ref_drop()
} }
} }
} }
if ($dd = mysql_query("SELECT i.`id` FROM`users` AS `u`, `inventory` AS `i` if ($dd = db::c()->query("SELECT i.`id` FROM`users` AS `u`, `inventory` AS `i`
WHERE WHERE
i.needident = 0 AND i.needident = 0 AND
i.id = {$id} AND i.id = {$id} AND
@ -2291,7 +2291,7 @@ function ref_drop()
u.mdark >= i.ndark AND u.mdark >= i.ndark AND
i.setsale = 0 AND i.setsale = 0 AND
u.id = {$user['id']};")) { u.id = {$user['id']};")) {
$dd = mysql_fetch_array($dd); $dd = $dd->fetch_row();
if ($dd[0] > 0) { if ($dd[0] > 0) {
return true; return true;
} else { } else {