Minor fixes

This commit is contained in:
Daniel Björkholm
2015-01-16 08:43:04 +01:00
parent 5b22fe4b18
commit b51c168555
3 changed files with 104 additions and 87 deletions

View File

@@ -58,7 +58,7 @@ if (isset($_GET['name']) === true && empty($_GET['name']) === false) {
if ($config['Ach'] == true) {
foreach ($achievementPoints as $achievement) {
if ($achievement > 0) //if player doesn't have any achievement points it won't echo the line below.
echo '<tr><td>Achievement Points</td><td>' .$achievement. ' </td></tr>';
echo '<li>Achievement Points: ' .$achievement. '</li>';
}
}
?>
@@ -109,41 +109,42 @@ if (isset($_GET['name']) === true && empty($_GET['name']) === false) {
</li>
<li><font class="profile_font" name="profile_font_created">Created: <?php echo getClock($profile_znote_data['created'], true); ?></font></li>
<li><font class="profile_font" name="profile_font_comment">Comment:</font> <br><textarea name="profile_comment_textarea" cols="70" rows="10" readonly="readonly" class="span12"><?php echo $profile_znote_data['comment']; ?></textarea></li>
<!-- Achievements start -->
<?php if ($config['Ach'] == true) { ?>
<h3 class="header-ok">Achievements</h3>
<div id="accordion">
<h3>Show/hide player achievements</h3>
<div>
<table class="table table-striped table-bordered">
<tbody>
<style>
#secondD {
margin-left:0px;
}
</style>
<?php
foreach ($config['achievements'] as $key => $achiv) {
$uery = mysql_select_single("SELECT `player_id`, `value`, `key` FROM `player_storage` WHERE `player_id`='$user_id' AND `key`='$key' LIMIT 1;");
foreach ($uery as $luery)
if (($luery) == $key)
{
if (!array_key_exists(($achiv), $config['achievements'])) {
echo '<tr><td width="17%">' .$achiv[0]. '</td><td>' .$achiv[1]. '</td>';
if ($achiv['secret'] == true) {
echo '<td><img id="secondD" src="http://img04.imgland.net/PuMz0mVqSG.gif"></td>';
echo '<td>'. $achiv['points'] .'</td>';
} else {
echo '<td></td><td>'. $achiv['points'] .'</td>';
}
echo '<tr>';
}
}
}
?>
</tbody>
</table>
</div></div>
<!-- Achievements start -->
<?php if ($config['Ach']) { ?>
<h3 class="header-ok">Achievements</h3>
<div id="accordion">
<h3>Show/hide player achievements</h3>
<div>
<table class="table table-striped table-bordered">
<tbody>
<style>
#secondD {
margin-left:0px;
}
</style>
<?php
foreach ($config['achievements'] as $key => $achiv) {
$uery = mysql_select_single("SELECT `player_id`, `value`, `key` FROM `player_storage` WHERE `player_id`='$user_id' AND `key`='$key' LIMIT 1;");
if (!empty($uery) || $uery !== false) {
foreach ($uery as $luery) {
if ($luery == $key) {
if (!array_key_exists($key, $achiv)) {
echo '<tr><td width="17%">' .$achiv[0]. '</td><td>' .$achiv[1]. '</td>';
if (!isset($achiv['secret'])) {
echo '<td><img id="secondD" src="http://img04.imgland.net/PuMz0mVqSG.gif"></td>';
}
echo '<td>'. $achiv['points'] .'</td>';
echo '<tr>';
}
}
}
}
}
?>
</tbody>
</table>
</div>
</div>
<br>
<?php } ?>
<!-- Achievements end -->