info['marker'] = 'inv'; if (isset($_SESSION['otdel']) && !isset($_GET['otdel']) && !isset($_GET['paged'])) { $_GET['otdel'] = $_SESSION['otdel']; $_GET['paged'] = $_SESSION['paged']; } elseif (!isset($_GET['otdel']) || ($_GET['otdel'] < 1 && $_GET['otdel'] > 6)) { $_GET['otdel'] = 1; // Если раздел не указан. $_GET['paged'] = $_SESSION['paged'] = 0; } if (isset($_GET['otdel'])) { if (!isset($_GET['paged']) && (isset($_GET['use_pid']) || isset($_GET['sid']) || isset($_GET['oid']) || isset($_GET['usecopr']) || isset($_GET['delcop']))) { $_GET['paged'] = $_SESSION['paged']; // use item and load old paging } elseif (isset($_GET['paged']) && $_GET['paged'] != '') { $_SESSION['paged'] = $_GET['paged']; // Задаем новую страницу. } elseif (isset($_SESSION['paged']) && $_SESSION['paged'] != '' && $_SESSION['otdel'] == $_GET['otdel']) { $_GET['paged'] = $_SESSION['paged']; // Если страница уже имеется в сессии, возвращаем её в текущую. } else { $_GET['paged'] = $_SESSION['paged'] = 0; } } $_SESSION['otdel'] = $_GET['otdel']; // для отладки. if (isset($_GET['delcop'])) { mysql_query( 'DELETE FROM `complects_priem` WHERE `id` = "' . mysql_real_escape_string( $_GET['delcop'] ) . '" AND `uid` = "' . $u->info['id'] . '" LIMIT 1' ); } elseif (isset($_GET['usecopr'])) { $cpr = mysql_fetch_array( mysql_query( 'SELECT * FROM `complects_priem` WHERE `id` = "' . mysql_real_escape_string( $_GET['usecopr'] ) . '" AND `uid` = "' . $u->info['id'] . '" LIMIT 1' ) ); if (isset($cpr['id'])) { $u->info['priems'] = $cpr['priems']; mysql_query( 'UPDATE `stats` SET `priems` = "' . mysql_real_escape_string( $cpr['priems'] ) . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1' ); } } //сохраняем комплект if (isset($_POST['compname'])) { $_POST['compname'] = htmlspecialchars($_POST['compname'], null, 'cp1251'); $_POST['compname'] = str_replace("'", '', $_POST['compname']); $_POST['compname'] = str_replace('"', '', $_POST['compname']); $ptst = str_replace(' ', '', $_POST['compname']); if ($ptst != '') { //Добавляем комплект $ptst = ''; $sp = mysql_query( 'SELECT `inOdet`,`id` FROM `items_users` WHERE `uid` = "' . $u->info['id'] . '" AND `delete` = "0" AND `inOdet` > 0 AND `inShop` = "0" ORDER BY `inOdet` ASC LIMIT 250' ); while ($pl = mysql_fetch_array($sp)) { $ptst .= $pl['inOdet'] . '=' . $pl['id'] . '|'; } $tcm = mysql_fetch_array( mysql_query( 'SELECT * FROM `save_com` WHERE `uid` = "' . $u->info['id'] . '" AND `name` = "' . mysql_real_escape_string( $_POST['compname'] ) . '" AND `delete` = "0" LIMIT 1' ) ); if (!isset($tcm['id'])) { //добавляем новый комплект $ins = mysql_query( 'INSERT INTO `save_com` (`uid`,`time`,`name`,`val`,`type`) VALUES ("' . $u->info['id'] . '","' . time( ) . '","' . mysql_real_escape_string($_POST['compname']) . '","' . $ptst . '","0")' ); if ($ins) { $u->error = 'Комплект "' . $_POST['compname'] . '" был успешно сохранен'; } else { $u->error = 'Не удалось сохранить комплект по техническим причинам'; } } else { //изменяем существующий $ins = mysql_query( 'UPDATE `save_com` SET `val` = "' . $ptst . '" WHERE `id` = "' . $tcm['id'] . '" LIMIT 1' ); if ($ins) { $u->error = 'Комплект "' . $_POST['compname'] . '" был успешно изменен'; } else { $u->error = 'Не удалось изменить комплект по техническим причинам'; } } unset($ptst, $tcm, $inc); } } elseif (isset($_GET['delc1'])) { $cmpl = mysql_query( 'UPDATE `save_com` SET `delete` = "' . time( ) . '" WHERE `uid` = "' . $u->info['id'] . '" AND `delete` = "0" AND `id` = "' . mysql_real_escape_string( $_GET['delc1'] ) . '" LIMIT 1' ); if ($cmpl) { $u->error = 'Комплект был успешно удален'; } } $filt = '`iu`.`lastUPD` DESC'; if (isset($_GET['boxsort'])) { switch ($_GET['boxsort']) { case'name': $filt = '`im`.`name` ASC'; break; case'cost': $filt = '`im`.`price2` DESC, `im`.`price1` DESC'; break; case'type': $filt = '`im`.`inslot`'; break; } } $pc = 3000; $pg = round((int)@$_GET['paged']); $pxc = $pg * $pc; $nlim = ''; $pgs = mysql_fetch_array( mysql_query( 'SELECT COUNT(`iu`.`id`) FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON `im`.`id` = `iu`.`item_id` WHERE `iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `im`.`inRazdel`="' . mysql_real_escape_string( $_GET['otdel'] ) . '" ORDER BY ' . $filt . ' LIMIT 1' ) ); $pgs = $pgs[0]; $page_look = ''; $inventorySortBox = '
Сортировка:
'; if (isset($_SESSION['paged'])) { $page_look = ''; } else { $page_look = ''; } if ($pgs > $pc) { $nlim = ' LIMIT ' . $pxc . ' , ' . $pc . ''; $page_look .= '
'; $page_look .= 'Страницы: '; $i = 1; echo ''; while ($i <= ceil($pgs / $pc)) { if ($i - 1 == $pg) { $sep = 1; } else { $sep = ''; } $page_look .= '' . $i . ' '; $i++; } $page_look .= '
'; } $filt = '`lastUPD` DESC'; if (isset($_GET['boxsort'])) { switch ($_GET['boxsort']) { case'name': $filt = '`name` ASC'; break; case'cost': $filt = '`price2` DESC, `price1` DESC'; break; case'type': $filt = '`inslot`'; break; } } $itmAll = $itmAllSee = ''; if (isset($_GET['boxsort']) && $_GET['otdel'] == 5) { if ($_POST['subfilter']) { $itmAll = $u->genInv( 1, '`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `name` LIKE "%' . addcslashes( mysql_real_escape_string($_POST['filter']), '%_' ) . '%" ORDER BY `name` ASC' ); } } else { $itmAll = $u->genInv( 1, '`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `im`.`inRazdel`="' . mysql_real_escape_string( $_GET['otdel'] ) . '" ORDER BY ' . $filt . '' . $nlim ); } $itmAllSee = 'ПУСТО'; if ($itmAll[0] > 0) { $itmAllSee = $itmAll[2]; } $clrb = ''; $clrba = ''; if ($u->aves['now'] >= $u->aves['max']) { $clrb = 'color:#BB0000;'; $clrba = '   (У вас перегруз!)'; } $showItems = '
Обмундирование Заклятия Эликсиры Руны Прочее
  Рюкзак (масса: ' . (0 + $u->aves['now']) . '/' . $u->aves['max'] . ') ' . $clrba . ' ' . $inventorySortBox . '
' . (($u->info['invBlock'] == 0) ? $itmAllSee : '
Рюкзак закрыт.
Введите пароль:
') . '
'; if (isset($_GET['mAjax'])) { exit($showItems); } ?>
getInfoPers($u->info['id'], 0, 0, 1); echo $usee ? $usee[0] : 'information is lost.'; $priem = new Priems(); echo '
'; $priem->seeMy(1); echo '
' . $u->info_remont(); ?>
info['inTurnir']): ?> prepare( 'select count(*) from reimage where ((uid = ? and clan = 0) or clan = ?) and good != 0 and bad = 0' ); $stmt->execute([$u->info['id'], $u->info['clan']]); if ($stmt->fetchColumn()) { ?>
error): ?>
error ?>