Убрал вызов User->addDelo.
This commit is contained in:
@@ -36,61 +36,38 @@ foreach (Db::getRows($q) as $row) {
|
||||
if ($row['inGroup']) {
|
||||
$col = $u->itemsX($row['id']);
|
||||
if ($col > 1) {
|
||||
$stmt = Db::prepare('
|
||||
update items_users set inShop = 0, 1price = ?
|
||||
where
|
||||
item_id = ? and
|
||||
inShop = 30 and
|
||||
uid = ? and
|
||||
inGroup = ?
|
||||
limit ' . $col);
|
||||
$stmt = Db::prepare(
|
||||
'update items_users set inShop = 0, 1price = ?
|
||||
where item_id = ? and inShop = 30 and uid = ? and inGroup = ? limit ' . $col);
|
||||
|
||||
if ($stmt->execute([$row['price1'], $row['item_id'], $row['uid'], $row['inGroup']])) {
|
||||
$ld = $u->addDelo(
|
||||
Delo::add(
|
||||
1,
|
||||
SHOP_TYPE,
|
||||
$row['uid'],
|
||||
sprintf(RETURN_GROUP, $row['item_id'], $row['name'], $row['price1'], $row['inGroup'] . '+1'),
|
||||
time(),
|
||||
$u->info['city'],
|
||||
SHOP_TYPE,
|
||||
0,
|
||||
0
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$stmt = Db::prepare('
|
||||
update items_users set inShop = 0, 1price = ?
|
||||
where
|
||||
uid = ? and
|
||||
id = ? and
|
||||
inOdet = 0 and
|
||||
`delete` = 0 and
|
||||
inShop = 30
|
||||
');
|
||||
$stmt = Db::prepare('update items_users set inShop = 0, 1price = ?
|
||||
where uid = ? and id = ? and inOdet = 0 and `delete` = 0 and inShop = 30');
|
||||
if ($stmt->execute([$row['price1'], $row['uid'], $row['id']])) {
|
||||
$ld = $u->addDelo(
|
||||
Delo::add(
|
||||
1,
|
||||
SHOP_TYPE,
|
||||
$row['uid'],
|
||||
sprintf(RETURN_ONE, $row['item_id'], $row['name'], $row['price1']),
|
||||
time(),
|
||||
$u->info['city'],
|
||||
SHOP_TYPE,
|
||||
0,
|
||||
0
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$stmt = Db::prepare('update items_users set inShop = 0, 1price = ? where id = ? and inShop = 30');
|
||||
if ($stmt->execute([$row['price1'], $row['id']])) {
|
||||
$ld = $u->addDelo(
|
||||
Delo::add(
|
||||
1,
|
||||
SHOP_TYPE,
|
||||
$row['uid'],
|
||||
sprintf(RETURN_ONE, $row['item_id'], $row['name'], $row['price1']),
|
||||
time(),
|
||||
$u->info['city'],
|
||||
SHOP_TYPE,
|
||||
0,
|
||||
0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user