'); 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 << $sv[1] $sv[2] $sv[3] $sv[4] $sv[5] $sv[6] $sv[7] $sv[8] $sv[9] $sv[10] $sv[11] $sv[12] HTML; //Если сломается, применить str_replace('"', '\"', $r); } }