function getfriends($id, $extra = 'simple') { $db = Database::obtain(); $query = 'SELECT friends FROM users WHERE id=' . $db->escape($id); $result = $db->query($query); $friendsinfo = $db->fetch($result); $fids = $friendsinfo['friends']; if ($fids != "" && count($fids) > 0) { if ($extra == 'remove') { $limit = ''; } else { $limit = 'LIMIT 10'; } $query = 'SELECT * FROM users WHERE id IN(' . $db->escape($fids) . ') ORDER BY lastseen DESC ' . $limit; $result = $db->query($query); while ($friend = $db->fetch($result)) { $online = getOnline($friend['id']); $nickname = $friend['nickname']; $steamid = $friend['steamid']; $uid = $friend['id']; if ($online == "Online") { $status = '<li>'; } else { $status = '<li class="friend_offline">'; } if ($extra == 'invite' && $online == 'Online') { $extrahtml = '<a class="friend_inv" href="#invite" title="Invite to Lobby">Inv+</a>'; } if ($extra == 'remove') { $extrahtml = '<a class="friend_del" href="#del" title="Remove from Friendlist">Remove from Friendlist</a>'; } $return = $status . '<a href = "profile.php?id=' . $uid . '"> <img src=' . APIGet($steamid, avatar) . ' width="32" height="32"></img>' . '<span class="user_name">' . $nickname . '</span>' . '<span class="user_steamid">' . GetAuthID($steamid) . '</span>' . '<span class="user_steamon">' . $online . '</span><br /> ' . $extrahtml . ' </a></li>'; echo $return; } } else { echo 'You have no friends yet'; } }
function FtoA_callback($matches) { $trimmed = trim($matches[0], ":]'\""); return GetAuthID($trimmed); }
$name = getXmlValueByTag($content, "steamID", 0); $content = implode(file("http://steamcommunity.com/profiles/" . $steam[5] . "/games?xml=1")); $tf2 = false; while ($r = getXmlValueByTag($content, "appID", $r[1])) { if ($r[0] == "440") { $tf2 = true; break; } } echo "Hello <img src=\"" . $avatar[0] . "\"> " . $name[0] . "<br/>"; if ($tf2) { echo "You appear to have Team Fortress 2<br/>"; } else { echo "You don't appear to have Team Fortress 2<br/>"; } $steamid = GetAuthID($steam[5]); echo "Your Steam ID is: " . $steamid . "<br/>"; $content = implode(file("http://etf2l.org/feed/player/?steamid=" . $steamid)); $etf2l['username'] = getXmlValueByTag($content, "username", 0); $etf2l['displayname'] = getXmlValueByTag($content, "displayname", 0); $etf2l['player'] = getXmlValueByTag($content, "player", 0); if ($etf2l['player'][2]['ID'] != "") { echo "Your ETF2L profile is: <a href=\"http://etf2l.org/forum/user/" . $etf2l['player'][2]['ID'] . ">" . $etf2l['displayname'][0] . "</a>"; } else { echo "You don't have an ETF2L profile."; } } } catch (ErrorException $e) { echo $e->getMessage(); } ?>
public function display_profile($id, $full = true) { if ($full) { return '<h1>User Info</h1> <img class="small_avatar" src=' . $this->avatar . ' width="32" height="32"></img> <span class="user_name">' . $this->nickname . '</span> <span class="user_steamid">' . GetAuthID($this->steamid) . '</span> <dl> <dt>Mainclass:</dt><dd><img style="float: left;" class="class_icon" src="theme/images/class/' . player_class($this->mainclass) . '.png" height="14"><span style="float: left; margin-left: 3px;">' . displayClass($this->mainclass) . '</span></dd> <dt>Skilllevel:</dt><dd>' . $this->division . '</dd> <dt>Banpoints:</dt><dd>' . $this->banpoints . '</dd> <dt>Rating:</dt><dd>' . $this->rating . '</dd> </dl>'; } else { return '<div class="profile_panel"> <h1>User Info</h1> <span class="user_name">' . $this->nickname . '</span><br /> <span class="user_steamid">' . GetAuthID($this->steamid) . '</span> <dl> <dt>Mainclass:</dt><dd><img style="float: left;" class="class_icon" src="theme/images/class/' . player_class($this->mainclass) . '.png" height="14"><span style="float: left; margin-left: 3px;">' . displayClass($this->mainclass) . '</span></dd> <dt>Skilllevel:</dt><dd>' . $this->division . '</dd> <dt>Rating:</dt><dd>' . $this->rating . '</dd> </dl> </div>'; } }