* remove whitespaces

This commit is contained in:
slawkens
2018-05-29 21:06:15 +02:00
parent 42d23e9b37
commit bf361238cb
27 changed files with 210 additions and 211 deletions

View File

@@ -33,10 +33,10 @@ if(!$logged)
require PAGES . 'account/' . ACTION . '.php';
return;
}
if(!empty($errors))
echo $twig->render('error_box.html.twig', array('errors' => $errors));
echo $twig->render('account.login.html.twig', array(
'redirect' => isset($_REQUEST['redirect']) ? $_REQUEST['redirect'] : null,
'account' => USE_ACCOUNT_NAME ? 'Name' : 'Number',
@@ -66,7 +66,7 @@ $errors = array();
$account_status = '<b><font color="red">Free Account</font></b>';
else
$account_status = '<b><font color="green">Premium Account, ' . ($freePremium ? 'Unlimited' : $account_logged->getPremDays() . ' days left') . '</font></b>';
if(empty($recovery_key))
$account_registered = '<b><font color="red">No</font></b>';
else
@@ -91,7 +91,7 @@ $errors = array();
$welcome_message = '<font color="red">Your account is banished FOREVER!</font>';
else
$welcome_message = 'Welcome to your account!';
$email_change = '';
$email_request = false;
if($email_new_time > 1)
@@ -104,12 +104,12 @@ $errors = array();
$email_request = true;
}
}
$actions = array();
foreach($account_logged->getActionsLog(0, 1000) as $action) {
$actions[] = array('action' => $action['action'], 'date' => $action['date'], 'ip' => $action['ip'] != 0 ? long2ip($action['ip']) : inet_ntop($action['ipv6']));
}
$players = array();
$account_players = $account_logged->getPlayersList();
$account_players->orderBy('id');

View File

@@ -21,7 +21,7 @@ if($reload) {
success('Successfully loaded items.');
else
error(Items::getError());
if(Weapons::loadFromXML(true))
success('Successfully loaded weapons.');
else

View File

@@ -18,7 +18,7 @@ if(!hasFlag(FLAG_CONTENT_MENUS) && !superAdmin())
if(isset($_REQUEST['template'])) {
$template = $_REQUEST['template'];
if(isset($_REQUEST['menu'])) {
$post_menu = $_REQUEST['menu'];
$post_menu_link = $_REQUEST['menu_link'];
@@ -28,13 +28,13 @@ if(isset($_REQUEST['template'])) {
echo 'Menu count is not equal menu links. Something went wrong when sending form.';
return;
}
$db->query('DELETE FROM `' . TABLE_PREFIX . 'menu` WHERE `template` = ' . $db->quote($template));
foreach($post_menu as $category => $menus) {
foreach($menus as $i => $menu) {
if(empty($menu)) // don't save empty menu item
continue;
try {
$db->insert(TABLE_PREFIX . 'menu', array('template' => $template, 'name' => $menu, 'link' => $post_menu_link[$category][$i], 'blank' => $post_menu_blank[$category][$i] == 'on' ? 1 : 0, 'color' => str_replace('#', '', $post_menu_color[$category][$i]), 'category' => $category, 'ordering' => $i));
}
@@ -43,10 +43,10 @@ if(isset($_REQUEST['template'])) {
}
}
}
success('Saved at ' . date('H:i'));
}
$file = TEMPLATES . $template . '/config.php';
if(file_exists($file)) {
require_once $file;
@@ -55,12 +55,12 @@ if(isset($_REQUEST['template'])) {
echo 'Cannot find template config.php file.';
return;
}
if(!isset($config['menu_categories'])) {
echo "No menu categories set in template config.php.<br/>This template doesn't support dynamic menus.";
return;
}
echo 'Hint: You can drag menu items.<br/>
Hint: Add links to external sites using: <b>http://</b> prefix.<br/>
Not all templates support blank and colorful links.<br/>
@@ -88,19 +88,19 @@ if(isset($_REQUEST['template'])) {
<input class="color-picker" type="text" name="menu_color[' . $id . '][]" value="#' . $menu['color'] . '" />
<a class="remove-button" id="remove-button-' . $id . '-' . $i . '"><img src="' . BASE_URL . 'images/del.png"/></a></li>';
$i++;
$last_id[$id] = $i;
}
}
echo '</ul>';
}
echo '<input type="submit" class="button" value="Update">';
echo '<input type="button" class="button" value="Cancel" onclick="window.location = \'' . ADMIN_URL . '?p=menus&template=' . $template . '\';">';
echo '</form>';
echo $twig->render('admin.menus.js.html.twig', array(
'menus' => $menus,
'last_id' => $last_id
@@ -114,7 +114,7 @@ else {
unset($templates[$key]);
}
}
echo $twig->render('admin.menus.form.html.twig', array(
'templates' => $templates
));

View File

@@ -16,7 +16,7 @@ echo $twig->render('admin.plugins.form.html.twig');
if(isset($_REQUEST['uninstall'])){
$uninstall = $_REQUEST['uninstall'];
if(Plugins::uninstall($uninstall)) {
success('Successfully uninstalled plugin ' . $uninstall);
}
@@ -72,7 +72,7 @@ else if(isset($_FILES["plugin"]["name"]))
foreach(Plugins::getWarnings() as $warning) {
warning($warning);
}
$info = Plugins::getPlugin();
success((isset($info['name']) ? '<strong>' . $info['name'] . '</strong> p' : 'P') . 'lugin has been successfully installed.');
}
@@ -80,7 +80,7 @@ else if(isset($_FILES["plugin"]["name"]))
$error = Plugins::getError();
error(!empty($error) ? $error : 'Unexpected error happened while installing plugin. Please try again later.');
}
unlink($targetzip); // delete the Zipped file
}
else

View File

@@ -80,15 +80,15 @@ if($player->isLoaded() && !$player->isDeleted())
if($config['characters']['outfit'])
$outfit = $config['outfit_images_url'] . '?id=' . $player->getLookType() . ($db->hasColumn('players', 'lookaddons') ? '&addons=' . $player->getLookAddons() : '') . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet();
$flag = '';
if($config['account_country'])
$flag = getFlagImage($account->getCountry());
$player_sex = 'Unknown';
if(isset($config['genders'][$player->getSex()]))
$player_sex = strtolower($config['genders'][$player->getSex()]);
$marital_status = 'single';
$marriage_id = $player->getMarriage();
if($marriage_id > 0) {
@@ -108,14 +108,14 @@ if($player->isLoaded() && !$player->isDeleted())
'WHERE `player_id` = ' .$player->getId() . ' ' .
'GROUP BY `player_id`' .
'ORDER BY COUNT(`player_id`) DESC');
if($query->rowCount() > 0)
{
$query = $query->fetch();
$frags_count = $query['frags'];
}
}
$town_field = 'town';
if($db->hasColumn('houses', 'town_id'))
$town_field = 'town_id';
@@ -123,7 +123,7 @@ if($player->isLoaded() && !$player->isDeleted())
$town_field = 'townid';
else if(!$db->hasColumn('houses', 'town'))
$town_field = false;
if($db->hasColumn('houses', 'name')) {
$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']))
@@ -133,7 +133,7 @@ if($player->isLoaded() && !$player->isDeleted())
$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();
@@ -141,14 +141,14 @@ if($player->isLoaded() && !$player->isDeleted())
$guild_name = $guild->getName();
}
}
$comment = $player->getComment();
if($config['characters']['skills'])
{
if($db->hasColumn('players', 'skill_fist')) {// 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',
@@ -158,7 +158,7 @@ if($player->isLoaded() && !$player->isDeleted())
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]);
@@ -168,12 +168,12 @@ if($player->isLoaded() && !$player->isDeleted())
$skills_db = $db->query('SELECT `skillid`, `value` FROM `player_skills` WHERE `player_id` = ' . $player->getId() . ' LIMIT 7');
$skills = $skills_db->fetchAll();
}
foreach($skills as &$skill) {
$skill['name'] = getSkillName($skill['skillid']);
}
}
$quests_enabled = $config['characters']['quests'] && !empty($config['quests']);
if($quests_enabled)
{
@@ -184,21 +184,21 @@ if($player->isLoaded() && !$player->isDeleted())
{
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;
@@ -206,14 +206,14 @@ if($player->isLoaded() && !$player->isDeleted())
$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(Validator::number($equipment[$i]))
@@ -221,7 +221,7 @@ if($player->isLoaded() && !$player->isDeleted())
else
$equipment[$i] = '<img src="images/items/' . $equipment[$i] . '.gif" width="32" height="32" border="0" alt=" ' . $equipment[$i] . '" />';
}
$skulls = array(
1 => 'yellow_skull',
2 => 'green_skull',
@@ -243,7 +243,7 @@ if($player->isLoaded() && !$player->isDeleted())
$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();
$description = '';
$i = 0;
$count = count($killers);
@@ -258,11 +258,11 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
$description .= " and";
else
$description .= ",";
$description .= " by ";
if($killer['monster_name'] != "")
$description .= $killer['monster_name']." summoned by ";
if($killer['player_exists'] == 0)
$description .= getPlayerLink($killer['player_name']);
else
@@ -276,11 +276,11 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
$description .= " and";
else
$description .= ",";
$description .= " by ".$killer['monster_name'];
}
}
$deaths[] = array('time' => $death['date'], 'description' => $description . '.');
}
}
@@ -293,7 +293,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
`player_id`, `time`, `level`, `killed_by`, `is_player`' . $mostdamage . '
FROM `player_deaths`
WHERE `player_id` = ' . $player->getId() . ' ORDER BY `time` DESC LIMIT 10;')->fetchAll();
if(count($deaths_db))
{
$number_of_rows = 0;
@@ -304,13 +304,13 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
if($death['unjustified']) {
$description .= " <font color='red' style='font-style: italic;'>(unjustified)</font>";
}
$mostdmg = ($death['mostdamage_by'] !== $death['killed_by']) ? true : false;
if($mostdmg)
{
$mostdmg = ($death['mostdamage_is_player']) ? getPlayerLink($death['mostdamage_by']) : $death['mostdamage_by'];
$description .= ' and by ' . $mostdmg;
if ($death['mostdamage_unjustified']) {
$description .= " <font color='red' style='font-style: italic;'>(unjustified)</font>";
}
@@ -318,12 +318,12 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
else {
$description .= " <b>(soloed)</b>";
}
$deaths[] = array('time' => $death['time'], 'description' => $description);
}
}
}
$frags = array();
$frag_add_content = '';
if($config['characters']['frags'])
@@ -342,12 +342,12 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
}
}
}
// signature
if($config['signature_enabled']) {
$signature_url = BASE_URL . ($config['friendly_urls'] ? '' : '?') . urlencode($player->getName()) . '.png';
}
$hidden = $player->isHidden();
if(!$hidden) {
// check if account has been banned
@@ -364,7 +364,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
foreach($banned as $ban) {
$bannedUntil = $ban['expires'];
}
$account_players = array();
$query = $db->query('SELECT `id` FROM `players` WHERE `account_id` = ' . $account->getId() . ' ORDER BY `name`')->fetchAll();
foreach($query as $p) {
@@ -376,7 +376,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
}
}
}
echo $twig->render('characters.html.twig', array(
'outfit' => isset($outfit) ? $outfit : null,
'player' => $player,

View File

@@ -132,7 +132,7 @@ if($save)
$new_account->setEMail($email);
$new_account->unblock();
$new_account->save();
if($config_salt_enabled)
$new_account->setCustomField('salt', $salt);
@@ -156,7 +156,7 @@ if($save)
if($config['account_premium_points']) {
$new_account->setCustomField('premium_points', $config['account_premium_points']);
}
$tmp_account = (USE_ACCOUNT_NAME ? $account_name : $account_id);
if($config['mail_enabled'] && $config['account_mail_verify'])
{
@@ -187,7 +187,7 @@ if($save)
echo $twig->render('account.created.html.twig', array(
'account' => $tmp_account
));
if($config['mail_enabled'] && $config['account_welcome_mail'])
{
$mailBody = $twig->render('account.welcome_mail.html.twig', array(
@@ -229,7 +229,7 @@ if($config['account_country']) {
$countries = array();
foreach (array('pl', 'se', 'br', 'us', 'gb') as $c)
$countries[$c] = $config['countries'][$c];
$countries['--'] = '----------';
foreach ($config['countries'] as $code => $c)
$countries[$code] = $c;

View File

@@ -32,26 +32,26 @@ $canEdit = Forum::isModerator();
if($canEdit)
{
$groups = new OTS_Groups_List();
if(!empty($action))
{
if($action == 'delete_board' || $action == 'edit_board' || $action == 'hide_board' || $action == 'moveup_board' || $action == 'movedown_board')
$id = $_REQUEST['id'];
if(isset($_REQUEST['access']))
$access = $_REQUEST['access'];
if(isset($_REQUEST['guild']))
$guild = $_REQUEST['guild'];
if(isset($_REQUEST['name']))
$name = $_REQUEST['name'];
if(isset($_REQUEST['description']))
$description = stripslashes($_REQUEST['description']);
$errors = array();
if($action == 'add_board') {
if(Forum::add_board($name, $description, $access, $guild, $errors))
$action = $name = $description = '';
@@ -87,13 +87,13 @@ if($canEdit)
Forum::move_board($id, 1, $errors);
$action = '';
}
if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors));
$action = '';
}
}
if(empty($action) || $action == 'edit_board') {
$guilds = $db->query('SELECT `id`, `name` FROM `guilds`')->fetchAll();
echo $twig->render('forum.add_board.html.twig', array(
@@ -107,7 +107,7 @@ if($canEdit)
'groups' => $groups,
'guilds' => $guilds
));
if($action == 'edit_board')
$action = '';
}
@@ -124,7 +124,7 @@ foreach(getForumBoards() as $section)
'guild' => $section['guild'],
'access' => $section['access']
);
if($canEdit) {
$sections[$section['id']]['hidden'] = $section['hidden'];
}
@@ -137,7 +137,7 @@ $number_of_rows = 0;
if(empty($action))
{
$info = $db->query("SELECT `section`, COUNT(`id`) AS 'threads', SUM(`replies`) AS 'replies' FROM `" . TABLE_PREFIX . "forum` WHERE `first_post` = `id` GROUP BY `section`")->fetchAll();
$boards = array();
foreach($info as $data)
$counters[$data['section']] = array('threads' => $data['threads'], 'posts' => $data['replies'] + $data['threads']);
@@ -162,13 +162,13 @@ if(empty($action))
);
}
}
echo $twig->render('forum.boards.html.twig', array(
'boards' => $boards,
'canEdit' => $canEdit,
'last' => count($sections)
));
return;
}

View File

@@ -25,13 +25,13 @@ if($config['highscores_vocation_box'] && isset($vocation))
foreach($config['vocations'] as $id => $name) {
if(strtolower($name) == $vocation) {
$add_vocs = array($id);
$i = $id + $config['vocations_amount'];
while(isset($config['vocations'][$i])) {
$add_vocs[] = $i;
$i += $config['vocations_amount'];
}
$add_sql = 'AND `vocation` IN (' . implode(', ', $add_vocs) . ')';
break;
}
@@ -226,7 +226,7 @@ echo '
<td>' . ($offset + $i) . '.</td>';
if($config['highscores_outfit'])
echo '<td><img style="position:absolute;margin-top:' . (in_array($player['looktype'], array(75, 266, 302)) ? '-15px;margin-left:5px' : '-45px;margin-left:-25px') . ';" src="' . $config['outfit_images_url'] . '?id=' . $player['looktype'] . ($outfit_addons ? '&addons=' . $player['lookaddons'] : '') . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] . '" alt="" /></td>';
echo '
<td>
<a href="' . getPlayerLink($player['name'], false) . '">
@@ -319,7 +319,7 @@ echo '
'fist' => 'Fist',
'fishing' => 'Fishing',
);
if($config['highscores_frags']) {
$types['frags'] = 'Frags';
}

View File

@@ -43,7 +43,7 @@ if(isset($_GET['archive']))
$query = $query->fetch();
$author = $query['name'];
}
$content_ = $news['body'];
$firstLetter = '';
if($content_[0] != '<')
@@ -54,7 +54,7 @@ if(isset($_GET['archive']))
$content_ = $firstLetter . substr($content_, 1);
}
}
echo $twig->render('news.html.twig', array(
'title' => stripslashes($news['title']),
'content' => $content_,
@@ -72,7 +72,7 @@ if(isset($_GET['archive']))
return;
}
?>
<?php
$newses = array();
@@ -86,11 +86,11 @@ if(isset($_GET['archive']))
'date' => $news['date']
);
}
echo $twig->render('news.archive.html.twig', array(
'newses' => $newses
));
return;
}
@@ -125,7 +125,7 @@ if($canEdit)
if(isset($forum_section) && $forum_section != '-1') {
$forum_add = Forum::add_thread($p_title, $body, $forum_section, $player_id, $account_logged->getId(), $errors);
}
if(News::add($p_title, $body, $type, $category, $player_id, isset($forum_add) && $forum_add != 0 ? $forum_add : 0, $article_text, $article_image, $errors)) {
$p_title = $body = $comments = $article_text = $article_image = '';
$type = $category = $player_id = 0;
@@ -153,7 +153,7 @@ if($canEdit)
if(isset($forum_section) && Validator::number($forum_section)) {
$db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `author_guid` = ".(int) $player_id.", `post_text` = ".$db->quote($body).", `post_topic` = ".$db->quote($p_title).", `edit_date` = " . time() . " WHERE `id` = " . $db->quote($forum_section));
}
$action = $p_title = $body = $comments = $article_text = $article_image = '';
$type = $category = $player_id = 0;
}
@@ -193,7 +193,7 @@ if(!$news_cached)
'SELECT * FROM `' . TABLE_PREFIX . 'news` WHERE `type` = ' . TICKER .
($canEdit ? '' : ' AND `hidden` != 1') .
' ORDER BY `date` DESC LIMIT ' . $config['news_ticker_limit']);
$tickers_content = '';
if($tickers_db->rowCount() > 0)
{
@@ -202,26 +202,26 @@ if(!$news_cached)
$ticker['icon'] = $categories[$ticker['category']]['icon_id'];
$ticker['body_short'] = short_text(strip_tags($ticker['body']), 100);
}
$tickers_content = $twig->render('news.tickers.html.twig', array(
'tickers' => $tickers,
'canEdit' => $canEdit
));
}
if($cache->enabled() && !$canEdit)
$cache->set('news_' . $template_name . '_' . TICKER, $tickers_content, 120);
$featured_article_db =
$db->query(
'SELECT `id`, `title`, `article_text`, `article_image`, `hidden` FROM `' . TABLE_PREFIX . 'news` WHERE `type` = ' . ARTICLE .
($canEdit ? '' : ' AND `hidden` != 1') .
' ORDER BY `date` DESC LIMIT 1');
$article = '';
if($featured_article_db->rowCount() > 0) {
$article = $featured_article_db->fetch();
$featured_article = '';
if($twig->getLoader()->exists('news.featured_article.html.twig')) {
$featured_article = $twig->render('news.featured_article.html.twig', array(
@@ -236,7 +236,7 @@ if(!$news_cached)
'canEdit' => $canEdit
));
}
if($cache->enabled() && !$canEdit)
$cache->set('news_' . $template_name . '_' . ARTICLE, $featured_article, 120);
}
@@ -255,7 +255,7 @@ if(!$news_cached)
$player = new OTS_Player();
$player->load($player_id);
}
$account_players = $account_logged->getPlayersList();
$account_players->orderBy('group_id', POT::ORDER_DESC);
@@ -312,7 +312,7 @@ if(!$news_cached)
' . ($news['hidden'] != 1 ? 'Hide' : 'Show') . '
</a>';
}
$content_ = $news['body'];
$firstLetter = '';
if($content_[0] != '<')
@@ -323,7 +323,7 @@ if(!$news_cached)
$content_ = $firstLetter . substr($content_, 1);
}
}
echo $twig->render('news.html.twig', array(
'id' => $news['id'],
'title' => stripslashes($news['title']),
@@ -362,22 +362,22 @@ class News
$errors[] = 'News title cannot be longer than ' . TITLE_LIMIT . ' characters.';
return false;
}
if(strlen($body) > BODY_LIMIT) {
$errors[] = 'News content cannot be longer than ' . BODY_LIMIT . ' characters.';
return false;
}
if(strlen($article_text) > ARTICLE_TEXT_LIMIT) {
$errors[] = 'Article text cannot be longer than ' . ARTICLE_TEXT_LIMIT . ' characters.';
return false;
}
if(strlen($article_image) > ARTICLE_IMAGE_LIMIT) {
$errors[] = 'Article image cannot be longer than ' . ARTICLE_IMAGE_LIMIT . ' characters.';
return false;
}
return true;
}

View File

@@ -79,7 +79,7 @@ foreach($playersOnline as $player)
if((int)$player['promotion'] > 0)
$player['vocation'] += ($player['promotion'] * $config['vocations_amount']);
}
$players_data[] = array(
'name' => getPlayerLink($player['name']),
'player' => $player,
@@ -88,7 +88,7 @@ foreach($playersOnline as $player)
'country_image' => $config['account_country'] ? getFlagImage($player['country']) : null,
'outfit' => $config['online_outfit'] ? $config['outfit_images_url'] . '?id=' . $player['looktype'] . ($outfit_addons ? '&addons=' . $player['lookaddons'] : '') . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] : null
);
if($config['online_vocations'])
$vocs[($player['vocation'] > $config['vocations_amount'] ? $player['vocation'] - $config['vocations_amount'] : $player['vocation'])]++;
}
@@ -111,7 +111,7 @@ if($players > 0)
}
else
$query = NULL;
if(isset($query) && $query->rowCount() > 0)
{
$result = $query->fetch();