';
}
print '';
/*
$collection_items_shown = false;
if(isset($userOnlists['reserve']) && count($userOnlists['reserve'])){
$collection_items_shown = true;
$reservesOnlist = $Auth->collection($id,11);
print '
';
}
if(isset($info['source_id']) && $info['source_id'] != 85 && $info['is_tradable'] == 1){
if($collection_items_shown){
print '
Select All Tradables ';
print '
'.(isset($edited) ? count($edited) : 0).' ';
}
else{
print '
';
}
include('includes/manage/edit_tagged.php');
print ' [ from bundle ] ';
print '[x] No Bundle Tag ';
$i = 0;
if(isset($inbundles) && $in_bundle_count > 0){
foreach($inbundles as $index => $item){
if($item['source_id'] > 0){
if($item['start'] > 1){ $start_date_F_Y = date("F Y", $item['start']); }
else{ $start_date_F_Y = ''; }
print ''.($item['source_id'] != 3 ? $sources[$item['source_id']]['name'].': ':'').$item['title'].' ('.$start_date_F_Y.') ';
$i += 1;
}
}
}
if($i == 0){ print '[ no bundles listed ] '; }
print ' ';
if(isset($userOnlists['tradeable']) || isset($userOnlists['reserve'])){
print ' [ move to ] ';
$collection_types = $Collection->types();
if(isset($collection_types)){
foreach($collection_types['byid'] as $collection_type_id => $collection_type){
if($collection_type['move'] == 0 || $section == $collection_type['abbr']){ continue; }
print ''.ucfirst($collection_type['name']).' '.$collection_type['icon'].' ';
}
}
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 '
';
print '
';
}
if((isset($userOnlists['blacklist']) && count($userOnlists['blacklist'])) ||
(isset($userOnlists['scratchpad']) && count($userOnlists['scratchpad'])) ||
(isset($userOnlists['library']) && count($userOnlists['library']))
){
print '
';
print '
';
}
}
print '
';
if(isset($info['cards']) && $info['cards'] > 0)
{
print '';
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 ' ';
}
}
if($info['source_id'] == 1 && isset($info['user_reviews_all']) && $info['user_reviews_all'] > 0)
{
print '';
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 ' ';
}
if(isset($info['bundles_all'])){
print '✽ ';
print ''.($info['bundles_all'] + $info['bundles_packages'] > 0 ? '':'').($info['bundles_all'] + $info['bundles_packages']).($info['bundles_all'] + $info['bundles_packages'] > 0 ? ' ':'').' ';
print '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 ' ';
}
if($Auth->permissions % 10000 >= 1000 && isset($info['steamgifts_cv']))
{
print 'CV ';
print ''.(isset($info['price_high']) && isset($info['steamgifts_cv']) ? number_format($info['steamgifts_cv'] * $info['price_high'] / 10000, 2) : '...').' Steamgifts ';
print '';
print ' ';
}
if(isset($info['price_high']) && $info['price_high'] >= 0)
{
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 ';
}
}
elseif($info['source_id'] <= 2){
print '$ ? Retail Price check SteamDB , ITAD ';
}
/*
if(isset($info['price_euro_high']) && $info['price_euro_high'] > 0 && ($Auth->id == 1063 || $Auth->id == 907 || $Auth->id == 160))
{
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_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 '';
//print 'history , global ';
print ' ';
}
if(isset($info['price_ruble_high']) && $info['price_ruble_high'] > 0 && ($Auth->id == 1063 || $Auth->id == 907 || $Auth->id == 160))
{
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 '';
//print 'history , global ';
print ' ';
}
if(isset($info['price_yuan_high']) && $info['price_yuan_high'] > 0 && ($Auth->id == 1063 || $Auth->id == 907 || $Auth->id == 160))
{
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 '';
//print 'history , global ';
print ' ';
}
*/
if((isset($info['achievements']) && $info['achievements'] > 0) || (isset($info['achievements_counted']) && $info['achievements_counted'] > 0))
{
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 ' ';
}
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 '📅 '.$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 owner info no longer updates correctly due to API changes
/*
if(isset($info['owners_min']) && isset($info['owners_max']) && $info['owners_max'] > 0)
{
print 'id == 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 ' ';
}
*/
if(isset($info['player_count']) && $info['player_count'] > 0 && $info['achievements_distinct'] > 2 && $info['item_type'] != 'demo' && $info['player_count_hidden'] == 0)
{
// print 'All Players (beta) '.($info['player_count'] >= 10000000 ? '~'.number_format($info['player_count']/1000000).' million' : number_format($info['player_count'])).' browse all player counts ';
}
//if($Auth->offers_completed >= 1){
if(isset($info['credits'][1])){
print 'Developer ';
$comma = '';
foreach($info['credits'][1] as $dev){
print $comma.''.$dev['name'].' ';
$comma = ', ';
}
print ' ';
}
if(isset($info['credits'][2])){
print 'Publisher ';
$comma = '';
foreach($info['credits'][2] as $pub){
print $comma.''.$pub['name'].' ';
$comma = ', ';
}
print ' ';
}
//}
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_count - 5).' more ... ';
$related_items_more_area = 1;
}
$i += 1;
$related_items_html .= '';
if(isset($item['source_icon'])){
$related_items_html .= ' ';
}
$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 .= ' X ';
}
$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['all']) && count($trading_tags['all']) > 0 && $Auth->id > 0){
print '
';
}
}
if($Auth->id > 0 && $Auth->offers_unique >= 0){
if(isset($trading_tags['user']) && count($trading_tags['user']) > 0){
$comma = '';
print '
';
}
}
if($Auth->id > 0 && $Auth->offers_unique >= 0){
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 '
';
}
}
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 '
'; }
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 ' ';
}
else{
print (isset($sources[$users['source_id']]['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 ' '; }
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 ' '.($index != 'removed' ? ($list_count - 7) : '').' more... ';
$list_expandable = 1;
}
elseif($index != 'tradeable' && $index != 'wishlist' && $i == 3 && $list_count > 4)
{
print ' '.($index != 'removed' ? ($list_count - 3) : '').' more... ';
$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 '
';
}
}
}
}
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 ' '.($allOffersCount - 5).' more offers... ';
}
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 ' '.($trading_count - 5).' more... ';
}
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 ' '.($offered_count - 1).' more... ';
}
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_count > $max_traded_shown ? $max_traded_shown : $traded_count) - 5).' more... ';
$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 '
'.($in_bundle_count - 5).' more ... ';
}
$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 .= ' ';
}
$listing .= $item['title'].' ';
$listing .= (isset($item['url']) ? ' ↗︎ ':'');
$listing .= (isset($item['steamgifts']) && $item['steamgifts'] != '' ?
' ' : '');
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 .= '';
}
}
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 .= ''.$end_time['text'].' ';
//print '';
}
elseif($item['sale_status'] == 'perpetual'){
$listing .= 'Perpetual ';
}
elseif($item['sale_status'] == 'ended' || $item['sale_status'] == 'gone'){
$listing .= '';
//if($item['end'] > 0){ print ' title="'.gmdate('Y-m-d H:i', $item['end']).' UTC"'; }
//print ' >';
if($item['end'] > 1){
$listing .= date("Y-m-d", $item['end']);
}
else{
$listing .= '';
}
$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 'Tier Start End ';
print $listing_bundles;
print '
';
}
if($listing_specials != ''){
print '
β½ Specials ';
// '.$in_bundle_count.($info['bundles_available'] > 0 ? ' ('.$info['bundles_available'].' active)' : '').'
print ' ';
print '';
print 'Tier Start End ';
print $listing_specials;
print '
';
}
}
if(isset($ingiveaways) && count($ingiveaways) > 0)
{
$n = 0;
print '
$0 Giveaways '.count($ingiveaways).' ';
print '';
//print '';
//print ' Date ';
$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 ' '; }
elseif($ga['posted'] > 0){ print ' '; }
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 '';
}
$i = 0;
$n = 1;
if(isset($info['genres']))
{
print '';
if($Auth->permissions % 10000 >= 1000)
{
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 ' If the game isn\'t delisted and the user tag still appears, it will automatically re-add in the next update.
';
print '';
print '';
print '';
}
print '💻︎ Sites';
if($info['source_id'] != 19)
{
if(isset($info['title']) && $info['title'] != ''){ print ' IsThereAnyDeal current and historic deals '; }
}
if($info['source_id'] <= 2 && ($Auth->id == 160 || $Auth->id == 1166))
{
print ' GG.deals pricing history including key resale markets ';
}
if($info['source_id'] == 1 || $info['source_id'] == 2)
{
print ' SteamDB Profile the technical details ';
}
if($info['source_id'] == 1 || $info['source_id'] == 2 || $info['source_id'] == 19)
{
print ' Steam Trades find trades [Want] or [Have] ';
}
if($info['source_id'] == 1)
{
print ' Lestrades Profile instant game matching ';
}
if(isset($info['cards']) && $info['cards'] > 0)
{
print ' Steam.tools trading cards set prices ';
}
if($info['source_id'] == 1 || $info['source_id'] == 2)
{
print ' Powered by Steam store page ';
}
if(isset($info['sites'][1]['url']))
{
print ' 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 '';
*/
}
}
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 'Request Addition
Steam subID: '.$steam_sub_id.'
Add this to my tradable collection
Add this to my wishlist collection
';
*/
}
}
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.
';
}
}
?>