2023-04-01 11:47:32 +00:00
< script >
2022-12-19 18:26:14 +00:00
var elem = document . getElementById ( " se-pre-con " );
elem . parentNode . removeChild ( elem );
</ script >
< ? php
2022-12-30 19:03:37 +00:00
use Core\Database ;
2023-04-15 19:18:30 +00:00
//session_start();
2023-04-01 11:47:32 +00:00
2022-12-19 18:26:14 +00:00
if ( ! defined ( 'GAME' )) {
die ();
}
$u -> info [ 'marker' ] = 'inv' ;
if ( isset ( $_SESSION [ 'otdel' ]) && ! isset ( $_GET [ 'otdel' ]) && ! isset ( $_GET [ 'paged' ])) {
$_GET [ 'otdel' ] = $_SESSION [ 'otdel' ];
$_GET [ 'paged' ] = $_SESSION [ 'paged' ];
2023-04-01 11:47:32 +00:00
} elseif ( ! isset ( $_GET [ 'otdel' ]) || ( $_GET [ 'otdel' ] < 1 || $_GET [ 'otdel' ] > 6 )) {
2023-01-10 16:29:32 +00:00
$_GET [ 'otdel' ] = 1 ; // Если раздел не указан.
2022-12-19 18:26:14 +00:00
$_GET [ 'paged' ] = $_SESSION [ 'paged' ] = 0 ;
}
2023-04-01 11:47:32 +00:00
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 ( ! empty ( $_GET [ 'paged' ])) {
$_SESSION [ 'paged' ] = $_GET [ 'paged' ]; // Задаем новую страницу.
} elseif ( ! empty ( $_SESSION [ 'paged' ]) && $_SESSION [ 'otdel' ] == $_GET [ 'otdel' ]) {
$_GET [ 'paged' ] = $_SESSION [ 'paged' ]; // Если страница уже имеется в сессии, возвращаем её в текущую.
} else {
$_GET [ 'paged' ] = $_SESSION [ 'paged' ] = 0 ;
2022-12-19 18:26:14 +00:00
}
2023-04-01 11:47:32 +00:00
2023-01-10 16:29:32 +00:00
$_SESSION [ 'otdel' ] = $_GET [ 'otdel' ]; // для отладки.
2022-12-19 18:26:14 +00:00
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'
);
}
}
2023-01-10 16:29:32 +00:00
//сохраняем комплект
2022-12-19 18:26:14 +00:00
if ( isset ( $_POST [ 'compname' ])) {
2023-01-10 17:26:14 +00:00
$_POST [ 'compname' ] = htmlspecialchars ( $_POST [ 'compname' ], null );
2022-12-19 18:26:14 +00:00
$_POST [ 'compname' ] = str_replace ( " ' " , '' , $_POST [ 'compname' ]);
$_POST [ 'compname' ] = str_replace ( '"' , '' , $_POST [ 'compname' ]);
$ptst = str_replace ( ' ' , '' , $_POST [ 'compname' ]);
if ( $ptst != '' ) {
2023-01-10 16:29:32 +00:00
//Добавляем комплект
2022-12-19 18:26:14 +00:00
$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' ])) {
2023-01-10 16:29:32 +00:00
//добавляем новый комплект
2022-12-19 18:26:14 +00:00
$ins = mysql_query (
2024-02-09 19:41:54 +00:00
'INSERT INTO `save_com` (`uid`,`time`,`name`,`val`,`type`) VALUES ("' . $u -> info [ 'id' ] . '","' . time () . '","' . mysql_real_escape_string ( $_POST [ 'compname' ]) . '","' . $ptst . '","0")'
2022-12-19 18:26:14 +00:00
);
if ( $ins ) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Комплект "' . $_POST [ 'compname' ] . '" был успешно сохранен' ;
2022-12-19 18:26:14 +00:00
} else {
2023-01-10 16:29:32 +00:00
$u -> error = 'Н е удалось сохранить комплект по техническим причинам' ;
2022-12-19 18:26:14 +00:00
}
} else {
2023-01-10 16:29:32 +00:00
//изменяем существующий
2022-12-19 18:26:14 +00:00
$ins = mysql_query (
'UPDATE `save_com` SET `val` = "' . $ptst . '" WHERE `id` = "' . $tcm [ 'id' ] . '" LIMIT 1'
);
if ( $ins ) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Комплект "' . $_POST [ 'compname' ] . '" был успешно изменен' ;
2022-12-19 18:26:14 +00:00
} else {
2023-01-10 16:29:32 +00:00
$u -> error = 'Н е удалось изменить комплект по техническим причинам' ;
2022-12-19 18:26:14 +00:00
}
}
unset ( $ptst , $tcm , $inc );
}
} elseif ( isset ( $_GET [ 'delc1' ])) {
$cmpl = mysql_query (
2024-02-09 19:41:54 +00:00
'UPDATE `save_com` SET `delete` = "' . time () . '" WHERE `uid` = "' . $u -> info [ 'id' ] . '" AND `delete` = "0" AND `id` = "' . mysql_real_escape_string (
2022-12-19 18:26:14 +00:00
$_GET [ 'delc1' ]
) . '" LIMIT 1'
);
if ( $cmpl ) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Комплект был успешно удален' ;
2022-12-19 18:26:14 +00:00
}
}
$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 = ' < div id = " inventorySortBox " >
2023-01-10 16:29:32 +00:00
Сортировка : < br />
2022-12-19 18:26:14 +00:00
< input type = " button " onclick = " inventoryAjax( \ 'main.php?inv=1&mAjax=true&boxsort=name&otdel=' . intval(
$_GET [ 'otdel' ]
2023-01-10 16:29:32 +00:00
) . ' \ ' ); " class= " btn btn - danger " value= " Названию " />
2022-12-19 18:26:14 +00:00
< input type = " button " onclick = " inventoryAjax( \ 'main.php?inv=1&mAjax=true&boxsort=cost&otdel=' . intval(
$_GET [ 'otdel' ]
2023-01-10 16:29:32 +00:00
) . ' \ ' ); " class= " btn btn - danger " value= " Цене " />
2022-12-19 18:26:14 +00:00
< input type = " button " onclick = " inventoryAjax( \ 'main.php?inv=1&mAjax=true&boxsort=type&otdel=' . intval(
$_GET [ 'otdel' ]
2023-01-10 16:29:32 +00:00
) . ' \ ' ); " class= " btn btn - danger " value= " Типу " />
2022-12-19 18:26:14 +00:00
</ div > ' ;
if ( isset ( $_SESSION [ 'paged' ])) {
$page_look = '<!-- PAGED SEE ' . round (( int ) @ $_SESSION [ 'paged' ]) . '-->' ;
} else {
$page_look = '<!-- PAGED ' . $_SESSION [ 'paged' ] . ' -->' ;
}
if ( $pgs > $pc ) {
$nlim = ' LIMIT ' . $pxc . ' , ' . $pc . '' ;
$page_look .= '<div style="padding:0px;">' ;
2023-01-10 16:29:32 +00:00
$page_look .= 'Страницы: ' ;
2022-12-19 18:26:14 +00:00
$i = 1 ;
echo ' < style >. pgdas { display : inline - block ; background - color : #dadada; padding:2px 4px 1px 4px; font-size:12px;} .pgdas1 { display:inline-block;background-color:#a5a5a5; padding:2px 4px 1px 4px; font-size:12px;}
. pgdas { background : #dadada;background: -moz-linear-gradient(top, #dadada 50%, #a5a5a5 99%);background: -webkit-gradient(linear, left top, left bottom, color-stop(50%,#dadada), color-stop(99%,#a5a5a5));background: -webkit-linear-gradient(top, #dadada 50%,#a5a5a5 99%);background: -o-linear-gradient(top, #dadada 50%,#a5a5a5 99%);background: -ms-linear-gradient(top, #dadada 50%,#a5a5a5 99%);background: linear-gradient(to bottom, #dadada 50%,#a5a5a5 99%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#dadada\', endColorstr=\'#a5a5a5\',GradientType=0 );
}
. pgdas1 { background : #a5a5a5; }
</ style > ' ;
while ( $i <= ceil ( $pgs / $pc )) {
if ( $i - 1 == $pg ) {
$sep = 1 ;
} else {
$sep = '' ;
}
$page_look .= '<a class="pgdas' . $sep . '" href="javascript:void(0);" onclick="inventoryAjax(\'main.php?paged=' . ( $i - 1 ) . '&inv&mAjax=true&otdel=' . round (
$_GET [ 'otdel' ]
) . '\');">' . $i . '</a> ' ;
$i ++ ;
}
$page_look .= '</div>' ;
}
$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
);
}
2023-01-10 16:29:32 +00:00
$itmAllSee = '<tr><td align="center" bgcolor="#c7c7c7">ПУСТО</td></tr>' ;
2022-12-30 19:03:37 +00:00
if ( $itmAll [ 0 ] > 0 ) {
2022-12-19 18:26:14 +00:00
$itmAllSee = $itmAll [ 2 ];
2022-12-30 19:03:37 +00:00
}
$clrb = '' ;
$clrba = '' ;
2022-12-19 18:26:14 +00:00
if ( $u -> aves [ 'now' ] >= $u -> aves [ 'max' ]) {
$clrb = 'color:#BB0000;' ;
2023-01-10 16:29:32 +00:00
$clrba = ' (У вас перегруз!)' ;
2022-12-19 18:26:14 +00:00
}
$showItems = '
< table width = " 100% " cellspacing = " 0 " cellpadding = " 0 " >
< tr >
< td valign = " top " >
< table width = " 100% " style = " " cellspacing = " 0 " cellpadding = " 0 " bgcolor = " #d4d2d2 " >
< tr >
2023-01-10 16:29:32 +00:00
< td style = " border-top:4px solid #d4d2d2;border-bottom:4px solid #d4d2d2; " width = " 20% " ' . (($_GET[' otdel '] != 1) ? ' style = " " ' : ' style = " " ') . ' align = center bgcolor = " ' . (( $_GET['otdel'] == 1) ? '#a5a5a5' : '') . ' " >< a href = " javascript:void(0); " onclick = " inventoryAjax( \ 'main.php?inv=1&mAjax=true&otdel=1&rn=1.1 \ '); " > Обмундирование </ a ></ td >
< td style = " border-top:4px solid #d4d2d2;border-bottom:4px solid #d4d2d2; " width = " 20% " ' . (($_GET[' otdel '] != 2) ? ' style = " " ' : ' style = " " ') . ' align = center bgcolor = " ' . (( $_GET['otdel'] == 2) ? '#a5a5a5' : '') . ' " >< a href = " javascript:void(0); " onclick = " inventoryAjax( \ 'main.php?inv=1&mAjax=true&otdel=2&rn=2.1 \ '); " > Заклятия </ a ></ td >
< td style = " border-top:4px solid #d4d2d2;border-bottom:4px solid #d4d2d2; " width = " 20% " ' . (($_GET[' otdel '] != 3) ? ' style = " " ' : ' style = " " ') . ' align = center bgcolor = " ' . (( $_GET['otdel'] == 3) ? '#a5a5a5' : '') . ' " >< a href = " javascript:void(0); " onclick = " inventoryAjax( \ 'main.php?inv=1&mAjax=true&otdel=3&rn=3.1 \ '); " > Эликсиры </ a ></ td >
< td style = " border-top:4px solid #d4d2d2;border-bottom:4px solid #d4d2d2; " width = " 20% " ' . (($_GET[' otdel '] != 6) ? ' style = " " ' : ' style = " " ') . ' align = center bgcolor = " ' . (( $_GET['otdel'] == 6) ? '#a5a5a5' : '') . ' " >< a href = " javascript:void(0); " onclick = " inventoryAjax( \ 'main.php?inv=1&mAjax=true&otdel=6&rn=6.1 \ '); " > Руны </ a ></ td >
< td style = " border-top:4px solid #d4d2d2;border-bottom:4px solid #d4d2d2; " width = " 20% " ' . (($_GET[' otdel '] != 4) ? ' style = " " ' : ' style = " " ') . ' align = center bgcolor = " ' . (( $_GET['otdel'] == 4) ? '#a5a5a5' : '') . ' " >< a href = " javascript:void(0); " onclick = " inventoryAjax( \ 'main.php?inv=1&mAjax=true&otdel=4&rn=4.1 \ '); " > Прочее </ a ></ td >
2022-12-19 18:26:14 +00:00
</ tr >
</ table ></ td >
</ tr >
< tr >
< td align = " center " >< table border = " 0 " cellpadding = " 0 " cellspacing = " 0 " width = " 100% " style = " padding-top:0px; border-left: 1px solid #A5A5A5; border-right: 1px solid #A5A5A5; " bgcolor = " #a5a5a5 " >
< tr >
< td align = " left " style = " color:#2b2c2c; height: 20 px;font-size:12px; padding-top:2px;' . $clrb . ' " >
2023-01-10 16:29:32 +00:00
< b >& nbsp ; Рюкзак ( масса : ' . (0 + $u->aves[' now ']) . ' / ' . $u->aves[' max '] . ' ) </ b > ' . $clrba . '
< input type = " submit " style = " display: none " id = " inpFilterName_submit " value = " Фильтр " onclick = " return false " >
2022-12-19 18:26:14 +00:00
< div class = " autocomplete-suggestions " style = " position: absolute; display: none;top: 15px; left:0; margin:0px auto; right: 0px; font-size:12px; font-family: Tahoma; max-height: 300px; z-index: 9999; " ></ div >
</ div >
</ form >
2023-01-10 16:29:32 +00:00
< input type = " button " onclick = " inventorySort(this); " style = " margin:0px 2px; " value = " Сортировка " />
2022-12-19 18:26:14 +00:00
' . $inventorySortBox . '
</ td >
</ tr >
</ table ></ td >
</ tr >
< tr >
< td valign = " top " align = " center " >
2023-03-31 18:30:14 +00:00
< div style = " height:350px; border-bottom: 1px solid #A5A5A5;border-top: 1px solid #A5A5A5; " id = " itmAllSee " >< table width = " 100% " border = " 0 " cellspacing = " 1 " align = " center " cellpadding = " 0 " bgcolor = " #A5A5A5 " > ' . (($u->info[' invBlock '] == 0) ? $itmAllSee : ' < div align = " center " style = " padding:10px;background-color:#A5A5A5; " >< form method = " post " action = " main.php?inv=1&otdel=' . $_GET['otdel'] . '&relockinvent " >< b > Рюкзак закрыт .</ b >< br >< img title = " Замок для рюкзака " src = " //img.new-combats.tech/i/items/box_lock.gif " > Введите пароль : < input id = " relockInv " name = " relockInv " type = " password " >< input type = " submit " value = " Открыть " ></ form ></ div > ') . ' </ table ></ div ></ td >
2022-12-19 18:26:14 +00:00
</ tr >
</ table >
< script language = " JavaScript " >
if ( $ . cookie ( \ ' invFilterByName\ ' )) $ ( " #ShowInventory " ) . hide ();
$ ( document ) . ready ( function (){ $ ( " #ShowInventory " ) . show (); });
</ script >
' ;
if ( isset ( $_GET [ 'mAjax' ])) {
exit ( $showItems );
}
?>
< script type = " text/javascript " src = " js/jquery.1.11.js " ></ script >
< script type = " text/javascript " src = " js/jquery.cookie.1.4.1.js " ></ script >
< script type = " text/javascript " src = " js/jquery.autocomplete.js " ></ script >
< script >
$ . cookie ( 'invFilterByName' , '' );
var UpdateItemList ;
function inventorySort ( e ) {
if ( $ ( '#inventorySortBox' ) . css ( 'display' ) == 'none' ) {
$ ( '#inventorySortBox' ) . show ();
$ ( e ) . addClass ( 'focus' );
} else {
$ ( '#inventorySortBox' ) . hide ();
$ ( e ) . removeClass ( 'focus' );
}
}
function inventoryHeight () {
var height = $ ( '#itmAll' ) . height ();
var heW = $ ( window ) . height ();
heW = heW - 148 ; // 1060
height = height - 120 ; // 462
var heMax = $ ( " #itmAllSee " ) . children ( 'table' ) . height ();
if ( heMax > height ) {
if ( heW > height ) {
$ ( " #itmAllSee " ) . height ( heW );
} else {
$ ( " #itmAllSee " ) . height ( height );
}
} else {
$ ( " #itmAllSee " ) . height ( heMax );
}
}
$ ( window ) . ready ( function () {
inventoryHeight ();
});
$ ( window ) . resize ( function () {
inventoryHeight ();
});
function seetext ( id ) {
var id = document . getElementById ( 'close_text_itm' + id );
if ( id . style . display == 'none' ) {
id . style . display = '' ;
} else {
id . style . display = 'none' ;
}
}
function UpdateItemList () {
var inv_names = [];
var items = $ ( 'a.inv_name' );
$ ( items ) . each ( function () {
if ( $ . inArray ( $ ( this ) . text (), inv_names ) < 0 ) inv_names . push ( $ ( this ) . text ());
});
$ ( '#inpFilterName' ) . autocomplete ({ lookup : inv_names , onSelect : invFilterByName });
}
function invFilterByName () {
$ . cookie ( 'invFilterByName' , '' );
var val = $ ( '#inpFilterName' ) . val ();
if ( val == '' ) $ ( " a.inv_name " ) . parent () . parent () . stop () . show ();
else {
$ . cookie ( 'invFilterByName' , val );
$ ( " a.inv_name:not(:contains(' " + val + " ')) " ) . parents ( '.item' ) . stop () . css ( 'background-color' , '' ) . hide ();
$ ( " a.inv_name:contains(' " + val + " ') " ) . parents ( '.item' ) . stop () . show ();
}
}
function inventoryAjax ( url ) {
2023-01-10 16:29:32 +00:00
$ ( '#ShowInventory' ) . html ( '<div align="center" style="padding:10px;background-color:#d4d2d2;color:grey;"><b>Загрузка...</b></div>' );
2022-12-19 18:26:14 +00:00
$ . ajax ({
url : url ,
cache : false ,
dataType : 'html' ,
success : function ( html ) {
$ ( '#ShowInventory' ) . html ( html );
inventoryHeight ();
UpdateItemList ();
}
});
}
$ ( document ) . ready ( function () {
function UpdateItemList () {
var inv_names = [];
var items = $ ( 'a.inv_name' );
$ ( items ) . each ( function () {
if ( $ . inArray ( $ ( this ) . text (), inv_names ) < 0 ) inv_names . push ( $ ( this ) . text ());
});
$ ( '#inpFilterName' ) . autocomplete ({ lookup : inv_names , onSelect : invFilterByName });
}
function invFilterByName () {
$ . cookie ( 'invFilterByName' , '' );
var val = $ ( '#inpFilterName' ) . val ();
if ( val == '' ) $ ( " a.inv_name " ) . parent () . parent () . stop () . show ();
else {
$ . cookie ( 'invFilterByName' , val );
$ ( " a.inv_name:not(:contains(' " + val + " ')) " ) . parents ( '.item' ) . stop () . css ( 'background-color' , '' ) . hide ();
$ ( " a.inv_name:contains(' " + val + " ') " ) . parents ( '.item' ) . stop () . show ();
}
}
2023-01-10 16:29:32 +00:00
UpdateItemList (); // пересчет предметов.
2022-12-19 18:26:14 +00:00
invFilterByNameTimer = null ;
2023-01-10 16:29:32 +00:00
// просматриваем результат
2022-12-19 18:26:14 +00:00
$ ( '#line_filter' ) . submit ( function () {
$ ( '#inpFilterName_submit' ) . trigger ( 'click' );
});
2023-01-10 16:29:32 +00:00
// Если в выпадающем списке предметов листаем при помощи клавиш Up и Down, автоматически просматриваем результат.
2022-12-19 18:26:14 +00:00
$ ( '#inpFilterName' ) . keyup ( function ( e ) {
$ ( '#inpFilterName_submit' ) . trigger ( 'click' );
});
2023-01-10 16:29:32 +00:00
// Запоминаем прошлый поиск предмета и активируем е г о при открытии инвентаря\сундука
2022-12-19 18:26:14 +00:00
if ( $ . cookie ( 'invFilterByName' )) {
$ ( '#inpFilterName' ) . val ( $ . cookie ( 'invFilterByName' ));
invFilterByName ();
}
2023-01-10 16:29:32 +00:00
// Автообновление в реальном времени при написании текста.
2022-12-19 18:26:14 +00:00
$ ( '#line_filter' ) . click ( function () {
window . clearInterval ( invFilterByNameTimer );
if ( $ ( '#inpFilterName' ) . val () == '' ) invFilterByName (); else invFilterByNameTimer = setTimeout ( invFilterByName , 200 );
return false ;
});
});
jQuery . expr [ " : " ] . contains = function ( elem , i , match , array ) {
return ( elem . textContent || elem . innerText || jQuery . text ( elem ) || " " ) . toLowerCase () . indexOf ( match [ 3 ] . toLowerCase ()) >= 0 ;
}
</ script >
2023-04-15 19:18:30 +00:00
< table cellspacing = " 0 " cellpadding = " 0 " style = " border-width: 0; width: 100%; " >
2022-12-19 18:26:14 +00:00
< tr >
< td width = " 250 " valign = " top " align = " right " >
< div style = " padding-top: 6px; text-align: center " >
< ? php
$usee = $u -> getInfoPers ( $u -> info [ 'id' ], 0 , 0 , 1 );
echo $usee ? $usee [ 0 ] : 'information is lost.' ;
$priem = new Priems ();
echo '<br>' ;
2024-02-09 19:41:54 +00:00
$priem -> seeMyPriems ();
2022-12-19 18:26:14 +00:00
echo '<br>' . $u -> info_remont ();
?>
</ div >
</ td >
< td width = " 287 " style = " padding-right:7px; " valign = " top " align = " left " >
< ? php include ( 'stats_inv.php' ); ?>
</ td >
< td valign = " top " id = " itmAll " >
< div style = " z-index: 2; position: relative; width:100%; display:table; box-sizing: border-box; margin: 0; padding: 0 5px 3px 5px; " >
2023-01-10 16:29:32 +00:00
< div style = " display:table-cell; " ><!-- Кнопки возврата и другие --></ div >
2022-12-19 18:26:14 +00:00
< div style = " display:table-cell; text-align: right; " >
< input class = " btn btn-success " type = " button "
onclick = " top.frames['main'].location='main.php?titul&rnd=<?php
2023-01-10 16:29:32 +00:00
echo $code ; ?> '" value="Достижения"/>
2022-12-19 18:26:14 +00:00
< input class = " btn btn-success " type = " button "
onclick = " top.frames['main'].location='main.php?newanimal&rnd=<?php
2023-01-10 16:29:32 +00:00
echo $code ; ?> '" value="Звери"/>
< input class = " btn btn-success " type = " button " onclick = " window.open('/exp'); " value = " Таблица опыта " />
2024-04-29 10:22:02 +00:00
< input class = " btn btn-success " type = " button " onclick = " window.open('/statsbonuses.html'); "
2023-01-10 16:29:32 +00:00
value = " Бонусы статов " />
2022-12-19 18:26:14 +00:00
< input class = " btn btn-success " type = " button "
onclick = " top.frames['main'].location='main.php?act_trf&rnd=<?php
2023-01-10 16:29:32 +00:00
echo $code ; ?> '" value="Отчеты о переводах"/>
2022-12-19 18:26:14 +00:00
< ? php if ( ! $u -> info [ 'inTurnir' ]) : ?>
< input class = " btn btn-success " type = " button "
2023-01-10 16:29:32 +00:00
onclick = " top.frames['main'].location='main.php?obraz&rnd=<?= $code ; ?>' " value = " Образ " />
2022-12-19 18:26:14 +00:00
< ? php endif ;
2022-12-30 19:03:37 +00:00
$stmt = Database :: pdoinit () -> prepare (
2022-12-19 18:26:14 +00:00
'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 ()) { ?>
< input class = " btn " type = " button "
onclick = " top.frames['main'].location='main.php?galery&rnd=<?= $code ; ?>' "
2023-01-10 16:29:32 +00:00
value = " Галерея " />
2022-12-19 18:26:14 +00:00
< ? php
}
unset ( $stmt );
?>
< input class = " btn btn-success " type = " button " onclick = " top.frames['main'].location='main.php' "
2023-01-10 16:29:32 +00:00
value = " Вернуться " />
2022-12-19 18:26:14 +00:00
</ div >
</ div >
< table width = " 100% " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " noresize = " noresize " >
< ? php if ( $u -> error ) : ?>
< tr >
< td >
< div style = " min-height:18px;padding:2px 4px; color: red; font-weight: bold; " >
< ? = $u -> error ?>
</ div >
</ td >
</ tr >
< ? php endif ; ?>
< tr >
< td id = " ShowInventory " >
< ? = $showItems ; ?>
</ td >
</ tr >
</ table >
</ td >
</ tr >
2022-12-30 19:03:37 +00:00
</ table >