<div class="container"> <div class="row"> <div class="span3"> <img class="img-rounded" src="<?php echo getGravatarUrlFromEmail($email, 200); ?> "> <h2><?php echo $username; ?> </h2> <?php if ($type == "admin") { ?> <span class="label label-important">Administrator</span> <span class="label label-info">Developer</span> <?php } ?> <?php if ($type == "dev") { ?> <span class="label label-info">Developer</span> <?php } ?> <?php if ($type != "user") { ?> <br><br> <?php
function showLeaderboard($boardId) { $boardquery = mysql_query("SELECT * FROM leaderboards WHERE leaderboardid = '{$boardId}'"); $board = mysql_fetch_array($boardquery); $boardName = $board['title']; $boardDescrip = $board['description']; $boardHighscore = $board['highscore']; $boardLength = $board['length']; echo "<b>{$boardName}:</b> {$boardDescrip}<br>"; $pos = 1; if ($boardHighscore = 1) { $scorequery = mysql_query("SELECT * FROM scores WHERE score > '0' and gameid = '3' and leaderboardid = '{$boardId}' ORDER BY score DESC LIMIT {$boardLength}"); } else { $scorequery = mysql_query("SELECT * FROM scores WHERE score > '0' and gameid = '3' and leaderboardid = '{$boardId}' ORDER BY score ASC LIMIT {$boardLength}"); } if (mysql_num_rows($scorequery) != 0) { echo '<table class="table table-striped"> <thead> <tr> <th width="20">#</th> <th width="200">Username</th> <th width="200">Score</th> </tr> </thead> <tbody>'; } else { echo '<small><i>This leaderboard is empty</i></small>'; } while ($row = mysql_fetch_array($scorequery)) { echo '<tr>'; echo '<td>' . $pos . '</td>'; echo '<td><img class="img-rounded" src="' . getGravatarUrlFromEmail(getUserEmailFromName($row['username']), 20) . '"> <a href="profile.php?id=' . getUserIdFromName($row['username']) . '">' . $row['username'] . '</a></td>'; echo '<td>' . $row['score'] . '</td>'; echo '</tr>'; $pos += 1; } echo '</tbody>'; echo '</table>'; }
<br><br><br> <div class="container"> <div class="row"> <div class="span3"> <img class="img-rounded" rel="tooltip" title="Change your avatar at gravatar.com" data-placement="bottom" src="<?php echo getGravatarUrlFromEmail($_SESSION['email'], 200); ?> "> <h2><?php echo $_SESSION['username']; ?> </h2> <?php if ($_SESSION['type'] == "admin") { ?> <span class="label label-important">Administrator</span> <span class="label label-info">Developer</span> <?php } ?> <?php if ($_SESSION['type'] == "dev") { ?> <span class="label label-info">Developer</span> <?php } ?> </div> <div class="span9"> <div class="page-header"> <h2>Passwords</h2>