Compare commits
37 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ec6584555f | ||
![]() |
649facc5ab | ||
![]() |
57c2547098 | ||
![]() |
4fa32e79ce | ||
![]() |
f393e525a6 | ||
![]() |
45b61e5f78 | ||
![]() |
0219cc7a1f | ||
![]() |
b212e9fb0f | ||
![]() |
ecef4de2d2 | ||
![]() |
e69ff12966 | ||
![]() |
6f10ee1965 | ||
![]() |
d9bd1f6e99 | ||
![]() |
35c8b65be7 | ||
![]() |
753fb60e75 | ||
![]() |
45e390c9d4 | ||
![]() |
7df5d18105 | ||
![]() |
0bc43d38e3 | ||
![]() |
94dd462b71 | ||
![]() |
266a1704ed | ||
![]() |
2bf41655cb | ||
![]() |
fa3f61f7db | ||
![]() |
be6fd3af0e | ||
![]() |
915a1720e2 | ||
![]() |
a8a4efd39a | ||
![]() |
75aa62a113 | ||
![]() |
170eaec9b0 | ||
![]() |
0b315bfda6 | ||
![]() |
4bd4198e1c | ||
![]() |
1310a49729 | ||
![]() |
6658eb5f20 | ||
![]() |
ecd279453f | ||
![]() |
eda700c483 | ||
![]() |
bde265d79b | ||
![]() |
e5b5aaeaf5 | ||
![]() |
43162b6222 | ||
![]() |
648a655575 | ||
![]() |
7b23ffaf23 |
@@ -6,8 +6,7 @@ RewriteEngine On
|
|||||||
# Page parser
|
# Page parser
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteRule ^([A-Za-z0-9-_']+)\.png/?$ tools/signature/index.php?name=$1 [L]
|
RewriteRule ^([A-Za-z0-9-_+']+)\.png/?$ tools/signature/index.php?name=$1 [L]
|
||||||
RewriteRule ^images/items/([0-9]+)\.gif$ tools/item.php?id=$1
|
|
||||||
RewriteRule ^characters/([A-Za-z0-9-_+']+)$ index.php?subtopic=characters&name=$1
|
RewriteRule ^characters/([A-Za-z0-9-_+']+)$ index.php?subtopic=characters&name=$1
|
||||||
RewriteRule ^guilds/([A-Za-z0-9-_+']+)$ index.php?subtopic=guilds&action=show&guild=$1
|
RewriteRule ^guilds/([A-Za-z0-9-_+']+)$ index.php?subtopic=guilds&action=show&guild=$1
|
||||||
RewriteRule ^forum/board/([0-9]+)$ index.php?subtopic=forum&action=show_board&id=$1
|
RewriteRule ^forum/board/([0-9]+)$ index.php?subtopic=forum&action=show_board&id=$1
|
||||||
@@ -19,10 +18,11 @@ RewriteRule ^account/manage$ index.php?subtopic=accountmanagement
|
|||||||
RewriteRule ^account/create$ index.php?subtopic=createaccount
|
RewriteRule ^account/create$ index.php?subtopic=createaccount
|
||||||
RewriteRule ^account/lost$ index.php?subtopic=lostaccount
|
RewriteRule ^account/lost$ index.php?subtopic=lostaccount
|
||||||
RewriteRule ^account/logout$ index.php?subtopic=accountmanagement&action=logout
|
RewriteRule ^account/logout$ index.php?subtopic=accountmanagement&action=logout
|
||||||
RewriteRule ^news/archive/([0-9]+)$ index.php?subtopic=news&archive=true&id=$1
|
RewriteRule ^news/archive/([0-9]+)$ index.php?subtopic=newsarchive&id=$1
|
||||||
RewriteRule ^news/archive$ index.php?subtopic=news&archive=true
|
RewriteRule ^news/archive$ index.php?subtopic=newsarchive
|
||||||
RewriteRule ^highscores/([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)?$ index.php?subtopic=highscores&list=$1&vocation=$2
|
RewriteRule ^highscores/([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)?$ index.php?subtopic=highscores&list=$1&vocation=$2
|
||||||
RewriteRule ^highscores/([A-Za-z0-9-_']+)$ index.php?subtopic=highscores&list=$1
|
RewriteRule ^highscores/([A-Za-z0-9-_']+)$ index.php?subtopic=highscores&list=$1
|
||||||
|
RewriteRule ^polls/([0-9]+)$ index.php?subtopic=polls&id=$1
|
||||||
RewriteRule ^admin/$ admin/index.php
|
RewriteRule ^admin/$ admin/index.php
|
||||||
RewriteRule ^install/$ install/index.php
|
RewriteRule ^install/$ install/index.php
|
||||||
|
|
60
CHANGELOG
@@ -1,3 +1,63 @@
|
|||||||
|
[0.2.4 - 09.06.2017]
|
||||||
|
- fixed invite to guild
|
||||||
|
- added id field on monsters, so you can delete them in phpmyadmin
|
||||||
|
- fixed adding some creatures with ' and "
|
||||||
|
- fixed when there are spaces at beginning of the file (creatures)
|
||||||
|
- fixed when file is unable to parse (creatures)
|
||||||
|
- fixed typo loss_items => loss_containers
|
||||||
|
- more elegant way of showing message on reload creatures and spells
|
||||||
|
[0.2.3 - 31.05.2017]
|
||||||
|
- fixed guild management on OTHire 0.0.3
|
||||||
|
- set default skills to 10 when creating new character
|
||||||
|
- fixed displaying of "Create forum thread" in newses
|
||||||
|
- fixed deleting guild on servers that use players.rank_id field
|
||||||
|
- fixed phpmailer class loading (https://otland.net/threads/myaac-v0-0-1.251454/page-8#post-2445222)
|
||||||
|
- fixed displaying vocation amount on online page
|
||||||
|
- better support for custom vocations, you just need to set in config vocations_amount to yours.
|
||||||
|
- fixed huge space in player name (https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2444328)
|
||||||
|
- fixed Undefined variable (https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2444034)
|
||||||
|
- fixed Undefined offset (https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2444035)
|
||||||
|
|
||||||
|
[0.2.2 - 22.05.2017]
|
||||||
|
- added missing cache/signature directory
|
||||||
|
- fixed https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2443868
|
||||||
|
|
||||||
|
[0.2.1 - 21.05.2017]
|
||||||
|
- added Swedish translation by Sizaro
|
||||||
|
- fixed some bugs with installlation & characters & houses
|
||||||
|
|
||||||
|
[0.2.0 - 21.05.2017]
|
||||||
|
- added option to change character sex for premium points
|
||||||
|
- moved site_closed to database, now you can close your site through admin panel
|
||||||
|
- added option to admin panel: clear cache
|
||||||
|
- added experiencetable_rows configurable
|
||||||
|
- optimized OTS_Account->getGroupId(), now its using like 20 queries less
|
||||||
|
- optimized OTS_Player->load($id) function, should be much faster now
|
||||||
|
- fixed displaying on highscores special outfits
|
||||||
|
- fixed skull images displaying
|
||||||
|
- fixed displaying unlimited premium account
|
||||||
|
- fixed bug where players.lookaddons doesn't exist (OTHire etc.) (https://otland.net/threads/myaac-v0-0-1.251454/page-6#post-2442407)
|
||||||
|
- fixed signature tibian for OTHire and other servers that doesnt use accounts.premdays field
|
||||||
|
- fixed when player name in signature containst space
|
||||||
|
- don't show "Create forum thread" when editing
|
||||||
|
- fixed red color table after create account
|
||||||
|
- updated download links, as clients.halfaway.net isn't working anymore
|
||||||
|
- fixed some bugs while installing when field `email_next` or `hidden` already exist
|
||||||
|
- fixed movies unexpected comment
|
||||||
|
- added template_place_holder('center_top') to kathrine template
|
||||||
|
|
||||||
|
[0.1.5 - 13.05.2017]
|
||||||
|
- fixed bug with "Integrity constraint violation: 1048 Column 'ip' cannot be null"
|
||||||
|
|
||||||
|
[0.1.4 - 13.05.2017]
|
||||||
|
- added outfit shower, in characters, online, and highscores
|
||||||
|
- updated database to version 2
|
||||||
|
- fixed item images (now using item-images.ots.me host by default)
|
||||||
|
- fixed news ticket and posting long newses (https://otland.net/threads/myaac-v0-0-1.251454/page-5#post-2442026)
|
||||||
|
- news body limit increased to 65535 (mysql text field)
|
||||||
|
- removed some unused code from my old server
|
||||||
|
- added spells & monsters to kathrine template
|
||||||
|
|
||||||
[0.1.3 - 11.05.2017]
|
[0.1.3 - 11.05.2017]
|
||||||
- this is just release to update version number
|
- this is just release to update version number
|
||||||
|
|
||||||
|
@@ -40,6 +40,17 @@ h1, h2, h3, h4, h5, h6 {color: #313334; font-weight: bold;}
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table, .table td, .table th{
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table th a:link {color: white; text-decoration: none;}
|
||||||
|
.table th a:link {color: white; text-decoration: none;}
|
||||||
|
.table th a:visited {color: white; text-decoration: none;}
|
||||||
|
.table th a:focus {color: white; text-decoration: none;}
|
||||||
|
.table th a:active {color: white; text-decoration: underline;}
|
||||||
|
.table th a:hover {color: white; text-decoration: underline;}
|
||||||
|
|
||||||
.table tr:nth-child(odd) {background-color: #d1d1d1}
|
.table tr:nth-child(odd) {background-color: #d1d1d1}
|
||||||
|
|
||||||
a.ico { color:#9d9c9a; font-size:10px; text-decoration: none; padding:0 0 0 14px; background-repeat:no-repeat; background-position:0 0; }
|
a.ico { color:#9d9c9a; font-size:10px; text-decoration: none; padding:0 0 0 14px; background-repeat:no-repeat; background-position:0 0; }
|
||||||
|
11
common.php
@@ -21,14 +21,14 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.1.3
|
* @version 0.2.4
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
define('MYAAC', true);
|
define('MYAAC', true);
|
||||||
define('MYAAC_VERSION', '0.1.3');
|
define('MYAAC_VERSION', '0.2.4');
|
||||||
define('DATABASE_VERSION', 2);
|
define('DATABASE_VERSION', 4);
|
||||||
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');
|
||||||
@@ -44,6 +44,11 @@ define('FLAG_CONTENT_COMMANDS', 64);
|
|||||||
define('FLAG_CONTENT_SPELLS', 128);
|
define('FLAG_CONTENT_SPELLS', 128);
|
||||||
define('FLAG_CONTENT_MONSTERS', 256);
|
define('FLAG_CONTENT_MONSTERS', 256);
|
||||||
|
|
||||||
|
// news
|
||||||
|
define('NEWS', 1);
|
||||||
|
define('TICKET', 2);
|
||||||
|
define('ARTICLE', 3);
|
||||||
|
|
||||||
// directories
|
// directories
|
||||||
define('BASE', dirname(__FILE__) . '/');
|
define('BASE', dirname(__FILE__) . '/');
|
||||||
define('ADMIN', BASE . 'admin/');
|
define('ADMIN', BASE . 'admin/');
|
||||||
|
18
config.php
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -24,6 +24,8 @@ $config = array(
|
|||||||
'template' => 'kathrine', // template used by website (kathrine, tibiacom)
|
'template' => 'kathrine', // template used by website (kathrine, tibiacom)
|
||||||
'template_allow_change' => true, // allow users to choose their own template while browsing website?
|
'template_allow_change' => true, // allow users to choose their own template while browsing website?
|
||||||
|
|
||||||
|
'vocations_amount' => 4, // how much basic vocations your server got (without promotion)
|
||||||
|
|
||||||
// what client version are you using on this OT?
|
// what client version are you using on this OT?
|
||||||
// used for the Downloads page and some templates aswell
|
// used for the Downloads page and some templates aswell
|
||||||
'client' => 1098, // 954 = client 9.54
|
'client' => 1098, // 954 = client 9.54
|
||||||
@@ -43,11 +45,6 @@ $config = array(
|
|||||||
// footer
|
// footer
|
||||||
'footer' => ''/*'<br/>Your Server © 2016. All rights reserved.'*/,
|
'footer' => ''/*'<br/>Your Server © 2016. All rights reserved.'*/,
|
||||||
|
|
||||||
// site closed
|
|
||||||
'site_closed' => false,
|
|
||||||
'site_closed_title' => 'Closed',
|
|
||||||
'site_closed_message' => 'Server is under maintance, please visit later.<br/><br/>',
|
|
||||||
|
|
||||||
'debug_level' => 0, // 0 - disabled, 1 - show load time, 2 - show db query counter, 3 - both, 4 - memory usage, 5 - load time & load time, 6 - queries & memory usage, 7 - all
|
'debug_level' => 0, // 0 - disabled, 1 - show load time, 2 - show db query counter, 3 - both, 4 - memory usage, 5 - load time & load time, 6 - queries & memory usage, 7 - all
|
||||||
|
|
||||||
'language' => 'en', // default language (currently only 'en' available)
|
'language' => 'en', // default language (currently only 'en' available)
|
||||||
@@ -90,6 +87,8 @@ $config = array(
|
|||||||
'account_country' => true, // user will be able to set country of origin when registering account, this information will be viewable in others places aswell
|
'account_country' => true, // user will be able to set country of origin when registering account, this information will be viewable in others places aswell
|
||||||
'account_change_character_name' => false, // can user change their character name for premium points?
|
'account_change_character_name' => false, // can user change their character name for premium points?
|
||||||
'account_change_character_name_points' => 30, // cost of name change
|
'account_change_character_name_points' => 30, // cost of name change
|
||||||
|
'account_change_character_sex' => false, // can user change their character sex for premium points?
|
||||||
|
'account_change_character_sex_points' => 30, // cost of sex change
|
||||||
'characters_per_account' => 10, // max. number of characters per account
|
'characters_per_account' => 10, // max. number of characters per account
|
||||||
|
|
||||||
// mail
|
// mail
|
||||||
@@ -220,14 +219,15 @@ $config = array(
|
|||||||
// other
|
// other
|
||||||
'email_lai_sec_interval' => 60, // time in seconds between e-mails to one account from lost account interface, block spam
|
'email_lai_sec_interval' => 60, // time in seconds between e-mails to one account from lost account interface, block spam
|
||||||
'google_analytics_id' => '', // e.g.: UA-XXXXXXX-X
|
'google_analytics_id' => '', // e.g.: UA-XXXXXXX-X
|
||||||
'experiencetable_columns' => 5, // how many columns to display in experience table page. * 100, 5 = 500 (will show up to 500 level)
|
'experiencetable_columns' => 5, // how many columns to display in experience table page. * experiencetable_rows, 5 = 500 (will show up to 500 level)
|
||||||
|
'experiencetable_rows' => 100, // till how many levels in one column
|
||||||
|
|
||||||
'monsters' => array(),
|
'monsters' => array(),
|
||||||
'npc' => array()
|
'npc' => array()
|
||||||
);
|
);
|
||||||
|
|
||||||
// download link to client.
|
// download link to client.
|
||||||
$config['client_download'] = 'http://clients.halfaway.net/windows.php?tibia='. $config['client'] .'';
|
$config['client_download'] = 'http://tibia-clients.com/clients/download/'. $config['client'] .'/exe/windows';
|
||||||
$config['client_download_linux'] = 'http://clients.halfaway.net/linux.php?tibia='. $config['client'] .'';
|
$config['client_download_linux'] = 'http://tibia-clients.com/clients/download/'. $config['client'] .'/tar/linux';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 545 B |
BIN
images/buttons/_sbutton_change_sex.gif
Normal file
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.2 KiB |
49
index.php
@@ -21,7 +21,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.1.3
|
* @version 0.2.4
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -68,8 +68,11 @@ if(fetchDatabaseConfig('database_version', $tmp)) { // we got version
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // register first version
|
else { // register first version
|
||||||
require(SYSTEM . 'migrations/1.php');
|
for($i = 1; $i <= DATABASE_VERSION; $i++) {
|
||||||
registerDatabaseConfig('database_version', 1);
|
require(SYSTEM . 'migrations/' . $i . '.php');
|
||||||
|
}
|
||||||
|
|
||||||
|
registerDatabaseConfig('database_version', DATABASE_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
// event system
|
// event system
|
||||||
@@ -93,24 +96,28 @@ if(!isset($content[0]))
|
|||||||
$load_it = true;
|
$load_it = true;
|
||||||
|
|
||||||
// check if site has been closed
|
// check if site has been closed
|
||||||
if($config['site_closed'])
|
$site_closed = false;
|
||||||
{
|
if(fetchDatabaseConfig('site_closed', $site_closed)) {
|
||||||
if(!admin())
|
$site_closed = ($site_closed == 1);
|
||||||
{
|
if($site_closed) {
|
||||||
$title = $config['site_closed_title'];
|
if(!admin())
|
||||||
$content .= $config['site_closed_message'];
|
{
|
||||||
$load_it = false;
|
$title = getDatabaseConfig('site_closed_title');
|
||||||
}
|
$content .= '<p class="note">' . getDatabaseConfig('site_closed_message') . '</p><br/>';
|
||||||
|
$load_it = false;
|
||||||
|
}
|
||||||
|
|
||||||
if(!$logged)
|
if(!$logged)
|
||||||
{
|
{
|
||||||
ob_start();
|
ob_start();
|
||||||
require(SYSTEM . 'pages/accountmanagement.php');
|
require(SYSTEM . 'pages/accountmanagement.php');
|
||||||
$content .= ob_get_contents();
|
$content .= ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$load_it = false;
|
$load_it = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
define('SITE_CLOSED', $site_closed);
|
||||||
|
|
||||||
// backward support for gesior
|
// backward support for gesior
|
||||||
if($config['backward_support']) {
|
if($config['backward_support']) {
|
||||||
@@ -138,10 +145,10 @@ if($config['backward_support']) {
|
|||||||
if(!isset($config['lightborder']))
|
if(!isset($config['lightborder']))
|
||||||
$config['lightborder'] = '#F1E0C6';
|
$config['lightborder'] = '#F1E0C6';
|
||||||
|
|
||||||
$config['site']['download_page'] = false;
|
$config['site']['download_page'] = true;
|
||||||
$config['site']['serverinfo_page'] = true;
|
$config['site']['serverinfo_page'] = true;
|
||||||
$config['site']['screenshot_page'] = true;
|
$config['site']['screenshot_page'] = true;
|
||||||
|
|
||||||
if($config['forum'] != '')
|
if($config['forum'] != '')
|
||||||
$config['forum_link'] = (strtolower($config['forum']) == 'site' ? internalLayoutLink('forum') : $config['forum']);
|
$config['forum_link'] = (strtolower($config['forum']) == 'site' ? internalLayoutLink('forum') : $config['forum']);
|
||||||
|
|
||||||
@@ -151,7 +158,7 @@ if($config['backward_support']) {
|
|||||||
|
|
||||||
if($load_it)
|
if($load_it)
|
||||||
{
|
{
|
||||||
if($config['site_closed'] && admin())
|
if(SITE_CLOSED && admin())
|
||||||
$content .= '<p class="note">Site is under maintenance (closed mode). Only privileged users can see it.</p>';
|
$content .= '<p class="note">Site is under maintenance (closed mode). Only privileged users can see it.</p>';
|
||||||
|
|
||||||
if($config['backward_support'])
|
if($config['backward_support'])
|
||||||
|
@@ -2,6 +2,7 @@ CREATE TABLE `myaac_account_actions`
|
|||||||
(
|
(
|
||||||
`account_id` INT(11) NOT NULL,
|
`account_id` INT(11) NOT NULL,
|
||||||
`ip` INT(11) NOT NULL DEFAULT 0,
|
`ip` INT(11) NOT NULL DEFAULT 0,
|
||||||
|
`ipv6` BINARY(16) 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`)
|
||||||
@@ -55,7 +56,6 @@ CREATE TABLE `myaac_config`
|
|||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE (`name`)
|
UNIQUE (`name`)
|
||||||
) ENGINE = MyISAM;
|
) ENGINE = MyISAM;
|
||||||
INSERT INTO `myaac_config` (`id`, `name`, `value`) VALUES (NULL, 'database_version', '1');
|
|
||||||
|
|
||||||
CREATE TABLE `myaac_faq`
|
CREATE TABLE `myaac_faq`
|
||||||
(
|
(
|
||||||
@@ -116,6 +116,7 @@ CREATE TABLE `myaac_hooks`
|
|||||||
) ENGINE = MyISAM;
|
) ENGINE = MyISAM;
|
||||||
|
|
||||||
CREATE TABLE `myaac_monsters` (
|
CREATE TABLE `myaac_monsters` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`hide_creature` tinyint(1) NOT NULL default '0',
|
`hide_creature` tinyint(1) NOT NULL default '0',
|
||||||
`name` varchar(255) NOT NULL,
|
`name` varchar(255) NOT NULL,
|
||||||
`mana` int(11) NOT NULL,
|
`mana` int(11) NOT NULL,
|
||||||
@@ -129,7 +130,8 @@ CREATE TABLE `myaac_monsters` (
|
|||||||
`convinceable` tinyint(1) NOT NULL,
|
`convinceable` tinyint(1) NOT NULL,
|
||||||
`race` varchar(255) NOT NULL,
|
`race` varchar(255) NOT NULL,
|
||||||
`gfx_name` varchar(255) NOT NULL,
|
`gfx_name` varchar(255) NOT NULL,
|
||||||
`file_path` varchar(255) NOT NULL
|
`file_path` varchar(255) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE = MyISAM;
|
) ENGINE = MyISAM;
|
||||||
|
|
||||||
CREATE TABLE `myaac_movies`
|
CREATE TABLE `myaac_movies`
|
||||||
|
@@ -66,6 +66,7 @@ if(!$error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!$error) {
|
if(!$error) {
|
||||||
|
registerDatabaseConfig('database_version', DATABASE_VERSION);
|
||||||
$locale['step_database_success_schema'] = str_replace('$PREFIX$', TABLE_PREFIX, $locale['step_database_success_schema']);
|
$locale['step_database_success_schema'] = str_replace('$PREFIX$', TABLE_PREFIX, $locale['step_database_success_schema']);
|
||||||
success($locale['step_database_success_schema']);
|
success($locale['step_database_success_schema']);
|
||||||
}
|
}
|
||||||
@@ -147,12 +148,14 @@ if(!$error) {
|
|||||||
if(query("ALTER TABLE `accounts` ADD `email_code` VARCHAR(255) NOT NULL DEFAULT '' AFTER `email_new_time`;"))
|
if(query("ALTER TABLE `accounts` ADD `email_code` VARCHAR(255) NOT NULL DEFAULT '' AFTER `email_new_time`;"))
|
||||||
success($locale['step_database_adding_field'] . ' accounts.email_code...');
|
success($locale['step_database_adding_field'] . ' accounts.email_code...');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(fieldExist('next_email', 'accounts')) {
|
if(fieldExist('next_email', 'accounts')) {
|
||||||
if(query("ALTER TABLE `accounts` CHANGE `next_email` `email_next` INT(11) NOT NULL DEFAULT 0;")) {
|
if(!fieldExist('email_next', 'accounts')) {
|
||||||
$tmp = str_replace('$FIELD$', 'accounts.next_email', $locale['step_database_changing_field']);
|
if(query("ALTER TABLE `accounts` CHANGE `next_email` `email_next` INT(11) NOT NULL DEFAULT 0;")) {
|
||||||
$tmp = str_replace('$FIELD_NEW$', 'accounts.email_next', $tmp);
|
$tmp = str_replace('$FIELD$', 'accounts.next_email', $locale['step_database_changing_field']);
|
||||||
success($tmp);
|
$tmp = str_replace('$FIELD_NEW$', 'accounts.email_next', $tmp);
|
||||||
|
success($tmp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(!fieldExist('email_next', 'accounts')) {
|
else if(!fieldExist('email_next', 'accounts')) {
|
||||||
@@ -193,10 +196,12 @@ if(!$error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(fieldExist('hide_char', 'players')) {
|
if(fieldExist('hide_char', 'players')) {
|
||||||
if(query("ALTER TABLE `players` CHANGE `hide_char` `hidden` TINYINT(1) NOT NULL DEFAULT 0;")) {
|
if(!fieldExist('hidden', 'players')) {
|
||||||
$tmp = str_replace('$FIELD$', 'players.hide_char', $locale['step_database_changing_field']);
|
if(query("ALTER TABLE `players` CHANGE `hide_char` `hidden` TINYINT(1) NOT NULL DEFAULT 0;")) {
|
||||||
$tmp = str_replace('$FIELD_NEW$', 'players.hidden', $tmp);
|
$tmp = str_replace('$FIELD$', 'players.hide_char', $locale['step_database_changing_field']);
|
||||||
success($tmp);
|
$tmp = str_replace('$FIELD_NEW$', 'players.hidden', $tmp);
|
||||||
|
success($tmp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(!fieldExist('hidden', 'players')) {
|
else if(!fieldExist('hidden', 'players')) {
|
||||||
|
@@ -146,8 +146,8 @@ else {
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(!isset($_SESSION['installed'])) {
|
if(!isset($_SESSION['installed'])) {
|
||||||
file_get_contents('http://my-aac.org/report_install.php?v=' . MYAAC_VERSION);
|
file_get_contents('http://my-aac.org/report_install.php?v=' . MYAAC_VERSION . '&b=' . urlencode(BASE_URL));
|
||||||
$_SESSION['installed'] = false;
|
$_SESSION['installed'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($_SESSION as $key => $value) {
|
foreach($_SESSION as $key => $value) {
|
||||||
|
1
system/cache/signatures/.htaccess
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
deny from all
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
@@ -255,7 +255,7 @@ function fetchDatabaseConfig($name, &$value)
|
|||||||
*/
|
*/
|
||||||
function getDatabaseConfig($name)
|
function getDatabaseConfig($name)
|
||||||
{
|
{
|
||||||
$value = '';
|
$value = NULL;
|
||||||
fetchDatabaseConfig($name, $value);
|
fetchDatabaseConfig($name, $value);
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
@@ -379,12 +379,12 @@ function delete_guild($id)
|
|||||||
|
|
||||||
global $db, $ots;
|
global $db, $ots;
|
||||||
foreach($rank_list as $rank_in_guild) {
|
foreach($rank_list as $rank_in_guild) {
|
||||||
if(fieldExist('rank_id', 'players'))
|
if(tableExist('guild_members'))
|
||||||
$players_with_rank = $db->query('SELECT `id`, `rank_id` FROM `players` WHERE `rank_id` = ' . $rank->getId() . ' AND `deleted` = 0;');
|
|
||||||
else if(tableExist('guild_members'))
|
|
||||||
$players_with_rank = $db->query('SELECT `players`.`id` as `id`, `guild_members`.`rank_id` as `rank_id` FROM `players`, `guild_members` WHERE `guild_members`.`rank_id` = ' . $rank_in_guild->getId() . ' AND `players`.`id` = `guild_members`.`player_id` ORDER BY `name`;');
|
$players_with_rank = $db->query('SELECT `players`.`id` as `id`, `guild_members`.`rank_id` as `rank_id` FROM `players`, `guild_members` WHERE `guild_members`.`rank_id` = ' . $rank_in_guild->getId() . ' AND `players`.`id` = `guild_members`.`player_id` ORDER BY `name`;');
|
||||||
else
|
else if(tableExist('guild_membership'))
|
||||||
$players_with_rank = $db->query('SELECT `players`.`id` as `id`, `guild_membership`.`rank_id` as `rank_id` FROM `players`, `guild_membership` WHERE `guild_membership`.`rank_id` = ' . $rank_in_guild->getId() . ' AND `players`.`id` = `guild_membership`.`player_id` ORDER BY `name`;');
|
$players_with_rank = $db->query('SELECT `players`.`id` as `id`, `guild_membership`.`rank_id` as `rank_id` FROM `players`, `guild_membership` WHERE `guild_membership`.`rank_id` = ' . $rank_in_guild->getId() . ' AND `players`.`id` = `guild_membership`.`player_id` ORDER BY `name`;');
|
||||||
|
else
|
||||||
|
$players_with_rank = $db->query('SELECT `id`, `rank_id` FROM `players` WHERE `rank_id` = ' . $rank_in_guild->getId() . ' AND `deleted` = 0;');
|
||||||
|
|
||||||
$players_with_rank_number = $players_with_rank->rowCount();
|
$players_with_rank_number = $players_with_rank->rowCount();
|
||||||
if($players_with_rank_number > 0) {
|
if($players_with_rank_number > 0) {
|
||||||
@@ -1149,7 +1149,7 @@ function _mail($to, $subject, $body, $altBody = '', $add_html_tags = true)
|
|||||||
global $mailer, $config;
|
global $mailer, $config;
|
||||||
if(!$mailer)
|
if(!$mailer)
|
||||||
{
|
{
|
||||||
require(SYSTEM . 'libs/phpmailer/class.phpmailer.php');
|
require(SYSTEM . 'libs/phpmailer/PHPMailerAutoload.php');
|
||||||
$mailer = new PHPMailer();
|
$mailer = new PHPMailer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
@@ -123,11 +123,11 @@ if($cache->enabled() && $cache->fetch('vocations', $tmp)) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$vocations = new DOMDocument();
|
$vocations = new DOMDocument();
|
||||||
$path_extra = 'XML/';
|
$file = $config['data_path'] . 'XML/vocations.xml';
|
||||||
if($config['otserv_version'] >= OTSERV_FIRST && $config['otserv_version'] <= OTSERV_LAST)
|
if(!@file_exists($file))
|
||||||
$path_extra = '';
|
$file = $config['data_path'] . 'vocations.xml';
|
||||||
|
|
||||||
$vocations->load($config['data_path'] . $path_extra . 'vocations.xml');
|
$vocations->load($file);
|
||||||
|
|
||||||
if(!$vocations)
|
if(!$vocations)
|
||||||
die('ERROR: Cannot load <i>vocations.xml</i> file.');
|
die('ERROR: Cannot load <i>vocations.xml</i> file.');
|
||||||
@@ -135,10 +135,7 @@ else {
|
|||||||
$config['vocations'] = array();
|
$config['vocations'] = array();
|
||||||
foreach($vocations->getElementsByTagName('vocation') as $vocation) {
|
foreach($vocations->getElementsByTagName('vocation') as $vocation) {
|
||||||
$id = $vocation->getAttribute('id');
|
$id = $vocation->getAttribute('id');
|
||||||
//if($id == $vocation->getAttribute('fromvoc'))
|
$config['vocations'][$id] = $vocation->getAttribute('name');
|
||||||
$config['vocations'][$id] = $vocation->getAttribute('name');
|
|
||||||
//else
|
|
||||||
// $config['vocations'][$id] = $vocation->getAttribute('name');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($cache->enabled()) {
|
if($cache->enabled()) {
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
@@ -63,7 +63,7 @@ class Cache_File
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function _name($key) {
|
private function _name($key) {
|
||||||
return sprintf("%s/%s%s", $this->dir, $this->prefix, sha1($key));
|
return sprintf("%s%s%s", $this->dir, $this->prefix, sha1($key));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -852,11 +852,7 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
|
|
||||||
public function getGroupId()
|
public function getGroupId()
|
||||||
{
|
{
|
||||||
global $groups;
|
global $db;;
|
||||||
if(!isset($groups))
|
|
||||||
$groups = new OTS_Groups_List();
|
|
||||||
|
|
||||||
$group_id = 0;
|
|
||||||
if(fieldExist('group_id', 'accounts')) {
|
if(fieldExist('group_id', 'accounts')) {
|
||||||
$query = $this->db->query('SELECT `group_id` FROM `accounts` WHERE `id` = ' . (int) $this->getId())->fetch();
|
$query = $this->db->query('SELECT `group_id` FROM `accounts` WHERE `id` = ' . (int) $this->getId())->fetch();
|
||||||
// if anything was found
|
// if anything was found
|
||||||
@@ -864,19 +860,11 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
return $query['group_id'];
|
return $query['group_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// finds groups of all characters
|
$db->query('SELECT `group_id` FROM `players` WHERE `account_id` = ' . $this->getId() . ' ORDER BY `group_id` DESC LIMIT 1')->fetch();
|
||||||
foreach( $this->getPlayersList() as $player)
|
if(isset($query['group_id']))
|
||||||
{
|
return $query['group_id'];
|
||||||
$group = $player->getGroup();
|
|
||||||
|
|
||||||
// checks if group's access level is higher then previouls found highest
|
|
||||||
if( $group->getId() > $group_id)
|
|
||||||
{
|
|
||||||
$group_id = $group->getId();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $group_id;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -908,7 +896,7 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
|
|
||||||
public function logAction($action)
|
public function logAction($action)
|
||||||
{
|
{
|
||||||
$ip = '127.0.0.1';
|
$ip = '0';
|
||||||
if(isset($_SERVER['REMOTE_ADDR']) && !empty($_SERVER['REMOTE_ADDR']))
|
if(isset($_SERVER['REMOTE_ADDR']) && !empty($_SERVER['REMOTE_ADDR']))
|
||||||
$ip = $_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']))
|
||||||
@@ -916,18 +904,23 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
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'];
|
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||||
|
|
||||||
if($ip == NULL)
|
if(strpos($ip, ":") === false) {
|
||||||
$ip = '0';
|
$ipv6 = '0';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$ipv6 = $ip;
|
||||||
|
$ip = '';
|
||||||
|
}
|
||||||
|
|
||||||
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).')');
|
return $this->db->query('INSERT INTO `' . TABLE_PREFIX . 'account_actions` (`account_id`, `ip`, `ipv6`, `date`, `action`) VALUES (' . $this->db->quote($this->getId()).', (' . $this->db->quote(ip2long($ip)) . '), (' . ($ipv6 == '0' ? $this->db->quote('') : $this->db->quote(inet_pton($ipv6))) . '), UNIX_TIMESTAMP(NOW()), ' . $this->db->quote($action).')');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getActionsLog($limit1, $limit2)
|
public function getActionsLog($limit1, $limit2)
|
||||||
{
|
{
|
||||||
$actions = array();
|
$actions = array();
|
||||||
|
|
||||||
foreach($this->db->query('SELECT ' . $this->db->fieldName('ip') . ', ' . $this->db->fieldName('date') . ', ' . $this->db->fieldName('action') . ' FROM ' . $this->db->tableName(TABLE_PREFIX . 'account_actions') . ' WHERE ' . $this->db->fieldName('account_id') . ' = ' . $this->data['id'] . ' ORDER by ' . $this->db->fieldName('date') . ' DESC LIMIT ' . $limit1 . ', ' . $limit2 . '')->fetchAll() as $a)
|
foreach($this->db->query('SELECT `ip`, `ipv6`, `date`, `action` FROM `' . TABLE_PREFIX . 'account_actions` WHERE `account_id` = ' . $this->data['id'] . ' ORDER by `date` DESC LIMIT ' . $limit1 . ', ' . $limit2 . '')->fetchAll() as $a)
|
||||||
$actions[] = array('ip' => $a['ip'], 'date' => $a['date'], 'action' => $a['action']);
|
$actions[] = array('ip' => $a['ip'], 'ipv6' => $a['ipv6'], 'date' => $a['date'], 'action' => $a['action']);
|
||||||
|
|
||||||
return $actions;
|
return $actions;
|
||||||
}
|
}
|
||||||
|
@@ -97,6 +97,7 @@ abstract class OTS_Base_DB extends PDO implements IOTS_DB
|
|||||||
public function query($query)
|
public function query($query)
|
||||||
{
|
{
|
||||||
$this->queries++;
|
$this->queries++;
|
||||||
|
//echo $query . PHP_EOL;
|
||||||
return parent::query($query);
|
return parent::query($query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -39,6 +39,16 @@
|
|||||||
*/
|
*/
|
||||||
class OTS_Monster extends DOMDocument
|
class OTS_Monster extends DOMDocument
|
||||||
{
|
{
|
||||||
|
private $loaded = false;
|
||||||
|
public function loadXML($source , $options = 0)
|
||||||
|
{
|
||||||
|
$this->loaded = parent::loadXML($source, $options);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function loaded()
|
||||||
|
{
|
||||||
|
return $this->loaded;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Returns monster name.
|
* Returns monster name.
|
||||||
*
|
*
|
||||||
|
@@ -117,7 +117,8 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess
|
|||||||
{
|
{
|
||||||
// loads file
|
// loads file
|
||||||
$monster = new OTS_Monster();
|
$monster = new OTS_Monster();
|
||||||
$monster->load($this->monstersPath . $this->monsters[$name]);
|
//echo $this->monstersPath . $this->monsters[$name];
|
||||||
|
$monster->loadXML(trim(file_get_contents($this->monstersPath . $this->monsters[$name])));
|
||||||
return $monster;
|
return $monster;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,4 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$__load = array();
|
||||||
|
/*
|
||||||
|
'loss_experience' => NULL,
|
||||||
|
'loss_items' => NULL,
|
||||||
|
'guild_info' => NULL,
|
||||||
|
'skull_type' => NULL,
|
||||||
|
'skull_time' => NULL,
|
||||||
|
'blessings' => NULL,
|
||||||
|
'direction' => NULL,
|
||||||
|
'stamina' => NULL,
|
||||||
|
'world_id' => NULL,
|
||||||
|
'online' => NULL,
|
||||||
|
'deletion' => NULL,
|
||||||
|
'promotion' => NULL,
|
||||||
|
'marriage' => NULL
|
||||||
|
);*/
|
||||||
|
|
||||||
/**#@+
|
/**#@+
|
||||||
* @version 0.0.1
|
* @version 0.0.1
|
||||||
*/
|
*/
|
||||||
@@ -91,7 +108,6 @@ class OTS_Player extends OTS_Row_DAO
|
|||||||
POT::SKILL_SHIELD => array('value' => 0, 'tries' => 0),
|
POT::SKILL_SHIELD => array('value' => 0, 'tries' => 0),
|
||||||
POT::SKILL_FISH => array('value' => 0, 'tries' => 0)
|
POT::SKILL_FISH => array('value' => 0, 'tries' => 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Magic PHP5 method.
|
* Magic PHP5 method.
|
||||||
*
|
*
|
||||||
@@ -115,33 +131,84 @@ class OTS_Player extends OTS_Row_DAO
|
|||||||
*/
|
*/
|
||||||
public function load($id)
|
public function load($id)
|
||||||
{
|
{
|
||||||
$loss = '';
|
global $__load;
|
||||||
if(fieldExist('loss_experience', 'players')) {
|
|
||||||
$loss = ', `loss_experience`, `loss_mana`, `loss_skills`';
|
if(!isset($__load['loss_experience']))
|
||||||
}
|
{
|
||||||
|
$loss = '';
|
||||||
$loss_items = '';
|
if(fieldExist('loss_experience', 'players')) {
|
||||||
if(fieldExist('loss_items', 'players')) {
|
$loss = ', `loss_experience`, `loss_mana`, `loss_skills`';
|
||||||
$loss_items = ', `loss_items`, `loss_containers`';
|
}
|
||||||
}
|
|
||||||
|
$__load['loss_experience'] = $loss;
|
||||||
$guild_info = '';
|
|
||||||
if(!tableExist('guild_members') && fieldExist('guildnick', 'players')) {
|
|
||||||
$guild_info = ', `guildnick`, `rank_id`';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$skull_type = 'skull';
|
if(!isset($__load['loss_items']))
|
||||||
if(fieldExist('skull_type', 'players')) {
|
{
|
||||||
$skull_type = 'skull_type';
|
$loss_items = '';
|
||||||
|
if(fieldExist('loss_items', 'players')) {
|
||||||
|
$loss_items = ', `loss_items`, `loss_containers`';
|
||||||
|
}
|
||||||
|
|
||||||
|
$__load['loss_items'] = $loss_items;
|
||||||
}
|
}
|
||||||
|
|
||||||
$skull_time = 'skulltime';
|
if(!isset($__load['guild_info']))
|
||||||
if(fieldExist('skull_time', 'players')) {
|
{
|
||||||
$skull_time = 'skull_time';
|
$guild_info = '';
|
||||||
|
if(!tableExist('guild_members') && fieldExist('guildnick', 'players')) {
|
||||||
|
$guild_info = ', `guildnick`, `rank_id`';
|
||||||
|
}
|
||||||
|
|
||||||
|
$__load['guild_info'] = $guild_info;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isset($__load['skull_type']))
|
||||||
|
{
|
||||||
|
$skull_type = 'skull';
|
||||||
|
if(fieldExist('skull_type', 'players')) {
|
||||||
|
$skull_type = 'skull_type';
|
||||||
|
}
|
||||||
|
|
||||||
|
$__load['skull_type'] = $skull_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isset($__load['skull_time']))
|
||||||
|
{
|
||||||
|
$skull_time = 'skulltime';
|
||||||
|
if(fieldExist('skull_time', 'players')) {
|
||||||
|
$skull_time = 'skull_time';
|
||||||
|
}
|
||||||
|
|
||||||
|
$__load['skull_time'] = $skull_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isset($__load['blessings'])) {
|
||||||
|
$__load['blessings'] = fieldExist('blessings', 'players');
|
||||||
|
}
|
||||||
|
if(!isset($__load['direction'])) {
|
||||||
|
$__load['direction'] = fieldExist('direction', 'players');
|
||||||
|
}
|
||||||
|
if(!isset($__load['stamina'])) {
|
||||||
|
$__load['stamina'] = fieldExist('stamina', 'players');
|
||||||
|
}
|
||||||
|
if(!isset($__load['world_id'])) {
|
||||||
|
$__load['world_id'] = fieldExist('world_id', 'players');
|
||||||
|
}
|
||||||
|
if(!isset($__load['online'])) {
|
||||||
|
$__load['online'] = fieldExist('online', 'players');
|
||||||
|
}
|
||||||
|
if(!isset($__load['deletion'])) {
|
||||||
|
$__load['deletion'] = fieldExist('deletion', 'players');
|
||||||
|
}
|
||||||
|
if(!isset($__load['promotion'])) {
|
||||||
|
$__load['promotion'] = fieldExist('promotion', 'players');
|
||||||
|
}
|
||||||
|
if(!isset($__load['marriage'])) {
|
||||||
|
$__load['marriage'] = fieldExist('marriage', 'players');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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 . $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();
|
$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`, `' . $__load['skull_time'] . '` as `skulltime`, `' . $__load['skull_type'] . '` as `skull`' . $__load['guild_info'] . ', `town_id`' . $__load['loss_experience'] . $__load['loss_items'] . ', `balance`' . ($__load['blessings'] ? ', `blessings`' : '') . ($__load['direction'] ? ', `direction`' : '') . ($__load['stamina'] ? ', `stamina`' : '') . ($__load['world_id'] ? ', `world_id`' : '') . ($__load['online'] ? ', `online`' : '') . ', `' . ($__load['deletion'] ? 'deletion' : 'deleted') . '`' . ($__load['promotion'] ? ', `promotion`' : '') . ($__load['marriage'] ? ', `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'] = '';
|
||||||
@@ -150,8 +217,9 @@ class OTS_Player extends OTS_Row_DAO
|
|||||||
$this->data['rank_id'] = 0;
|
$this->data['rank_id'] = 0;
|
||||||
|
|
||||||
if(isset($this->data['promotion'])) {
|
if(isset($this->data['promotion'])) {
|
||||||
|
global $config;
|
||||||
if((int)$this->data['promotion'] > 0)
|
if((int)$this->data['promotion'] > 0)
|
||||||
$this->data['vocation'] + ($this->data['promotion'] * 4);
|
$this->data['vocation'] += ($this->data['promotion'] * $config['vocations_amount']);
|
||||||
}
|
}
|
||||||
// loads skills
|
// loads skills
|
||||||
if( $this->isLoaded() )
|
if( $this->isLoaded() )
|
||||||
@@ -335,7 +403,7 @@ class OTS_Player extends OTS_Row_DAO
|
|||||||
$loss_items = ', `loss_items`, `loss_containers`';
|
$loss_items = ', `loss_items`, `loss_containers`';
|
||||||
$loss_items_data = ', ' . $this->data['loss_items'] . ', ' . $this->data['loss_containers'];
|
$loss_items_data = ', ' . $this->data['loss_items'] . ', ' . $this->data['loss_containers'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$guild_info = '';
|
$guild_info = '';
|
||||||
$guild_info_data = '';
|
$guild_info_data = '';
|
||||||
if(!tableExist('guild_members') && fieldExist('guildnick', 'players')) {
|
if(!tableExist('guild_members') && fieldExist('guildnick', 'players')) {
|
||||||
@@ -405,7 +473,6 @@ class OTS_Player extends OTS_Row_DAO
|
|||||||
|
|
||||||
if($id != $i - 1)
|
if($id != $i - 1)
|
||||||
$set .= ',';
|
$set .= ',';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$skills = $this->db->query('UPDATE `players` SET ' . $set . ' WHERE `id` = ' . $this->data['id']);
|
$skills = $this->db->query('UPDATE `players` SET ' . $set . ' WHERE `id` = ' . $this->data['id']);
|
||||||
@@ -1801,13 +1868,13 @@ class OTS_Player extends OTS_Row_DAO
|
|||||||
public function setGuildNick($guildnick)
|
public function setGuildNick($guildnick)
|
||||||
{
|
{
|
||||||
$this->data['guildnick'] = (string) $guildnick;
|
$this->data['guildnick'] = (string) $guildnick;
|
||||||
if(fieldExist('guildnick', 'players'))
|
if(tableExist('guild_members'))
|
||||||
$this->db->query('UPDATE `players` SET `guildnick` = ' . $this->db->quote($this->data['guildnick']) . ' WHERE `id` = ' . $this->getId());
|
|
||||||
else if(tableExist('guild_members'))
|
|
||||||
$this->db->query('UPDATE `guild_members` SET `nick` = ' . $this->db->quote($this->data['guildnick']) . ' WHERE `player_id` = ' . $this->getId());
|
$this->db->query('UPDATE `guild_members` SET `nick` = ' . $this->db->quote($this->data['guildnick']) . ' WHERE `player_id` = ' . $this->getId());
|
||||||
else
|
else if(tableExist('guild_membership'))
|
||||||
$this->db->query('UPDATE `guild_membership` SET `nick` = ' . $this->db->quote($this->data['guildnick']) . ' WHERE `player_id` = ' . $this->getId());
|
$this->db->query('UPDATE `guild_membership` SET `nick` = ' . $this->db->quote($this->data['guildnick']) . ' WHERE `player_id` = ' . $this->getId());
|
||||||
}
|
else if(fieldExist('guildnick', 'players'))
|
||||||
|
$this->db->query('UPDATE `players` SET `guildnick` = ' . $this->db->quote($this->data['guildnick']) . ' WHERE `id` = ' . $this->getId());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version 0.0.3
|
* @version 0.0.3
|
||||||
@@ -1840,23 +1907,29 @@ class OTS_Player extends OTS_Row_DAO
|
|||||||
public function getRank()
|
public function getRank()
|
||||||
{
|
{
|
||||||
$rank_id = 0;
|
$rank_id = 0;
|
||||||
if(fieldExist('rank_id', 'players')) {
|
if(tableExist('guild_members')) {
|
||||||
$query = $this->db->query('SELECT `rank_id` FROM `players` WHERE `id`= ' . $this->data['id'] . ';')->fetch();
|
$query = $this->db->query('SELECT `rank_id` FROM `guild_members` WHERE `player_id`= ' . $this->data['id'] . ' LIMIT 1;');
|
||||||
$rank_id = $query['rank_id'];
|
|
||||||
} else {
|
|
||||||
$table = 'guild_membership';
|
|
||||||
if(tableExist('guild_members'))
|
|
||||||
$table = 'guild_members';
|
|
||||||
|
|
||||||
$query = $this->db->query('SELECT `rank_id` FROM `' . $table . '` WHERE `player_id`= ' . $this->data['id'] . ' LIMIT 1;');
|
|
||||||
if($query->rowCount() == 1) {
|
if($query->rowCount() == 1) {
|
||||||
$query = $query->fetch();
|
$query = $query->fetch();
|
||||||
$rank_id = $query['rank_id'];
|
$rank_id = $query['rank_id'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(tableExist('guild_membership')) {
|
||||||
|
$query = $this->db->query('SELECT `rank_id` FROM `guild_membership` WHERE `player_id`= ' . $this->data['id'] . ' LIMIT 1;');
|
||||||
|
if($query->rowCount() == 1) {
|
||||||
|
$query = $query->fetch();
|
||||||
|
$rank_id = $query['rank_id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(fieldExist('rank_id', 'players')) {
|
||||||
|
$query = $this->db->query('SELECT `rank_id` FROM `players` WHERE `id`= ' . $this->data['id'] . ';')->fetch();
|
||||||
|
$rank_id = $query['rank_id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if($rank_id == 0) {
|
||||||
|
return new OTS_GuildRank();
|
||||||
|
}
|
||||||
|
|
||||||
if($rank_id == 0) return new OTS_GuildRank();;
|
|
||||||
|
|
||||||
$guildRank = new OTS_GuildRank();
|
$guildRank = new OTS_GuildRank();
|
||||||
$guildRank->load($rank_id);
|
$guildRank->load($rank_id);
|
||||||
return $guildRank;
|
return $guildRank;
|
||||||
@@ -2101,7 +2174,7 @@ class OTS_Player extends OTS_Row_DAO
|
|||||||
throw new E_OTS_NotLoaded();
|
throw new E_OTS_NotLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->data['loss_items'];
|
return $this->data['loss_containers'];
|
||||||
}
|
}
|
||||||
public function setLossContainers($loss_containers)
|
public function setLossContainers($loss_containers)
|
||||||
{
|
{
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
1
system/locale/sv/.htaccess
Normal file
@@ -0,0 +1 @@
|
|||||||
|
deny from all
|
9
system/locale/sv/admin.php
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* swedish language file
|
||||||
|
* admin.php
|
||||||
|
*
|
||||||
|
* @author Sizaro <sizaro@live.se>
|
||||||
|
*/
|
||||||
|
$locale['title'] = 'MyAAC Admin';
|
||||||
|
?>
|
93
system/locale/sv/install.php
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* swedish language file
|
||||||
|
* install.php
|
||||||
|
*
|
||||||
|
* @author Sizaro <sizaro@live.se>
|
||||||
|
*/
|
||||||
|
$locale['installation'] = 'Installation';
|
||||||
|
$locale['steps'] = 'Steg';
|
||||||
|
|
||||||
|
$locale['previous'] = 'Föregående';
|
||||||
|
$locale['next'] = 'Nästa';
|
||||||
|
|
||||||
|
$locale['on'] = 'På';
|
||||||
|
$locale['off'] = 'Av';
|
||||||
|
|
||||||
|
$locale['loaded'] = 'Laddad';
|
||||||
|
$locale['not_loaded'] = 'Inte Laddad';
|
||||||
|
|
||||||
|
$locale['please_fill_all'] = 'Vänligen fyll i allt!';
|
||||||
|
$locale['already_installed'] = 'MyAAC är redan installerat. Vänligen ta bort <b>install/<b/> mappen.';
|
||||||
|
|
||||||
|
// welcome
|
||||||
|
$locale['step_welcome'] = 'Välkommen';
|
||||||
|
$locale['step_welcome_title'] = 'Välkommen till installatören';
|
||||||
|
$locale['step_welcome_desc'] = 'Välj det språk du vill se installatören med';
|
||||||
|
|
||||||
|
// license
|
||||||
|
$locale['step_license'] = 'Licens';
|
||||||
|
$locale['step_license_title'] = 'GNU/GPL Licens';
|
||||||
|
|
||||||
|
// requirements
|
||||||
|
$locale['step_requirements'] = 'Krav';
|
||||||
|
$locale['step_requirements_title'] = 'Kravskontroll';
|
||||||
|
$locale['step_requirements_php_version'] = 'PHP Version';
|
||||||
|
$locale['step_requirements_write_perms'] = 'Skriv behörigheter';
|
||||||
|
$locale['step_requirements_failed'] = 'Installation kommer att inaktiveras tills dessa krav följts. </ B> <br/> Mer information finns i filen <b>README</b>.';
|
||||||
|
$locale['step_requirements_extension'] = '$EXTENSION$ PHP extension';
|
||||||
|
|
||||||
|
// config
|
||||||
|
$locale['step_config'] = 'Konfiguration';
|
||||||
|
$locale['step_config_title'] = 'Grundläggande konfiguration';
|
||||||
|
$locale['step_config_server_path'] = 'Server mapp';
|
||||||
|
$locale['step_config_server_path_desc'] = 'Mappen som innhåller exe filen till The Forgotten Server, där du har din config.lua.';
|
||||||
|
$locale['step_config_mail_admin'] = 'Admin E-Post';
|
||||||
|
$locale['step_config_mail_admin_desc'] = 'Adress där E-Post från kontaktförmolär kommer att leveraras, till exempel <i>admin@gmail.com</i>';
|
||||||
|
|
||||||
|
$locale['step_config_mail_admin_error'] = 'Admin E-Post är inte korrekt.';
|
||||||
|
$locale['step_config_mail_address'] = 'Server E-Post';
|
||||||
|
$locale['step_config_mail_address_desc'] = 'Adress som kommer att användas för utgående email (från:), till exempel <i>no-reply@your-server.org</i>';
|
||||||
|
|
||||||
|
$locale['step_config_mail_address_error'] = 'Server E-Post är inte korrekt.';
|
||||||
|
$locale['step_config_client'] = 'Klientversion';
|
||||||
|
$locale['step_config_client_desc'] = 'Används för nerladdningssidan och teman.';
|
||||||
|
|
||||||
|
// database
|
||||||
|
$locale['step_database'] = 'Importera schema';
|
||||||
|
$locale['step_database_title'] = 'Importera MySQL schema';
|
||||||
|
$locale['step_database_importing'] = 'Din databas är MySQL. Importerar schema nu...';
|
||||||
|
$locale['step_database_error_path'] = 'Ange server mapp.';
|
||||||
|
$locale['step_database_error_config'] = 'Kan inte hitta konfigurations fil. Är din server mapp korrekt? Gå tillbaka och kolla igen.';
|
||||||
|
$locale['step_database_error_database_empty'] = 'Kan inte bestämma databas typ från config.lua. Din OTS stöds inte av MyAAC.';
|
||||||
|
$locale['step_database_error_only_mysql'] = 'Denna AAC stöder endast MySQL. Från din konfigurationsfil verkar det som att din OTS använder: $DATABASE_TYPE$ databastypen. Var vänligen ändra din databas till MySQL och följ instruktionerna i installationen igen.';
|
||||||
|
$locale['step_database_error_table'] = 'Tabell $TABLE$ finns inte. Importera din OTS databas schema först.';
|
||||||
|
$locale['step_database_error_table_exist'] = 'Tabell $TABLE$ finns redan. Ser ut som att din AAC redan är installerad. Hoppar över importering av MySQL schema.';
|
||||||
|
$locale['step_database_error_schema'] = 'Fel vid import av schema:';
|
||||||
|
$locale['step_database_success_schema'] = 'Lyckades installera $PREFIX$ tabeller.';
|
||||||
|
$locale['step_database_error_file'] = '$FILE$ kunde inte öppnas. Kopiera innehållet och klistra in här:';
|
||||||
|
$locale['step_database_adding_field'] = 'Lägger till fält';
|
||||||
|
$locale['step_database_modifying_field'] = 'Ändrar fält';
|
||||||
|
$locale['step_database_changing_field'] = 'Ändrar $FIELD$ till $FIELD_NEW$...';
|
||||||
|
$locale['step_database_imported_players'] = 'Importerar spelarprover...';
|
||||||
|
$locale['step_database_created_account'] = 'Skapade admin konto...';
|
||||||
|
|
||||||
|
// admin account
|
||||||
|
$locale['step_admin'] = 'Admin Konto';
|
||||||
|
$locale['step_admin_title'] = 'Skapa Admin Konto';
|
||||||
|
$locale['step_admin_account'] = 'Admin konto namn';
|
||||||
|
$locale['step_admin_account_desc'] = 'Namn på ditt admin konto som kommer att användas för att logga in på hemsidan och servern.';
|
||||||
|
$locale['step_admin_account_id'] = 'Admin konto ID';
|
||||||
|
$locale['step_admin_account_id_desc'] = 'ID på ditt admin konto som kommer att användas för att logga in på hemsidan och servern.';
|
||||||
|
$locale['step_admin_password'] = 'Admin konto lösenord';
|
||||||
|
$locale['step_admin_password_desc'] = 'Lösenordet till ditt admin konto.';
|
||||||
|
|
||||||
|
// finish
|
||||||
|
$locale['step_finish_admin_panel'] = 'Admin Panelen';
|
||||||
|
$locale['step_finish_homepage'] = 'hemsida';
|
||||||
|
$locale['step_finish'] = 'Klar';
|
||||||
|
$locale['step_finish_title'] = 'Installationen klar!';
|
||||||
|
$locale['step_finish_desc'] = 'Grattis! <b>MyAAC</b> är redo att användas!<br/>Du kan logga in på $ADMIN_PANEL$, eller titta till $HOMEPAGE$.<br/><br/>
|
||||||
|
<font color="red">Var vänligen ta bort installations mappen.</font><br/><br/>
|
||||||
|
Var vänligen rapportera buggar och förslag på $LINK$, tack!';
|
||||||
|
?>
|
15
system/locale/sv/main.php
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* swedish language file
|
||||||
|
* main.php
|
||||||
|
*
|
||||||
|
* @author Sizaro <sizaro@live.se>
|
||||||
|
*/
|
||||||
|
$locale['name'] = 'Swedish';
|
||||||
|
$locale['lang'] = 'sv';
|
||||||
|
$locale['encoding'] = 'utf-8';
|
||||||
|
$locale['direction']= 'ltr';
|
||||||
|
|
||||||
|
$locale['error404'] = 'Sidan kunde inte hittas.';
|
||||||
|
$locale['news'] = 'Senaste nyheterna';
|
||||||
|
?>
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
@@ -73,9 +73,6 @@ else
|
|||||||
if(isset($_POST['remember_me']))
|
if(isset($_POST['remember_me']))
|
||||||
$_SESSION['remember_me'] = true;
|
$_SESSION['remember_me'] = true;
|
||||||
|
|
||||||
//if(isset($_POST['admin']))
|
|
||||||
// $_SESSION['admin'] = true;
|
|
||||||
|
|
||||||
$logged = true;
|
$logged = true;
|
||||||
|
|
||||||
$logged_flags = $account_logged->getWebFlags();
|
$logged_flags = $account_logged->getWebFlags();
|
||||||
|
3
system/migrations/3.php
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
$db->query("ALTER TABLE `" . TABLE_PREFIX . "account_actions` ADD `ipv6` BINARY(16) NOT NULL DEFAULT 0;");
|
||||||
|
?>
|
3
system/migrations/4.php
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
$db->query("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `id` int(11) NOT NULL AUTO_INCREMENT primary key FIRST;");
|
||||||
|
?>
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
@@ -177,11 +177,12 @@ Please enter your account name and your password.<br/><a href="?subtopic=createa
|
|||||||
|
|
||||||
if($action == "")
|
if($action == "")
|
||||||
{
|
{
|
||||||
|
$freePremium = isset($config['lua']['freePremium']) && getBoolean($config['lua']['freePremium']);
|
||||||
$account_reckey = $account_logged->getCustomField("key");
|
$account_reckey = $account_logged->getCustomField("key");
|
||||||
if(!$account_logged->isPremium())
|
if(!$account_logged->isPremium())
|
||||||
$account_status = '<b><font color="red">Free Account</font></b>';
|
$account_status = '<b><font color="red">Free Account</font></b>';
|
||||||
else
|
else
|
||||||
$account_status = '<b><font color="green">Premium Account, '.$account_logged->getPremDays().' days left</font></b>';
|
$account_status = '<b><font color="green">Premium Account, ' . ($freePremium ? 'Unlimited' : $account_logged->getPremDays() . ' days left') . '</font></b>';
|
||||||
if(empty($account_reckey))
|
if(empty($account_reckey))
|
||||||
$account_registred = '<b><font color="red">No</font></b>';
|
$account_registred = '<b><font color="red">No</font></b>';
|
||||||
else
|
else
|
||||||
@@ -248,7 +249,7 @@ Please enter your account name and your password.<br/><a href="?subtopic=createa
|
|||||||
foreach($account_logged->getActionsLog(0, 1000) as $action)
|
foreach($account_logged->getActionsLog(0, 1000) as $action)
|
||||||
{
|
{
|
||||||
echo '<tr style="background-color:' . getStyle($player_number_counter++) . '"><td>'.$action['action'] . '</td><td>' . date("jS F Y H:i:s",$action['date']) . '</td>
|
echo '<tr style="background-color:' . getStyle($player_number_counter++) . '"><td>'.$action['action'] . '</td><td>' . date("jS F Y H:i:s",$action['date']) . '</td>
|
||||||
<td>' . long2ip($action['ip']) . '</td></tr>';
|
<td>' . ($action['ip'] != 0 ? long2ip($action['ip']) : inet_ntop($action['ipv6'])) . '</td></tr>';
|
||||||
}
|
}
|
||||||
echo '</table>
|
echo '</table>
|
||||||
|
|
||||||
@@ -292,7 +293,22 @@ Please enter your account name and your password.<br/><a href="?subtopic=createa
|
|||||||
<form action="?subtopic=accountmanagement&action=changename" method="post" >
|
<form action="?subtopic=accountmanagement&action=changename" method="post" >
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border:0px;" ><div class="BigButton" style="background-image:url('.$template_path.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$template_path.'/images/buttons/sbutton_over.gif);" ></div>
|
<td style="border:0px;" ><div class="BigButton" style="background-image:url('.$template_path.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$template_path.'/images/buttons/sbutton_over.gif);" ></div>
|
||||||
<input class="ButtonText" type="image" name="Change Name" alt="Change Name" src="'.$template_path.'/images/buttons/_sbutton_change_name.gif" ></div>
|
<input class="ButtonText" type="image" name="Change Name" alt="Change Name" src="images/buttons/_sbutton_change_name.gif" ></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</form>
|
||||||
|
</table>
|
||||||
|
</td>';
|
||||||
|
}
|
||||||
|
if($config['account_change_character_sex']) {
|
||||||
|
echo '
|
||||||
|
<td>
|
||||||
|
<table border="0" cellspacing="0" cellpadding="0" >
|
||||||
|
<form action="?subtopic=accountmanagement&action=changesex" method="post" >
|
||||||
|
<tr>
|
||||||
|
<td style="border:0px;" ><div class="BigButton" style="background-image:url('.$template_path.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$template_path.'/images/buttons/sbutton_over.gif);" ></div>
|
||||||
|
<input class="ButtonText" type="image" name="Change Sex" alt="Change Sex" src="images/buttons/_sbutton_change_sex.gif" ></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -696,14 +712,14 @@ Please enter your account name and your password.<br/><a href="?subtopic=createa
|
|||||||
{
|
{
|
||||||
echo 'Here you can see and edit the information about your character.<br/>If you do not want to specify a certain field, just leave it blank.<br/><br/><form action="?subtopic=accountmanagement&action=changecomment" method="post" ><div class="TableContainer" > <table class="Table5" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$template_path.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Edit Character Information</div> <span class="CaptionVerticalRight" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$template_path.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$template_path.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$template_path.'/images/content/table-shadow-rm.gif);" > <div class="TableContentContainer" > <table class="TableContent" width="100%" ><tr><td class="LabelV" >Name:</td><td style="width:80%;" >'.$player_name.'</td></tr><tr><td class="LabelV" >Hide Account:</td><td>';
|
echo 'Here you can see and edit the information about your character.<br/>If you do not want to specify a certain field, just leave it blank.<br/><br/><form action="?subtopic=accountmanagement&action=changecomment" method="post" ><div class="TableContainer" > <table class="Table5" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$template_path.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Edit Character Information</div> <span class="CaptionVerticalRight" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$template_path.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$template_path.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$template_path.'/images/content/table-shadow-rm.gif);" > <div class="TableContentContainer" > <table class="TableContent" width="100%" ><tr><td class="LabelV" >Name:</td><td style="width:80%;" >'.$player_name.'</td></tr><tr><td class="LabelV" >Hide Account:</td><td>';
|
||||||
if($player->getCustomField("hidden") == 1) {
|
if($player->getCustomField("hidden") == 1) {
|
||||||
echo '<input type="checkbox" name="accountvisible" value="1" checked="checked">';
|
echo '<input type="checkbox" name="accountvisible" id="accountvisible" value="1" checked="checked">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo '<input type="checkbox" name="accountvisible" value="1" >';
|
echo '<input type="checkbox" name="accountvisible" id="accountvisible" value="1" >';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo ' check to hide your account information';
|
echo '<label for="accountvisible"> check to hide your account information</label>';
|
||||||
if((int)$player->getCustomField('group_id') > 1)
|
if((int)$player->getCustomField('group_id') > 1)
|
||||||
echo ' (you will be also hidden on the Team page!)';
|
echo ' (you will be also hidden on the Team page!)';
|
||||||
|
|
||||||
@@ -726,12 +742,11 @@ Please enter your account name and your password.<br/><a href="?subtopic=createa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//### DELETE character from account ###
|
|
||||||
if($action == "changename") {
|
if($action == "changename") {
|
||||||
echo '<script type="text/javascript" src="tools/check_name.js"></script>';
|
echo '<script type="text/javascript" src="tools/check_name.js"></script>';
|
||||||
|
|
||||||
$name_changed = false;
|
$name_changed = false;
|
||||||
$player_id = isset($_POST['player_id']) ? $_POST['player_id'] : NULL;
|
$player_id = isset($_POST['player_id']) ? (int)$_POST['player_id'] : NULL;
|
||||||
$newcharname = isset($_POST['newcharname']) ? stripslashes(ucwords(strtolower($_POST['newcharname']))) : NULL;
|
$newcharname = isset($_POST['newcharname']) ? stripslashes(ucwords(strtolower($_POST['newcharname']))) : NULL;
|
||||||
if((!$config['account_change_character_name']))
|
if((!$config['account_change_character_name']))
|
||||||
echo 'You cant change your character name';
|
echo 'You cant change your character name';
|
||||||
@@ -776,10 +791,10 @@ Please enter your account name and your password.<br/><a href="?subtopic=createa
|
|||||||
$account_logged->logAction('Changed name from <b>' . $old_name . '</b> to <b>' . $player->getName() . '</b>.');
|
$account_logged->logAction('Changed name from <b>' . $old_name . '</b> to <b>' . $player->getName() . '</b>.');
|
||||||
echo '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$template_path.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Name Changed</div> <span class="CaptionVerticalRight" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$template_path.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>The character <b>'.$old_name.'</b> name has been changed to <b>' . $player->getName() . '</b>.</td></tr> </table> </div> </table></div></td></tr><br><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$template_path.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$template_path.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$template_path.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
|
echo '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$template_path.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Name Changed</div> <span class="CaptionVerticalRight" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$template_path.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>The character <b>'.$old_name.'</b> name has been changed to <b>' . $player->getName() . '</b>.</td></tr> </table> </div> </table></div></td></tr><br><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$template_path.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$template_path.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$template_path.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
$errors[] = 'Character <b>'.$player_name.'</b> is not on your account.';
|
{
|
||||||
}
|
$errors[] = 'Character <b>'.$player_name.'</b> is not on your account.';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -825,6 +840,93 @@ Please enter your account name and your password.<br/><a href="?subtopic=createa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($action == "changesex") {
|
||||||
|
$sex_changed = false;
|
||||||
|
$player_id = isset($_POST['player_id']) ? (int)$_POST['player_id'] : NULL;
|
||||||
|
$new_sex = isset($_POST['new_sex']) ? (int)$_POST['new_sex'] : NULL;
|
||||||
|
if((!$config['account_change_character_sex']))
|
||||||
|
echo 'You cant change your character sex';
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$points = $account_logged->getCustomField('premium_points');
|
||||||
|
if(isset($_POST['changesexsave']) && $_POST['changesexsave'] == 1) {
|
||||||
|
if($points < $config['account_change_character_sex_points'])
|
||||||
|
$errors[] = 'You need ' . $config['account_change_character_sex_points'] . ' premium points to change sex. You have <b>'.$points.'<b> premium points.';
|
||||||
|
|
||||||
|
if(empty($errors) && $new_sex != 0 && $new_sex != 1)
|
||||||
|
$errors[] = 'This sex is invalid.';
|
||||||
|
|
||||||
|
if(empty($errors)) {
|
||||||
|
$player = $ots->createObject('Player');
|
||||||
|
$player->load($player_id);
|
||||||
|
if($player->isLoaded()) {
|
||||||
|
$player_account = $player->getAccount();
|
||||||
|
if($account_logged->getId() == $player_account->getId()) {
|
||||||
|
if($player->isOnline()) {
|
||||||
|
$errors[] = 'This character is online.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(empty($errors) && $player->getSex() == $new_sex)
|
||||||
|
$errors[] = 'Sex cannot be same';
|
||||||
|
|
||||||
|
if(empty($errors)) {
|
||||||
|
$sex_changed = true;
|
||||||
|
$old_sex = $player->getSex();
|
||||||
|
$player->setSex($new_sex);
|
||||||
|
$sexes = array(0 => 'Female', 1 => 'Male');
|
||||||
|
$player->save();
|
||||||
|
$account_logged->setCustomField("premium_points", $points - $config['account_change_character_name_points']);
|
||||||
|
$account_logged->logAction('Changed sex on character <b>' . $player->getName() . '</b> from <b>' . $sexes[$old_sex] . '</b> to <b>' . $sexes[$new_sex] . '</b>.');
|
||||||
|
echo '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$template_path.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Sex Changed</div> <span class="CaptionVerticalRight" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$template_path.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>The character <b>'.$player->getName().'</b> sex has been changed to <b>' . $sexes[$new_sex] . '</b>.</td></tr> </table> </div> </table></div></td></tr><br><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$template_path.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$template_path.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$template_path.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$errors[] = 'Character <b>'.$player_name.'</b> is not on your account.';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$errors[] = 'Character with this name doesn\'t exist.';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$sex_changed) {
|
||||||
|
if(!empty($errors)) {
|
||||||
|
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><b>The Following Errors Have Occurred:</b><br/>';
|
||||||
|
foreach($errors as $errors) {
|
||||||
|
echo '<li>'.$errors;
|
||||||
|
}
|
||||||
|
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 'To change a sex of character select player and choose a new sex.<br/>
|
||||||
|
<font color="red">Change sex cost ' . $config['account_change_character_sex_points'] . ' premium points. You have ' . $points . ' premium points.</font><br/><br/><form action="?subtopic=accountmanagement&action=changesex" method="post" ><input type="hidden" name="changesexsave" value="1"><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$template_path.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Change sex</div> <span class="CaptionVerticalRight" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$template_path.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" >
|
||||||
|
<table style="width:100%;" >
|
||||||
|
<tr>
|
||||||
|
<td class="LabelV" ><span >Character:</td>
|
||||||
|
<td style="width:90%;" >
|
||||||
|
<select name="player_id">';
|
||||||
|
$players = $account_logged->getPlayersList();
|
||||||
|
foreach($players as $player)
|
||||||
|
echo '<option value="' . $player->getId() . '">' . $player->getName() . '</option>';
|
||||||
|
echo '
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="LabelV" ><span >New Sex:</td>
|
||||||
|
<td>
|
||||||
|
<select name="new_sex">
|
||||||
|
<option value="0"' . ($player->getSex() == 0 ? ' selected' : '') . '>Female</option>
|
||||||
|
<option value="1"' . ($player->getSex() == 1 ? ' selected' : '') . '>Male</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table> </div> </table></div></td></tr><br/><table style="width:100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$template_path.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$template_path.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$template_path.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$template_path.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$template_path.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$template_path.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
//### DELETE character from account ###
|
//### DELETE character from account ###
|
||||||
if($action == "deletecharacter") {
|
if($action == "deletecharacter") {
|
||||||
$player_name = isset($_POST['delete_name']) ? stripslashes($_POST['delete_name']) : NULL;
|
$player_name = isset($_POST['delete_name']) ? stripslashes($_POST['delete_name']) : NULL;
|
||||||
@@ -964,7 +1066,7 @@ Please enter your account name and your password.<br/><a href="?subtopic=createa
|
|||||||
$char_to_copy = new OTS_Player();
|
$char_to_copy = new OTS_Player();
|
||||||
$char_to_copy->find($char_to_copy_name);
|
$char_to_copy->find($char_to_copy_name);
|
||||||
if(!$char_to_copy->isLoaded())
|
if(!$char_to_copy->isLoaded())
|
||||||
$newchar_errors[] .= 'Wrong characters configuration. Try again or contact with admin. ADMIN: Edit file config/config.php and set valid characters to copy names. Character to copy'.$char_to_copy_name.'</b> doesn\'t exist.';
|
$newchar_errors[] .= 'Wrong characters configuration. Try again or contact with admin. ADMIN: Edit file config/config.php and set valid characters to copy names. Character to copy: <b>'.$char_to_copy_name.'</b> doesn\'t exist.';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(empty($newchar_errors))
|
if(empty($newchar_errors))
|
||||||
@@ -1004,6 +1106,9 @@ Please enter your account name and your password.<br/><a href="?subtopic=createa
|
|||||||
$player->setManaSpent($char_to_copy->getManaSpent());
|
$player->setManaSpent($char_to_copy->getManaSpent());
|
||||||
$player->setSoul($char_to_copy->getSoul());
|
$player->setSoul($char_to_copy->getSoul());
|
||||||
|
|
||||||
|
for($skill = POT::SKILL_FIRST; $skill <= POT::SKILL_LAST; $skill++)
|
||||||
|
$player->setSkill($skill, 10);
|
||||||
|
|
||||||
$player->setLookBody($char_to_copy->getLookBody());
|
$player->setLookBody($char_to_copy->getLookBody());
|
||||||
$player->setLookFeet($char_to_copy->getLookFeet());
|
$player->setLookFeet($char_to_copy->getLookFeet());
|
||||||
$player->setLookHead($char_to_copy->getLookHead());
|
$player->setLookHead($char_to_copy->getLookHead());
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -5,12 +5,85 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.1.3
|
* @version 0.2.4
|
||||||
* @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 = 'Dashboard';
|
$title = 'Dashboard';
|
||||||
|
|
||||||
|
if($cache->enabled()) {
|
||||||
|
if(isset($_GET['clear_cache'])) {
|
||||||
|
if(clearCache())
|
||||||
|
success('Cache cleared.');
|
||||||
|
else
|
||||||
|
error('Error while clearing cache.');
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
<table class="table">
|
||||||
|
<tr>
|
||||||
|
<th><a href="?p=dashboard&clear_cache" onclick="return confirm('Are you sure?');">Clear cache</a></th>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if(isset($_GET['maintenance'])) {
|
||||||
|
$_status = (int)$_POST['status'];
|
||||||
|
$message = $_POST['message'];
|
||||||
|
if(empty($message)) {
|
||||||
|
error('Message cannot be empty.');
|
||||||
|
}
|
||||||
|
else if(strlen($message) > 255) {
|
||||||
|
error('Message is too long. Maximum length allowed is 255 chars.');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$tmp = '';
|
||||||
|
if(fetchDatabaseConfig('site_closed', $tmp))
|
||||||
|
updateDatabaseConfig('site_closed', $_status);
|
||||||
|
else
|
||||||
|
registerDatabaseConfig('site_closed', $_status);
|
||||||
|
|
||||||
|
if(fetchDatabaseConfig('site_closed_message', $tmp))
|
||||||
|
updateDatabaseConfig('site_closed_message', $message);
|
||||||
|
else
|
||||||
|
registerDatabaseConfig('site_closed_message', $message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$is_closed = getDatabaseConfig('site_closed') == '1';
|
||||||
|
|
||||||
|
$closed_message = 'Server is under maintenance, please visit later.';
|
||||||
|
$tmp = '';
|
||||||
|
if(fetchDatabaseConfig('site_closed_message', $tmp))
|
||||||
|
$closed_message = $tmp;
|
||||||
|
?>
|
||||||
|
<form action="?p=dashboard&maintenance" method="post">
|
||||||
|
<table class="table">
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">Maintenance
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Site status:</td>
|
||||||
|
<td>
|
||||||
|
<select name="status">
|
||||||
|
<option value="0"<?php echo (!$is_closed ? ' selected' : ''); ?>>Open</option>
|
||||||
|
<option value="1"<?php echo ($is_closed ? ' selected' : ''); ?>>Closed</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Message: (only if closed)</td>
|
||||||
|
<td>
|
||||||
|
<textarea name="message" maxlength="255" cols="40" rows="5"><?php echo $closed_message; ?></textarea>
|
||||||
|
<td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<input type="submit" class="button" value="Update"/>
|
||||||
|
</td>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<br/>
|
||||||
<div>
|
<div>
|
||||||
<?php if($status['online']): ?>
|
<?php if($status['online']): ?>
|
||||||
<p class="success" style="width: 150px; text-align: center;">Status: Online<br/>
|
<p class="success" style="width: 150px; text-align: center;">Status: Online<br/>
|
||||||
@@ -39,26 +112,69 @@ $title = 'Dashboard';
|
|||||||
</div-->
|
</div-->
|
||||||
<?php if($status['online']): ?>
|
<?php if($status['online']): ?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var hidden = false;
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#status-more").hide();
|
$("#status-more").hide();
|
||||||
$("#more-button").text("More");
|
$("#more-button").text("More");
|
||||||
hidden = true;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#more-button").click(function() {
|
$("#more-button").click(function() {
|
||||||
if(hidden) {
|
if($("#status-more").is(":hidden")) {
|
||||||
$("#more-button").text("Hide");
|
$("#more-button").text("Hide");
|
||||||
$("#status-more").show();
|
$("#status-more").show();
|
||||||
hidden = false;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$("#more-button").text("More");
|
$("#more-button").text("More");
|
||||||
$("#status-more").hide();
|
$("#status-more").hide();
|
||||||
hidden = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php endif; ?>
|
<?php endif;
|
||||||
|
|
||||||
|
function clearCache()
|
||||||
|
{
|
||||||
|
global $cache, $template_name;
|
||||||
|
|
||||||
|
$tmp = '';
|
||||||
|
if($cache->fetch('status', $tmp))
|
||||||
|
$cache->delete('status');
|
||||||
|
|
||||||
|
if($cache->fetch('templates', $tmp))
|
||||||
|
$cache->delete('templates');
|
||||||
|
|
||||||
|
if($cache->fetch('config_lua', $tmp))
|
||||||
|
$cache->delete('config_lua');
|
||||||
|
|
||||||
|
if($cache->fetch('vocations', $tmp))
|
||||||
|
$cache->delete('vocations');
|
||||||
|
|
||||||
|
if($cache->fetch('towns', $tmp))
|
||||||
|
$cache->delete('towns');
|
||||||
|
|
||||||
|
if($cache->fetch('groups', $tmp))
|
||||||
|
$cache->delete('groups');
|
||||||
|
|
||||||
|
if($cache->fetch('visitors', $tmp))
|
||||||
|
$cache->delete('visitors');
|
||||||
|
|
||||||
|
if($cache->fetch('views_counter', $tmp))
|
||||||
|
$cache->delete('views_counter');
|
||||||
|
|
||||||
|
if($cache->fetch('failed_logins', $tmp))
|
||||||
|
$cache->delete('failed_logins');
|
||||||
|
|
||||||
|
if($cache->fetch('news' . $template_name . '_' . NEWS, $tmp))
|
||||||
|
$cache->delete('news' . $template_name . '_' . NEWS);
|
||||||
|
|
||||||
|
if($cache->fetch('news' . $template_name . '_' . TICKET, $tmp))
|
||||||
|
$cache->delete('news' . $template_name . '_' . TICKET);
|
||||||
|
|
||||||
|
if($cache->fetch('news' . $template_name . '_' . ARTICLE, $tmp))
|
||||||
|
$cache->delete('news' . $template_name . '_' . ARTICLE);
|
||||||
|
|
||||||
|
if($cache->fetch('template_ini' . $template_name, $tmp))
|
||||||
|
$cache->delete('template_ini' . $template_name);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
@@ -307,7 +307,7 @@ if(!isset($player) || !$player->isLoaded())
|
|||||||
|
|
||||||
$account = $player->getAccount();
|
$account = $player->getAccount();
|
||||||
?>
|
?>
|
||||||
<br/><br/>
|
<br/>
|
||||||
<form action="<?php echo $base . ((isset($id) && $id > 0) ? '&id=' . $id : ''); ?>" method="post">
|
<form action="<?php echo $base . ((isset($id) && $id > 0) ? '&id=' . $id : ''); ?>" method="post">
|
||||||
<table class="table" cellspacing="1" cellpadding="4">
|
<table class="table" cellspacing="1" cellpadding="4">
|
||||||
<tr><th colspan="2">Edit player</th></tr>
|
<tr><th colspan="2">Edit player</th></tr>
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -6,14 +6,13 @@
|
|||||||
* @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.1.3
|
* @version 0.2.4
|
||||||
* @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 = 'Characters';
|
$title = 'Characters';
|
||||||
|
|
||||||
require(SYSTEM . 'item.php');
|
require(SYSTEM . 'item.php');
|
||||||
|
|
||||||
$groups = new OTS_Groups_List();
|
$groups = new OTS_Groups_List();
|
||||||
function generate_search_table($script = false)
|
function generate_search_table($script = false)
|
||||||
{
|
{
|
||||||
@@ -59,7 +58,7 @@ function generate_player_lookup($player)
|
|||||||
if(!isset($player_eq[$i]) || $player_eq[$i] == 0)
|
if(!isset($player_eq[$i]) || $player_eq[$i] == 0)
|
||||||
$player_eq[$i] = $empty_slots[$i];
|
$player_eq[$i] = $empty_slots[$i];
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if(PHP_VERSION_ID == NULL || PHP_VERSION_ID < 70000) {
|
if(PHP_VERSION_ID == NULL || PHP_VERSION_ID < 70000) {
|
||||||
for($i = 1; $i < 11; $i++)
|
for($i = 1; $i < 11; $i++)
|
||||||
{
|
{
|
||||||
@@ -67,7 +66,7 @@ function generate_player_lookup($player)
|
|||||||
Items::generate($player_eq[$i]);
|
Items::generate($player_eq[$i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
for($i = 1; $i < 11; $i++)
|
for($i = 1; $i < 11; $i++)
|
||||||
{
|
{
|
||||||
if(check_number($player_eq[$i]))
|
if(check_number($player_eq[$i]))
|
||||||
@@ -77,11 +76,11 @@ function generate_player_lookup($player)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$skulls = array(
|
$skulls = array(
|
||||||
1 => 'skull_yellow',
|
1 => 'yellow_skull',
|
||||||
2 => 'skull_green',
|
2 => 'green_skull',
|
||||||
3 => 'skull_white',
|
3 => 'white_skull',
|
||||||
4 => 'skull_red',
|
4 => 'red_skull',
|
||||||
5 => 'skull_black'
|
5 => 'black_skull'
|
||||||
);
|
);
|
||||||
|
|
||||||
return '<table width="100" align="center" cellspacing="0" cellpadding="0" style="background: #808080; border:1px solid #808080;">
|
return '<table width="100" align="center" cellspacing="0" cellpadding="0" style="background: #808080; border:1px solid #808080;">
|
||||||
@@ -166,7 +165,7 @@ if($player->isLoaded() && !$player->isDeleted())
|
|||||||
<td>
|
<td>
|
||||||
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
||||||
<?php if($config['characters']['outfit']): ?>
|
<?php if($config['characters']['outfit']): ?>
|
||||||
<div style="width:64px;height:64px;border:2px solid #F1E0C6; border-radius:50px; padding:13px; margin-top:38px;margin-left:376px;position:absolute;"><img style="margin-left:<?php echo (in_array($player->getLookType(), array(75, 266, 302)) ? '-0px;margin-top:-0px;width:64px;height:64px;' : '-60px;margin-top:-60px;width:128px;height:128px;'); ?>" src="<?php echo $config['outfit_images_url'] . '?id=' . $player->getLookType() . '&addons=' . $player->getLookAddons() . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet() . '"';?>></div>
|
<div style="width:64px;height:64px;border:2px solid #F1E0C6; border-radius:50px; padding:13px; margin-top:38px;margin-left:376px;position:absolute;"><img style="margin-left:<?php echo (in_array($player->getLookType(), array(75, 266, 302)) ? '-0px;margin-top:-0px;width:64px;height:64px;' : '-60px;margin-top:-60px;width:128px;height:128px;'); ?>" src="<?php echo $config['outfit_images_url'] . '?id=' . $player->getLookType() . (fieldExist('lookaddons', 'players') ? '&addons=' . $player->getLookAddons() : '') . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet() . '"';?>></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<tr bgcolor="<?php echo $config['vdarkborder']; ?>">
|
<tr bgcolor="<?php echo $config['vdarkborder']; ?>">
|
||||||
<td colspan="2" class="white"><b>Character Information</b></td>
|
<td colspan="2" class="white"><b>Character Information</b></td>
|
||||||
@@ -263,7 +262,7 @@ if($player->isLoaded() && !$player->isDeleted())
|
|||||||
<TD>House:</TD>
|
<TD>House:</TD>
|
||||||
<TD>
|
<TD>
|
||||||
<TABLE BORDER=0><TR>
|
<TABLE BORDER=0><TR>
|
||||||
<TD>' . (isset($house['name']) ? $house['name'] : $house['id']) . (isset($house['town']) ? ' (' . $config['towns'][$house[$town_field]] . ')' : '') . $add . '</TD>
|
<TD>' . (isset($house['name']) ? $house['name'] : $house['id']) . (isset($house['town']) ? ' (' . $config['towns'][$house['town']] . ')' : '') . $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="'. (isset($house['name']) ? $house['name'] : $house['id']) . '">
|
<INPUT TYPE=hidden NAME=house VALUE="'. (isset($house['name']) ? $house['name'] : $house['id']) . '">
|
||||||
@@ -506,7 +505,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
|
|||||||
if($mostdmg)
|
if($mostdmg)
|
||||||
{
|
{
|
||||||
$mostdmg = ($death['mostdamage_is_player']) ? getPlayerLink($death['mostdamage_by']) : $death['mostdamage_by'];
|
$mostdmg = ($death['mostdamage_is_player']) ? getPlayerLink($death['mostdamage_by']) : $death['mostdamage_by'];
|
||||||
$dead_add_content .= '<br>and by ' . $mostdmg;
|
$dead_add_content .= ' and by ' . $mostdmg;
|
||||||
|
|
||||||
if ($death['mostdamage_unjustified']) {
|
if ($death['mostdamage_unjustified']) {
|
||||||
$dead_add_content .= " <font color='red' style='font-style: italic;'>(unjustified)</font>";
|
$dead_add_content .= " <font color='red' style='font-style: italic;'>(unjustified)</font>";
|
||||||
@@ -712,7 +711,7 @@ else
|
|||||||
foreach($query as $player) {
|
foreach($query as $player) {
|
||||||
if(isset($player['promotion'])) {
|
if(isset($player['promotion'])) {
|
||||||
if((int)$player['promotion'] > 0)
|
if((int)$player['promotion'] > 0)
|
||||||
$player['vocation'] + ($player['promotion'] * 4);
|
$player['vocation'] += ($player['promotion'] * $config['vocations_amount']);
|
||||||
}
|
}
|
||||||
echo '<li>' . getPlayerLink($player['name']) . ' (<small><strong>level ' . $player['level'] . ', ' . $config['vocations'][$player['vocation']] . '</strong></small>)</li>';
|
echo '<li>' . getPlayerLink($player['name']) . ' (<small><strong>level ' . $player['level'] . ', ' . $config['vocations'][$player['vocation']] . '</strong></small>)</li>';
|
||||||
}
|
}
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
@@ -202,9 +202,9 @@ If you haven\'t registered on ' . $config['lua']['serverName'] . ' please ignore
|
|||||||
Your account has been created.<br/><br/>
|
Your account has been created.<br/><br/>
|
||||||
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
||||||
<tr><td bgcolor="<?php echo $config['vdarkborder']; ?>" class="white"><b>Account Created</b></td></tr>
|
<tr><td bgcolor="<?php echo $config['vdarkborder']; ?>" class="white"><b>Account Created</b></td></tr>
|
||||||
<tr><td bgcolor="<?php echo $config['darkborder']; ?>'">
|
<tr><td bgcolor="<?php echo $config['darkborder']; ?>">
|
||||||
<table border="0" cellpadding="1"><tr><td>
|
<table border="0" cellpadding="1"><tr><td>
|
||||||
<br/>Your account<?php (USE_ACCOUNT_NAME ? 'name' : 'number'); ?> is <b><?php echo $tmp_account; ?></b>.
|
<br/>Your account<?php echo (USE_ACCOUNT_NAME ? 'name' : 'number'); ?> is <b><?php echo $tmp_account; ?></b>.
|
||||||
|
|
||||||
You will need the account <?php echo (USE_ACCOUNT_NAME ? 'name' : 'number'); ?> and your password to play on <?php echo $config['lua']['serverName']; ?>.
|
You will need the account <?php echo (USE_ACCOUNT_NAME ? 'name' : 'number'); ?> and your password to play on <?php echo $config['lua']['serverName']; ?>.
|
||||||
Please keep your account <?php echo (USE_ACCOUNT_NAME ? 'name' : 'number'); ?> and password in a safe place and
|
Please keep your account <?php echo (USE_ACCOUNT_NAME ? 'name' : 'number'); ?> and password in a safe place and
|
||||||
@@ -270,7 +270,7 @@ function checkAccount()
|
|||||||
|
|
||||||
if(document.getElementById("account_input").value == "")
|
if(document.getElementById("account_input").value == "")
|
||||||
{
|
{
|
||||||
document.getElementById("acc_check").innerHTML = '<b><font color="red">Please enter account<?php echo (USE_ACCOUNT_NAME ? ' name' : ''); ?>.</font></b>';
|
document.getElementById("acc_check").innerHTML = '<b><font color="red">Please enter account<?php echo (USE_ACCOUNT_NAME ? ' name' : 'number'); ?>.</font></b>';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
@@ -72,6 +72,10 @@ if(isset($_POST['reload_monsters']) && $canEdit)
|
|||||||
//add monsters
|
//add monsters
|
||||||
foreach($allmonsters as $lol) {
|
foreach($allmonsters as $lol) {
|
||||||
$monster = $allmonsters->current();
|
$monster = $allmonsters->current();
|
||||||
|
if(!$monster->loaded()) {
|
||||||
|
warning('Error while adding monster: ' . $allmonsters->currentFile());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
//load monster mana needed to summon/convince
|
//load monster mana needed to summon/convince
|
||||||
$mana = $monster->getManaCost();
|
$mana = $monster->getManaCost();
|
||||||
//load monster experience
|
//load monster experience
|
||||||
@@ -135,9 +139,15 @@ if(isset($_POST['reload_monsters']) && $canEdit)
|
|||||||
$flags['convinceable'] = '0';
|
$flags['convinceable'] = '0';
|
||||||
|
|
||||||
if(!in_array($name, $names_added)) {
|
if(!in_array($name, $names_added)) {
|
||||||
try { $db->query("INSERT INTO myaac_monsters (hide_creature, name, mana, exp, health, speed_lvl, use_haste, voices, immunities, summonable, convinceable, race, gfx_name, file_path) VALUES (0, '".$name."', '".$mana."', '".$exp."', '".$health."', '".$speed_lvl."', '".$use_haste."', '".$voices_string."', '".$immunities_string."', '".$flags['summonable']."', '".$flags['convinceable']."', '".$race."', '".$gfx_name."', '" . $allmonsters->currentFile() . "')"); } catch(PDOException $error) {}
|
try {
|
||||||
|
$db->query("INSERT INTO myaac_monsters (hide_creature, name, mana, exp, health, speed_lvl, use_haste, voices, immunities, summonable, convinceable, race, gfx_name, file_path) VALUES (0, ".$db->quote($name).", '".$mana."', '".$exp."', '".$health."', '".$speed_lvl."', '".$use_haste."', ".$db->quote($voices_string).", ".$db->quote($immunities_string).", '".$flags['summonable']."', '".$flags['convinceable']."', '".$race."', ".$db->quote($gfx_name).", " . $db->quote($allmonsters->currentFile()) . ")");
|
||||||
|
success("Added: ".$name."<br/>");
|
||||||
|
}
|
||||||
|
catch(PDOException $error) {
|
||||||
|
warning('Error while adding monster (' . $name . '): ' . $error->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
$names_added[] = $name;
|
$names_added[] = $name;
|
||||||
echo "Added: ".$name."<br/>";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
$title = 'Downloads';
|
$title = 'Downloads';
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
@@ -33,7 +33,7 @@ Remember you can also check the respective skill bar in your skill window of the
|
|||||||
<td><b>Experience</b></td>
|
<td><b>Experience</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
for($level = $i * 100 + 1; $level < $i * 100 + 101; $level++)
|
for($level = $i * $config['experiencetable_rows'] + 1; $level < $i * $config['experiencetable_rows'] + ($config['experiencetable_rows'] + 1); $level++)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<tr bgcolor="<?php echo $config['lightborder']; ?>">
|
<tr bgcolor="<?php echo $config['lightborder']; ?>">
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
@@ -17,6 +17,7 @@ if(tableExist('guild_members'))
|
|||||||
else
|
else
|
||||||
define('GUILD_MEMBERS_TABLE', 'guild_membership');
|
define('GUILD_MEMBERS_TABLE', 'guild_membership');
|
||||||
|
|
||||||
|
define('MOTD_EXISTS', fieldExist('motd', 'guilds'));
|
||||||
if($action == 'login')
|
if($action == 'login')
|
||||||
{
|
{
|
||||||
if(check_guild_name($_REQUEST['guild']))
|
if(check_guild_name($_REQUEST['guild']))
|
||||||
@@ -52,7 +53,9 @@ if($action == '')
|
|||||||
|
|
||||||
//echo 'Guilds needs to have atleast 4 members, otherwise it will be deleted automatically after 4 days.<BR/><BR/>Guild statistics are self-updated once per 3 days.<BR/><BR/>';
|
//echo 'Guilds needs to have atleast 4 members, otherwise it will be deleted automatically after 4 days.<BR/><BR/>Guild statistics are self-updated once per 3 days.<BR/><BR/>';
|
||||||
|
|
||||||
echo '<A HREF="?subtopic=guilds&preview=1">Normal preview</A> / <A HREF="?subtopic=guilds&preview=2">Advanced ranks & statistics</A><BR/><BR/><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
|
//echo '<A HREF="?subtopic=guilds&preview=1">Normal preview</A> / <A HREF="?subtopic=guilds&preview=2">Advanced ranks & statistics</A><BR/><BR/>
|
||||||
|
echo '
|
||||||
|
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
|
||||||
<TR BGCOLOR='.$config['vdarkborder'].'><TD COLSPAN='.($_REQUEST['preview'] == 2 ? '7' : '3').' class="white"><B>Active Guilds on '.$config['lua']['serverName'].'</B></TD></TR>
|
<TR BGCOLOR='.$config['vdarkborder'].'><TD COLSPAN='.($_REQUEST['preview'] == 2 ? '7' : '3').' class="white"><B>Active Guilds on '.$config['lua']['serverName'].'</B></TD></TR>
|
||||||
<TR BGCOLOR='.$config['darkborder'].' '.($_REQUEST['preview'] == 2 ? 'ALIGN="CENTER"' : '' ).'>';
|
<TR BGCOLOR='.$config['darkborder'].' '.($_REQUEST['preview'] == 2 ? 'ALIGN="CENTER"' : '' ).'>';
|
||||||
if($_REQUEST['preview'] == 2) {
|
if($_REQUEST['preview'] == 2) {
|
||||||
@@ -297,7 +300,7 @@ if($action == 'show')
|
|||||||
|
|
||||||
//$s_total_members++;
|
//$s_total_members++;
|
||||||
//$s_total_level += $player->getLevel();
|
//$s_total_level += $player->getLevel();
|
||||||
echo '<TR><TD><FORM ACTION="?subtopic=guilds&action=change_nick&name='.$player->getName().'" METHOD=post>' . getPlayerLink($player->getName());
|
echo '<TR><TD>' . getPlayerLink($player->getName()) . '<FORM ACTION="?subtopic=guilds&action=change_nick&name='.$player->getName().'" METHOD=post>';
|
||||||
$guild_nick = $player->getGuildNick();
|
$guild_nick = $player->getGuildNick();
|
||||||
if($logged)
|
if($logged)
|
||||||
{
|
{
|
||||||
@@ -316,8 +319,8 @@ if($action == 'show')
|
|||||||
if($level_in_guild > $rank->getLevel() || $guild_leader)
|
if($level_in_guild > $rank->getLevel() || $guild_leader)
|
||||||
if($guild_leader_char->getName() != $player->getName())
|
if($guild_leader_char->getName() != $player->getName())
|
||||||
echo ' <font size=1>{<a href="?subtopic=guilds&action=kickplayer&guild='.urlencode($guild->getName()).'&name='.urlencode($player->getName()).'">KICK</a>}</font>';
|
echo ' <font size=1>{<a href="?subtopic=guilds&action=kickplayer&guild='.urlencode($guild->getName()).'&name='.urlencode($player->getName()).'">KICK</a>}</font>';
|
||||||
if($player->isOnline())
|
//if($player->isOnline())
|
||||||
$s_members_online++;
|
// $s_members_online++;
|
||||||
echo '</FORM></TD><TD align="right" width="10%">'.$player->getLevel().'</TD><TD align="right" width="20%"><font color="'.($player->isOnline() ? 'green"><b>Online' : 'red"><b>Offline').'</b></font></TD></TR>';
|
echo '</FORM></TD><TD align="right" width="10%">'.$player->getLevel().'</TD><TD align="right" width="20%"><font color="'.($player->isOnline() ? 'green"><b>Online' : 'red"><b>Offline').'</b></font></TD></TR>';
|
||||||
}
|
}
|
||||||
echo '</TABLE></TD></TR>';
|
echo '</TABLE></TD></TR>';
|
||||||
@@ -800,7 +803,7 @@ $guild_errors[] = 'Player with name <b>'.$name.'</b> doesn\'t exist.';
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$rank_of_player = $player->getRank();
|
$rank_of_player = $player->getRank();
|
||||||
if($player_rank->isLoaded()) {
|
if($rank_of_player->isLoaded()) {
|
||||||
$guild_errors[] = 'Player with name <b>'.$name.'</b> is already in guild. He must leave guild before you can invite him.';
|
$guild_errors[] = 'Player with name <b>'.$name.'</b> is already in guild. He must leave guild before you can invite him.';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1301,7 +1304,7 @@ if(isset($todo) && $todo == 'save')
|
|||||||
$player->setRank($rank);
|
$player->setRank($rank);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['vdarkborder'].'><TD class="white"><B>Create guild</B></TD></TR><TR BGCOLOR='.$config['darkborder'].'><TD WIDTH=100%><b>Congratulations!</b><br/>You have created guild <b>'.$guild_name.'</b>. <b>'.$player->getName().'</b> is leader of this guild. Now you can invite players, change picture, description and motd of guild. Press submit to open guild manager.</TD></TR></TABLE><br/><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100%><FORM ACTION="?subtopic=guilds&action=show&guild='.$guild_name.'" METHOD=post><TR><TD><center><INPUT TYPE=image NAME="Submit" ALT="Submit" SRC="'.$template_path.'/images/buttons/sbutton_Submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></center></TD></TR></FORM></TABLE>';
|
echo '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['vdarkborder'].'><TD class="white"><B>Create guild</B></TD></TR><TR BGCOLOR='.$config['darkborder'].'><TD WIDTH=100%><b>Congratulations!</b><br/>You have created guild <b>'.$guild_name.'</b>. <b>'.$player->getName().'</b> is leader of this guild. Now you can invite players, change picture, description' . (MOTD_EXISTS ? ' and motd' : '') . ' of guild. Press submit to open guild manager.</TD></TR></TABLE><br/><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100%><FORM ACTION="?subtopic=guilds&action=show&guild='.$guild_name.'" METHOD=post><TR><TD><center><INPUT TYPE=image NAME="Submit" ALT="Submit" SRC="'.$template_path.'/images/buttons/sbutton_Submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></center></TD></TR></FORM></TABLE>';
|
||||||
/*$db->query('INSERT INTO `guild_ranks` (`id`, `guild_id`, `name`, `level`) VALUES (null, '.$new_guild->getId().', "the Leader", 3)');
|
/*$db->query('INSERT INTO `guild_ranks` (`id`, `guild_id`, `name`, `level`) VALUES (null, '.$new_guild->getId().', "the Leader", 3)');
|
||||||
$db->query('INSERT INTO `guild_ranks` (`id`, `guild_id`, `name`, `level`) VALUES (null, '.$new_guild->getId().', "a Vice-Leader", 2)');
|
$db->query('INSERT INTO `guild_ranks` (`id`, `guild_id`, `name`, `level`) VALUES (null, '.$new_guild->getId().', "a Vice-Leader", 2)');
|
||||||
$db->query('INSERT INTO `guild_ranks` (`id`, `guild_id`, `name`, `level`) VALUES (null, '.$new_guild->getId().', "a Member", 1)');*/
|
$db->query('INSERT INTO `guild_ranks` (`id`, `guild_id`, `name`, `level`) VALUES (null, '.$new_guild->getId().', "a Member", 1)');*/
|
||||||
@@ -1385,8 +1388,10 @@ echo '<br/><br/><table style=\'clear:both\' border=0 cellpadding=0 cellspacing=0
|
|||||||
<tr bgcolor='.$config['darkborder'].'><td width="170"><font color="red"><b>Option</b></font></td><td><font color="red"><b>Description</b></font></td></tr>
|
<tr bgcolor='.$config['darkborder'].'><td width="170"><font color="red"><b>Option</b></font></td><td><font color="red"><b>Description</b></font></td></tr>
|
||||||
<tr bgcolor='.$config['lightborder'].'><td width="170"><b><a href="?subtopic=guilds&guild='.$guild->getName().'&action=passleadership">Pass Leadership</a></b></td><td><b>Pass leadership of guild to other guild member.</b></td></tr>
|
<tr bgcolor='.$config['lightborder'].'><td width="170"><b><a href="?subtopic=guilds&guild='.$guild->getName().'&action=passleadership">Pass Leadership</a></b></td><td><b>Pass leadership of guild to other guild member.</b></td></tr>
|
||||||
<tr bgcolor='.$config['darkborder'].'><td width="170"><b><a href="?subtopic=guilds&guild='.$guild->getName().'&action=deleteguild">Delete Guild</a></b></td><td><b>Delete guild, kick all members.</b></td></tr>
|
<tr bgcolor='.$config['darkborder'].'><td width="170"><b><a href="?subtopic=guilds&guild='.$guild->getName().'&action=deleteguild">Delete Guild</a></b></td><td><b>Delete guild, kick all members.</b></td></tr>
|
||||||
<tr bgcolor='.$config['lightborder'].'><td width="170"><b><a href="?subtopic=guilds&guild='.$guild->getName().'&action=changedescription">Change Description</a></b></td><td><b>Change description of guild.</b></td></tr>
|
<tr bgcolor='.$config['lightborder'].'><td width="170"><b><a href="?subtopic=guilds&guild='.$guild->getName().'&action=changedescription">Change Description</a></b></td><td><b>Change description of guild.</b></td></tr>';
|
||||||
<tr bgcolor='.$config['darkborder'].'><td width="170"><b><a href="?subtopic=guilds&guild='.$guild->getName().'&action=changemotd">Change MOTD</a></b></td><td><b>Change MOTD of guild.</b></td></tr>
|
if(MOTD_EXISTS)
|
||||||
|
echo '<tr bgcolor='.$config['darkborder'].'><td width="170"><b><a href="?subtopic=guilds&guild='.$guild->getName().'&action=changemotd">Change MOTD</a></b></td><td><b>Change MOTD of guild.</b></td></tr>';
|
||||||
|
echo '
|
||||||
<tr bgcolor='.$config['lightborder'].'><td width="170"><b><a href="?subtopic=guilds&guild='.$guild->getName().'&action=changelogo">Change guild logo</a></b></td><td><b>Upload new guild logo.</b></td></tr>
|
<tr bgcolor='.$config['lightborder'].'><td width="170"><b><a href="?subtopic=guilds&guild='.$guild->getName().'&action=changelogo">Change guild logo</a></b></td><td><b>Upload new guild logo.</b></td></tr>
|
||||||
</table>';
|
</table>';
|
||||||
echo '<br><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$template_path.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Add new rank</div> <span class="CaptionVerticalRight" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$template_path.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td width="120" valign="top">New rank name:</td><td> <form action="?subtopic=guilds&guild='.$guild->getName().'&action=addrank" method="POST"><input type="text" name="rank_name" size="20"><input type="submit" value="Add"></form></td></tr> </table> </div> </table></div></td></tr>';
|
echo '<br><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$template_path.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Add new rank</div> <span class="CaptionVerticalRight" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$template_path.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td width="120" valign="top">New rank name:</td><td> <form action="?subtopic=guilds&guild='.$guild->getName().'&action=addrank" method="POST"><input type="text" name="rank_name" size="20"><input type="submit" value="Add"></form></td></tr> </table> </div> </table></div></td></tr>';
|
||||||
@@ -1414,8 +1419,10 @@ echo '<h3>Ranks info:</h3><b>0. Owner of guild</b> - it\'s highest rank, only on
|
|||||||
<li>Invite/Cancel Invitation/Kick Player from guild
|
<li>Invite/Cancel Invitation/Kick Player from guild
|
||||||
<li>Change ranks of all players in guild
|
<li>Change ranks of all players in guild
|
||||||
<li>Delete guild or pass leadership to other guild member
|
<li>Delete guild or pass leadership to other guild member
|
||||||
<li>Change names, levels(leader,vice,member), add and delete ranks
|
<li>Change names, levels(leader,vice,member), add and delete ranks';
|
||||||
<li>Change MOTD, logo and description of guild<hr>
|
if(MOTD_EXISTS)
|
||||||
|
echo '<li>Change MOTD, logo and description of guild<hr>';
|
||||||
|
echo '
|
||||||
<b>3. Leader</b> - it\'s second rank in guild. Player with this rank can:
|
<b>3. Leader</b> - it\'s second rank in guild. Player with this rank can:
|
||||||
<li>Invite/Cancel Invitation/Kick Player from guild (only with lower rank than his)
|
<li>Invite/Cancel Invitation/Kick Player from guild (only with lower rank than his)
|
||||||
<li>Change ranks of players with lower rank level ("vice leader", "member") in guild<hr>
|
<li>Change ranks of players with lower rank level ("vice leader", "member") in guild<hr>
|
||||||
@@ -2060,7 +2067,7 @@ echo '<br/><center><form action="?subtopic=guilds" METHOD=post><div class="BigBu
|
|||||||
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
|
||||||
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
|
||||||
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
|
||||||
if($action == 'changemotd') {
|
if($action == 'changemotd' && MOTD_EXISTS) {
|
||||||
$guild_name = $_REQUEST['guild'];
|
$guild_name = $_REQUEST['guild'];
|
||||||
if(!check_guild_name($guild_name)) {
|
if(!check_guild_name($guild_name)) {
|
||||||
$guild_errors[] = 'Invalid guild name format.';
|
$guild_errors[] = 'Invalid guild name format.';
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
@@ -99,9 +99,15 @@ $deleted = 'deleted';
|
|||||||
if(fieldExist('deletion', 'players'))
|
if(fieldExist('deletion', 'players'))
|
||||||
$deleted = 'deletion';
|
$deleted = 'deletion';
|
||||||
|
|
||||||
|
$outfit_addons = false;
|
||||||
$outfit = '';
|
$outfit = '';
|
||||||
if($config['highscores_outfit'])
|
if($config['highscores_outfit']) {
|
||||||
$outfit = ', lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons';
|
$outfit = ', lookbody, lookfeet, lookhead, looklegs, looktype';
|
||||||
|
if(fieldExist('lookaddons', 'players')) {
|
||||||
|
$outfit .= ', lookaddons';
|
||||||
|
$outfit_addons = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$offset = $_page * 100;
|
$offset = $_page * 100;
|
||||||
if($skill <= POT::SKILL_LAST) { // skills
|
if($skill <= POT::SKILL_LAST) { // skills
|
||||||
@@ -193,7 +199,7 @@ echo '
|
|||||||
echo '
|
echo '
|
||||||
<td>' . ($offset + $i) . '.</td>';
|
<td>' . ($offset + $i) . '.</td>';
|
||||||
if($config['highscores_outfit'])
|
if($config['highscores_outfit'])
|
||||||
echo '<td><img style="position:absolute;margin-top:-45px;margin-left:-25px;" src="' . $config['outfit_images_url'] . '?id=' . $player['looktype'] . '&addons=' . $player['lookaddons'] . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] . '" alt="" /></td>';
|
echo '<td><img style="position:absolute;margin-top:' . (in_array($player['looktype'], array(75, 266, 302)) ? '-15px;margin-left:5px' : '-45px;margin-left:-25px') . ';" src="' . $config['outfit_images_url'] . '?id=' . $player['looktype'] . ($outfit_addons ? '&addons=' . $player['lookaddons'] : '') . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] . '" alt="" /></td>';
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<td>
|
<td>
|
||||||
@@ -203,7 +209,7 @@ echo '
|
|||||||
if($config['highscores_vocation']) {
|
if($config['highscores_vocation']) {
|
||||||
if(isset($player['promotion'])) {
|
if(isset($player['promotion'])) {
|
||||||
if((int)$player['promotion'] > 0)
|
if((int)$player['promotion'] > 0)
|
||||||
$player['vocation'] + ($player['promotion'] * 4);
|
$player['vocation'] += ($player['promotion'] * $config['vocations_amount']);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<br/><small>' . $config['vocations'][$player['vocation']] . '</small>';
|
echo '<br/><small>' . $config['vocations'][$player['vocation']] . '</small>';
|
||||||
@@ -215,7 +221,7 @@ echo '
|
|||||||
</td>';
|
</td>';
|
||||||
|
|
||||||
if($skill == POT::SKILL__LEVEL)
|
if($skill == POT::SKILL__LEVEL)
|
||||||
echo '<td><center>' . $player['experience'] . '</center></td>';
|
echo '<td><center>' . number_format($player['experience']) . '</center></td>';
|
||||||
|
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
}
|
}
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
@@ -68,15 +68,18 @@ $type = '';
|
|||||||
$houseOwner = $house['owner'];
|
$houseOwner = $house['owner'];
|
||||||
if($houseOwner > 0)
|
if($houseOwner > 0)
|
||||||
{
|
{
|
||||||
|
$guild = NULL;
|
||||||
echo '<br/><br/>The house has been rented by ';
|
echo '<br/><br/>The house has been rented by ';
|
||||||
if($house['guild'] == 1)
|
if(isset($house['guild']) && $house['guild'] == 1)
|
||||||
{
|
{
|
||||||
$guild = new OTS_Guild();
|
$guild = new OTS_Guild();
|
||||||
$guild->load($houseOwner);
|
$guild->load($houseOwner);
|
||||||
echo getGuildLink($guild->getName());
|
echo getGuildLink($guild->getName());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
echo getCreatureName($houseOwner) . '.';
|
echo getCreatureName($houseOwner);
|
||||||
|
|
||||||
|
echo '.';
|
||||||
|
|
||||||
if($rent != 'never' && $house['paid'] > 0)
|
if($rent != 'never' && $house['paid'] > 0)
|
||||||
{
|
{
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
@@ -26,6 +26,6 @@ There are no movies added yet.
|
|||||||
<?php foreach($movies as $movie): ?>
|
<?php foreach($movies as $movie): ?>
|
||||||
<?php echo $movie['title']; ?><br/>
|
<?php echo $movie['title']; ?><br/>
|
||||||
Author: <?php echo $movie['author']; ?><br/>
|
Author: <?php echo $movie['author']; ?><br/>
|
||||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/<?php echo $movie['youtube_id']; ?>" frameborder="0" allowfullscreen></iframe><br/><br/>';
|
<iframe width="560" height="315" src="https://www.youtube.com/embed/<?php echo $movie['youtube_id']; ?>" frameborder="0" allowfullscreen></iframe><br/><br/>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</center>
|
</center>
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
@@ -94,10 +94,6 @@ $title = 'Latest News';
|
|||||||
|
|
||||||
$news_cached = false;
|
$news_cached = false;
|
||||||
// some constants, used mainly by database (cannot by modified without schema changes)
|
// some constants, used mainly by database (cannot by modified without schema changes)
|
||||||
define('NEWS', 1);
|
|
||||||
define('TICKET', 2);
|
|
||||||
define('ARTICLE', 3);
|
|
||||||
|
|
||||||
define('TITLE_LIMIT', 100);
|
define('TITLE_LIMIT', 100);
|
||||||
define('BODY_LIMIT', 65535); // maximum news body length
|
define('BODY_LIMIT', 65535); // maximum news body length
|
||||||
|
|
||||||
@@ -375,7 +371,9 @@ if(!$news_cached)
|
|||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php
|
||||||
|
if($action == ''):
|
||||||
|
?>
|
||||||
<tr bgcolor="<?php echo getStyle($rows++); ?>">
|
<tr bgcolor="<?php echo getStyle($rows++); ?>">
|
||||||
<td><b>Create forum thread in section:</b></td>
|
<td><b>Create forum thread in section:</b></td>
|
||||||
<td>
|
<td>
|
||||||
@@ -388,7 +386,9 @@ if(!$news_cached)
|
|||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
<tr bgcolor="<?php echo getStyle($rows++); ?>">
|
<tr bgcolor="<?php echo getStyle($rows++); ?>">
|
||||||
<td align="right">
|
<td align="right">
|
||||||
<input type="submit" value="Submit"/>
|
<input type="submit" value="Submit"/>
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
$_GET['archive'] = true;
|
$_GET['archive'] = true;
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
@@ -41,12 +41,23 @@ $skull_time = 'skulltime';
|
|||||||
if(fieldExist('skull_time', 'players')) {
|
if(fieldExist('skull_time', 'players')) {
|
||||||
$skull_time = 'skull_time';
|
$skull_time = 'skull_time';
|
||||||
}
|
}
|
||||||
|
|
||||||
$outfit = '';
|
|
||||||
if($config['online_outfit'])
|
|
||||||
$outfit = ', lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons';
|
|
||||||
|
|
||||||
$vocs = array(0, 0, 0, 0, 0);
|
$outfit_addons = false;
|
||||||
|
$outfit = '';
|
||||||
|
if($config['online_outfit']) {
|
||||||
|
$outfit = ', lookbody, lookfeet, lookhead, looklegs, looktype';
|
||||||
|
if(fieldExist('lookaddons', 'players')) {
|
||||||
|
$outfit .= ', lookaddons';
|
||||||
|
$outfit_addons = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($config['online_vocations']) {
|
||||||
|
$vocs = array();
|
||||||
|
foreach($config['vocations'] as $id => $name)
|
||||||
|
$vocs[$id] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if(tableExist('players_online')) // tfs 1.0
|
if(tableExist('players_online')) // tfs 1.0
|
||||||
$playersOnline = $db->query('SELECT `accounts`.`country`, `players`.`name`, `level`, `vocation`' . $outfit . ', `' . $skull_time . '` as `skulltime`, `' . $skull_type . '` as `skull` FROM `accounts`, `players`, `players_online` WHERE `players`.`id` = `players_online`.`player_id` AND `accounts`.`id` = `players`.`account_id` ORDER BY ' . $order);
|
$playersOnline = $db->query('SELECT `accounts`.`country`, `players`.`name`, `level`, `vocation`' . $outfit . ', `' . $skull_time . '` as `skulltime`, `' . $skull_type . '` as `skull` FROM `accounts`, `players`, `players_online` WHERE `players`.`id` = `players_online`.`player_id` AND `accounts`.`id` = `players`.`account_id` ORDER BY ' . $order);
|
||||||
else
|
else
|
||||||
@@ -60,31 +71,32 @@ foreach($playersOnline as $player)
|
|||||||
if($config['online_skulls'])
|
if($config['online_skulls'])
|
||||||
{
|
{
|
||||||
if($player['skulltime'] > 0 && $player['skull'] == 3)
|
if($player['skulltime'] > 0 && $player['skull'] == 3)
|
||||||
$skull = ' <img style="border: 0;" src="images/whiteskull.gif"/>';
|
$skull = ' <img style="border: 0;" src="images/white_skull.gif"/>';
|
||||||
elseif($player['skulltime'] > 0 && $player['skull'] == 4)
|
elseif($player['skulltime'] > 0 && $player['skull'] == 4)
|
||||||
$skull = ' <img style="border: 0;" src="images/redskull.gif"/>';
|
$skull = ' <img style="border: 0;" src="images/red_skull.gif"/>';
|
||||||
elseif($player['skulltime'] > 0 && $player['skull'] == 5)
|
elseif($player['skulltime'] > 0 && $player['skull'] == 5)
|
||||||
$skull = ' <img style="border: 0;" src="images/blackskull.gif"/>';
|
$skull = ' <img style="border: 0;" src="images/black_skull.gif"/>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($player['promotion'])) {
|
if(isset($player['promotion'])) {
|
||||||
if((int)$player['promotion'] > 0)
|
if((int)$player['promotion'] > 0)
|
||||||
$player['vocation'] + ($player['promotion'] * 4);
|
$player['vocation'] += ($player['promotion'] * $config['vocations_amount']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$data .= '<tr bgcolor="' . getStyle(++$players) . '">';
|
$data .= '<tr bgcolor="' . getStyle(++$players) . '">';
|
||||||
if($config['account_country'])
|
if($config['account_country'])
|
||||||
$data .= '<td>' . getFlagImage($player['country']) . '</td>';
|
$data .= '<td>' . getFlagImage($player['country']) . '</td>';
|
||||||
|
|
||||||
if($config['online_outfit'])
|
if($config['online_outfit'])
|
||||||
$data .= '<TD WIDTH=5%><img style="position:absolute;margin-top:' . (in_array($player['looktype'], array(75, 266, 302)) ? '-20px;margin-left:-0px;' : '-45px;margin-left:-25px;') . '" src="' . $config['outfit_images_url'] . '?id=' . $player['looktype'] . '&addons=' . $player['lookaddons'] . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] . '" alt="" /></td>';
|
$data .= '<TD WIDTH=5%><img style="position:absolute;margin-top:' . (in_array($player['looktype'], array(75, 266, 302)) ? '-20px;margin-left:-0px;' : '-45px;margin-left:-25px;') . '" src="' . $config['outfit_images_url'] . '?id=' . $player['looktype'] . ($outfit_addons ? '&addons=' . $player['lookaddons'] : '') . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] . '" alt="" /></td>';
|
||||||
|
|
||||||
$data .= '<td>' . getPlayerLink($player['name']) . $skull . '</td>
|
$data .= '<td>' . getPlayerLink($player['name']) . $skull . '</td>
|
||||||
<td>'.$player['level'].'</td>
|
<td>'.$player['level'].'</td>
|
||||||
<td>'.$config['vocations'][$player['vocation']].'</td>
|
<td>'.$config['vocations'][$player['vocation']].'</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
|
|
||||||
$vocs[$player['vocation']]++;
|
if($config['online_vocations'])
|
||||||
|
$vocs[($player['vocation'] > $config['vocations_amount'] ? $player['vocation'] - $config['vocations_amount'] : $player['vocation'])]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$players): ?>
|
if(!$players): ?>
|
||||||
@@ -129,6 +141,8 @@ if(!$players): ?>
|
|||||||
else if(tableExist('server_config')) { // tfs 1.0
|
else if(tableExist('server_config')) { // tfs 1.0
|
||||||
$query = $db->query('SELECT `value` as `record` FROM `server_config` WHERE `config` = ' . $db->quote('players_record'));
|
$query = $db->query('SELECT `value` as `record` FROM `server_config` WHERE `config` = ' . $db->quote('players_record'));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
$query = NULL;
|
||||||
|
|
||||||
if(isset($query) && $query->rowCount() > 0)
|
if(isset($query) && $query->rowCount() > 0)
|
||||||
{
|
{
|
||||||
@@ -174,7 +188,7 @@ if($config['online_vocations']): ?>
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
for($i = 1; $i < 5; $i++)
|
for($i = 1; $i <= $config['vocations_amount']; $i++)
|
||||||
echo '<tr bgcolor="' . getStyle($i) . '">
|
echo '<tr bgcolor="' . getStyle($i) . '">
|
||||||
<td width="25%">' . $config['vocations'][$i] . '</td>
|
<td width="25%">' . $config['vocations'][$i] . '</td>
|
||||||
<td width="75%">' . $vocs[$i] . '</td>
|
<td width="75%">' . $vocs[$i] . '</td>
|
||||||
@@ -189,9 +203,9 @@ if($config['online_skulls']): ?>
|
|||||||
<table width="100%" cellspacing="1">
|
<table width="100%" cellspacing="1">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="background: <?php echo $config['darkborder']; ?>;" align="center">
|
<td style="background: <?php echo $config['darkborder']; ?>;" align="center">
|
||||||
<img src="images/whiteskull.gif"/> - 1 - 6 Frags<br/>
|
<img src="images/white_skull.gif"/> - 1 - 6 Frags<br/>
|
||||||
<img src="images/redskull.gif"/> - 6+ Frags or Red Skull<br/>
|
<img src="images/red_skull.gif"/> - 6+ Frags or Red Skull<br/>
|
||||||
<img src="images/blackskull.gif"/> - 10+ Frags or Black Skull
|
<img src="images/black_skull.gif"/> - 10+ Frags or Black Skull
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Averatec <pervera.pl & otland.net>
|
* @author Averatec <pervera.pl & otland.net>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
@@ -60,6 +60,8 @@ if(isset($config['lua']['experience_stages']))
|
|||||||
echo '<li>Houses with inactive owners are cleaned after 30 days.</li>';
|
echo '<li>Houses with inactive owners are cleaned after 30 days.</li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isset($config['lua']['rate_exp']))
|
||||||
|
$config['lua']['rateExp'] = $config['lua']['rate_exp'];
|
||||||
if(isset($config['lua']['rate_mag']))
|
if(isset($config['lua']['rate_mag']))
|
||||||
$config['lua']['rateMagic'] = $config['lua']['rate_mag'];
|
$config['lua']['rateMagic'] = $config['lua']['rate_mag'];
|
||||||
if(isset($config['lua']['rate_skill']))
|
if(isset($config['lua']['rate_skill']))
|
||||||
@@ -72,7 +74,10 @@ if(isset($config['lua']['experience_stages']))
|
|||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<h2>Rates</h2>
|
<h2>Rates</h2>
|
||||||
<?php if(isset($config['lua']['rateMagic'])): ?>
|
<?php if(isset($config['lua']['rateExp'])): ?>
|
||||||
|
<li>Exp Rate: <b>x<?php echo $config['lua']['rateExp']; ?></b></li>
|
||||||
|
<?php endif;
|
||||||
|
if(isset($config['lua']['rateMagic'])): ?>
|
||||||
<li>Magic Level: <b>x<?php echo $config['lua']['rateMagic']; ?></b></li>
|
<li>Magic Level: <b>x<?php echo $config['lua']['rateMagic']; ?></b></li>
|
||||||
<?php endif;
|
<?php endif;
|
||||||
if(isset($config['lua']['rateSkill'])): ?>
|
if(isset($config['lua']['rateSkill'])): ?>
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
@@ -68,8 +68,13 @@ if(isset($_POST['reload_spells']) && $canEdit)
|
|||||||
}
|
}
|
||||||
$type = 2;
|
$type = 2;
|
||||||
$count = $spell->getConjureCount();
|
$count = $spell->getConjureCount();
|
||||||
try { $db->query("INSERT INTO myaac_spells (spell, name, words, type, mana, level, maglevel, soul, premium, vocations, conjure_count, hidden) VALUES ('".$spell_txt."', '".$name."', '".$spell_txt."', '".$type."', '".$mana."', '".$lvl."', '".$mlvl."', '".$soul."', '".$pacc."', '".$vocations_to_db."', '".$count."', '".$hide_spell."')"); } catch(PDOException $error) {}
|
try {
|
||||||
echo "Added: ".$name."<br>";
|
$db->query("INSERT INTO myaac_spells (spell, name, words, type, mana, level, maglevel, soul, premium, vocations, conjure_count, hidden) VALUES ('".$spell_txt."', '".$name."', '".$spell_txt."', '".$type."', '".$mana."', '".$lvl."', '".$mlvl."', '".$soul."', '".$pacc."', '".$vocations_to_db."', '".$count."', '".$hide_spell."')");
|
||||||
|
success("Added: ".$name."<br>");
|
||||||
|
}
|
||||||
|
catch(PDOException $error) {
|
||||||
|
warning('Error while adding spell (' . $name . '): ' . $error->getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//add instant spells
|
//add instant spells
|
||||||
@@ -118,8 +123,13 @@ if(isset($_POST['reload_spells']) && $canEdit)
|
|||||||
}
|
}
|
||||||
$type = 1;
|
$type = 1;
|
||||||
$count = 0;
|
$count = 0;
|
||||||
try { $db->query("INSERT INTO myaac_spells (spell, name, words, type, mana, level, maglevel, soul, premium, vocations, conjure_count, hidden) VALUES ('".$spell_txt."', '".$name."', '".$spell_txt."', '".$type."', '".$mana."', '".$lvl."', '".$mlvl."', '".$soul."', '".$pacc."', '".$vocations_to_db."', '".$count."', '".$hide_spell."')"); } catch(PDOException $error) {}
|
try {
|
||||||
echo "Added: ".$name."<br/>";
|
$db->query("INSERT INTO myaac_spells (spell, name, words, type, mana, level, maglevel, soul, premium, vocations, conjure_count, hidden) VALUES (".$db->quote($spell_txt).", ".$db->quote($name).", ".$db->quote($spell_txt).", '".$type."', '".$mana."', '".$lvl."', '".$mlvl."', '".$soul."', '".$pacc."', '".$vocations_to_db."', '".$count."', '".$hide_spell."')");
|
||||||
|
success("Added: ".$name."<br/>");
|
||||||
|
}
|
||||||
|
catch(PDOException $error) {
|
||||||
|
warning('Error while adding spell (' . $name . '): ' . $error->getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @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!');
|
||||||
|
@@ -173,6 +173,7 @@ defined('MYAAC') or die('Direct access not allowed!');
|
|||||||
</table>
|
</table>
|
||||||
<hr noshade="noshade" size="1" />
|
<hr noshade="noshade" size="1" />
|
||||||
<div class="Content"><div id="ContentHelper">
|
<div class="Content"><div id="ContentHelper">
|
||||||
|
<?php echo template_place_holder('center_top'); ?>
|
||||||
<?php echo $content; ?>
|
<?php echo $content; ?>
|
||||||
</div></div>
|
</div></div>
|
||||||
</div>
|
</div>
|
||||||
|
Before Width: | Height: | Size: 545 B |
@@ -681,17 +681,9 @@ echo "</div>";
|
|||||||
<div class="Border_1" style="background-image:url(<?php echo $template_path; ?>/images/content/border-1.gif);"></div>
|
<div class="Border_1" style="background-image:url(<?php echo $template_path; ?>/images/content/border-1.gif);"></div>
|
||||||
<div class="BorderTitleText" style="background-image:url(<?php echo $template_path; ?>/images/content/title-background-green.gif);"></div>
|
<div class="BorderTitleText" style="background-image:url(<?php echo $template_path; ?>/images/content/title-background-green.gif);"></div>
|
||||||
<?php
|
<?php
|
||||||
/*
|
$headline = $template_path.'/images/header/headline-' . PAGE . '.gif';
|
||||||
<img class="Title" src="<?php echo $template_path; ?>/headline.php?p=<?php if(isset($_404)) echo '404'; else echo PAGE; ?>" alt="Contentbox headline" />
|
|
||||||
*/
|
|
||||||
if($config['site_closed'])
|
|
||||||
$tmp_page = $config['site_closed_title'];
|
|
||||||
else
|
|
||||||
$tmp_page = (isset($_404) ? '404' : PAGE);
|
|
||||||
|
|
||||||
$headline = $template_path.'/images/header/headline-' . $tmp_page . '.gif';
|
|
||||||
if(!file_exists($headline))
|
if(!file_exists($headline))
|
||||||
$headline = $template_path . '/headline.php?t=' . ucfirst($tmp_page);
|
$headline = $template_path . '/headline.php?t=' . ucfirst($title);
|
||||||
?>
|
?>
|
||||||
<img class="Title" src="<?php echo $headline; ?>" alt="Contentbox headline" />
|
<img class="Title" src="<?php echo $headline; ?>" alt="Contentbox headline" />
|
||||||
<div class="Border_2">
|
<div class="Border_2">
|
||||||
|
@@ -67,7 +67,7 @@
|
|||||||
|
|
||||||
// vocation
|
// vocation
|
||||||
imagettftext($img, $fontsize, 0, 15, 62, $text, $font, 'Vocation');
|
imagettftext($img, $fontsize, 0, 15, 62, $text, $font, 'Vocation');
|
||||||
imagettftext($img, $fontsize, 0, 100, 62, $text, $font, $config['vocations'][$player->getPromotion()][$player->getVocation()]);
|
imagettftext($img, $fontsize, 0, 100, 62, $text, $font, $config['vocations'][$player->getVocation()]);
|
||||||
|
|
||||||
// hit points, Mana, Soul Points, Capacity
|
// hit points, Mana, Soul Points, Capacity
|
||||||
$health = $player->getHealth();
|
$health = $player->getHealth();
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
|
|
||||||
// premium status
|
// premium status
|
||||||
$account = $player->getAccount();
|
$account = $player->getAccount();
|
||||||
imagettftext($img, $fontsize, 0, 15, 140, $text, $font, $account->getCustomField('premdays') == 0 ? 'Free Account' : 'Premium Account');
|
imagettftext($img, $fontsize, 0, 15, 140, $text, $font, $account->getPremDays() > 0 ? 'Premium Account': 'Free Account');
|
||||||
|
|
||||||
imagefilledrectangle($img, 225, 40, 225, 130, $title); //seperator
|
imagefilledrectangle($img, 225, 40, 225, 130, $title); //seperator
|
||||||
$posy = 50;
|
$posy = 50;
|
||||||
|
@@ -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.1.3
|
* @version 0.2.4
|
||||||
* @link http://myaac.info
|
* @link http://myaac.info
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|