Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function data() {
- global $SESS, $DB, $PREFS, $IN, $FNS, $OUT, $EXT, $STAT, $LANG, $LOC;
- $reply = array();
- $SessID = $SESS - > userdata['location'];
- if (isset($SessID)) {
- $ticket = authenticate($SessID);
- if ($ticket['valid']) {
- $OnlineID = $ticket['onlineid'];
- $userTicket = $ticket;
- $NPID = userNPID($OnlineID);
- $_data['profile'] = userProfile($NPID, $OnlineID);
- $_data['friends'] = userFriendList($userTicket);
- $_data['profile_extra'] = userExpandedList($OnlineID, $NPID);
- $_data['UserName'] = (string) $_data['profile'] - > onlinename;
- $_data['Bio'] = (string) $_data['profile'] - > aboutme;
- $_data['Avatar'] = (string) $_data['profile'] - > avatarurl;
- $_data['AvatarMedium'] = (string) $_data['profile'] - > {
- 'medium-avatarurl'
- };
- $_data['AvatarSmall'] = (string) $_data['profile'] - > {
- 'small-avatarurl'
- };
- $_data['level'] = (string) $_data['profile_extra'] - > list - > user - > {
- 'trophy-level'
- } - > level;
- $level = (string) $_data['profile_extra'] - > list - > user - > {
- 'trophy-level'
- } - > level;
- $friends_array = array();
- $friends_online_array = array();
- foreach($_data['friends'] - > list - > user as $value) {
- $friends_id = $value - > npid - > onlineid;
- $friends_online_array[] = $friends_id;
- }
- $_data['friends_number'] = count($friends_online_array, COUNT_RECURSIVE);
- $reply[] = $_data;
- $this - > Userlevel($level);
- // _dlog('OUTPUT', $this);
- return $reply;
- } else {
- // $this->ShowError(3);
- }
- }
- }
- function Userlevel($level) {
- global $TMPL;
- $TMPL->tagdata = $level;
- return $TMPL->tagdata;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement