');
foreach (User::start()->stats['items'] as $stat) {
if (!in_array($stat['inslot'], [40, 51])) {
continue;
}
if (empty($stat['useInBattle']) || $stat['btl_zd'] > 0 || $stat['iznosNOW'] >= $stat['iznosMAX'] || empty($stat['magic_inci'])) {
$vl = 'class="nopriemuse"';
} else {
$po = Conversion::dataStringToArray($stat['data']);
if ($po['useOnLogin'] == 1) {
$jsvars = "'{$stat['name']}','{$stat['id']}','{$stat['img']}',1,1,'','{$stat['useInBattle']}'";
} else {
$jsvars = "'{$stat['name']}','{$stat['id']}','{$stat['img']}',1,2";
}
$vl = 'style="cursor:pointer" onclick="top.useMagicBattle(' . $jsvars . ')"';
}
$iznos = "Долговечность: {$stat['iznosNOW']} / {$stat['iznosMAX']}";
$img = Config::img() . '/i/items/' . $stat['img'];
$sv[$stat['inOdet'] - 39] = '';
}
return <<