= $renderImage($offer, $categoryKey) ?>
= (string)($offer['description'] ?? '') ?>
= (int)$offer['points'] ?> = $znxShopH(t('common.points')) ?>
= $znxShopH(t('shop.need_login')) ?>
htmlspecialchars((string)$v, ENT_QUOTES, 'UTF-8'); $shopSession = ''; if (($loggedin ?? false) === true) { $shopSession = bin2hex(random_bytes(32)); $_SESSION['shop_session'] = $shopSession; } if (empty($shop['enabled'])) { echo '
' . t('buypoints.disabled_text') . '
'; return; } $outfitFallbackIds = array(136,137,138,139,140,141,142,147,148,149,150,155,156,157,158,252,269,270,279,288,324,336,366,431,433,464,466,471,513,514,542,128,129,130,131,132,133,134,143,144,145,146,151,152,153,154,251,268,273,278,289,325,335,367,430,432,463,465,472,512,516,541); $shopCategories = array( 'outfits' => array('label' => t('shop.cat_outfits'), 'items' => array()), 'mounts' => array('label' => t('shop.cat_mounts'), 'items' => array()), 'items' => array('label' => t('shop.cat_items'), 'items' => array()), 'premium' => array('label' => t('shop.cat_premium'), 'items' => array()), 'misc' => array('label' => t('shop.cat_misc'), 'items' => array()), ); foreach ((array)$shop_list as $offerId => $offer) { switch ((int)($offer['type'] ?? 0)) { case 1: $shopCategories['items']['items'][$offerId] = $offer; break; case 2: $shopCategories['premium']['items'][$offerId] = $offer; break; case 5: $shopCategories['outfits']['items'][$offerId] = $offer; break; case 6: $shopCategories['mounts']['items'][$offerId] = $offer; break; default: $shopCategories['misc']['items'][$offerId] = $offer; break; } } $visibleCategories = array_filter($shopCategories, static fn($category): bool => !empty($category['items'])); $firstCategory = true; $renderImage = static function (array $offer, string $category) use ($config, $outfitFallbackIds, $znxShopH): string { $type = (int)($offer['type'] ?? 0); $itemId = $offer['itemid'] ?? 0; $count = (int)($offer['count'] ?? 0); if ($category === 'outfits' && !empty($config['show_outfits']['shop'])) { $ids = is_array($itemId) ? array_values($itemId) : array($itemId); $html = ''; foreach (array_slice($ids, 0, 2) as $id) { $html .= '= $znxShopH(t('shop.you_have')) ?> = (int)$user_znote_data['points'] ?> = $znxShopH(t('common.points')) ?>.
= $znxShopH(t('shop.need_login')) ?>
= $znxShopH(t('shop.offers')) ?>: 0
$category): ?>