show_page($page, $allpage, $href); $all = $pg; echo '<br>(Всего предметов: ' . $all . ')</td></tr></table>'; } } if (!isset($_GET['type']) and !isset($_GET['buy']) and !isset($_GET['sell']) and !isset($_GET['ident']) and !isset($_GET['kleymo']) and !isset($_GET['remont'])) { echo '<center>' . $shop['ind'] . '</center>'; } if (isset($_GET['sell'])) { if (isset($_GET['sellitem']) and is_numeric($_GET['sellitem'])) { if (isset($_POST['sell'])) { $it_id = (int) $_GET['sellitem']; $kol = (int) $_POST['kol']; if ($it_id > 0 and $kol > 0) { $Item = new Item($it_id); $ar = $Item->sell(0, $kol); if ($ar[0] >= 0) { if ($shop['view'] == 1 and $ar[0] > 0) { $time = time(); save_stat($user_id, '', '', 11, $shop['id'], $ar[2], '', $ar[0], '', '', '', ''); } myquery("INSERT INTO game_pm (komu, otkogo, theme, post, view, time, folder) VALUES ('" . $user_id . "', '0', 'Продажа в магазине', 'Ты " . echo_sex('продал', 'продала') . " предмет <" . $ar[2] . "> - " . $kol . " шт. торговцу " . $shop['name'] . " за " . $ar[0] . " " . pluralform($ar[0], 'монету', 'монеты', 'монет') . "','0','" . time() . "',5)"); $char['GP'] += $ar[0]; $char['CW'] -= $ar[1]; } } } ?> <script type="text/javascript" src="../js/jquery.js"></script> <script type="text/javascript" src="../suggest_new/jquery.autocomplete.js"></script> <link href="../suggest_new/suggest.css" rel="stylesheet" type="text/css">