diff --git a/characterprofile.php b/characterprofile.php
index 548d4fa..be024dc 100644
--- a/characterprofile.php
+++ b/characterprofile.php
@@ -21,7 +21,7 @@ if (isset($_GET['name']) === true && empty($_GET['name']) === false) {
if ($config['Ach']) {
$user_id = (int) $user_id;
- $achievementPoints = mysql_select_single("SELECT SUM(`value`) AS `sum` FROM `player_storage` WHERE `key` LIKE '30___' AND `player_id`=$user_id");
+ $achievementPoints = mysql_select_single("SELECT SUM(`value`) AS `sum` FROM `player_storage` WHERE `key` LIKE '30___' AND `player_id`={$user_id} LIMIT 1");
}
} else { // TFS 0.2, 0.3
if (!$loadOutfits) {
@@ -35,541 +35,447 @@ if (isset($_GET['name']) === true && empty($_GET['name']) === false) {
}
$profile_znote_data = user_znote_character_data($user_id, 'created', 'hide_char', 'comment');
-
$guild_exist = false;
-
- if (get_character_guild_rank($user_id) > 0)
- {
+ if (get_character_guild_rank($user_id) > 0) {
$guild_exist = true;
$guild = get_player_guild_data($user_id);
$guild_name = get_guild_name($guild['guild_id']);
}
-
?>
-
+
-
-
-

-
- 0):
- ?>
- - Country: '; ?>
-
-
+
+
+
+
+
+
+ 
+
+ 0):
+ ?>
+
+ 
+
+
+ |
+
+
+ |
+
+
+
- 1) { ?>
- - Position:
-
-
+ 1): ?>
+
+ Position |
+ |
+
+
- -
- Sex:
-
-
-
-
+
+ Sex |
+ |
+
- -
- Level:
-
-
-
-
+
+ Level |
+ |
+
- - Vocation:
-
+
+ Vocation |
+ |
+
-
- -
-
- of
-
-
-
+
+
+ Guild |
+ of |
+
+
- -
- Last Login:
-
-
-
-
+
+ Last Login |
+ |
+
- 0)
- {
- echo '- Achievement Points: ' . $achievement . '
';
- }
- }
- }
- ?>
-
-
+ 0): ?>
+
+ Achievement Points |
+ |
+
+
0)
- {
- $playerlist[] = $h['owner'];
- }
-
- if ($profile_data['id'] = $h['owner'])
- {
- ?>
- - House: , $value)
- {
- if ($key == $h['town_id'])
- {
- echo $value;
- }
- }
- ?>
-
-
-
-
-
- - Status: ONLINE';
- }
- else
- {
- echo 'OFFLINE';
- }
- }
- else
- {
- if ($profile_data['online'])
- {
- echo 'ONLINE';
- }
- else
- {
- echo 'OFFLINE';
- }
- }
- ?>
-
-
-
-
- - Created:
-
-
-
- -
- Comment:
-
-
-
-
-
-
-
-
-
Show/hide player achievements
-
-
-
-
- $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 '' .$achiv[0]. ' | ' .$achiv[1]. ' | ';
-
- if (!isset($achiv['secret']))
- {
- echo ' | ';
- }
-
- echo ''. $achiv['points'] .' | ';
- echo '
';
- }
- }
- }
- }
- }
- ?>
-
-
-
-
-
-
-
-
- -
- Death List:
-
-
-
- -
- '. $value['killed_by'] .'';
- }
- else
- {
- $value['killed_by'] = 'monster: '. $value['killed_by'] .'.';
- }
-
- echo '['. $value['time'] .'] Killed at level '. $value['level'] .' by '. $value['killed_by']; ?>
-
-
-
- This player has never died.';
- }
- }
- else if ($config['ServerEngine'] == 'TFS_10')
- {
- $deaths = mysql_select_multi("SELECT
- `player_id`, `time`, `level`, `killed_by`, `is_player`,
- `mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified`
- FROM `player_deaths`
- WHERE `player_id`=$user_id ORDER BY `time` DESC LIMIT 10;");
+ if ($config['ServerEngine'] !== 'TFS_02') {
+ // Compatibility fix
+ $column_town_id = array(
+ 'OTHIRE' => 'townid',
+ 'TFS_03' => 'town'
+ // Default: town_id
+ );
+ $column_town_id = (isset($column_town_id[$config['ServerEngine']]))
+ ? $column_town_id[$config['ServerEngine']]
+ : 'town_id';
- if ($deaths)
- {
- foreach ($deaths as $d)
- {
- ?>
- -
- ".getClock($d['time'], true, true)."";
- $lasthit = ($d['is_player']) ? "".$d['killed_by']."" : $d['killed_by'];
- echo ": Killed at level ".$d['level']." by $lasthit";
- if ($d['unjustified'])
- {echo " (unjustified)";}
-
+ $houses = mysql_select_multi("
+ SELECT `id`, `owner`, `name`, `{$column_town_id}` AS `town_id`
+ FROM `houses`
+ WHERE `owner` = {$user_id};
+ ");
+
+ if ($houses !== false) {
+ foreach ($houses as $h): ?>
+
+ House |
+ |
+
+
+
+
+ Status |
+ |
+
+
+
+ Created |
+ |
+
+
+
+
+
+
+
+
+
+
+ 'Show',
+ 'hide' => 'Hide'
+ );
+ if ($achievements !== false): ?>
+ Achievements:
+
+
+
+
+
+ Name |
+ Description |
+ Points |
+
+
+
+
+
+ |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Death List |
+
+
+
+ ".$d['killed_by'].""
+ : $d['killed_by'];
+
+ ?>
+
+ |
+
+ (unjustified)";
+ }
$mostdmg = ($d['mostdamage_by'] !== $d['killed_by']) ? true : false;
-
- if ($mostdmg)
- {
- $mostdmg = ($d['mostdamage_is_player']) ? "".$d['mostdamage_by']."" : $d['mostdamage_by'];
+ if ($mostdmg) {
+ $mostdmg = ($d['mostdamage_is_player'])
+ ? "".$d['mostdamage_by'].""
+ : $d['mostdamage_by'];
+
echo " and by $mostdmg.";
- if ($d['mostdamage_unjustified'])
- { echo " (unjustified)"; }
- }
- else
- { echo " (soloed)"; }
+ if ($d['mostdamage_unjustified']) {
+ echo " (unjustified)";
+ }
+ } else {
+ echo " (soloed)";
+ }
?>
-
- This player has never died.';
- }
- }
- else if ($config['ServerEngine'] == 'TFS_03' || $config['ServerEngine'] == 'OTHIRE')
- {
- //mysql_select_single("SELECT * FROM players WHERE name='TEST DEBUG';");
- $array = user_fetch_deathlist03($user_id);
-
- if ($array)
- {?>
-
-
- -
- = 1)
- {
- $namedata = user_character_data((int)$value[3], 'name');
-
- if ($namedata !== false)
- {
- $value[3] = $namedata['name'];
- $value[3] = 'player: '. $value[3] .'';
- }
- else
- {
- $value[3] = 'deleted player.';
- }
- }
- else
- {
- $value[3] = user_get_killer_m_name(user_get_kid($value['id']));
-
- if ($value[3] === false)
- { $value[3] = 'deleted player.'; }
- }
-
- echo '['. getClock($value['date'], true) .'] Killed at level '. $value['level'] .' by '. $value[3];
- echo '
';
- }
- ?>
-
+ |
+
This player has never died.'; }
+ }
+ } else {
+ ?>
+
+ This player has never died. |
+
+ '. $value['killed_by'] .'';
+ } else {
+ $value['killed_by'] = 'monster: '. $value['killed_by'] .'.';
+ }
+ ?>
+
+ |
+ |
+
+
+
+ This player has never died. |
+
+ = 1) {
+ $namedata = user_character_data((int)$value[3], 'name');
+ if ($namedata !== false) {
+ $value[3] = $namedata['name'];
+ $value[3] = 'player: '. $value[3] .'';
+ } else {
+ $value[3] = 'deleted player.';
+ }
+ } else {
+ $value[3] = user_get_killer_m_name(user_get_kid($value['id']));
+ if ($value[3] === false) {
+ $value[3] = 'deleted player.';
+ }
+ }
+ ?>
+
+ |
+ |
+
+
+
+ This player has never died. |
+
+
+
+
+
+
+
+ Quest progression
+
+
+
+ Quest: |
+ progression: |
+
+
+
+
+
+ |
+
+ %
+
+ |
+
+
+
+
+
+
+
+ 1)
+ {
+ ?>
+ -
+ Other visible characters on this account:
+ 0) {
?>
-
-
-
-
-
+
+ Name: |
+ Level: |
+ Vocation: |
+ Last login: |
+ Status: |
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+
+
- -
- Quest progression
-
-
- Quest: |
- progression: |
-
-
-
- |
-
- %
-
- |
-
-
-
-
+
+ This player has never died.';
+ }*/
?>
-
-
-
- 1)
- {
- ?>
- -
- Other visible characters on this account:
- 0)
- {
- ?>
-
-
- Name: |
- Level: |
- Vocation: |
- Last login: |
- Status: |
-
-
-
-
- |
- |
- |
- |
- |
-
-
-
- This player has never died.';
- }
- ?>
-
-
-
-
- -
- Address:
- ">
-
-
-
-
+
+
+
+
+ Address: ">
+include 'layout/overall/footer.php'; ?>
\ No newline at end of file
diff --git a/engine/init.php b/engine/init.php
index ef8555e..7ec5ef0 100644
--- a/engine/init.php
+++ b/engine/init.php
@@ -135,10 +135,11 @@ if ($config['log_ip']) {
}
// Sub page override system
+$filename = explode('/', $_SERVER['PHP_SELF']);
+$filename = $filename[count($filename)-1];
+$page_filename = str_replace('.php', '', $filename);
if ($config['allowSubPages']) {
require_once 'layout/sub.php';
- $filename = explode('/', $_SERVER['PHP_SELF']);
- $filename = $filename[count($filename)-1];
if (isset($subpages) && !empty($subpages)) {
foreach ($subpages as $page) {
if ($page['override'] && $page['file'] === $filename) {
diff --git a/layout/css/style.css b/layout/css/style.css
index eb24d25..13fa21c 100644
--- a/layout/css/style.css
+++ b/layout/css/style.css
@@ -706,4 +706,30 @@ table.hide {
.auction_char .outfitColumn img {
top: -16px;
left: -20px;
+}
+
+/* Characterprofile table design */
+#characterProfileTable thead th:first-of-type {
+ position: relative;
+ width: 28%;
+}
+#characterProfileTable thead th:nth-child(2) {
+ /*background-color: red;*/
+}
+
+#characterProfileTable thead h1 {
+ text-shadow: none;
+ color: white;
+ padding: 0;
+}
+
+#characterProfileTable .outfit {
+ position: absolute;
+ left: 0;
+ top: -16px;
+}
+#characterProfileTable .flag {
+ position: absolute;
+ right: 16px;
+ top: 16px;
}
\ No newline at end of file