From 8d8342d197e70a203e69fc7f3fe4299218fcac74 Mon Sep 17 00:00:00 2001 From: lopar Date: Sun, 30 Aug 2020 03:09:53 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=20fu?= =?UTF-8?q?nctions.php=20=D0=B8=20=D0=BE=D1=81=D0=BD=D0=BE=D0=B2=D0=BD?= =?UTF-8?q?=D1=8B=D1=85=20=D0=BD=D0=B0=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B9=20=D0=BD=D0=B0=20=D0=BA=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D1=81=20User.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions.php | 253 ++++++++++++++++-------------------------------- main.php | 13 +-- podzem_brat.php | 2 +- 3 files changed, 93 insertions(+), 175 deletions(-) diff --git a/functions.php b/functions.php index 43ce107..3453445 100644 --- a/functions.php +++ b/functions.php @@ -11,24 +11,21 @@ require_once 'config.php'; * Возвращает массив данных таблицы users. */ if (isset($_SESSION['uid'])) { - $user = (new users_row($_SESSION['uid']))->result(); - $userr = new User($_SESSION['uid']); + //$user = (new users_row($_SESSION['uid']))->result(); + $user = new User($_SESSION['uid']); } else { echo "Не могу проинициализировать игрока!"; } -if (isset($user['id']) && $user['block'] == 1) { - die('user blocked!'); +if ($user->id && $user->block) { + exit('user blocked!'); } -// ??? -//define("HPADDICTIONEFFECT", 33); - $ip = filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP); if (isset($_GET['goto']) && isset($_GET['tStamp']) && isset($_GET['vcode']) && $_GET['vcode'] == md5(sha1($_GET['goto'] . $_GET['tStamp']))) { db::c()->query('UPDATE `users`,`online` SET `users`.`room` = ?i, `online`.`room` = ?i WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $_GET['goto'], $_GET['goto'], $_SESSION['uid']); - $user['room'] = intval($_GET['goto']); + $user->room = intval($_GET['goto']); } function createbot($bot, $login = "") @@ -91,7 +88,7 @@ function takeshopitem($item, $table = "shop", $present = '', $onlyonetrip = '', $flds = []; $goden = ''; if (!$uid) { - $uid = $user['id']; + $uid = $user->id; } $r = db::c()->query('SHOW FIELDS FROM ?f', $table); @@ -212,10 +209,10 @@ function GiveRep($id, $rep) /** * Генератор прогрессбара. - * @param $current - Текущее значение. - * @param $maximum - Максимальное значение. + * @param $current - Текущее значение. + * @param $maximum - Максимальное значение. * @param string $line_color - Цвет полоски прогрессбара. - * @param string $bg_color - Фон прогрессбара. + * @param string $bg_color - Фон прогрессбара. * @return string */ function showProgressBar($current, $maximum, $line_color = 'limegreen', $bg_color = 'silver') @@ -243,19 +240,19 @@ function echoscroll($slot) { global $user; $all_magic = 0; - if ($user['battle']) { + if ($user->battle) { $script = 'fbattle'; - $bat = db::c()->query('SELECT `magic` FROM `battle` WHERE `id` = ?i', $user['battle'])->fetch_assoc(); + $bat = db::c()->query('SELECT `magic` FROM `battle` WHERE `id` = ?i', $user->battle)->fetch_assoc(); $all_magic = unserialize($bat['magic']); } else { $script = 'main'; } - $dress = db::c()->query('SELECT `id`, `magic`, `name`, `img`, `duration`, `maxdur` FROM `inventory` WHERE `id` = ?i', $user[$slot])->fetch_assoc(); + $dress = db::c()->query('SELECT `id`, `magic`, `name`, `img`, `duration`, `maxdur` FROM `inventory` WHERE `id` = ?i', $user->$slot)->fetch_assoc(); $need_charge = db::c()->query('SELECT `needcharge` FROM `magic` WHERE `id` = ?i', $dress['magic'])->fetch_assoc(); - if (($user[$slot] > 0) && ($all_magic[$user['id']] < 1 || empty($need_charge['needcharge']))) { - $row['id'] = $user[$slot]; + if (($user->$slot > 0) && ($all_magic[$user->id] < 1 || empty($need_charge['needcharge']))) { + $row['id'] = $user->$slot; if ($dress['magic']) { $magic = db::c()->query('SELECT targeted FROM `magic` WHERE `id` = ?i', $dress['magic'])->fetch_assoc(); echo " ACTIVE_SCROLL; - } elseif (($user[$slot] > 0) && ($all_magic[$user['id']] >= 1) && $need_charge['needcharge'] > 0) { + } elseif (($user->$slot > 0) && ($all_magic[$user->id] >= 1) && $need_charge['needcharge'] > 0) { echo << INACTIVE_SCROLL; @@ -444,6 +441,7 @@ function undressall($user_id) function dropitemid($slot, $id) { + global $user; switch ($slot) { case 1: $slot1 = 'sergi'; @@ -522,7 +520,7 @@ function dropitemid($slot, $id) if ($checkid->getNumRows()) { if (mysql_query('UPDATE `users`, `inventory` SET `users`.`' . $slot1 . '` = 0, `inventory`.`dressed` = 0, `users`.`sila` = `users`.`sila` - `inventory`.`gsila`, `users`.`lovk` = `users`.`lovk` - `inventory`.`glovk`, `users`.`inta` = `users`.`inta` - `inventory`.`ginta`, `users`.`intel` = `users`.`intel` - `inventory`.`gintel`, `users`.`maxhp` = `users`.`maxhp` - `inventory`.`ghp`, `users`.`noj` = `users`.`noj` - `inventory`.`gnoj`, `users`.`topor` = `users`.`topor` - `inventory`.`gtopor`, `users`.`dubina` = `users`.`dubina` - `inventory`.`gdubina`, `users`.`mec` = `users`.`mec` - `inventory`.`gmech`, `users`.`mfire` = `users`.`mfire` - `inventory`.`gfire`, `users`.`mwater` = `users`.`mwater` - `inventory`.`gwater`, `users`.`mair` = `users`.`mair` - `inventory`.`gair`, `users`.`mearth` = `users`.`mearth` - `inventory`.`gearth`, `users`.`mlight` = `users`.`mlight` - `inventory`.`glight`, `users`.`mgray` = `users`.`mgray` - `inventory`.`ggray`, `users`.`mdark` = `users`.`mdark` - `inventory`.`gdark`, `users`.`fkrit` = `users`.`fkrit` - `inventory`.`mfkrit`, `users`.`fakrit` = `users`.`fakrit` - `inventory`.`mfakrit`, `users`.`fuvorot` = `users`.`fuvorot` - `inventory`.`mfuvorot`, `users`.`fauvorot` = `users`.`fauvorot` - `inventory`.`mfauvorot`, `users`.`ubron1` = `users`.`ubron1` - `inventory`.`bron1`, `users`.`ubron2` = `users`.`ubron2` - `inventory`.`bron2`, `users`.`ubron3` = `users`.`ubron3` - `inventory`.`bron3`, `users`.`ubron4` = `users`.`ubron4` - `inventory`.`bron4`, `users`.`uminu` = `users`.`uminu` - `inventory`.`minu`, `users`.`umaxu` = `users`.`umaxu` - `inventory`.`maxu` WHERE `inventory`.`id` = `users`.`' . $slot1 . '` AND `inventory`.`dressed` = 1 AND `inventory`.`owner` = "' . $id . '" AND `users`.`id` = "' . $id . '"')) { db::c()->query('UPDATE `users` SET `hp` = `maxhp`, `fullhptime` = ?i WHERE `hp` > `maxhp` AND `id` = ?i', time(), $id); - $user[$slot1] = 0; + $user->$slot1 = 0; } return true; } else { @@ -609,8 +607,8 @@ function dropitem($slot) $slot1 = ''; break; } - { - if (db::c()->query('UPDATE `users` as `u`, `inventory` as `i` SET `u`.?f = 0, `i`.`dressed` = 0, + + if (db::c()->query('UPDATE `users` as `u`, `inventory` as `i` SET `u`.?f = 0, `i`.`dressed` = 0, `u`.`sila` = `u`.`sila` - `i`.`gsila`, `u`.`lovk` = `u`.`lovk` - `i`.`glovk`, `u`.`inta` = `u`.`inta` - `i`.`ginta`, @@ -637,43 +635,43 @@ function dropitem($slot) `u`.`fauvorot` = `u`.`fauvorot` - `i`.`mfauvorot`, `u`.`uminu` = `u`.`uminu` - `i`.`minu`, `u`.`umaxu` = `u`.`umaxu` - `i`.`maxu` - WHERE `i`.`id` = `u`.?f AND `i`.`dressed` = 1 AND `i`.`owner` = ?i AND u.id = ?i', $slot1, $slot1, $user['id'], $user['id'])) { - db::c()->query('UPDATE `users` SET `hp` = `maxhp`, `fullhptime` = ?i WHERE `hp` > `maxhp` AND `id` = ?i', time(), $user['id']); - } + WHERE `i`.`id` = `u`.?f AND `i`.`dressed` = 1 AND `i`.`owner` = ?i AND u.id = ?i', $slot1, $slot1, $user->id, $user->id)) { + db::c()->query('UPDATE `users` SET `hp` = `maxhp`, `fullhptime` = ?i WHERE `hp` > `maxhp` AND `id` = ?i', time(), $user->id); + } - $wear_raw = db::c()->query('SELECT * FROM `inventory` where `owner` = ?i AND `dressed` = 1', $user['id']); - while ($wear_list = $wear_raw->fetch_assoc()) { - $wear_arr[] = $wear_list['prototype']; - } + $wear_raw = db::c()->query('SELECT * FROM `inventory` where `owner` = ?i AND `dressed` = 1', $user->id); + while ($wear_list = $wear_raw->fetch_assoc()) { + $wear_arr[] = $wear_list['prototype']; + } - $item['id'] = $user[$slot1]; + $item['id'] = $user->$slot1; - $get_pro = db::c()->query('SELECT * FROM `inventory` where `id` = ?i', $item['id'])->fetch_assoc(); - ///////////////////// - $sets_items = db::c()->query('SELECT * FROM `item_sets`'); + $get_pro = db::c()->query('SELECT * FROM `inventory` where `id` = ?i', $item['id'])->fetch_assoc(); + ///////////////////// + $sets_items = db::c()->query('SELECT * FROM `item_sets`'); - //для каждого комплекта - while ($items_in_set = $sets_items->fetch_assoc()) { - $checker = 0; - $temp_is = explode(",", $items_in_set['prot_id']); - $set_id = $items_in_set['set_id']; + //для каждого комплекта + while ($items_in_set = $sets_items->fetch_assoc()) { + $checker = 0; + $temp_is = explode(",", $items_in_set['prot_id']); + $set_id = $items_in_set['set_id']; - //если прото в комплекте и не одет - if (in_array($get_pro['prototype'], $temp_is) && (!in_array($get_pro['prototype'], $wear_arr))) { - $checker = 1; + //если прото в комплекте и не одет + if (in_array($get_pro['prototype'], $temp_is) && (!in_array($get_pro['prototype'], $wear_arr))) { + $checker = 1; - //для каждого одетого предмета - foreach ($temp_is as $check_proto) { - if ($check_proto != $get_pro['prototype'] && !in_array($check_proto, $wear_arr)) { - $checker = 0; - } + //для каждого одетого предмета + foreach ($temp_is as $check_proto) { + if ($check_proto != $get_pro['prototype'] && !in_array($check_proto, $wear_arr)) { + $checker = 0; } } + } - // - if (($checker == 1) && (!in_array($get_pro['prototype'], $wear_arr))) { - db::c()->query('UPDATE `users` as `u`, `item_sets` as `s` SET + // + if (($checker == 1) && (!in_array($get_pro['prototype'], $wear_arr))) { + db::c()->query('UPDATE `users` as `u`, `item_sets` as `s` SET `u`.`uminu` = `u`.`uminu` - `s`.`minu`, `u`.`umaxu` = `u`.`umaxu` - `s`.`maxu`, `u`.`sila = `u`.`sila - `s`.`gsila`, @@ -701,22 +699,18 @@ function dropitem($slot) `u`.`mlight = `u`.`mlight - `s`.`glight`, `u`.`mgray = `u`.`mgray - `s`.`ggray` WHERE - `u`.`id` = ?i AND `s`.`set_id`= ?i', $user['id'], $set_id); - } + `u`.`id` = ?i AND `s`.`set_id`= ?i', $user->id, $set_id); } - return true; } + return true; } //FIXME роняем вещи, которые больше не можем держать function ref_drop() { - # global $user; - //сможет держать function derj($id) { - //global $user; $user = db::c()->query('SELECT `id`, `align` FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc(); $ts = db::c()->query('SELECT `id`, `nalign` FROM `inventory` WHERE `id` = ?i', $id)->fetch_assoc(); $al = '(1 = 1)'; @@ -763,94 +757,17 @@ function ref_drop() } } -// убить предмет + +/** + * Уничтожить предмет, принадлежащий игроку, вызывающего функцию. + * @param $id - ID предмета игрока. + * @throws \Krugozor\Database\Mysql\Exception + */ function destructitem($id) { global $user; - $slot1 = ''; - $dress = db::c()->query('SELECT * FROM `inventory` WHERE `owner` = ?i AND `id` = ?i', $user['id'], $id)->fetch_assoc(); - switch ($dress['type']) { - case 1: - $slot1 = 'sergi'; - break; - case 2: - $slot1 = 'kulon'; - break; - case 3: - $slot1 = 'weap'; - break; - case 4: - $slot1 = 'bron'; - break; - case 5: - $slot1 = 'r1'; - break; - case 6: - $slot1 = 'r2'; - break; - case 7: - $slot1 = 'r3'; - break; - case 8: - $slot1 = 'helm'; - break; - case 9: - $slot1 = 'perchi'; - break; - case 10: - $slot1 = 'shit'; - break; - case 11: - $slot1 = 'boots'; - break; - case 12: - $slot1 = 'm1'; - break; - case 22: - $slot1 = 'rybax'; - break; - case 23: - $slot1 = 'plaw'; - break; - default: - $slot1 = 'weap'; - break; - } - if ($dress['type'] == 5) { - if ($user['r1'] == $dress['id']) { - $slot1 = 'r1'; - } elseif ($user['r2'] == $dress['id']) { - $slot1 = 'r2'; - } elseif ($user['r3'] == $dress['id']) { - $slot1 = 'r3'; - } - } elseif ($dress['type'] == 12) { - if ($user['m1'] == $dress['id']) { - $slot1 = 'm1'; - } elseif ($user['m2'] == $dress['id']) { - $slot1 = 'm2'; - } elseif ($user['m3'] == $dress['id']) { - $slot1 = 'm3'; - } elseif ($user['m4'] == $dress['id']) { - $slot1 = 'm4'; - } elseif ($user['m5'] == $dress['id']) { - $slot1 = 'm5'; - } elseif ($user['m6'] == $dress['id']) { - $slot1 = 'm6'; - } elseif ($user['m7'] == $dress['id']) { - $slot1 = 'm7'; - } elseif ($user['m8'] == $dress['id']) { - $slot1 = 'm8'; - } elseif ($user['m9'] == $dress['id']) { - $slot1 = 'm9'; - } elseif ($user['m10'] == $dress['id']) { - $slot1 = 'm10'; - } - } - if ($dress['owner'] == $user['id']) { - if ($dress['dressed'] == 1) { - db::c()->query('UPDATE `users` SET ?f = 0 WHERE `id` = ?i', $slot1, $user['id']); - } + $item = db::c()->query('SELECT 1 FROM inventory WHERE owner_id = ?i AND item_id = ?i', $user->id, $id); + if ($item->getNumRows()) { db::c()->query('DELETE FROM `inventory` WHERE `id` = ?i', $id); } } @@ -859,8 +776,8 @@ function destructitem($id) function usemagic($id, $target) { global $user; - $row = db::c()->query('SELECT * FROM `inventory` WHERE `owner` = ?i AND id = ?i', $user['id'], $id)->fetch_assoc_array(); - $bat = db::c()->query('SELECT * FROM `battle` WHERE `id` = ?i', $user['battle'])->fetch_assoc_array(); + $row = db::c()->query('SELECT * FROM `inventory` WHERE `owner` = ?i AND id = ?i', $user->id, $id)->fetch_assoc_array(); + $bat = db::c()->query('SELECT * FROM `battle` WHERE `id` = ?i', $user->battle)->fetch_assoc_array(); $all_magic = unserialize($bat['magic']); $charge = 0; $magic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $row['magic'])->fetch_assoc_array(); @@ -873,27 +790,27 @@ function usemagic($id, $target) if ($incmagic['needcharge'] > 0) { $charge = $incmagic['needcharge']; } - - if ((($all_magic[$user['id']] < 1) || ($charge == '0')) && - (($user['sila'] >= $row['nsila']) && - ($user['lovk'] >= $row['nlovk']) && - ($user['inta'] >= $row['ninta']) && - ($user['vinos'] >= $row['nvinos']) && - ($user['intel'] >= $row['nintel']) && - ($user['level'] >= $row['nlevel']) && +//FIXME Переделать под новую базу + if (($all_magic[$user->id] < 1 || $charge == 0) && + ($user['sila'] >= $row['nsila'] && + $user['lovk'] >= $row['nlovk'] && + $user['inta'] >= $row['ninta'] && + $user['vinos'] >= $row['nvinos'] && + $user['intel'] >= $row['nintel'] && + $user['level'] >= $row['nlevel'] && (($user['align'] > 7 && $user['align'] < 8) || ((int)$user['align'] == (int)$row['nalign']) || ($row['nalign'] == 0)) && - ($user['noj'] >= $row['nnoj']) && - ($user['topor'] >= $row['ntopor']) && - ($user['dubina'] >= $row['ndubina']) && - ($user['mec'] >= $row['nmech']) && + $user['noj'] >= $row['nnoj'] && + $user['topor'] >= $row['ntopor'] && + $user['dubina'] >= $row['ndubina'] && + $user['mec'] >= $row['nmech'] && ($row['type'] < 13 || $row['type'] == 50) && ($user['mfire'] >= $row['nfire']) && - ($user['mwater'] >= $row['nwater']) && - ($user['mair'] >= $row['nair']) && - ($user['mearth'] >= $row['nearth']) && - ($user['mlight'] >= $row['nlight']) && - ($user['mgray'] >= $row['ngray']) && - ($user['mdark'] >= $row['ndark']) && - ($row['needident'] == 0) + $user['mwater'] >= $row['nwater'] && + $user['mair'] >= $row['nair'] && + $user['mearth'] >= $row['nearth'] && + $user['mlight'] >= $row['nlight'] && + $user['mgray'] >= $row['ngray'] && + $user['mdark'] >= $row['ndark'] && + $row['needident'] == 0 ) || $row['magic'] == 48 || $row['magic'] == 50) { @@ -927,16 +844,16 @@ function usemagic($id, $target) $charge = 0; } //ограничение по кол-ву за ход - if ($user['battle'] > 0) { - $bat = db::c()->query('SELECT * FROM `battle` WHERE `id` = ?i', $user['battle'])->fetch_assoc_array(); + if ($user->battle > 0) { + $bat = db::c()->query('SELECT * FROM `battle` WHERE `id` = ?i', $user->battle)->fetch_assoc_array(); } if ($bat['magic'] == '') { $all_magic = []; } else { $all_magic = unserialize($bat['magic']); } - $all_magic[$user['id']] += $charge; - db::c()->query('UPDATE `battle` SET `magic`= "?s" WHERE id = ?i', serialize($all_magic), $user['battle']); + $all_magic[$user->id] += $charge; + db::c()->query('UPDATE `battle` SET `magic`= "?s" WHERE id = ?i', serialize($all_magic), $user->battle); } } return false; @@ -946,7 +863,7 @@ function addch($text, $room = 0) { global $user; if ($room == 0) { - $room = $user['room']; + $room = $user->room; } if ($fp = @fopen("tmp/chat.txt", "a")) { //открытие flock($fp, LOCK_EX); //БЛОКИРОВКА ФАЙЛА @@ -962,7 +879,7 @@ function addchp($text, $who, $room = 0) { global $user; if ($room == 0) { - $room = $user['room']; + $room = $user->room; } $fp = fopen("tmp/chat.txt", "a"); //открытие flock($fp, LOCK_EX); //БЛОКИРОВКА ФАЙЛА @@ -1178,7 +1095,7 @@ function get_meshok() { global $user; $d = db::c()->query('SELECT SUM(`gmeshok`) AS `ves` FROM `inventory` WHERE `owner` = ?i AND `setsale` = 0 AND `gmeshok` > 0', $_SESSION['uid'])->fetch_assoc(); - return ($user['sila'] * 4 + $d['ves']); + return ($user->strength * 4 + $d['ves']); } /** @@ -1238,7 +1155,7 @@ function star_sign($date) $zodiac[0] = "10"; $dayOfYear = date("z", strtotime($date)); $isLeapYear = date("L", strtotime($date)); //Высокосный? - if ($isLeapYear && $dayOfYear >59) { + if ($isLeapYear && $dayOfYear > 59) { --$dayOfYear; } foreach ($zodiac as $day => $sign) { diff --git a/main.php b/main.php index 6b80b20..5e3237a 100644 --- a/main.php +++ b/main.php @@ -11,6 +11,7 @@ if (!isset($_SESSION['uid'])) { } require_once 'functions.php'; +$user = $userr; try { db::c()->query('UPDATE `online` SET `real_time` = ?i WHERE `user_id` = ?i', time(), $user->id); @@ -342,7 +343,7 @@ function setShadow($image) ]; if (in_array($image, $shadows)) { $i = $image . '.png'; - db::c()->query('UPDATE `users` SET `shadow` = "?s" WHERE `id` = ?i', $i, $user['id']); + db::c()->query('UPDATE `users` SET `shadow` = "?s" WHERE `id` = ?i', $i, $user->id); } else { err('Ошибка!'); } @@ -353,7 +354,7 @@ if ($obraz && ($user->shadow == 'g0.gif' || $user->shadow == 'man0.gif')) { } if ($del == 1 && $effectId > 0) { - $pl = db::c()->query('SELECT type FROM users_effects WHERE owner_id = ?i AND effect_id = ?i', $user['id'], $effectId)->fetch_assoc(); + $pl = db::c()->query('SELECT type FROM users_effects WHERE owner_id = ?i AND effect_id = ?i', $user->id, $effectId)->fetch_assoc(); if (isset($pl['type'])) { echo del_efs($effectId, $pl['type']); } else { @@ -363,7 +364,7 @@ if ($del == 1 && $effectId > 0) { if ($brons && $ids) { try { - $cur = db::c()->query('SELECT free_bron, bron1, bron2, bron3, bron4 FROM inventory WHERE owner = ?i AND id = ?i', $user['id'], $ids)->fetch_assoc(); + $cur = db::c()->query('SELECT free_bron, bron1, bron2, bron3, bron4 FROM inventory WHERE owner = ?i AND id = ?i', $user->id, $ids)->fetch_assoc(); } catch (\Krugozor\Database\Mysql\Exception $e) { echo "
Ошибка: " . $e->getMessage() . "
В файле: " . $e->getFile() . " (" . $e->getLine() . ")
"; } @@ -461,7 +462,7 @@ if ($edit) { $q = $q->fetch_assoc(); if (empty($q['dressed'])) { destructitem($q['id']); - addToDelo($user['login'] . " выбросил предмет " . $q['name'] . " id:(cap" . $q['id'] . ")"); + addToDelo($user->login . " выбросил предмет " . $q['name'] . " id:(cap" . $q['id'] . ")"); err('Предмет ' . $q['name'] . ' выброшен.'); } else { err('Ошибка: нельзя выбросить одетый предмет!'); @@ -528,7 +529,7 @@ if ($edit) {
Снять все
- + id, 2) ?>

@@ -585,7 +586,7 @@ if ($edit) {
- + shadow == '0.gif' || $user->admin == 1): ?> diff --git a/podzem_brat.php b/podzem_brat.php index 866e1a0..7403391 100644 --- a/podzem_brat.php +++ b/podzem_brat.php @@ -1,6 +1,6 @@ '.$user["login"].' поднял предмет "'.$mis.'". ','{[]}'.Nick::id($rbb["user_id"])->short().'{[]}'); +addchp (''.$user->login.' поднял предмет "'.$mis.'". ','{[]}'.Nick::id($rbb["user_id"])->short().'{[]}'); }