Update characterprofile.php

This commit is contained in:
Atte 2014-09-11 15:44:31 +03:00
parent 1317a7b0a4
commit 47a90f17e6

View File

@ -9,6 +9,9 @@ if (isset($_GET['name']) === true && empty($_GET['name']) === false) {
if ($config['TFSVersion'] == 'TFS_10') { if ($config['TFSVersion'] == 'TFS_10') {
$profile_data = user_character_data($user_id, 'name', 'level', 'vocation', 'lastlogin', 'sex'); $profile_data = user_character_data($user_id, 'name', 'level', 'vocation', 'lastlogin', 'sex');
$profile_data['online'] = user_is_online_10($user_id); $profile_data['online'] = user_is_online_10($user_id);
if ($config['Ach'] == true) {
$achievementPoints = mysql_select_single("SELECT SUM(`value`) AS `sum` FROM `player_storage` WHERE `key` LIKE '30___' AND `player_id`='$user_id'");
}
} else $profile_data = user_character_data($user_id, 'name', 'level', 'vocation', 'lastlogin', 'online', 'sex'); } else $profile_data = user_character_data($user_id, 'name', 'level', 'vocation', 'lastlogin', 'online', 'sex');
$profile_znote_data = user_znote_character_data($user_id, 'created', 'hide_char', 'comment'); $profile_znote_data = user_znote_character_data($user_id, 'created', 'hide_char', 'comment');
@ -18,6 +21,7 @@ if (isset($_GET['name']) === true && empty($_GET['name']) === false) {
$guild = get_player_guild_data($user_id); $guild = get_player_guild_data($user_id);
$guild_name = get_guild_name($guild['guild_id']); $guild_name = get_guild_name($guild['guild_id']);
} }
?> ?>
<!-- PROFILE MARKUP HERE--> <!-- PROFILE MARKUP HERE-->
@ -48,16 +52,15 @@ if (isset($_GET['name']) === true && empty($_GET['name']) === false) {
} }
?></font></li> ?></font></li>
<!-- Achievements start --> <!-- Achievement start -->
<?php if ($config['Ach'] == true) { ?> <?php
<li>Achievement Points: <?php foreach ($achievementPoints as $achievement)
$achievementPoints = mysql_select_single("SELECT SUM(`value`) AS `sum` FROM `player_storage` WHERE `key` LIKE '30___' AND `player_id`='$user_id'"); {
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 $achievement. '</li>'; }
} ?>
}?> <!-- Achievement end -->
<!-- Achievements end -->
<?php $houses = array(); <?php $houses = array();
$houses = mysql_select_multi("SELECT `id`, `owner`, `name`, `town_id` FROM `houses` WHERE `owner` = $user_id ;"); $houses = mysql_select_multi("SELECT `id`, `owner`, `name`, `town_id` FROM `houses` WHERE `owner` = $user_id ;");
if ($houses !== false) { if ($houses !== false) {