$storage = new AvatarGallery(); foreach ($storage->getGalleries() as $RequiredRank => $avatars) { $GalleryRank = new UserRank($RequiredRank); //make sure we have any avatars in this gallery if (count($avatars) == 0) { continue; } //Staff avatars, skip for users if ($RequiredRank >= RANK_STAFF_MEMBER) { if ($CURUSER->getRank()->int() < RANK_STAFF_MEMBER) { continue; } } echo ' <div class="avatars_group_holder ', $CURUSER->getRank()->int() < $RequiredRank ? 'not_avaliable' : '', '"> <h1>', $GalleryRank->string(), ' Avatars</h1> <ul class="avatars_group">'; //Loop the avatars in this gallery foreach ($avatars as $id => $string) { echo ' <li class="avatar-box" ', $CURUSER->getAvatar()->type() == AVATAR_TYPE_GALLERY && $CURUSER->getAvatar()->int() == $id ? 'id="active"' : '', '> <a href="#" data-avatar-id="', $id, '" class="clickable-avatar" style="background-image: url(./resources/avatars/', $string, ');"></a> </li>'; } unset($id, $string); echo ' <div class="clear"></div> </ul> </div>'; } unset($storage, $RequiredRank, $avatars, $GalleryRank);
if ((int) $webRecord['avatarType'] == AVATAR_TYPE_UPLOAD) { $Avatar = new Avatar(0, $webRecord['avatar'], 0, AVATAR_TYPE_UPLOAD); } } echo ' <tr><td>ID</td><td>', $webRecord['id'], '</td></tr> <tr><td>Display Name</td><td>', $webRecord['displayName'], '</td></tr> <tr><td>Silver</td><td>', $webRecord['silver'], '</td></tr> <tr><td>Gold</td><td>', $webRecord['gold'], '</td> <tr><td>Birthday</td><td>', $webRecord['birthday'], '</td></tr> <tr><td>Gender</td><td>', $webRecord['gender'], '</td></tr> <tr><td>Country</td><td>', $webRecord['country'], '</td></tr> <tr><td style="vertical-align: top">Avatar</td><td><img src="', $Avatar->type() == AVATAR_TYPE_GALLERY ? $config['BaseURL'] . '/resources/avatars/' . $Avatar->string() : $Avatar->string(), '" /></td></tr> <tr> <td style="vertical-align: middle">Rank</td> <td>', $Rank->string(), ' [', $Rank->int(), ']'; //Is allowed to change users rank if ($CURUSER->getPermissions()->isAllowed(PERMISSION_CHANGE_USER_RANK)) { $RanksData = new RankStringData(); echo ' <div id="change-rank-cont" style="float: right"> <form method="post" action="execute.php?take=change_user_rank"> <select name="rank" id="change-rank-select" style="display: inline-block">'; foreach ($RanksData->data as $trank => $name) { echo '<option value="', $trank, '" ', $trank == $Rank->int() ? 'selected="selected"' : '', '>', $name, '</option>'; } echo ' </select> <input type="hidden" value="', $webRecord['id'], '" name="id" /> <input type="button" value="Change" class="button" style="display: inline-block" onclick="this.form.submit()" /> </form>
//Pull some data from the Auth DB $authRes = $AUTH_DB->prepare("SELECT * FROM `account` WHERE `id` = :acc LIMIT 1;"); $authRes->bindParam(':acc', $aRow['id'], PDO::PARAM_INT); $authRes->execute(); //Fetch it $authRow = $authRes->fetch(); $GMLevel = ''; //Check for GM Level $gmRes = $AUTH_DB->prepare("SELECT * FROM `account_access` WHERE `id` = :acc;"); $gmRes->bindParam(':acc', $aRow['id'], PDO::PARAM_INT); $gmRes->execute(); //Loop the records while ($gmRec = $gmRes->fetch()) { $GMLevel .= 'Level: ' . $gmRec['gmlevel'] . ' - Realm: ' . $gmRec['RealmID'] . '<br>'; } //remove the last <br> $GMLevel = substr($GMLevel, 0, strlen($GMLevel) - 4); //Setup the rank $Rank = new UserRank($aRow['rank']); //Set the first two columns $row[0] = $aRow['id']; $row[1] = '<a href="index.php?page=user-preview&uid=' . $aRow['id'] . '">' . $aRow['displayName'] . '</a> [' . $authRow['username'] . ']'; $row[2] = $Rank->string() . ' [' . $Rank->int() . ']'; $row[3] = $GMLevel; $row[4] = $authRow['email']; $row[5] = $aRow['reg_ip']; $row[6] = $authRow['joindate']; //Now we have to pull $output['aaData'][] = $row; } echo json_encode($output);
} else { echo '<span style="background:url(', $Avatar->string(), ') no-repeat; background-size: 100%;">'; } echo ' </div> <div class="user_info"> <div class="usr_and_pr"> <a href="', $config['BaseURL'], '/index.php?page=profile&uid=', $arr['author'], '" class="username">', $arr['author_str'], '</a> <div class="drop_down_profile"> <span class="profile">Profile</span> <a href="" class="arrow"></a> <div class="drop_down_container"> <h1>', $arr['author_str'], '</h1> <h3>', $userRank->string(), '</h3> <ul class="user_menu"> <li><a href="', $config['BaseURL'], '/index.php?page=profile&uid=', $arr['author'], '">Profile</a></li> <li><a href="#">View Posts</a></li> <li><a href="#">Ignore</a></li> </ul> </div> </div> </div> <h3>', $userRank->string(), '</h3> </div> </div> <div class="right_side">