Compare commits

..

41 Commits

Author SHA1 Message Date
slawkens
8af9186098 Update CHANGELOG.md 2019-05-04 08:19:01 +02:00
slawkens
2d427601ee * release 0.7.11 2019-05-04 00:20:37 +02:00
slawkens
454d4b088d * Update CHANGELOG.md 2019-04-27 17:39:41 +02:00
slawkens
738bfbfa5c Fixed guilds "Add new rank function"
Exception thrown in OTS_GuildRank::__toString() method

https://otland.net/threads/myaac-bug-guild-new-rank.263953/

(cherry picked from commit 4d56650)
2019-04-09 00:50:56 +02:00
slawkens
03223c1c30 Fix something that Open Tibia developers don't think about 2018-11-07 21:15:47 +01:00
slawkens
3c6f44d6ee Fix database_name in Usage_Statistics 2018-10-31 07:46:35 +01:00
slawkens
dacc5b9dab Fix bug where server_config table does not exist (OTHire as an example)
Happened in Usage_Statistics class
Thanks for reporting the OtLand user - Olddies
2018-10-31 07:45:50 +01:00
slawkens
a4bccbaa34 * change config.lua.ownerEmail to config.mail_address 2018-10-22 09:27:46 +02:00
slawkens
174054237b * fixed the mystical defect where "Create Account" button was not highlighted (on the account/manage page) 2018-10-22 09:16:53 +02:00
slawkens
bcc81fa34f (Nothing important) just remove a minus in a word "re-install"
(cherry picked from commit a81824a)
2018-10-18 08:25:20 +02:00
slawkens
ba1c5e9b2e * add fatal error message when myaac tables in database do not exist 2018-10-18 08:22:37 +02:00
slawkens
0129c79580 * add an additional text to the install page informing that user can reinstall MyAAC by deleting config.local.php 2018-10-18 08:20:13 +02:00
slawkens
c863ad460a * fixed multiple mail recipients when using admin mailer function
It resulted in mail being sent to all users multiple times..
2018-06-08 21:08:31 +02:00
slawkens
cb08e53103 * fix XSS in forum show_thread 2018-06-01 20:27:34 +02:00
slawkens
d5cc2a1090 * Fixed missing prefix for cache get() and delete() functions
Cause those functions to not work correctly..

(cherry picked from commit b3625df)
2018-06-01 15:06:30 +02:00
slawkens
6ba8d2c9cb * forgot to open <head> in install template
(cherry picked from commit 050f596)
2018-05-29 20:33:15 +02:00
slawkens
668e4688c4 * remove whitespaces (IDE formatting) 2018-05-29 20:18:19 +02:00
slawkens
bd19b8665a * do not display software version 2018-05-29 20:17:39 +02:00
slawkens
c5980f2350 * add .gitattributes
(cherry picked from commit 15da31d)
2018-05-29 20:05:21 +02:00
slawkens1
6c03984f53 * support for some old servers, where arrays are used in config.lua 2018-04-16 20:52:50 +02:00
slawkens1
ecd865f275 * fix #47 2018-03-24 01:25:24 +01:00
Sławek
5f1392e9f4 Updated CHANGELOG.md (format) 2018-03-03 11:35:34 +01:00
slawkens1
d6c10d277d * add .md extension to CHANGELOG 2018-03-03 11:31:51 +01:00
slawkens1
815b1f9b5b * update to 0.7.10 2018-03-03 11:31:01 +01:00
slawkens1
66568fbaf1 * fixed saving long ip addresses (unsigned) 2018-02-06 03:55:34 +01:00
slawkens1
18b6404e75 * added robots.txt 2018-02-05 21:32:53 +01:00
slawkens1
17b1f9a391 * fixed default accounts.vote value 2018-02-05 08:21:24 +01:00
Sławek
14137221fd * minimum PHP is now 5.3.3
* added command to change permissions of system/cache directory
2018-02-05 00:01:11 +01:00
slawkens1
ed4a166d6c * fixed chrome bug on save ERR_BLOCKED_BY_XSS_AUDITOR 2018-02-04 23:39:56 +01:00
slawkens1
8df12e3d9c * fixed edit page with php enabled 2018-02-04 23:39:32 +01:00
slawkens1
e2a625efd2 * new configurable: smtp_secure
* as described in #43 by miqueiaspenha
2018-01-29 23:12:07 +01:00
Sławek
5b3237770b Merge pull request #44 from miqueiaspenha/patch-1
Update admin.dashboard.html.twig (GH-44)
2018-01-29 22:58:56 +01:00
slawkens1
4ffb6cf8eb * fixed #42
* changed mb_strtolower functions to strtolower() - was useless in this
case
* attemp to fix some bug with PHPMailer not finding its language file
* added .idea (phpstorm) to .gitignore
2018-01-26 08:09:55 +01:00
slawkens
2c12ef93aa * twig requires php 5.3.3 2018-01-23 10:51:19 +01:00
slawkens1
d17c18cabc * auto add z_polls table on install 2018-01-14 09:45:16 +01:00
slawkens1
eeb09ddce6 * forgot closing curly brace 2018-01-14 09:30:56 +01:00
slawkens1
28683d66ee * update from master branch
* update config.highscores_ids_hidden on install when there are samples
already in database
2018-01-14 09:29:41 +01:00
slawkens1
7d2e522d2b * fixed plugin "You don't have rights to delete" 2018-01-14 09:16:24 +01:00
slawkens1
3fc2bef7c9 * added some names links to the account.management page 2018-01-14 09:00:48 +01:00
slawkens1
fade78efc1 * fixed hooks return value
* (internal) added new function: $hooks->exist($type)
2018-01-14 09:00:39 +01:00
slawkens1
d04f2b7965 * update to 0.7.10-dev 2018-01-13 22:07:08 +01:00
38 changed files with 761 additions and 639 deletions

4
.gitattributes vendored Normal file
View File

@@ -0,0 +1,4 @@
* text=auto
.gitattributes export-ignore
.gitignore export-ignore
_config.yml export-ignore

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
Thumbs.db Thumbs.db
.DS_Store .DS_Store
.idea

View File

@@ -1,4 +1,48 @@
[0.7.9 - 13.01.2017] # Changelog
## [0.7.11 - 04.05.2019]
### Added:
* support for some old servers, where arrays are used in config.lua
* an additional text to the install page informing that user can reinstall MyAAC by deleting config.local.php
### Fixed:
* XSS in forum show_thread
* guilds - "Add new rank" function
* multiple mail recipients when using admin mailer function
* Admin Panel - MyAAC logs not shown if servers logs directory doesn't exist (#47)
* missing prefix for cache get() and delete() functions
* add fatal error message when myaac tables in database do not exist
* the mystical defect where "Create Account" button was not highlighted (on the account/manage page)
* bug where server_config table does not exist (OTHire as an example)
* database_name in Usage_Statistics
* forgot to open <head> in install template
### Changed:
* do not display software version
## [0.7.10 - 03.03.2018]
### Added:
* new configurable: smtp_secure
* robots.txt
### Fixed:
* editing an existing page that had php enabled
* chrome bug on save (when editing page) ERR_BLOCKED_BY_XSS_AUDITOR
* showing IP and Port in admin panel (#44, by miqueiaspenha)
* deleting plugin showing "You don't have rights to delete"
* some bug with PHPMailer not finding its language file
* default accounts.vote value
* saving some really high long ip addresses
### Changed:
* update config.highscores_ids_hidden on install when there are samples already in database
* auto add z_polls table on install
### Internal:
* changed mb_strtolower functions to strtolower()
* added new function: $hooks->exist($type)
## [0.7.9 - 13.01.2018]
* removed 6mb of trash (some useless things) * removed 6mb of trash (some useless things)
* (fix) TFS 1.x not showing promoted vocations in highscores * (fix) TFS 1.x not showing promoted vocations in highscores
* otserv 0.6.x: fixed some warning (on the characters page) and fatal mysql error (on the mango signature) * otserv 0.6.x: fixed some warning (on the characters page) and fatal mysql error (on the mango signature)
@@ -7,13 +51,13 @@
* changed highscores_groups_hidden to 3 (for TFS 1.x) * changed highscores_groups_hidden to 3 (for TFS 1.x)
* updated background-artwork (tibiacom template) to the latest version, removed other ones * updated background-artwork (tibiacom template) to the latest version, removed other ones
[0.7.8 - 12.01.2017] ## [0.7.8 - 12.01.2018]
* fixed installation error " call to undefined method OTS_DB_MySQL::hasColumn()" * fixed installation error " call to undefined method OTS_DB_MySQL::hasColumn()"
* updated tinymce to the latest (4.7.4) version * updated tinymce to the latest (4.7.4) version
* enabled emoticons plugin in tinymce :) * enabled emoticons plugin in tinymce :)
* some security fixes * some security fixes
[0.7.7 - 08.01.2018] ## [0.7.7 - 08.01.2018]
* important fix for servers with promotion column (caused player.vocation to be resetted when saving player, for example: on change name, accept invite to guild, leave guild) * important fix for servers with promotion column (caused player.vocation to be resetted when saving player, for example: on change name, accept invite to guild, leave guild)
* immediately reload config.lua when there's change in config.server_path detected * immediately reload config.lua when there's change in config.server_path detected
* added new forum option: "Enable HTML" (only for moderators) * added new forum option: "Enable HTML" (only for moderators)
@@ -32,14 +76,14 @@
* don't add extra <br/> to the TinyMCE news forum posts * don't add extra <br/> to the TinyMCE news forum posts
* (internal) using $player->getVocationName() where possible instead of older method * (internal) using $player->getVocationName() where possible instead of older method
[0.7.6 - 05.01.2017] ## [0.7.6 - 05.01.2017]
* fixed othire account creating/installation * fixed othire account creating/installation
* fixed table name players -> players_online * fixed table name players -> players_online
* fixed unexpected error logging about email fail * fixed unexpected error logging about email fail
* added max_execution_time to the install finish step * added max_execution_time to the install finish step
* some small fix regarding highscores vocation box * some small fix regarding highscores vocation box
[0.7.5 - 04.01.2017] ## [0.7.5 - 04.01.2017]
* fixed bug on othire with config.account_premium_days * fixed bug on othire with config.account_premium_days
* fixed bug on TFS 1.x when online_afk is enabled * fixed bug on TFS 1.x when online_afk is enabled
* warning about leaving news page with changes * warning about leaving news page with changes
@@ -52,7 +96,7 @@
* fixed template path finding * fixed template path finding
* fixed displaying article_text when it was empty saved * fixed displaying article_text when it was empty saved
[0.7.4 - 24.12.2017] ## [0.7.4 - 24.12.2017]
* fixed mysql fatal error on tibiacom template - top 5 box * fixed mysql fatal error on tibiacom template - top 5 box
* fixed displaying of level percent bar on tibian signature * fixed displaying of level percent bar on tibian signature
* inform user about Twig cache failure on installation, instead of http 500 error * inform user about Twig cache failure on installation, instead of http 500 error
@@ -60,7 +104,7 @@
* remember client version select and usage stats checkbox in session on install * remember client version select and usage stats checkbox in session on install
* automatically update highscores_ids_hidden for users who installed myaac before (migration) * automatically update highscores_ids_hidden for users who installed myaac before (migration)
[0.7.3 - 18.12.2017] ## [0.7.3 - 18.12.2017]
* auto generate myaac cache & session prefix on install to be unique across installations * auto generate myaac cache & session prefix on install to be unique across installations
* fixed hiding shop system menu on tibiacom template when disabled in config * fixed hiding shop system menu on tibiacom template when disabled in config
* prevent adding duplicated newses with installation * prevent adding duplicated newses with installation
@@ -75,7 +119,7 @@
* (internal) renamed installation step files to be in correct order * (internal) renamed installation step files to be in correct order
* added TODO file * added TODO file
[0.7.1 - 13.12.2017] ## [0.7.1 - 13.12.2017]
* added changelog menu item to kathrine template * added changelog menu item to kathrine template
* fixed some php short tag in changelogs page * fixed some php short tag in changelogs page
* fixed guild change description back button * fixed guild change description back button
@@ -83,7 +127,7 @@
* changed some notice when version check is failed * changed some notice when version check is failed
* (internal) moved changelog to twig * (internal) moved changelog to twig
[0.7.0 - 20.11.2017] ## [0.7.0 - 20.11.2017]
* moved template menus to database, they're now dynamically loaded * moved template menus to database, they're now dynamically loaded
* added anonymous usage statistics reporting (only if user agrees, first usage report will be send after 7 days) * added anonymous usage statistics reporting (only if user agrees, first usage report will be send after 7 days)
* you can edit them in Admin Panel under 'Menus' option * you can edit them in Admin Panel under 'Menus' option
@@ -120,24 +164,24 @@
* (internal) renamed constant TICKET -> TICKER * (internal) renamed constant TICKET -> TICKER
* (internal) shortened message functions * (internal) shortened message functions
[0.6.6 - 22.10.2017] ## [0.6.6 - 22.10.2017]
* fixed some php fatal error on spells page * fixed some php fatal error on spells page
* changed spells.vocations field in db size to 300 * changed spells.vocations field in db size to 300
* please reload your spells after this update! * please reload your spells after this update!
[0.6.5 - 21.10.2017] ## [0.6.5 - 21.10.2017]
* fixed displaying custom pages * fixed displaying custom pages
* fixed adding new group forum board * fixed adding new group forum board
[0.6.4 - 20.10.2017] ## [0.6.4 - 20.10.2017]
* reverted OTS_Account::getLastLogin() cause its used by tibia11-login plugin * reverted OTS_Account::getLastLogin() cause its used by tibia11-login plugin
[0.6.3 - 20.10.2017] ## [0.6.3 - 20.10.2017]
* fixed creating account * fixed creating account
* fixed viewing thread without being logged * fixed viewing thread without being logged
* fixed showing premium account status * fixed showing premium account status
[0.6.2 - 20.10.2017] ## [0.6.2 - 20.10.2017]
* added forums for guilds and groups * added forums for guilds and groups
* added nice looking menu for my account page in default template * added nice looking menu for my account page in default template
* new command line tool: install_plugin.php - can be used to install plugins from command line. Usage: "php install_plugin.php path_to_file" * new command line tool: install_plugin.php - can be used to install plugins from command line. Usage: "php install_plugin.php path_to_file"
@@ -170,7 +214,7 @@
* (internal) new function: OTS_Guild::hasMember(OTS_Player $player) * (internal) new function: OTS_Guild::hasMember(OTS_Player $player)
* (internal) new function: Forum::hasAccess($board_id) * (internal) new function: Forum::hasAccess($board_id)
[0.6.1 - 17.10.2017] ## [0.6.1 - 17.10.2017]
* fixed signatures loading * fixed signatures loading
* new configurable: session_prefix, to allow more websites on one machine (must be unique for every website on your dedicated server!) * new configurable: session_prefix, to allow more websites on one machine (must be unique for every website on your dedicated server!)
* better error handling for monsters and spells loader (save errors to system/logs/error.log) * better error handling for monsters and spells loader (save errors to system/logs/error.log)
@@ -180,7 +224,7 @@
* (internal) moved forum actions (pages) to forum/ directory * (internal) moved forum actions (pages) to forum/ directory
* (internal) moved forum.edit_post to twig templates * (internal) moved forum.edit_post to twig templates
[0.6.0 - 16.10.2017] ## [0.6.0 - 16.10.2017]
* added faq management - add/edit/move/hide/delete from website * added faq management - add/edit/move/hide/delete from website
* new account.login view for tibiacom template * new account.login view for tibiacom template
* monsters and spells are now being loaded at the installation of the AAC * monsters and spells are now being loaded at the installation of the AAC
@@ -203,7 +247,7 @@
* ajax requests returns now json instead of xml * ajax requests returns now json instead of xml
* added 404 response when file is not found * added 404 response when file is not found
[0.5.1 - 11.10.2017] ## [0.5.1 - 11.10.2017]
* fixed forum add/edit board * fixed forum add/edit board
* new configurable: highscores_length, how much highscores to display * new configurable: highscores_length, how much highscores to display
* fixed highscores links (ALL, previous and next page) * fixed highscores links (ALL, previous and next page)
@@ -213,7 +257,7 @@
* check if plugin exist before uninstalling * check if plugin exist before uninstalling
* fixed some warning in OTS_Base_DB * fixed some warning in OTS_Base_DB
[0.5.0 - 10.10.2017] ## [0.5.0 - 10.10.2017]
* moved .htaccess rules to plain php (index.php) * moved .htaccess rules to plain php (index.php)
* updated tinymce to the latest (4.7.0) version, you can now embed code, for example youtube videos * updated tinymce to the latest (4.7.0) version, you can now embed code, for example youtube videos
* added option to uninstall plugin * added option to uninstall plugin
@@ -232,7 +276,7 @@
* added new twig function getLink that convert link taking into account config.friendly_urls * added new twig function getLink that convert link taking into account config.friendly_urls
* internalLayoutLink -> getLink * internalLayoutLink -> getLink
[0.4.3 - 05.10.2017] ## [0.4.3 - 05.10.2017]
* better config loader taken from latest gesior, you can now include files in your config by doing dofile('config.local.lua') * better config loader taken from latest gesior, you can now include files in your config by doing dofile('config.local.lua')
* fixed country detection in create account * fixed country detection in create account
* fixed showing of character deaths and frags * fixed showing of character deaths and frags
@@ -246,14 +290,14 @@
* added bugtracker to kathrine template * added bugtracker to kathrine template
* added CREDITS file * added CREDITS file
[0.4.2 - 14.09.2017] ## [0.4.2 - 14.09.2017]
* updated version number * updated version number
[0.4.1 - 13.09.2017] ## [0.4.1 - 13.09.2017]
* fixed log in to admin panel * fixed log in to admin panel
* fixed File is not .zip plugin upload error * fixed File is not .zip plugin upload error
[0.4.0 - 13.09.2017 ## [0.4.0 - 13.09.2017
* added option to add/edit/delete/hide/move forum boards * added option to add/edit/delete/hide/move forum boards
* moved some of HTML-in-PHP code to Twig templates * moved some of HTML-in-PHP code to Twig templates
* added bug_report configurable which can enable/disable bug tracker * added bug_report configurable which can enable/disable bug tracker
@@ -270,7 +314,7 @@
* some small improvements * some small improvements
* fixed some separators in kathrine template * fixed some separators in kathrine template
[0.3.0 - 28.08.2017] ## [0.3.0 - 28.08.2017]
* added administration panel for screenshots management with auto thumbnail generator and image auto-resizing * added administration panel for screenshots management with auto thumbnail generator and image auto-resizing
* added Twig template engine and moved some html-in-php code to it * added Twig template engine and moved some html-in-php code to it
* automatically detect player country based on user location (IP) on create account * automatically detect player country based on user location (IP) on create account
@@ -288,7 +332,7 @@
* moved news adding at installation from schema.sql to finish.php * moved news adding at installation from schema.sql to finish.php
* some optimizations * some optimizations
[0.2.4 - 09.06.2017] ## [0.2.4 - 09.06.2017]
* fixed invite to guild * fixed invite to guild
* added id field on monsters, so you can delete them in phpmyadmin * added id field on monsters, so you can delete them in phpmyadmin
* fixed adding some creatures with ' and " * fixed adding some creatures with ' and "
@@ -297,7 +341,7 @@
* fixed typo loss_items => loss_containers * fixed typo loss_items => loss_containers
* more elegant way of showing message on reload creatures and spells * more elegant way of showing message on reload creatures and spells
[0.2.3 - 31.05.2017] ## [0.2.3 - 31.05.2017]
* fixed guild management on OTHire 0.0.3 * fixed guild management on OTHire 0.0.3
* set default skills to 10 when creating new character * set default skills to 10 when creating new character
* fixed displaying of "Create forum thread" in newses * fixed displaying of "Create forum thread" in newses
@@ -309,15 +353,15 @@
* fixed Undefined variable (https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2444034) * 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) * fixed Undefined offset (https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2444035)
[0.2.2 - 22.05.2017] ## [0.2.2 - 22.05.2017]
* added missing cache/signature directory * added missing cache/signature directory
* fixed https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2443868 * fixed https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2443868
[0.2.1 - 21.05.2017] ## [0.2.1 - 21.05.2017]
* added Swedish translation by Sizaro * added Swedish translation by Sizaro
* fixed some bugs with installlation & characters & houses * fixed some bugs with installlation & characters & houses
[0.2.0 - 21.05.2017] ## [0.2.0 - 21.05.2017]
* added option to change character sex for premium points * added option to change character sex for premium points
* moved site_closed to database, now you can close your site through admin panel * moved site_closed to database, now you can close your site through admin panel
* added option to admin panel: clear cache * added option to admin panel: clear cache
@@ -337,10 +381,10 @@
* fixed movies unexpected comment * fixed movies unexpected comment
* added template_place_holder('center_top') to kathrine template * added template_place_holder('center_top') to kathrine template
[0.1.5 - 13.05.2017] ## [0.1.5 - 13.05.2017]
* fixed bug with "Integrity constraint violation: 1048 Column 'ip' cannot be null" * fixed bug with "Integrity constraint violation: 1048 Column 'ip' cannot be null"
[0.1.4 - 13.05.2017] ## [0.1.4 - 13.05.2017]
* added outfit shower, in characters, online, and highscores * added outfit shower, in characters, online, and highscores
* updated database to version 2 * updated database to version 2
* fixed item images (now using item-images.ots.me host by default) * fixed item images (now using item-images.ots.me host by default)
@@ -349,17 +393,17 @@
* removed some unused code from my old server * removed some unused code from my old server
* added spells & monsters to kathrine template * 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
[0.1.2 - 11.05.2017] ## [0.1.2 - 11.05.2017]
* forgot to update CHANGELOG and MYAAC_VERSION * forgot to update CHANGELOG and MYAAC_VERSION
[0.1.1 - 11.05.2017] ## [0.1.1 - 11.05.2017]
* fixed updating myaac_config with database_version to 1 * fixed updating myaac_config with database_version to 1
* fixed database updater * fixed database updater
[0.1.0 - 11.05.2017] ## [0.1.0 - 11.05.2017]
* added new feature: change character name for premium points (disabled by default, you can enable it in config under account_change_character_name in config.php) * added new feature: change character name for premium points (disabled by default, you can enable it in config under account_change_character_name in config.php)
* added automatic database updater (data migrations) * added automatic database updater (data migrations)
* renamed events to hooks * renamed events to hooks
@@ -383,13 +427,13 @@
* fixed signatures (many fixes) * fixed signatures (many fixes)
* added missing gesior signature system * added missing gesior signature system
[0.0.6 - 06.05.2017] ## [0.0.6 - 06.05.2017]
* fixed bug while installing (https://otland.net/threads/myaac-v0-0-1.251454/page-3#post-2440543) * fixed bug while installing (https://otland.net/threads/myaac-v0-0-1.251454/page-3#post-2440543)
* fixed bug when creating character (not showing errors) (one more time) * fixed bug when creating character (not showing errors) (one more time)
* fixed support for TFS 0.2 series * fixed support for TFS 0.2 series
* added FAQ link * added FAQ link
[0.0.5 - 05.05.2017] ## [0.0.5 - 05.05.2017]
* fixed bug when creating character (not showing errors) * fixed bug when creating character (not showing errors)
* Fixed characters loading with names that has been created with other AAC * Fixed characters loading with names that has been created with other AAC
* fixed links to shop in default template * fixed links to shop in default template
@@ -402,7 +446,7 @@
* fixes when $config['database_*'] is set * fixes when $config['database_*'] is set
* added CHANGELOG * added CHANGELOG
[0.0.3 - 03.05.2017] ## [0.0.3 - 03.05.2017]
* Full support for OTHire 0.0.3 * Full support for OTHire 0.0.3
* added support for otservers that doesn't use account.name field, instead just account number will be used * added support for otservers that doesn't use account.name field, instead just account number will be used
* fixed encryption detection on TFS 0.3 * fixed encryption detection on TFS 0.3
@@ -413,7 +457,7 @@
* fixed installation errors * fixed installation errors
* fixed config.lua loading with some weird comments * fixed config.lua loading with some weird comments
[0.0.2 - 02.05.2017] ## [0.0.2 - 02.05.2017]
* updated forum links to use friendly_urls * updated forum links to use friendly_urls
* some more info will be shown when cannot connect to database * some more info will be shown when cannot connect to database
* show more error infos when creating character * show more error infos when creating character
@@ -424,7 +468,7 @@
* fixed support for gesior pages and templates * fixed support for gesior pages and templates
* added function OTS_Acount:getGroupId() * added function OTS_Acount:getGroupId()
[0.0.1 - 01.05.2017] ## [0.0.1 - 01.05.2017]
This is first official release of MyAAC. This is first official release of MyAAC.
Features are listed here Features are listed here

View File

@@ -5,7 +5,7 @@ Official website: https://my-aac.org
### REQUIREMENTS ### REQUIREMENTS
- PHP 5.3.0 or later - PHP 5.3.3 or later
- MySQL database - MySQL database
- PDO PHP Extension - PDO PHP Extension
- XML PHP Extension - XML PHP Extension
@@ -28,6 +28,7 @@ Official website: https://my-aac.org
chmod 660 images/guilds chmod 660 images/guilds
chmod 660 images/houses chmod 660 images/houses
chmod 660 images/gallery chmod 660 images/gallery
chmod -R 770 system/cache
Visit http://your_domain/install (http://localhost/install) and follow instructions in the browser. Visit http://your_domain/install (http://localhost/install) and follow instructions in the browser.

View File

@@ -26,8 +26,8 @@
session_start(); session_start();
define('MYAAC', true); define('MYAAC', true);
define('MYAAC_VERSION', '0.7.9'); define('MYAAC_VERSION', '0.7.11');
define('DATABASE_VERSION', 21); define('DATABASE_VERSION', 22);
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' : (strtoupper(PHP_OS) == 'DARWIN' ? 'MAC' : 'LINUX')); define('MYAAC_OS', (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? 'WINDOWS' : (strtoupper(PHP_OS) == 'DARWIN' ? 'MAC' : 'LINUX'));

View File

@@ -107,6 +107,7 @@ $config = array(
'smtp_auth' => true, // need authorization? 'smtp_auth' => true, // need authorization?
'smtp_user' => 'admin@example.org', 'smtp_user' => 'admin@example.org',
'smtp_pass' => '', 'smtp_pass' => '',
'smtp_secure' => '', // What kind of encryption to use on the SMTP connection. Options: '', 'ssl' or 'tls', use 'ssl' for gmail
// reCAPTCHA (prevent spam bots) // reCAPTCHA (prevent spam bots)
'recaptcha_enabled' => false, // enable recaptcha verification code 'recaptcha_enabled' => false, // enable recaptcha verification code

View File

@@ -170,6 +170,11 @@ require_once(SYSTEM . 'status.php');
$twig->addGlobal('config', $config); $twig->addGlobal('config', $config);
$twig->addGlobal('status', $status); $twig->addGlobal('status', $status);
// verify myaac tables exists in database
if(!tableExist('myaac_account_actions')) {
die('Seems that the table <strong>myaac_account_actions</strong> of MyAAC doesn\'t exist in the database. This is a fatal error. You can try to reinstall MyAAC by visiting <a href="' . BASE_URL . 'install">this</a> url.');
}
// database migrations // database migrations
$tmp = ''; $tmp = '';
if(fetchDatabaseConfig('database_version', $tmp)) { // we got version if(fetchDatabaseConfig('database_version', $tmp)) { // we got version
@@ -417,7 +422,7 @@ else
die('ERROR: Cannot load template.'); die('ERROR: Cannot load template.');
} }
echo '<!-- MyAAC ' . MYAAC_VERSION . ' :: http://www.my-aac.org/ -->' . "\n"; echo base64_decode('PCEtLSBQb3dlcmVkIGJ5IE15QUFDIDo6IGh0dHBzOi8vd3d3Lm15LWFhYy5vcmcvIC0tPg==') . PHP_EOL;
if(($config['debug_level'] & 1) == 1) if(($config['debug_level'] & 1) == 1)
echo '<!-- Generated in :: ' . round(microtime(true) - START_TIME, 4) . ' -->'; echo '<!-- Generated in :: ' . round(microtime(true) - START_TIME, 4) . ' -->';

View File

@@ -1,7 +1,7 @@
CREATE TABLE `myaac_account_actions` CREATE TABLE `myaac_account_actions`
( (
`account_id` INT(11) NOT NULL, `account_id` INT(11) NOT NULL,
`ip` INT(11) NOT NULL DEFAULT 0, `ip` INT(10) UNSIGNED NOT NULL DEFAULT 0,
`ipv6` BINARY(16) 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 '',

View File

@@ -22,7 +22,7 @@ function version_check($name, $ok, $info = '', $warning = false)
$failed = false; $failed = false;
// start validating // start validating
version_check($locale['step_requirements_php_version'], (PHP_VERSION_ID >= 50300), PHP_VERSION); version_check($locale['step_requirements_php_version'], (PHP_VERSION_ID >= 50303), PHP_VERSION);
foreach(array('config.local.php', 'images/guilds', 'images/houses', 'images/gallery') as $value) foreach(array('config.local.php', 'images/guilds', 'images/houses', 'images/gallery') as $value)
{ {
$is_writable = is_writable(BASE . $value); $is_writable = is_writable(BASE . $value);

View File

@@ -174,6 +174,11 @@ if(!$error) {
success($locale['step_database_adding_field'] . ' accounts.premium_points...'); success($locale['step_database_adding_field'] . ' accounts.premium_points...');
} }
if(fieldExist('motd', 'guilds')) {
if(query("ALTER TABLE `guilds` MODIFY `motd` VARCHAR(255) NOT NULL DEFAULT '';"))
success($locale['step_database_modifying_field'] . ' guilds.motd...');
}
if(!fieldExist('description', 'guilds')) { if(!fieldExist('description', 'guilds')) {
if(query("ALTER TABLE `guilds` ADD `description` TEXT NOT NULL;")) if(query("ALTER TABLE `guilds` ADD `description` TEXT NOT NULL;"))
success($locale['step_database_adding_field'] . ' guilds.description...'); success($locale['step_database_adding_field'] . ' guilds.description...');

View File

@@ -122,50 +122,34 @@ else {
$insert_into_players = "INSERT INTO `players` (`id`, `name`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `lastlogout`, `balance`, `$deleted`, `created`, `hidden`, `comment`) VALUES "; $insert_into_players = "INSERT INTO `players` (`id`, `name`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `lastlogout`, `balance`, `$deleted`, `created`, `hidden`, `comment`) VALUES ";
$success = true; $success = true;
$highscores_ignored_ids = array();
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Rook Sample')); $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Rook Sample'));
if($query->rowCount() == 0) { if($query->rowCount() == 0) {
if(!query($insert_into_players . "(null, 'Rook Sample', 1, " . getSession('account') . ", 1, 0, 150, 150, 4200, 118, 114, 38, 57, 130, 0, 0, 0, 0, 100, 1, 1000, 1000, 7, '', 400, 1, 1255179613, 2453925456, 1, 1255179614, 0, 0, UNIX_TIMESTAMP(), 1, '');")) if(!query($insert_into_players . "(null, 'Rook Sample', 1, " . getSession('account') . ", 1, 0, 150, 150, 4200, 118, 114, 38, 57, 130, 0, 0, 0, 0, 100, 1, 1000, 1000, 7, '', 400, 1, 1255179613, 2453925456, 1, 1255179614, 0, 0, UNIX_TIMESTAMP(), 1, '');"))
$success = false; $success = false;
else {
$highscores_ignored_ids[] = $db->lastInsertId();
}
} }
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Sorcerer Sample')); $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Sorcerer Sample'));
if($query->rowCount() == 0) { if($query->rowCount() == 0) {
if(!query($insert_into_players . "(null, 'Sorcerer Sample', 1, " . getSession('account') . ", 8, 1, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 470, 1, 1255179571, 2453925456, 1, 1255179612, 0, 0, UNIX_TIMESTAMP(), 1, '');")) if(!query($insert_into_players . "(null, 'Sorcerer Sample', 1, " . getSession('account') . ", 8, 1, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 470, 1, 1255179571, 2453925456, 1, 1255179612, 0, 0, UNIX_TIMESTAMP(), 1, '');"))
$success = false; $success = false;
else {
$highscores_ignored_ids[] = $db->lastInsertId();
}
} }
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Druid Sample')); $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Druid Sample'));
if($query->rowCount() == 0) { if($query->rowCount() == 0) {
if(!query($insert_into_players . "(null, 'Druid Sample', 1, " . getSession('account') . ", 8, 2, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 470, 1, 1255179655, 2453925456, 1, 1255179658, 0, 0, UNIX_TIMESTAMP(), 1, '');")) if(!query($insert_into_players . "(null, 'Druid Sample', 1, " . getSession('account') . ", 8, 2, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 470, 1, 1255179655, 2453925456, 1, 1255179658, 0, 0, UNIX_TIMESTAMP(), 1, '');"))
$success = false; $success = false;
else {
$highscores_ignored_ids[] = $db->lastInsertId();
}
} }
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Paladin Sample')); $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Paladin Sample'));
if($query->rowCount() == 0) { if($query->rowCount() == 0) {
if(!query($insert_into_players . "(null, 'Paladin Sample', 1, " . getSession('account') . ", 8, 3, 185, 185, 4200, 118, 114, 38, 57, 129, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 470, 1, 1255179854, 2453925456, 1, 1255179858, 0, 0, UNIX_TIMESTAMP(), 1, '');")) if(!query($insert_into_players . "(null, 'Paladin Sample', 1, " . getSession('account') . ", 8, 3, 185, 185, 4200, 118, 114, 38, 57, 129, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 470, 1, 1255179854, 2453925456, 1, 1255179858, 0, 0, UNIX_TIMESTAMP(), 1, '');"))
$success = false; $success = false;
else {
$highscores_ignored_ids[] = $db->lastInsertId();
}
} }
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Knight Sample')); $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Knight Sample'));
if($query->rowCount() == 0) { if($query->rowCount() == 0) {
if(!query($insert_into_players . "(null, 'Knight Sample', 1, " . getSession('account') . ", 8, 4, 185, 185, 4200, 118, 114, 38, 57, 131, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 470, 1, 1255179620, 2453925456, 1, 1255179654, 0, 0, UNIX_TIMESTAMP(), 1, '');")) if(!query($insert_into_players . "(null, 'Knight Sample', 1, " . getSession('account') . ", 8, 4, 185, 185, 4200, 118, 114, 38, 57, 131, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 470, 1, 1255179620, 2453925456, 1, 1255179654, 0, 0, UNIX_TIMESTAMP(), 1, '');"))
$success = false; $success = false;
else {
$highscores_ignored_ids[] = $db->lastInsertId();
}
} }
if($success) { if($success) {
@@ -193,20 +177,19 @@ else {
error(Spells::getLastError()); error(Spells::getLastError());
} }
$content = PHP_EOL; // update config.highscores_ids_hidden
$content .= '$config[\'highscores_ids_hidden\'] = array(' . implode(', ', $highscores_ignored_ids) . ');'; $database_migration_20 = true;
$content .= PHP_EOL; require_once(SYSTEM . 'migrations/20.php');
$content = '';
$file = fopen(BASE . 'config.local.php', 'a+'); if(!databaseMigration20($content)) {
if($file) {
fwrite($file, $content);
}
else {
$locale['step_database_error_file'] = str_replace('$FILE$', '<b>' . BASE . 'config.local.php</b>', $locale['step_database_error_file']); $locale['step_database_error_file'] = str_replace('$FILE$', '<b>' . BASE . 'config.local.php</b>', $locale['step_database_error_file']);
warning($locale['step_database_error_file'] . '<br/> warning($locale['step_database_error_file'] . '<br/>
<textarea cols="70" rows="10">' . $content . '</textarea>'); <textarea cols="70" rows="10">' . $content . '</textarea>');
} }
// add z_polls tables
require_once(SYSTEM . 'migrations/22.php');
$locale['step_finish_desc'] = str_replace('$ADMIN_PANEL$', generateLink(ADMIN_URL, $locale['step_finish_admin_panel'], true), $locale['step_finish_desc']); $locale['step_finish_desc'] = str_replace('$ADMIN_PANEL$', generateLink(ADMIN_URL, $locale['step_finish_admin_panel'], true), $locale['step_finish_desc']);
$locale['step_finish_desc'] = str_replace('$HOMEPAGE$', generateLink(BASE_URL, $locale['step_finish_homepage'], true), $locale['step_finish_desc']); $locale['step_finish_desc'] = str_replace('$HOMEPAGE$', generateLink(BASE_URL, $locale['step_finish_homepage'], true), $locale['step_finish_desc']);
$locale['step_finish_desc'] = str_replace('$LINK$', generateLink('http://my-aac.org', 'http://my-aac.org', true), $locale['step_finish_desc']); $locale['step_finish_desc'] = str_replace('$LINK$', generateLink('http://my-aac.org', 'http://my-aac.org', true), $locale['step_finish_desc']);

View File

@@ -1,5 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $locale['direction']; ?>" lang="<?php echo $locale['lang']; ?>" xml:lang="<?php echo $locale['lang']; ?>"> <html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $locale['direction']; ?>" lang="<?php echo $locale['lang']; ?>" xml:lang="<?php echo $locale['lang']; ?>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $locale['encoding']; ?>" /> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $locale['encoding']; ?>" />
<title>MyAAC - <?php echo $locale['installation']; ?></title> <title>MyAAC - <?php echo $locale['installation']; ?></title>
<link rel="stylesheet" type="text/css" href="template/style.css" /> <link rel="stylesheet" type="text/css" href="template/style.css" />
@@ -8,7 +9,7 @@
<div id="wrapper"> <div id="wrapper">
<!--div class="buffer"--> <!--div class="buffer"-->
<div id="header"> <div id="header">
<h1>MyAAC v<?php echo MYAAC_VERSION . ' ' . $locale['installation']; ?></h1> <h1>MyAAC <?php echo $locale['installation']; ?></h1>
</div> </div>
<div id="body"> <div id="body">

2
robots.txt Normal file
View File

@@ -0,0 +1,2 @@
User-agent: *
Disallow:

View File

@@ -473,7 +473,7 @@ function template_header($is_admin = false)
$ret .= ' $ret .= '
<meta name="description" content="' . $config['meta_description'] . '" /> <meta name="description" content="' . $config['meta_description'] . '" />
<meta name="keywords" content="' . $config['meta_keywords'] . ', myaac, wodzaac" /> <meta name="keywords" content="' . $config['meta_keywords'] . ', myaac, wodzaac" />
<meta name="generator" content="MyAAC ' . MYAAC_VERSION . '" /> <meta name="generator" content="MyAAC" />
<link rel="stylesheet" type="text/css" href="' . BASE_URL . 'tools/messages.css" /> <link rel="stylesheet" type="text/css" href="' . BASE_URL . 'tools/messages.css" />
<script type="text/javascript" src="' . BASE_URL . 'tools/jquery.js"></script> <script type="text/javascript" src="' . BASE_URL . 'tools/jquery.js"></script>
<noscript> <noscript>
@@ -810,11 +810,16 @@ function getWorldName($id)
*/ */
function _mail($to, $subject, $body, $altBody = '', $add_html_tags = true) function _mail($to, $subject, $body, $altBody = '', $add_html_tags = true)
{ {
/** @var PHPMailer $mailer */
global $mailer, $config; global $mailer, $config;
if(!$mailer) if(!$mailer)
{ {
require(SYSTEM . 'libs/phpmailer/PHPMailerAutoload.php'); require(SYSTEM . 'libs/phpmailer/PHPMailerAutoload.php');
$mailer = new PHPMailer(); $mailer = new PHPMailer();
$mailer->setLanguage('en', LIBS . 'phpmailer/language/');
}
else {
$mailer->clearAllRecipients();
} }
$signature_html = ''; $signature_html = '';
@@ -834,6 +839,7 @@ function _mail($to, $subject, $body, $altBody = '', $add_html_tags = true)
$mailer->SMTPAuth = $config['smtp_auth']; $mailer->SMTPAuth = $config['smtp_auth'];
$mailer->Username = $config['smtp_user']; $mailer->Username = $config['smtp_user'];
$mailer->Password = $config['smtp_pass']; $mailer->Password = $config['smtp_pass'];
$mailer->SMTPSecure = isset($config['smtp_secure']) ? $config['smtp_secure'] : '';
} }
else else
$mailer->IsMail(); $mailer->IsMail();
@@ -915,6 +921,10 @@ function load_config_lua($filename)
$result[$key] = (string) substr(substr($value, 1), 0, -1); $result[$key] = (string) substr(substr($value, 1), 0, -1);
elseif(in_array($value, array('true', 'false'))) elseif(in_array($value, array('true', 'false')))
$result[$key] = ($value == 'true') ? true : false; $result[$key] = ($value == 'true') ? true : false;
elseif(substr($value, 0 , 1) == '{' && substr($value, -1 , 1) == '}') {
// arrays are not supported yet
// just ignore the error
}
else else
{ {
foreach($result as $tmp_key => $tmp_value) // load values definied by other keys, like: dailyFragsToBlackSkull = dailyFragsToRedSkull foreach($result as $tmp_key => $tmp_value) // load values definied by other keys, like: dailyFragsToBlackSkull = dailyFragsToRedSkull

View File

@@ -42,12 +42,12 @@ class Hook
$ret = $tmp($params); $ret = $tmp($params);
}*/ }*/
global $db, $config, $template_path, $ots, $content; global $db, $config, $template_path, $ots, $content, $twig;
if(file_exists(BASE . $this->_file)) { if(file_exists(BASE . $this->_file)) {
require(BASE . $this->_file); $ret = require(BASE . $this->_file);
} }
return true; return $ret === null || $ret == 1 || $ret;
} }
public function name() {return $this->_name;} public function name() {return $this->_name;}
@@ -71,12 +71,18 @@ class Hooks
if(isset(self::$_hooks[$type])) if(isset(self::$_hooks[$type]))
{ {
foreach(self::$_hooks[$type] as $name => $hook) foreach(self::$_hooks[$type] as $name => $hook)
$ret = $hook->execute($params); if(!$hook->execute($params)) {
$ret = false;
}
} }
return $ret; return $ret;
} }
public function exist($type) {
return isset(self::$_hooks[$type]);
}
public function load() public function load()
{ {
global $db; global $db;

View File

@@ -31,7 +31,7 @@ class Cache_APC
public function get($key) public function get($key)
{ {
$tmp = ''; $tmp = '';
if($this->fetch($key, $tmp)) if($this->fetch($this->prefix . $key, $tmp))
return $tmp; return $tmp;
return ''; return '';
@@ -42,7 +42,7 @@ class Cache_APC
} }
public function delete($key) { public function delete($key) {
apc_delete($key); apc_delete($this->prefix . $key);
} }
public function enabled() { public function enabled() {

View File

@@ -30,7 +30,7 @@ class Cache_eAccelerator
public function get($key) public function get($key)
{ {
$tmp = ''; $tmp = '';
if($this->fetch($key, $tmp)) if($this->fetch($this->prefix . $key, $tmp))
return $tmp; return $tmp;
return ''; return '';
@@ -41,7 +41,7 @@ class Cache_eAccelerator
} }
public function delete($key) { public function delete($key) {
eaccelerator_rm($key); eaccelerator_rm($this->prefix . $key);
} }
public function enabled() { public function enabled() {

View File

@@ -30,7 +30,7 @@ class Cache_XCache
public function get($key) public function get($key)
{ {
$tmp = ''; $tmp = '';
if($this->fetch($key, $tmp)) if($this->fetch($this->prefix . $key, $tmp))
return $tmp; return $tmp;
return ''; return '';
@@ -47,7 +47,7 @@ class Cache_XCache
} }
public function delete($key) { public function delete($key) {
xcache_unset($key); xcache_unset($this->prefix . $key);
} }
public function enabled() { public function enabled() {

View File

@@ -194,8 +194,9 @@ class Plugins {
break; break;
} }
$file = BASE . $file; $file = str_replace('\\', '/', BASE . $file);
if(!is_sub_dir($file, BASE) || realpath(dirname($file)) != dirname($file)) { $realpath = str_replace('\\', '/', realpath(dirname($file)));
if(!is_sub_dir($file, BASE) || $realpath != dirname($file)) {
$success = false; $success = false;
self::$error = "You don't have rights to delete: " . $file; self::$error = "You don't have rights to delete: " . $file;
break; break;

View File

@@ -40,11 +40,13 @@ class Usage_Statistics {
$ret['myaac_version'] = MYAAC_VERSION; $ret['myaac_version'] = MYAAC_VERSION;
$ret['myaac_db_version'] = DATABASE_VERSION; $ret['myaac_db_version'] = DATABASE_VERSION;
if(tableExist('server_config')) {
$query = $db->query('SELECT `value` FROM `server_config` WHERE `config` = ' . $db->quote('database_version')); $query = $db->query('SELECT `value` FROM `server_config` WHERE `config` = ' . $db->quote('database_version'));
if($query->rowCount() == 1) { if($query->rowCount() == 1) {
$query = $query->fetch(); $query = $query->fetch();
$ret['otserv_db_version'] = $query['value']; $ret['otserv_db_version'] = $query['value'];
} }
}
$ret['client_version'] = $config['client']; $ret['client_version'] = $config['client'];
@@ -58,7 +60,7 @@ class Usage_Statistics {
$query = $db->query('SELECT SUM(ROUND(((DATA_LENGTH + INDEX_LENGTH) / 1024 ), 0)) AS "size" $query = $db->query('SELECT SUM(ROUND(((DATA_LENGTH + INDEX_LENGTH) / 1024 ), 0)) AS "size"
FROM INFORMATION_SCHEMA.TABLES FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = "forgottenserver";'); WHERE TABLE_SCHEMA = "' . $config['database_name'] . '";');
if($query->rowCount() == 1) { if($query->rowCount() == 1) {
$query = $query->fetch(); $query = $query->fetch();

View File

@@ -18,7 +18,7 @@ $locale['loaded'] = 'Loaded';
$locale['not_loaded'] = 'Not loaded'; $locale['not_loaded'] = 'Not loaded';
$locale['please_fill_all'] = 'Please fill all inputs!'; $locale['please_fill_all'] = 'Please fill all inputs!';
$locale['already_installed'] = 'MyAAC has been already installed. Please delete <b>install/<b/> directory.'; $locale['already_installed'] = 'MyAAC has been already installed. Please delete <b>install/<b/> directory. If you want to reinstall MyAAC - please delete <strong>config.local.php</strong> file from the main directory and refresh the page.';
// welcome // welcome
$locale['step_welcome'] = 'Welcome'; $locale['step_welcome'] = 'Welcome';

View File

@@ -18,7 +18,7 @@ $locale['loaded'] = 'Załadowane';
$locale['not_loaded'] = 'Nie załadowane'; $locale['not_loaded'] = 'Nie załadowane';
$locale['please_fill_all'] = 'Proszę wypełnić wszystkie pola!'; $locale['please_fill_all'] = 'Proszę wypełnić wszystkie pola!';
$locale['already_installed'] = 'MyAAC został już zainstalowany. Proszę usunąć katalog <b>install/</b>.'; $locale['already_installed'] = 'MyAAC został już zainstalowany. Proszę usunąć katalog <b>install/</b>. Jeśli chcesz zainstalować MyAAC od nowa - proszę usuń plik <strong>config.local.php</strong> z katalogu głównego i odśwież stronę.';
// welcome // welcome
$locale['step_welcome'] = 'Witamy'; $locale['step_welcome'] = 'Witamy';

View File

@@ -18,7 +18,7 @@ $locale['loaded'] = 'Laddad';
$locale['not_loaded'] = 'Inte Laddad'; $locale['not_loaded'] = 'Inte Laddad';
$locale['please_fill_all'] = 'Vänligen fyll i allt!'; $locale['please_fill_all'] = 'Vänligen fyll i allt!';
$locale['already_installed'] = 'MyAAC är redan installerat. Vänligen ta bort <b>install/<b/> mappen.'; $locale['already_installed'] = 'MyAAC är redan installerat. Vänligen ta bort <b>install/<b/> mappen. Om du vill installera MyAAC igen - ta bort filen <strong>config.local.php</strong> från huvudkatalogen och uppdatera sidan.';
// welcome // welcome
$locale['step_welcome'] = 'Välkommen'; $locale['step_welcome'] = 'Välkommen';

View File

@@ -1,39 +1,48 @@
<?php <?php
$config_file = BASE . 'config.local.php'; if(!isset($database_migration_20)) {
if(!is_writable($config_file)) { // we can't do anything, just ignore databaseMigration20();
return;
} }
$content_of_file = trim(file_get_contents($config_file)); function databaseMigration20(&$content = '') {
if(strpos($content_of_file, 'highscores_ids_hidden') !== false) { // already present global $db;
return;
}
$query = $db->query("SELECT `id` FROM `players` WHERE (`name` = " . $db->quote("Rook Sample") . " OR `name` = " . $db->quote("Sorcerer Sample") . " OR `name` = " . $db->quote("Druid Sample") . " OR `name` = " . $db->quote("Paladin Sample") . " OR `name` = " . $db->quote("Knight Sample") . ") ORDER BY `id`;"); $config_file = BASE . 'config.local.php';
if(!is_writable($config_file)) { // we can't do anything, just ignore
return false;
}
$highscores_ignored_ids = array(); $content_of_file = trim(file_get_contents($config_file));
if($query->rowCount() > 0) { if(strpos($content_of_file, 'highscores_ids_hidden') !== false) { // already present
return true;
}
$query = $db->query("SELECT `id` FROM `players` WHERE (`name` = " . $db->quote("Rook Sample") . " OR `name` = " . $db->quote("Sorcerer Sample") . " OR `name` = " . $db->quote("Druid Sample") . " OR `name` = " . $db->quote("Paladin Sample") . " OR `name` = " . $db->quote("Knight Sample") . " OR `name` = " . $db->quote("Account Manager") . ") ORDER BY `id`;");
$highscores_ignored_ids = array();
if($query->rowCount() > 0) {
foreach($query->fetchAll() as $result) foreach($query->fetchAll() as $result)
$highscores_ignored_ids[] = $result['id']; $highscores_ignored_ids[] = $result['id'];
} }
else { else {
$highscores_ignored_ids[] = 0; $highscores_ignored_ids[] = 0;
} }
$php_on_end = substr($content_of_file, -2, 2) == '?>'; $php_on_end = substr($content_of_file, -2, 2) == '?>';
$content = PHP_EOL; $content = PHP_EOL;
if($php_on_end) { if($php_on_end) {
$content .= '<?php'; $content .= '<?php';
} }
$content .= PHP_EOL; $content .= PHP_EOL;
$content .= '$config[\'highscores_ids_hidden\'] = array(' . implode(', ', $highscores_ignored_ids) . ');'; $content .= '$config[\'highscores_ids_hidden\'] = array(' . implode(', ', $highscores_ignored_ids) . ');';
$content .= PHP_EOL; $content .= PHP_EOL;
if($php_on_end) { if($php_on_end) {
$content .= '?>'; $content .= '?>';
} }
file_put_contents($config_file, $content, FILE_APPEND); file_put_contents($config_file, $content, FILE_APPEND);
return true;
}
?> ?>

29
system/migrations/22.php Normal file
View File

@@ -0,0 +1,29 @@
<?php
if(!tableExist('z_polls'))
$db->query('
CREATE TABLE `z_polls` (
`id` int(11) NOT NULL auto_increment,
`question` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`end` int(11) NOT NULL DEFAULT 0,
`start` int(11) NOT NULL DEFAULT 0,
`answers` int(11) NOT NULL DEFAULT 0,
`votes_all` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;');
if(!tableExist('z_polls_answers'))
$db->query('
CREATE TABLE `z_polls_answers` (
`poll_id` int(11) NOT NULL,
`answer_id` int(11) NOT NULL,
`answer` varchar(255) NOT NULL,
`votes` int(11) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1;');
if(!fieldExist('vote', 'accounts'))
$db->query('ALTER TABLE `accounts` ADD `vote` INT( 11 ) DEFAULT 0 NOT NULL ;');
else {
$db->query('ALTER TABLE `accounts` MODIFY `vote` INT( 11 ) DEFAULT 0 NOT NULL ;');
}

View File

@@ -28,15 +28,12 @@ foreach(scandir($aac_path_logs) as $f) {
} }
$server_path_logs = $config['server_path'] . 'logs/'; $server_path_logs = $config['server_path'] . 'logs/';
if(!file_exists($server_path_logs))
$server_path_logs = $config['data_path'] . 'logs/';
if(!file_exists($server_path_logs)) { if(!file_exists($server_path_logs)) {
echo '</table>Logs are not available on this server.'; $server_path_logs = $config['data_path'] . 'logs/';
return;
} }
foreach(scandir($server_path_logs) as $f) { if(file_exists($server_path_logs)) {
foreach(scandir($server_path_logs) as $f) {
if($f[0] == '.' || $f == '..') if($f[0] == '.' || $f == '..')
continue; continue;
@@ -51,6 +48,7 @@ foreach(scandir($server_path_logs) as $f) {
} }
$files[] = array($f, $server_path_logs); $files[] = array($f, $server_path_logs);
}
} }
$i = 0; $i = 0;

View File

@@ -16,6 +16,8 @@ if(!hasFlag(FLAG_CONTENT_PAGES) && !superAdmin())
return; return;
} }
header('X-XSS-Protection:0');
$name = $p_title = ''; $name = $p_title = '';
$groups = new OTS_Groups_List(); $groups = new OTS_Groups_List();

View File

@@ -170,7 +170,7 @@ if(isset($monster['name']))
echo '</TABLE></td><td align=left> echo '</TABLE></td><td align=left>
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=40%> <TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=40%>
<tr><td align=left>'; <tr><td align=left>';
$monster['gfx_name'] = trim(mb_strtolower($monster['name'])).".gif"; $monster['gfx_name'] = trim(strtolower($monster['name'])).".gif";
if(!file_exists('images/monsters/'.$monster['gfx_name'])) { if(!file_exists('images/monsters/'.$monster['gfx_name'])) {
$gfx_name = str_replace(" ", "", $monster['gfx_name']); $gfx_name = str_replace(" ", "", $monster['gfx_name']);
if(file_exists('images/monsters/' . $gfx_name)) if(file_exists('images/monsters/' . $gfx_name))

View File

@@ -13,7 +13,7 @@ defined('MYAAC') or die('Direct access not allowed!');
$links_to_pages = ''; $links_to_pages = '';
$thread_id = (int) $_REQUEST['id']; $thread_id = (int) $_REQUEST['id'];
$_page = (int) (isset($_REQUEST['page']) ? $_REQUEST['page'] : 0); $_page = (int) (isset($_REQUEST['page']) ? $_REQUEST['page'] : 0);
$thread_name = $db->query("SELECT `players`.`name`, `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`section` FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." AND `" . TABLE_PREFIX . "forum`.`id` = `" . TABLE_PREFIX . "forum`.`first_post` AND `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` LIMIT 1")->fetch(); $thread_name = $db->query("SELECT `players`.`name`, `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`section`, `" . TABLE_PREFIX . "forum`.`post_html` FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." AND `" . TABLE_PREFIX . "forum`.`id` = `" . TABLE_PREFIX . "forum`.`first_post` AND `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` LIMIT 1")->fetch();
if(empty($thread_name['name'])) { if(empty($thread_name['name'])) {
echo 'Thread with this ID does not exits.'; echo 'Thread with this ID does not exits.';
@@ -36,8 +36,8 @@ for($i = 0; $i < $posts_count['posts_count'] / $config['forum_threads_per_page']
$threads = $db->query("SELECT `players`.`id` as `player_id`, `players`.`name`, `players`.`account_id`, `players`.`vocation`" . (fieldExist('promotion', 'players') ? ", `players`.`promotion`" : "") . ", `players`.`level`, `" . TABLE_PREFIX . "forum`.`id`,`" . TABLE_PREFIX . "forum`.`first_post`, `" . TABLE_PREFIX . "forum`.`section`,`" . TABLE_PREFIX . "forum`.`post_text`, `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`post_date`, `" . TABLE_PREFIX . "forum`.`post_smile`, `" . TABLE_PREFIX . "forum`.`post_html`, `" . TABLE_PREFIX . "forum`.`author_aid`, `" . TABLE_PREFIX . "forum`.`author_guid`, `" . TABLE_PREFIX . "forum`.`last_edit_aid`, `" . TABLE_PREFIX . "forum`.`edit_date` FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` AND `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." ORDER BY `" . TABLE_PREFIX . "forum`.`post_date` LIMIT ".$config['forum_posts_per_page']." OFFSET ".($_page * $config['forum_posts_per_page']))->fetchAll(); $threads = $db->query("SELECT `players`.`id` as `player_id`, `players`.`name`, `players`.`account_id`, `players`.`vocation`" . (fieldExist('promotion', 'players') ? ", `players`.`promotion`" : "") . ", `players`.`level`, `" . TABLE_PREFIX . "forum`.`id`,`" . TABLE_PREFIX . "forum`.`first_post`, `" . TABLE_PREFIX . "forum`.`section`,`" . TABLE_PREFIX . "forum`.`post_text`, `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`post_date`, `" . TABLE_PREFIX . "forum`.`post_smile`, `" . TABLE_PREFIX . "forum`.`post_html`, `" . TABLE_PREFIX . "forum`.`author_aid`, `" . TABLE_PREFIX . "forum`.`author_guid`, `" . TABLE_PREFIX . "forum`.`last_edit_aid`, `" . TABLE_PREFIX . "forum`.`edit_date` FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` AND `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." ORDER BY `" . TABLE_PREFIX . "forum`.`post_date` LIMIT ".$config['forum_posts_per_page']." OFFSET ".($_page * $config['forum_posts_per_page']))->fetchAll();
if(isset($threads[0]['name'])) if(isset($threads[0]['name']))
$db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `views`=`views`+1 WHERE `id` = ".(int) $thread_id); $db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `views`=`views`+1 WHERE `id` = ".(int) $thread_id);
echo '<a href="' . getLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($threads[0]['section']) . '">'.$sections[$threads[0]['section']]['name'].'</a> >> <b>'.$thread_name['post_topic'].'</b>'; echo '<a href="' . getLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($threads[0]['section']) . '">'.$sections[$threads[0]['section']]['name'].'</a> >> <b>'.($thread_name['post_html'] ? $thread_name['post_topic'] : htmlspecialchars($thread_name['post_topic'])).'</b>';
echo '<br /><br /><a href="?subtopic=forum&action=new_post&thread_id='.$thread_id.'"><img src="images/forum/post.gif" border="0" /></a><br /><br />Page: '.$links_to_pages.'<br /><table width="100%"><tr bgcolor="'.$config['lightborder'].'" width="100%"><td colspan="2"><font size="4"><b>'.htmlspecialchars($thread_name['post_topic']).'</b></font><font size="1"><br />by ' . getPlayerLink($thread_name['name']) . '</font></td></tr><tr bgcolor="'.$config['vdarkborder'].'"><td width="200"><font color="white" size="1"><b>Author</b></font></td><td>&nbsp;</td></tr>'; echo '<br /><br /><a href="?subtopic=forum&action=new_post&thread_id='.$thread_id.'"><img src="images/forum/post.gif" border="0" /></a><br /><br />Page: '.$links_to_pages.'<br /><table width="100%"><tr bgcolor="'.$config['lightborder'].'" width="100%"><td colspan="2"><font size="4"><b>'.($thread_name['post_html'] ? $thread_name['post_topic'] : htmlspecialchars($thread_name['post_topic'])).'</b></font><font size="1"><br />by ' . getPlayerLink($thread_name['name']) . '</font></td></tr><tr bgcolor="'.$config['vdarkborder'].'"><td width="200"><font color="white" size="1"><b>Author</b></font></td><td>&nbsp;</td></tr>';
$player = $ots->createObject('Player'); $player = $ots->createObject('Player');
foreach($threads as $thread) foreach($threads as $thread)
{ {

View File

@@ -11,13 +11,13 @@
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
$guild_name = isset($_REQUEST['guild']) ? urldecode($_REQUEST['guild']) : null; $guild_name = isset($_REQUEST['guild']) ? urldecode($_REQUEST['guild']) : null;
$new_rank = isset($_REQUEST['rank_name']) ? $_REQUEST['rank_name'] : null; $rank_name = isset($_REQUEST['rank_name']) ? $_REQUEST['rank_name'] : null;
if(!Validator::guildName($guild_name)) { if(!Validator::guildName($guild_name)) {
$errors[] = Validator::getLastError(); $errors[] = Validator::getLastError();
} }
if(empty($errors)) { if(empty($errors)) {
if(!Validator::rankName($new_rank)) { if(!Validator::rankName($rank_name)) {
$errors[] = 'Invalid rank name format.'; $errors[] = 'Invalid rank name format.';
} }
if(!$logged) { if(!$logged) {
@@ -45,7 +45,7 @@ if(empty($errors)) {
$new_rank = new OTS_GuildRank(); $new_rank = new OTS_GuildRank();
$new_rank->setGuild($guild); $new_rank->setGuild($guild);
$new_rank->setLevel(1); $new_rank->setLevel(1);
$new_rank->setName($new_rank); $new_rank->setName($rank_name);
$new_rank->save(); $new_rank->save();
header("Location: ?subtopic=guilds&guild=".$guild->getName()."&action=manager"); header("Location: ?subtopic=guilds&guild=".$guild->getName()."&action=manager");
echo 'New rank added. Redirecting...'; echo 'New rank added. Redirecting...';

View File

@@ -13,31 +13,6 @@ $title = 'Polls';
/* Polls System By Averatec from pervera.pl & otland.net */ /* Polls System By Averatec from pervera.pl & otland.net */
if(!tableExist('z_polls'))
$db->query('
CREATE TABLE `z_polls` (
`id` int(11) NOT NULL auto_increment,
`question` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`end` int(11) NOT NULL DEFAULT 0,
`start` int(11) NOT NULL DEFAULT 0,
`answers` int(11) NOT NULL DEFAULT 0,
`votes_all` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;');
if(!tableExist('z_polls_answers'))
$db->query('
CREATE TABLE `z_polls_answers` (
`poll_id` int(11) NOT NULL,
`answer_id` int(11) NOT NULL,
`answer` varchar(255) NOT NULL,
`votes` int(11) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1;');
if(!fieldExist('vote', 'accounts'))
$db->query('ALTER TABLE `accounts` ADD `vote` INT( 11 ) NOT NULL ;');
function getColorByPercent($percent) function getColorByPercent($percent)
{ {
if($percent < 15) if($percent < 15)

View File

@@ -84,6 +84,7 @@
</div> </div>
<br/><br/> <br/><br/>
{% endif %} {% endif %}
<a name="General+Information"></a>
<h2>General Information</h2> <h2>General Information</h2>
<table width="100%"> <table width="100%">
<tr style="background-color: {{ config.lightborder }};" > <tr style="background-color: {{ config.lightborder }};" >
@@ -118,6 +119,7 @@
{% endautoescape %} {% endautoescape %}
</table> </table>
<br/> <br/>
<a name="Public+Information"></a>
<h2>Public Information</h2> <h2>Public Information</h2>
<table width="100%"> <table width="100%">
<tr style="background-color: {{ config.lightborder }};" > <tr style="background-color: {{ config.lightborder }};" >
@@ -133,6 +135,7 @@
<input type="submit" value="Change Info" /> <input type="submit" value="Change Info" />
</form> </form>
<br/> <br/>
<a name="Account+Logs" ></a>
<h2>Action Log</h2> <h2>Action Log</h2>
<table> <table>
<tr bgcolor="{{ config.vdarkborder }}" class="white"> <tr bgcolor="{{ config.vdarkborder }}" class="white">
@@ -151,6 +154,7 @@
{% endautoescape %} {% endautoescape %}
</table> </table>
<br/> <br/>
<a name="Characters" ></a>
<h2>Character list: {{ players|length }} characters.</h2> <h2>Character list: {{ players|length }} characters.</h2>
<table> <table>
<tr bgcolor="{{ config.vdarkborder }}" class="white"> <tr bgcolor="{{ config.vdarkborder }}" class="white">

View File

@@ -35,7 +35,7 @@
{% if status.online %} {% 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/>
{{ status.uptimeReadable }}, {{ status.players }}/{{ status.playersMax }}<br/> {{ status.uptimeReadable }}, {{ status.players }}/{{ status.playersMax }}<br/>
{{ status.lua.ip }} : {{ status.lua.loginPort }} {{ config.lua.ip }} : {{ config.lua.loginPort }}
<br/><br/><u><a id="more-button" href="#"></a></u> <br/><br/><u><a id="more-button" href="#"></a></u>
<span id="status-more"> <span id="status-more">

View File

@@ -19,7 +19,12 @@
</tr> </tr>
<tr> <tr>
<td>PHP:</td> <td>PHP:</td>
<td><input type="checkbox" id="php" name="php" title="Check if page should be executed as PHP" value="1"{% if php %} checked="true"{% endif %}{% if action == 'edit' %} disabled{% endif %}/></td> <td>
<input type="checkbox" id="php" name="php" title="Check if page should be executed as PHP" value="1"{% if php %} checked="true"{% endif %}{% if action == 'edit' %} disabled{% endif %}/>
{% if action == 'edit' %}
<input type="hidden" name="php" value="{% if php %}1{% else %}0{% endif %}"/>
{% endif %}
</td>
</tr> </tr>
<tr> <tr>
<td>Content:</td> <td>Content:</td>

View File

@@ -14,7 +14,7 @@
{% set players_count = players|length %} {% set players_count = players|length %}
{% set afk = players_count - status.players %} {% set afk = players_count - status.players %}
{% if afk < 0 %} {% if afk < 0 %}
{% set players = players + afk|abs %} {% set players_count = players_count + afk|abs %}
{% set afk = 0 %} {% set afk = 0 %}
{% endif %} {% endif %}
Currently there are <b>{{ status.players }}</b> active and <b>{{ afk }}</b> AFK players.<br/> Currently there are <b>{{ status.players }}</b> active and <b>{{ afk }}</b> AFK players.<br/>

View File

@@ -108,11 +108,14 @@
<tr> <tr>
<td > <td >
<div style="float: right; margin-top: 20px;" > <div style="float: right; margin-top: 20px;" >
{% spaceless %}
<form class="MediumButtonForm" action="{{ getLink('account/create') }}" method="post" > <form class="MediumButtonForm" action="{{ getLink('account/create') }}" method="post" >
<div class="MediumButtonBackground" style="background-image:url({{ template_path }}/images/global/buttons/mediumbutton.gif)" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="MediumButtonOver" style="background-image:url({{ template_path }}/images/global/buttons/mediumbutton-over.gif)" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ></div> <div class="MediumButtonBackground" style="background-image:url({{ template_path }}/images/global/buttons/mediumbutton.gif)" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);">
<div class="MediumButtonOver" style="background-image:url({{ template_path }}/images/global/buttons/mediumbutton-over.gif)" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);"></div>
<input class="MediumButtonText" type="image" name="Create Account" alt="Create Account" src="{{ template_path }}/images/global/buttons/mediumbutton_createaccount.png" /> <input class="MediumButtonText" type="image" name="Create Account" alt="Create Account" src="{{ template_path }}/images/global/buttons/mediumbutton_createaccount.png" />
</div> </div>
</form> </form>
{% endspaceless %}
</div> </div>
<div id="LoginCreateAccountBox" > <div id="LoginCreateAccountBox" >
<p><b>{{ config.lua.serverName }}...</b></p> <p><b>{{ config.lua.serverName }}...</b></p>

View File

@@ -1785,6 +1785,37 @@ img {
color: white; color: white;
} }
/* BUTTONS */
.MediumButtonText {
position: absolute;
top: 0;
left: 0;
height: 37px;
width: 150px;
z-index: 20;
}
.MediumButtonBackground {
position: relative;
top: 0;
left: 0;
width: 150px;
height: 37px;
z-index: 10;
}
.MediumButtonOver {
position: relative;
top: 0;
left: 0;
width: 150px;
height: 37px;
visibility: hidden;
z-index: 15;
}
.MediumButtonForm {
margin: 0;
padding: 0;
}
.moduleRow { } .moduleRow { }
.moduleRowOver { .moduleRowOver {

View File

@@ -279,7 +279,7 @@ if(isset($config['boxes']))
<img id="TibiaLogoArtworkTop" src="<?php echo $template_path; ?>/images/header/<?php echo $config['logo_image']; ?>" onClick="window.location = '<?php echo getLink('news')?>';" alt="logoartwork" /> <img id="TibiaLogoArtworkTop" src="<?php echo $template_path; ?>/images/header/<?php echo $config['logo_image']; ?>" onClick="window.location = '<?php echo getLink('news')?>';" alt="logoartwork" />
<img id="TibiaLogoArtworkBottom" src="<?php echo $template_path; ?>/images/header/tibia-logo-artwork-bottom.gif" alt="logoartwork" /> <img id="TibiaLogoArtworkBottom" src="<?php echo $template_path; ?>/images/header/tibia-logo-artwork-bottom.gif" alt="logoartwork" />
<img id="Statue_2" src="<?php echo $template_path; ?>/images/header/animated-statue.gif" alt="logoartwork" /> <img id="Statue_2" src="<?php echo $template_path; ?>/images/header/animated-statue.gif" alt="logoartwork" />
<img id="LogoLink" src="<?php echo $template_path; ?>/images/header/tibia-logo-artwork-string.gif" onClick="window.location = 'mailto:<?php echo $config['lua']['ownerEmail']; ?>';" alt="logoartwork" /> <img id="LogoLink" src="<?php echo $template_path; ?>/images/header/tibia-logo-artwork-string.gif" onClick="window.location = 'mailto:<?php echo $config['mail_address']; ?>';" alt="logoartwork" />
</div> </div>
<div id="Loginbox" > <div id="Loginbox" >
@@ -442,6 +442,6 @@ foreach($config['menu_categories'] as $id => $cat) {
function logo_monster() function logo_monster()
{ {
global $config; global $config;
return str_replace(" ", "", trim(mb_strtolower($config['logo_monster']))); return str_replace(" ", "", trim(strtolower($config['logo_monster'])));
} }
?> ?>