function multi_scan_start($url, $gid) { //http://steamcommunity.com/app/204300 //http://steamcommunity.com/ogg/230410 if (isset($_POST['pg']) && is_numeric($_POST['pg'])) { $page = (int) $_POST['pg']; } else { $page = 1; } //community hub if (substr($url, 0, 30) == 'http://steamcommunity.com/app/') { // this is a community hub, convert it to a group. $group_id = explode("/", substr($url, 30), 2); $dl_url = 'http://steamcommunity.com/ogg/' . $group_id[0] . '/memberslistxml/?xml=1&p=' . $page; group_scan_start($dl_url, $gid); } //normal group if (substr($url, 0, 33) == 'http://steamcommunity.com/groups/') { $dl_url = $url . '/memberslistxml/?xml=1&p=' . $page; group_scan_start($dl_url, $gid); } // official games group if (substr($url, 0, 32) == 'http://steamcommunity.com/games/') { $dl_url = $url . '/memberslistxml/?xml=1&p=' . $page; group_scan_start($dl_url, $gid); } $sid = any_to_64($url); if ($sid != false) { $dl_url = 'http://api.steampowered.com/ISteamUser/GetFriendList/v0001/?key=' . AKey() . "&steamid=" . $sid . "&relationship=friend"; //this is a steamid. $userlist = json_decode(get_data($dl_url), true); if (isset($userlist['friendslist']['friends'][0]['steamid'])) { $scan_list = array(); $userlist = $userlist['friendslist']['friends']; foreach ($userlist as $user) { $scan_list[] = $user['steamid']; } $playerData = json_decode(get_data($dl_url), true); echo '<img src="' . $playerData['response']['players'][0]['avatarFull'] . '"><br>'; echo "<h1>Scanning " . (isset($playerData['response']['players'][0]['personaname']) ? htmlentities($playerData['response']['players'][0]['personaname']) : 'Error retrieving username') . "'s Friend list</h1>"; scan_start($scan_list, $gid); } else { echo 'Target friend list is empty.'; } } if (isset($dl_url)) { } }
function user_db_find() { echo '<div class="col2 lt"><h2>Find User</h2>'; if (isset($_POST['steamid_forRank']) && isset($_POST['rank'])) { rank_update($_POST['steamid_forRank'], $_POST['rank']); } if (isset($_POST['sidsubmit'])) { $sid = any_to_64($_POST['sidsubmit']); $c = db_init('site_data', 'site_users'); $user = $c->find(array('_id' => (int) $sid))->limit(1); $user = iterator_to_array($user); $user = $user[$sid]; $qualities = array(1 => 'collector', 10 => 'normal', 20 => 'rarity1', 30 => 'vintage', 69 => 'strange', 100 => 'developer'); echo '<table class="tbpad"><tr><th>userid</th><th>time since they joined</th><th>privilege</th></tr>'; if ($user == false) { echo '<tr class="' . $qualities[10] . '"><td>' . $sid . '</td><td>Never Logged In.</td><td>' . rank_upd_list($sid, 10) . '</td></tr>'; } else { echo '<tr class="' . $qualities[$user['privilege']] . '"><td>' . $user['_id'] . '</td><td>' . timeSince($user['first_login']) . '</td><td>' . rank_upd_list($user['_id'], $user['privilege']) . '</td></tr>'; } echo '</table>'; } echo '<br>Search for a user.<br><br>' . '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">' . '<input type="text" name="sidsubmit"><input type="submit"></form></div>'; }
<?php include_once 'php/440_core.php'; createHead('BP Viewer', 440, '<script src="js/slider.js" ></script>'); //get rid of this after testing. if (isset($_GET['sid'])) { include 'php/bp_core.php'; $sid = any_to_64($_GET['sid']); backpack_viewer($sid); } else { echo '<div class="bp-container">'; echo '<div class="bphead">'; echo 'Error retrieving steamid.'; echo '</div>'; //end bp header echo '</div>'; //end bp container. } createFooter(440);