-  |
-
-
-
-
-
-
- Character Information |
-
- getCustomField('country'));
-
- echo
- ''.
- 'Name: |
- ' . $flag . ' '.$player->getName().''.$oldName.
- ' | ';
-
- $player_sex = 'Unknown';
- if(isset($config['genders'][$player->getSex()]))
- $player_sex = strtolower($config['genders'][$player->getSex()]);
-
- echo
- 'Sex: | ' . $player_sex . ' | ';
-
- if($config['characters']['marriage_info'] && fieldExist('marriage', 'players'))
- {
- echo
- 'Marital status: | ';
- $marriage = new OTS_Player();
- $marriage->load($player->getMarriage());
- if($marriage->isLoaded())
- echo 'married to ' . getPlayerLink($marriage->getName());
- else
- echo 'single';
- echo
- ' | ';
- }
-
- echo
- ''.
- 'Profession: | ' . $config['vocations'][$player->getVocation()] . ' | '.
- ' ';
-
- if($config['characters']['level'])
- echo 'Level: | '.$player->getLevel().' | ';
-
- if($config['characters']['experience'])
- echo 'Experience: | '.$player->getExperience().' | ';
-
- if($config['characters']['magic_level'])
- echo'Magic Level: | '.$player->getMagLevel().' | ';
-
- //frags
- if(tableExist('player_killers') && $config['characters']['frags']) {
- $frags_count = 0;
- $frags_query = $db->query(
- 'SELECT COUNT(`player_id`) as `frags`' .
- 'FROM `player_killers`' .
- 'WHERE `player_id` = ' .$player->getId() . ' ' .
- 'GROUP BY `player_id`' .
- 'ORDER BY COUNT(`player_id`) DESC');
-
- if($frags_query->rowCount() > 0)
- {
- $frags_query = $frags_query->fetch();
- $frags_count = $frags_query['frags'];
- }
-
- echo
- 'Frags: | ' . $frags_count . ' | ';
- }
-
- if(!empty($config['towns'][$player->getTownId()]))
- echo 'Residence: | ' . $config['towns'][$player->getTownId()] . ' | ';
-
- if($config['characters']['balance'])
- echo 'Balance: | '.$player->getBalance().' Gold Coins. | ';
-
- $town_field = 'town';
- if(fieldExist('town_id', 'houses'))
- $town_field = 'town_id';
- else if(fieldExist('townid', 'houses'))
- $town_field = 'townid';
- else if(!fieldExist('town', 'houses'))
- $town_field = false;
-
- if(fieldExist('name', 'houses')) {
- $house = $db->query('SELECT `id`, `paid`, `name`' . ($town_field != false ? ', `' . $town_field . '` as `town`' : '') . ' FROM `houses` WHERE `owner` = '.$player->getId())->fetch();
- if(isset($house['id']))
- {
- $add = '';
- if($house['paid'] > 0)
- $add = ' is paid until '.date("M d Y", $house['paid']);
-
- echo
- '
- House: |
-
-
- ' . (isset($house['name']) ? $house['name'] : $house['id']) . (isset($house['town']) ? ' (' . $config['towns'][$house['town']] . ')' : '') . $add . ' |
-
-
- |
-
- |
- ';
- }
- }
-
- $rank_of_player = $player->getRank();
- if($rank_of_player->isLoaded()) {
- $guild = $rank_of_player->getGuild();
- if($guild->isLoaded()) {
- $guild_name = $guild->getName();
- echo
- ''.
- 'Guild membership: | '.$rank_of_player->getName().' of the ' . getGuildLink($guild_name) . ' | '.
- ' ';
- }
- }
-
- echo
- 'Last login: | ';
- $lastlogin = $player->getLastLogin();
- if(empty($lastlogin))
- echo 'Never logged in.';
- else
- echo date("M d Y, H:i:s", $lastlogin).' CEST';
-
- echo ' | ';
- if($config['characters']['creation_date'])
- echo
- 'Created: | '.date("M d Y, H:i:s", $player->getCreated()).' CEST | ';
-
- $comment = $player->getComment();/*
- $newlines = array("\r\n", "\n", "\r");
- $comment_with_lines = str_replace($newlines, ' ', $comment, $count);
- if($count < 50)
- $comment = $comment_with_lines;*/
- if(!empty($comment))
- echo 'Comment: | ' . wordwrap(nl2br($comment), 60, " ", true) . ' | ';
-
- echo
- 'Account Status: | ' . (($account->isPremium()) ? 'Premium Account' : 'Free Account') . ' | '.
- ' ';
-
- echo ' '.
- '';
-
- if($config['characters']['skills'])
- {
- if(fieldExist('skill_fist', 'players')) {// tfs 1.0+
- $skills_db = $db->query('SELECT `skill_fist`, `skill_club`, `skill_sword`, `skill_axe`, `skill_dist`, `skill_shielding`, `skill_fishing` FROM `players` WHERE `id` = ' . $player->getId())->fetch();
-
- $skill_ids = array(
- POT::SKILL_FIST => 'skill_fist',
- POT::SKILL_CLUB => 'skill_club',
- POT::SKILL_SWORD => 'skill_sword',
- POT::SKILL_AXE => 'skill_axe',
- POT::SKILL_DIST => 'skill_dist',
- POT::SKILL_SHIELD => 'skill_shielding',
- POT::SKILL_FISH => 'skill_fishing',
- );
-
- $skills = array();
- foreach($skill_ids as $skillid => $field_name) {
- $skills[] = array('skillid' => $skillid, 'value' => $skills_db[$field_name]);
- }
- }
- else
- $skills = $db->query('SELECT `skillid`, `value` FROM `player_skills` WHERE `player_id` = ' . $player->getId() . ' LIMIT 7');
- echo '
- '.
- '
-
- Skills |
- ';
-
- $i = 0;
- foreach($skills as $skill)
- {
- echo
- '
- ' . getSkillName($skill['skillid']) . ' |
- ' . $skill['value'] . ' |
- ';
- }
-
- echo
- '
- | ';
- }
-
- if($config['characters']['quests'] && !empty($config['quests']))
- {
- $quests = $config['quests'];
- $sql_query_in = '';
- $i = 0;
- foreach($quests as $quest_name => $quest_storage)
- {
- if($i != 0)
- $sql_query_in .= ', ';
-
- $sql_query_in .= $quest_storage;
- $i++;
- }
-
- $storage_sql = $db->query('SELECT `key`, `value` FROM `player_storage` WHERE `player_id` = '.$player->getId().' AND `key` IN (' . $sql_query_in . ')');
- $player_storage = array();
- foreach($storage_sql as $storage)
- $player_storage[$storage['key']] = $storage['value'];
-
- echo '
- '.
- '
-
- Quests |
- ';
-
- //for($i=0; $i < count($quests); $i++)
- $i = 0;
- foreach($quests as $name => $storage)
- {
- $i++;
- echo
- '
- '.$name.' |
- .'.png) |
- ';
- }
-
- echo
- '
- | ';
- }
-
- if($config['characters']['equipment'])
- {
- echo '
- '.
- ''.
- 'Equipment | '.
- ''.generate_player_lookup($player).' |
-
- | ';
- }
-
- echo ' ';
-
-
- if(tableExist('killers')) {
- $player_deaths = $db->query('SELECT `id`, `date`, `level` FROM `player_deaths` WHERE `player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,10;');
- if(count($player_deaths))
- {
- $dead_add_content = '
Character Deaths | ';
-
- $number_of_rows = 0;
- foreach($player_deaths as $death)
- {
- $dead_add_content .= "
- ".date("j M Y, H:i", $death['date'])." |
- ";
- $killers = $db->query("SELECT environment_killers.name AS monster_name, players.name AS player_name, players.deleted AS player_exists FROM killers LEFT JOIN environment_killers ON killers.id = environment_killers.kill_id
-LEFT JOIN player_killers ON killers.id = player_killers.kill_id LEFT JOIN players ON players.id = player_killers.player_id
-WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, killers.id ASC")->fetchAll();
-
- $i = 0;
- $count = count($killers);
- foreach($killers as $killer)
- {
- $i++;
- if($killer['player_name'] != "")
- {
- if($i == 1)
- $dead_add_content .= "Killed at level ".$death['level']."";
- else if($i == $count)
- $dead_add_content .= " and";
- else
- $dead_add_content .= ",";
-
- $dead_add_content .= " by ";
- if($killer['monster_name'] != "")
- $dead_add_content .= $killer['monster_name']." summoned by ";
-
- if($killer['player_exists'] == 0)
- $dead_add_content .= getPlayerLink($killer['player_name']);
- else
- $dead_add_content .= $killer['player_name'];
- }
- else
- {
- if($i == 1)
- $dead_add_content .= "Died at level ".$death['level']."";
- else if($i == $count)
- $dead_add_content .= " and";
- else
- $dead_add_content .= ",";
-
- $dead_add_content .= " by ".$killer['monster_name'];
- }
- }
-
- $dead_add_content .= ". | ";
- }
-
- if($number_of_rows > 0)
- echo $dead_add_content . ' ';
- }
- }
- else {
- $mostdamage = '';
- if(fieldExist('mostdamage_by', 'player_deaths'))
- $mostdamage = ', `mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified`';
- $deaths = $db->query('SELECT
- `player_id`, `time`, `level`, `killed_by`, `is_player`' . $mostdamage . '
- FROM `player_deaths`
- WHERE `player_id` = ' . $player->getId() . ' ORDER BY `time` DESC LIMIT 10;');
-
- if(count($deaths))
- {
- $dead_add_content = '
Character Deaths | ';
-
- $number_of_rows = 0;
- foreach($deaths as $death)
- {
- $dead_add_content .= "
- ".date("j M Y, H:i", $death['time'])." |
- ";
-
- $lasthit = ($death['is_player']) ? getPlayerLink($death['killed_by']) : $death['killed_by'];
- $dead_add_content .= 'Killed at level ' . $death['level'] . ' by ' . $lasthit;
- if($death['unjustified']) {
- $dead_add_content .= " (unjustified)";
- }
-
- $mostdmg = ($death['mostdamage_by'] !== $death['killed_by']) ? true : false;
- if($mostdmg)
- {
- $mostdmg = ($death['mostdamage_is_player']) ? getPlayerLink($death['mostdamage_by']) : $death['mostdamage_by'];
- $dead_add_content .= ' and by ' . $mostdmg;
-
- if ($death['mostdamage_unjustified']) {
- $dead_add_content .= " (unjustified)";
- }
- }
- else {
- $dead_add_content .= " (soloed)";
- }
-
- $dead_add_content .= ". | ";
- }
-
- if($number_of_rows > 0)
- echo $dead_add_content . ' ';
- }
- }
-
- if($config['characters']['frags'])
+ $outfit = $config['outfit_images_url'] . '?id=' . $player->getLookType() . (fieldExist('lookaddons', 'players') ? '&addons=' . $player->getLookAddons() : '') . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet();
+
+ $flag = '';
+ if($config['account_country'])
+ $flag = getFlagImage($account->getCustomField('country'));
+
+ $player_sex = 'Unknown';
+ if(isset($config['genders'][$player->getSex()]))
+ $player_sex = strtolower($config['genders'][$player->getSex()]);
+
+ $marriage = new OTS_Player();
+ $marriage->load($player->getMarriage());
+
+ $marital_status = 'single';
+ if($marriage->isLoaded())
+ $marital_status = 'married to ' . getPlayerLink($marriage->getName());
+
+ $frags_enabled = tableExist('player_killers') && $config['characters']['frags'];
+ $frags_count = 0;
+ if($frags_enabled) {
+ $query = $db->query(
+ 'SELECT COUNT(`player_id`) as `frags`' .
+ 'FROM `player_killers`' .
+ 'WHERE `player_id` = ' .$player->getId() . ' ' .
+ 'GROUP BY `player_id`' .
+ 'ORDER BY COUNT(`player_id`) DESC');
+
+ if($query->rowCount() > 0)
{
- //frags list by Xampy
- $i = 0;
- $frags_limit = 10; // frags limit to show? // default: 10
- $player_frags = $db->query('SELECT `player_deaths`.*, `players`.`name`, `killers`.`unjustified` FROM `player_deaths` LEFT JOIN `killers` ON `killers`.`death_id` = `player_deaths`.`id` LEFT JOIN `player_killers` ON `player_killers`.`kill_id` = `killers`.`id` LEFT JOIN `players` ON `players`.`id` = `player_deaths`.`player_id` WHERE `player_killers`.`player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,'.$frags_limit.';');
- if(count($player_frags))
- {
- $frags = 0;
- $frag_add_content .= '
Victims | ';
- foreach($player_frags as $frag)
- {
- $frags++;
- $frag_add_content .= '
- ' . date("j M Y, H:i", $frag['date']) . ' |
- Fragged ' . $frag[name] . ' at level ' . $frag[level];
-
- $frag_add_content .= ". (".(($frag['unjustified'] == 0) ? "Justified" : "Unjustified").") | ";
- }
- if($frags > 0)
- echo $frag_add_content . ' ';
- }
+ $query = $query->fetch();
+ $frags_count = $query['frags'];
}
-
- //Signature
- //Js
- if($config['signature_enabled'])
+ }
+
+ $town_field = 'town';
+ if(fieldExist('town_id', 'houses'))
+ $town_field = 'town_id';
+ else if(fieldExist('townid', 'houses'))
+ $town_field = 'townid';
+ else if(!fieldExist('town', 'houses'))
+ $town_field = false;
+
+ if(fieldExist('name', 'houses')) {
+ $house = $db->query('SELECT `id`, `paid`, `name`' . ($town_field != false ? ', `' . $town_field . '` as `town`' : '') . ' FROM `houses` WHERE `owner` = '.$player->getId())->fetch();
+ if(isset($house['id']))
+ {
+ $add = '';
+ if($house['paid'] > 0)
+ $add = ' is paid until '.date("M d Y", $house['paid']);
+ }
+ }
+
+ $rank_of_player = $player->getRank();
+ if($rank_of_player->isLoaded()) {
+ $guild = $rank_of_player->getGuild();
+ if($guild->isLoaded()) {
+ $guild_name = $guild->getName();
+ }
+ }
+
+ $comment = $player->getComment();
+
+ if($config['characters']['skills'])
{
- echo '';
- echo '
- Signature |
- ';
- $signature_url = BASE_URL . 'tools/signature/?name=' . urlencode($player->getName());
- if($config['friendly_urls'])
- $signature_url = BASE_URL . urlencode($player->getName()) . '.png';
-
- echo '
-
-
- Show links
-
-
- |
- ';
+ else
+ $skills = $db->query('SELECT `skillid`, `value` FROM `player_skills` WHERE `player_id` = ' . $player->getId() . ' LIMIT 7');
+
+ foreach($skills as &$skill) {
+ $skill['name'] = getSkillName($skill['skillid']);
+ }
+ }
+
+ $quests_enabled = $config['characters']['quests'] && !empty($config['quests']);
+ if($quests_enabled)
+ {
+ $quests = $config['quests'];
+ $sql_query_in = '';
+ $i = 0;
+ foreach($quests as $quest_name => $quest_storage)
+ {
+ if($i != 0)
+ $sql_query_in .= ', ';
+
+ $sql_query_in .= $quest_storage;
+ $i++;
+ }
+
+ $storage_sql = $db->query('SELECT `key`, `value` FROM `player_storage` WHERE `player_id` = '.$player->getId().' AND `key` IN (' . $sql_query_in . ')');
+ $player_storage = array();
+ foreach($storage_sql as $storage)
+ $player_storage[$storage['key']] = $storage['value'];
+
+ foreach($quests as &$storage) {
+ $storage = isset($player_storage[$storage]) && $player_storage[$storage] > 0;
+ }
+ }
+
+ if($config['characters']['equipment'])
+ {
+ global $db;
+ $eq_sql = $db->query('SELECT `pid`, `itemtype` FROM player_items WHERE player_id = '.$player->getId().' AND (`pid` >= 1 and `pid` <= 10)');
+ $equipment = array();
+ foreach($eq_sql as $eq)
+ $equipment[$eq['pid']] = $eq['itemtype'];
+
+ $empty_slots = array("", "no_helmet", "no_necklace", "no_backpack", "no_armor", "no_handleft", "no_handright", "no_legs", "no_boots", "no_ring", "no_ammo");
+ for($i = 0; $i <= 10; $i++)
+ {
+ if(!isset($equipment[$i]) || $equipment[$i] == 0)
+ $equipment[$i] = $empty_slots[$i];
+ }
+
+ for($i = 1; $i < 11; $i++)
+ {
+ if(check_number($equipment[$i]))
+ $equipment[$i] = getItemImage($equipment[$i]);
+ else
+ $equipment[$i] = ' ';
+ }
+
+ $skulls = array(
+ 1 => 'yellow_skull',
+ 2 => 'green_skull',
+ 3 => 'white_skull',
+ 4 => 'red_skull',
+ 5 => 'black_skull'
+ );
}
- if($player->getCustomField('hidden') != 1)
+ $dead_add_content = '';
+ if(tableExist('killers')) {
+ $player_deaths = $db->query('SELECT `id`, `date`, `level` FROM `player_deaths` WHERE `player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,10;');
+ if(count($player_deaths))
{
- $rows = 0;
- echo '
-
-
- Account Information |
- ';
-
- $realName = $account->getCustomField('rlname');
- if(!empty($realName))
+ $dead_add_content = '
Character Deaths | ';
+
+ $number_of_rows = 0;
+ foreach($player_deaths as $death)
{
- echo '
-
- Real name: |
- '.$realName.' |
- ';
- }
-
- $group = $player->getGroup();
- if($group->isLoaded() && $group->getId() != 1)
- {
- echo
- '
- Position: |
- ' . ucfirst($group->getName()) . ' |
- ';
- }
-
- $realLocation = $account->getCustomField('location');
- if(isset($realLocation[0]))
- {
- echo
- '
- Location: |
- '.$realLocation.' |
- ';
- }
-
- echo
- '
- Created: | ';
- $bannedUntil = '';
- $banned = array();
- if(tableExist('account_bans'))
- $banned = $db->query('SELECT `expires_at` as `expires` FROM `account_bans` WHERE `account_id` = '.$account->getId().' and `expires_at` > ' . time());
- else if(tableExist('bans')) {
- if(fieldExist('expires', 'bans'))
- $banned = $db->query('SELECT `expires` FROM `bans` WHERE (`value` = '.$account->getId().' or `value` = '.$player->getId().') and `active` = 1 and `type` != 2 and `type` != 4 and `expires` > ' . time());
- else
- $banned = $db->query('SELECT `time` as `time` FROM `bans` WHERE (`account` = '.$account->getId().' or `player` = '.$player->getId().') and `type` != 2 and `type` != 4 and `time` > ' . time());
- }
- foreach($banned as $ban)
+ $dead_add_content .= '
+ '.date("j M Y, H:i", $death['date']).' |
+ ';
+ $killers = $db->query("SELECT environment_killers.name AS monster_name, players.name AS player_name, players.deleted AS player_exists FROM killers LEFT JOIN environment_killers ON killers.id = environment_killers.kill_id
+LEFT JOIN player_killers ON killers.id = player_killers.kill_id LEFT JOIN players ON players.id = player_killers.player_id
+WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, killers.id ASC")->fetchAll();
+
+ $i = 0;
+ $count = count($killers);
+ foreach($killers as $killer)
+ {
+ $i++;
+ if($killer['player_name'] != "")
{
- $bannedUntil = ' [Banished '.($ban['expires'] == "-1" ? 'forever' : 'until '.date("d F Y, h:s", $ban['expires'])).']';
+ if($i == 1)
+ $dead_add_content .= "Killed at level ".$death['level']."";
+ else if($i == $count)
+ $dead_add_content .= " and";
+ else
+ $dead_add_content .= ",";
+
+ $dead_add_content .= " by ";
+ if($killer['monster_name'] != "")
+ $dead_add_content .= $killer['monster_name']." summoned by ";
+
+ if($killer['player_exists'] == 0)
+ $dead_add_content .= getPlayerLink($killer['player_name']);
+ else
+ $dead_add_content .= $killer['player_name'];
}
- echo ' | '.date("j F Y, g:i a", $account->getCustomField("created")).$bannedUntil.' |
-
- ';
-
- echo '
-
-
- Characters |
-
-
- Name |
- Level |
- Status |
- |
- ';
-
+ else
+ {
+ if($i == 1)
+ $dead_add_content .= "Died at level ".$death['level']."";
+ else if($i == $count)
+ $dead_add_content .= " and";
+ else
+ $dead_add_content .= ",";
+
+ $dead_add_content .= " by ".$killer['monster_name'];
+ }
+ }
+
+ $dead_add_content .= ".";
+ }
+
+ if($number_of_rows > 0)
+ $dead_add_content += ' ';
+ else
+ $dead_add_content = '';
+ }
+ }
+ else {
+ $mostdamage = '';
+ if(fieldExist('mostdamage_by', 'player_deaths'))
+ $mostdamage = ', `mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified`';
+ $deaths_db = $db->query('SELECT
+ `player_id`, `time`, `level`, `killed_by`, `is_player`' . $mostdamage . '
+ FROM `player_deaths`
+ WHERE `player_id` = ' . $player->getId() . ' ORDER BY `time` DESC LIMIT 10;');
+
+ if(count($deaths_db))
+ {
+ $dead_add_content = '
Character Deaths | ';
+
+ $number_of_rows = 0;
+ foreach($deaths_db as $death)
+ {
+ $dead_add_content .= '
+ '.date("j M Y, H:i", $death['time']).' |
+ ';
+
+ $lasthit = ($death['is_player']) ? getPlayerLink($death['killed_by']) : $death['killed_by'];
+ $dead_add_content .= 'Killed at level ' . $death['level'] . ' by ' . $lasthit;
+ if($death['unjustified']) {
+ $dead_add_content .= " (unjustified)";
+ }
+
+ $mostdmg = ($death['mostdamage_by'] !== $death['killed_by']) ? true : false;
+ if($mostdmg)
+ {
+ $mostdmg = ($death['mostdamage_is_player']) ? getPlayerLink($death['mostdamage_by']) : $death['mostdamage_by'];
+ $dead_add_content .= ' and by ' . $mostdmg;
+
+ if ($death['mostdamage_unjustified']) {
+ $dead_add_content .= " (unjustified)";
+ }
+ }
+ else {
+ $dead_add_content .= " (soloed)";
+ }
+
+ $dead_add_content .= ". | ";
+ }
+
+ if($number_of_rows > 0)
+ $dead_add_content += ' ';
+ else
+ $dead_add_content = '';
+ }
+ }
+
+ $frag_add_content = '';
+ if($config['characters']['frags'])
+ {
+ //frags list by Xampy
+ $i = 0;
+ $frags_limit = 10; // frags limit to show? // default: 10
+ $player_frags = $db->query('SELECT `player_deaths`.*, `players`.`name`, `killers`.`unjustified` FROM `player_deaths` LEFT JOIN `killers` ON `killers`.`death_id` = `player_deaths`.`id` LEFT JOIN `player_killers` ON `player_killers`.`kill_id` = `killers`.`id` LEFT JOIN `players` ON `players`.`id` = `player_deaths`.`player_id` WHERE `player_killers`.`player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,'.$frags_limit.';');
+ if(count($player_frags))
+ {
+ $frags = 0;
+ $frag_add_content .= '
Victims | ';
+ foreach($player_frags as $frag)
+ {
+ $frags++;
+ $frag_add_content .= '
+ ' . date("j M Y, H:i", $frag['date']) . ' |
+ Fragged ' . $frag[name] . ' at level ' . $frag[level];
+
+ $frag_add_content .= ". (".(($frag['unjustified'] == 0) ? "Justified" : "Unjustified").") | ";
+ }
+
+ if($frags > 0)
+ $frag_add_content += ' ';
+ else
+ $frag_add_content = '';
+ }
+ }
+
+ // signature
+ if($config['signature_enabled']) {
+ $signature_url = BASE_URL . 'tools/signature/?name=' . urlencode($player->getName());
+ if($config['friendly_urls'])
+ $signature_url = BASE_URL . urlencode($player->getName()) . '.png';
+ }
+
+ $hidden = $player->getCustomField('hidden');
+ if($hidden != 1) {
+ // check if account has been banned
+ $bannedUntil = '';
+ $banned = array();
+ if (tableExist('account_bans'))
+ $banned = $db->query('SELECT `expires_at` as `expires` FROM `account_bans` WHERE `account_id` = ' . $account->getId() . ' and `expires_at` > ' . time());
+ else if (tableExist('bans')) {
+ if (fieldExist('expires', 'bans'))
+ $banned = $db->query('SELECT `expires` FROM `bans` WHERE (`value` = ' . $account->getId() . ' or `value` = ' . $player->getId() . ') and `active` = 1 and `type` != 2 and `type` != 4 and `expires` > ' . time());
+ else
+ $banned = $db->query('SELECT `time` as `time` FROM `bans` WHERE (`account` = ' . $account->getId() . ' or `player` = ' . $player->getId() . ') and `type` != 2 and `type` != 4 and `time` > ' . time());
+ }
+ foreach ($banned as $ban) {
+ $bannedUntil = ' [Banished ' . ($ban['expires'] == "-1" ? 'forever' : 'until ' . date("d F Y, h:s", $ban['expires'])) . ']';
+ }
+
$account_players = $account->getPlayersList();
$account_players->orderBy('name');
- $player_number = 0;
- foreach($account_players as $player_list)
- {
- $player_list_status = '';
- if($player_list->isHidden())
- continue;
-
- $player_number++;
- if($player_list->isOnline())
- $player_list_status = 'Online';
-
- echo ''.$player_number.'. '.$player_list->getName();
- echo ($player_list->isDeleted()) ? ' [DELETED]' : '';
- echo ' | '.$player_list->getLevel().' '.$config['vocations'][$player_list->getVocation()].' | ' . $player_list_status . ' | | ';
- }
- echo ' |  |