"Featured", 1 => "All", 2 => "Collectibles", 3 => "Clothing", 4 => "Body Parts", 5 => "Gears" ]; static $subcategories = [ 1 => "", 2 => "Collectibles", 3 => "Clothing", 4 => "Body Parts", 5 => "Gears", 9 => "Hats", 10 => "Faces", 11 => "Packages", 12 => "Shirts", 13 => "T-Shirts", 14 => "Pants", 15 => "Heads", ]; static $Gears = [ 1 => "Melee Weapon", 2 => "Ranged Weapon", 3 => "Explosive", 4 => "Power Up", 5 => "Navigation Enhancer", 6 => "Musical Instrument", 7 => "Social Item", 8 => "Building Tool", 9 => "Personal Transport" ]; $subcategory_assetType = [ 1 => [2,8,11,12,17,18,27,28,29,30,31], 2 => [19], 3 => [11, 12, 2], 4 => [17, 27, 28, 29, 30, 31], 5 => [19], 9 => [8], 10 => [18], 11 => [32], 12 => [11], 13 => [2], 14 => [12], 15 => [17] ]; function getAssetTypesForSubcategory($subcategoryId) { global $subcategory_assetType, $asset_types; if (!isset($subcategory_assetType[$subcategoryId])) { return null; } $type_ids = $subcategory_assetType[$subcategoryId]; return array_intersect_key($asset_types, array_flip($type_ids)); } function returnVal($array, $value){ return $array[$value] ?? null; } function timeAgo($timestamp) { $time = time() - $timestamp; $units = [ 31536000 => 'year', 2592000 => 'month', 604800 => 'week', 86400 => 'day', 3600 => 'hour', 60 => 'minute', 1 => 'second' ]; foreach ($units as $unitSeconds => $unitName) { if ($time >= $unitSeconds) { $numUnits = floor($time / $unitSeconds); return $numUnits . ' ' . $unitName . ($numUnits > 1 ? 's' : '') . ' ago'; } } return 'Just now'; } $context = isset($_GET['CatalogContext']) ? intval($_GET['CatalogContext']) : null; $subcategory = isset($_GET['Subcategory']) ? intval($_GET['Subcategory']) : 1; $category = isset($_GET['Category']) ? intval($_GET['Category']) : 0; $sorttype = isset($_GET['SortType']) ? intval($_GET['SortType']) : 0; $page = isset($_GET['PageNumber']) ? intval($_GET['PageNumber']) : 1; $legendexpanded = ($_GET['LegendExpanded'] !== "false"); $keyword = isset($_GET['Keyword']) ? $_GET['Keyword'] : null; ?>