select($_GET['steam_app_id'], 1); if($Redirect->id > 0) { header('Location: https://barter.vg/i/'.$Redirect->id.'/'); exit; } $id = 0; } elseif(isset($_GET['steam_sub_id'])) { $Redirect = new Item(); $Redirect->select($_GET['steam_sub_id'], 2); if($Redirect->id > 0) { header('Location: https://barter.vg/i/'.$Redirect->id.'/'); exit; } $id = 0; } else { $id = (isset($_GET['id']) ? (int)$_GET['id'] : 0); } $Auth = new User(); $User = new User(); $Output = new Item(); if(isset($_COOKIE['login'])) { list($uid, $sid, $skey) = explode(",", $_COOKIE['login']); $Auth->auth('verify', 0, $sid, $skey); if($Auth->id > 0) { $Auth->reload(); $ignored = $Auth->ignored(); } } if(isset($_POST['request_addition'])) { $Add = new Item(); $request_add_to_wishlist = $_POST['add_to_wishlist'] ?? 0; $request_add_to_tradable = $_POST['add_to_tradable'] ?? 0; $request_status = $Add->requestAdd($_POST['id_to_add'], $_POST['source_id'], $Auth->id, $request_add_to_tradable, $request_add_to_wishlist, $_POST['comments']); } if($id > 0) { $Item = new Item($id); if($Auth->id > 0){ $Feed = new Feed(); $collection_type = $_POST['collection_type'] ?? 'tradeable'; if(isset($_POST['trading_tag_id'])){ $trading_notice_id = $Item->addTradeTag($_POST['trading_tag_id'], $Auth->id, $_POST['url'], $_POST['trading_tag_notes'], $_POST['trading_tag_value']); if($trading_notice_id > 0 && isset($_POST['sources'])){ if(count($_POST['sources'])){ foreach($_POST['sources'] as $notice_source){ list($notice_tag_type, $notice_tag_identifier) = explode("/", $notice_source); if($notice_tag_type == 'bundle'){ $notice_tag_type_id = 1; } elseif($notice_tag_type == 'giveaway'){ $notice_tag_type_id = 2; } elseif($notice_tag_type == 'store'){ $notice_tag_type_id = 3; } $Item->tradingNoticeTag($trading_notice_id, $notice_tag_type_id, $notice_tag_identifier); } } } } elseif(isset($_POST['remove_trading_tags'])){ $Item->removeTradeTags($Auth->id); } elseif(isset($_POST['remove_trading_notice'])){ $Item->removeTradeTag($_POST['remove_trading_notice'], $Auth->id); } elseif(isset($_POST['remove'])) { $removed = new Collection; $removed->create($Auth->id, 'removed'); $games_affected['count'] = $removed->move($_POST['remove']); $games_affected['method'] = 'removed'; } elseif(isset($_POST['move']) && $_POST['move'] > 0){ $Collection = new Collection; $collection_types = $Collection->types(); $move_to_collection_name = $collection_types['byid'][$_POST['move']]['type'] ?? ''; if($move_to_collection_name != ''){ $moveto = new Collection; $moveto->create($Auth->id, $move_to_collection_name); $games_affected['count'] = $moveto->move($_POST['move'], 'wishlist'); if($_POST['move'] != 'removed'){ $games_affected['method'] = 'moved to '.$collection_types['byid'][$_POST['move']]['name']; $reason_text = 'moved'; } } } elseif(isset($_POST['set']) && isset($_POST['edit'])){ // new actions $Collection = new Collection; $Collection->create($Auth->id, $collection_type); if(isset($_POST['quantity']) && $_POST['quantity'] != '') { if($_POST['quantity'][0] != '+' && $_POST['quantity'][0] != '-') { $item_quantity = (int)$_POST['quantity']; $games_affected['count'] = $Collection->itemQuantity($_POST['edit'], $_POST['quantity']); $games_affected['method'] = 'edited'; } elseif($_POST['quantity'][0] == '+' || $_POST['quantity'][0] == '-') { if($_POST['quantity'][0] == '+' && isset($_POST['quantity'][1])){ $item_quantity = (int)substr($_POST['quantity'],1); } else{ $item_quantity = (int)$_POST['quantity']; } $games_affected['count'] = $Collection->itemIncrement($_POST['edit'], $item_quantity); $games_affected['method'] = 'edited'; } } if(isset($_POST['tagged']) && $_POST['tagged'] != '') { $tag_vars = explode("," , $_POST['tagged']); if(isset($tag_vars[0]) && $tag_vars[0] != '' && isset($tag_vars[1])) { $tag_vars[0] = (int)$tag_vars[0]; $games_affected['count'] = $Collection->setRetailType($_POST['edit'], $tag_vars[0].','.$tag_vars[1]); $games_affected['method'] = 'tagged'; } elseif(isset($tag_vars[1]) && $tag_vars[2] == 0) { $games_affected['count'] = $Collection->setTier($_POST['edit'], $tag_vars[1]); $games_affected['method'] = 'tagged'; } if(isset($tag_vars[2]) && $tag_vars[2] != 0) { $tags_extras = (isset($_POST['tagged_extra']) && $_POST['tagged_extra'] != '' ? $_POST['tagged_extra'] : NULL); $games_affected['count'] = $Collection->tag($_POST['edit'], $tag_vars[2], $tags_extras); if($tag_vars[2] > 0) { $games_affected['method'] = 'tagged'; } else{ $games_affected['method'] = 'untagged'; } } if(isset($tag_vars[3]) && $tag_vars[3] != 0) { //$games_affected['count'] = $Collection->grouping($_POST['edit'], $tag_vars[3]); if($tag_vars[3] > 0) { $games_affected['method'] = 'tagged'; } else{ $games_affected['method'] = 'untagged'; } } } if(isset($_POST['tagged2']) && $_POST['tagged2'] != '') { $tag_vars = explode("," , $_POST['tagged2']); if(isset($tag_vars[0]) && $tag_vars[0] != '' && isset($tag_vars[1])) { $tag_vars[0] = (int)$tag_vars[0]; $games_affected['count'] = $Collection->setRetailType($_POST['edit'], $tag_vars[0] . ',' . $tag_vars[1]); $games_affected['method'] = 'tagged'; } elseif(isset($tag_vars[1]) && $tag_vars[2] == 0) { $games_affected['count'] = $Collection->setTier($_POST['edit'], $tag_vars[1]); $games_affected['method'] = 'tagged'; } if(isset($tag_vars[2]) && $tag_vars[2] != 0) { $games_affected['count'] = $Collection->tag($_POST['edit'], $tag_vars[2]); if($tag_vars[2] > 0) { $games_affected['method'] = 'tagged'; } else{ $games_affected['method'] = 'untagged'; } } if(isset($tag_vars[3]) && $tag_vars[3] != 0) { //$games_affected['count'] = $Collection->grouping($_POST['edit'], $tag_vars[3]); if($tag_vars[3] > 0) { $games_affected['method'] = 'tagged'; } else{ $games_affected['method'] = 'untagged'; } } } if(isset($_POST['add_bundle']) && $_POST['add_bundle'] != 0){ $add_bundle = (int)$_POST['add_bundle']; $games_affected['count'] = $Collection->setBundle($_POST['edit'], $add_bundle); $games_affected['method'] = 'bundled'; } foreach($_POST['edit'] as $edit){ $edited[$edit] = 1; } } elseif(isset($_POST['add_game_id'])) { $Collection = new Collection; $item_type = $_POST['item_type'] ?? ''; if(isset($_POST['tradable'])){ $Collection->create($Auth->id, 'tradeable'); } elseif(isset($_POST['wishlist'])){ $Collection->create($Auth->id, 'wishlist'); } elseif(isset($_POST['watchlist'])){ $Collection->create($Auth->id, 'watchlist'); } elseif(isset($_POST['blacklist'])){ $Collection->create($Auth->id, 'blacklist'); } elseif(isset($_POST['library'])){ $Collection->create($Auth->id, 'library'); } elseif(isset($_POST['scratchpad'])){ $Collection->create($Auth->id, 'scratchpad'); } elseif(isset($_POST['notification'])){ $Collection->create($Auth->id, 'notification'); } elseif(isset($_POST['reserve'])){ $Collection->create($Auth->id, 'reserve'); } $source_id = 0; $bundle_id = $_POST['add_bundle'] ?? 0; if($bundle_id > 0){ include_once('includes/Bundle.php'); $Bundle = new Bundle(); $Bundle->select($bundle_id); $source_id = $Bundle->source_id ?? 0; } $extra = (isset($_POST['quantity']) && is_numeric($_POST['quantity']) && $_POST['quantity'] >= 0 ? (int)$_POST['quantity'] : 1); $Item = new Item($_POST['add_game_id']); $games_affected['count'] = $Collection->add($Item, $source_id, $bundle_id, 0, $item_type, $_SERVER['REQUEST_TIME'], $extra); $edited = $Collection->added_line_ids; if(!isset($_POST['tradable'])){ $games_affected['count'] = $Collection->setRetailType($edited, '0,custom'); } if(isset($_POST['tagged']) && $_POST['tagged'] != '') { $tag_vars = explode("," , $_POST['tagged']); if(isset($tag_vars[0]) && $tag_vars[0] != '' && isset($tag_vars[1])) { $tag_vars[0] = (int)$tag_vars[0]; $games_affected['count'] = $Collection->setRetailType($edited, $tag_vars[0] . ',' . $tag_vars[1]); $games_affected['method'] = 'tagged'; } elseif(isset($tag_vars[1]) && $tag_vars[2] == 0) { $games_affected['count'] = $Collection->setTier($edited, $tag_vars[1]); $games_affected['method'] = 'tagged'; } if(isset($tag_vars[2]) && $tag_vars[2] != 0) { $tags_extras = (isset($_POST['tagged_extra']) && $_POST['tagged_extra'] != '' ? $_POST['tagged_extra'] : NULL); $games_affected['count'] = $Collection->tag($edited, $tag_vars[2], $tags_extras); if($tag_vars[2] > 0) { $games_affected['method'] = 'tagged'; } else{ $games_affected['method'] = 'untagged'; } } if(isset($tag_vars[3]) && $tag_vars[3] != 0) { //$games_affected['count'] = $Collection->grouping($_POST['edit'], $tag_vars[3]); if($tag_vars[3] > 0) { $games_affected['method'] = 'tagged'; } else{ $games_affected['method'] = 'untagged'; } } } if(isset($_POST['tagged2']) && $_POST['tagged2'] != '') { $tag_vars = explode("," , $_POST['tagged2']); if(isset($tag_vars[0]) && $tag_vars[0] != '' && isset($tag_vars[1])) { $tag_vars[0] = (int)$tag_vars[0]; $games_affected['count'] = $Collection->setRetailType($edited, $tag_vars[0] . ',' . $tag_vars[1]); $games_affected['method'] = 'tagged'; } elseif(isset($tag_vars[1]) && $tag_vars[2] == 0) { $games_affected['count'] = $Collection->setTier($edited, $tag_vars[1]); $games_affected['method'] = 'tagged'; } if(isset($tag_vars[2]) && $tag_vars[2] != 0) { $games_affected['count'] = $Collection->tag($edited, $tag_vars[2]); if($tag_vars[2] > 0) { $games_affected['method'] = 'tagged'; } else{ $games_affected['method'] = 'untagged'; } } if(isset($tag_vars[3]) && $tag_vars[3] != 0) { //$games_affected['count'] = $Collection->grouping($_POST['edit'], $tag_vars[3]); if($tag_vars[3] > 0) { $games_affected['method'] = 'tagged'; } else{ $games_affected['method'] = 'untagged'; } } } } elseif(isset($_POST['setCV'])){ $Item->setCV($_POST['newCV']); } if(isset($_POST['untag'])){ $Tags = new Collection; $Tags->create($Auth->id, $collection_type); list($unique_tag_id, $line_id) = explode(",", $_POST['untag']); $games_affected['count'] = $Tags->untagIndividual($unique_tag_id); $line_id = (int)$line_id; $edited[$line_id] = 1; $games_affected['method'] = 'untagged'; } if($Auth->permissions % 10000 >= 1000 ) { $updated = 0; if(isset($_POST['app_title'])) { $Item->setTitle($_POST['app_title']); if(isset($_POST['lock_title']) && $_POST['lock_title'] == 1){ $Item->updateTitleLock($_POST['lock_title']); } else{ $Item->updateTitleLock(0); } $updated = 1; } if(isset($_POST['store_title'])) { $Item->setTitleAlt($_POST['store_title']); if(isset($_POST['lock_title_alt']) && $_POST['lock_title_alt'] == 1){ $Item->updateTitleAltLock($_POST['lock_title_alt']); } else{ $Item->updateTitleAltLock(0); } $updated = 1; } if(isset($_POST['similar_title'])) { $Item->similarTitle($_POST['similar_title']); $updated = 1; } if(isset($_POST['cross'])){ $_POST['relatedIDs'] = 'i/'.$_POST['cross']; $_POST['type'] = 'cross'; } if(isset($_POST['falsecross'])){ $_POST['relatedIDs'] = 'i/'.$_POST['falsecross']; $_POST['type'] = 'false cross'; } if(isset($_POST['relatedIDs'])){ $relations_array = $Item->addRelated($_POST['relatedIDs'], $_POST['type']); if(isset($relations_array) && count($relations_array) > 0){ $feed_data = array(); $relationship_type_text = htmlentities($_POST['type']); foreach($relations_array as $relationship_item_id){ $Game = new Item($relationship_item_id); $game_title = $Game->title(); $feed_data[1] = array('type' => 1, 'var1' => dechex($Auth->id), 'text' => $Auth->steam_persona); $feed_data[2] = array('type' => 6, 'text' => $relationship_type_text); $feed_data[3] = array('type' => 3, 'var1' => $relationship_item_id, 'text' => $game_title); $Feed->activity(47, $feed_data); $Feed->connect('item', $id, 47); $Feed->connect('user', $Auth->id, 47); } } } if(isset($_POST['price_set'])) { $Item->priceSet($_POST['price_high'],$_POST['price_eur_high'],$_POST['price_rub_high'],$_POST['price_rmb_high']); //print_r($_POST['price_high'].' '.$_POST['price_eur_high'].' '.$_POST['price_rub_high'].' '.$_POST['price_rmb_high']); $setIsFree = $_POST['price_free'] ?? -1; $Item->setIsFree($setIsFree); } if(isset($_POST['notes'])) { $Item->addNotes($_POST['notes'], $Auth->id); $updated = 1; } if(isset($_POST['is_tradable'])) { $Item->isTradable($_POST['is_tradable']); $updated = 1; } if(isset($_POST['sync_with_store'])) { $Item->syncWithStore($_POST['sync_with_store']); $updated = 1; } if(isset($_POST['sku'])) { $Item->setSKU($_POST['sku'], $_POST['platform_id']); } if(isset($_POST['nscr_move'])){ // create notice list($non_steam_item_id, $non_steam_source_id) = explode(",", $_POST['nscr_item_id']); $non_steam_notice_id = 612; $non_steam_note = 'Non-Steam keys of this game have been bundled or given away. To reduce the number of users adding the wrong tradables, this Steam item is temporarily set to \'Not Tradable\''; $non_steam_url = 'https://barter.vg/i/'.$non_steam_item_id.'/'; $trading_notice_id = $Item->addTradeTag($non_steam_notice_id, $Auth->id, $non_steam_url, $non_steam_note, NULL, $_POST['nscr_end'], 1, $Auth->id); // move tradables added within time period $Item->replace($non_steam_item_id, 1, 0, $_POST['nscr_start'], $_POST['nscr_end']); // set to not tradable $Item->isTradable(0); } if(isset($_POST['redirect'])) { $Item->redirect($_POST['redirect']); if(isset($_POST['move_tradables'])){ $Item->replace($_POST['redirect'], 1, 0); } if(isset($_POST['move_wishlists'])){ $Item->replace($_POST['redirect'], 2, 0); } if(isset($_POST['move_libraries'])){ $Item->replace($_POST['redirect'], 3, 0); } if(isset($_POST['move_blacklists'])){ $Item->replace($_POST['redirect'], 4, 0); } } elseif(isset($_POST['removeRelated'])){ $feed_data = array(); $Game = new Item(); $related_info = $Game->relatedInfo($_POST['removeRelated']); // print_r($related_info); // print_r($_POST['removeRelated']); $Title = new Item($related_info['link_id']); $game_title = $Title->title(); $feed_data[1] = array('type' => 1, 'var1' => dechex($Auth->id), 'text' => $Auth->steam_persona); $feed_data[2] = array('type' => 6, 'text' => $related_info['link_type']); $feed_data[3] = array('type' => 3, 'var1' => $related_info['link_id'], 'text' => $game_title); $remove_related = $Item->removeRelated($_POST['removeRelated']); if($remove_related > 0){ $Feed->activity(49, $feed_data); $Feed->connect('item', $id, 49); $Feed->connect('user', $Auth->id, 49); } } elseif(isset($_POST['cardsMarketable'])) { $Item->cardsMarketable($_POST['cardsMarketable']); } elseif(isset($_POST['change_item_type'])) { $Item->changeItemType($_POST['change_item_type']); if(isset($_POST['lock_title'])){ $Item->updateTypeLock($_POST['lock_title']); } else{ $Item->updateTypeLock(0); } } elseif(isset($_POST['removeTag'])) { $Item->removeTag($_POST['removeTag']); } elseif(isset($_POST['restoreTag'])) { $Item->restoreTag($_POST['restoreTag']); } elseif(isset($_POST['removeSteamTracker'])) { $Item->removeTracker($_POST['removeSteamTracker']); } elseif(isset($_POST['itad_override'])) { $Item->itadOverride($_POST['itad_override']); } elseif(isset($_POST['changeTitleMatch'])) { foreach($_POST['changeTitleMatch'] as $title_id => $new_item_id) { $Item->titleMatchChange($title_id, $new_item_id); } } elseif(isset($_POST['addTitleMatch'])) { $Item->addTitleMatch($_POST['addTitleMatch']); } elseif(isset($_POST['game_tag'])) { $Item->tag($_POST['game_tag'], $_POST['game_tag_ordering']); } elseif(isset($_POST['change_steamgifts_cv'])) { $Item->changeCV($_POST['change_steamgifts_cv']); } } } $info = $Item->info(); if($info['id'] == 0) { header("HTTP/1.1 404 Not Found", true, 404); } $sources = $Item->sources(); $related_items = $Item->related(); $inbundles = $Item->inBundles(); $in_bundle_count = count($inbundles); if($in_bundle_count > 0){ include_once('includes/Bundle.php'); $Bundle = new Bundle(); $magic_tiers = $Bundle->magicTiers(); } $ingiveaways = $Item->inGiveaways(); $trading_tags = $Item->getTradeTags($Auth->id); $notes = $Item->notes(); $steam_tracker = $Item->trackerStatus(); $user_rating_unowned = $user_rating = $info['user_reviews_positive'] ?? 0; if($user_rating_unowned < 0){ $user_rating_unowned = 0; } $item_cards = (isset($info['cards']) && $info['cards'] > 0 ? 1 : 0); $item_givenaway = (isset($ingiveaways) && count($ingiveaways) > 0 ? 1 : 0); $item_bundled = (isset($inbundles) && count($inbundles) > 0 ? 1 : 0); $item_achievements = (isset($info['achievements']) && $info['achievements'] > 0 ? 1 : 0); $item_steam = (isset($info['source_id']) && ($info['source_id'] == 1 || $info['source_id'] == 2) ? 1 : 0); $item_is_base = (isset($info['item_type']) && ($info['item_type'] == 'unset' || $info['item_type'] == 'base' || $info['item_type'] == 'Game') ? 1 : 0); } ?> <?php if(isset($info['id']) && $id > 0){ print $info['title'].' ('.$info['source_name'].(isset($_GET['c']) ? ' Trading Cards':'').')'; } if(isset($_GET['a'])){ print ' player estimates and achievements'; } ?> 0) { $meta_description = $info['title'].' on '.$info['source_name'].'. '; if(isset($info['user_reviews_total']) && $info['user_reviews_total'] > 0 && $info['user_reviews_positive'] >= 0) { $meta_description .= $info['user_reviews_positive'].'% positive of '.$info['user_reviews_total'].' user reviews. '; //print ''; //print ''; //print ''; //print ''; } if(isset($info['cards']) && $info['cards'] > 1) { $meta_description .= 'With '.($info['cards'] > 1 ? $info['cards'] : '').' trading cards'; } if(isset($info['achievements']) && $info['achievements'] > 0) { if(isset($info['cards']) && $info['cards'] > 0){ $meta_description .= ' and'; } else{ $meta_description .= 'With'; } $meta_description .= ' '.($info['achievements'] > 0 ? $info['achievements'] : '').' achievement'.($info['achievements'] != 1 ? 's' : '').'.'; } $meta_description .= ' '.(isset($info['tradable']) ? $info['tradable'] : '0').' user'.(isset($info['tradable']) && $info['tradable'] == 1 ? ' has' : 's have').' this game to trade, '.(isset($info['wishlist']) ? $info['wishlist'] : '0').' '.(isset($info['wishlist']) && $info['wishlist'] == 1 ? ' wants' : 'want').' it, and '.(isset($info['library']) ? $info['library'] : '0').' '.(isset($info['library']) && $info['library'] == 1 ? ' owns' : 'own').' it in library.'; $meta_description .= ' In '.($info['bundles_all'] + $info['bundles_packages']).' bundle'.($info['bundles_all'] + $info['bundles_packages'] != 1 ? 's' : '').' and '.$info['giveaway_count'].' giveaway'.($info['giveaway_count'] != 1 ? 's':'').'.'; print ''; print ''; print ''; print ''; if(isset($info['trailer']) && $info['trailer'] > 0 && isset($_SERVER['HTTPS'])) { //print ''; //print ''; } if($info['sku'] != '' && ($info['source_id'] == 1 || $info['source_id'] == 2)) { print ''; } if($info['wishlist'] < 1 && $info['tradable'] < 1 || isset($_GET['c'])) { print ''; } } else { print ''; } ?>
 
'; if($Auth->id == 160 && $id > 0) { //$processing_time = round(microtime(true) - $starttime, 3); // print '
Overhead processing time: '.$processing_time.' (0.2 or higher is slow; final time at bottom)

'; } $section = 'browse'; include('includes/global/miscnav.php'); if(isset($id) && $id > 0 && isset($info['id'])) { if(isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'], '?') !== FALSE && !isset($_GET['a'])) { $Persona = new User(); $user_results = $Persona->query($info['title']); print '

Exact Title Match Found view full search results

'; if(isset($user_results) && count($user_results)) { print '

Looking for a username? '; foreach($user_results as $u) { print ' '.$u['steam_persona'].' '.$u['steam_id'].' '; } print '

'; } } if($Auth->permissions % 10000 >= 1000 && $info['title'] != '[ adding... ]'){ $cross_platform_titles = $Item->queryCrossPlatform(); if(count($cross_platform_titles)){ print '
Crossplatform title matches
'; } } print '

'.$info['title'].'

'; if(title_format($info['title']) != title_format($info['title_alt'])) { print '
'.$info['title_alt'].'
'; } /* $stmt = $GLOBALS['mysqli']->prepare("SELECT id, status, user_id, prize_name, prize, claimed FROM eggs WHERE item_id = ?"); $stmt->bind_param("i", $id); $stmt->execute(); $stmt->bind_result($egg_id, $egg_status, $egg_user_id, $egg_prize_name, $egg_prize, $egg_claimed); $stmt->fetch(); $stmt->close(); if(isset($egg_user_id) && $Auth->id > 0){ if($egg_user_id == 0 && $egg_status > 0){ if((isset($_POST['egg_claim_code']) && $_POST['egg_claim_code'] == sha1($egg_id.'l&vabQ.l8vq+^O=&8JseMN'))){ $stmt = $GLOBALS['mysqli']->prepare("UPDATE eggs SET user_id = ?, claimed = ?, status = 2 WHERE id = ?"); $stmt->bind_param("iii", $Auth->id, $_SERVER['REQUEST_TIME'], $egg_id); $stmt->execute(); $egg_updated = $GLOBALS['mysqli']->affected_rows; $stmt->close(); if($egg_updated > 0){ print '
πŸ₯³ '.$egg_prize_name.' '.$egg_prize.'
'; } else{ print '
Either this broke or someone clicked faster.
'; } } else{ print '
'; print '
Unclaimed Egg!
'; print '
'; } } elseif($egg_user_id > 0){ print '
Claimed Egg 🍳
'; if($Auth->id == $egg_user_id && $Auth->id > 0){ print '
πŸ₯³ '.$egg_prize_name.' '.$egg_prize.'
'; } } } elseif($id == 117358){ if(isset($_POST['egg_claim_code'])){ print '
πŸ₯³ Exampe Prize Code
'; } else{ print '
'; print '
Example Egg
'; print '
'; } } */ if(isset($_GET['a'])) { if(isset($info['image_status']) && $info['image_status'] < 0){ print '
...
'; } elseif(isset($info['sku']) && ($info['source_id'] == 1 || $info['source_id'] == 2)){ if((!isset($steam_tracker['type']) || $steam_tracker['store_page'] >= 0) && (!isset($info['page_status']) || $info['page_status'] != 'gone')){ // or adult print '", $info['sku'], $info['source_profile']).'">'; print ''.$info['title'].' cover art'; } else{ print ''.$info['title'].' cover art'; } } $achievement_players = $Item->achievementPlayers(); $time_id_select = ''; $selected_time_id = $most_recent_time_id = 0; $previous_day = 0; if(isset($achievement_players) && count($achievement_players)) { $time_id_select .= ' '; } print ''; print '
'; $in_bundle_count = count($inbundles); if(isset($info['bundles_all'])){ print '
Bundle Count
'; print '
'.($info['bundles_all'] + $info['bundles_packages'] > 0 ? '':'').($info['bundles_all'] + $info['bundles_packages']).($info['bundles_all'] + $info['bundles_packages'] > 0 ? '':'').'
'; } if(isset($info['price_high']) && $info['price_high'] >= 0){ print '
Retail Price US$
'; $price_updated = time_format($info['price_updated']); if(!isset($steam_tracker['type'])){ print '", $info['sku'], $info['source_profile']).'" title="$'.number_format($info['price'] / 100, 2).' updated '.$price_updated['text'].'">'; } else{ print ''; } print number_format($info['price_high'] / 100, 2); if(!isset($steam_tracker['type'])){ print ''; } else{ print ''; } print '
'; } print '
'; print '

Achievements '.$time_id_select.'

'; if(isset($_POST['time_id'])){ $selected_time_id = (int)$_POST['time_id']; } if($selected_time_id == 0 || ($selected_time_id <= 2260 && $id != 41830)){ $selected_time_id = $most_recent_time_id; } $achievement_percents = $Item->achievementPercents($selected_time_id); if(isset($achievement_percents) && count($achievement_percents)) { print '

The numbers of players are estimated by Barter.vg based on the achievement percents from Steam.

'; print ''; print ''; foreach($achievement_percents as $achievement_id => $achievement) { if(!isset($achievement['percent'])){ print ''; } else{ print ''; } } print '
Achievement NamePercentPlayers
[ All Players Estimated ] 100.0'.number_format(1 * $achievement_players[$selected_time_id]['players'], 1).'
'.$achievement['name'].'......
'.$achievement['name'].''.($Auth->id == 159 ? number_format($achievement['percent'], 6) : number_format($achievement['percent'], 1)).''.number_format(.01 * $achievement['percent'] * $achievement_players[$selected_time_id]['players'], 1).'
'; print '

 

'; print '

View achievements on Steam

'; print '

How are the numbers of players estimated?
Percent of players with achievement = (Number of players with achievement) / (All Players)
The estimation process deduces the number of All Players based upon the percentage of players that have each achievement and the constraint that the numbers of players should be integers.

Percent of players with achievement (e.g. 1.80020272731781006) is provided by Steam through a public API, but both Number of players with achievement and All Players are unknown. However, All Players values should be intergers (1.5 players wouldn\'t make sense), and should be within a range established by other factors such as the number of player reviews.

'; print '

Why are there fractional numbers of players?
With a strict criteria of all integer player counts, some games produce no suitable results. Therefore, the process allows for a certain amount of error and thus fractional players.

'; } } elseif(isset($_GET['c'])) { include('includes/info/cards.php'); } else { if($Auth->permissions % 10000 >= 1000 ) { print ''; print '
'; print '

'; print '

'; print '

'; print '

0 ? 'checked="checked"':'').' value="1" />           

'; print '

'; print '

   

'; print '

 

'; print '

i/  

'; print '

Move tradables and make it more difficult to add them for the specified time
to

'; print '

'; print '

'; print '

'; print '
'; } print '
'; if($info['source_id'] == 1) { print ''; } elseif($info['source_id'] == 2) { print ''; } elseif($info['source_id'] == 85) { print ''; } print (isset($sources[$info['source_id']]['icon']) ? ' ' : ''); print $info['source_name']; if($info['source_id'] == 1 || $info['source_id'] == 2 || $info['source_id'] == 85){ print ' '.($info['source_id'] == 1 ? '' : 'sub/').$info['sku'].''; } if($info['source_id'] == 1){ print ' | 0) ? 'class="failed"' : 'class="bold"').'>Store'; } if(isset($steam_tracker['type'])){ print ' '; if($steam_tracker['type_id'] == 7 && isset($info['page_status']) && $info['page_status'] == 'ok'){ print 'Purchase disabled video'; } else{ print $steam_tracker['type']; } if(isset($steam_tracker['changed_at']) && $steam_tracker['changed_at'] > 0){ print ' '.date("F Y", strtotime($steam_tracker['changed_at'])).''; } elseif($steam_tracker['created'] > 0){ print ' '.date("F Y", $steam_tracker['created']).''; } if($steam_tracker['type_id'] > 0){ print ' '; } if($Auth->permissions % 10000 >= 1000){ // is there any reason to remove Steam-tracker? // print '
'; } print '
'; } elseif(isset($info['page_status']) && $info['page_status'] == 'gone'){ print ' page gone?'; } if(isset($info['genres'][520]) && $info['genres'][520]['ordering'] > 0){ print ' πŸ”ž'; } if(isset($info['win']) && ($info['win'] == 1 || $info['mac'] == 1 || $info['linux'] == 1)){ print ' | '; if($info['win'] == 1) { print 'Windows'; if($info['mac'] == 1 || $info['linux'] == 1){ print ', '; } } if($info['mac'] == 1) { print 'macOS'; if($info['linux'] == 1){ print ', '; } } if($info['linux'] == 1){ print 'Linux '; } } if($info['source_id'] == 19){ print ' Steam Market'; } elseif(isset($info['base_item_id']) && $info['base_item_id'] > 0 && isset($info['item_type']) && $info['item_type'] != 'Unknown' && $info['item_type'] != 'unset'){ print ' '.($info['item_type'] == 'dlc' ? 'DLC' : ucfirst($info['item_type']) ).' '; } elseif(isset($info['item_type']) && $info['item_type'] != 'unset' && $info['item_type'] != 'Game' && $info['item_type'] != 'Unknown' && $info['item_type'] != 'unset'){ print ' '.($info['item_type'] == 'dlc' ? 'DLC' : ucfirst($info['item_type']) ).' '; } if($Auth->permissions % 10000 >= 1000 && isset($info['item_type'])) { // $item_types = array('Game','dlc','Music','Media','demo','Application','Advertising','Tool','Mod','Series','Config','Guide','Hardware','StoreOnly','Episode','video','other','Unknown','unset'); $item_types = $Item->listTypes(); print '
'; print ' '; // print ' '; print '
'; } print '
'; if(isset($info['image_status']) && $info['image_status'] < 0){ print '
'; } elseif(isset($info['sku']) && ($info['source_id'] == 1 || $info['source_id'] == 2)) { if((!isset($steam_tracker['type']) || $steam_tracker['store_page'] >= 0) && (!isset($info['page_status']) || $info['page_status'] != 'gone' || isset($info['genres'][520]))){ print '", $info['sku'], $info['source_profile']).'">'; print ''.$info['title'].' cover art'; } else{ print ''.$info['title'].' cover art'; } } if(isset($info['trailer']) && $info['trailer'] > 0 && isset($_SERVER['HTTPS']) && ((isset($Auth->id) && $Auth->id > 0) || !$info['adultonly'])){ print ''; } if(isset($info['title_extra']) && $info['title_extra'] != '') { print '

Distinguisher: '.$info['title_extra'].'

'; } if(isset($info['redirect']) && $info['redirect'] > 0) { print '

This was a duplicate item. It was merged into this profile page

'; } elseif(isset($info['item_type']) && $info['item_type'] == 'NFT') { // cannot add to collections } elseif(isset($Auth->id) && $Auth->id > 0) { print '
'; print '
'; print ''; $collection_items_shown = false; if((isset($userOnlists['tradeable']) && count($userOnlists['tradeable'])) || (isset($userOnlists['reserve']) && count($userOnlists['reserve'])) ){ $collection_items_shown = true; $tradablesOnlist = $Auth->collection($id,1); $reservesOnlist = $Auth->collection($id,11); $tradablesOnlist = array_merge($tradablesOnlist, $reservesOnlist); print '

'; } $i = $in_bundle_as_package = 0; if(isset($info['source_id']) && $info['source_id'] != 85 && $info['is_tradable'] == 1){ if($collection_items_shown){ print '
'; print ''.(isset($edited) ? count($edited) : 0).' '; } else{ print '
'; } include('includes/manage/edit_tagged.php'); print ' '; if($Auth->id == 160 || $Auth->id == 907 || $Auth->id == 1063){ $packages = $Item->packages(); print ' '; } if(isset($userOnlists['tradeable']) || isset($userOnlists['reserve'])){ print ' '; print ' '; } print '
'; print '

'; } print ''; /* $collection_items_shown = false; if(isset($userOnlists['reserve']) && count($userOnlists['reserve'])){ $collection_items_shown = true; $reservesOnlist = $Auth->collection($id,11); print '

    '; print '
  •  +  
  • '; foreach($reservesOnlist as $onlist){ unset($groupingTag); if(isset($onlist['grouping']) && $onlist['grouping'] > 0){ $groupingTag = groupingTag($onlist['grouping']); } print ''; print '
'; } if(isset($info['source_id']) && $info['source_id'] != 85 && $info['is_tradable'] == 1){ if($collection_items_shown){ print '
'; print ''.(isset($edited) ? count($edited) : 0).' '; } else{ print '
'; } include('includes/manage/edit_tagged.php'); print ' '; if(isset($userOnlists['tradeable']) || isset($userOnlists['reserve'])){ print ' '; print ' '; } print '
'; print '

'; } print ''; */ if((isset($userOnlists['wishlist']) && count($userOnlists['wishlist'])) || (isset($userOnlists['watchlist']) && count($userOnlists['watchlist'])) || (isset($userOnlists['notification']) && count($userOnlists['notification'])) ){ print '
'; $collection_items_shown = true; $wishlistOnlist = $Auth->collection($id, 2); $watchlistOnlist = $Auth->collection($id, 10); $notificationOnlist = $Auth->collection($id, 13); $wishlistOnlist = array_merge($wishlistOnlist, $watchlistOnlist); $wishlistOnlist = array_merge($wishlistOnlist, $notificationOnlist); print '
    '; foreach($wishlistOnlist as $onlist){ unset($groupingTag); if(isset($onlist['grouping']) && $onlist['grouping'] > 0){ $groupingTag = groupingTag($onlist['grouping']); } print ''; print '
'; print '
'; //print ''.(isset($edited) ? count($edited) : 0).' '; $section = 'w'; include('includes/manage/edit_tagged.php'); $section = 'browse'; /* print ' '; */ if(isset($userOnlists['wishlist']) || isset($userOnlists['watchlist']) || isset($userOnlists['notification'])){ print ' '; print ' '; } //print ' '; print '
'; print '
'; print '

'; } if((isset($userOnlists['blacklist']) && count($userOnlists['blacklist'])) || (isset($userOnlists['scratchpad']) && count($userOnlists['scratchpad'])) || (isset($userOnlists['library']) && count($userOnlists['library'])) ){ print '
'; $collection_items_shown = true; $blacklistOnlist = $Auth->collection($id, 4); $scatchpadOnlist = $Auth->collection($id, 9); $libraryOnlist = $Auth->collection($id, 3); $scatchpadOnlist = array_merge($scatchpadOnlist, $blacklistOnlist); $scatchpadOnlist = array_merge($scatchpadOnlist, $libraryOnlist); print '
    '; foreach($scatchpadOnlist as $onlist){ unset($groupingTag); if(isset($onlist['grouping']) && $onlist['grouping'] > 0){ $groupingTag = groupingTag($onlist['grouping']); } print ''; print '
'; print '
'; //print ''.(isset($edited) ? count($edited) : 0).' '; $section = 'w'; include('includes/manage/edit_tagged.php'); $section = 'browse'; if(isset($userOnlists['scratchpad']) || isset($userOnlists['blacklist']) || isset($userOnlists['library'])){ print ' '; print ' '; print ' '; } print '
'; print '
'; print '

'; } } print ''; if(isset($info['cards']) && $info['cards'] > 0) { print ''; } } if($info['source_id'] == 1 && isset($info['user_reviews_all']) && $info['user_reviews_all'] > 0) { print ''; } if(isset($info['bundles_all'])){ print ''; print ''; print ''; } if($Auth->permissions % 10000 >= 1000 && isset($info['steamgifts_cv'])) { print ''; print ''; print ''; } if(isset($info['price_high']) && $info['price_high'] >= 0) { print ''; } } elseif($info['source_id'] <= 2){ print ''; } /* if(isset($info['price_euro_high']) && $info['price_euro_high'] > 0 && ($Auth->id == 1063 || $Auth->id == 907 || $Auth->id == 160)) { print ''; print ''; } if(isset($info['price_ruble_high']) && $info['price_ruble_high'] > 0 && ($Auth->id == 1063 || $Auth->id == 907 || $Auth->id == 160)) { print ''; print ''; } if(isset($info['price_yuan_high']) && $info['price_yuan_high'] > 0 && ($Auth->id == 1063 || $Auth->id == 907 || $Auth->id == 160)) { print ''; print ''; } */ if((isset($info['achievements']) && $info['achievements'] > 0) || (isset($info['achievements_counted']) && $info['achievements_counted'] > 0)) { print ''; } if(isset($info['release_date']) && $info['release_date'] > 0) { $steam_time_offset = (60 * 60 * 17); $release_time_ago = time_format($info['release_date'] + $steam_time_offset); print ''; } // Steamspy owner info no longer updates correctly due to API changes /* if(isset($info['owners_min']) && isset($info['owners_max']) && $info['owners_max'] > 0) { print ''; } */ if(isset($info['player_count']) && $info['player_count'] > 0 && $info['achievements_distinct'] > 2 && $info['item_type'] != 'demo' && $info['player_count_hidden'] == 0) { // print ''; } //if($Auth->offers_completed >= 1){ if(isset($info['credits'][1])){ print ''; } if(isset($info['credits'][2])){ print ''; } //} print '
Trading card icon'; if($info['cards'] > 0) { if(!isset($Auth->link_to_cards) || $Auth->link_to_cards == 0 || $Auth->link_to_cards == 4) { print ''; } elseif($Auth->link_to_cards == 1){ print ''; } elseif($Auth->link_to_cards == 2){ print ''; } elseif($Auth->link_to_cards == 3){ print ''; } elseif($Auth->link_to_cards == 5){ print ''; } elseif($Auth->link_to_cards == 6){ print ''; } print ($info['cards'] > 1 ? $info['cards'] : '...').''; print 'Trading Cards'; print 'badge '; print '(foil), '; print 'market '; print '(foil), '; print 'items'; if(isset($info['cards_marketable']) && $info['cards_marketable'] == -1) { print '
Not Marketable cannot buy or sell cards ( why? )'; if($Auth->permissions % 10000 >= 1000) { print '
'; } } elseif($Auth->permissions % 10000 >= 1000 && isset($steam_tracker['type'])) { print '
'; } print '
thumb up icon'; if(!isset($steam_tracker['type'])){ print '", $info['sku'], $info['source_profile']).'#app_reviews_hash" class="swi-skip">'; } if(isset($info['user_reviews_total']) && $info['user_reviews_total'] > 0 && $info['user_reviews_positive'] >= 0) { print $info['user_reviews_positive'].'%'; } else{ print '...'; } if(!isset($steam_tracker['type'])){ print ''; } print 'User Reviews'; print ''; if(isset($info['user_reviews_total']) && $info['user_reviews_total'] > 0) { print number_format($info['user_reviews_total']); print ' review'.($info['user_reviews_total'] != 1 ? 's':''); } else{ print 'Too few reviews to generate score'; } print ''; print '
'.($info['bundles_all'] + $info['bundles_packages'] > 0 ? '':'').($info['bundles_all'] + $info['bundles_packages']).($info['bundles_all'] + $info['bundles_packages'] > 0 ? '':'').'Bundle Count'; if($info['bundles_all'] + $info['bundles_packages'] + $info['bundles_available'] > 0){ print $info['bundles_available'].' active'; } print ($info['bundles_packages'] > 0 ? ', '.$info['bundles_packages'].' as packages' : ''); print ($in_bundle_count > ($info['bundles_all'] + $info['bundles_packages']) ? ' excludes specials' : '' ); print ($info['bundles_rebundled'] > 0 ? ', '.$info['bundles_rebundled'].' rebundled' : ''); print ($info['bundles_notcounted'] > 0 ? ', '.$info['bundles_notcounted'].' not counted' : ''); print '
CV'.(isset($info['price_high']) && isset($info['steamgifts_cv']) ? number_format($info['steamgifts_cv'] * $info['price_high'] / 10000, 2) : '...').'Steamgifts
'.$info['steamgifts_cv'].'% '; print ' Official:'.(isset($info['steamgifts_cv_points']) ? number_format($info['steamgifts_cv_points']).'%' : '').' '.(isset($info['effective_date']) ? ''.$info['effective_date'].'' : ''); print '
'; print '
$'; $price_updated = time_format($info['price_updated']); if(!isset($steam_tracker['type'])){ print '", $info['sku'], $info['source_profile']).'" class="swi-skip" title="'.($info['price'] > 0 ? '$'.number_format($info['price'] / 100, 2) : '').' updated '.$price_updated['text'].'">'; } else{ print ''; } print number_format($info['price_high'] / 100, 2); if(!isset($steam_tracker['type'])){ print ''; } else{ print ''; } print 'Retail Price'; if($info['price_high'] != $info['price'] && $info['price'] > 0){ print ''.number_format($info['price'] / 100, 2).' '; } if($info['source_id'] <= 2) { print 'SteamDB, ITAD
$?Retail Pricecheck SteamDB, ITAD
Retail Price €'; $price_updated = time_format($info['price_updated']); if(!isset($steam_tracker['type'])){ print '", $info['sku'], $info['source_profile']).'" title="€'.number_format($info['price_euro'] / 100, 2).' updated '.$price_updated['text'].'">'; } else{ print ''; } print number_format($info['price_euro_high'] / 100, 2); if(!isset($steam_tracker['type'])){ print ''; } else{ print ''; } print ''; //print 'history, global'; print '
Retail Price β‚½'; $price_updated = time_format($info['price_updated']); if(!isset($steam_tracker['type'])){ print '", $info['sku'], $info['source_profile']).'" title="β‚½'.number_format($info['price_ruble'] / 100, 0).' updated '.$price_updated['text'].'">'; } else{ print ''; } print number_format($info['price_ruble_high'] / 100, 0); if(!isset($steam_tracker['type'])){ print ''; } else{ print ''; } print ''; //print 'history, global'; print '
Retail Price ε…ƒ'; $price_updated = time_format($info['price_updated']); if(!isset($steam_tracker['type'])){ print '", $info['sku'], $info['source_profile']).'" title="ε…ƒ'.number_format($info['price_yuan'] / 100, 0).' updated '.$price_updated['text'].'">'; } else{ print ''; } print number_format($info['price_yuan_high'] / 100, 0); if(!isset($steam_tracker['type'])){ print ''; } else{ print ''; } print ''; //print 'history, global'; print '
🏆'.$info['achievements']; /* if(isset($info['achievements_counted']) && $info['achievements_counted'] > 0 && $info['achievements_counted'] != $info['achievements']){ print ' ('.$info['achievements_counted'].')'; } */ if(isset($info['achievements_broken']) && $info['achievements_broken'] > 0){ $achievement_broken_updated = time_format($info['achievements_broken_updated']); print ' -'.$info['achievements_broken'].''; } print ''; print 'Achievements'; print itemLinkAstats($info['sku'], 'AStats', LinkToTitleIconType::ICON_PNG); print itemLinkSteamHunters($info['sku'], 'Steam Hunters', LinkToTitleIconType::ICON_PNG); print itemLinkCompletionist($info['sku'], 'Completionist.me', LinkToTitleIconType::ICON_PNG); if($info['achievements_min'] >= 0){ // '.$info['achievements_counted'].' found: //print ' ('.number_format($info['achievements_min']/100,1).'% to '.number_format($info['achievements_max']/100,1).'%)'; } print '
📅'.$info['year'].'-'.str_pad($info['month'], 2, '0',STR_PAD_LEFT).'-'.str_pad($info['day'], 2, '0', STR_PAD_LEFT).''; print 'Release Date'; print ''.$release_time_ago['text'].'
SteamSpy iconid == 160){ print 'title="'.number_format($info['owners']).' Β± '.number_format($info['owners_variance']).' owners on Steam"'; } print '>'; function number_format_abbr($number, $symbol = 1) { if($number >= 1000000){ return number_format($number / 1000000).($symbol == 1 ? 'M' : ''); } elseif($number >= 1000) { return number_format($number / 1000).($symbol == 1 ? 'k' : ''); } else{ return $number; } } print number_format_abbr($info['owners_min'], 1).' - '.number_format_abbr($info['owners_max']).''; print 'Owners (est.)update, origin story'; print '
All Players (beta)'.($info['player_count'] >= 10000000 ? '~'.number_format($info['player_count']/1000000).' million' : number_format($info['player_count'])).'browse all player counts
Developer'; $comma = ''; foreach($info['credits'][1] as $dev){ print $comma.''.$dev['name'].''; $comma = ', '; } print '
Publisher'; $comma = ''; foreach($info['credits'][2] as $pub){ print $comma.''.$pub['name'].''; $comma = ', '; } print '
'; if(isset($notes) && $notes['note'] != '') { $Parsedown = new Parsedown(); print '

'.$Parsedown->line($notes['note']); $note_updated = time_format($notes['updated']); print ' updated '.$note_updated['text'].' by '.$notes['user'].'

'; //print '

'.$notes.'

'; } $related_items_count = count($related_items); $related_items_html = ''; if(isset($related_items) && $related_items_count > 0){ $relatedOnLists = array(); $i = $related_items_more_area = 0; $related_subs = array(); $related_items_html .= '

Related '.$related_items_count.'

    '; $divider = $related_items_code = ''; foreach($related_items as $related_id => $item){ if($item['link_type'] == 'false cross' && $Auth->permissions % 10000 < 1000){ continue; } if($i == 5 && $related_items_count > 6){ $related_items_html .= '
    '; $related_items_more_area = 1; } $i += 1; $related_items_html .= '
  • '; if(isset($item['source_icon'])){ $related_items_html .= ''.$item['source_name'].' icon '; } $related_items_html .= $item['title'].' '; if($item['link_type'] == 'bundle'){ $related_items_html .= 'package'; } else{ $related_items_html .= ($item['link_type'] == 'cross' ? $item['source_name'] : $item['link_type']); } $related_items_html .= ''; if($Auth->permissions % 10000 >= 1000){ $related_items_html .= ' '; } $related_items_html .= '
  • '; if($item['link_type'] == 'bundle' && $item['source_id'] != 9){ $related_subs[] = $item['item_id']; } $related_items_code .= $divider.'i/'.$item['item_id']; $divider = ', '; } $related_items_html .= '
'; } //if($Auth->id == 160){ print_r($relatedOnLists); } if((isset($trading_tags['all']) && count($trading_tags['all']) > 0) || (isset($trading_tags['verified']) && count($trading_tags['verified']) > 0) || (isset($ingiveaways) && count($ingiveaways) > 0) || (isset($info['is_free']) && $info['is_free'] > 0 && $info['price'] <= 0) || ($Auth->id > 0 && $Auth->offers_unique >= 0) ){ print '

Notices

'; $comma = ''; print '
    '; if(isset($trading_tags['verified']) && count($trading_tags['verified']) > 0){ foreach($trading_tags['verified'] as $trading_tag_id => $item){ if($trading_tag_id == 349 || $trading_tag_id == 351){ continue; } $tag_time_ago = time_format($item['added']); print '
  • '; if(isset($item['tag_value']) && $item['tag_value'] != ''){ if($item['tag_value'] > 1000000001){ print date("Y-m-d", $item['tag_value']); } else{ print $item['tag_value']; } print ' '; } print $item['name']; print ''; if($item['url'] != '' && (strpos($item['url'], 'https://support.humblebundle.com/') === 0 || strpos($item['url'], 'https://steamcommunity.com/') === 0 || strpos($item['url'], 'https://www.steamgifts.com/') === 0 || strpos($item['url'], 'https://barter.vg/') === 0 || strpos($item['url'], 'https://steamdb.info/') === 0 || strpos($item['url'], 'https://store.steampowered.com/') === 0 || strpos($item['url'], 'https://www.reddit.com/') === 0)){ print ' '; } if(isset($trading_tags['related'][$item['notice_id']])){ foreach($trading_tags['related'][$item['notice_id']] as $notice_tag_id => $notice_tag){ if($notice_tag['type'] == 1){ print ' '; } elseif($notice_tag['type'] == 2){ print ' '; } elseif($notice_tag['type'] == 3){ print ' '; } } } if($item['notes']){ $Parsedown = new Parsedown(); print ' '.$Parsedown->line($item['notes']).''; } //print ' ( '.$item['count'].' user'.($item['count'] != 1 ? 's' : '').', '.$tag_time_ago['text'].' )'; print '
  • '; } } if(isset($info['is_free']) && $info['is_free'] > 0 && $info['price'] <= 0){ print '
  • $0 '.(isset($info['genres'][536]['ordering']) && $info['genres'][536]['ordering'] > 0 ? 'No Cost' : 'Free on Demand').'
  • '; } if(isset($ingiveaways) && count($ingiveaways) > 0){ $n = 0; include_once('includes/Bundle.php'); $Giveaway = new Bundle(); foreach($ingiveaways as $giveaway_id => $ga){ $giveaway_time_ago = time_format($ga['posted']); print '
  • $0 '; if($ga['type_id'] == 3){ print 'Add to Account'; } elseif($ga['type_id'] == 4){ print 'Limited Giveaway'; } elseif($ga['type_id'] == 5){ print 'Revoked Giveaway'; } elseif($ga['type_id'] == 6){ print 'F2P'; } elseif($ga['type_id'] == 19){ print 'Beta Revoked'; } else{ print 'Given Away'; } print ''; if(isset($info['giveaway_count']) && $info['giveaway_count'] > 1){ print ' '.$info['giveaway_count'].' giveaways'; } print ''; //$giveaway_types = $Giveaway->giveawayTypes(); //print $giveaway_types[$ga['type_id']]['name']; //if(isset($ga['notes']) && $ga['notes'] != '' && $ga['type_id'] == 10){ print ' '.$ga['notes'].' '; } //elseif(isset($ga['notes']) && $ga['notes'] != ''){ print '
    '.$ga['notes'].' '; } if($ga['url_giveaway'] != ''){ $url_giveaway_address = explode('//', $ga['url_giveaway']); $url_giveaway_domain = explode('/', $url_giveaway_address[1]); if($ga['status'] == 1 || $ga['type_id'] == 6){ //print '
    '; print ' '.$url_giveaway_domain[0].''; } //else{ print ' [ '.$url_giveaway_domain[0].' ]'; } } if($ga['url_info'] != ''){ //print '
    '; //print 'Announcement '; $url_giveaway_address = explode('//', $ga['url_info']); $url_giveaway_domain = explode('/', $url_giveaway_address[1]); //print ' ⓘ '.$url_giveaway_domain[0].''; } if($ga['info_source_id'] == 55 && $ga['posted'] == 1492004075){ //print ' ( reported by SteamGifts ) '; } elseif($ga['type_id'] == 6 && $ga['posted'] == 1509494400){} elseif($ga['posted'] > 0){ //print ' posted '.$giveaway_time_ago['text'].' '; } print '
  • '; $n += 1; if($n >= 1){ break; } } } print '
'; if(isset($trading_tags['all']) && count($trading_tags['all']) > 0 && $Auth->id > 0){ print '
  • Unverified notices
  • '; foreach($trading_tags['all'] as $trading_tag_id => $item){ if($trading_tag_id != 351 && $trading_tag_id != 349){ $tag_time_ago = time_format($item['added']); print '
  • '; if(isset($item['tag_value'])){ if($item['tag_value'] > 1000000001){ print date("Y-m-d", $item['tag_value']); } else{ print $item['tag_value']; } } print $item['name']; if($item['url'] != '' && (strpos($item['url'], 'https://support.humblebundle.com/') === 0 || strpos($item['url'], 'https://steamcommunity.com/') === 0 || strpos($item['url'], 'https://www.steamgifts.com/') === 0 || strpos($item['url'], 'https://barter.vg/') === 0 || strpos($item['url'], 'https://steamdb.info/') === 0)){ print ' '; } print ' ( '.$item['count'].' user'.($item['count'] != 1 ? 's' : '').', '.$tag_time_ago['text'].' )'; print ''; print '
  • '; } } print '
'; } } if($Auth->id > 0 && $Auth->offers_unique >= 0){ if(isset($trading_tags['user']) && count($trading_tags['user']) > 0){ $comma = ''; print '

Notices you added: '; foreach($trading_tags['user'] as $user_tag_id => $user_tag){ print $comma.$user_tag['name']; if(isset($user_tag['url']) && $user_tag['url'] != ''){ print ' '.$user_tag['url'].''; } if(isset($user_tag['added']) && $user_tag['added'] > 0){ $trading_tag_added = time_format($user_tag['added']); print ' '.$trading_tag_added['text'].' '; } $comma = ', '; } print '

'; } } if($Auth->id > 0 && $Auth->offers_unique >= 0){ print '
'; print '
'; print '
'; print '
'; } if(isset($userOnlists['revoked'])) { print '

'; if(isset($steam_tracker['type_id']) && $steam_tracker['type_id'] == 20) { print 'Missing'; } else { print 'Revoked or Removed'; } print ' from your library'; if(isset($info['revoked']) && $info['revoked'] > 50) { print ' and the libraries of '.$info['revoked'].' Barter users.'; } else{ print '.'; } if(isset($steam_tracker['type_id']) && $steam_tracker['type_id'] == 20) { print ' (Likely hidden from public library rather than revoked)'; } print '

'; } elseif(isset($info['revoked']) && $info['revoked'] > 50) { print '

Revoked or Removed from the libraries of '.$info['revoked'].' Barter users'; print '

'; } if($info['source_id'] == 2) { if($Auth->permissions % 10000 >= 1000) { print '
'; } print $related_items_html; if($Auth->permissions % 10000 >= 1000) { print '
'; } } if($Auth->id > 0) { flush(); $onlists = $Item->onLists(1, 4, $Auth->id); $inoffers = $Item->inOffers(); $onlists['unowned'] = $Item->potentialUsers($user_rating_unowned, $item_cards, $item_givenaway, $item_bundled, $item_achievements, $item_steam, $item_is_base); $steam_friends = $Auth->viewSteamFriends(); } $actives = $Auth->actives(); print '

'; if(isset($onlists) && count($onlists) > 0) { $region = array(1=>'CIS', 2=>'SA', 3=>'SEA', 4=>'TR', 0=>'ROW', 5=>'ROW:EU', 6=>'ROW:NA', -1=>'No region selected'); $region_desc = array(1=>'Commonwealth of Independent States includes Armenia, Azerbaijan, Belarus, Georgia, Kyrgyzstan, Kazakhstan, Republic of Moldova, Russian Federation, Tajikistan, Turkmenistan, Ukraine, and Uzbekistan', 2=>'South America includes Argentina, Bolivia, Brazil, Bahamas, Belize, Chile, Colombia, Costa Rica, Ecuador, Guatemala, Guyana, Honduras, Mexico, Nicaragua, Panama, Peru, Paraguay, Suriname, El Salvador, Uruguay, and Venezuela', 3=>'Southeast Asia includes Indonesia, Malaysia, Philippines, Singapore, and Thailand', 4=>'Turkey', 0=>'Rest of World: Countries not included in the regions listed above', 5=>'Europe includes Γ…land Islands, Albania, Andorra, Austria, Belgium, Bosnia & Herzegovina, Bulgaria, Croatia, Cyprus, Czech Republic, Denmark, Estonia, Faroe Islands, Finland, France, Germany, Gibraltar, Greece, Guernsey, Hungary, Iceland, Ireland, Italy, Jersey, Latvia, Liechtenstein, Lithuania, Luxembourg, Macedonia, Malta, Moldova, Monaco, Montenegro, Netherlands, Poland, Portugal, Romania, San Marino, Serbia, Slovakia, Slovenia, Spain, Sweden, Switzerland, and United Kingdom',6=>'Canada, and United States',-1=>''); $countries = $User->countries(); $all_friends = $Auth->friends(); $tag_descriptions = $Item->tagDescriptions(); $type = $end_tag = ''; $unowned_removed = 0; $collection_types = array('tradeable', 'wishlist', 'blacklist', 'library', 'unowned'); $users_notes = $Auth->readAllNotes(); foreach($collection_types as $index) { if(isset($info['redirect']) && $info['redirect'] > 0 && $index != 'tradeable' && $index != 'wishlist' && $index != 'library') { continue; } if(isset($onlists[$index]) && count($onlists[$index])) { $list_count = count($onlists[$index]); if($index == 'unowned'){ $list_count -= $unowned_removed; } $list_expandable = 0; if($type != $index) { $list_icon = ''; print $end_tag; $end_tag = ''; print '
'; if($index == 'library') { $list_icon = '📚 '; } elseif($index == 'tradeable') { $list_icon = ' '; } elseif($index == 'wishlist') { $list_icon = ' '; } elseif($index == 'unowned') { $list_icon = ' '; } elseif($index == 'blacklist') { $list_icon = '🚫︎ '; } if($index == 'wishlist'){ print '
'; } elseif($index == 'tradeable'){ print ''; } print '

'.$list_icon; print ($index == 'tradeable' ? 'Tradable' : ucfirst($index)); print ' '.$list_count.($list_count > 9 ? ' ('.number_format(100 * $list_count / $actives['actives']).'%)' : '').''; if($index == 'unowned'){ print ' '; } if($index == 'tradeable' && $Auth->id > 0 && (isset($userOnlists['wishlist']) || isset($userOnlists['watchlist']) || $Auth->id == 4195)) { // && isset($userOnlists['wishlist']) print (isset($_POST['openNewTab']) || (!isset($_POST['findMatches']) && $Auth->match_new_tab == 1) ? '' : ''); print (isset($_POST['expandAll']) || (!isset($_POST['findMatches']) && $Auth->match_show_all== 1) ? '' : ''); print (isset($_POST['showAllMatches']) || (!isset($_POST['findMatches']) && $Auth->match_all_matches == 1) ? '' : ''); print ''; } if($index == 'wishlist' && $Auth->id > 0 && (isset($userOnlists['tradeable']) || isset($userOnlists['reserve']) || $Auth->id == 4195 ) ) { // && isset($userOnlists['tradeable']) print (isset($_POST['openNewTab']) || (!isset($_POST['findMatches']) && $Auth->match_new_tab == 1) ? '' : ''); print (isset($_POST['expandAll']) || (!isset($_POST['findMatches']) && $Auth->match_show_all== 1) ? '' : ''); print (isset($_POST['showAllMatches']) || (!isset($_POST['findMatches']) && $Auth->match_all_matches == 1) ? '' : ''); print ''; } print '

'; if($index == 'wishlist' || $index == 'tradeable'){ print '
'; } print '
    '; $type = $index; $i = 1; } $ignored_count = 0; foreach($onlists[$index] as $user_id => $users) { if($index != 'unowned' && isset($onlists['unowned'][$user_id]) && !isset($onlists['unowned'][$user_id]['owned'])){ $onlists['unowned'][$user_id]['owned'] = $index; $unowned_removed += 1; } elseif($index == 'unowned' && isset($onlists['unowned'][$user_id]['owned'])){ continue; } //if(isset($ignored[$user_id])){ continue; } print '
  • '; if(isset($ignored[$user_id])) { //$ignored_count += 1; print 'Alan Smithee'; //print ''.(isset($ignored[$user_id]['outgoing']) ? $users['steam_persona'] : 'ignored').' '; } else { if($index == 'tradeable' || $index == 'wishlist') { print ''; if($user_id == $Auth->id) { print '👤'; } elseif(isset($users['tradeable_count']) && $users['tradeable_count'] == 0) { print '0 '; } elseif(isset($users['is_active']) && $users['is_active'] == -1) { print ' '; } elseif(isset($steam_friends[$user_id]) && isset($users['steam_id64'])) { print '💬 '; } elseif(isset($users['steam_id64']) && $users['contact_pref'] == 1) { print ' + '; } if(isset($all_friends[$user_id])) { print '👥'; } print ''; } print ''.$users['steam_persona'].''.($users['extra'] == 0 && ($index == 'wishlist' || $index == 'tradeable') ? ' x0':''); if(isset($users['steam_id64'])){ print ' '; } if(isset($users['want_unowned']) && $users['want_unowned'] == 1){ } elseif($index == 'tradeable'){ print ''; } if(isset($users_notes[$user_id]) && $users_notes[$user_id] != '') { print ' 📓'; } if(isset($users['source_id']) && $users['source_id'] > 0) { print ' '; if($users['bundle_id'] > 0){ print ''; } if($users['item_type'] == 'curator' && $users['source_id'] == 1){ print 'Curator'; } else{ print (isset($sources[$users['source_id']]['icon']) ? ''.$info['source_name'].' icon': ''); } if($users['bundle_id'] > 0) { print ''; } else{ print ''; } } elseif($users['item_type'] != '') { if($index == 'tradeable' && $users['item_type'] != 'custom') { print ''.$users['item_type'].''; } elseif($index == 'wishlist' && $users['item_type'] == 'extra'){ print ''.$users['item_type'].''; } elseif($index == 'library' && $users['item_type'] == 'custom'){ print '*'; } elseif($index == 'library' && $users['item_type'] == 'auto'){ print ''; } elseif($index == 'library' && $users['item_type'] == 'sync'){ print '↷'; } elseif($index == 'library' && $users['item_type'] == 'sync-community'){ print '↷c'; } elseif($index == 'library' && $users['item_type'] == 'sync-api'){ print '↷a'; } elseif($index == 'library' && $users['item_type'] == 'userdata'){ print 'Û'; } } if($users['item_type'] == 'link'){ print 'gift link'; } if(isset($inoffers[$user_id]) && (($inoffers[$user_id]['offer_side'] == 'from' && $index == 'tradeable') || ($inoffers[$user_id]['offer_side'] == 'to' && $index == 'wishlist'))) { print ' ✉ '.($inoffers[$user_id]['offer_side'] == 'to' ? 'Wants' : 'Has').' '; } if($users['grouping'] == 20){ print ''; } elseif($users['grouping'] == 30){ print ''; } elseif($users['grouping'] == 50){ print ''; } elseif($users['grouping'] == 70){ print ''; } elseif($users['grouping'] == 80){ print ''; } if(isset($users['tag_names'])) { $limit = 1; foreach($users['tag_names'] as $tag_id => $tag) { print ''; if(isset($onlists[$index][$user_id]['tag_values'][$tag_id]) && $onlists[$index][$user_id]['tag_values'][$tag_id] > 0){ if($tag_id == 388 || $tag_id == 475){ print ''; } if(($tag_id == 402) && isset($onlists[$index][$user_id]['tag_values'][$tag_id]) && $onlists[$index][$user_id]['tag_values'][$tag_id] > 1274336053){ print ''.date("Y-m-d", $onlists[$index][$user_id]['tag_values'][$tag_id]).''; } else{ print $onlists[$index][$user_id]['tag_values'][$tag_id]; } if($tag_id == 388 || $tag_id == 475){ print ''; } print ' '; } print $tag.''; if($limit > 3){ break; } $limit += 1; } } } if(($index == 'tradeable' || $index == 'wishlist') && $i == 7 && $list_count > 8) { print '
    '; $list_expandable = 1; } elseif($index != 'tradeable' && $index != 'wishlist' && $i == 3 && $list_count > 4) { print '
    '; $list_expandable = 1; } else{ print ''; } $i += 1; } print '
'; } else { if($index == 'tradeable') { print '

'; } elseif($index == 'wishlist') { print '

'; } if($index == 'tradeable' || $index == 'wishlist') { print ($index == 'tradeable' ? 'Tradable' : ucfirst($index)).' 0

'; print '
  • No Active Users
'; } } } } else { print '

Barter.vg tracks your digital game libraries, wishlists and tradables from different stores. You can find users with the games you want and if they\'ve wishlisted your tradable games.

'; print '

Sign in through Steam to view the users\' collections and trades.

'; print '

Tradable '.$info['tradable'].($info['tradable'] > 9 ? ' ('.number_format(100 * $info['tradable'] / $actives['actives']).'%)' : '').'

'; print '

Wishlist '.$info['wishlist'].($info['wishlist'] > 9 ? ' ('.number_format(100 * $info['wishlist'] / $actives['actives']).'%)' : '').'

'; print '

📚 Library '.$info['library'].($info['library'] > 9 ? ' ('.number_format(100 * $info['library'] / $actives['actives']).'%)' : '').'

'; } if(isset($inoffers) && count($inoffers)){ $preset_offer_count = count($inoffers); include('includes/Offer.php'); print '

'.$preset_offer_count.' Preset Offer'.($preset_offer_count != 1 ? 's':'').'

    '; foreach($inoffers as $inoffer_user_id => $inoffer) { if(isset($ignored[$inoffer_user_id])) { print '
  • • ...
  • '; continue; } else { print '
  • #'.$inoffer['offer_id'].' '.$inoffer['from_username'].' '.($inoffer['offer_side'] == 'from' ? 'has':'wants').' this game and '.($inoffer['offer_side'] == 'from' ? 'wants':'has').' '; $Preset = new Offer($inoffer['offer_id']); $preset_offer = $Preset->view(); //if($Auth->id == 160){ print $inoffer['other_side']; print_r($preset_offer['items'][$inoffer['other_side']]); } if(isset($preset_offer['items'][$inoffer['other_side']])) { $and_or = (isset($preset_offer[$inoffer['other_side'].'_and_or']) && $preset_offer[$inoffer['other_side'].'_and_or'] > 0 ? $preset_offer[$inoffer['other_side'].'_and_or'] : 'all'); if(count($preset_offer['items'][$inoffer['other_side']]) > 1){ print ''.$and_or.' of '; } $divider = ''; foreach($preset_offer['items'][$inoffer['other_side']] as $preset_item) { print $divider.$preset_item['title']; $divider = '; '; } } print '
  • '; } } print '
'; } if(isset($info['is_tradable']) && $Auth->id > 0){ print '

Offer to no-specific-user will be visible here.

'; print '
'; } if($Auth->id > 0) { $traded = $Item->traded($Auth->id); $trading = $Item->trading($Auth->id); $offered = $Item->offered($Auth->id); //$processing_time = round(microtime(true) - $starttime, 3); if($Auth->id == 160 || $Auth->id == 1063 || $Auth->id == 11390 || $Auth->id == 260 || $Auth->id == 907 || $Auth->id == 28898){ $allOffers = $Item->allOffers(); $allOffersCount = count($allOffers); } } if(isset($allOffers) && $allOffersCount > 0) { print '

Offers '.$allOffersCount.'

'; if(isset($_POST['showAllOffers'])){ print '
    '; $i = 0; foreach($allOffers as $index => $item){ $i += 1; $offer_updated = time_format($item['updated']); print '#'.$index.' '.(isset($item['from_status']) ? $item['from_status'] : '').' '.(isset($item['to_status']) && $item['to_status'] != $item['from_status'] ? $item['to_status'] : '').(isset($item['to_reason']) && $item['to_reason'] != '' ? ' ('.$item['to_reason'].') ':'').(isset($item['from_username']) ? ' from '.$item['from_username']:'').' '.(isset($item['to_username']) ? ' to '.$item['to_username']:'').' '.$offer_updated['text']; if($i == 5 && $allOffersCount > 5){ print '
    '; } else{ print ''; } } print '
'; } else{ print '

'; } } if(isset($trading)){ $trading_count = count($trading); } if(isset($trading) && $trading_count > 0) { print '

'.$trading_count.' Pending Offer'.($trading_count != 1 ? 's':'').'

'; print '
    '; $i = 0; foreach($trading as $index => $item) { $i += 1; $offer_updated = time_format($item['updated']); print '
  • #'.$index.' '.(isset($item['from_status']) ? $item['from_status'] : '').' '.(isset($item['to_status']) && $item['to_status'] != $item['from_status'] ? $item['to_status'] : '').(isset($item['from_username']) ? ' from '.$item['from_username']:'').' '.(isset($item['to_username']) ? ' to '.$item['to_username']:'').' '.$offer_updated['text']; if($i == 5 && $trading_count > 5) { print '
    '; } else{ print ''; } } print '
'; } if(isset($offered)){ $offered_count = count($offered); } if(isset($offered) && $offered_count > 0) { print '

'.$offered_count.' Offer'.($offered_count != 1 ? 's':'').' That Did Not Complete

'; print '
    '; $i = 0; foreach($offered as $index => $item) { $i += 1; $offer_updated = time_format($item['updated']); print '
  • #'.$index.' '.(isset($item['from_status']) ? $item['from_status'] : '').' '.(isset($item['to_status']) && $item['to_status'] != $item['from_status'] ? $item['to_status'] : '').(isset($item['from_username']) ? ' from '.$item['from_username']:'').' '.(isset($item['to_username']) ? ' to '.$item['to_username']:'').' '.$offer_updated['text']; if($i == 1 && $offered_count > 1) { print '
    '; } else{ print ''; } } print '
'; } if(isset($traded)){ $traded_count = $Item->total_trading_count; } if(isset($traded) && $traded_count > 0) { print '

Trades '.$traded_count.' '.($Item->user_trading_count > 0 ? ' including your '.$Item->user_trading_count.' trade'.($Item->user_trading_count != 1 ? 's':'').'' : '').'

'; print '
    '; $i = $o = $traded_expanded = 0; $max_traded_shown = 50; foreach($traded as $index => $item) { if($item['from_user_id'] == $Auth->id || $item['to_user_id'] == $Auth->id) { $i += 1; $offer_updated = time_format($item['updated']); print '
  • #'.$index.' '.(isset($item['from_username']) ? ' from '.$item['from_username']:'').' '.(isset($item['to_username']) ? ' to '.$item['to_username']:'').' '.$offer_updated['text'].'
  • '; } elseif($o < $max_traded_shown) { $i += 1; $o += 1; $offer_updated = time_format($item['updated']); print '
  • #'.$index.' '.(isset($item['from_username']) ? ' from '.$item['from_username']:'').' '.(isset($item['to_username']) ? ' to '.$item['to_username']:'').' '.$offer_updated['text'].'
  • '; } if($traded_count > 5 && $i == 5) { print '
    '; $traded_expanded = 1; } } print '
'; } $i = 0; if(isset($inbundles) && $in_bundle_count > 0){ $bundle_tags = $Item->inBundlesTags(); $listing_bundles = ''; $listing_specials = ''; $bundles_i = $specials_i = 0; foreach($inbundles as $index => $item){ if($i == 5 && $in_bundle_count > 6){ //print '
    '; } $i += 1; if($item['end'] > 1){ $end_time = time_format($item['end']); } else{ $end_time = ''; } $listing = ''; $listing .= ''; $listing .= ''; if($item['included'] == -1){ $listing .= '⏸︎'; } elseif($item['sale_status'] == 'perpetual'){ $listing .= ''; //print '🔄︎'; } } elseif($item['sale_status'] == 'ongoing' || $item['sale_status'] == 'perpetual'){ $listing .= ''; } elseif($item['sale_status'] == 'preorder' || $item['sale_status'] == 'announced'){ $listing .= ''; } else{ $listing .= ''; } $listing .= ''; $listing .= ''; if(isset($sources[$item['source_id']]['icon'])){ $listing .= 'icon '; } $listing .= $item['title'].' '; $listing .= (isset($item['url']) ? ' ↗︎ ':''); $listing .= (isset($item['steamgifts']) && $item['steamgifts'] != '' ? ' Steamgifts icon' : ''); if(isset($item['rebundle']) && $item['rebundle'] > 0){ $listing .= ''; } if(isset($item['package'])){ $listing .= ''.($item['package_source'] == 2 ? 'sub/'.$item['package_sku'] : 'Package').''; } if(isset($bundle_tags[$item['bundle_id']])){ foreach($bundle_tags[$item['bundle_id']] as $bundle_tag){ if($bundle_tag['line_id'] != $index){ continue; } if($bundle_tag['tag_id'] == 475 && $bundle_tag['extras'] > 0){ $listing .= ''; } $listing .= ''.($bundle_tag['extras'] > 0 ? $bundle_tag['extras'].' ' : '').(strlen($bundle_tag['icon']) > 0 ? $bundle_tag['icon'] : $bundle_tag['name']).''; if($bundle_tag['tag_id'] == 475 && $bundle_tag['extras'] > 0){ $listing .= ''; } } } elseif($item['bundle_count'] == 0){ $listing .= '0✽'; } $additional_tiers = ''; if(isset($item['additional'])){ foreach($item['additional'] as $additional_tier => $additional_items){ if($additional_tier > 1){ $additional_tiers .= '
    '.$additional_tier.' of '.$item['tiers'].''; } $comma = ''; $listing .= '
    Also included '.($additional_tier > 1 ? 'in tier '.$additional_tier : '').(isset($additional_items[2]) ? ' multiple times' : '').' as part of '; foreach($additional_items as $additional_occurrences => $additional_item){ if(isset($additional_item['package'])){ $listing .= $comma.''.($additional_item['package_source'] == 2 ? 'sub/'.$additional_item['package_sku'] : 'Package' ).''; } else{ $listing .= $comma.'standalone item'; } $comma = ', '; } $listing .= '
    '; } } if(isset($item['steam']) && $item['steam'] > 0){ $dlc_count = $item['dlc'] ?? 0; $item_count = $item['items'] ?? 0; $listing .= '
    '; if($item['type_id'] == 2){ $listing .= 'Special '; } elseif($item['type_id'] == 3){ $listing .= 'Tracking '; } elseif($item['type_id'] == 5){ $listing .= 'Subscription '; } if(isset($item['included_type']) && $item['included_type'] > 0){ $listing .= ''.$magic_tiers[$item['included_type']]['name'].''; } elseif($item['included'] == -1){ $listing .= 'No longer included'; } elseif($item['included'] == 0){ $listing .= 'May include'; } elseif($item['included'] == -2){ // print 'Regional version'; } if($item['steam'] - $dlc_count > 0){ $listing .= ($item['steam'] - $dlc_count).' Steam game'.($item['steam'] - $dlc_count != 1 ? 's':''); } if(isset($dlc_count) && $dlc_count > 0){ $listing .= ' + '.$dlc_count.' DLC'; } if(isset($item['retail_price_total']) && $item['retail_price_total'] > 0 && $item['type_id'] == 1){ $listing .= ' ($'.number_format($item['retail_price_total'] / 100, 0).' retail)'; } if(isset($item_count) && $item_count - $item['steam'] > 0){ $listing .= ' + '.($item_count - $item['steam']).' item'.($item_count - $item['steam'] != 1 ? 's':''); } $listing .= '
    '; } $listing .= ''; $listing .= ($item['tiers'] <= 1 ? '' : ''.$item['tier'].' of '.$item['tiers'].''.$additional_tiers.''); $additional_tiers = ''; $listing .= ''; $start_time = time_format($item['start']); $listing .= ($item['start'] > 0 ? date("Y-m-d", $item['start']) : ''); //print $start_time['text']; $listing .= ''; if($item['sale_status'] == 'ongoing'){ $listing .= ''; //print ''; } elseif($item['sale_status'] == 'perpetual'){ $listing .= 'Perpetual'; } elseif($item['sale_status'] == 'ended' || $item['sale_status'] == 'gone'){ $listing .= ''; } //if($item['included'] != -1){ print $item['sale_status']; } //if($item['sale_status'] == 'preorder'){ $start_time = time_format($item['start']); print ' ends in '.$start_time['text']; } //elseif($item['sale_status'] == 'announced'){ $start_time = time_format($item['start']); print ', begins in '.$start_time['text']; } //elseif($item['sale_status'] != 'perpetual'){ print ' '.$end_time['text']; } //print ''; $listing .= ''; if($item['type_id'] == 1){ $listing_bundles .= $listing; $bundles_i += 1; } elseif($item['type_id'] != 4){ $listing_specials .= $listing; $specials_i += 1; } } if($listing_bundles != ''){ print '

    ✽ Bundles '; // '.$in_bundle_count.($info['bundles_available'] > 0 ? ' ('.$info['bundles_available'].' active)' : '').' print '

    '; print ''; print ''; print $listing_bundles; print '
    TierStartEnd
    '; } if($listing_specials != ''){ print '

    ✽ Specials '; // '.$in_bundle_count.($info['bundles_available'] > 0 ? ' ('.$info['bundles_available'].' active)' : '').' print '

    '; print ''; print ''; print $listing_specials; print '
    TierStartEnd
    '; } } if(isset($ingiveaways) && count($ingiveaways) > 0) { $n = 0; print '

    $0 Giveaways '.count($ingiveaways).'

    '; print '
      '; //print ''; //print ''; $Parsedown = new Parsedown(); $giveaway_types = $Giveaway->giveawayTypes(); foreach($ingiveaways as $giveaway_id => $ga) { $giveaway_time_ago = time_format($ga['posted']); $giveaway_time_start = time_format($ga['start']); print '
    • '; if($ga['status'] == 1){ print ''; print ' '.$giveaway_types[$ga['type_id']]['name'].''; } else{ print ''; print ' '.$giveaway_types[$ga['type_id']]['name'].''; } if($ga['start'] > 0){ print ' '.$giveaway_time_start['text'].' '; } elseif($ga['posted'] > 0){ print ' '.$giveaway_time_ago['text'].' '; } if(isset($ga['notes']) && $ga['notes'] != '' && $ga['type_id'] == 10){ print '
      '.$Parsedown->line($ga['notes']).'
      '; } elseif(isset($ga['notes']) && $ga['notes'] != ''){ print '
      '.$Parsedown->line($ga['notes']).'
      '; } if($ga['url_giveaway'] != ''){ $url_giveaway_address = explode('//', $ga['url_giveaway']); $url_giveaway_domain = explode('/', $url_giveaway_address[1]); if($ga['status'] == 1 || $ga['type_id'] == 6){ print ''.$url_giveaway_domain[0].''; } else{ print ''.$url_giveaway_domain[0].''; } } if($ga['url_info'] != ''){ $url_giveaway_address = explode('//', $ga['url_info']); $url_giveaway_domain = explode('/', $url_giveaway_address[1]); print ' '.$url_giveaway_domain[0].''; } print '
    • '; $n += 1; } print ''; } if($Auth->permissions % 10000 >= 1000) { print ''; } if($info['source_id'] != 2){ print $related_items_html; } if($Auth->permissions % 10000 >= 1000){ // $relation_feed = $Feed->recentByType(47, 49); $relation_feed = $Feed->recentLines('item', $id, 10, 47, 49); $recent_feed = $Feed->viewByIDs($relation_feed); if(isset($recent_feed) && count($recent_feed)){ $i = 0; print '
        '; foreach($recent_feed as $line_id => $line){ foreach($line[1] as $position => $value){ $line[0]['text_template'] = str_ireplace("<".$position.">", $value['href'], $line[0]['text_template']); } $feed_timeago = time_format($line[0]['added']); print '
      • '.$line[0]['icon'].' '.$feed_timeago['text'].' '.$line[0]['text_template'].'
      • '; $i += 1; if($i == 3){ print '
        '; $bundle_activity_expanded = 1; } //if($i >= 5){ break; } } print '
      '; } if(isset($related_items_code) && $related_items_code != ''){ print '

      Related items IDs: '.$related_items_code.'

      '; } print '

      '; print ''; print ' '; print ''; print '

      '; } $i = 0; $n = 1; if(isset($info['genres'])) { print '

      🏷 Tags '.count($info['genres']).' '; print '

      '; if($Auth->permissions % 10000 >= 1000) { print ''; } print '
        '; $comma = ''; foreach($info['genres'] as $genre) { $n += 1; print '
      • '.$genre['name'].''; if($Auth->permissions % 10000 >= 1000) { print ' '; } print '
      • '; $comma = ', '; } print '
      '; if($Auth->permissions % 10000 >= 1000) { print ''; //print ''; } } if($Auth->permissions % 10000 >= 1000 || $Auth->id == 11390) { print ''; print '

      🏷 Removed Tags

      '; print '
        '; foreach($Item->viewRemovedTags() as $genre) { print '
      • '.$genre['name'].''; print ' '; print '
      • '; } print '
      '; print ''; $tags = $Item->viewTags(); $tags['steam'][380]['name'] = 'macOS'; $tags['steam'][381]['name'] = 'Linux'; $tags['steam'][339]['name'] = 'decommissioned'; $tags['steam'][520]['name'] = 'Adult Only'; print ''; print '

      '; print ''; print ' '; print '

      '; print '

      If the game isn\'t delisted and the user tag still appears, it will automatically re-add in the next update.

      '; print ''; print '

      🔍 Title Matches

      '; $titleMatches = $Item->titleMatches(); print ''; print '

      '; print ''; print ''; if(isset($titleMatches) && count($titleMatches)){ print '
        '; $i = 0; foreach($titleMatches as $titleMatch) { $i += 1; print '
      • '; } print '
      '; print ''; } else{ print '

      No title matches

      '; } print ''; print ''; print '


      '; print ''; } print '

      💻︎ Sites

        '; if($info['source_id'] != 19) { if(isset($info['title']) && $info['title'] != ''){ print '
      • IsThereAnyDeal icon IsThereAnyDeal current and historic deals
      • '; } } if($info['source_id'] <= 2 && ($Auth->id == 160 || $Auth->id == 1166)) { print '
      • gg.deals icon GG.deals pricing history including key resale markets
      • '; } if($info['source_id'] == 1 || $info['source_id'] == 2) { print '
      • Steamdb icon SteamDB Profile the technical details
      • '; } if($info['source_id'] == 1 || $info['source_id'] == 2 || $info['source_id'] == 19) { print '
      • Steam trades icon Steam Trades find trades [Want] or [Have]
      • '; } if($info['source_id'] == 1) { print '
      • lestrades icon Lestrades Profile instant game matching
      • '; } if(isset($info['cards']) && $info['cards'] > 0) { print '
      • Steam.tools icon Steam.tools trading cards set prices
      • '; } if($info['source_id'] == 1 || $info['source_id'] == 2) { print '
      • Steam icon Powered by Steam store page
      • '; } if(isset($info['sites'][1]['url'])) { print '
      • Steam icon Official Site by developer or publisher
      • '; } print '
      '; if($Auth->permissions % 10000 >= 1000) { print ''; } } } else { print '

      No Game or Item

      '; if(isset($_GET['steam_app_id'])) { $steam_app_id = (int)$_GET['steam_app_id']; print '

      This Steam application was not found on Barter.vg

      '; print '

      This is common for games that Steam has removed from the store. However, it should be rare for games that are available.

      '; print '

      Please first check SteamDB at https://steamdb.info/app/'.$steam_app_id.'/ to ensure it exists.

      '; print '

      To discuss missing games, visit the Steam group forum.'; if(isset($request_status) && $request_status > 0) { print '

      Submitted Steam app addition requested.

      '; } elseif(isset($request_status) && $request_status == 0) { print '

      Error Unable to request addition.

      '; } else { /* print '

      Steam appID: '.$steam_app_id.'

      '; */ } } elseif(isset($_GET['steam_sub_id'])) { $steam_sub_id = (int)$_GET['steam_sub_id']; print '

      This Steam package was not found on Barter.vg

      '; print '

      This is common because there are tens of thousands of packages and Barter has only a small fraction of them listed on this site.

      '; print '

      To request the addition of this package, please first check SteamDB at https://steamdb.info/sub/'.$steam_sub_id.'/apps/ to ensure it exists and is the correct package.

      '; print '

      To discuss missing games, visit the Steam group forum.'; if(isset($request_status) && $request_status > 0) { print '

      Submitted Steam package addition requested.

      '; } elseif(isset($request_status) && $request_status == 0) { print '

      Error Unable to request addition.

      '; } else { /* print '

      Steam subID: '.$steam_sub_id.'

      '; */ } } elseif(isset($_GET['steam_bundle_id'])){ $steam_bundle_id = (int)$_GET['steam_bundle_id']; print '

      This Steam bundle was not found on Barter.vg

      '; print '

      This site does not track Steam bundles at this time. In contrast to Steam packages, Steam bundles cannot be gifted or traded, and not to be confused with bundles of Steam keys.

      '; print '

      Check SteamDB at https://steamdb.info/bundle/'.$steam_bundle_id.'/ for price information.

      '; } else { print '

      Search for games, bundles, or users.

      '; } } ?>
      '; ?>
       Date