Compare commits

..

7 Commits

Author SHA1 Message Date
slawkens1
aa90a74145 Update to version 0.0.5 2017-05-05 04:08:20 +02:00
slawkens1
194d08f593 Fixes
* fixed bug with status info utf8 encoding
(https://otland.net/threads/myaac-v0-0-1.251454/page-2#post-2440259)
* fixed when ip in log_action is NULL
(https://otland.net/threads/myaac-v0-0-1.251454/page-2#post-2440357)
* added CHANGELOG
2017-05-05 04:02:01 +02:00
slawkens1
870cc8f98b Fix character loading with invalid names
Fixed characters loading with names that has been created with other AAC
2017-05-04 18:47:52 +02:00
slawkens1
8d7c694c61 * fixed in kathrine template 2017-05-04 18:35:00 +02:00
slawkens1
a93bd4a0fc Fixed some warning in PHP 7.1
Warning: Cannot assign an empty string to a string offset
* fixed Notice with tempnam()
2017-05-04 18:32:34 +02:00
slawkens1
636a54c70d Fixed https://otland.net/threads/myaac-v0-0-1.251454/page-2#post-2440320 2017-05-04 17:36:08 +02:00
slawkens1
ef9d5127a2 disabled friendly_urls by default
* as some users have reported problems with it
* fixes when $config['database_*'] is set
2017-05-04 16:57:46 +02:00
84 changed files with 715 additions and 721 deletions

40
CHANGELOG Normal file
View File

@@ -0,0 +1,40 @@
[0.0.5 - 05.05.2017]
- fixed bug when creating character (not showing errors)
- Fixed characters loading with names that has been created with other AAC
- fixed links to shop in default template
- fixed some weird PHP 7.1 warnings/notices
- Fixed config loading with some weird comments
- fixed bug with status info utf8 encoding (https://otland.net/threads/myaac-v0-0-1.251454/page-2#post-2440259)
- fixed when ip in log_action is NULL (https://otland.net/threads/myaac-v0-0-1.251454/page-2#post-2440357)
- fixed bug when guild doesn't exist on characters page (https://otland.net/threads/myaac-v0-0-1.251454/page-2#post-2440320)
- disabled friendly_urls by default
- fixes when $config['database_*'] is set
- added CHANGELOG
[0.0.3 - 03.05.2017]
- Full support for OTHire 0.0.3
- added support for otservers that doesn't use account.name field, instead just account number will be used
- fixed encryption detection on TFS 0.3
- fixed bug when server_config table doesn't exist
- (install) moved admin account creation to new step
- fixed news comment link
- by default, the installer creates now the Admin player, for admin account
- fixed installation errors
- fixed config.lua loading with some weird comments
[0.0.2 - 02.05.2017]
- updated forum links to use friendly_urls
- some more info will be shown when cannot connect to database
- show more error infos when creating character
- fixed forum link on newses
- fixed spells loading when there's vocation name instead of id
- fixed bug when you have changed template but it doesn't exist anymore
- fixed vocations with promotion loading
- fixed support for gesior pages and templates
- added function OTS_Acount:getGroupId()
[0.0.1 - 01.05.2017]
This is first official release of MyAAC.
Features are listed here
For more information, see the release announcement on OTLand: https://otland.net/threads/myaac-v0-0-1.251454/

41
README
View File

@@ -1,41 +0,0 @@
MyAAC 0.0.1 - http://www.my-aac.org
REQUIREMENTS
=====================================
- PHP 5.1.0 or later
- MySQL database
- (optional) mod_rewrite to use friendly_urls
INSTALLATION AND CONFIGURATION
=====================================
Just decompress and untar the source (which you should have done by now,
if you're reading this), into your webserver's document root.
MyAAC needs proper permissions to handle files correctly.
If you're using apache2, then your directory needs to have owner set to: www-data, you can do it by using following command:
chown -R www-data.www-data /var/www/*
(or any other path your MyAAC installation is located at..)
--------------------------
Note: Linux only
If you're under linux use these commands to set proper permissions:
chmod 660 config.local.php
chmod 660 images/guilds
chmod 660 images/houses
chmod 660 images/screenshots
--------------------------
Visit http://your_domain/install (http://localhost/install) and follow instructions in the browser.
KNOWN PROBLEMS
=====================================
- none -
OTHER NOTES
=====================================
If you have a great idea or want contribute to the project - visit our website at http://www.my-aac.org
LICENSING
=====================================
This program and all associated files are released under the GNU Public
License, see LICENSE for details.

View File

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

View File

@@ -13,7 +13,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.0.3
* @version 0.0.5
* @link http://my-aac.org
*/
@@ -28,7 +28,7 @@ $config = array(
// used for the Downloads page and some templates aswell
'client' => 1098, // 954 = client 9.54
'friendly_urls' => false, // mod_rewrite is required for this, it makes links looks more elegant to eye, and also are SEO friendly (example: http://my-aac.org/guilds/Testing instead of http://my-aac.org/?subtopic=guilds&name=Testing)
'friendly_urls' => false, // mod_rewrite is required for this, it makes links looks more elegant to eye, and also are SEO friendly (example: http://my-aac.org/guilds/Testing instead of http://my-aac.org/?subtopic=guilds&name=Testing). Remember to rename .htaccess.dist to .htaccess
'gzip_output' => false, // gzip page content before sending it to the browser, uses less bandwidth but more cpu cycles
// gesior backward support (templates & pages)
@@ -59,7 +59,7 @@ $config = array(
// cache system. by default file cache is used
'cache_engine' => 'auto', // apc, eaccelerator, xcache, file, auto, or blank to disable.
'cache_prefix' => 'myaac_', // have to be unique if running more MyAAC instances on the same server, ignored when using file cache.
'cache_prefix' => 'myaac_', // have to be unique if running more MyAAC instances on the same server
// database details (leave blank for auto detect from config.lua)
'database_host' => '',
@@ -90,8 +90,8 @@ $config = array(
'mail_address' => 'no-reply@your-server.org', // server e-mail address (from:)
'mail_admin' => 'your-address@your-server.org', // admin email address, where mails from contact form will be sent
'mail_signature' => array( // signature that will be included at the end of every message sent using _mail function
'plain' => "--\nMy Server,\nhttp://www.myserver.com",
'html' => '<br/>My Server,\n<a href="http://www.myserver.com">myserver.com</a>'
'plain' => ''/*'--\nMy Server,\nhttp://www.myserver.com'*/,
'html' => ''/*'<br/>My Server,\n<a href="http://www.myserver.com">myserver.com</a>'*/
),
'smtp_enabled' => false, // send by smtp or mail function (set false if use mail function)
'smtp_host' => '', // mail host

File diff suppressed because one or more lines are too long

View File

@@ -18,7 +18,7 @@ else
// detect locale
$locale_s = get_browser_languages();
if(!sizeof($locale_s))
$locale__ = 'en';
$locale_ = 'en';
else
{
foreach($locale_s as $id => $tmp)

View File

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

View File

@@ -213,10 +213,10 @@ if(!$error) {
if(!$error && (!isset($_SESSION['saved']))) {
$content .= '$config[\'installed\'] = true;';
$content .= PHP_EOL;
if(strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) {
$content .= '$config[\'friendly_urls\'] = true;';
$content .= PHP_EOL;
}
// if(strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) {
// $content .= '$config[\'friendly_urls\'] = true;';
// $content .= PHP_EOL;
// }
$content .= '$config[\'mail_enabled\'] = true;';
$content .= PHP_EOL;

View File

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

View File

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

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,8 @@
<?php
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['lua']['sqlType'])) // tfs 0.3
{
$config['otserv_version'] = TFS_03;
@@ -50,6 +52,7 @@ defined('MYAAC') or die('Direct access not allowed!');
$config['database_encryption'] = isset($config['lua']['passwordtype']) ? $config['lua']['passwordtype'] : $config['lua']['password_type'];
$config['database_salt'] = isset($config['lua']['passwordsalt']) ? $config['lua']['passwordsalt'] : $config['lua']['password_salt'];
}
}
if(isset($config['lua']['useMD5Passwords']) && getBoolean($config['lua']['useMD5Passwords']))
$config['database_encryption'] = 'md5';

View File

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

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.0.3
* @version 0.0.5
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -1199,7 +1199,7 @@ function load_config_lua($filename)
if(!@file_exists($config_file))
die('ERROR: Cannot find ' . $filename . ' file.');
$tempFile = tempnam('/tmp', 'lua');
$tempFile = @tempnam('/tmp', 'lua');
$file = fopen($tempFile, 'w');
if(!$file) die('Cannot load server config!');

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -886,11 +886,11 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
public function logAction($action)
{
$ip = '127.0.0.1';
if(isset($_SERVER['REMOTE_ADDR']) && !empty(($_SERVER['REMOTE_ADDR'])))
if(isset($_SERVER['REMOTE_ADDR']) && !empty($_SERVER['REMOTE_ADDR']))
$ip = $_SERVER['REMOTE_ADDR'];
else if(isset($_SERVER['HTTP_CLIENT_IP']) && !empty(($_SERVER['HTTP_CLIENT_IP'])))
else if(isset($_SERVER['HTTP_CLIENT_IP']) && !empty($_SERVER['HTTP_CLIENT_IP']))
$ip = $_SERVER['HTTP_CLIENT_IP'];
else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && !empty(($_SERVER['HTTP_X_FORWARDED_FOR'])))
else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && !empty($_SERVER['HTTP_X_FORWARDED_FOR']))
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
return $this->db->query('INSERT INTO ' . $this->db->tableName(TABLE_PREFIX . 'account_actions') . ' (' . $this->db->fieldName('account_id') . ', ' . $this->db->fieldName('ip') . ', ' . $this->db->fieldName('date') . ', ' . $this->db->fieldName('action') . ') VALUES (' . $this->db->quote($this->getId()).', INET_ATON(' . $this->db->quote($ip) . '), UNIX_TIMESTAMP(NOW()), ' . $this->db->quote($action).')');

View File

@@ -176,7 +176,7 @@ class OTS_GuildRank extends OTS_Row_DAO implements IteratorAggregate, Countable
{
if( !isset($this->data['guild_id']) )
{
throw new E_OTS_NotLoaded();
return new OTS_Guild();
}
$guild = new OTS_Guild();

View File

@@ -75,7 +75,10 @@ class OTS_ServerInfo
fwrite($socket, $packet);
// reads respond
$data = stream_get_contents($socket);
//$data = stream_get_contents($socket);
$data = '';
while (!feof($socket))
$data .= fgets($socket, 1024);
// closing connection to current server
fclose($socket);
@@ -121,7 +124,9 @@ class OTS_ServerInfo
{
// loads respond XML
$info = new OTS_InfoRespond();
$info->loadXML( $status->getBuffer() );
if(!$info->loadXML( utf8_encode($status->getBuffer())))
return false;
return $info;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,27 +1,26 @@
<?php
/**
* Changelog
* CHANGELOG viewer
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.0.3
* @version 0.0.5
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'MyAAC - CHANGELOG';
$title = 'MyAAC Changelog';
$data = file_get_contents(SYSTEM . 'docs/CHANGELOG');
if(!file_exists(BASE . 'CHANGELOG')) {
echo 'File CHANGELOG doesn\'t exist.';
return;
}
// replace special characters with HTML entities
// replace line breaks with <br />
$data = nl2br(htmlspecialchars($data));
// replace multiple spaces with single spaces
$data = preg_replace('/\s\s+/', ' ', $data);
$changelog = file_get_contents(BASE . 'CHANGELOG');
$changelog = nl2br(htmlspecialchars($changelog));
// replace URLs with <a href...> elements
$data = preg_replace('/\s(\w+:\/\/)(\S+)/', ' <a href="\\1\\2" target="_blank">\\1\\2</a>', $data);
$changelog = preg_replace('/\s(\w+:\/\/)(\S+)/', ' <a href="\\1\\2" target="_blank">\\1\\2</a>', $changelog);
echo '<div>' . $data . '</div>';
echo '<div>' . $changelog . '</div>';
?>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.0.3
* @version 0.0.5
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -18,7 +18,8 @@ $myaac_version = file_get_contents('http://my-aac.org/VERSION');
// compare them
if(version_compare($myaac_version, MYAAC_VERSION) <= 0)
echo '<p class="success">MyAAC latest version is ' . $myaac_version . '. You\'re using the latest version.</p>';
echo '<p class="success">MyAAC latest version is ' . $myaac_version . '. You\'re using the latest version.
<br/>View CHANGELOG ' . generateLink(ADMIN_URL . '?p=changelog', 'here') . '</p>';
else
echo '<p class="warning">You\'re using outdated version.<br/>
Your version: <b>' . MYAAC_VERSION . '</b><br/>

View File

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

View File

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

View File

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

View File

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

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.0.3
* @version 0.0.5
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -120,14 +120,12 @@ if(empty($name))
$name = str_replace('/', '', $name);
if(check_name($name))
{
$oldName = '';
$oldName = '';
$player = $ots->createObject('Player');
$player->find($name);
if(!$player->isLoaded())
{
$player = $ots->createObject('Player');
$player->find($name);
if(!$player->isLoaded())
{
$tmp_zmienna = "";
$tmp_name = retrieve_former_name($name);
while(!empty($tmp_name))
@@ -138,10 +136,10 @@ if(check_name($name))
if(!empty($tmp_zmienna))
$player->find($tmp_zmienna);
}
}
if($player->isLoaded() && !$player->isDeleted())
{
if($player->isLoaded() && !$player->isDeleted())
{
$title = $player->getName() . ' - ' . $title;
$account = $player->getAccount();
$rows = 0;
@@ -254,20 +252,22 @@ if(check_name($name))
}
$rank_of_player = $player->getRank();
if($rank_of_player->isLoaded())
{
$guild_name = $rank_of_player->getGuild()->getName();
if($rank_of_player->isLoaded()) {
$guild = $rank_of_player->getGuild();
if($guild->isLoaded()) {
$guild_name = $guild->getName();
echo
'<TR BGCOLOR="'.getStyle(++$rows).'">'.
'<TD>Guild membership:</TD><TD>'.$rank_of_player->getName().' of the ' . getGuildLink($guild_name) . '</TD>'.
'</TR>';
}
}
echo
'<TR BGCOLOR="'.getStyle(++$rows).'"><TD>Last login:</TD><TD>';
$lastlogin = $player->getLastLogin();
if(empty($lastlogin))
echo'Never logged in.';
echo 'Never logged in.';
else
echo date("M d Y, H:i:s", $lastlogin).' CEST';
@@ -405,8 +405,8 @@ if(check_name($name))
<td width=\"20%\" align=\"center\">".date("j M Y, H:i", $death['date'])."</td>
<td> ";
$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();
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);
@@ -659,9 +659,9 @@ if(check_name($name))
}
echo '<br/><br/>' . generate_search_table();
echo '</TABLE>';
}
else
{
}
else
{
$search_errors[] = 'Character <b>' . $name . '</b> does not exist or has been deleted.';
output_errors($search_errors);
$search_errors = array();
@@ -689,10 +689,7 @@ if(check_name($name))
}
echo generate_search_table(true);
}
}
else
$search_errors[] = 'This name contains invalid letters. Please use only A-Z, a-z and space. Minimum length is 3 characters.';
if(!empty($search_errors))
output_errors($search_errors);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.0.3
* @version 0.0.5
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -1026,7 +1026,7 @@ if($action == 'kickplayer') {
}
else
{
if($player->getRank()->isLoaded() && $player->getRank()->getGuild()->getName() != $guild->getName()) {
if($player->getRank()->isLoaded() && $player->getRank()->getGuild()->isLoaded() && $player->getRank()->getGuild()->getName() != $guild->getName()) {
$guild_errors[] = 'Character <b>'.$name.'</b> isn\'t from your guild.';
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -3,7 +3,7 @@ list[0] = 'news';
list[1] = 'account';
list[2] = 'community';
list[3] = 'library';
list[4] = 'about';
list[4] = 'shops';
function initMenu()
{

View File

@@ -9,7 +9,7 @@ function news_parse($title, $content, $date, $icon = 0, $author = '', $comments
$tmp = $template_path.'/images/letters/'.$content[0].'.gif';
if(file_exists($tmp)) {
$firstLetter = '<img src="' . $tmp . '" alt="'.$content[0].'" BORDER=0 ALIGN=bottom>';
$content[0] = '';
$content = substr($content, 1);
}
}

View File

@@ -9,15 +9,13 @@
if(in_array(PAGE, array('news', 'newsarchive')))
echo 'news';
elseif(in_array(PAGE, array('creatures', 'spells', 'online', 'serverinfo', 'downloads', 'commands',
'movies', 'screenshots', 'experiencetable')))
'movies', 'screenshots', 'experiencetable', 'faq')))
echo 'library';
elseif(in_array(PAGE, array('characters', 'guilds', 'highscores', 'wars', 'lastkills', 'houses', 'bans',
'forum', 'team')))
echo 'community';
elseif(in_array(PAGE, array('account', 'accountmanagement', 'createaccount', 'lostaccount', 'rules')))
echo 'account';
elseif(in_array(PAGE, array('faq')))
echo 'about';
elseif(in_array(PAGE, array('points', 'gifts')))
echo 'shops';
?>';
@@ -40,7 +38,6 @@
<span id="account" onclick="menuSwitch('account');" class="tab">Account</span>
<span id="community" onclick="menuSwitch('community');" class="tab">Community</span>
<span id="library" onclick="menuSwitch('library');" class="tab">Library</span>
<span id="about" onclick="menuSwitch('about');" class="tab">About</span>
<?php
if($config['gifts_system'])
{
@@ -131,13 +128,6 @@
<span class="separator"></span>
<a href="<?php echo $template['link_experienceTable']; ?>">Experience Table</a>
</div>
<div id="about-submenu">
<a href="<?php echo $template['link_faq']; ?>">FAQ</a>
<!--a href="<?php echo internalLayoutLink('about'); ?>">About us</a>
<a href="<?php echo internalLayoutLink('contact'); ?>">Contact</a-->
</div>
<?php
if($config['gifts_system'])
{
@@ -146,8 +136,8 @@
<a href="' . $template['link_points'] . '">Buy Premium Points</a>
<span class="separator"></span>
<a href="' . $template['link_gifts'] . '">Shop Offer</a>';
if($account_logged)
echo '<span class="separator"></span><a href="?subtopic=shopsystem&action=show_history">Shop History</a>';
if($logged)
echo '<span class="separator"></span><a href="' . $template['link_gifts_history'] . '">Shop History</a>';
echo '</div>';
}
?>

View File

@@ -8,7 +8,7 @@ function news_parse($title, $content, $date, $icon = 0, $author = '', $comments
$tmp = $template_path.'/images/letters/'.$content[0].'.gif';
if(file_exists($tmp)) {
$firstLetter = '<img src="' . $tmp . '" alt="'.$content[0].'" BORDER=0 ALIGN=bottom>';
$content[0] = '';
$content = substr($content, 1);
}
}

View File

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