Compare commits

...

5 Commits

Author SHA1 Message Date
slawkens1
956e551872 Update to 0.0.6 2017-05-06 02:08:13 +02:00
slawkens1
3270caf870 Update to version 0.0.6 2017-05-06 02:05:37 +02:00
slawkens1
4465da67e9 Fixes
* fixed support for TFS 0.2 series
* added FAQ link
2017-05-05 19:55:25 +02:00
slawkens1
187b70761c fixed https://otland.net/threads/myaac-v0-0-1.251454/page-3#post-2440424 2017-05-05 14:11:55 +02:00
Sławek
729944006e Update schema.sql 2017-05-05 07:41:52 +02:00
77 changed files with 205 additions and 133 deletions

View File

@@ -1,3 +1,9 @@
[0.0.6 - 06.05.2017]
- fixed bug while installing (https://otland.net/threads/myaac-v0-0-1.251454/page-3#post-2440543)
- fixed bug when creating character (not showing errors) (one more time)
- fixed support for TFS 0.2 series
- added FAQ link
[0.0.5 - 05.05.2017] [0.0.5 - 05.05.2017]
- fixed bug when creating character (not showing errors) - fixed bug when creating character (not showing errors)
- Fixed characters loading with names that has been created with other AAC - Fixed characters loading with names that has been created with other AAC

View File

@@ -21,13 +21,13 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
session_start(); session_start();
define('MYAAC', true); define('MYAAC', true);
define('MYAAC_VERSION', '0.0.5'); define('MYAAC_VERSION', '0.0.6');
define('TABLE_PREFIX', 'myaac_'); define('TABLE_PREFIX', 'myaac_');
define('START_TIME', microtime(true)); define('START_TIME', microtime(true));
define('MYAAC_OS', (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? 'WINDOWS' : 'LINUX'); define('MYAAC_OS', (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? 'WINDOWS' : 'LINUX');

View File

@@ -13,7 +13,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
CREATE TABLE `myaac_account_actions` CREATE TABLE `myaac_account_actions`
( (
`account_id` INT(11) NOT NULL, `account_id` INT(11) NOT NULL,
`ip` INT(11) NOT NULL DEFAULT '', `ip` INT(11) NOT NULL DEFAULT 0,
`date` INT(11) NOT NULL DEFAULT 0, `date` INT(11) NOT NULL DEFAULT 0,
`action` VARCHAR(255) NOT NULL DEFAULT '', `action` VARCHAR(255) NOT NULL DEFAULT '',
KEY (`account_id`) KEY (`account_id`)

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

File diff suppressed because one or more lines are too long

View File

@@ -3,21 +3,32 @@ defined('MYAAC') or die('Direct access not allowed!');
if(!isset($config['database_type'][0]) || !isset($config['database_user'][0]) || !isset($config['database_password'][0]) || !isset($config['database_name'][0])) if(!isset($config['database_type'][0]) || !isset($config['database_user'][0]) || !isset($config['database_password'][0]) || !isset($config['database_name'][0]))
{ {
if(isset($config['lua']['sqlType'])) // tfs 0.3 if(isset($config['lua']['sqlType'])) {// tfs 0.3
{ if(isset($config['lua']['mysqlHost'])) {// tfs 0.2
$config['otserv_version'] = TFS_03; $config['otserv_version'] = TFS_02;
$config['database_type'] = $config['lua']['sqlType']; $config['database_type'] = 'mysql';
$config['database_host'] = $config['lua']['sqlHost']; $config['database_host'] = $config['lua']['mysqlHost'];
$config['database_port'] = $config['lua']['sqlPort']; $config['database_port'] = $config['lua']['mysqlPort'];
$config['database_user'] = $config['lua']['sqlUser']; $config['database_user'] = $config['lua']['mysqlUser'];
$config['database_password'] = $config['lua']['sqlPass']; $config['database_password'] = $config['lua']['mysqlPass'];
$config['database_name'] = $config['lua']['sqlDatabase']; $config['database_name'] = $config['lua']['mysqlDatabase'];
$config['database_encryption'] = $config['lua']['encryptionType'];
if(!isset($config['database_encryption']) || empty($config['database_encryption'])) // before 0.3.6
$config['database_encryption'] = $config['lua']['passwordType']; $config['database_encryption'] = $config['lua']['passwordType'];
}
else {
$config['otserv_version'] = TFS_03;
$config['database_type'] = $config['lua']['sqlType'];
$config['database_host'] = $config['lua']['sqlHost'];
$config['database_port'] = $config['lua']['sqlPort'];
$config['database_user'] = $config['lua']['sqlUser'];
$config['database_password'] = $config['lua']['sqlPass'];
$config['database_name'] = $config['lua']['sqlDatabase'];
$config['database_encryption'] = $config['lua']['encryptionType'];
if(!isset($config['database_encryption']) || empty($config['database_encryption'])) // before 0.3.6
$config['database_encryption'] = $config['lua']['passwordType'];
}
} }
else if(isset($config['lua']['mysqlHost'])) // tfs 0.2/1.0 else if(isset($config['lua']['mysqlHost'])) // tfs 1.0
{ {
$config['otserv_version'] = TFS_02; $config['otserv_version'] = TFS_02;
$config['database_type'] = 'mysql'; $config['database_type'] = 'mysql';

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @author Mark Samman (Talaturen) <marksamman@gmail.com> * @author Mark Samman (Talaturen) <marksamman@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @author Mark Samman (Talaturen) <marksamman@gmail.com> * @author Mark Samman (Talaturen) <marksamman@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @author Mark Samman (Talaturen) <marksamman@gmail.com> * @author Mark Samman (Talaturen) <marksamman@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @author Mark Samman (Talaturen) <marksamman@gmail.com> * @author Mark Samman (Talaturen) <marksamman@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -756,10 +756,17 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
$this->data['banned'] = isset($ban['expires_at']); $this->data['banned'] = isset($ban['expires_at']);
$this->data['banned_time'] = $ban['expires_at']; $this->data['banned_time'] = $ban['expires_at'];
} }
else { else if(tableExist('bans')) {
$ban = $this->db->query('SELECT `active`, `expires` FROM `bans` WHERE (`type` = 3 OR `type` = 5) AND `active` = 1 AND `value` = ' . $this->data['id'] . ' AND (`expires` > ' . time() .' OR `expires` = -1) ORDER BY `expires` DESC')->fetch(); if(fieldExist('active', 'bans')) {
$this->data['banned'] = $ban['active']; $ban = $this->db->query('SELECT `active`, `expires` FROM `bans` WHERE (`type` = 3 OR `type` = 5) AND `active` = 1 AND `value` = ' . $this->data['id'] . ' AND (`expires` > ' . time() .' OR `expires` = -1) ORDER BY `expires` DESC')->fetch();
$this->data['banned_time'] = $ban['expires']; $this->data['banned'] = $ban['active'];
$this->data['banned_time'] = $ban['expires'];
}
else { // tfs 0.2
$ban = $this->db->query('SELECT `time` FROM `bans` WHERE (`type` = 3 OR `type` = 5) AND `account` = ' . $this->data['id'] . ' AND (`time` > ' . time() .' OR `time` = -1) ORDER BY `time` DESC')->fetch();
$this->data['banned'] = $ban['time'] == -1 || $ban['time'] > 0;
$this->data['banned_time'] = $ban['time'];
}
} }
} }

View File

@@ -117,7 +117,12 @@ class OTS_Player extends OTS_Row_DAO
{ {
$loss = ''; $loss = '';
if(fieldExist('loss_experience', 'players')) { if(fieldExist('loss_experience', 'players')) {
$loss = ', `loss_experience`, `loss_mana`, `loss_skills`, `loss_items`, `loss_containers`'; $loss = ', `loss_experience`, `loss_mana`, `loss_skills`';
}
$loss_items = '';
if(fieldExist('loss_items', 'players')) {
$loss_items = ', `loss_items`, `loss_containers`';
} }
$guild_info = ''; $guild_info = '';
@@ -136,7 +141,7 @@ class OTS_Player extends OTS_Row_DAO
} }
// SELECT query on database // SELECT query on database
$this->data = $this->db->query('SELECT `id`, `name`, `account_id`, `group_id`, `sex`, `vocation`, `experience`, `level`, `maglevel`, `health`, `healthmax`, `mana`, `manamax`, `manaspent`, `soul`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`' . (fieldExist('lookaddons', 'players') ? ', `lookaddons`' : '') . ', `posx`, `posy`, `posz`, `cap`, `lastlogin`, `lastlogout`, `lastip`, `save`, `conditions`, `' . $skull_time . '` as `skulltime`, `' . $skull_type . '` as `skull`' . $guild_info . ', `town_id`' . $loss . ', `balance`' . (fieldExist('blessings', 'players') ? ', `blessings`' : '') . (fieldExist('direction', 'players') ? ', `direction`' : '') . (fieldExist('stamina', 'players') ? ', `stamina`' : '') . (fieldExist('world_id', 'players') ? ', `world_id`' : '') . (fieldExist('online', 'players') ? ', `online`' : '') . ', `' . (fieldExist('deletion', 'players') ? 'deletion' : 'deleted') . '`' . (fieldExist('promotion', 'players') ? ', `promotion`' : '') . (fieldExist('marriage', 'players') ? ', `marriage`' : '') . ', `comment`, `created`, `hidden` FROM `players` WHERE `id` = ' . (int)$id)->fetch(); $this->data = $this->db->query('SELECT `id`, `name`, `account_id`, `group_id`, `sex`, `vocation`, `experience`, `level`, `maglevel`, `health`, `healthmax`, `mana`, `manamax`, `manaspent`, `soul`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`' . (fieldExist('lookaddons', 'players') ? ', `lookaddons`' : '') . ', `posx`, `posy`, `posz`, `cap`, `lastlogin`, `lastlogout`, `lastip`, `save`, `conditions`, `' . $skull_time . '` as `skulltime`, `' . $skull_type . '` as `skull`' . $guild_info . ', `town_id`' . $loss . $loss_items . ', `balance`' . (fieldExist('blessings', 'players') ? ', `blessings`' : '') . (fieldExist('direction', 'players') ? ', `direction`' : '') . (fieldExist('stamina', 'players') ? ', `stamina`' : '') . (fieldExist('world_id', 'players') ? ', `world_id`' : '') . (fieldExist('online', 'players') ? ', `online`' : '') . ', `' . (fieldExist('deletion', 'players') ? 'deletion' : 'deleted') . '`' . (fieldExist('promotion', 'players') ? ', `promotion`' : '') . (fieldExist('marriage', 'players') ? ', `marriage`' : '') . ', `comment`, `created`, `hidden` FROM `players` WHERE `id` = ' . (int)$id)->fetch();
if(!isset($this->data['guildnick']) || $this->data['guildnick']) if(!isset($this->data['guildnick']) || $this->data['guildnick'])
$this->data['guildnick'] = ''; $this->data['guildnick'] = '';
@@ -278,7 +283,12 @@ class OTS_Player extends OTS_Row_DAO
{ {
$loss = ''; $loss = '';
if(fieldExist('loss_experience', 'players')) { if(fieldExist('loss_experience', 'players')) {
$loss = ', `loss_experience` = ' . $this->data['loss_experience'] . ', `loss_mana` = ' . $this->data['loss_mana'] . ', `loss_skills` = ' . $this->data['loss_skills'] . ', `loss_items` = ' . $this->data['loss_items'] . ', `loss_containers` = ' . $this->data['loss_containers']; $loss = ', `loss_experience` = ' . $this->data['loss_experience'] . ', `loss_mana` = ' . $this->data['loss_mana'] . ', `loss_skills` = ' . $this->data['loss_skills'];
}
$loss_items = '';
if(fieldExist('loss_items', 'players')) {
$loss_items = ', `loss_items` = ' . $this->data['loss_items'] . ', `loss_containers` = ' . $this->data['loss_containers'];
} }
$guild_info = ''; $guild_info = '';
@@ -307,7 +317,7 @@ class OTS_Player extends OTS_Row_DAO
} }
// UPDATE query on database // UPDATE query on database
$this->db->query('UPDATE ' . $this->db->tableName('players') . ' SET ' . $this->db->fieldName('name') . ' = ' . $this->db->quote($this->data['name']) . ', ' . $this->db->fieldName('account_id') . ' = ' . $this->data['account_id'] . ', ' . $this->db->fieldName('group_id') . ' = ' . $this->data['group_id'] . ', ' . $this->db->fieldName('sex') . ' = ' . $this->data['sex'] . ', ' . $this->db->fieldName('vocation') . ' = ' . $this->data['vocation'] . ', ' . $this->db->fieldName('experience') . ' = ' . $this->data['experience'] . ', ' . $this->db->fieldName('level') . ' = ' . $this->data['level'] . ', ' . $this->db->fieldName('maglevel') . ' = ' . $this->data['maglevel'] . ', ' . $this->db->fieldName('health') . ' = ' . $this->data['health'] . ', ' . $this->db->fieldName('healthmax') . ' = ' . $this->data['healthmax'] . ', ' . $this->db->fieldName('mana') . ' = ' . $this->data['mana'] . ', ' . $this->db->fieldName('manamax') . ' = ' . $this->data['manamax'] . ', ' . $this->db->fieldName('manaspent') . ' = ' . $this->data['manaspent'] . ', ' . $this->db->fieldName('soul') . ' = ' . $this->data['soul'] . ', ' . $this->db->fieldName('lookbody') . ' = ' . $this->data['lookbody'] . ', ' . $this->db->fieldName('lookfeet') . ' = ' . $this->data['lookfeet'] . ', ' . $this->db->fieldName('lookhead') . ' = ' . $this->data['lookhead'] . ', ' . $this->db->fieldName('looklegs') . ' = ' . $this->data['looklegs'] . ', ' . $this->db->fieldName('looktype') . ' = ' . $this->data['looktype'] . $lookaddons . ', ' . $this->db->fieldName('posx') . ' = ' . $this->data['posx'] . ', ' . $this->db->fieldName('posy') . ' = ' . $this->data['posy'] . ', ' . $this->db->fieldName('posz') . ' = ' . $this->data['posz'] . ', ' . $this->db->fieldName('cap') . ' = ' . $this->data['cap'] . ', ' . $this->db->fieldName('lastlogin') . ' = ' . $this->data['lastlogin'] . ', ' . $this->db->fieldName('lastlogout') . ' = ' . $this->data['lastlogout'] . ', ' . $this->db->fieldName('lastip') . ' = ' . $this->data['lastip'] . ', ' . $this->db->fieldName('save') . ' = ' . (int) $this->data['save'] . ', ' . $this->db->fieldName('conditions') . ' = ' . $this->db->quote($this->data['conditions']) . ', `' . $skull_time . '` = ' . $this->data['skulltime'] . ', `' . $skull_type . '` = ' . (int) $this->data['skull'] . $guild_info . ', ' . $this->db->fieldName('town_id') . ' = ' . $this->data['town_id'] . $loss . ', ' . $this->db->fieldName('balance') . ' = ' . $this->data['balance'] . $blessings . $stamina . $direction . ' WHERE ' . $this->db->fieldName('id') . ' = ' . $this->data['id']); $this->db->query('UPDATE ' . $this->db->tableName('players') . ' SET ' . $this->db->fieldName('name') . ' = ' . $this->db->quote($this->data['name']) . ', ' . $this->db->fieldName('account_id') . ' = ' . $this->data['account_id'] . ', ' . $this->db->fieldName('group_id') . ' = ' . $this->data['group_id'] . ', ' . $this->db->fieldName('sex') . ' = ' . $this->data['sex'] . ', ' . $this->db->fieldName('vocation') . ' = ' . $this->data['vocation'] . ', ' . $this->db->fieldName('experience') . ' = ' . $this->data['experience'] . ', ' . $this->db->fieldName('level') . ' = ' . $this->data['level'] . ', ' . $this->db->fieldName('maglevel') . ' = ' . $this->data['maglevel'] . ', ' . $this->db->fieldName('health') . ' = ' . $this->data['health'] . ', ' . $this->db->fieldName('healthmax') . ' = ' . $this->data['healthmax'] . ', ' . $this->db->fieldName('mana') . ' = ' . $this->data['mana'] . ', ' . $this->db->fieldName('manamax') . ' = ' . $this->data['manamax'] . ', ' . $this->db->fieldName('manaspent') . ' = ' . $this->data['manaspent'] . ', ' . $this->db->fieldName('soul') . ' = ' . $this->data['soul'] . ', ' . $this->db->fieldName('lookbody') . ' = ' . $this->data['lookbody'] . ', ' . $this->db->fieldName('lookfeet') . ' = ' . $this->data['lookfeet'] . ', ' . $this->db->fieldName('lookhead') . ' = ' . $this->data['lookhead'] . ', ' . $this->db->fieldName('looklegs') . ' = ' . $this->data['looklegs'] . ', ' . $this->db->fieldName('looktype') . ' = ' . $this->data['looktype'] . $lookaddons . ', ' . $this->db->fieldName('posx') . ' = ' . $this->data['posx'] . ', ' . $this->db->fieldName('posy') . ' = ' . $this->data['posy'] . ', ' . $this->db->fieldName('posz') . ' = ' . $this->data['posz'] . ', ' . $this->db->fieldName('cap') . ' = ' . $this->data['cap'] . ', ' . $this->db->fieldName('lastlogin') . ' = ' . $this->data['lastlogin'] . ', ' . $this->db->fieldName('lastlogout') . ' = ' . $this->data['lastlogout'] . ', ' . $this->db->fieldName('lastip') . ' = ' . $this->data['lastip'] . ', ' . $this->db->fieldName('save') . ' = ' . (int) $this->data['save'] . ', ' . $this->db->fieldName('conditions') . ' = ' . $this->db->quote($this->data['conditions']) . ', `' . $skull_time . '` = ' . $this->data['skulltime'] . ', `' . $skull_type . '` = ' . (int) $this->data['skull'] . $guild_info . ', ' . $this->db->fieldName('town_id') . ' = ' . $this->data['town_id'] . $loss . $loss_items . ', ' . $this->db->fieldName('balance') . ' = ' . $this->data['balance'] . $blessings . $stamina . $direction . ' WHERE ' . $this->db->fieldName('id') . ' = ' . $this->data['id']);
} }
// creates new player // creates new player
else else
@@ -315,8 +325,15 @@ class OTS_Player extends OTS_Row_DAO
$loss = ''; $loss = '';
$loss_data = ''; $loss_data = '';
if(fieldExist('loss_experience', 'players')) { if(fieldExist('loss_experience', 'players')) {
$loss = ', `loss_experience`, `loss_mana`, `loss_skills`, `loss_items`, `loss_containers`'; $loss = ', `loss_experience`, `loss_mana`, `loss_skills`';
$loss_data = ', ' . $this->data['loss_experience'] . ', ' . $this->data['loss_mana'] . ', ' . $this->data['loss_skills'] . ', ' . $this->data['loss_items'] . ', ' . $this->data['loss_containers']; $loss_data = ', ' . $this->data['loss_experience'] . ', ' . $this->data['loss_mana'] . ', ' . $this->data['loss_skills'];
}
$loss_items = '';
$loss_items_data = '';
if(fieldExist('loss_items', 'players')) {
$loss_items = ', `loss_items`, `loss_containers`';
$loss_items_data = ', ' . $this->data['loss_items'] . ', ' . $this->data['loss_containers'];
} }
$guild_info = ''; $guild_info = '';
@@ -362,7 +379,7 @@ class OTS_Player extends OTS_Row_DAO
} }
// INSERT query on database // INSERT query on database
$this->db->query('INSERT INTO ' . $this->db->tableName('players') . ' (' . $this->db->fieldName('name') . ', ' . $this->db->fieldName('account_id') . ', ' . $this->db->fieldName('group_id') . ', ' . $this->db->fieldName('sex') . ', ' . $this->db->fieldName('vocation') . ', ' . $this->db->fieldName('experience') . ', ' . $this->db->fieldName('level') . ', ' . $this->db->fieldName('maglevel') . ', ' . $this->db->fieldName('health') . ', ' . $this->db->fieldName('healthmax') . ', ' . $this->db->fieldName('mana') . ', ' . $this->db->fieldName('manamax') . ', ' . $this->db->fieldName('manaspent') . ', ' . $this->db->fieldName('soul') . ', ' . $this->db->fieldName('lookbody') . ', ' . $this->db->fieldName('lookfeet') . ', ' . $this->db->fieldName('lookhead') . ', ' . $this->db->fieldName('looklegs') . ', ' . $this->db->fieldName('looktype') . $lookaddons . ', ' . $this->db->fieldName('posx') . ', ' . $this->db->fieldName('posy') . ', ' . $this->db->fieldName('posz') . ', ' . $this->db->fieldName('cap') . ', `lastlogin`, `lastlogout`, ' . $this->db->fieldName('lastip') . ', ' . $this->db->fieldName('save') . ', ' . $this->db->fieldName('conditions') . ', `' . $skull_time . '`, `' . $skull_type . '`' . $guild_info . ', ' . $this->db->fieldName('town_id') . $loss . ', `balance`' . $blessings . $stamina . $direction . ', ' . $this->db->fieldName('created') . $promotion . ') VALUES (' . $this->db->quote($this->data['name']) . ', ' . $this->data['account_id'] . ', ' . $this->data['group_id'] . ', ' . $this->data['sex'] . ', ' . $this->data['vocation'] . ', ' . $this->data['experience'] . ', ' . $this->data['level'] . ', ' . $this->data['maglevel'] . ', ' . $this->data['health'] . ', ' . $this->data['healthmax'] . ', ' . $this->data['mana'] . ', ' . $this->data['manamax'] . ', ' . $this->data['manaspent'] . ', ' . $this->data['soul'] . ', ' . $this->data['lookbody'] . ', ' . $this->data['lookfeet'] . ', ' . $this->data['lookhead'] . ', ' . $this->data['looklegs'] . ', ' . $this->data['looktype'] . $lookaddons_data . ', ' . $this->data['posx'] . ', ' . $this->data['posy'] . ', ' . $this->data['posz'] . ', ' . $this->data['cap'] . ', ' . $this->data['lastlogin'] . ', ' . $this->data['lastlogout'] . ', ' . $this->data['lastip'] . ', ' . (int) $this->data['save'] . ', ' . $this->db->quote($this->data['conditions']) . ', ' . $this->data['skulltime'] . ', ' . (int) $this->data['skull'] . $guild_info_data . ', ' . $this->data['town_id'] . $loss_data . ', ' . $this->data['balance'] . $blessings_data . $stamina_data . $direction_data . ', ' . time() . $promotion_data . ')'); $this->db->query('INSERT INTO ' . $this->db->tableName('players') . ' (' . $this->db->fieldName('name') . ', ' . $this->db->fieldName('account_id') . ', ' . $this->db->fieldName('group_id') . ', ' . $this->db->fieldName('sex') . ', ' . $this->db->fieldName('vocation') . ', ' . $this->db->fieldName('experience') . ', ' . $this->db->fieldName('level') . ', ' . $this->db->fieldName('maglevel') . ', ' . $this->db->fieldName('health') . ', ' . $this->db->fieldName('healthmax') . ', ' . $this->db->fieldName('mana') . ', ' . $this->db->fieldName('manamax') . ', ' . $this->db->fieldName('manaspent') . ', ' . $this->db->fieldName('soul') . ', ' . $this->db->fieldName('lookbody') . ', ' . $this->db->fieldName('lookfeet') . ', ' . $this->db->fieldName('lookhead') . ', ' . $this->db->fieldName('looklegs') . ', ' . $this->db->fieldName('looktype') . $lookaddons . ', ' . $this->db->fieldName('posx') . ', ' . $this->db->fieldName('posy') . ', ' . $this->db->fieldName('posz') . ', ' . $this->db->fieldName('cap') . ', `lastlogin`, `lastlogout`, ' . $this->db->fieldName('lastip') . ', ' . $this->db->fieldName('save') . ', ' . $this->db->fieldName('conditions') . ', `' . $skull_time . '`, `' . $skull_type . '`' . $guild_info . ', ' . $this->db->fieldName('town_id') . $loss . $loss_items . ', `balance`' . $blessings . $stamina . $direction . ', ' . $this->db->fieldName('created') . $promotion . ') VALUES (' . $this->db->quote($this->data['name']) . ', ' . $this->data['account_id'] . ', ' . $this->data['group_id'] . ', ' . $this->data['sex'] . ', ' . $this->data['vocation'] . ', ' . $this->data['experience'] . ', ' . $this->data['level'] . ', ' . $this->data['maglevel'] . ', ' . $this->data['health'] . ', ' . $this->data['healthmax'] . ', ' . $this->data['mana'] . ', ' . $this->data['manamax'] . ', ' . $this->data['manaspent'] . ', ' . $this->data['soul'] . ', ' . $this->data['lookbody'] . ', ' . $this->data['lookfeet'] . ', ' . $this->data['lookhead'] . ', ' . $this->data['looklegs'] . ', ' . $this->data['looktype'] . $lookaddons_data . ', ' . $this->data['posx'] . ', ' . $this->data['posy'] . ', ' . $this->data['posz'] . ', ' . $this->data['cap'] . ', ' . $this->data['lastlogin'] . ', ' . $this->data['lastlogout'] . ', ' . $this->data['lastip'] . ', ' . (int) $this->data['save'] . ', ' . $this->db->quote($this->data['conditions']) . ', ' . $this->data['skulltime'] . ', ' . (int) $this->data['skull'] . $guild_info_data . ', ' . $this->data['town_id'] . $loss_data . $loss_items_data . ', ' . $this->data['balance'] . $blessings_data . $stamina_data . $direction_data . ', ' . time() . $promotion_data . ')');
// ID of new group // ID of new group
$this->data['id'] = $this->db->lastInsertId(); $this->data['id'] = $this->db->lastInsertId();
} }

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
@@ -796,6 +796,8 @@ function checkName()
$newchar_vocation = isset($_POST['newcharvocation']) ? $_POST['newcharvocation'] : NULL; $newchar_vocation = isset($_POST['newcharvocation']) ? $_POST['newcharvocation'] : NULL;
$newchar_town = isset($_POST['newchartown']) ? $_POST['newchartown'] : NULL; $newchar_town = isset($_POST['newchartown']) ? $_POST['newchartown'] : NULL;
$newchar_errors = array(); $newchar_errors = array();
$newchar_created = false;
if(isset($_POST['savecharacter']) && $_POST['savecharacter'] == 1) { if(isset($_POST['savecharacter']) && $_POST['savecharacter'] == 1) {
if(empty($newchar_name)) if(empty($newchar_name))
$newchar_errors[] = 'Please enter a name for your character!'; $newchar_errors[] = 'Please enter a name for your character!';
@@ -897,7 +899,7 @@ function checkName()
} }
if(fieldExist('lookaddons', 'players')) if(fieldExist('lookaddons', 'players'))
$player->setLookAddons($char_to_copy->getLookAddons()); $player->setLookAddons($char_to_copy->getLookAddons());
$player->setTownId($newchar_town); $player->setTownId($newchar_town);
$player->setExperience($char_to_copy->getExperience()); $player->setExperience($char_to_copy->getExperience());
@@ -925,10 +927,16 @@ function checkName()
$player->setLossExperience($char_to_copy->getLossExperience()); $player->setLossExperience($char_to_copy->getLossExperience());
$player->setLossMana($char_to_copy->getLossMana()); $player->setLossMana($char_to_copy->getLossMana());
$player->setLossSkills($char_to_copy->getLossSkills()); $player->setLossSkills($char_to_copy->getLossSkills());
$player->setLossItems($char_to_copy->getLossItems());
} }
if(fieldExist('loss_items', 'players')) {
$player->setLossItems($char_to_copy->getLossItems());
$player->setLossContainerse($char_to_copy->getLossContainers());
}
$player->save(); $player->save();
$player->setCustomField("created", time()); $player->setCustomField("created", time());
$newchar_created = true;
$account_logged->logAction('Created character <b>' . $player->getName() . '</b>.'); $account_logged->logAction('Created character <b>' . $player->getName() . '</b>.');
unset($player); unset($player);
$player = $ots->createObject('Player'); $player = $ots->createObject('Player');
@@ -958,15 +966,16 @@ function checkName()
} }
} }
} }
else
{ if(count($newchar_errors) > 0) {
if(count($newchar_errors) > 0) { echo '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$template_path.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$template_path.'/images/content/attentionsign.gif);" /></div>';
echo '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$template_path.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$template_path.'/images/content/attentionsign.gif);" /></div>'; echo '<b>The Following Errors Have Occurred:</b><br/>';
echo '<b>The Following Errors Have Occurred:</b><br/>'; foreach($newchar_errors as $newchar_error)
foreach($newchar_errors as $newchar_error) echo '<li>'.$newchar_error . '</li>';
echo '<li>'.$newchar_error . '</li>'; echo '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$template_path.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>';
echo '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$template_path.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>'; }
}
if(!$newchar_created) {
echo 'Please choose a name'; echo 'Please choose a name';
if(count($config['character_samples']) > 1) if(count($config['character_samples']) > 1)
echo ', vocation'; echo ', vocation';

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
@@ -227,28 +227,33 @@ if($player->isLoaded() && !$player->isDeleted())
$town_field = 'town_id'; $town_field = 'town_id';
else if(fieldExist('townid', 'houses')) else if(fieldExist('townid', 'houses'))
$town_field = 'townid'; $town_field = 'townid';
else if(!fieldExist('town', 'houses'))
$town_field = false;
$house = $db->query('SELECT `id`, `paid`, `name`, `' . $town_field . '` FROM `houses` WHERE `owner` = '.$player->getId())->fetch(); if(fieldExist('name', 'houses')) {
if(isset($house['id'])) $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']))
if($house['paid'] > 0) {
$add = ' is paid until '.date("M d Y", $house['paid']); $add = '';
if($house['paid'] > 0)
$add = ' is paid until '.date("M d Y", $house['paid']);
echo echo
'<TR BGCOLOR="'.getStyle(++$rows).'"> '<TR BGCOLOR="'.getStyle(++$rows).'">
<TD>House:</TD> <TD>House:</TD>
<TD> <TD>
<TABLE BORDER=0><TR> <TABLE BORDER=0><TR>
<TD>'.$house['name'].' ('.$config['towns'][$house[$town_field]].')'.$add.'</TD> <TD>' . (isset($house['name']) ? $house['name'] : $house['id']) . (isset($house['town']) ? ' (' . $config['towns'][$house[$town_field]] . ')' : '') . $add . '</TD>
<TD> <TD>
<FORM ACTION="?subtopic=houses&page=view" METHOD=post> <FORM ACTION="?subtopic=houses&page=view" METHOD=post>
<INPUT TYPE=hidden NAME=house VALUE="'.$house['name'].'"> <INPUT TYPE=hidden NAME=house VALUE="'. (isset($house['name']) ? $house['name'] : $house['id']) . '">
<INPUT TYPE=image NAME="View" ALT="View" SRC="'.$template_path.'/images/buttons/sbutton_view.gif" BORDER=0 WIDTH=120> <INPUT TYPE=image NAME="View" ALT="View" SRC="'.$template_path.'/images/buttons/sbutton_view.gif" BORDER=0 WIDTH=120>
</FORM> </FORM>
</TD> </TD>
</TR></TABLE> </TR></TABLE>
</TD> </TD>
</TR>'; </TR>';
}
} }
$rank_of_player = $player->getRank(); $rank_of_player = $player->getRank();
@@ -452,9 +457,11 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
} }
} }
else { else {
$mostdamage = '';
if(fieldExist('mostdamage_by', 'player_deaths'))
$mostdamage = ', `mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified`';
$deaths = $db->query('SELECT $deaths = $db->query('SELECT
`player_id`, `time`, `level`, `killed_by`, `is_player`, `player_id`, `time`, `level`, `killed_by`, `is_player`' . $mostdamage . '
`mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified`
FROM `player_deaths` FROM `player_deaths`
WHERE `player_id` = ' . $player->getId() . ' ORDER BY `time` DESC LIMIT 10;'); WHERE `player_id` = ' . $player->getId() . ' ORDER BY `time` DESC LIMIT 10;');
@@ -613,13 +620,17 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
'<TR BGCOLOR='.getStyle(++$rows).'> '<TR BGCOLOR='.getStyle(++$rows).'>
<TD WIDTH=20%>Created:</TD>'; <TD WIDTH=20%>Created:</TD>';
$bannedUntil = ''; $bannedUntil = '';
$banned = array();
if(tableExist('account_bans')) if(tableExist('account_bans'))
$banned = $db->query('SELECT `expires_at` as `expires` FROM `account_bans` WHERE `account_id` = '.$account->getId().' and `expires_at` > ' . time()); $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 else
$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()); $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) foreach($banned as $ban)
{ {
if($ban['type'] != 2 and $ban['type'] != 4)
$bannedUntil = ' <font color="red">[Banished '.($ban['expires'] == "-1" ? 'forever' : 'until '.date("d F Y, h:s", $ban['expires'])).']</font>'; $bannedUntil = ' <font color="red">[Banished '.($ban['expires'] == "-1" ? 'forever' : 'until '.date("d F Y, h:s", $ban['expires'])).']</font>';
} }
echo '<TD>'.date("j F Y, g:i a", $account->getCustomField("created")).$bannedUntil.'</TD> echo '<TD>'.date("j F Y, g:i a", $account->getCustomField("created")).$bannedUntil.'</TD>

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
$title = 'Downloads'; $title = 'Downloads';

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,12 +6,16 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
$title = 'Houses'; $title = 'Houses';
if(!fieldExist('name', 'houses')) {
echo 'Houses list is not available on this server.';
return;
}
$rent = trim(strtolower($config['lua']['houseRentPeriod'])); $rent = trim(strtolower($config['lua']['houseRentPeriod']));
if($rent != 'yearly' && $rent != 'monthly' && $rent != 'weekly' && $rent != 'daily') if($rent != 'yearly' && $rent != 'monthly' && $rent != 'weekly' && $rent != 'daily')
$rent = 'never'; $rent = 'never';
@@ -29,7 +33,8 @@ $type = '';
{ {
$beds = array("", "one", "two", "three", "fourth", "fifth"); $beds = array("", "one", "two", "three", "fourth", "fifth");
$houseName = $_REQUEST['house']; $houseName = $_REQUEST['house'];
$house = $db->query('SELECT * FROM ' . $db->tableName('houses') . ' WHERE ' . $db->fieldName('name') . ' LIKE ' . $db->quote($houseName)); $houseId = (check_number($_REQUEST['house']) ? $_REQUEST['house'] : -1);
$house = $db->query('SELECT * FROM ' . $db->tableName('houses') . ' WHERE ' . $db->fieldName('name') . ' LIKE ' . $db->quote($houseName) . ' OR `id` = ' . $db->quote($houseId));
if($house->rowCount() > 0) if($house->rowCount() > 0)
{ {

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
$_GET['archive'] = true; $_GET['archive'] = true;

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.0.5 * @version 0.0.6
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -93,8 +93,10 @@
<a href="<?php echo $template['link_highscores']; ?>">Highscores</a> <a href="<?php echo $template['link_highscores']; ?>">Highscores</a>
<span class="separator"></span> <span class="separator"></span>
<a href="<?php echo $template['link_lastkills']; ?>">Last Deaths</a> <a href="<?php echo $template['link_lastkills']; ?>">Last Deaths</a>
<?php if(fieldExist('name', 'houses')): ?>
<span class="separator"></span> <span class="separator"></span>
<a href="<?php echo $template['link_houses']; ?>">Houses</a> <a href="<?php echo $template['link_houses']; ?>">Houses</a>
<?php endif; ?>
<span class="separator"></span> <span class="separator"></span>
<?php if($config['otserv_version'] == TFS_03): ?> <?php if($config['otserv_version'] == TFS_03): ?>
<a href="<?php echo $template['link_bans']; ?>">Bans</a> <a href="<?php echo $template['link_bans']; ?>">Bans</a>
@@ -127,6 +129,8 @@
<a href="<?php echo $template['link_screenshots']; ?>">Screenshots</a> <a href="<?php echo $template['link_screenshots']; ?>">Screenshots</a>
<span class="separator"></span> <span class="separator"></span>
<a href="<?php echo $template['link_experienceTable']; ?>">Experience Table</a> <a href="<?php echo $template['link_experienceTable']; ?>">Experience Table</a>
<span class="separator"></span>
<a href="<?php echo $template['link_faq']; ?>">FAQ</a>
</div> </div>
<?php <?php
if($config['gifts_system']) if($config['gifts_system'])
@@ -156,7 +160,7 @@
echo ' echo '
<font color="green"><b>Server Online</b></font> &raquo; <font color="green"><b>Server Online</b></font> &raquo;
Players Online: ' . $status['players'] . ' / ' . $status['playersMax'] . ' &raquo; Players Online: ' . $status['players'] . ' / ' . $status['playersMax'] . ' &raquo;
Monsters: ' . $status['monsters'] . ' &raquo; Uptime: ' . $status['uptimeReadable'] . ''; Monsters: ' . $status['monsters'] . ' &raquo; Uptime: ' . (isset($status['uptimeReadable']) ? $status['uptimeReadable'] : 'Unknown') . '';
else else
echo '<font color="red"><b>Server Offline</b></font>'; echo '<font color="red"><b>Server Offline</b></font>';
?> ?>

View File

@@ -420,6 +420,7 @@ echo "<a href='" . $template['link_downloads'] . "'>
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div> <div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
</div> </div>
</a> </a>
<?php if(fieldExist('name', 'houses')): ?>
<a href='<?php echo $template['link_houses']; ?>'> <a href='<?php echo $template['link_houses']; ?>'>
<div id='submenu_houses' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'> <div id='submenu_houses' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div> <div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
@@ -428,6 +429,7 @@ echo "<a href='" . $template['link_downloads'] . "'>
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div> <div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
</div> </div>
</a> </a>
<?php endif; ?>
<a href='<?php echo $template['link_guilds']; ?>'> <a href='<?php echo $template['link_guilds']; ?>'>
<div id='submenu_guilds' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'> <div id='submenu_guilds' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div> <div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>

View File

@@ -6,7 +6,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2016 WodzAAC * @copyright 2016 WodzAAC
* @version 0.0.5 * @version 0.0.6
* @link http://myaac.info * @link http://myaac.info
*/ */