Compare commits

...

832 Commits

Author SHA1 Message Date
slawkens
095ff7963d Update CHANGELOG.md 2022-08-31 19:01:30 +02:00
slawkens
dfb8be07f0 Fix: get_version for release 2022-08-31 18:56:48 +02:00
slawkens
74b4d98bba Update to 0.8.7 2022-08-31 18:45:57 +02:00
slawkens
8a7e4f0132 Update CHANGELOG.md 2022-08-31 18:45:40 +02:00
slawkens
6ebdb0ba89 Update CHANGELOG.md 2022-08-31 18:45:13 +02:00
slawkens
33817e5ab1 Fix undefined notice
Ahh @gpedro ;)
2022-08-31 18:43:42 +02:00
slawkens
cd1b481de5 Delete VERSION 2022-08-16 17:38:50 +02:00
slawkens
ab99db62bd Update version 2022-08-15 20:14:24 +02:00
Gabriel Pedro
dd3d6b3f47 feat: custom words blocked (#190)
* Update config.php

* Update validator.php

* Update config.php
2022-07-30 22:53:19 +02:00
Gabriel Pedro
d99f507244 fix: query blob param escape (#200) 2022-07-30 22:47:44 +02:00
Gabriel Pedro
b6c8a0923f feat: config use character sample skill (#201) 2022-07-27 10:12:30 +02:00
davi costa
0663b3bbf4 fix guild invite page (#196)
* fix guild invite

* removing var_dump

* sending error
2022-06-05 16:52:22 +02:00
slawkens
d683fce2b9 Fix #171 2022-06-04 21:43:37 +02:00
slawkens
3d56214c07 Fix #195 2022-06-04 20:45:12 +02:00
slawkens
e2575c3612 Don't count deleted players (patched from develop) 2022-05-31 11:54:56 +02:00
slawkens
084256ce01 Comment useless log line 2022-05-16 20:37:36 +02:00
slawkens
240be18367 Update login.php for latest TFS 1.x and otservbr
Works in both.
Thanks for Znote for rfc6238 lib.
2022-05-16 20:31:19 +02:00
slawkens
ac271839a6 Merge branch 'master' of https://github.com/otsoft/myaac 2022-05-16 14:33:53 +02:00
slawkens
734a63f6c3 Fix #191
Allow admin to create GM, God etc. names
2022-05-16 14:33:50 +02:00
thatmichaelguy
e73daedd42 Update change_rank.php (#194) 2022-04-26 21:17:40 +02:00
slawkens
802e6c228c login.php is now part of official repo
Big thanks to folks from OpenTibiaBR Team
Will be updated in next commits to support latest TFS too
2022-04-15 19:34:12 +02:00
slawkens
edf2004539 Fiz wrong path in .gitignore 2022-04-15 19:30:38 +02:00
slawkens
9e949eb32a Fix highscores page bug with high pages 2022-03-16 16:56:03 +01:00
slawkens
e255c35002 Add tables.headline
For future reference
2022-02-26 17:50:50 +01:00
slawkens
dfd3c2c4a5 <div> should not be inside of <table> element 2022-02-26 17:50:31 +01:00
slawkens
876543f064 Fix monsters reloading
Was wrong code applied from develop branch
2022-02-26 17:27:10 +01:00
slawkens
e10f82e0e9 Fix typo 2022-01-07 08:32:37 +01:00
slawkens
f496a48a4d Add notice about branch for contributions 2022-01-07 08:28:33 +01:00
slawkens
1fbb7c373e Fixes (config.news_author, group_name|capitalize) 2022-01-02 07:31:57 +01:00
slawkens
d58d7f79e7 Save php sessions in myaac dir
Instead of default PHP location
This fixes problem with permissions
2021-12-28 07:28:16 +01:00
slawkens
0643c56bc5 move contributing to wiki 2021-12-27 10:03:10 +01:00
slawkens
c51acf9dbd Add browsehappy code 2021-12-22 07:03:05 +01:00
slawkens
2f2a326eac Revert "Update CHANGELOG.md"
This reverts commit 10dad0fb4e.
2021-12-16 20:17:44 +01:00
slawkens
10dad0fb4e Update CHANGELOG.md 2021-12-16 20:17:24 +01:00
slawkens
fe01070bd1 Update README.md 2021-12-07 19:44:55 +01:00
slawkens
b558109844 Update README.md 2021-12-07 19:41:11 +01:00
slawkens
ac37802b7a Typo. 2021-12-04 14:38:17 +01:00
slawkens
f9c8027c3f Fix undefined variable notice 2021-11-04 19:54:27 +01:00
Silic0n Alph4
28dd1969b3 Fix rules page formatting (#177)
The rules page uses a textarea to show lines break.
This commit replaces the textarea and uses the Twig
nl2br function to format the text for web browsers.

Fixes #176
2021-10-30 19:29:36 +02:00
anyeor
50270f6d6f Update nginx-sample.conf (#175)
Now we prevent access to system directory and update php version.
2021-10-28 21:39:38 +02:00
slawkens
fad80307d8 Revert "Adjustments"
This reverts commit 323d1b0504.
2021-10-23 12:15:58 +02:00
slawkens
323d1b0504 Adjustments 2021-10-23 12:00:52 +02:00
slawkens
d6c1232d2d Update .gitignore 2021-10-23 11:52:20 +02:00
silic0nalph4
678d719036 Fix: admin page changed feet to match body colour (#174)
When saving changes to a character, the admin page
overwrote their foot colour with the body colour.
This fix renders the correct variable into the page
so the foot colour is preserved.
2021-10-20 20:58:28 +02:00
slawkens
723e81e90e Fix: undefined variable notice on database_log enabled 2021-08-30 16:10:54 +02:00
slawkens
60d2cfea99 Fix #169 2021-08-11 22:47:59 +02:00
slawkens
84c39676ee Fix account character create if auto_login is enabled 2021-07-27 18:42:52 +02:00
slawkens
a11d038c1d Update to 0.8.6 2021-07-10 23:35:57 +02:00
slawkens
2f627bf4b0 VERSION needs eol=lf 2021-07-10 23:35:02 +02:00
slawkens
67c603ef94 Fix some unexpected behaviour in release.sh on "cd" command 2021-07-10 23:24:48 +02:00
slawkens
dec63f353f Update to 0.8.6-dev 2021-07-05 03:13:30 +02:00
slawkens
7ab6b026fb Move admin pages part 2 2021-07-05 03:11:42 +02:00
slawkens
a2a773d714 This is the actual security fix 2021-07-05 02:59:41 +02:00
slawkens
aa26a71949 Revert "Security fix"
This reverts commit ef2a408298.
2021-07-05 02:51:45 +02:00
slawkens
e3c695175b Update admin files path 2021-07-04 07:10:46 +02:00
slawkens
ccdcdd01d8 Move admin files 2021-07-04 06:50:34 +02:00
slawkens
ef2a408298 Security fix
Don't allow slash in URL
2021-07-03 08:38:32 +02:00
slawkens
6a4dbcef62 Fix release.sh (some warning) 2021-06-08 23:18:24 +02:00
slawkens
c8a87a2a8a Update CHANGELOG.md 2021-06-08 22:26:54 +02:00
slawkens
d0bfe93d38 Update VERSION 2021-06-08 22:26:14 +02:00
slawkens
75df8c5a6a Update VERSION 2021-06-08 22:20:57 +02:00
slawkens
b55813e362 Update to v0.8.5 2021-06-08 22:19:52 +02:00
slawkens
575f0c62b4 Update CHANGELOG.md 2021-06-08 22:18:42 +02:00
slawkens
3e9544f1dc Fix forum boards white color style
So it works on all templates
2021-06-08 22:16:42 +02:00
slawkens
152e5ac70e Fix forum table style (boards & thread view) 2021-06-08 22:16:03 +02:00
slawkens
3544643a07 Fix guild back buttons (change logo & motd) 2021-06-08 22:15:47 +02:00
slawkens
f7ae76d10f Remove unneeded escape 2021-06-08 22:15:31 +02:00
slawkens
add9370696 Update CHANGELOG.md 2021-06-08 22:15:17 +02:00
anyeor
cadc17cc52 Update 404 response (#163)
Updating for new SPL standard.
2021-06-05 05:17:51 +02:00
slawkens
878dfc5a01 bcsub is not needed here
bcmath module is not required anymore
2021-05-01 01:21:22 +02:00
slawkens
2400f7c20a Fix #158 Thanks @Misztrz 2021-05-01 01:05:19 +02:00
czbadaro
9d7854dda6 Gratis premium account (#156)
* skip premdays and lastdays calculation when premdays = 65535 (gratis premium in TFS)

* TFS consider 65535 as gratis premium account and PHP_INT_MAX does not assume this value

* adds condition of premdays=65535 and standardize the label "gratis premium account" with tibia client

* adjust the label "days" when there is only one day of premium account

* adjusted premium account status

* Some small adjustment

* Sorry, typo.

Co-authored-by: slawkens <slawkens@gmail.com>
2021-04-22 22:49:42 +02:00
slawkens
7303aabc2b Some small fix regarding parsing creature name from request 2021-04-22 19:13:37 +02:00
slawkens
ab478f488a Fix some unexpected behaviour in characters.php
Just in case someone uses $storage variable somewhere in their code
Thanks TheEther
2021-04-14 02:20:26 +02:00
slawkens
c7a2b090d7 Fix guild list description new lines <br> being ignored
Thanks TheEther for reporting
2021-04-08 22:08:37 +02:00
slawkens
f2c3b6362d Fix travis 2021-02-23 23:13:22 +01:00
slawkens
c664be7b74 Update version to 0.8.5-dev 2021-02-23 15:10:44 +01:00
slawkens
aa17ddbf24 Fix compatibility with PHP 7.0 and lower 2021-02-23 15:10:03 +01:00
slawkens
62faacbed6 Update CHANGELOG.md 2021-02-18 18:41:58 +01:00
slawkens
d03d6e2ec1 Release of v0.8.4 2021-02-18 18:19:04 +01:00
slawkens
93a1760263 Patch "Delete char with house" from develop
Co-Authored-By: Lee <42119604+Leesneaks@users.noreply.github.com>
2021-02-16 02:18:13 +01:00
Lee
0de8894e4d #142 Guildnick fix
Fixes the Guildnick not showing in the guild pages.
2021-02-16 02:10:30 +01:00
slawkens
e95ea22dbd Revert "Fix phpmailer array style (PHP 8.0)"
This reverts commit 0ba886bc6b.
2021-02-16 01:56:21 +01:00
slawkens
5dbfde62a6 Update .travis.yml 2021-02-16 01:56:11 +01:00
slawkens
0ba886bc6b Fix phpmailer array style (PHP 8.0) 2021-02-16 01:42:42 +01:00
slawkens
2684205b5a More fixes for PHP 8.0 2021-02-16 01:39:58 +01:00
slawkens
856507fb66 Update .travis.yml 2021-02-16 01:33:53 +01:00
slawkens
d019fbc050 Attempt to fix travis build 2021-02-16 01:31:48 +01:00
slawkens
129d5653e6 Apply changes from develop branch 2021-02-16 01:18:01 +01:00
slawkens
9560ad0c20 Add missing migration from 0.9 2021-02-16 01:06:03 +01:00
slawkens
a4fa7567aa Increase size of myaac_visitors.page column to 2048
Thanks to OtLand user kaleuui (https://otland.net/threads/myaac-v0-8-3.268654/page-11#post-2643853)
2021-02-16 01:05:29 +01:00
slawkens
9ff032740c Minimum PHP 5.6 is now required 2021-02-16 00:30:56 +01:00
slawkens
dbc76abcdd Fix compatibility with PHP 8.0 (latest XAMPP)
Solution by doctrine developers
2021-02-16 00:29:09 +01:00
slawkens
746a5dc816 Fix setPremDays for latest TFS
Fixes editing account in admin panel
2021-02-15 21:05:19 +01:00
slawkens
194d110079 Fixed account getPremDays() function for latest TFS
This fixes account management + signature
2021-02-15 20:57:54 +01:00
slawkens
eed490507c Fix parsing empty strings in config.lua (with comments) 2021-02-13 22:56:53 +01:00
slawkens
2800ab1e88 Fix headling.php cannot find font 2021-02-13 22:35:57 +01:00
slawkens
faf40f8bed Fix typo 2021-02-13 22:08:38 +01:00
slawkens
3f12ee40ac Update .gitignore 2021-02-13 21:55:35 +01:00
slawkens
b4532bd473 Add ./login.php to .gitignore 2021-02-13 21:55:08 +01:00
slawkens
b389874a7e Ignore arrays in config.lua (fixes experienceStages loading)
In future we want to parse arrays too, this is just a temporary solution
Thread: https://otland.net/threads/myacc-problem.274795/
2021-02-13 21:54:12 +01:00
slawkens
ea2dc69f7c Add more clients to clients.conf.php 2021-01-18 01:49:08 +01:00
slawkens
b0593b0ae1 Fixed the check if vocations.xml were correctly loaded 2021-01-17 17:44:53 +01:00
slawkens
664348e475 Merge branch 'master' of https://github.com/slawkens/myaac 2021-01-17 17:16:02 +01:00
slawkens
e3e00f0109 Just typo.. 2021-01-17 17:15:54 +01:00
slawkens
d3850280f4 Add some badges to README.md 2021-01-17 10:18:43 +01:00
slawkens
d8b3b41358 Remove facebook.js, replace with direct live link
This fixes some console errors
2021-01-07 23:34:17 +01:00
slawkens
e7706cad74 Use local storage for saving menu items
Fixes a bug when visiting with browser: www.wykop.pl, and then navigating back to myaac (browser freeze)
2021-01-07 22:43:39 +01:00
slawkens
727d6788fe Password can now contain any characters
Also added limit of 29 characters (client limitation)
2020-12-30 00:28:42 +01:00
slawkens
e3ecf8ec96 Fix notice about premend 2020-12-30 00:28:05 +01:00
slawkens
1999b19a1c Add support for accounts.premium_ends_at (Latest tfs 1.x) 2020-12-30 00:11:46 +01:00
slawkens
c55e2910ac On prod it won't display any PHP errors
As suggested by PHP Manual
2020-12-29 22:11:58 +01:00
slawkens
ad3694ef96 Add SSL on external image requests of items and outfits
Co-Authored-By: Fernando Matos <fernando@pixele.com.br>
2020-12-26 23:45:36 +01:00
slawkens
7fd784b2f6 You cannot delete character more than twice (Thanks Okke) 2020-11-24 16:13:23 +01:00
slawkens
d8f0ac5880 Update .gitignore 2020-11-02 23:29:54 +01:00
slawkens
b4ee4de110 Bump version to 0.8.4-dev 2020-11-02 23:19:38 +01:00
slawkens
b9713fea76 Fix branch 2020-10-27 08:10:23 +01:00
slawkens
c6dd937922 Release 0.8.3 2020-10-27 07:53:11 +01:00
slawkens
81d4158c03 Update CHANGELOG.md 2020-10-27 07:51:30 +01:00
slawkens
bf0e6ff862 Add accept=".zip" to plugin upload file 2020-10-24 05:32:28 +02:00
slawkens
8518afe70d Fix two boxes being show on email_change_cancel 2020-10-12 22:30:04 +02:00
slawkens
091ab688e7 Fix when adding poll = template tibiacom broken
With Exception and red message
2020-10-12 21:59:47 +02:00
slawkens
2e5b066d88 Remove duplicated code 2020-10-09 20:07:56 +02:00
slawkens
cd3a15feab Add pdo_mysql as required extension
+ Some code refactoring
2020-10-09 20:07:20 +02:00
slawkens
836499a48c Fix some PhpStorm editor error message 2020-10-09 20:06:08 +02:00
slawkens
4983816ff6 Change wrong table header: Description -> Version 2020-10-09 20:03:39 +02:00
slawkens
0326657d60 Fix creating very uncommon (bugged) account names 2020-07-07 01:23:36 +02:00
slawkens
fcff820858 Fix #131 2020-07-07 00:53:56 +02:00
whiteblXK
dc536f0fc0 Added limit to search characters (#134)
* Update characters.php

* Update config.php

* Variable name change, better use LIMIT in query instead in loop

* Just to be sure. Security first :)

* use config function

Co-authored-by: slawkens <slawkens@gmail.com>
2020-07-07 00:31:50 +02:00
slawkens
f958b8dd4f Change hasTable -> hasColumn 2020-07-07 00:16:09 +02:00
slawkens
352d3b1bde Merge pull request #133 from whiteblXK/patch-1
Fixed bug with showing hidden characters
2020-07-06 23:59:50 +02:00
whiteblXK
f3061a0e74 Fixed bug with showing hidden character 2020-07-06 23:07:18 +02:00
slawkens
d4222e98e6 Fix #132 2020-07-03 23:24:46 +02:00
slawkens
8dd07d4873 Fix account create when account_mail_verify is enabled 2020-07-03 22:44:21 +02:00
slawkens
5f891fb9d6 Add some notice about Email validation 2020-07-03 22:15:27 +02:00
slawkens
b3b6d0ff5d Fix for CloudFlare IP detection 2020-07-03 20:38:48 +02:00
slawkens
0ac01b3f0d Fix undefined constant 2020-06-26 23:57:22 +02:00
slawkens
c6e55edb09 Fix network_twitter link in tibiacom template 2020-06-20 08:50:11 +02:00
slawkens
dfc70c098f Fix XSS in character search 2020-06-06 18:32:22 +02:00
slawkens
c1d1e9596a Update CHANGELOG.md 2020-06-06 18:01:40 +02:00
slawkens
53078e046e Fix admin menu news editing warning when leaving page without touching the inputs 2020-06-06 17:57:23 +02:00
slawkens
2af968031c Update version to 0.8.3-dev 2020-06-06 09:10:37 +02:00
slawkens
bdd3c394a3 Move register DATABASE_VERSION into schema.sql
Caused migrations being fired when user manually imported database
2020-06-06 07:33:33 +02:00
slawkens
f719b3c112 Update CHANGELOG.md 2020-06-03 23:56:13 +02:00
slawkens
8e0001a635 Fix release branch 2020-06-03 23:47:46 +02:00
slawkens
5b3581b88e Update CHANGELOG.md 2020-06-03 21:39:47 +02:00
slawkens
ca1436ea3f Fix #123 Guild Invite not working on otservbr-global 2020-06-03 21:35:45 +02:00
slawkens
5cd6b79ee0 Revert some change I did
Causing "'" and "-" being accepted as first character in player name
2020-06-03 21:21:28 +02:00
slawkens
0ec5942ee4 Update CHANGELOG.md 2020-06-03 21:04:49 +02:00
slawkens
90af164a8a Release v0.8.2 2020-06-03 21:02:33 +02:00
slawkens
fd83ee37ae Update CHANGELOG.md for 0.8.2 release 2020-06-03 21:01:36 +02:00
slawkens
8e935e62be Avoid ERR_TOO_MANY_REDIRECTS on template change
(cherry picked from commit 523afccb51)
2020-06-03 20:42:52 +02:00
slawkens
a0d38b1f36 Fix #128 (Remove MyISAM engine) from migration scripts
(cherry picked from commit 2c09b0ae86)
2020-06-03 20:42:41 +02:00
slawkens
6b49ecc99a Fix message() function when executed in CLI
(cherry picked from commit 8de8ad13bf)
2020-06-03 20:42:36 +02:00
slawkens
ae24a464dc Add new constant: IS_CLI
Also fixed some warnings when running in CLI mode

(cherry picked from commit 70bd442bb0)
2020-06-03 20:42:29 +02:00
slawkens
f519784cae Fix #126 (Max count and chance not shown)
(cherry picked from commit 5250b3189b)
2020-06-03 20:42:10 +02:00
slawkens
601cbd5ab7 dummy me.. thanks @gerotib
(cherry picked from commit 2534651e20)
2020-06-03 20:42:05 +02:00
Lee
fd4a507645 Update version.php
- removed extra line that is added when using a newer version than official release.

(cherry picked from commit e2ab301340)
2020-06-03 20:41:53 +02:00
slawkens
bf8d07226e Fix #125 (wrong mana of character samples)
Should be 90.

(cherry picked from commit 700f835243)
2020-06-03 20:41:36 +02:00
slawkens
fcddfb6adf Remove duplicated code
(cherry picked from commit 9ce7162a04)
2020-06-03 20:41:23 +02:00
slawkens
5fcd97129e Rewrite towns support for TFS 1.3
Won't show warning anymore

(cherry picked from commit cd58008a0f)
2020-06-03 20:41:14 +02:00
slawkens
af3a1c2f55 Add error_reporting in admin panel
Same as in main page

(cherry picked from commit 1f6bd975d0)
2020-06-03 20:41:08 +02:00
slawkens
13584a4d96 Move migration into separate file + add into admin panel
This fixes some rare bugs when database is no up-to-date and someone enters admin panel

(cherry picked from commit dbe83f8a74)
2020-06-03 20:40:52 +02:00
slawkens
6de4953d50 Change input type of account_login to text
This fixes autofill by Chrome and other tools

(cherry picked from commit fb326d0354)
2020-06-03 20:40:21 +02:00
slawkens
b15c213890 Add executing missing migration on install
This fixes missing rules on clean install

(cherry picked from commit 8e04328482)
2020-06-03 20:40:13 +02:00
slawkens
2f52e5d9f3 Fixes in create new character nick
+ fixed config.character_name_min/max_length being ignored in change_name.php

(cherry picked from commit d148b71f0f)
2020-06-03 20:39:52 +02:00
Lee
1d6afea9c4 CreateChar Fix
-checks if name has double space on create character (#121)

(cherry picked from commit 4e68838172)
2020-06-03 20:35:13 +02:00
slawkens
8d79efd6ad Add system/data to .gitignore
(cherry picked from commit 1799ef42a7)
2020-06-03 20:34:47 +02:00
slawkens
99bcd54afe Fix cancel change email request
Thanks to OtLand user anyeor

(cherry picked from commit df59b104db)
2020-06-03 20:34:36 +02:00
slawkens
6ce6eee529 Fix exception when characters.frags enabled on TFS 1.x
(cherry picked from commit ee6e68d0bf)
2020-06-03 20:34:19 +02:00
slawkens
054b40e358 Add example quest
(cherry picked from commit 7c208b38ed)
2020-06-03 20:33:53 +02:00
slawkens
92c0671da2 Fix for TFS 0.4 guilds creation
Where guilds.checkdata and motd doesn't have default value
2020-03-28 10:03:31 +01:00
slawkens
33d7a0436b Fix when HTTP_HOST is not set
Can happen on some old versions of HTTP protocol
2020-03-27 22:32:10 +01:00
slawkens
0525295d7e Fix admin links in featured article 2020-03-26 02:56:29 +01:00
slawkens
87e54ac14f Fix news not updating after adding in admin panel 2020-03-26 02:45:34 +01:00
slawkens
e7fa5eb38a Log query time in database_log 2020-03-26 02:03:32 +01:00
slawkens
71b4f4a64a Add outfit to highscores box in tibiacom template 2020-03-23 15:46:43 +01:00
slawkens
64de46943b Remove unused myaac_commands table from schema 2020-03-21 06:00:21 +01:00
slawkens
90d691f251 Update CHANGELOG.md 2020-03-21 05:16:47 +01:00
slawkens
df2d83b8a0 Fix updating template menus on template change 2020-03-21 05:16:12 +01:00
slawkens
ab94d0e752 Fix OTS_House houseid parameter 2020-03-17 22:41:37 +01:00
slawkens
b4645553f2 Update to 0.8.2-dev 2020-03-14 23:23:14 +01:00
slawkens
324ebcc997 Fix show character indicator in check_name.js 2020-03-14 22:36:19 +01:00
slawkens
b7bb570420 Fix change info when config.account_country is disabled
Some PHP warnings and notices
2020-03-14 14:24:14 +01:00
slawkens
c991e085d4 Add $_SERVER['REQUEST_URI'] to database.log 2020-03-14 13:52:01 +01:00
slawkens
4e935719d3 Change account_login input type from password to text
This allows for browsers to save username & password
2020-03-14 13:51:47 +01:00
slawkens
22b71ae477 Fix houses list View button 2020-03-14 11:33:48 +01:00
slawkens
305884b5ee Release 0.8.1 2020-03-10 00:34:03 +01:00
slawkens
9c143a3461 Fix reloading creatures 2020-03-10 00:27:46 +01:00
slawkens
d94499af86 Fix displaying spells when level = 0 2020-02-29 23:14:42 +01:00
slawkens
91fd6cb4e6 Update CHANGELOG.md 2020-02-28 22:23:52 +01:00
slawkens
fcfad7cef9 Fix #108 2020-02-28 22:11:04 +01:00
slawkens
7424901aca Change tooltip css class to item_image (bootstrap conflict) 2020-02-28 21:50:21 +01:00
slawkens
8c680608ff Fix more PHP warnings and notices 2020-02-28 21:49:47 +01:00
slawkens
f8ef1b3b61 Remove duplicate css code 2020-02-28 21:29:43 +01:00
slawkens
2c114aa559 Fix some PHP warning 2020-02-28 20:20:56 +01:00
slawkens
daf8beaf26 Update CHANGELOG.md 2020-02-27 23:21:23 +01:00
slawkens
959788cee8 Cache database tables & columns for 1 hour 2020-02-27 23:10:15 +01:00
slawkens
7b75a61cdb Support for Nostalrius
https://github.com/TwistedScorpio/Nostalrius
2020-02-27 22:18:39 +01:00
slawkens
c071d65c67 Add missing labels 2020-02-25 21:35:28 +01:00
slawkens
044271ad00 Change button look 2020-02-25 21:35:09 +01:00
slawkens
b8130d3fd3 Fix class name in highscores 2020-02-25 20:36:14 +01:00
slawkens
4468f3dd37 Add some notice 2020-02-25 20:36:04 +01:00
slawkens
0c9219f885 Fixed CHANGELOG.md loading in Admin Panel 2020-02-25 10:33:57 +01:00
slawkens
25ab4e187c Fixed some weird behaviour with installation of plugins 2020-02-25 10:12:07 +01:00
slawkens
83a51eebfb Fix apache 500 error on admin
when no config.local.php exist
2020-02-25 09:26:50 +01:00
slawkens
6e99c6d41f Move TODO to wiki 2020-02-24 22:21:16 +01:00
slawkens
ad570688c9 Add cache/plugins to clearCache functions 2020-02-22 16:24:16 +01:00
slawkens
8378bc0d57 Update version to 0.8.1-dev 2020-02-22 06:52:47 +01:00
slawkens
c74bef475b Update config.php 2020-02-21 23:02:39 +01:00
slawkens
3224dd9862 Update TODO: Separate polls & bugtracker from the base 2020-02-21 22:14:15 +01:00
slawkens
adf47bb31c Merge branch 'master' of https://github.com/slawkens/myaac 2020-02-21 22:13:38 +01:00
slawkens
66cb0455fd Better release.sh script
It exports from git now, so no removing files is required cause it uses export-ignore from .gitattributes
It also allows edits before release is packed
Usage: ./release.sh prepare
Then:
./release.sh pack
2020-02-21 22:13:20 +01:00
slawkens
d56965552f Update TODO: ReCAPTCHA v3 2020-02-19 10:51:12 +01:00
slawkens
07946cbeb2 Update TODO: Google ReCAPTCHA on login pages 2020-02-19 10:22:08 +01:00
slawkens
33de478450 Update year 2020-02-18 23:48:23 +01:00
slawkens
bf867c522a Update version to 0.8.0 2020-02-18 23:46:51 +01:00
slawkens
b3a4ffd4a7 Add tmp to .gitignore 2020-02-18 23:33:33 +01:00
slawkens
ff2b9c7988 Add release.sh to export-ignore 2020-02-18 23:30:21 +01:00
slawkens
ad072ea83a Add PHP 7.3 & 7.4 to Travis-CI 2020-02-18 16:38:08 +01:00
slawkens
9dae06b589 Enable cache in Travis-CI 2020-02-18 16:36:56 +01:00
slawkens
09db8e072e Fix typo 2020-02-18 15:16:29 +01:00
slawkens
5ac6ff1405 Add new TODO: install AAC from command line 2020-02-18 13:22:54 +01:00
slawkens
9b3dbdc54f Save mailer error messages to file (always)
Filename: mailer-error.log
This will help debugging mail sending for new users
2020-02-15 23:57:15 +01:00
slawkens
e11d70de46 Log database queries into database.log when enabled
Instead of showing in page sources (it was impractical)
2020-02-15 23:18:10 +01:00
slawkens
f3ddf631c1 Fix typo 2020-02-15 23:13:35 +01:00
slawkens
f1c95b315c Update CHANGELOG.md 2020-02-15 22:47:15 +01:00
slawkens
518ae4d97a * don't install plugin when requirements are not satisfied 2020-02-15 22:41:52 +01:00
slawkens
2a9c28e63b Update .gitignore 2020-02-15 17:35:01 +01:00
slawkens
900500ef28 Update .gitignore 2020-02-15 17:34:28 +01:00
slawkens
27d76dfa42 Add system/cache/plugins/index.html 2020-02-15 17:33:42 +01:00
slawkens
51b848c43e Add RuntimeException if xml, pdo or zip PHP extension is missing
For a better User Experience ;)
2020-02-15 17:17:28 +01:00
slawkens
f005b7338f Add downloads.php to .gitignore 2020-02-15 17:03:07 +01:00
slawkens
04a88c9cbd Add plugins dir for images and tools 2020-02-15 17:02:29 +01:00
slawkens
7c0c85f650 PHP 5.5 is required 2020-02-15 16:54:58 +01:00
slawkens
ee9e939f88 Fix highscores online status for TFS 0.3/0.4
And all distributions, where players.online column is present
2020-02-15 08:27:06 +01:00
slawkens
e5ca3daa54 This isnt't required anymore 2020-02-15 05:42:23 +01:00
slawkens
8021308822 Update Twig from 1.35.0 to 1.42.4 (PHP 5.5 is now required!)
This fixes some errors on PHP 7.4 and contains even more fixes
Also bumped PHP version to 5.5 as Twig requires it.
2020-02-15 05:41:38 +01:00
slawkens
d9e449b6cf Forgot to remove this in last commit 2020-02-15 05:37:09 +01:00
slawkens
c94bb09123 New Autoloader (for Twig and Semver) 2020-02-15 05:23:42 +01:00
slawkens
1cd3ebf3bb Add PHP Version check on the start of loading 2020-02-15 05:07:51 +01:00
slawkens
2070f91a8f Temp fix for a space that Twig cuts.. 2020-02-15 03:53:33 +01:00
slawkens
5b6b37a867 Add some missing <br/> to online page 2020-02-15 03:30:20 +01:00
slawkens
2dbf189f43 Use $db->exec where appropriate
May bring some performance boost (little, but still)
2020-02-15 03:15:53 +01:00
slawkens
82e64559a8 Cache newses for 1 hour
+ Merge News classes into one and move to separate file
2020-02-15 02:47:53 +01:00
slawkens
d0d77b8775 Fix index.html deleting on cacheClear() 2020-02-15 02:40:16 +01:00
slawkens
35c4988c98 Merge branch 'master' of https://github.com/slawkens/myaac 2020-02-15 01:55:52 +01:00
slawkens
10cad086f6 Update TODO (templates -> views) 2020-02-15 01:55:50 +01:00
slawkens
4d5ba90d38 Create FUNDING.yml 2020-02-13 15:05:36 +01:00
slawkens
3eb75708de Update CHANGELOG.md 2020-02-13 01:16:30 +01:00
slawkens
b95d333dc9 Fix login button in guilds.view page 2020-02-13 01:15:48 +01:00
slawkens
887a080198 Update CHANGELOG.md for 0.8 series
Yeaaaa, the release is coming soon!!!
2020-02-13 01:07:42 +01:00
slawkens
8f3c3c6ba3 Update .gitignore 2020-02-13 01:06:44 +01:00
slawkens
f7c7552d5a Add some warning into config.env 2020-02-13 01:05:53 +01:00
slawkens
b61c6151eb This was wrong, Mr. @whiteblxk
As its not accounts table but players :)
2020-02-12 23:45:43 +01:00
slawkens
37e2849a3a Merge branch 'master' of https://github.com/slawkens/myaac 2020-02-12 23:43:53 +01:00
slawkens
a4eca93584 Add missing translation of already_installed in German 2020-02-12 23:20:43 +01:00
slawkens
13d0718780 RuntimeException instead of die() 2020-02-12 23:20:16 +01:00
slawkens
38693521b3 Set indent_style = tab on .md files 2020-02-12 23:00:23 +01:00
slawkens
447ddeb6d3 Remove .dist extension from .htaccess 2020-02-12 21:23:18 +01:00
slawkens
f11b2e9132 Update CHANGELOG.md from 0.7 branch 2020-02-12 20:20:20 +01:00
slawkens
9d69b9d173 Update CHANGELOG.md 2020-02-12 20:16:16 +01:00
slawkens
27a44bf9af Add more files to export-ignore 2020-02-12 16:54:58 +01:00
slawkens
b68077d969 Move rules to Admin Pages
Can be edited by user directly in Admin Panel now
2020-02-11 01:03:41 +01:00
slawkens
f475c671f7 Add enable_tinymce option to Pages editor 2020-02-11 01:02:46 +01:00
slawkens
1ab32ca3ba New functions: getCustomPage() and getCustomPageInfo() 2020-02-11 01:00:42 +01:00
slawkens
8345b839e7 Add info if PHP is enabled on the admin pages 2020-02-11 00:37:42 +01:00
slawkens
259cda150d Fix some 7.4 notices about OTS_Account bans
Example: Notice: Trying to access array offset on value of type bool in C:\UniServerZ\www\system\libs\pot\OTS_Account.php on line 784
2020-02-10 23:51:15 +01:00
slawkens
8146c90efa Remove stupid alerts on account create 2020-02-10 23:13:04 +01:00
slawkens
da3d078917 Forgot this.. 2020-02-10 23:12:06 +01:00
slawkens
72c79e005a Add some new hooks for the account/create page
Also moved some account-create text to plugins
2020-02-10 23:07:23 +01:00
slawkens
d252138867 Display plugin.description as raw 2020-02-10 22:49:26 +01:00
slawkens
c20183c547 extract params in the Hook->execute method 2020-02-10 22:43:38 +01:00
slawkens
cd94abb7fd Merge branch 'master' of https://github.com/slawkens/myaac 2020-02-10 22:42:10 +01:00
slawkens
f886245e3c Allow string to be passed to hook twig function 2020-02-10 22:42:02 +01:00
slawkens
4f413eec12 Update PHPMailerAutoload.php 2020-02-10 10:24:23 +01:00
slawkens
441bfe74c1 Fix "Deprecated: __autoload() is deprecated"
Deprecated: __autoload() is deprecated, use spl_autoload_register() i
2020-02-10 10:22:55 +01:00
slawkens
071289bc48 Add missing closing table </table> 2020-02-07 01:06:30 +01:00
slawkens
1ba2381437 Remove useless config variable 2020-02-07 01:06:19 +01:00
slawkens
1e5e576bd0 Some formatting fixes 2020-02-07 00:57:02 +01:00
slawkens
059b8824a2 Fix function name 2020-02-07 00:22:59 +01:00
slawkens
d7e6916d8f Fix comment 2020-02-07 00:22:44 +01:00
slawkens
c821f76f0f Forgot to remove this part
Also added delete hooks and template_menus from cache when uninstalling plugin
2020-02-03 23:30:57 +01:00
slawkens
e5ad1b45bd More info about smtp options for Microsoft Outlook 2020-02-03 20:49:58 +01:00
slawkens
08f011eb33 New configurable: smtp_debug 2020-02-03 20:48:11 +01:00
slawkens
1a6044090a Update .gitignore 2020-01-30 21:37:51 +01:00
slawkens
697bf590ff Restore cache and logs dirs 2020-01-30 21:37:31 +01:00
slawkens
4073da2431 Add -f flag (force) to rm commands 2020-01-22 00:34:39 +01:00
slawkens
fbca43b239 Nothing important, remove whitespaces.. 2020-01-22 00:34:10 +01:00
slawkens
a03a8bf0d5 Fix #51 2020-01-22 00:33:50 +01:00
slawkens
75d1ed6eea Add proper exit() code to bin/ commands 2020-01-21 18:18:29 +01:00
slawkens
dd1e604155 Add <IfModule *.c> and <IfVersion> to all .htaccess 2020-01-15 20:58:49 +01:00
slawkens
c7f2cab56a Remove useless .htaccess 2020-01-15 20:57:31 +01:00
slawkens
2bd372dbaa Add index.html to prevent autoindex
This fixes #101
2020-01-15 20:55:57 +01:00
slawkens
45ecc29e12 Add <IfModule *.c> to prevent some errors to .htaccess 2020-01-15 20:47:31 +01:00
slawkens
69d068e73f Remove duplicated code 2020-01-13 20:20:48 +01:00
slawkens
0f55211dc9 Nothing important: remove whitespaces... 2020-01-13 20:20:27 +01:00
slawkens
dbf09ef361 tableExist is deprecated 2020-01-13 20:20:08 +01:00
slawkens
e08557e5ae Remove myaac_hooks table, load info directly from .json files and cache them 2020-01-13 20:19:34 +01:00
slawkens
aaaba5cc84 Add landing plugin to .gitignore 2020-01-13 20:07:32 +01:00
slawkens
2cfd0242bd I'm back! Add .editorconfig 2020-01-13 19:49:32 +01:00
tobi132
0711d555e1 Fixed #99 2019-12-28 22:48:24 +01:00
tobi132
e8363d7310 Add send_email bash command
Usage:
echo message | php send_email.php account_name_or_id|player_name|email subject

Real example:
echo "Hello, this is my test email" | php send_email.php "God Slawkens" "Hello world E-Mail"
2019-12-28 11:08:49 +01:00
tobi132
be9ce34dc8 Fixed #98 2019-12-25 01:31:30 +01:00
tobi132
bb60d17ccc Forgot about look_addons 2019-12-09 20:52:00 +01:00
tobi132
1aa8062310 Interactive player outfit chooser 2019-12-09 20:20:22 +01:00
tobi132
711027e450 Move Admin Logs and Reports into Twig 2019-12-09 19:57:42 +01:00
tobi132
8115cc5ecc Better view of guilds (new buttons, table look and feel) 2019-12-03 05:20:31 +01:00
tobi132
8bae67d9ef Shortened duplicated code 2019-12-03 05:19:32 +01:00
tobi132
bc3fd61bde Move commands and downloads pages into database
Available under "Pages" in Admin Panel
2019-12-03 05:18:48 +01:00
tobi132
ba1d52d6dd Add hint @var OTS_MonstersList 2019-12-03 05:10:47 +01:00
tobi132
c02d0fc927 Add name as unique in myaac_pages table 2019-12-03 05:04:34 +01:00
tobi132
56738389f8 Allow Pages to be loaded as Twig template
You can now use Twig variables in Pages
Like:
{{ config.lua.serverName }}
2019-12-03 05:01:59 +01:00
tobi132
d511679dbd Fixed #93 2019-12-03 03:16:51 +01:00
tobi132
6b931de37d Update OTS_Base_List.php 2019-12-03 03:10:53 +01:00
tobi132
56e9d85fc2 Fixed #90
By reducing columns to 3 and rows to 200
2019-12-03 02:59:42 +01:00
tobi132
405f890dfc Add plugins to .gitignore 2019-12-03 02:58:53 +01:00
tobi132
1145c26f2b Add custom template to .gitignore 2019-12-03 02:57:42 +01:00
tobi132
3890222bbc Add guild images to .gitignore 2019-12-03 02:54:58 +01:00
tobi132
fba9f66a1f Fix for othire not finding lookaddons column 2019-12-03 01:31:35 +01:00
tobi132
668387e372 Database towns table support for TFS 1.3 2019-12-03 01:11:52 +01:00
tobi132
f85fad447e This is actually better approach to this problem
Show only message without trace
2019-12-03 00:52:28 +01:00
tobi132
56616b805f Revert "Security: Fixed leaking database password when can't connect"
This reverts commit a55ec208aa.
2019-12-03 00:51:14 +01:00
tobi132
b9729ad763 Fixed undefined $ret 2019-12-03 00:48:29 +01:00
tobi132
a26538c3f0 Display full path to the LOGS directory in SensitiveException 2019-12-03 00:37:23 +01:00
tobi132
a55ec208aa Security: Fixed leaking database password when can't connect
This fixes this:

https://otland.net/threads/myaac-leaking-user-database-password.266095/

Instead now, the error will be logged.
2019-12-03 00:36:57 +01:00
tobi132
1970a00bb6 "Has been logged"! "More information" 2019-12-03 00:28:25 +01:00
tobi132
1e2267bd31 Create character directly on create account page 2019-12-02 23:10:32 +01:00
tobi132
092a03e2cf Add some useful hints 2019-12-02 21:37:52 +01:00
tobi132
065661e419 Fix alignment to the center 2019-12-02 21:34:06 +01:00
tobi132
72d7dae7fa Remove whitespaces 2019-12-02 21:11:14 +01:00
tobi132
5624022064 Some non important change.. 2019-12-02 21:11:00 +01:00
tobi132
944d532ad1 Fix uppercase 2019-12-02 20:51:36 +01:00
tobi132
11727785c7 Deny access to /system directory in nginx config 2019-12-02 19:43:36 +01:00
tobi132
9b04dc0e44 Add some more exceptions to .gitignore 2019-12-02 19:43:07 +01:00
tobi132
ca4f786aa8 Update copyright year 2019-12-02 19:34:44 +01:00
tobi132
152114b054 Remove whitespaces 2019-12-02 19:34:13 +01:00
tobi132
6aef5ecf4b Update TODO 2019-11-03 12:42:40 +01:00
tobi132
645e7ee95f Compatibility with old z_ gesior table. This fixes #46 2019-10-17 23:42:02 +02:00
tobi132
798d0948d1 tinyint is better for sticked and closed 2019-10-17 23:39:30 +02:00
tobi132
008374748e Add showing database name into installation script 2019-10-17 22:35:26 +02:00
tobi132
3333ab4ade Fixed 'Please fill all inputs!' in some cases on install 2019-10-17 22:02:22 +02:00
tobi132
f8c2f0f01b Cache items for longer period (5 years actually) 2019-10-17 12:11:18 +02:00
tobi132
6dc62cca13 Use config.character_name_max_length instead of fixed length 2019-10-17 12:08:21 +02:00
tobi132
f3e9f17b85 Fix typo 2019-10-17 12:07:33 +02:00
tobi132
ed14f9ada0 Add optional $params param into log_append (will log arrays) 2019-10-17 12:07:08 +02:00
tobi132
9250f20559 Add get outfit to getTopPlayers (required very often) 2019-10-17 12:06:38 +02:00
tobi132
6157fdc007 Merge branch 'master' of https://github.com/slawkens/myaac 2019-09-20 19:13:20 +02:00
tobi132
5a97e53e21 Add mising fields into spells table, fix some mysql errors 2019-09-20 19:13:15 +02:00
Gabriel Pedro
901cb9eaf6 fix: players column deleted install description (#91) 2019-08-22 21:24:25 +02:00
tobi132
79de744936 Test travis-ci 2019-07-26 08:48:32 +02:00
tobi132
d8a70a3da6 Optimizations 2019-07-23 07:45:35 +02:00
tobi132
813de7eb3c Add configLua function 2019-07-23 07:45:21 +02:00
tobi132
410c15c997 Fixed getItemNameById function
Please reload your items in admin panel to make it work
2019-07-23 07:45:03 +02:00
tobi132
fb9ead2690 Fix typo 2019-07-22 12:14:54 +02:00
Gabriel Pedro
e7c381d651 * added travisci to prevent mistype (#89)
* feat: travis

* feat: travis

* feat: travis

* feat: travis

* feat: travis

* fix: typo
2019-07-22 12:12:01 +02:00
slawkens
dca74d7b11 Merge pull request #88 from EPuncker/master
Updated copyright year and SSL link
2019-07-19 16:54:19 +02:00
tobi132
415b31e1b4 Change to TEXT instead of VARCHAR. As suggested by @gpedro 2019-07-18 20:06:04 +02:00
Evil Puncker
af1a6cf5ff Updated copyright year and SSL link
Updated year to 2019 and made all my-aac.org links go to SSL by default
2019-07-17 20:22:07 -03:00
tobi132
d79ae8e927 fixed #79 by increasing loot column size 2019-07-17 22:21:07 +02:00
tobi132
49fe7a4b38 fixed #87 2019-07-17 19:01:44 +02:00
tobi132
f5374e8ce7 Allow simultaneous loading of config.ini and config.php in templates 2019-07-16 23:52:28 +02:00
tobi132
0c207ce12d This check is useless 2019-07-16 23:36:39 +02:00
tobi132
3945c2ad52 New, beautiful exception handler 2019-07-16 20:07:32 +02:00
tobi132
bc8f24afad Move items from database to Cache_PHP 2019-07-16 19:06:51 +02:00
tobi132
fd91d1fb06 Use correct limit at lastkills page from config
Thanks for anyeor from otland for this correction.
2019-07-16 18:50:42 +02:00
tobi132
6a81794bba Add load time into items & weapons loading admin page 2019-07-16 08:44:21 +02:00
tobi132
6a89b12258 Use config() instead of global $config, use exec instead of query 2019-07-16 08:22:26 +02:00
myaac
219f128cb7 Use more strict === 2019-07-12 22:12:19 +02:00
myaac
89a24442c4 Thanks @gpedro for this suggestion 2019-07-12 22:11:56 +02:00
slawkens
62eab175ab This shouldn't be saved into config 2019-06-10 02:11:17 +02:00
slawkens
e3af63bd93 * moved admin_panel_modules to config.php 2019-05-30 14:54:46 +02:00
slawkens
78454657ca * fixed IDE warning "Modifiers are misordered" 2019-05-30 14:33:46 +02:00
slawkens
7b770e09f7 * add @method annotations to Cache class
* code beautify
2019-05-25 00:20:20 +02:00
slawkens
933b25194c * cache hooks and template menus 2019-05-25 00:18:30 +02:00
slawkens
1cbe452f9c * remove unused and deprecated SQLquery and SQLquote functions 2019-05-24 23:46:45 +02:00
slawkens
920e9b915f * use $db->exec instead of query optimisation 2019-05-23 23:37:07 +02:00
slawkens
99e38b1b60 Merge pull request #82 from whiteblXK/master
Removed unnecessary "if" in guild.view twig
2019-05-16 18:20:30 +02:00
whiteblXK
2964089483 Fixed table(appearance) with main buttons in guild.view twig 2019-05-11 23:20:49 +02:00
whiteblXK
624a99b179 Removed unnecessary "if" in guild.view twig
* problem that doesn't show the option to kick people from the guild
2019-05-11 22:53:17 +02:00
slawkens
705277ceb5 * this comparison is useless 2019-05-10 20:17:57 +02:00
slawkens
bf709786f3 Merge pull request #80 from whiteblXK/master
Guild View to Twig and other changes
2019-05-10 20:15:55 +02:00
whiteblXK
bda7982134 Rest of Guild View to Twig 2019-05-06 23:26:01 +02:00
whiteblXK
abb2b36ae6 Added getGuildLink function to Twig 2019-05-06 22:44:03 +02:00
whiteblXK
945442a842 Fixed problem with guildnick 2019-05-06 22:41:52 +02:00
slawkens
30b231cfdf Merge pull request #78 from whiteblXK/master
Houses page, guilds list to twig
2019-05-04 22:51:27 +02:00
Ivens Pontes
cbdac66fd0 add locale pt_br, fix tibiacom canEdit ticker buttons (#77)
* add locale pt_br

* fix tibiacom canEdit ticker buttons

buttons did not work

* fix missing translation

* * add author and change notice
2019-05-04 00:24:14 +02:00
whiteblXK
257d4dbdad Typo, should be "List" 2019-05-03 19:17:28 +02:00
whiteblXK
69064839a7 Guilds List to twig 2019-05-03 19:12:07 +02:00
whiteblXK
ed6a740eee Fix undefined variable in serverinfo for old TFS 2019-05-03 14:08:46 +02:00
whiteblXK
d594fa1a54 Now it will properly shows Available Houses 2019-05-03 12:47:28 +02:00
whiteblXK
35e4cd4596 Houses page to twig 2019-04-29 20:42:03 +02:00
slawkens
24319ddc7a * fix some warnings when cache is disabled on status thing 2019-04-24 12:09:05 +02:00
slawkens
d3e3efd05e * new cache engine: plain php 2019-04-24 12:08:42 +02:00
slawkens
14cb37725e * new configurable: footer_show_load_time 2019-04-24 11:50:28 +02:00
slawkens
fc3bd432ef * simply ignore notice if key does not exist on config() 2019-04-24 11:23:18 +02:00
slawkens
b0a5220159 * display all php errors if env is dev 2019-04-24 00:41:37 +02:00
slawkens
9620ac7d25 * fix include path not found in install_plugin.php when running from other directory 2019-04-23 23:52:13 +02:00
slawkens
7b1989cef2 * add clear_cache.php bin command 2019-04-23 23:50:54 +02:00
slawkens
601d2808a2 Create nginx-sample.conf 2019-04-23 23:40:17 +02:00
slawkens
71b4963ed8 * disable nginx output buffering (fixes installation AJAX Request) 2019-04-23 23:17:58 +02:00
slawkens
f124c4844f Merge remote-tracking branch 'origin/master' 2019-04-23 23:16:57 +02:00
slawkens
7f9877b3da * set linux endings 2019-04-23 20:34:33 +02:00
slawkens
1526dde39d Update TODO 2019-04-23 20:31:30 +02:00
slawkens
7dd6925049 * Admin Panel has been done by Lee 2019-04-23 20:31:09 +02:00
whiteblXK
6163d3fbed Fixed team page twig (#76)
* Fixed team page twig

* * this shouldnt be in white font
2019-04-20 15:04:39 +02:00
slawkens
630d23141d Update TODO 2019-04-20 00:04:16 +02:00
slawkens
0252006eb1 * Install: create admin account: ask for e-mail + character name 2019-04-19 23:56:36 +02:00
slawkens
162777bb46 * auto detected browser language in select language on install 2019-04-19 23:04:16 +02:00
slawkens
0d5b9c2f98 * remember installation language on first step (welcome) 2019-04-19 22:49:54 +02:00
slawkens
5f22ab0361 * sizeof is alias of count 2019-04-19 22:47:42 +02:00
slawkens
b1fd1263f1 * remove this step_config_note 2019-04-19 22:34:11 +02:00
slawkens
6226203b0e Merge pull request #74 from whiteblXK/master
Some small fixes
2019-04-19 22:30:58 +02:00
Tornadia
9f31f90146 Fixing some errors at the install endscreen (#75)
* Fixed some bugs at last install screen (unset country and HTTPS protocol definition)

* Correction: allow_url_fopen is not to make any distinction between HTTP/HTTPS

* Black skull bug when joining serverInfo

* * latin is good but utf8 is better

* also changed ENGINE to InnoDB

* * use curl as alternative option for reporting install

* * you forgot this

* * fix typo

* Revert "* fix typo"

This reverts commit 6f24509dd6.

* * fix typo

* * this is the correct way to hide that notice
2019-04-19 22:28:38 +02:00
whiteblXK
5aaf15f81c Some small fixes 2019-04-16 13:37:10 +02:00
slawkens
5ad82a305e * fix othire compatibility
Fix when there is no account name, just accoun tid
Fix when group and secret column does not exist
Fix save premium days on TFS 1.2
Remove lastlogin - should not be possible to change
2019-04-15 23:24:44 +02:00
slawkens
296e99772a * forgot this yesterday... 2019-04-15 23:23:06 +02:00
slawkens
1365f41b2d Merge pull request #73 from whiteblXK/master
Moved serverinfo to twig
2019-04-15 23:14:20 +02:00
whiteblXK
13199744ef Moved serverinfo to twig 2019-04-15 18:14:17 +02:00
slawkens
4e937c32b4 * added some descriptions about items in Menus Editor 2019-04-14 04:46:53 +02:00
slawkens
559d13dfd9 * fix OTS_Account->setPremDays for OTHire 2019-04-13 04:48:06 +02:00
slawkens
a94a9291e6 * better description of links 2019-04-13 04:46:04 +02:00
slawkens
6ccaf316ab * fix saving of account country in player editor 2019-04-13 04:45:48 +02:00
slawkens
9fff996393 * this should be in $(document).ready 2019-04-13 04:05:00 +02:00
slawkens
3febb340d4 * removed duplicated jquery declarations
This fixes some stranges errors with javascript being triggered on website
for example: not working color changes on Menus page when clicking on Add New button
2019-04-13 04:04:25 +02:00
slawkens
5abc08ba9d * fix "Notice: Undefined index: blesscount" in Player editor 2019-04-13 03:58:20 +02:00
slawkens
2164e9a5a0 * show error message if cache disabled and login failed 2019-04-13 03:30:30 +02:00
slawkens
c87100c0fe * "Clear cache" option in admin panel cleans now signatures and twig too 2019-04-13 03:18:53 +02:00
slawkens
6a167e99dc Add optional parameters to deleteDirectory function
($dir, $ignore = array(), $contentOnly = false)
2019-04-13 03:17:01 +02:00
slawkens
052672402e * add release.sh script 2019-04-13 01:52:23 +02:00
slawkens
4d566500e9 Fixed guilds "Add new rank function"
Exception thrown in OTS_GuildRank::__toString() method

https://otland.net/threads/myaac-bug-guild-new-rank.263953/
2019-04-09 00:49:30 +02:00
slawkens
2dd51d0202 (nothing important) remove whitespaces.. 2019-03-19 11:17:37 +01:00
slawkens
862b58c176 (configurable) auto login after registration 2019-03-19 11:17:15 +01:00
slawkens
09b6f16a51 This has been done. (move manage newses to admin panel) 2019-03-19 10:33:38 +01:00
slawkens
ffebcee48b Merge pull request #71 from whiteblXK/master
Many changes in admin panel and team page
2019-03-18 20:04:54 +01:00
slawkens
8c50a84516 Shortened some code 2019-03-18 20:00:33 +01:00
whiteblXK
7c8f87bd78 Changes in lastlogin from admin module 2019-03-16 20:13:17 +01:00
whiteblXK
ded5274be7 Modules in admin panel, thanks to Lee for the code 2019-03-16 19:03:00 +01:00
whiteblXK
d03989481b More changes to news admin 2019-03-16 10:33:08 +01:00
whiteblXK
dac59d3133 Move add/edit/delete/hide news to admin panel 2019-03-15 21:01:15 +01:00
whiteblXK
7a5333ba62 Small fixes in Team Page 2019-03-15 16:05:13 +01:00
whiteblXK
f8e9fe376b Fixed problem with displaying errors in admin - pages panel 2019-03-14 15:56:44 +01:00
slawkens
f9ea7af3ab Merge pull request #70 from whiteblXK/master
Team page - display outfits of the players (configurable)
2019-03-13 22:38:08 +01:00
whiteblXK
622122562f Team page - display outfits of the players (configurable) 2019-03-13 20:39:16 +01:00
slawkens
3b96b21683 Merge pull request #69 from whiteblXK/master
Move team page to twig template
2019-03-12 16:55:37 +01:00
whiteblXK
3fc8d01070 Move team page to twig template 2019-03-12 16:19:27 +01:00
slawkens
b0603c6c7d Merge pull request #68 from whiteblXK/master
Move lastkills/killstatistics to twig template
2019-03-11 21:46:08 +01:00
whiteblXK
276f3a5516 Move lastkills/killstatistics to twig template 2019-03-11 17:51:43 +01:00
Lee
1859867039 Bug Fixes
-fix for getSkillTries as reported by whiteblXK
-fix for login and account type as reported by vG-
2018-12-30 01:00:26 +00:00
Lee
8c83eb805b vG- loss_mana bug fix (#67)
* loss_mana bug fix

vG loss_mana bug fix
2018-12-27 22:06:43 +01:00
Lee
2667d2b41c Updates + Fixes (#66)
* Updates

+added account editor country list
+added account editor website access flag editor.
+added player blessing1-8 editor
+added fav icon
+added $account->setLastLogin
+added $player->checkBlessings (for blessings 1-8)
+bug fixes

* Blessing Fix

Should now detect the amount of blessings if blessings1 onwards exists.
2018-12-26 11:32:58 +01:00
Lee
1b539f82ac Updates (#65)
* Updates

+Added missing images
+Added report viewer as requested by icekis
-Code cleanup

if strict db, need to set spell to null run

ALTER TABLE `myaac_spells` CHANGE `spell` `spell` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL;
2018-12-12 20:44:29 +01:00
Lee
876b1b988a Code clean up + datatables (#64)
* Reformat Code

Reformat Code
- spaces + tabs

* Code cleanup

removed duplicated datatables code

* Datatables

replace spells, monsters tables with JavaScript Sortable Tables (DataTables?)
2018-12-02 06:30:36 +01:00
slawkens
e3bcbc4da9 Psss.... It's MyAAC, not MyACC, remember! ;) 2018-11-29 22:54:42 +01:00
slawkens
1f9aa96486 Accounts Editor: Fix if accounts.coins does not exists 2018-11-29 22:53:55 +01:00
slawkens
2d17116119 Always show Upload Plugin option with Select File 2018-11-29 22:52:04 +01:00
slawkens
b592d02bb7 Nothing important - Remove whitespaces.. 2018-11-28 06:12:36 +01:00
slawkens
961d1acd51 Fix version 2018-11-28 06:12:12 +01:00
slawkens
138d22976a Add VERSION file 2018-11-28 06:11:47 +01:00
slawkens
848507f7e8 Merge branch 'master' of https://github.com/slawkens/myaac 2018-11-26 07:25:25 +01:00
Lee
82fed8abfe Account fix (#63)
* Admin Panel

* fixes

-Code Clean Up
-Remove dist folder and merged into tools.

* Use Acc Name

Use Acc Name fix for login.

* Pull fix

* Dashboard fix

- Fix coins table
- Fix points table
2018-11-26 06:40:39 +01:00
slawkens
7941bdc55e Merge branch 'master' of https://github.com/slawkens/myaac 2018-11-24 15:50:08 +01:00
Lee
d1e6061541 Admin panel fixes (#62)
* Admin Panel

* fixes

-Code Clean Up
-Remove dist folder and merged into tools.
2018-11-24 15:42:20 +01:00
slawkens
96e55b17b1 Update TODO 2018-11-24 15:16:19 +01:00
Lee
6dab50cbd8 Admin Panel (#61)
Thank you Lee for this awesome, Bootstrap Admin Panel!
2018-11-22 07:12:14 +01:00
slawkens
89f24c631c Fix something that Open Tibia developers don't think about
This fixes #60
2018-11-08 08:35:55 +01:00
slawkens
5d0a0d352b Fix database_name in Usage_Statistics
(cherry picked from commit 3c6f44d)
2018-10-31 07:49:12 +01:00
slawkens
63bc0a9620 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

(cherry picked from commit dacc5b9)
2018-10-31 07:48:56 +01:00
slawkens
0791ccbcf5 Update .github/ISSUE_TEMPLATE.md 2018-10-22 12:22:26 +02:00
slawkens
d03ab6c79f * change config.lua.ownerEmail to config.mail_address
(cherry picked from commit a4bccba)
2018-10-22 09:28:35 +02:00
slawkens
72e2a762da * fixed the mystical defect where "Create Account" button was not highlighted (on the account/manage page)
(cherry picked from commit 1740542)
2018-10-22 09:19:44 +02:00
slawkens
cd0b1f10cc * $db->hasTable is the way to go 2018-10-18 09:13:36 +02:00
slawkens
a81824a7eb (Nothing important) just remove a minus in a word "re-install" 2018-10-18 08:24:59 +02:00
slawkens
589d07ed40 * add an additional text to the install page informing that user can reinstall MyAAC by deleting config.local.php
(cherry picked from commit 0129c79)
2018-10-18 08:23:49 +02:00
slawkens
9a86f1ebed * add fatal error message when myaac tables in database do not exist
(cherry picked from commit ba1c5e9)
2018-10-18 08:23:29 +02:00
slawkens
2695995211 Move tibiacom boxes to Twig templates
Yes they are looking and working same as before ;)
2018-10-16 01:42:15 +02:00
slawkens
ff8105f809 Use strict check where appriopriate 2018-10-16 01:40:49 +02:00
slawkens
98a05f53d2 Add var annotation 2018-10-16 01:39:03 +02:00
slawkens
549b1a2f13 New Twig function: getPlayerLink($s, $p) 2018-10-16 01:35:16 +02:00
slawkens
b50d0cd710 Throw an exception if template index file cannot be found 2018-10-16 01:34:48 +02:00
slawkens
ff135c034c Add Extension Twig_Extension_Debug if env is 'dev' 2018-10-15 17:34:10 +02:00
slawkens
eb93b08342 Update system/pages/admin/mailer.php 2018-10-15 17:28:59 +02:00
slawkens
048c40c16c Update README.md 2018-08-15 08:00:55 +02:00
slawkens
33b871efa6 * fixed undefined config index from Twig autoloader 2018-06-27 00:01:04 +02:00
slawkens
2010094f83 * 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:00 +02:00
slawkens
693e201900 * added ISSUE_TEMPLATE.md 2018-06-06 21:59:16 +02:00
slawkens
2333180c50 * configurable if deleted characters from account should be listed (this closes #49) 2018-06-06 21:17:41 +02:00
slawkens
915e9409dc * fixed #55 (Cache class not found) 2018-06-06 20:28:36 +02:00
slawkens
b6be3226c5 * nothing important .. (fixed some notices from IDE) 2018-06-03 20:26:30 +02:00
slawkens
b83cad36b6 * remove some unused png files from kathrine template 2018-06-03 20:26:29 +02:00
slawkens
fb1b9fea09 * stop using global $cache variable, use Singleton pattern instead 2018-06-03 17:09:21 +02:00
slawkens
45a387000d * optimize template load code (less file_exists checks) 2018-06-03 17:07:44 +02:00
slawkens
e6b052f8e9 * lowered condition execution cost 2018-06-03 17:03:53 +02:00
slawkens
6365105515 * replace Cache class name with self() 2018-06-01 19:53:57 +02:00
slawkens
550b664a61 * Environment is now configurable ('prod' for production, 'dev' for development)
Significantly better load times with 'prod' !!!
2018-06-01 19:12:48 +02:00
slawkens
510459b046 * support for database persistent and socket connections (performance boost) 2018-06-01 18:56:57 +02:00
slawkens
adbec47fad * silently ignore if status_interval is not set in config 2018-06-01 18:35:37 +02:00
slawkens
ae24a4ea4c * fixed that database_log was always on 2018-06-01 18:27:46 +02:00
slawkens
db67bb0b98 * new configurable: status_interval (how often to fetch status from server) 2018-06-01 18:23:48 +02:00
slawkens
857ce1324c * cache lastkills.php 2018-06-01 16:13:41 +02:00
slawkens
82d6467cee * new configurable: status_timeout 2018-06-01 16:04:23 +02:00
slawkens
887c792a76 * (internal) replace deprecated PDO_ attributes with PDO:: 2018-06-01 16:00:56 +02:00
slawkens
b3625dffbc * Fixed missing prefix for cache get() and delete() functions
Cause those functions to not work correctly..
2018-06-01 15:03:13 +02:00
slawkens
90cd5dfae7 * added missing highscores_balance configurable 2018-06-01 14:09:22 +02:00
slawkens
8ce791368c * fixed wrong name of the skill in highscores for balance (was showing "level" instead of "balance") 2018-06-01 13:59:47 +02:00
slawkens
05e15ce9ad * replace deprecated HTML <font> tag with <span> 2018-06-01 13:35:27 +02:00
slawkens
1926c5ec5b * change deprecated HTML <center> tag to <div style="text-align:center"> 2018-06-01 11:55:04 +02:00
slawkens
0bb1d869af * (internal) change intval() function to (int) casting (up to 6x faster) 2018-06-01 11:33:22 +02:00
slawkens
c654ea329c * replace "$twig->render()" with "$this->display" 2018-05-29 21:29:08 +02:00
slawkens
68d74a490b * performance and optimisations fixes part 2, according to awesome PHPStorm Php Inspections plugin! 2018-05-29 21:16:48 +02:00
slawkens
857aa110c8 * remove unnecessary parentheses in include/require (forgot this part) 2018-05-29 21:10:30 +02:00
slawkens
6ba24eebb0 * nothing important: changed some text 2018-05-29 21:09:20 +02:00
slawkens
023eb3b0ff * use __DIR__ instead of dirname(__FILE__) - since PHP 5.3.0 2018-05-29 21:08:05 +02:00
slawkens
bf361238cb * remove whitespaces 2018-05-29 21:06:15 +02:00
slawkens
42d23e9b37 * remove unnecessary parentheses in include/require 2018-05-29 21:00:56 +02:00
slawkens
e1ddf58119 * IDE: fixed $db variable type notation to point to the correct class 2018-05-29 20:44:05 +02:00
slawkens
4023fda5b6 * fixed _mail() function when $add_html_tags is disabled 2018-05-29 20:42:18 +02:00
slawkens
f34f2da9b9 * refactor data directory detection 2018-05-29 20:40:40 +02:00
slawkens
050f596429 * forgot to open <head> in install template 2018-05-29 20:29:52 +02:00
slawkens
de36cfd2eb * add global helper config($key) function + twig binding 2018-05-29 20:29:18 +02:00
slawkens
b828b8e44a * do not display software version 2018-05-29 20:08:29 +02:00
slawkens
15da31d3eb * add .gitattributes 2018-05-29 20:04:17 +02:00
slawkens
6158d81b5e * move Twig functions to separate file 2018-05-29 18:14:21 +02:00
slawkens
b714bf4abe * added missing comma 2018-05-29 17:44:24 +02:00
vankk
46ca6262b5 Sets the minimun lenght and maximun at config (#54)
* Sets the minimun lenght and maximun at config

* Update codes
2018-05-27 13:41:07 +02:00
slawkens
cfef209cb7 Merge pull request #53 from vankk/master
Increased the mininum lenght and decreased the maxinum lenght
2018-05-23 20:54:04 +02:00
vankk
654c038eab Increased the mininum lenght and decreased the maxinum lenght 2018-05-23 10:06:33 -03:00
slawkens
a6beb0d2d5 * Updated TODO (display password strength) 2018-05-03 17:35:34 +02:00
slawkens1
515b42cd51 * support for some old servers, where arrays are used in config.lua 2018-04-16 20:31:23 +02:00
slawkens1
6668c47368 * fixed saving admin menus on some sensitive systems 2018-04-16 18:13:07 +02:00
slawkens1
b801fdc14f * change myaac_menu.color to VARCHAR
* optimisations :)
2018-04-16 18:11:20 +02:00
slawkens1
15dcc7b802 * updated TODO (extended forum and auto login) 2018-04-15 23:43:48 +02:00
slawkens1
3ec6d5e905 * updated TODO (team page - outfits) 2018-04-15 13:10:24 +02:00
slawkens1
92cd64c8e8 * updated TODO
* move mobile version to 2.0
* use bootstrap in 1.0
* new admin layout
2018-04-15 11:26:47 +02:00
slawkens1
955396e575 * updated TODO (moved composer from 2.0 to 1.0) 2018-04-07 08:39:54 +02:00
slawkens1
52efadd442 * updated TODO (info about weblate.org) 2018-04-04 00:50:25 +02:00
slawkens1
09234e65fe * dislocation of some config options 2018-04-02 11:57:14 +02:00
slawkens1
4d0d601127 * updated TODO (change layouts/templates to themes in 2.0) 2018-03-31 19:41:36 +02:00
slawkens1
bce3756e83 * updated TODO (csrf token protection) 2018-03-27 23:41:17 +02:00
slawkens1
0cf21671a4 * updated TODO (password strength requirements in v1.0) 2018-03-24 01:43:07 +01:00
slawkens1
5d3fbb4bff * update TODO (Singleton) 2018-03-24 01:12:13 +01:00
slawkens1
68bbf4182f * fix #47 2018-03-24 01:11:22 +01:00
slawkens
eab416c0b4 * some optimizations & fixes according to awesome PHPStorm Php Inspections plugin! 2018-03-21 13:52:41 +01:00
slawkens1
c48452b37d * delete config.local.php
Will be automatically created on install
2018-02-21 02:16:20 +01:00
slawkens1
a636a87c2b * fixed saving long ip addresses (unsigned) 2018-02-06 03:55:04 +01:00
slawkens1
ba8e1c5647 * updated TODO (robots.txt) 2018-02-05 21:54:26 +01:00
slawkens1
fc30e28e84 * plugins require like composer: "ext-curl": >"5.0"
Allow require php extension with composer syntax: ext-name: version
2018-02-05 21:52:54 +01:00
slawkens1
cfca37b09c * added robots.txt 2018-02-05 21:30:49 +01:00
slawkens1
31a3f594f1 * updated TODO (previous commit) 2018-02-05 21:29:15 +01:00
slawkens1
9c536bd845 * plugins: require php-extension, table or column
Some additional options for plugin developers, to require specific php
extension, database table or column to be present on installed system!
2018-02-05 21:25:14 +01:00
slawkens1
808612cd10 * fixed default accounts.vote value 2018-02-05 08:19:46 +01:00
Sławek
f2c3e558cc * minimum PHP is now 5.3.3
* added command to change permissions of system/cache directory
2018-02-04 23:57:19 +01:00
slawkens1
3324154208 * fixed chrome bug on save ERR_BLOCKED_BY_XSS_AUDITOR 2018-02-04 23:40:59 +01:00
slawkens1
9c0068d470 * fixed edit page with php enabled 2018-02-04 23:40:51 +01:00
slawkens1
5079027978 * fixed logo monster 2018-02-04 23:17:38 +01:00
slawkens1
04dca2f274 * new configurable: smtp_secure
* as described in #43 by miqueiaspenha
2018-01-29 23:11:17 +01:00
Sławek
168df5d4e2 Merge pull request #44 from miqueiaspenha/patch-1
Update admin.dashboard.html.twig (GH-44)
2018-01-29 22:23:42 +01:00
Miqueias Penha
6cf6f0460e Update admin.dashboard.html.twig
The data comes from the config array.
2018-01-29 15:49:44 -03:00
slawkens1
57d8e0b06f * fixed displaying houses on TFS 1.x and higher
* fixed latest migration mysql error (23)
* fixed some config warning about highscores_balance
2018-01-27 12:38:50 +01:00
slawkens1
55ab90a481 * updated TODO (proposed routing library for 2.0) 2018-01-27 01:42:25 +01:00
slawkens1
0a8fb40bd7 * updated TODO (custom session handlers in 2.0) 2018-01-26 22:27:11 +01:00
slawkens1
fb026ec07f * verify is user was logged on HOOK_LOGOUT 2018-01-26 22:27:00 +01:00
slawkens1
79697e9030 * updated TODO (PHP 7.0, Composer and MVC) 2018-01-26 21:52:41 +01:00
slawkens
873e05538e * updated TODO (some Twig improvements in 2.0) 2018-01-26 09:06:13 +01:00
slawkens1
9dd18a97e8 * updated TODO 2018-01-26 08:12:26 +01:00
slawkens1
51acb739e9 * 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
2018-01-26 08:04:28 +01:00
slawkens1
7e2be69749 * updated monsters to the original ones from tibia.com 2018-01-26 08:00:53 +01:00
slawkens
8e0ec47229 * twig requires php 5.3.3 2018-01-23 10:49:25 +01:00
slawkens
ca4b243daa * updated TODO 2018-01-22 16:29:04 +01:00
slawkens1
755adb0863 * forgot to add latest migration to schema.sql
* default link color can be changed for each template
2018-01-14 15:21:20 +01:00
slawkens1
fc6cd29e84 * revalidate cache before upgrading db 2018-01-14 14:30:13 +01:00
slawkens1
ab73c602c3 * colorful dynamic menus!
* and also: blank option for menus
* NOTICE: Not all templates support that options yet
2018-01-14 14:29:53 +01:00
slawkens1
862533fd7f * fixed some small information about Frags on highscores 2018-01-14 11:20:52 +01:00
slawkens1
ffa3bed620 * some fixes to the revalidateCache function 2018-01-14 11:14:40 +01:00
slawkens1
ba8d56f6ab * added highscores by balance 2018-01-14 10:38:33 +01:00
slawkens1
4bfc804d85 * auto add z_polls table on install 2018-01-14 10:37:26 +01:00
slawkens1
40981daf33 * fixed plugin "You don't have rights to delete" 2018-01-14 09:19:00 +01:00
slawkens1
16bcb70863 * new hooks: LOGIN, LOGIN_ATTEMPT, LOGOUT
* fixed bug with uninstalling some plugin dirs
* updated TODO
2018-01-14 08:59:37 +01:00
slawkens1
b1c72df333 * added some names links to the account.management page 2018-01-14 08:56:05 +01:00
slawkens1
39ced581b8 * fixed hooks return value
* (internal) added new function: $hooks->exist($type)
2018-01-14 08:55:18 +01:00
slawkens1
18a325cad8 * deleted more useless files 2018-01-13 21:43:34 +01:00
slawkens1
7b0e891ab3 * changed highscores_groups_hidden to 3 (for TFS 1.x) 2018-01-13 21:18:50 +01:00
slawkens1
fc243466da * install: better error message on database failed connect
* changed <p> tag to <div> in notification messages
2018-01-13 21:18:21 +01:00
slawkens1
9738c1896d * fixed default stamina on otserv 0.6.x engine 2018-01-13 19:54:32 +01:00
slawkens1
d0976cead9 * forgot this 2018-01-13 19:44:43 +01:00
slawkens1
2e46d80bce * install: change permission check to is_writable 2018-01-13 19:35:19 +01:00
slawkens1
283806369a * fixes to the latest commit (removed some files)
* otserv 0.6.3: fixed some warning (on the characters page) and fatal
mysql error (on the mango signature)
* update TODO
2018-01-13 19:34:53 +01:00
slawkens1
500cb23ab9 * removed Thumbs.db 2018-01-13 19:20:02 +01:00
slawkens1
88cabf88b2 * removed 6mb of trash (some useless things)
* updated background-artwork to the latest version, removed other ones
* removed signature background.PSD (instead of an empty background.jpg
is provided - almost the same)
* removed arial.ttf font, instead arialbd.ttf is used for mango template
* added .gitignore file
2018-01-13 19:16:19 +01:00
slawkens1
9dc3d6d8d6 * (fix) TFS 1.x not showing promoted vocations in highscores 2018-01-12 18:13:29 +01:00
slawkens1
cb8d8c4173 * update TODO 2018-01-12 01:20:33 +01:00
slawkens
1949c197d6 * installation of important stuff with help of AJAX
* installation will be now done with AJAX request (jQuery), that will instaltly notify about the status of the installation (no waiting without clue anymore)
* install items & weapons on installation (before monsters)
2018-01-09 10:26:06 +01:00
slawkens1
16dab3a2cc * updated OTS_House class to support latest TFS 1.x 2018-01-08 22:37:20 +01:00
slawkens1
497a073162 * fixed some MySQL errors on OTS_Player.php
* added function OTS_Player::getAccountId()
* (internal) shortened samples inserting code
* (internal) shortened config.highscores_ignored_ids updating code
* updated TODO
2018-01-08 22:35:36 +01:00
slawkens1
22e245ecff * enabled emoticons plugin in tinymce :) 2018-01-08 20:02:25 +01:00
slawkens
b03433d8a8 * added missing function is_sub_dir (to the last commit) 2018-01-08 17:28:05 +01:00
slawkens
4f0fca021c * uninstall: do not allow directories outside BASE
* uninstall: do not allow absolute paths
2018-01-08 17:19:56 +01:00
slawkens
5aa1ae003e * allow comments inside plugin json file
* updated German translation (by German native speaker)
2018-01-08 16:15:34 +01:00
slawkens
f29758939c * some fixes regarding migrations 2018-01-08 14:03:10 +01:00
slawkens
3703c2b431 * updated tinymce to the latest (4.7.4) version 2018-01-08 13:10:32 +01:00
slawkens
d289d9a8ff * update CHANGELOG from 0.7 branch 2018-01-08 11:57:37 +01:00
slawkens
a083dd048d * fixed PHP warning about country not existing on online and characteres pages 2018-01-08 11:47:41 +01:00
slawkens
f09c30d370 * fixed characters page - config.characters.frags "Notice: Use of undefined constant" 2018-01-08 11:39:49 +01:00
slawkens
9e28d46ee7 * fixed displaying special outfits (GM, CM) in online page 2018-01-08 11:23:44 +01:00
slawkens
c133482659 * added new forum option: "Enable HTML"
* will be by default enabled for newses
* fixed bbcode parsing
2018-01-08 10:53:14 +01:00
slawkens1
bf71c1aee8 * fixed tr bgcolor (#38) 2018-01-08 08:12:32 +01:00
slawkens1
4102b44352 * important fix for servers with promotion column (#36)
* caused player.vocation to be resetted when saving player, for example:
on change name, accept invite to guild, leave guild
* fixed empty success message on leave guild
* (internal) using $player->getVocationName() where possible instead of
older method
* fixed some warning in guild show
2018-01-08 01:00:56 +01:00
slawkens1
acf2e2fb4a * nothing important 2018-01-08 00:19:16 +01:00
slawkens1
f9de0b5eb9 * fixed displaying Premium Account days v2 2018-01-08 00:17:49 +01:00
slawkens1
85083f5979 * fixed displaying premium account days
* function OTS_Account:getPremDays will now return -1 if there's
freePremium configurable enabled on the server
2018-01-08 00:08:17 +01:00
slawkens1
087988dde3 * fixed getBoolean function when boolean is passed 2018-01-08 00:01:03 +01:00
slawkens1
2dddb853f2 * fixed installation 2018-01-07 23:22:25 +01:00
slawkens1
a92355181f * fixed othire default column value (#26) 2018-01-07 23:21:09 +01:00
slawkens1
2085f7e128 * fixed warning in highscores when vocation doesn't exist 2018-01-07 12:06:00 +01:00
slawkens1
de7366e9a9 * fixed some php notice when there are no players online on TFS 1.x 2018-01-07 12:03:37 +01:00
slawkens1
7ab1c1170f * fixed saving custom vocations in admin panel (#36) 2018-01-07 11:57:26 +01:00
slawkens1
792770e5e2 * fixed some typos
* changes account.management to use buttons defined in template
2018-01-06 23:43:59 +01:00
Sławek
dece42c155 Set theme jekyll-theme-slate 2018-01-06 19:13:11 +01:00
slawkens1
1025fad0e6 * cache $db->hasTable and $db->hasColumn functions
* changed tableExist and fieldExist to $db->hasTable(table) +
$db->hasColumn(table, column)
* new configurable: database_log - can log database queries and show in
website source when logged as super admin
* removed debug_level configurable, enabled by default when logged on
super admin
* added OTS_Account:getCountry()
* added posibility to load OTS_Player partially, and without skills
* (internal) changed depracated $ots->createObject() functions with
their OTS_ equivalents
* (internal) removed unused code
2018-01-06 05:44:33 +01:00
slawkens1
31537687c1 * immediately reload config.lua when there's change in config.server_path detected 2018-01-06 03:07:17 +01:00
slawkens1
9c281511fa * added "Edit" option for admins in characters page 2018-01-06 01:52:59 +01:00
slawkens1
544375378f * show user avatar (outfit) in forum posts
* show user position (group) in forum posts
* replaced forum actions links (move, remove, edit, quote) with images
* redirect directly to the thread on user login (on new reply)
* fixed account login redirect with special chars (like '&' and '?')
2018-01-06 01:46:36 +01:00
slawkens1
c2574235ea * forum: show image in full screen on click
* do not expand the whole site cause of big posted forum images, instead
show a small image and allow full size on click
2018-01-05 23:48:08 +01:00
slawkens1
0533b8c946 * some fixes regarding latest commit 2018-01-05 23:42:30 +01:00
slawkens1
5475bd6b5f * dont add extra <br/> to the TinyMCE news forum posts 2018-01-05 21:44:19 +01:00
slawkens
2e4321872a * fixed othire account creating/installation
* fixed unexpected error logging about email fail
* added max_execution_time to the install finish step
2018-01-05 09:30:27 +01:00
slawkens1
515790b1a0 * fixed table name players -> players_online 2018-01-05 00:36:02 +01:00
slawkens
35c9ffcdca * update TODO 2018-01-04 16:29:18 +01:00
slawkens1
920c8a936f * some small fix regarding highscores vocation box 2018-01-04 00:29:03 +01:00
slawkens1
6863ba4883 * fixed displaying article_text when it was empty saved 2018-01-04 00:09:02 +01:00
slawkens1
2f49413867 * update TODO 2018-01-03 23:50:15 +01:00
slawkens1
854560b2f5 * added news preview function (news, ticker, article)
* update TODO
2018-01-03 23:49:46 +01:00
slawkens1
4a948b8ba2 * save detected country on create account in session
* warning about leaving news page with changes
2018-01-03 22:03:56 +01:00
slawkens1
01c0d021b2 * added player status to tibiacom top 5 highscores box
* fix when there are no changelogs or highscores yet
2018-01-03 21:27:47 +01:00
slawkens1
3e49ef42a2 * fiedx bug on othire with config.account_premium_days
* fixed getPremDays and isPremium functions (newest 11.x engines are
bugged when it comes to PACC, its not fault of MyAAC)
2018-01-03 21:03:05 +01:00
slawkens
efb1775aff Updated TODO 2018-01-03 17:19:18 +01:00
slawkens1
2a1f1c3cd9 * update to 0.8.0-dev
* added some features into TODO file, that will be most probably
available in 0.8 release
2018-01-03 01:09:09 +01:00
slawkens1
3c4ab10b36 Merge branch 'master' of https://github.com/slawkens/myaac 2018-01-03 01:07:31 +01:00
slawkens1
1c94169182 * fixed bug on TFS 1.x when online_afk is enabled 2018-01-03 01:07:26 +01:00
slawkens
53ab7af8dc * small fix regarding getTopPlayers function which was ignoring $limit variable 2018-01-02 10:23:04 +01:00
slawkens1
8d173d369d * added ico to the list of ignored files 2017-12-28 15:51:33 +01:00
slawkens1
4535687b48 * automatically generate plain mail from html 2017-12-26 22:30:52 +01:00
slawkens1
c415cf5ffb * php 7.x APCu cache support 2017-12-26 21:47:53 +01:00
slawkens1
a95c93cd5b * update item_images_url config to 1092
*  for backward support new require constants will be used for semantic
versioning: myaac_, php_, database_
* updated TODO
2017-12-26 20:55:43 +01:00
slawkens1
62443257fc * semantic versioning support for plugins
* add support for defining max myaac version in plugin.json file
* you can now require other plugin to be installed before yours
* added German translation
* fixed faq containing html code
2017-12-26 16:47:52 +01:00
slawkens1
60a8317115 * add some notice to the user that installing step "Import Schema" will take some time 2017-12-25 23:19:32 +01:00
slawkens1
73ed384215 * don't show error indicators on first time load - createaccount page 2017-12-25 23:15:42 +01:00
slawkens1
c4a1f7df5f * check user IP on install to prevent install by random user 2017-12-25 23:03:00 +01:00
slawkens1
8b4eccc064 * updated Twig to the latest version in 1.x series (v1.35.0) 2017-12-25 13:02:46 +01:00
slawkens1
6528a4a60c * ask user for timezone on install
* remember status of the installation
* moved clients list to the new file
* verify if client and timezone is correct on install
2017-12-25 12:40:41 +01:00
slawkens1
4d690992ac * switch to 0.7.5-dev
* fix when config.local.php doesn't exist
* fix when reinstalling aac with samples already installed
* some optimisations to installation script
* forgot to fclose on config.local.php
2017-12-24 13:00:14 +01:00
slawkens1
b83fb05b82 * update to 0.7.4 2017-12-24 09:50:53 +01:00
slawkens1
cf12265cd8 * fixed displaying of percent bar on tibian signature 2017-12-24 09:37:28 +01:00
slawkens1
e4110a6981 * automatically update highscores_ids_hidden for users who installed myaac before
* update TODO
2017-12-21 22:08:47 +01:00
slawkens1
412908026d * inform user about Twig cache failure on installation, instead of http 500 error
* when dir system/cache is not writable by the webserver, then show some
nice notice to the user about it instead of http 500 error
* remember client version and usage stats checkbox in session on install
* fixed some small warning introducted yesterday about
highscores_ids_hidden
* updated TODO
2017-12-19 23:32:30 +01:00
slawkens1
8a7887cf06 * for compability 2017-12-19 00:05:49 +01:00
slawkens1
779dd003dd * update to 0.7.3
* better solution for hidding samples (configurable)
* removed players.is_sample field
2017-12-19 00:01:59 +01:00
slawkens1
0b2895dc56 * fixed some warnings on install on servers using account.id
* added version 772 constant to install client choose (OTHire)
* forgot to add is_sample to samples on install
2017-12-18 23:30:18 +01:00
slawkens1
fed5d08703 * updated TODO 2017-12-18 16:07:12 +01:00
slawkens1
f131f27ac3 * forgot something with latest commit 2017-12-18 09:56:43 +01:00
slawkens1
19dbbdcf4f * auto generate myaac cache & session prefix on install to be unique accross installations
* prevent adding duplicated newses with installation
* players.is_sample to prevent displaying on highscores
2017-12-18 09:54:42 +01:00
slawkens1
d650035980 * fixed last menu closing in tibiacom template 2017-12-18 09:09:24 +01:00
slawkens1
fbc803d09f * updated polish locale (translation) on install
* fixed hidding shop system menu on tibiacom template when disabled in
config
* some changes to sample characters: chanced town_id to 1, posx: 1000,
posy: 1000, posz: 1000 and default group_id to 1 so you can change
in-game outfits and they will be used
* fixed account.login redirect not working on tibiacom template
* installation: warn about wrong admin account name/id and password
* (internal) removed some duplicated code on install finish
* (internal) renamed installation step files to be in correct order
* added TODO file
* bumped version to 0.7.3
2017-12-18 09:01:54 +01:00
Slawomir Boczek
df4c594d4f * forgot to update CHANGELOG in 0.7.1 release 2017-12-15 16:36:51 +01:00
slawkens1
482445cb98 * switch to 0.7.2-dev 2017-12-13 19:21:11 +01:00
slawkens1
1c002c63a3 * update to 0.7.1 official release 2017-12-13 19:15:44 +01:00
slawkens1
cd366b6087 * changed some notice when version check is failed 2017-12-13 19:06:50 +01:00
slawkens1
83dc5b7650 * removed duplicated "Support List" menu item 2017-12-10 00:42:27 +01:00
slawkens1
d9675b1bc6 * (internal) moved changelog to twig
* added changelog menu item to kathrine template
* (fix) if changelog type or where is set to 0 then display as unknown
2017-11-23 17:55:42 +01:00
slawkens1
036520566c * fixed some php short tag
* fixed guild change description back button
2017-11-22 00:22:31 +01:00
slawkens1
8b302749ff * update to 0.7.1-dev 2017-11-20 18:16:13 +01:00
slawkens1
68b3e2cfee * update to 0.7.0 2017-11-20 18:08:12 +01:00
slawkens1
9ee6906e4d * fixed loading of custom pages 2017-11-20 17:48:25 +01:00
slawkens1
be38f51cc7 * updated phpmailer to version 5.2.26 (from 5.2.23) 2017-11-19 20:25:03 +01:00
slawkens1
aaed21f752 * (#30) fixed recovering account on servers that doesn't support salts 2017-11-19 15:22:57 +01:00
slawkens1
a1dddd7df8 * updated tinymce to version 4.7.2 2017-11-16 17:10:27 +01:00
slawkens1
f26795ca7a * im dumb :[! 2017-11-14 21:20:05 +01:00
slawkens1
7d6bbb3385 * verify install post values directly on config page and display error
* first usage report will be send after 7 days
2017-11-14 21:11:32 +01:00
slawkens1
37f792d9ce * forgot to commit twig templates in last commit
* added some validation in guilds actions if guild has been set to
prevent php notices
2017-11-14 20:27:59 +01:00
slawkens1
867c86d702 github is weird 2017-11-14 20:01:14 +01:00
slawkens1
05f8756a12 * fixed viewing pages with capital letters (like serverInfo) on case sensitive systems
* fixed changing comment of characters with space and other special
characters in name (#29)
* fixed viewing guilds with space and other special characters in name
(#29)
* (kathrine template) fixed displaying menu when no URI is set (URI =
'/')
* added some additional checks for Validator guildName and rankName if
name is empty
* (internal) new twig filter: urlencode, which is using urlencode php
function
2017-11-14 19:58:44 +01:00
slawkens1
c581c35a73 * update to 0.7.0-dev 2017-11-12 22:06:20 +01:00
slawkens1
b37bd5f0ae * github is weird 2017-11-12 21:56:47 +01:00
slawkens1
56a01e1e64 * fixed account email confirm function
* log some error info when mail cannot be send on account create
* fixed some weird include possibilities with forum and account actions
(verify action name)
* twig getLink function will now return with full url (BASE_URL
included)
* fixed some changelog PHP Notice warning
* (internal) shortened message functions
2017-11-12 21:55:12 +01:00
slawkens1
6aa58bddd8 * removed some tibiacom character typo '}?>' 2017-11-12 19:38:02 +01:00
slawkens1
0515f2825a * fixed loading hooks from plugin installed from command line 2017-11-10 23:03:54 +01:00
slawkens
0d37e07a0d * (fix) remove hooks from db on plugin deinstall 2017-11-09 11:31:02 +01:00
slawkens
ab69b182e6 Change version to 0.6.6-dev 2017-11-09 10:13:56 +01:00
slawkens
7b84614a79 * removed @version header from files, as it was hard to maintain 2017-11-09 10:02:15 +01:00
slawkens
361e536243 * admin panel, pages - link will be opened in new tab 2017-11-06 08:56:02 +01:00
slawkens
39fee6e57d * menus are now showed by the order they're saved into menu_categories configurable
* fixed visitors in admin panel showing, when cache is disabled
2017-11-06 08:50:06 +01:00
slawkens
56a0c6e6bf * some unimportant changes 2017-11-03 16:12:50 +01:00
slawkens
eb8993e746 * added back bug_report configurable cause some templates are using it 2017-11-03 10:46:23 +01:00
slawkens
edeb781600 Merge branch 'master' of https://github.com/slawkens/myaac 2017-11-03 09:43:51 +01:00
slawkens
9aa4e308c1 * reverted removing base href in html head
* added anonymous usage statistics reporting
* (fix) don't show templates that doesn't exist in Menus option in Admin Panel
* (fix) menu ordering by category
* (fix) showing changelog with urls in Admin Panel
* (internal) moved uninstall logic to Plugins class
2017-11-03 09:43:47 +01:00
slawkens1
05abf41b64 * removed some useless <br> in gallery box 2017-10-29 19:50:15 +01:00
slawkens
ac9c43e280 * fixed editing news 2017-10-26 16:25:24 +02:00
slawkens
c05e7f29c5 * fixed tibiacom menus extending on some pages 2017-10-26 16:07:10 +02:00
slawkens
583f3394fc * added featured article to tibiacom template (you can add them with add news button)
* added networks (facebook and twitter) and highscores (top 5) boxes to tibiacom template, configurable in templates/tibiacom/config.php
* fixed polls box in tibiacom template
* (internal) moved tibiacom boxes to separate directory
* (internal) renamed constant TICKET -> TICKER
2017-10-26 15:35:22 +02:00
slawkens
5e414ebda8 * added news ticker for kathrine template
* (internal) moved news tickers to twig template
* (internal) moved Forum class to separate file
* (internal) moved deprecated functions to compat.php
2017-10-25 09:50:12 +02:00
slawkens
21b1383c9a * update forum post after editing news (when forum post has been created) 2017-10-24 15:18:30 +02:00
slawkens
6c9e09ea73 * moved template menus to database, they're now dynamically loaded
* you can edit them in Admin Panel under 'Menus' option.
* you can also add custom links, like http://google.pl
* removed videos pages, as it can be easily added using custom Menus and Pages with insert Media
* removed bug_report configurable, its now enabled by default
2017-10-24 14:42:23 +02:00
slawkens
195ec4b11e * added some compat functions that are used by shop system 2017-10-24 04:59:52 +02:00
slawkens
bf988a7f6e * added tinymce editor to 'Pages' in admin panel
* enabled code plugin for tinymce which enabled raw html code editing
2017-10-23 14:59:43 +02:00
slawkens
25f8028ae3 * fixed some typos 2017-10-23 11:37:49 +02:00
slawkens
28299744c4 * fixed uninstalling plugin 2017-10-23 10:13:50 +02:00
slawkens
72212f8256 * added links to edit/delete/hide custom page directly from page 2017-10-23 09:10:22 +02:00
slawkens1
1610a4ab91 * update to 0.6.6 2017-10-22 23:38:51 +02:00
slawkens1
87a3d1e5d1 * fixed some php fatal error on spells page
* changed spells.vocations field in db size to 300
* please reload your spells after this update!
2017-10-22 23:36:05 +02:00
slawkens1
2b6d65e955 * update to 0.6.5 2017-10-21 04:32:20 +02:00
slawkens1
cd44d28674 *fixed displaying custom pages
* fixed adding new group board
2017-10-21 04:30:02 +02:00
slawkens1
2edeb1b3e2 * fixed guild create link 2017-10-20 22:40:02 +02:00
slawkens1
9f946d4bc4 * update to 0.6.4 2017-10-20 22:17:54 +02:00
slawkens1
5266f33af5 * reverted getLastLogin cause it was used by tibia11-login plugin 2017-10-20 22:01:05 +02:00
slawkens1
85c9a1e84d * update to 0.6.3 2017-10-20 21:18:50 +02:00
slawkens1
5951fe21ec * fixed creating account :(
* fixed showing premium account status
2017-10-20 21:15:46 +02:00
slawkens1
c6b6638705 * fixed viewing thread without being logged
* removed unused and wrong function OTS_Account::getLastLogin() (field
lastday is used for premium)
2017-10-20 20:29:10 +02:00
slawkens1
8ab7be9fb8 * update to 0.6.2 2017-10-20 18:16:52 +02:00
slawkens
762fa31c28 * added forums for guilds and groups
* (internal) new function: OTS_Guild::hasMember(OTS_Player $player)
* (internal) new function: Forum::hasAccess($board_id)
2017-10-20 16:59:14 +02:00
slawkens
c2678aa91f * PLEASE RELOAD YOUR ITEMS AND MONSTERS AFTER THIS UPDATE
* save monster loot in database in json format instead loading it every time from xml file
* store monster voices and immunities in json format
* removed useless monsters.gfx_name field from database
* convert item name to item id in loot in monsters.xml loader
* after changing template you will be redirected to latest viewed page
* display gallery add image form only on main gallery page
* fixed displaying monster loot when item.name in loot is used instead of item.id
* (intern) added new function getItemNameById($id)
* (intern) renamed database field monsters.hide_creature to hidden
2017-10-20 15:04:11 +02:00
slawkens
d4900eac84 Merge branch 'master' of https://github.com/slawkens/myaac 2017-10-20 10:52:57 +02:00
slawkens
f9b6e9fa2e * moved spells to twig template
* removed useless spells.spell column that was duplicate of spells.words
* Usage_Statistics reports now plugin version too
* (internal) removed $hook_types array, using defined() and constant() functions now
* (internal) optimized Spells class
2017-10-20 10:52:55 +02:00
slawkens1
cfb460c137 * fixed warning when trying to uninstall plugin that can't be uninstalled 2017-10-19 21:02:36 +02:00
slawkens1
f9e6966687 * show uninstall plugin option only when available 2017-10-19 20:58:46 +02:00
slawkens
913b4297cf * added new tooltip to view characters equipment item name
* this requires loaded items - go to admin panel and select Items menu, then reload
* added items.xml loader class and weapons.xml loader class
* load also runes into spells table
* (internal) changed spells.vocations database field to store json data instead of comma separated
* (internal) renamed existing Items class to Items_Images
2017-10-19 17:11:49 +02:00
slawkens
23c1df72aa * fixed when ban expires is unlimited
* moved Banished code to twig
2017-10-19 10:41:39 +02:00
slawkens
cde42ec3fa * new command line tool: install_plugin.php
* can be used to install plugins from command line. Usage: "php install_plugin.php path_to_file"
* fixed if HTTP_HOST not set in common.php when executed from command line
* Added 'Are you sure?' popup when uninstalling plugin
* Moved plugin install logic to a new class: Plugins
* added some warnings when plugin json file is incomplete
2017-10-19 10:06:43 +02:00
slawkens
0104d2fd36 * added nice looking menu for my account page in default template 2017-10-18 17:11:05 +02:00
slawkens
85d1f3419a * renamed guild action create_guild to simply create 2017-10-18 16:28:40 +02:00
slawkens
e45d27b5c7 * moved most of guilds html-in-php code to twig
* moved buttons to separate templates
* moved online search for to twig
2017-10-18 16:08:15 +02:00
slawkens
a3d94db6eb Merge branch 'master' of https://github.com/slawkens/myaac 2017-10-18 10:59:21 +02:00
slawkens
ef904c854b * moved guilds actions (pages) to guilds/ directory 2017-10-18 10:59:15 +02:00
Sławek
7a7eb4e553 Minimum PHP 5.3.0 is required cause of Anonymous functions 2017-10-18 10:30:54 +02:00
slawkens
c7f549742d Merge branch 'master' of https://github.com/slawkens/myaac 2017-10-18 10:29:59 +02:00
slawkens
1850ef70d8 * moved forum.new_post to twig templates
* moved forum functions to Forum class
* minimum PHP version to install AAC is now 5.3.0 cause of Anonymous functions used by Twig
2017-10-18 10:29:54 +02:00
slawkens1
0b693a02bd * update to 0.6.1 2017-10-17 23:18:20 +02:00
slawkens1
508db95cba * fixed signatures 2017-10-17 21:17:06 +02:00
slawkens
bbae0c3ade * added usage statistics lib, will be used for reporting 2017-10-17 17:25:43 +02:00
slawkens
0239f940a0 * moved forum.edit_post to twig templates
* fixed forum move thread
2017-10-17 17:11:31 +02:00
slawkens
1df0c2b313 * fixed infinite loop 2017-10-17 17:03:47 +02:00
slawkens
a9d9ace532 * super admins have access to everything 2017-10-17 16:34:38 +02:00
slawkens
cb83e17710 * moved forum actions (pages) to forum/ directory
* fixed account actions
2017-10-17 16:30:39 +02:00
slawkens
1727df7082 * new configurable: session_prefix, to allow more websites on one machine
* must be unique for every website on your dedicated server!
2017-10-17 16:09:07 +02:00
slawkens
3d585a3d02 Merge branch 'master' of https://github.com/slawkens/myaac 2017-10-17 15:28:34 +02:00
slawkens
69f822b69c * moved account actions (pages) to account/ directory 2017-10-17 15:28:29 +02:00
slawkens1
abfe3b08af * Account::getAccess = Account::getGroupId() 2017-10-17 03:36:37 +02:00
slawkens1
66a3c46aaf * better error handling for monsters and spells loader
* check if file exist before loading
* save errors to system/logs/error.log
2017-10-16 23:31:28 +02:00
slawkens
c914a73352 * update to 0.6.0 2017-10-16 17:18:37 +02:00
slawkens
5041ed1564 * added client 11.00 to install options 2017-10-16 16:54:59 +02:00
slawkens
4daaa67710 * new account.login view for tibiacom template
* added new indicator icons for create account, create character and change character name
* attempt to fix incorrect views counter behavior (its resetting to 0 in some cases)
* moved check_* functions to class Validator
* from now all validators ajax requests will fire onblur instead of onkeyup
* ajax requests returns now json instead of xml
* added 404 response when file is not found
* fixed gallery
2017-10-16 16:49:35 +02:00
slawkens
dd572b00d0 * renamed screenshots to gallery and movies to videos 2017-10-16 09:25:26 +02:00
slawkens1
3fef1a6eec * fix for php versions under 5.5 where empty() function supported only variables 2017-10-15 22:12:23 +02:00
slawkens1
6d81a29bb6 * check if monster file exist before loading it 2017-10-15 21:53:44 +02:00
slawkens1
3f1c638a14 * removed never used lib - dwoo 2017-10-15 21:32:21 +02:00
slawkens1
7caca74d57 * fixed editing page in admin panel 2017-10-15 20:47:04 +02:00
slawkens
d95aea319e * fixed forum new post on mac os and some specific mysql versions
* fixed Account::getGuildAccess function
2017-10-13 15:30:29 +02:00
slawkens
9aed09d250 Added missing change email and change info buttons to account.management template 2017-10-13 09:11:15 +02:00
slawkens1
3ebcd788fb * also fixed frags table 2017-10-12 20:19:47 +02:00
slawkens1
816751f464 * fixed character deaths table 2017-10-12 20:18:04 +02:00
slawkens
f84ae88aa4 * added faq management - add/edit/move/hide/delete from website
* moved install pages to twig
* load monsters and spells on installation of the AAC
2017-10-12 17:40:02 +02:00
slawkens1
315e0400ff * fixed config loaded when some inline comments are present 2017-10-11 23:19:11 +02:00
slawkens1
22cf7f5d4f * more fixes to plugin dot 2017-10-11 22:26:16 +02:00
slawkens1
6ec829e47f * fixed if plugin zip file name contains dot (.) 2017-10-11 22:22:12 +02:00
slawkens1
a119d75589 * added if HTTP_IF_MODIFIED_SINCE 2017-10-11 21:58:28 +02:00
slawkens1
92028a2492 * enabled cache http headers for signatures
* disabled fullpage plugin in tinymce
2017-10-11 21:25:49 +02:00
slawkens
42ef8487c8 * updated changelog 2017-10-11 17:05:30 +02:00
slawkens
e92e5d1040 * update to 0.5.1 2017-10-11 17:01:14 +02:00
slawkens
a1950cf27e * fixed forum add/edit board 2017-10-11 16:59:31 +02:00
slawkens
27fb0ffb06 * update templates cache when installing/uninstalling plugin 2017-10-11 15:50:47 +02:00
slawkens
6c3439acf9 * check if plugin exist before uninstalling
* fixed some bug when you uninstall and then try to install again on the same page
* moved some characters.frags code to twig template
2017-10-11 15:24:54 +02:00
slawkens
005356ebb3 * new configurable: highscores_length, how much highscores to display
* fixed characters twig template loading
* fixed highscores links
2017-10-11 14:43:11 +02:00
slawkens
f0adabf567 * moved character deaths and frags table generation to twig
* fixed some warning in OTS_Base_DB
2017-10-11 13:49:57 +02:00
slawkens
739782109e * update to 0.5.0 2017-10-10 15:50:46 +02:00
slawkens
87ba018ab8 * some fix 2017-10-10 15:42:52 +02:00
slawkens
041702615f * fixed so you can also use slash in custom pages 2017-10-10 15:39:00 +02:00
slawkens
0a82f306f6 * moved admin pages to twig
* edited account.management.html.twig to fit modern templates, tibiacom have its own template
* sample characters are now assigned to admin account and have group_id 4 to not be shown on highscores
* fixed database pages loading
* added require.database plugin option, which will prove if DATABASE_VERSION is enough
2017-10-10 15:32:59 +02:00
slawkens1
856e72150c * fixed adding/editing commands
* fixed undefined index in install plugin
2017-10-09 20:34:06 +02:00
slawkens1
e2857f8ca5 * suggested by @gpedro 2017-10-09 20:01:29 +02:00
slawkens
04d9ec9c94 * updated tinymce to the latest (4.7.0) version
* added option to uninstall plugin
* added option to require specified myaac or php version for plugins
* added links loaded from database to admin panel - for future plugins
* added few characters hooks
* fixed some kathrine template js bug when shop is disabled
2017-10-09 16:47:34 +02:00
slawkens1
e984a467ef * print some info to error.log when can't find config.lua 2017-10-08 22:04:33 +02:00
slawkens1
8342a7b8a8 * fixed links like serverInfo (capitalized) 2017-10-08 20:53:45 +02:00
Sławek
269af1930c * updated readme 2017-10-08 19:07:21 +02:00
slawkens1
b7bb950abc * fixed typo 2017-10-08 18:59:43 +02:00
slawkens1
4a19458c15 * moved functions declaration a bit upper, so it can use str_replace_first 2017-10-08 18:24:35 +02:00
slawkens1
b6db420465 * fixed redirects when BASE_DIR is empty 2017-10-08 18:12:06 +02:00
slawkens
7b234ad41f * moved .htaccess rules to plain php (index.php)
Its a salut to nginx and other web server nutzer (not apache), as they can now simply redirect all requests with simple rule to index.php, and php will take care of all redirects. .htaccess just now redirects everything to index.php with simple 3 lines.
* change accountmanagement links to use friendly_urls
* fixed creating new forum thread
* some fixes in account changecomment action
* show info when account name/number or password is empty on login
* fixed showing account login errors
* added new twig function getLink that convert link taking into account config.friendly_urls
* internalLayoutLink -> getLink
2017-10-06 17:11:06 +02:00
slawkens
35b0795b51 * update to 0.4.3 2017-10-05 17:19:49 +02:00
slawkens
04a7796665 * moved some guild pages and account to twig
* fixed account create javascript warnings when fields are empty
2017-10-05 17:07:49 +02:00
slawkens1
755deae717 * enable auto_reload option for twig 2017-10-05 00:48:34 +02:00
slawkens1
6d66dc9043 * fixed country detection (was a little typo) 2017-10-05 00:38:48 +02:00
slawkens1
bbd9cd2101 * fixed showing of character deaths and frags 2017-10-04 20:52:36 +02:00
slawkens
b6ccde075d * moved some more pages to twig
* moved online, movies, google_analytics code, faq, experience_table, downloads to twig
* added new global variabl to twig (status)
* removed some unused page (custom.php)
* automatically append trailing slash at config.item_images_url
* moved downloads from clients.halfaway.net to tibia-clients.com
* show some more info on monster loot (currently only on TFS 0.3 and those that use item.id in monster files instead of item name)
* some more unimportant fixes
2017-10-04 17:49:54 +02:00
slawkens1
e94b9006e6 * set deletion = 0 on sample characters, so it won't be deleted by tfs 1.0 on startup 2017-09-30 14:06:52 +02:00
slawkens1
e9c8159bf3 * new, better config.lua parser from latest gesior
you can also now include files in your config.lua file by using
dofile('config.local.lua') and it will be loaded by aac
2017-09-30 00:32:26 +02:00
slawkens1
919f69ef46 * first check if page to load exist in database, then in pages/ dir 2017-09-29 22:33:25 +02:00
slawkens1
4ac2fe27d5 * fixed rook sample
* rook sample will now have level 1, 150 health, 0 mana, and 400 cap.
2017-09-29 18:30:53 +02:00
slawkens1
be2daeb4ab * fixed https://otland.net/threads/myaac-v0-0-1.251454/page-13#post-2466303
and https://otland.net/threads/myaac-v0-0-1.251454/page-13#post-2466313
2017-09-26 03:02:51 +02:00
slawkens1
7b96ce9b8c * added CREDITS file 2017-09-14 20:13:23 +02:00
slawkens
801188f957 * fixed country selection in create account
* deleted some useless code
2017-09-14 16:37:01 +02:00
slawkens
c546a46847 * moved rules to twig
* added bugtracker to kathrine template
2017-09-14 15:03:09 +02:00
slawkens
6527d21794 * updated version number
* updated to 0.4.2
2017-09-14 08:37:53 +02:00
slawkens
7fad722927 * update to 0.4.1 2017-09-13 16:39:09 +02:00
slawkens
ab249eb95f * fixed log in to admin panel
* fixed File is not .zip plugin upload error
2017-09-13 16:35:06 +02:00
slawkens
bdbd215aad * renamed some variable that caused problems with some templates 2017-09-13 15:53:56 +02:00
slawkens
68212a36bb *this 2017-09-13 15:35:08 +02:00
slawkens
ac3691dc08 * update to 0.4.0
* fixed some bugs in bugtracker
* updated database to version 9
2017-09-13 15:30:18 +02:00
slawkens
3a6aab67d5 * moved account.create and news.archive to twig
* added new configurable date_timezone
2017-09-13 14:32:50 +02:00
slawkens
2c5b3f4da3 * added some more mime types to zip file detection 2017-09-13 10:53:04 +02:00
slawkens
73eca63c4f * automatically detect json file in .zip instead of basing on filename 2017-09-13 09:03:48 +02:00
slawkens
c504588993 * added option to add/edit/delete/hide/move forum boards
* now whole account management page is moved to Twig
* renamed table forum_sections to forum_boards
* fixed some rare error when user is logged in for longer than 15 minutes and tries to login again
2017-09-12 15:55:23 +02:00
slawkens
5b14c6d4d4 * fixed global config variable in twig templates
* rest from account.create_character moved to twig
* fixed some grammar errors
* fixed some separators in kathrine template
2017-09-11 17:41:27 +02:00
slawkens
4685c7b868 * renamed twig templates to .twig, so IDE's can correctly render it
* moved news.add to twig template
* now twig templates will be loaded directly from template dir f.e. templates/kathrine/news.html.twig
2017-09-11 11:11:43 +02:00
slawkens
0e185c8bcf *more templates moved to Twig
*some not important small changes
2017-09-08 07:36:33 +02:00
Sławek
e230949edd Merge pull request #9 from AngelOfDeaths/patch-1
*Added to template bugtracker
2017-09-04 20:30:54 +02:00
Angel Of Death
a897b5e98c *Rework old code 2017-09-04 20:19:22 +02:00
Sławek
186d3dbd38 Merge pull request #8 from AngelOfDeaths/patch-4
*Added Bug Report page
2017-09-04 09:19:50 +02:00
Sławek
127c04070b Merge pull request #7 from AngelOfDeaths/patch-3
*Added Support Label and Report Bug
2017-09-04 09:19:10 +02:00
AngelOfDeaths
6ff65050f5 *correct to shop history transactions 2017-09-03 21:08:20 +02:00
AngelOfDeaths
d605ef4b28 *Added shopoffer 2017-09-03 18:46:34 +02:00
AngelOfDeaths
9466b7ce75 *Added to template bugtracker 2017-09-03 18:29:39 +02:00
AngelOfDeaths
7f6eff666e *Added Bug Report page 2017-09-03 17:42:45 +02:00
AngelOfDeaths
e878b4df48 *Added Support Label and Report Bug 2017-09-03 17:27:39 +02:00
Sławek
2c3c1529a7 Merge pull request #5 from AngelOfDeaths/patch-1
* Fix
2017-09-03 15:42:20 +02:00
Sławek
ecce524c7b Merge pull request #6 from AngelOfDeaths/patch-2
* Fixed Wrong name of table
2017-09-03 15:42:03 +02:00
AngelOfDeaths
5af617b869 * Fixed Wrong name of table 2017-09-03 14:48:51 +02:00
AngelOfDeaths
3f886c9f7c * Fix
missing . on bugtracker.php line 288
2017-09-03 14:40:05 +02:00
slawkens
d50fb7a291 * moved characters.php html code to Twig template
* moved news.php to Twig news.html template
* fixed some duplicated code in signature generators
* always check if name parameter is set when generating signatures
2017-09-01 17:00:29 +02:00
slawkens
37502c5562 * moved more templates to Twig
* now you can replace template in your main template, example is templates/kathrine/templates/success.html
* removed output_errors, replace with template
* some grammar fixes
* moved some forum code to Twig templates
* added movies link to tibiacom template
2017-08-31 17:01:17 +02:00
slawkens
7620ec896b Merge branch 'master' of https://github.com/slawkens/myaac 2017-08-29 17:38:37 +02:00
slawkens
8a87186833 * more templates moved to Twig 2017-08-29 17:38:32 +02:00
slawkens1
b0f8013762 * and this 2017-08-28 23:59:04 +02:00
slawkens1
3a6a1c448a * log errors instead showing them to users with system directories
* now it will print a notice, and aditionally log full path into
system/logs/error.log
* also, when it fails to load config.lua it will output error also to
error.log
* fix when $_SERVER['HTTP_ACCEPT_ENCODING'] is not set.
2017-08-28 23:58:53 +02:00
2559 changed files with 59329 additions and 79281 deletions

14
.editorconfig Normal file
View File

@@ -0,0 +1,14 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# with a newline ending every file
[*]
indent_style = tab
indent_size = 4
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
indent_style = tab

11
.gitattributes vendored Normal file
View File

@@ -0,0 +1,11 @@
* text=auto
.gitattributes export-ignore
.gitignore export-ignore
.github export-ignore
.editorconfig export-ignore
.travis.yml export-ignore
_config.yml export-ignore
release.sh export-ignore
*.sh text eol=lf
VERSION text eol=lf

12
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: paypal.me/slawkens # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

29
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,29 @@
<!--
Please use this issue tracker only for reporting MyAAC bugs.
If you need support, please use the discord server:
- https://discord.gg/2J39Wus (we have an own channel named #my-aac there)
or use otland support boards:
- https://otland.net/forums/support.16/
-->
### Server configuration
- Operating System:
- Web Server (+ version):
- PHP Version:
- Server name and version (for example: TFS 0.3):
- MyAAC Version:
### Client configuration (Your Computer)
- Browser:
- Operating System:
### Description:
### Steps To Reproduce:

55
.gitignore vendored Normal file
View File

@@ -0,0 +1,55 @@
Thumbs.db
.DS_Store
.idea
# composer
composer.lock
vendor
# npm
node_modules
# created by release.sh
releases
tmp
config.local.php
# all custom templates
templates/*
!templates/tibiacom
!templates/kathrine
# guild images
images/guilds/*
!images/guilds/default.gif
# cache
system/cache/*
!system/cache/index.html
!system/cache/twig/index.html
!system/cache/signatures/index.html
!system/cache/plugins/index.html
# php sessions
system/php_sessions/*
!system/php_sessions//index.html
# logs
system/logs/*
!system/logs/index.html
# data
system/data/*
!system/data/index.html
# plugins
plugins/*
!plugins/.htaccess
!plugins/example.json
!plugins/account-create-hint.json
!plugins/account-create-hint
landing
# others/rest
system/pages/downloads.php

19
.htaccess Normal file
View File

@@ -0,0 +1,19 @@
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
# you can put here your myaac root folder
# path relative to web root
#RewriteBase /myaac/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php [L]
</IfModule>

View File

@@ -1,33 +0,0 @@
Options -Indexes -MultiViews
RewriteEngine On
#RewriteBase /
# Page parser
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-Za-z0-9-_+']+)\.png/?$ tools/signature/index.php?name=$1 [L]
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 ^forum/board/([0-9]+)$ index.php?subtopic=forum&action=show_board&id=$1
RewriteRule ^forum/board/([0-9]+)/([0-9]+)$ index.php?subtopic=forum&action=show_board&id=$1&page=$2
RewriteRule ^forum/thread/([0-9]+)$ index.php?subtopic=forum&action=show_thread&id=$1
RewriteRule ^forum/thread/([0-9]+)/([0-9]+)$ index.php?subtopic=forum&action=show_thread&id=$1&page=$2
RewriteRule ^forum/board/([0-9]+)/([0-9]+)$ index.php?subtopic=forum&action=show_thread&id=$1&page=$2
RewriteRule ^account/manage$ index.php?subtopic=accountmanagement
RewriteRule ^account/create$ index.php?subtopic=createaccount
RewriteRule ^account/lost$ index.php?subtopic=lostaccount
RewriteRule ^account/logout$ index.php?subtopic=accountmanagement&action=logout
RewriteRule ^news/archive/([0-9]+)$ index.php?subtopic=newsarchive&id=$1
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-_']+)$ index.php?subtopic=highscores&list=$1
RewriteRule ^polls/([0-9]+)$ index.php?subtopic=polls&id=$1
RewriteRule ^admin/$ admin/index.php
RewriteRule ^install/$ install/index.php
# temp solution >.>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-Za-z0-9-_]+)/?$ index.php?p=$1 [L]
RewriteRule ^([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)?$ index.php?p=$1&action=$2 [L]

20
.travis.yml Normal file
View File

@@ -0,0 +1,20 @@
language: php
php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0
cache:
directories:
- $HOME/.composer/cache
before_script:
- composer require php-parallel-lint/php-parallel-lint --no-suggest --no-progress --no-interaction --no-ansi --quiet --optimize-autoloader
script:
- php vendor/bin/parallel-lint --no-progress --no-colors --exclude vendor --exclude "system/libs/pot/OTS_DB_PDOQuery_PHP71.php" .

159
CHANGELOG
View File

@@ -1,159 +0,0 @@
[0.3.0 - 28.08.2017]
- 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
- automatically detect player country based on user location (IP) on create account
- player sex (gender) is now configurable at $config['genders']
- fixed recovering account and changing password when salt is enabled
- fixed installing samples when for example Rook Sample already exist and other samples not
- fixed some mysql error when character you trying to create already exist
- fixed some warning when you select nonexistent country
- password change minimal/maximal length notice is now more precise
- added 'enabled' field in myaac_hooks table, which can enable or disable specified hook
- removed DEFAULT '' for TEXT field. It didn't worked under some systems like MAC OS X.
- minimum PHP version to install the MyAAC is now 5.2.0 cause of pathinfo (extension) function
- removed unused admin stylish template
- removed some unused cities field from myaac_spells table
- moved news adding at installation from schema.sql to finish.php
- some optimizations
[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]
- this is just release to update version number
[0.1.2 - 11.05.2017]
- forgot to update CHANGELOG and MYAAC_VERSION
[0.1.1 - 11.05.2017]
- fixed updating myaac_config with database_version to 1
- fixed database updater
[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 automatic database updater (data migrations)
- renamed events to hooks
- moved hooks to database
- now you can use hooks in plugins
- set account.type field to 5 on install, if TFS 1.0+
- added example plugin
- new, latest google analytics code
- fixed bug with loading account.name that has numbers in it
- fixed many bugs in player editor in admin panel
- added error handling to plugin manager and some more verification in
- file has been correctly unpacked/uploaded
- fixed Statistics page in admin panel when using account.number
- fixed bug when creating/recovering account on servers with
- account.salt field (TFS 0.3 for example)
- fixed forum showing thread with html tags (added from news manager)
- new, latest code for youtube videos in movies page
- fixed showing vocation images when using $config['online_vocations_images']
- many fixes in polls (also importing proper schema)
- fixed hovering on buttons in kathrine template (on accountmanagement page)
- fixed signatures (many fixes)
- added missing gesior signature system
[0.0.6 - 06.05.2017]
- fixed bug while installing (https://otland.net/threads/myaac-v0-0-1.251454/page-3#post-2440543)
- fixed bug when creating character (not showing errors) (one more time)
- fixed support for TFS 0.2 series
- added FAQ link
[0.0.5 - 05.05.2017]
- fixed bug when creating character (not showing errors)
- Fixed characters loading with names that has been created with other AAC
- fixed links to shop in default template
- fixed some weird PHP 7.1 warnings/notices
- Fixed config loading with some weird comments
- fixed bug with status info utf8 encoding (https://otland.net/threads/myaac-v0-0-1.251454/page-2#post-2440259)
- fixed when ip in log_action is NULL (https://otland.net/threads/myaac-v0-0-1.251454/page-2#post-2440357)
- fixed bug when guild doesn't exist on characters page (https://otland.net/threads/myaac-v0-0-1.251454/page-2#post-2440320)
- disabled friendly_urls by default
- fixes when $config['database_*'] is set
- added CHANGELOG
[0.0.3 - 03.05.2017]
- Full support for OTHire 0.0.3
- added support for otservers that doesn't use account.name field, instead just account number will be used
- fixed encryption detection on TFS 0.3
- fixed bug when server_config table doesn't exist
- (install) moved admin account creation to new step
- fixed news comment link
- by default, the installer creates now the Admin player, for admin account
- fixed installation errors
- fixed config.lua loading with some weird comments
[0.0.2 - 02.05.2017]
- updated forum links to use friendly_urls
- some more info will be shown when cannot connect to database
- show more error infos when creating character
- fixed forum link on newses
- fixed spells loading when there's vocation name instead of id
- fixed bug when you have changed template but it doesn't exist anymore
- fixed vocations with promotion loading
- fixed support for gesior pages and templates
- added function OTS_Acount:getGroupId()
[0.0.1 - 01.05.2017]
This is first official release of MyAAC.
Features are listed here
For more information, see the release announcement on OTLand: https://otland.net/threads/myaac-v0-0-1.251454/

769
CHANGELOG.md Normal file
View File

@@ -0,0 +1,769 @@
# Changelog
## [0.8.7 - 31.08.2022]
### Added
* login.php for client 12.x is now part of official repo
* browsehappy code
* config use character sample skill (#201, @gpedro)
* custom words blocked (#190, @gpedro)
### Changed
* save php sessions in myaac dir
* don't count deleted players when creating new character
### Fixed
* patch vulnerability in change_rank.php (#194, @gesior, @thatmichaelguy)
* fix guild invite page (#196, @worthdavi)
* players not showing on highscores page (#195)
* highscores page bug with high pages
* $player->getStorage() does not work at all (#169, @gesior)
* copying sample character when it have items with quotes (#200, @gpedro)
* IPv6 issue when env is set to dev (#171)
* admin page changed feet to match body colour (#174, @silic0nalph4)
* exception being thrown when creating duplicated character name (#191)
* rules page formatting (#177, @silic0nalph4)
* account character create if auto_login is enabled
* undefined variable notice on database_log enabled
* removed VERSION file
## [0.8.6 - 10.07.2021]
This update contains very important security fix.
Please update your MyAAC instances to this version.
## [0.8.5 - 08.06.2021]
### Changed
* bcmath module is not required anymore
* Gratis premium account fixes (#156, by @czbadaro)
* Update 404 response (#163, by @anyeor)
### Fixed
* compatibility with PHP 7.0 and lower
* deleting ranks in guilds (#158, by @Misztrz)
* guild back buttons (change logo & motd)
* forum table style (boards & thread view)
* guild list description new lines `<br>` being ignored (Thanks @anyeor for reporting)
## [0.8.4 - 18.02.2021]
### Added
* support for accounts.premium_ends_at (Latest TFS 1.x)
* more clients to clients.conf.php
### Changed
* minimum PHP 5.6 is now required
* password can now contain any characters
* add SSL on external image requests of items and outfits (@fernandomatos)
* Use local storage for saving menu items (tibiacom template) - fixes bug with some websites like wykop.pl (browser freeze)
* increase size of myaac_visitors.page column to 2048 (Thanks to OtLand user kaleuui)
### Fixed
* compatibility with PHP 8.0 (latest XAMPP)
* displaying PHP errors on env = "prod"
* the Guildnick not showing in the guild pages (@leesneaks)
* you cannot delete character more than twice (Thanks Okke)
* ignore arrays in config.lua (fixes experienceStages loading)
* parsing empty strings in config.lua (with comments)
* headling.php cannot find font
## [0.8.3 - 27.10.2020]
### Added
* pdo_mysql as required extension
* some notice about Email validation in create account
### Changed
* Move register DATABASE_VERSION into schema.sql
* Caused migrations being fired when user manually imported database
### Fixed
* creating very uncommon (bugged) account names
* XSS in character search
* Admin menu news editing warning when leaving page without touching the inputs
* Guild Invite not working on otservbr-global
* two boxes being show on email_change_cancel
* when adding poll = template tibiacom broken
* houses: Unknown column 'guild' in 'where clause (https://github.com/slawkens/myaac/issues/131)
* account create when account_mail_verify is enabled
* CloudFlare IP detection
* network_twitter link in tibiacom template
## [0.8.2 - 03.06.2020]
### Added
* Log query time in database_log (can be used for benchmarking)
* new PHP constant: IS_CLI
* $_SERVER['REQUEST_URI'] to database.log
* outfit to highscores box in tibiacom template
* system/data to .gitignore
* error_reporting in admin panel (when in dev mode), so it shows php notices and warnings
* example quests in config.php
### Changed
* account_login input type from password to text
### Fixed
* Guild Invite not working on otservbr-global (#123)
* news not updating after adding in admin panel
* wrong mana of character samples (#125)
* missing rules page on clean install
* double space character name creation (@Lee, #121)
* creatures page: Max count and chance not shown on hovered items
* exception being thrown when characters.frags enabled on TFS 1.x
* TFS 0.4 guilds creation (Where guilds.checkdata and motd doesn't have default value)
* ERR_TOO_MANY_REDIRECTS browser error on template change
* updating template menus on template change
* Account change info when config.account_country is disabled
* cancel change email request
* config.character_name_min/max_length being ignored in change_name.php
* some rare bugs when database is no up-to-date and someone enters admin panel
* extra line that is added when using a newer version than official release (@Lee)
* admin links in featured article
* some PHP Notice when HTTP_HOST is not set (Can happen on some old versions of HTTP protocol)
* Show character indicator in check_name.js
* Houses list View button was wrong (was from bootstrap)
* OTS_House __construct - not loading by houseid parameter
* message() function when executed in CLI
### Removed
* unused myaac_commands table from schema
* MyISAM engine from migration scripts (#128)
## [0.8.1 - 10.03.2020]
### Added
* Support for Nostalrius OTS
### Changed
* Move TODO to wiki
* .tooltip css class to .item_image (bootstrap conflict)
### Fixed
* Reloading of creatures/monsters throwing an exception
* Loading custom pages with old Gesior variables [#108](https://github.com/slawkens/myaac/issues/107)
* Some weird behaviour with installation of plugins
* CHANGELOG.md loading in Admin Panel
* spells displaying when level = 0
* Some PHP warnings and notices
## [0.8.0 - 19.02.2020]
### Added:
* new Awesome Bootstrap Admin Panel by Lee (@Leesneaks)
* using Bootstrap 3
* all existing pages were adjusted
* new editor: Accounts
* improved editor: Players
* new Reports View page
* Modules directory, which can be added using Plugins (@Leesneaks, @whiteblXK)
* move News Management here (@whiteblXK)
* interactive player outfit chooser (@tobi132)
* added Highscores by balance
* possibility to define colors and "Open in New Tab" on Template Menus (needs to be supported by Template)
* support for database persistent and socket connections (performance boost)
* Team page - display outfits of the players (configurable)
* added clear_cache.php, send_email.php bin commands (@slawkens, @tobi132)
* added locale pt_br (@ivenspontes)
* added load time into items & weapons loading admin page
* new, beautiful exception handler
* added travisci to prevent mistype (@gpedro, #89)
* added showing database name into installation script (@tobi132)
* compatibility with old z_ gesior table (@tobi132, #46)
* added nginx-sample.conf, .editorconfig, VERSION
* database towns table support for TFS 1.3 (@tobi132)
* added enable_tinymce option to Pages editor
### Fixed:
* account login redirect with special chars (like '&' and '?')
* black skull info at serverInfo (@tornadia)
* set correct limit at lastkills page from config (anyeor from OtLand)
* myaac_monsters table column loot problem (#79)
* players column deleted install description (@gpedro, #91)
* experience table being to wide and buggy on some templates (@tobi132, #90)
* fix errors with .htaccess files
* added index.html to prevent indexing the folder by mod_index
### Changed:
* Environment is now configurable by env setting (Significantly better load times with 'prod')
* replace spells, monsters tables with JavaScript Sortable Tables - DataTables (@Leesneaks)
* change default MySQL Storage Engine to InnoDB and Default Character Set to utf8
* updated OTS_House class to support latest TFS 1.x (new columns)
* updated monster images to the original ones from tibia.com
* increased the minimum length (3 -> 4) and decreased the maximum length (25 -> 21) of the New Character Name (by @vankk)
* use $db->exec instead of $db->query optimisation
* move items from database to Cache_PHP (Much more faster load time)
* allow simultaneous loading of config.ini and config.php in templates
* updated copyright year and SSL link (@EPuncker, #88)
* move commands, rules and downloads pages into database (@tobi132)
* better view of guilds (new buttons, table look and feel) (@tobi132)
* remove stupid alerts on account create
* remove .dist extension from .htaccess
### New Configurables (config.php)
* env (Environment)
* account_create_auto_login (Auto Login after Create Account - Registration)
* account_create_character_create (Create Character directly on Create Account page) (@tobi132)
* footer_show_load_time (display load time of the page in the footer)
* database_socket (Connection via Unix Socket)
* database_persistent (Database Persistent Connection)
* database_log (Logging of Database Queries)
* admin_panel_modules (Modules displayed in Admin Panel Dashboard)
* status_timeout, status_interval
* smtp_debug (More info about SMTP errors in error.log)
* team_display_outfit (Display outfit of the team members on teams page)
* highscores_balance (Display highscores by balance)
* character_name_min/max_length (Minimum and maximum length of character name)
* characters.deleted (display deleted characters on characters page)
### Forum:
* show image in full screen on click
* show user avatar (outfit) in posts
* replaced forum actions links (move, remove, edit, quote) with images
* redirect directly to the thread on user login (on new reply)
### Installer:
* AJAX loader for the important stuff
* create admin account: ask for e-mail + character name
* load items & weapons
* check user IP on install to prevent install by random user
* remember status of the installation
* remember language on first step (welcome)
* ask user for timezone
* auto detected browser language in select language
### Plugins
* sandbox for plugins, don't install when requirements are not satisfied
* allow comments inside plugin json file (php style)
* new require options for plugins: (look into example.json)
* require database version, table or column of the MyAAC schema
* require php-extension
* require semantic-version (like in composer.json)
* new hooks: LOGIN, LOGIN_ATTEMPT, LOGOUT, HOOK_ACCOUNT_CREATE_*
### Cache
* php 7.x APCu cache support (faster cache engine)
* new cache engine: plain PHP (is good with pure php 7.0+ and opcache)
* cache lastkills.php, $db->hasTable, $db->hasColumn, hooks and template menus
* stop using global $cache variable, use Singleton pattern instead
### Twig
* move pages to Twig templates: team, lastkills, serverinfo, houses, guilds.list, guild.view, admin.logs, admin.reports (@whiteblXK, @tobi132)
* replace "$twig->render()" with "$this->display"
* move Twig functions to separate file
* move tibiacom boxes to Twig templates
* allow Pages to be loaded as Twig template (this allows using Twig variables in Pages) (@tobi132)
* allow string to be passed to hook twig function
### Functions
* config($key), configLua($key)
* clearCache()
* OTS_Account:
* getCountry()
* setLastLogin($lastlogin) (@Leesneaks)
* setWebFlags(webflags) (@Leesneaks)
* OTS_Player:
* getAccountId()
* countBlessings() (@Leesneaks)
* checkBlessings($count) (@Leesneaks)
* is_sub_dir (in system/libs/plugins.php)
* Twig:
* getPlayerLink($name, $generate = true)
* removed SQLquote and SQLquery from OTS_Base_DB
* Add optional $params param into log_append (will log arrays) (@tobi132)
### Internal
* moved clients list to the new file (clients.conf.php)
* changed tableExist and fieldExist to $db->hasTable(table) + $db->hasColumn(table, column)
* changed deprecated $ots->createObject() functions with their OTS_ equivalents
* add global helper config($key) function + twig binding
* use config() instead of global $config
* remove unnecessary parentheses in include/require PHP functions
* use __DIR__ instead of dirname(__FILE__) - since PHP 5.3.0
* change intval() function to (int) casting (up to 6x faster)
* add release.sh script (for GitHub releases)
* use curl as alternative option for reporting install
### Libraries
* updated Twig to version v1.35.0
* updated TinyMCE to version v4.7.4
### Deprecations
* change deprecated HTML <center> tag to <div style="text-align:center">
* replace deprecated HTML <font> tag with <span>
## [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)
* (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)
* fixed default stamina on otserv 0.6.x engine (and some others perhaps)
* install: change permission check to is_writable
* changed highscores_groups_hidden to 3 (for TFS 1.x)
* updated background-artwork (tibiacom template) to the latest version, removed other ones
## [0.7.8 - 12.01.2018]
* fixed installation error " call to undefined method OTS_DB_MySQL::hasColumn()"
* updated tinymce to the latest (4.7.4) version
* enabled emoticons plugin in tinymce :)
* some security fixes
## [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)
* immediately reload config.lua when there's change in config.server_path detected
* added new forum option: "Enable HTML" (only for moderators)
* fixed othire default column value (#26)
* fixed saving custom vocations in admin panel (#36)
* fixed warning in highscores when vocation doesn't exist
* fixed characters page - config.characters.frags "Notice: Use of undefined constant"
* fixed getBoolean function when boolean is passed
* fixed empty success message on leave guild
* fixed displaying premium account days
* function OTS_Account:getPremDays will now return -1 if there's freePremium configurable enabled on the server
* fixed tr bgcolor in characters view (Frags) (#38)
* fixed some warning in guild show
* fixed PHP warning about country not existing on online and characters pages
* fixed forum bbcode parsing
* don't add extra <br/> to the TinyMCE news forum posts
* (internal) using $player->getVocationName() where possible instead of older method
## [0.7.6 - 05.01.2017]
* fixed othire account creating/installation
* fixed table name players -> players_online
* fixed unexpected error logging about email fail
* added max_execution_time to the install finish step
* some small fix regarding highscores vocation box
## [0.7.5 - 04.01.2017]
* fixed bug on othire with config.account_premium_days
* fixed bug on TFS 1.x when online_afk is enabled
* warning about leaving news page with changes
* added player status to tibiacom top 5 highscores box
* save detected country on create account in session
* fixed getPremDays and isPremium functions (newest 11.x engines are bugged when it comes to PACC, its not fault of MyAAC)
* fix when there are no changelogs or highscores yet
* small fix regarding getTopPlayers function which was ignoring $limit variable
* fixed news adding when type != ARTICLE
* fixed template path finding
* fixed displaying article_text when it was empty saved
## [0.7.4 - 24.12.2017]
* fixed mysql fatal error on tibiacom template - top 5 box
* fixed displaying of level percent bar on tibian signature
* inform user about Twig cache failure on installation, instead of http 500 error
* when dir system/cache is not writable by the webserver, then show some nice notice to the user about it instead of http 500 error
* remember client version select and usage stats checkbox in session on install
* automatically update highscores_ids_hidden for users who installed myaac before (migration)
## [0.7.3 - 18.12.2017]
* 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
* prevent adding duplicated newses with installation
* some changes to sample characters: chanced town_id to 1, posx: 1000, posy: 1000, posz: 1000 and default group_id to 1 so you can change in-game outfits and they will be used
* added version 772 constant to install client choose (OTHire)
* better solution for hidding samples (configurable) - highscores_ids_hidden
* fixed account.login redirect not working on tibiacom template
* installation: warn about wrong admin account name/id and password
* fixed last menu closing in tibiacom template
* updated polish locale (translation) on install
* (internal) removed some duplicated code on install finish
* (internal) renamed installation step files to be in correct order
* added TODO file
## [0.7.1 - 13.12.2017]
* added changelog menu item to kathrine template
* fixed some php short tag in changelogs page
* fixed guild change description back button
* removed duplicated "Support List" menu item from tibiacom template
* changed some notice when version check is failed
* (internal) moved changelog to twig
## [0.7.0 - 20.11.2017]
* 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)
* you can edit them in Admin Panel under 'Menus' option
* you can also add custom links, like http://google.pl
* added networks (facebook and twitter) and highscores (top 5) boxes to tibiacom template, configurable in templates/tibiacom/config.php
* added news ticker for kathrine template
* added featured article to tibiacom template (you can add them with add news button)
* added tinymce editor to 'Pages' in admin panel
* added links to edit/delete/hide custom page directly from page
* update forum post after editing news (when forum post has been created)
* enabled code plugin for tinymce which enabled raw html code editing
* removed videos pages, as it can be easily added using custom Menus and Pages with insert Media
* removed bug_report configurable, its now enabled by default
* log some error info when mail cannot be send on account create
* twig getLink function will now return with full url (BASE_URL included)
* verify install post values directly on config page and display error
* updated tinymce to version 4.7.2 (from 4.7.0)
* updated phpmailer to version 5.2.26 (from 5.2.23)
* (#30) (fix) recovering account on servers that doesn't support salts
* (fix) account email confirm function
* (fix) showing changelog with urls in Admin Panel
* (fix) uninstalling plugin
* (fix) polls box in tibiacom template
* (fix) remove hooks from db on plugin deinstall
* (fix) some weird include possibilities with forum and account actions (verify action name)
* (fix) loading hooks from plugin installed from command line
* (fix) some changelog PHP Notice warning
* (internal) moved uninstall logic to Plugins class
* (internal) moved tibiacom boxes to separate directory
* (internal) moved news tickers to twig template
* (internal) moved Forum class to separate file
* (internal) moved deprecated functions to compat.php
* (internal) added some compat functions that are used by shop system
* (internal) renamed constant TICKET -> TICKER
* (internal) shortened message functions
## [0.6.6 - 22.10.2017]
* fixed some php fatal error on spells page
* changed spells.vocations field in db size to 300
* please reload your spells after this update!
## [0.6.5 - 21.10.2017]
* fixed displaying custom pages
* fixed adding new group forum board
## [0.6.4 - 20.10.2017]
* reverted OTS_Account::getLastLogin() cause its used by tibia11-login plugin
## [0.6.3 - 20.10.2017]
* fixed creating account
* fixed viewing thread without being logged
* fixed showing premium account status
## [0.6.2 - 20.10.2017]
* added forums for guilds and groups
* 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"
* added new tooltip to view characters equipment item name and monster loot
* added items.xml loader class and weapons.xml loader class
* minimum PHP version to install AAC is now 5.3.0 cause of Anonymous functions used by Twig
* Added 'Are you sure?' popup when uninstalling plugin
* added some warnings when plugin json file is incomplete
* fixed showing in characters ban expires when is unlimited
* fixed displaying monster loot when item.name in loot is used instead of item.id
* load also runes into spells table
* display plugin uninstall option only if its possible
* after changing template you will be redirected to latest viewed page
* display gallery add image form only on main gallery page
* (internal) moved most of guilds html-in-php code to twig
* (internal) moved spells page to twig template
* (internal) removed useless spells.spell column that was duplicate of spells.words
* (internal) save monster loot in database in json format instead loading it every time from xml file
* (internal) store monster voices and immunities in json format
* (internal) moved buttons to separate template
* (internal) moved online search form to twig
* (internal) added new function getItemNameById($id)
* (internal) Moved plugin install logic to a new class: Plugins
* (internal) changed spells.vocations database field to store json data instead of comma separated
* (internal) removed $hook_types array, using defined() and constant() functions now
* (internal) removed useless monsters.gfx_name field from database
* (internal) renamed database field monsters.hide_creature to hidden
* (internal) renamed existing Items class to Items_Images
* (internal) optimized Spells class
* (internal) new function: OTS_Guild::hasMember(OTS_Player $player)
* (internal) new function: Forum::hasAccess($board_id)
## [0.6.1 - 17.10.2017]
* fixed signatures loading
* 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)
* check if file exist before loading (monsters and spells)
* (internal) Account::getAccess() = Account::getGroupId()
* (internal) moved account actions (pages) to account/ directory
* (internal) moved forum actions (pages) to forum/ directory
* (internal) moved forum.edit_post to twig templates
## [0.6.0 - 16.10.2017]
* added faq management - add/edit/move/hide/delete from website
* new account.login view for tibiacom template
* monsters and spells are now being loaded at the installation of the AAC
* fix for php versions under 5.5 where empty() function supported only variables
* added missing change email and change info buttons to account.management default template
* added new indicator icons for create account, create character and change character name
* fixed config loader when some inline comments are present
* fixed editing page in admin panel that contains some html code
* fixed forum new post on mac os and some specific mysql versions
* attempt to fix incorrect views counter behavior (its resetting to 0 in some cases)
* enabled cache http headers for signatures
* check if monster file exist before loading it
* fixed if plugin zip file name contains dot (.)
* renamed screenshots to gallery and movies to videos
* moved install pages to twig
* fixed Account::getGuildAccess function
* removed never used library from sources - dwoo
* moved check_* functions to class Validator
* from now all validators ajax requests will fire onblur instead of onkeyup
* ajax requests returns now json instead of xml
* added 404 response when file is not found
## [0.5.1 - 11.10.2017]
* fixed forum add/edit board
* new configurable: highscores_length, how much highscores to display
* fixed highscores links (ALL, previous and next page)
* update templates cache when installing/uninstalling plugin
* moved character deaths and frags table generation to twig
* fixed some bug when you uninstall plugin and then try to install again on the same page
* check if plugin exist before uninstalling
* fixed some warning in OTS_Base_DB
## [0.5.0 - 10.10.2017]
* 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
* added option to uninstall plugin
* added option to require specified myaac, php or database version for plugins, without that plugin won't be installed
* change accountmanagement links to use friendly_urls
* fixed creating new forum thread
* sample characters are now assigned to admin account and have group_id 4 to not be shown on highscores
* added links loaded from database to admin panel - for future plugins
* print some info to error.log when can't find config.lua
* some fixes in account changecomment action
* show info when account name/number or password is empty on login
* fixed showing account login errors
* added few characters hooks
* fixed some kathrine template js bug when shop is disabled
* you can now use slash '/' in custom pages loaded from database
* added new twig function getLink that convert link taking into account config.friendly_urls
* internalLayoutLink -> getLink
## [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')
* fixed country detection in create account
* fixed showing of character deaths and frags
* fixed https://otland.net/threads/myaac-v0-0-1.251454/page-13#post-2466303
* fixed https://otland.net/threads/myaac-v0-0-1.251454/page-13#post-2466313
* fixed rook sample, which will now have level 1, 150 health, 0 mana, and 400 cap.
* fixed samples being deleted by tfs 1.0+ cause of 'deletion' field set to 1
* pages loaded from database have higher priority than normal .php pages, so they will be loaded first if they exist
* moved many pages to twig templates
* change download client links from clients.halfaway.net to tibia-clients.com
* added bugtracker to kathrine template
* added CREDITS file
## [0.4.2 - 14.09.2017]
* updated version number
## [0.4.1 - 13.09.2017]
* fixed log in to admin panel
* fixed File is not .zip plugin upload error
## [0.4.0 - 13.09.2017
* added option to add/edit/delete/hide/move forum boards
* moved some of HTML-in-PHP code to Twig templates
* added bug_report configurable which can enable/disable bug tracker
* log errors instead of showing them to users with system directories
* fix when $_SERVER['HTTP_ACCEPT_ENCODING'] is not set
* when it fails to load config.lua it will output error also to error.log
* automatically detect json file in .zip instead of basing on filename (admin panel - plugins)
* hopefully fixed the error with "The file you are trying to upload is not a .zip file. Please try again."
* fixed wrong name of table in bugtracker
* fixed some bugs in bugtracker
* added report bug link in templates
* fixed some rare error when user is logged in for longer than 15 minutes and tries to login again
* fixed some grammar errors
* some small improvements
* fixed some separators in kathrine template
## [0.3.0 - 28.08.2017]
* 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
* automatically detect player country based on user location (IP) on create account
* player sex (gender) is now configurable at $config['genders']
* fixed recovering account and changing password when salt is enabled
* fixed installing samples when for example Rook Sample already exist and other samples not
* fixed some mysql error when character you trying to create already exist
* fixed some warning when you select nonexistent country
* password change minimal/maximal length notice is now more precise
* added 'enabled' field in myaac_hooks table, which can enable or disable specified hook
* removed DEFAULT '' for TEXT field. It didn't worked under some systems like MAC OS X.
* minimum PHP version to install the MyAAC is now 5.2.0 cause of pathinfo (extension) function
* removed unused admin stylish template
* removed some unused cities field from myaac_spells table
* moved news adding at installation from schema.sql to finish.php
* some optimizations
## [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]
* this is just release to update version number
## [0.1.2 - 11.05.2017]
* forgot to update CHANGELOG and MYAAC_VERSION
## [0.1.1 - 11.05.2017]
* fixed updating myaac_config with database_version to 1
* fixed database updater
## [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 automatic database updater (data migrations)
* renamed events to hooks
* moved hooks to database
* now you can use hooks in plugins
* set account.type field to 5 on install, if TFS 1.0+
* added example plugin
* new, latest google analytics code
* fixed bug with loading account.name that has numbers in it
* fixed many bugs in player editor in admin panel
* added error handling to plugin manager and some more verification in
* file has been correctly unpacked/uploaded
* fixed Statistics page in admin panel when using account.number
* fixed bug when creating/recovering account on servers with
* account.salt field (TFS 0.3 for example)
* fixed forum showing thread with html tags (added from news manager)
* new, latest code for youtube videos in movies page
* fixed showing vocation images when using $config['online_vocations_images']
* many fixes in polls (also importing proper schema)
* fixed hovering on buttons in kathrine template (on accountmanagement page)
* fixed signatures (many fixes)
* added missing gesior signature system
## [0.0.6 - 06.05.2017]
* fixed bug while installing (https://otland.net/threads/myaac-v0-0-1.251454/page-3#post-2440543)
* fixed bug when creating character (not showing errors) (one more time)
* fixed support for TFS 0.2 series
* added FAQ link
## [0.0.5 - 05.05.2017]
* fixed bug when creating character (not showing errors)
* Fixed characters loading with names that has been created with other AAC
* fixed links to shop in default template
* fixed some weird PHP 7.1 warnings/notices
* Fixed config loading with some weird comments
* fixed bug with status info utf8 encoding (https://otland.net/threads/myaac-v0-0-1.251454/page-2#post-2440259)
* fixed when ip in log_action is NULL (https://otland.net/threads/myaac-v0-0-1.251454/page-2#post-2440357)
* fixed bug when guild doesn't exist on characters page (https://otland.net/threads/myaac-v0-0-1.251454/page-2#post-2440320)
* disabled friendly_urls by default
* fixes when $config['database_*'] is set
* added CHANGELOG
## [0.0.3 - 03.05.2017]
* Full support for OTHire 0.0.3
* added support for otservers that doesn't use account.name field, instead just account number will be used
* fixed encryption detection on TFS 0.3
* fixed bug when server_config table doesn't exist
* (install) moved admin account creation to new step
* fixed news comment link
* by default, the installer creates now the Admin player, for admin account
* fixed installation errors
* fixed config.lua loading with some weird comments
## [0.0.2 - 02.05.2017]
* updated forum links to use friendly_urls
* some more info will be shown when cannot connect to database
* show more error infos when creating character
* fixed forum link on newses
* fixed spells loading when there's vocation name instead of id
* fixed bug when you have changed template but it doesn't exist anymore
* fixed vocations with promotion loading
* fixed support for gesior pages and templates
* added function OTS_Acount:getGroupId()
## [0.0.1 - 01.05.2017]
This is first official release of MyAAC.
Features are listed here
For more information, see the release announcement on OTLand: https://otland.net/threads/myaac-v0-0-1.251454/

2
CREDITS Normal file
View File

@@ -0,0 +1,2 @@
* Gesior.pl (2007 - 2008)
* Slawkens (2009 - 2020)

View File

@@ -1,18 +1,24 @@
# myaac # [MyAAC](https://my-aac.org)
[![Build Status Master](https://img.shields.io/travis/slawkens/myaac/master)](https://travis-ci.org/github/slawkens/myaac)
[![License: GPL-3.0](https://img.shields.io/github/license/slawkens/myaac)](https://opensource.org/licenses/gpl-license)
[![Downloads Count](https://img.shields.io/github/downloads/slawkens/myaac/total)](https://github.com/slawkens/myaac/releases)
[![PHP Versions](https://img.shields.io/travis/php-v/slawkens/myaac/master)](https://github.com/slawkens/myaac/blob/d8b3b4135827ee17e3c6d41f08a925e718c587ed/.travis.yml#L3)
[![OpenTibia Discord](https://img.shields.io/discord/288399552581468162)](https://discord.gg/2J39Wus)
[![Closed Issues](https://img.shields.io/github/issues-closed-raw/slawkens/myaac)](https://github.com/slawkens/myaac/issues?q=is%3Aissue+is%3Aclosed)
MyAAC is a free and open-source Automatic Account Creator (AAC) written in PHP. It is a fork of the [Gesior](https://github.com/gesior/Gesior2012) project. It supports only MySQL databases. MyAAC is a free and open-source Automatic Account Creator (AAC) written in PHP. It is a fork of the [Gesior](https://github.com/gesior/Gesior2012) project. It supports only MySQL databases.
Official website: http://my-aac.org ### Requirements
### REQUIREMENTS - PHP 5.6 or later
- PHP 5.2.0 or later
- MySQL database - MySQL database
- PDO PHP Extension - PDO PHP Extension
- XML PHP Extension - XML PHP Extension
- ZIP PHP Extension - ZIP PHP Extension
- (optional) mod_rewrite to use friendly_urls - (optional) mod_rewrite to use friendly_urls
### INSTALLATION AND CONFIGURATION ### Installation
Just decompress and untar the source (which you should have done by now, Just decompress and untar the source (which you should have done by now,
if you're reading this), into your webserver's document root. if you're reading this), into your webserver's document root.
@@ -27,19 +33,44 @@ Official website: http://my-aac.org
chmod 660 config.local.php chmod 660 config.local.php
chmod 660 images/guilds chmod 660 images/guilds
chmod 660 images/houses chmod 660 images/houses
chmod 660 images/screenshots 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.
### KNOWN PROBLEMS ### Configuration
- none - Check *config.php* to get more informations.
Use *config.local.php* for your local configuration changes.
### OTHER NOTES ### Branches
If you have a great idea or want contribute to the project - visit our website at http://www.my-aac.org This repository follows the Git Flow Workflow.
Cheatsheet: [Git-Flow-Cheetsheet](https://danielkummer.github.io/git-flow-cheatsheet)
### LICENSING That means, we use:
* master branch, for current stable release
* develop branch, for development version (next release)
* feature branches, for features etc.
This program and all associated files are released under the GNU Public ### Known Problems
License, see LICENSE for details.
- Some compatibility issues with some exotical distibutions.
### Contributing
Contributions are more than welcome.
Pull requests should be made to the Dev branch as that is the working branch, master is for release code.
Look: [Contributing](https://github.com/otsoft/myaac/wiki/Contributing) in our wiki.
### Other Notes
If you have a great idea or want contribute to the project - visit our website at https://www.my-aac.org
### License
This program and all associated files are released under the GNU Public License.
See [LICENSE](https://github.com/slawkens/myaac/blob/master/LICENSE) for details.

1
_config.yml Normal file
View File

@@ -0,0 +1 @@
theme: jekyll-theme-slate

View File

@@ -1,14 +1,19 @@
<?php <?php
// few things we'll need // few things we'll need
require('../common.php'); require '../common.php';
require_once(BASE . 'config.local.php');
if(file_exists(BASE . 'config.local.php')) {
require_once BASE . 'config.local.php';
}
if(file_exists(BASE . 'install') && (!isset($config['installed']) || !$config['installed'])) if(file_exists(BASE . 'install') && (!isset($config['installed']) || !$config['installed']))
{ {
header('Location: ' . BASE_URL . 'install/'); header('Location: ' . BASE_URL . 'install/');
die('Setup detected that <b>install/</b> directory exists. Please visit <a href="' . BASE_URL . 'install">this</a> url to start MyAAC Installation.<br/>Delete <b>install/</b> directory if you already installed MyAAC.<br/>Remember to REFRESH this page when you\'re done!'); throw new RuntimeException('Setup detected that <b>install/</b> directory exists. Please visit <a href="' . BASE_URL . 'install">this</a> url to start MyAAC Installation.<br/>Delete <b>install/</b> directory if you already installed MyAAC.<br/>Remember to REFRESH this page when you\'re done!');
} }
define('ADMIN_PANEL', true);
$content = ''; $content = '';
// validate page // validate page
@@ -19,11 +24,27 @@ if(empty($page) || preg_match("/[^a-zA-Z0-9_\-]/", $page))
$page = strtolower($page); $page = strtolower($page);
define('PAGE', $page); define('PAGE', $page);
require(SYSTEM . 'functions.php'); require SYSTEM . 'functions.php';
require(SYSTEM . 'init.php'); require SYSTEM . 'init.php';
require(SYSTEM . 'status.php');
require(SYSTEM . 'login.php'); if(config('env') === 'dev') {
require(ADMIN . 'includes/functions.php'); ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
}
// event system
require_once SYSTEM . 'hooks.php';
$hooks = new Hooks();
$hooks->load();
require SYSTEM . 'status.php';
require SYSTEM . 'login.php';
require SYSTEM . 'migrate.php';
require ADMIN . 'includes/functions.php';
$twig->addGlobal('config', $config);
$twig->addGlobal('status', $status);
// if we're not logged in - show login box // if we're not logged in - show login box
if(!$logged || !admin()) { if(!$logged || !admin()) {
@@ -31,7 +52,7 @@ if(!$logged || !admin()) {
} }
// include our page // include our page
$file = SYSTEM . 'pages/admin/' . $page . '.php'; $file = ADMIN . 'pages/' . $page . '.php';
if(!@file_exists($file)) { if(!@file_exists($file)) {
$page = '404'; $page = '404';
$file = SYSTEM . 'pages/404.php'; $file = SYSTEM . 'pages/404.php';
@@ -45,5 +66,5 @@ ob_end_clean();
// template // template
$template_path = 'template/'; $template_path = 'template/';
require(ADMIN . $template_path . 'template.php'); require ADMIN . $template_path . 'template.php';
?> ?>

484
admin/pages/accounts.php Normal file
View File

@@ -0,0 +1,484 @@
<?php
/**
* Account editor
*
* @package MyAAC
* @author Lee
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Account editor';
$base = BASE_URL . 'admin/?p=accounts';
if ($config['account_country'])
require SYSTEM . 'countries.conf.php';
function echo_success($message)
{
echo '<p class="success">' . $message . '</p>';
}
function echo_error($message)
{
global $error;
echo '<p class="error">' . $message . '</p>';
$error = true;
}
function verify_number($number, $name, $max_length)
{
if (!Validator::number($number))
echo_error($name . ' can contain only numbers.');
$number_length = strlen($number);
if ($number_length <= 0 || $number_length > $max_length)
echo_error($name . ' cannot be longer than ' . $max_length . ' digits.');
}
$hasSecretColumn = $db->hasColumn('accounts', 'secret');
$hasCoinsColumn = $db->hasColumn('accounts', 'coins');
$hasPointsColumn = $db->hasColumn('accounts', 'premium_points');
$hasTypeColumn = $db->hasColumn('accounts', 'type');
$hasGroupColumn = $db->hasColumn('accounts', 'group_id');
if ($config['account_country']) {
$countries = array();
foreach (array('pl', 'se', 'br', 'us', 'gb') as $c)
$countries[$c] = $config['countries'][$c];
$countries['--'] = '----------';
foreach ($config['countries'] as $code => $c)
$countries[$code] = $c;
}
?>
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>tools/css/jquery.datetimepicker.css"/ >
<script src="<?php echo BASE_URL; ?>tools/js/jquery.datetimepicker.js"></script>
<?php
$id = 0;
if (isset($_REQUEST['id']))
$id = (int)$_REQUEST['id'];
else if (isset($_REQUEST['search_name'])) {
if (strlen($_REQUEST['search_name']) < 3 && !Validator::number($_REQUEST['search_name'])) {
echo 'Player name is too short.';
} else {
if (Validator::number($_REQUEST['search_name']))
$id = $_REQUEST['search_name'];
else {
$query = $db->query('SELECT `id` FROM `accounts` WHERE `name` = ' . $db->quote($_REQUEST['search_name']));
if ($query->rowCount() == 1) {
$query = $query->fetch();
$id = $query['id'];
} else {
$query = $db->query('SELECT `id`, `name` FROM `accounts` WHERE `name` LIKE ' . $db->quote('%' . $_REQUEST['search_name'] . '%'));
if ($query->rowCount() > 0 && $query->rowCount() <= 10) {
echo 'Do you mean?<ul>';
foreach ($query as $row)
echo '<li><a href="' . $base . '&id=' . $row['id'] . '">' . $row['name'] . '</a></li>';
echo '</ul>';
} else if ($query->rowCount() > 10)
echo 'Specified name resulted with too many accounts.';
}
}
}
}
$groups = new OTS_Groups_List();
if ($id > 0) {
$account = new OTS_Account();
$account->load($id);
if (isset($account, $_POST['save']) && $account->isLoaded()) {// we want to save
$error = false;
$_error = '';
$account_db = new OTS_Account();
if(USE_ACCOUNT_NAME) {
$name = $_POST['name'];
$account_db->find($name);
if ($account_db->isLoaded() && $account->getName() != $name)
echo_error('This name is already used. Please choose another name!');
}
$account_db->load($id);
if (!$account_db->isLoaded())
echo_error('Account with this id doesn\'t exist.');
//type/group
if($hasTypeColumn || $hasGroupColumn) {
$group = $_POST['group'];
}
$password = ((!empty($_POST["pass"]) ? $_POST['pass'] : null));
if (!Validator::password($password)) {
$errors['password'] = Validator::getLastError();
}
//secret
if($hasSecretColumn) {
$secret = $_POST['secret'];
}
//key
$key = $_POST['key'];
$email = $_POST['email'];
if (!Validator::email($email))
$errors['email'] = Validator::getLastError();
//tibia coins
if ($hasCoinsColumn) {
$t_coins = $_POST['t_coins'];
verify_number($t_coins, 'Tibia coins', 12);
}
// prem days
$p_days = (int)$_POST['p_days'];
verify_number($p_days, 'Prem days', 11);
//prem points
$p_points = $_POST['p_points'];
verify_number($p_points, 'Prem Points', 11);
//rl name
$rl_name = $_POST['rl_name'];
//location
$rl_loca = $_POST['rl_loca'];
//country
$rl_country = $_POST['rl_country'];
$web_flags = $_POST['web_flags'];
verify_number($web_flags, 'Web Flags', 1);
//created
$created = $_POST['created'];
verify_number($created, 'Created', 11);
//web last login
$web_lastlogin = $_POST['web_lastlogin'];
verify_number($web_lastlogin, 'Web Last logout', 11);
if (!$error) {
if(USE_ACCOUNT_NAME) {
$account->setName($name);
}
if ($hasTypeColumn) {
$account->setCustomField('type', $group);
} elseif ($hasGroupColumn) {
$account->setCustomField('group_id', $group);
}
if($hasSecretColumn) {
$account->setCustomField('secret', $secret);
}
$account->setCustomField('key', $key);
$account->setEMail($email);
if ($hasCoinsColumn) {
$account->setCustomField('coins', $t_coins);
}
$lastDay = 0;
if($p_days != 0 && $p_days != OTS_Account::GRATIS_PREMIUM_DAYS) {
$lastDay = time();
} else if ($lastDay != 0) {
$lastDay = 0;
}
$account->setPremDays($p_days);
$account->setLastLogin($lastDay);
if ($hasPointsColumn) {
$account->setCustomField('premium_points', $p_points);
}
$account->setRLName($rl_name);
$account->setLocation($rl_loca);
$account->setCountry($rl_country);
$account->setCustomField('created', $created);
$account->setWebFlags($web_flags);
$account->setCustomField('web_lastlogin', $web_lastlogin);
if (isset($password)) {
$config_salt_enabled = $db->hasColumn('accounts', 'salt');
if ($config_salt_enabled) {
$salt = generateRandomString(10, false, true, true);
$password = $salt . $password;
$account_logged->setCustomField('salt', $salt);
}
$password = encrypt($password);
$account->setPassword($password);
if ($config_salt_enabled)
$account->setCustomField('salt', $salt);
}
$account->save();
echo_success('Account saved at: ' . date('G:i'));
}
}
}
$search_account = '';
if (isset($_REQUEST['search_name']))
$search_account = $_REQUEST['search_name'];
else if (isset($_REQUEST['search_account']))
$search_account = $_REQUEST['search_account'];
else if ($id > 0 && isset($account) && $account->isLoaded()) {
if(USE_ACCOUNT_NAME) {
$search_account = $account->getName();
}
else {
$search_account = $account->getId();
}
}
?>
<div class="row">
<?php if (isset($account) && $account->isLoaded()) { ?>
<form action="<?php echo $base . ((isset($id) && $id > 0) ? '&id=' . $id : ''); ?>" method="post"
class="form-horizontal">
<div class="col-md-8">
<div class="box box-primary">
<div class="box-body">
<div class="row">
<?php if(USE_ACCOUNT_NAME): ?>
<div class="col-xs-4">
<label for="name" class="control-label">Account Name:</label>
<input type="text" class="form-control" id="name" name="name"
autocomplete="off" style="cursor: auto;"
value="<?php echo $account->getName(); ?>"/>
</div>
<?php endif; ?>
<div class="col-xs-5">
<label for="c_pass" class="control-label">Password: (check to change)</label>
<div class="input-group">
<span class="input-group-addon">
<input type="checkbox"
name="c_pass"
id="c_pass"
value="false"
class="input_control"/>
</span>
<input type="text" class="form-control" id="pass" name="pass"
autocomplete="off" maxlength="20"
value=""/>
</div>
</div>
<div class="col-xs-3">
<label for="account_id" class="control-label">Account ID:</label>
<input type="text" class="form-control" id="account_id" name="account_id"
autocomplete="off" style="cursor: auto;" size="8" maxlength="11" disabled
value="<?php echo $account->getId(); ?>"/>
</div>
</div>
<div class="row">
<?php
$acc_group = $account->getAccGroupId();
if ($hasTypeColumn) {
$acc_type = array("Normal", "Tutor", "Senior Tutor", "Gamemaster", "God"); ?>
<div class="col-xs-6">
<label for="group" class="control-label">Account Type:</label>
<select name="group" id="group" class="form-control">
<?php foreach ($acc_type as $id => $a_type): ?>
<option value="<?php echo($id + 1); ?>" <?php echo($acc_group == ($id + 1) ? 'selected' : ''); ?>><?php echo $a_type; ?></option>
<?php endforeach; ?>
</select>
</div>
<?php
} elseif ($hasGroupColumn) {
?>
<div class="col-xs-6">
<label for="group" class="control-label">Account Type:</label>
<select name="group" id="group" class="form-control">
<?php
foreach ($groups->getGroups() as $id => $group): ?>
<option value="<?php echo $id; ?>" <?php echo($acc_group == $id ? 'selected' : ''); ?>><?php echo $group->getName(); ?></option>
<?php endforeach; ?>
</select>
</div>
<?php } ?>
<div class="col-xs-6">
<label for="web_flags" class="control-label">Website Access:</label>
<select name="web_flags" id="web_flags" class="form-control">
<?php $web_acc = array("None", "Admin", "Super Admin", "(Admin + Super Admin)");
foreach ($web_acc as $id => $a_type): ?>
<option value="<?php echo($id); ?>" <?php echo($account->getWebFlags() == ($id) ? 'selected' : ''); ?>><?php echo $a_type; ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="row">
<?php if($hasSecretColumn): ?>
<div class="col-xs-6">
<label for="secret" class="control-label">Secret:</label>
<input type="text" class="form-control" id="secret" name="secret"
autocomplete="off" style="cursor: auto;" size="8" maxlength="11"
value="<?php echo $account->getCustomField('secret'); ?>"/>
</div>
<?php endif; ?>
<div class="col-xs-6">
<label for="key" class="control-label">Key:</label>
<input type="text" class="form-control" id="key" name="key"
autocomplete="off" style="cursor: auto;" size="8" maxlength="11"
value="<?php echo $account->getCustomField('key'); ?>"/>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<label for="email" class="control-label">Email:</label>
<input type="text" class="form-control" id="email" name="email"
autocomplete="off" maxlength="20"
value="<?php echo $account->getEMail(); ?>"/>
</div>
<?php if ($hasCoinsColumn): ?>
<div class="col-xs-6">
<label for="t_coins" class="control-label">Tibia Coins:</label>
<input type="text" class="form-control" id="t_coins" name="t_coins"
autocomplete="off" maxlength="8"
value="<?php echo $account->getCustomField('coins') ?>"/>
</div>
<?php endif; ?>
<div class="col-xs-6">
<label for="p_days" class="control-label">Premium Days:</label>
<input type="text" class="form-control" id="p_days" name="p_days"
autocomplete="off" maxlength="11"
value="<?php echo $account->getPremDays(); ?>"/>
</div>
<?php if ($hasPointsColumn): ?>
<div class="col-xs-6">
<label for="p_points" class="control-label">Premium Points:</label>
<input type="text" class="form-control" id="p_points" name="p_points"
autocomplete="off" maxlength="8"
value="<?php echo $account->getCustomField('premium_points') ?>"/>
</div>
<?php endif; ?>
</div>
<div class="row">
<div class="col-xs-4">
<label for="rl_name" class="control-label">RL Name:</label>
<input type="text" class="form-control" id="rl_name" name="rl_name"
autocomplete="off" maxlength="20"
value="<?php echo $account->getRLName(); ?>"/>
</div>
<div class="col-xs-4">
<label for="rl_loca" class="control-label">Location:</label>
<input type="text" class="form-control" id="rl_loca" name="rl_loca"
autocomplete="off" maxlength="20"
value="<?php echo $account->getLocation(); ?>"/>
</div>
<div class="col-xs-4">
<label for="rl_country" class="control-label">Country:</label>
<select name="rl_country" id="rl_country" class="form-control">
<?php foreach ($countries as $id => $a_type): ?>
<option value="<?php echo($id); ?>" <?php echo($account->getCountry() == ($id) ? 'selected' : ''); ?>><?php echo $a_type; ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="row">
<div class="col-xs-4">
<label for="created" class="control-label">Created:</label>
<input type="text" class="form-control" id="created" name="created"
autocomplete="off" maxlength="20"
value="<?php echo $account->getCustomField('created'); ?>"/>
</div>
<div class="col-xs-4">
<label for="web_lastlogin" class="control-label">Web Last Login:</label>
<input type="text" class="form-control" id="web_lastlogin" name="web_lastlogin"
autocomplete="off" maxlength="20"
value="<?php echo $account->getCustomField('web_lastlogin'); ?>"/>
</div>
</div>
<input type="hidden" name="save" value="yes"/>
<div class="box-footer">
<a href="<?php echo ADMIN_URL; ?>?p=accounts"><span class="btn btn-danger">Cancel</span></a>
<div class="pull-right">
<input type="submit" class="btn btn-primary" value="Update">
</div>
</div>
</div>
</div>
</form>
</div>
<?php } ?>
<div class="col-md-4">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Search Account:</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
</div>
</div>
<div class="box-body">
<form action="<?php echo $base; ?>" method="post">
<div class="input-group input-group-sm">
<input type="text" class="form-control" name="search_name" value="<?php echo $search_account; ?>"
maxlength="32" size="32">
<span class="input-group-btn">
<button type="submit" type="button" class="btn btn-info btn-flat">Search</button>
</span>
</div>
</form>
</div>
</div>
<?php
if (isset($account) && $account->isLoaded()) {
$account_players = array();
$query = $db->query('SELECT `name`,`level`,`vocation` FROM `players` WHERE `account_id` = ' . $account->getId() . ' ORDER BY `name`')->fetchAll();
if (isset($query)) {
?>
<div class="box">
<div class="box-header">
<h3 class="box-title">Character List:</h3>
</div>
<div class="box-body no-padding">
<table class="table table-striped">
<tbody>
<tr>
<th style="width: 10px">#</th>
<th>Name</th>
<th>Level</th>
<th style="width: 40px">Edit</th>
</tr>
<?php
$i = 1;
foreach ($query as $p) {
$account_players[] = $p;
echo '<tr>
<td>' . $i . '.</td>
<td>' . $p['name'] . '</td>
<td>' . $p['level'] . '</td>
<td><a href="?p=players&search_name=' . $p['name'] . '"><span class="btn btn-success btn-sm edit btn-flat"><i class="fa fa-edit"></i></span></a></span></td>
</tr>';
$i++;
} ?>
</tbody>
</table>
</div>
</div>
<?php
};
};
?>
</div>
<script type="text/javascript">
$('#lastlogout').datetimepicker({format: 'unixtime'});
$('#created').datetimepicker({format: 'unixtime'});
$('#web_lastlogin').datetimepicker({format: 'unixtime'});
$(document).ready(function () {
$('.input_control').change(function () {
$('input[name=pass]')[0].disabled = !this.checked;
$('input[name=pass]')[0].value = '';
}).change();
});
</script>

26
admin/pages/changelog.php Normal file
View File

@@ -0,0 +1,26 @@
<?php
/**
* CHANGELOG viewer
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'MyAAC Changelog';
if (!file_exists(BASE . 'CHANGELOG.md')) {
echo 'File CHANGELOG.md doesn\'t exist.';
return;
}
require LIBS . 'Parsedown.php';
$changelog = file_get_contents(BASE . 'CHANGELOG.md');
$Parsedown = new Parsedown();
$changelog = $Parsedown->text($changelog); # prints: <p>Hello <em>Parsedown</em>!</p>
echo '<div>' . $changelog . '</div>';

91
admin/pages/dashboard.php Normal file
View File

@@ -0,0 +1,91 @@
<?php
/**
* Dashboard
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Dashboard';
if (isset($_GET['clear_cache'])) {
if (clearCache()) {
success('Cache cleared.');
} else {
error('Error while clearing cache.');
}
}
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;
$query = $db->query('SELECT count(*) as `how_much` FROM `accounts`;');
$query = $query->fetch();
$total_accounts = $query['how_much'];
$query = $db->query('SELECT count(*) as `how_much` FROM `players`;');
$query = $query->fetch();
$total_players = $query['how_much'];
$query = $db->query('SELECT count(*) as `how_much` FROM `guilds`;');
$query = $query->fetch();
$total_guilds = $query['how_much'];
$query = $db->query('SELECT count(*) as `how_much` FROM `houses`;');
$query = $query->fetch();
$total_houses = $query['how_much'];
$twig->display('admin.statistics.html.twig', array(
'total_accounts' => $total_accounts,
'total_players' => $total_players,
'total_guilds' => $total_guilds,
'total_houses' => $total_houses
));
$twig->display('admin.dashboard.html.twig', array(
'is_closed' => $is_closed,
'closed_message' => $closed_message,
'status' => $status,
'account_type' => USE_ACCOUNT_NAME ? 'name' : 'number'
));
echo '<div class="row">';
$configAdminPanelModules = config('admin_panel_modules');
if(isset($configAdminPanelModules))
$configAdminPanelModules = explode(',', $configAdminPanelModules);
$twig_loader->prependPath(__DIR__ . '/modules/templates');
foreach($configAdminPanelModules as $box) {
$file = __DIR__ . '/modules/' . $box . '.php';
if(file_exists($file)) {
include($file);
}
}
echo '</div>';

35
admin/pages/items.php Normal file
View File

@@ -0,0 +1,35 @@
<?php
/**
* Load items.xml
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Load items.xml';
require LIBS . 'items.php';
require LIBS . 'weapons.php';
$twig->display('admin.items.html.twig');
$reload = isset($_REQUEST['reload']) && (int)$_REQUEST['reload'] === 1;
if ($reload) {
$items_start_time = microtime(true);
if (Items::loadFromXML(true)) {
success('Successfully loaded items (in ' . round(microtime(true) - $items_start_time, 4) . ' seconds).');
}
else {
error(Items::getError());
}
$weapons_start_time = microtime(true);
if (Weapons::loadFromXML(true)) {
success('Successfully loaded weapons (in ' . round(microtime(true) - $weapons_start_time, 4) . ' seconds).');
}
else {
error(Weapons::getError());
}
}

26
admin/pages/login.php Normal file
View File

@@ -0,0 +1,26 @@
<?php
/**
* Login
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Login';
$logout = '';
if ($action == 'logout') {
$logout = "You have been logged out!";
}
if (isset($errors)) {
foreach ($errors as $error) {
error($error);
}
}
$twig->display('admin.login.html.twig', array(
'logout' => $logout,
'account' => USE_ACCOUNT_NAME ? 'Name' : 'Number',
));

81
admin/pages/logs.php Normal file
View File

@@ -0,0 +1,81 @@
<?php
/**
* Logs
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Logs Viewer';
$files = array();
$aac_path_logs = BASE . 'system/logs/';
foreach (scandir($aac_path_logs, SCANDIR_SORT_ASCENDING) as $f) {
if ($f[0] === '.' || is_dir($aac_path_logs . $f)) {
continue;
}
$files[] = array($f, $aac_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)) {
foreach (scandir($server_path_logs, SCANDIR_SORT_ASCENDING) as $f) {
if ($f[0] === '.') {
continue;
}
if (is_dir($server_path_logs . $f)) {
foreach (scandir($server_path_logs . $f, SCANDIR_SORT_ASCENDING) as $f2) {
if ($f2[0] === '.') {
continue;
}
$files[] = array($f . '/' . $f2, $server_path_logs);
}
continue;
}
$files[] = array($f, $server_path_logs);
}
}
foreach ($files as &$f) {
$f['mtime'] = filemtime($f[1] . $f[0]);
$f['name'] = $f[0];
}
unset($f);
$twig->display('admin.logs.html.twig', array('files' => $files));
define('EXIST_NONE', 0);
define('EXIST_SERVER_LOG', 1);
define('EXIST_AAC_LOG', 2);
$exist = EXIST_NONE;
$file = isset($_GET['file']) ? $_GET['file'] : null;
if (!empty($file)) {
if (!preg_match('/[^A-z0-9\' _\/\-\.]/', $file)) {
if (file_exists($aac_path_logs . $file)) {
$exist = EXIST_AAC_LOG;
} else if (file_exists($server_path_logs . $file)) {
$exist = EXIST_SERVER_LOG;
} else {
echo 'Specified file does not exist.';
}
if ($exist !== EXIST_NONE) {
$content = nl2br(file_get_contents(($exist === EXIST_SERVER_LOG ? $server_path_logs : $aac_path_logs) . $file));
$twig->display('admin.logs.view.html.twig', array('file' => $file, 'content' => $content));
}
} else {
echo 'Invalid file name specified.';
}
}

69
admin/pages/mailer.php Normal file
View File

@@ -0,0 +1,69 @@
<?php
/**
* Mailer
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Mailer';
if (!hasFlag(FLAG_CONTENT_MAILER) && !superAdmin()) {
echo 'Access denied.';
return;
}
if (!$config['mail_enabled']) {
echo 'Mail support disabled.';
return;
}
$mail_content = isset($_POST['mail_content']) ? stripslashes($_POST['mail_content']) : NULL;
$mail_subject = isset($_POST['mail_subject']) ? stripslashes($_POST['mail_subject']) : NULL;
$preview = isset($_REQUEST['preview']);
$preview_done = false;
if ($preview) {
if (!empty($mail_content) && !empty($mail_subject)) {
$preview_done = _mail($account_logged->getCustomField('email'), $mail_subject, $mail_content);
if (!$preview_done)
error('Error while sending preview mail. More info can be found in system/logs/mailer-error.log');
}
}
$twig->display('admin.mailer.html.twig', array(
'mail_subject' => $mail_subject,
'mail_content' => $mail_content,
'preview_done' => $preview_done
));
if (empty($mail_content) || empty($mail_subject) || $preview)
return;
$success = 0;
$failed = 0;
$add = '';
if ($config['account_mail_verify']) {
note('Note: Sending only to users with verified E-Mail.');
$add = ' AND ' . $db->fieldName('email_verified') . ' = 1';
}
$query = $db->query('SELECT ' . $db->fieldName('email') . ' FROM ' . $db->tableName('accounts') . ' WHERE ' . $db->fieldName('email') . ' != ""' . $add);
foreach ($query as $email) {
if (_mail($email['email'], $mail_subject, $mail_content))
$success++;
else {
$failed++;
echo '<br />';
error('An error occorred while sending email to <b>' . $email['email'] . '</b>. For Admin: More info can be found in system/logs/mailer-error.log');
}
}
success('Mailing finished.');
success("$success emails delivered.");
warning("$failed emails failed.");

137
admin/pages/menus.php Normal file
View File

@@ -0,0 +1,137 @@
<?php
/**
* Menus
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Menus';
if (!hasFlag(FLAG_CONTENT_MENUS) && !superAdmin()) {
echo 'Access denied.';
return;
}
if (isset($_REQUEST['template'])) {
$template = $_REQUEST['template'];
if (isset($_REQUEST['menu'])) {
$post_menu = $_REQUEST['menu'];
$post_menu_link = $_REQUEST['menu_link'];
$post_menu_blank = $_REQUEST['menu_blank'];
$post_menu_color = $_REQUEST['menu_color'];
if (count($post_menu) != count($post_menu_link)) {
echo 'Menu count is not equal menu links. Something went wrong when sending form.';
return;
}
$db->query('DELETE FROM `' . TABLE_PREFIX . 'menu` WHERE `template` = ' . $db->quote($template));
foreach ($post_menu as $category => $menus) {
foreach ($menus as $i => $menu) {
if (empty($menu)) // don't save empty menu item
continue;
try {
$db->insert(TABLE_PREFIX . 'menu', array('template' => $template, 'name' => $menu, 'link' => $post_menu_link[$category][$i], 'blank' => $post_menu_blank[$category][$i] == 'on' ? 1 : 0, 'color' => str_replace('#', '', $post_menu_color[$category][$i]), 'category' => $category, 'ordering' => $i));
} catch (PDOException $error) {
warning('Error while adding menu item (' . $menu . '): ' . $error->getMessage());
}
}
}
$cache = Cache::getInstance();
if ($cache->enabled()) {
$cache->delete('template_menus');
}
success('Saved at ' . date('H:i'));
}
$file = TEMPLATES . $template . '/config.php';
if (file_exists($file)) {
require_once $file;
} else {
echo 'Cannot find template config.php file.';
return;
}
if (!isset($config['menu_categories'])) {
echo "No menu categories set in template config.php.<br/>This template doesn't support dynamic menus.";
return;
}
echo 'Hint: You can drag menu items.<br/>
Hint: Add links to external sites using: <b>http://</b> or <b>https://</b> prefix.<br/>
Not all templates support blank and colorful links.<br/><br/>
<div class="row">';
$menus = array();
$menus_db = $db->query('SELECT `name`, `link`, `blank`, `color`, `category`, `ordering` FROM `' . TABLE_PREFIX . 'menu` WHERE `enabled` = 1 AND `template` = ' . $db->quote($template) . ' ORDER BY `ordering` ASC;')->fetchAll();
foreach ($menus_db as $menu) {
$menus[$menu['category']][] = array('name' => $menu['name'], 'link' => $menu['link'], 'blank' => $menu['blank'], 'color' => $menu['color'], 'ordering' => $menu['ordering']);
}
$last_id = array();
echo '<form method="post" id="menus-form" action="?p=menus">';
echo '<input type="hidden" name="template" value="' . $template . '"/>';
foreach ($config['menu_categories'] as $id => $cat) {
echo ' <div class="col-md-12 col-lg-6">
<div class="box box-danger">
<div class="box-header with-border">
<h3 class="box-title">' . $cat['name'] . ' <img class="add-button" id="add-button-' . $id . '" src="' . BASE_URL . 'images/plus.png" width="16" height="16"/></h3>
</div>
<div class="box-body">';
echo '<ul class="sortable" id="sortable-' . $id . '">';
if (isset($menus[$id])) {
$i = 0;
foreach ($menus[$id] as $menu) {
echo '<li class="ui-state-default" id="list-' . $id . '-' . $i . '"><label>Name:</label><input type="text" name="menu[' . $id . '][]" value="' . $menu['name'] . '"/>
<label>Link:</label><input type="text" name="menu_link[' . $id . '][]" value="' . $menu['link'] . '"/>
<input type="hidden" name="menu_blank[' . $id . '][]" value="0" />
<label><input class="blank-checkbox" type="checkbox" ' . ($menu['blank'] == 1 ? 'checked' : '') . '/><span title="Open in New Window">Open in New Window</span></label>
<input class="color-picker" type="text" name="menu_color[' . $id . '][]" value="#' . $menu['color'] . '" />
<a class="remove-button" id="remove-button-' . $id . '-' . $i . '"><img src="' . BASE_URL . 'images/del.png"/></a></li>';
$i++;
$last_id[$id] = $i;
}
}
echo '</ul>';
echo ' </div>
</div>
</div>
';
}
echo ' </div><div class="row"><div class="col-md-6">';
echo '<input type="submit" class="btn btn-info" value="Save">';
echo '<input type="button" class="btn btn-default pull-right" value="Cancel" onclick="window.location = \'' . ADMIN_URL . '?p=menus&template=' . $template . '\';">';
echo '</div></div>';
echo '</form>';
$twig->display('admin.menus.js.html.twig', array(
'menus' => $menus,
'last_id' => $last_id
));
?>
<?php
} else {
$templates = $db->query('SELECT `template` FROM `' . TABLE_PREFIX . 'menu` GROUP BY `template`;')->fetchAll();
foreach ($templates as $key => $value) {
$file = TEMPLATES . $value['template'] . '/config.php';
if (!file_exists($file)) {
unset($templates[$key]);
}
}
$twig->display('admin.menus.form.html.twig', array(
'templates' => $templates
));
}

View File

@@ -0,0 +1,11 @@
<?php
if ($db->hasColumn('accounts', 'coins')) {
$coins = $db->query('SELECT `coins`, `' . (USE_ACCOUNT_NAME ? 'name' : 'id') . '` as `name` FROM `accounts` ORDER BY `coins` DESC LIMIT 10;');
} else {
$coins = 0;
}
$twig->display('coins.html.twig', array(
'coins' => $coins
));

View File

@@ -0,0 +1,11 @@
<?php
if ($db->hasColumn('players', 'lastlogin')) {
$players = $db->query('SELECT name, level, lastlogin FROM players ORDER BY lastlogin DESC LIMIT 10;');
} else {
$players = 0;
}
$twig->display('lastlogin.html.twig', array(
'players' => $players,
));

View File

@@ -0,0 +1,10 @@
<?php
if ($db->hasColumn('accounts', 'premium_points')) {
$points = $db->query('SELECT `premium_points`, `' . (USE_ACCOUNT_NAME ? 'name' : 'id') . '` as `name` FROM `accounts` ORDER BY `premium_points` DESC LIMIT 10;');
} else {
$points = 0;
}
$twig->display('points.html.twig', array(
'points' => $points,
));

View File

@@ -0,0 +1,29 @@
{% if coins is iterable %}
<div class="col-md-3">
<div class="box">
<div class="box-header">
<h3 class="box-title">Top 10 - Most coins</h3>
</div>
<div class="box-body no-padding">
<table class="table table-condensed">
<tbody>
<tr>
<th>#</th>
<th>Account {{ account_type }}</th>
<th>Tibia coins</th>
</tr>
{% set i = 0 %}
{% for result in coins %}
{% set i = i + 1 %}
<tr>
<td>{{ i }}</td>
<td>{{ result.name }}</td>
<td>{{ result.coins }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endif %}

View File

@@ -0,0 +1,29 @@
{% if players is iterable %}
<div class="col-md-3">
<div class="box">
<div class="box-header">
<h3 class="box-title">Last 10 Logins</h3>
</div>
<div class="box-body no-padding">
<table class="table table-condensed">
<tbody>
<tr>
<th>#</th>
<th>Player</th>
<th>Login Date</th>
</tr>
{% set i = 0 %}
{% for result in players %}
{% set i = i + 1 %}
<tr>
<td>{{ i }}</td>
<td>{{ result.name }}</td>
<td>{{ result.lastlogin|date("M d Y, H:i:s") }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endif %}

View File

@@ -0,0 +1,29 @@
{% if points is iterable %}
<div class="col-md-3">
<div class="box">
<div class="box-header">
<h3 class="box-title">Top 10 - Most premium points</h3>
</div>
<div class="box-body no-padding">
<table class="table table-condensed">
<tbody>
<tr>
<th>#</th>
<th>Account {{ account_type }}</th>
<th>Premium points</th>
</tr>
{% set i = 0 %}
{% for result in points %}
{% set i = i + 1 %}
<tr>
<td>{{ i }}</td>
<td>{{ result.name }}</td>
<td>{{ result.premium_points }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endif %}

154
admin/pages/news.php Normal file
View File

@@ -0,0 +1,154 @@
<?php
/**
* Pages
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
require_once LIBS . 'forum.php';
require_once LIBS . 'news.php';
$title = 'News Panel';
if (!hasFlag(FLAG_CONTENT_PAGES) && !superAdmin()) {
echo 'Access denied.';
return;
}
header('X-XSS-Protection:0');
// some constants, used mainly by database (cannot by modified without schema changes)
define('TITLE_LIMIT', 100);
define('BODY_LIMIT', 65535); // maximum news body length
define('ARTICLE_TEXT_LIMIT', 300);
define('ARTICLE_IMAGE_LIMIT', 100);
$name = $p_title = '';
if(!empty($action))
{
$id = isset($_REQUEST['id']) ? $_REQUEST['id'] : null;
$p_title = isset($_REQUEST['title']) ? $_REQUEST['title'] : null;
$body = isset($_REQUEST['body']) ? stripslashes($_REQUEST['body']) : null;
$comments = isset($_REQUEST['comments']) ? $_REQUEST['comments'] : null;
$type = isset($_REQUEST['type']) ? (int)$_REQUEST['type'] : null;
$category = isset($_REQUEST['category']) ? (int)$_REQUEST['category'] : null;
$player_id = isset($_REQUEST['player_id']) ? (int)$_REQUEST['player_id'] : null;
$article_text = isset($_REQUEST['article_text']) ? $_REQUEST['article_text'] : null;
$article_image = isset($_REQUEST['article_image']) ? $_REQUEST['article_image'] : null;
$forum_section = isset($_REQUEST['forum_section']) ? $_REQUEST['forum_section'] : null;
$errors = array();
if($action == 'add') {
if(isset($forum_section) && $forum_section != '-1') {
$forum_add = Forum::add_thread($p_title, $body, $forum_section, $player_id, $account_logged->getId(), $errors);
}
if(News::add($p_title, $body, $type, $category, $player_id, isset($forum_add) && $forum_add != 0 ? $forum_add : 0, $article_text, $article_image, $errors)) {
$p_title = $body = $comments = $article_text = $article_image = '';
$type = $category = $player_id = 0;
success("Added successful.");
}
}
else if($action == 'delete') {
News::delete($id, $errors);
success("Deleted successful.");
}
else if($action == 'edit')
{
if(isset($id) && !isset($p_title)) {
$news = News::get($id);
$p_title = $news['title'];
$body = $news['body'];
$comments = $news['comments'];
$type = $news['type'];
$category = $news['category'];
$player_id = $news['player_id'];
$article_text = $news['article_text'];
$article_image = $news['article_image'];
}
else {
if(News::update($id, $p_title, $body, $type, $category, $player_id, $forum_section, $article_text, $article_image, $errors)) {
// update forum thread if exists
if(isset($forum_section) && Validator::number($forum_section)) {
$db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `author_guid` = ".(int) $player_id.", `post_text` = ".$db->quote($body).", `post_topic` = ".$db->quote($p_title).", `edit_date` = " . time() . " WHERE `id` = " . $db->quote($forum_section));
}
$action = $p_title = $body = $comments = $article_text = $article_image = '';
$type = $category = $player_id = 0;
success("Updated successful.");
}
}
}
else if($action == 'hide') {
News::toggleHidden($id, $errors, $status);
success(($status == 1 ? 'Show' : 'Hide') . " successful.");
}
if(!empty($errors))
error(implode(", ", $errors));
}
$categories = array();
foreach($db->query('SELECT `id`, `name`, `icon_id` FROM `' . TABLE_PREFIX . 'news_categories` WHERE `hidden` != 1') as $cat)
{
$categories[$cat['id']] = array(
'name' => $cat['name'],
'icon_id' => $cat['icon_id']
);
}
if($action == 'edit' || $action == 'new') {
if($action == 'edit') {
$player = new OTS_Player();
$player->load($player_id);
}
$account_players = $account_logged->getPlayersList();
$account_players->orderBy('group_id', POT::ORDER_DESC);
$twig->display('admin.news.form.html.twig', array(
'action' => $action,
'news_link' => getLink(PAGE),
'news_link_form' => '?p=news&action=' . ($action == 'edit' ? 'edit' : 'add'),
'news_id' => isset($id) ? $id : null,
'title' => isset($p_title) ? $p_title : '',
'body' => isset($body) ? htmlentities($body, ENT_COMPAT, 'UTF-8') : '',
'type' => isset($type) ? $type : null,
'player' => isset($player) && $player->isLoaded() ? $player : null,
'player_id' => isset($player_id) ? $player_id : null,
'account_players' => $account_players,
'category' => isset($category) ? $category : 0,
'categories' => $categories,
'forum_boards' => getForumBoards(),
'forum_section' => isset($forum_section) ? $forum_section : null,
'comments' => isset($comments) ? $comments : null,
'article_text' => isset($article_text) ? $article_text : null,
'article_image' => isset($article_image) ? $article_image : null
));
}
$query = $db->query('SELECT * FROM ' . $db->tableName(TABLE_PREFIX . 'news'));
$newses = array();
foreach ($query as $_news) {
$_player = new OTS_Player();
$_player->load($_news['player_id']);
$newses[$_news['type']][] = array(
'id' => $_news['id'],
'hidden' => $_news['hidden'],
'archive_link' => getLink('news') . '/archive/' . $_news['id'],
'title' => $_news['title'],
'date' => $_news['date'],
'player_name' => isset($_player) && $_player->isLoaded() ? $_player->getName() : '',
'player_link' => isset($_player) && $_player->isLoaded() ? getPlayerLink($_player->getName(), false) : '',
);
}
$twig->display('admin.news.html.twig', array(
'newses' => $newses
));

View File

@@ -4,31 +4,27 @@
* *
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2019 MyAAC
* @version 0.3.0 * @link https://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 = 'Notepad'; $title = 'Notepad';
$notepad_content = Notepad::get($account_logged->getId()); $notepad_content = Notepad::get($account_logged->getId());
if(isset($_POST['content'])) if (isset($_POST['content'])) {
{
$_content = html_entity_decode(stripslashes($_POST['content'])); $_content = html_entity_decode(stripslashes($_POST['content']));
if (!$notepad_content) if (!$notepad_content)
Notepad::create($account_logged->getId(), $_content); Notepad::create($account_logged->getId(), $_content);
else else
Notepad::update($account_logged->getId(), $_content); Notepad::update($account_logged->getId(), $_content);
echo '<div class="success" style="text-align: center;">Saved at ' . date('g:i A') . '</div>'; echo '<div class="success" style="text-align: center;">Saved at ' . date('H:i') . '</div>';
} } else {
else
{
if ($notepad_content !== false) if ($notepad_content !== false)
$_content = $notepad_content; $_content = $notepad_content;
} }
echo $twig->render('admin.notepad.html', array('content' => isset($_content) ? $_content : null)); $twig->display('admin.notepad.html.twig', array('content' => isset($_content) ? $_content : null));
class Notepad class Notepad
{ {

200
admin/pages/pages.php Normal file
View File

@@ -0,0 +1,200 @@
<?php
/**
* Pages
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Pages';
if (!hasFlag(FLAG_CONTENT_PAGES) && !superAdmin()) {
echo 'Access denied.';
return;
}
header('X-XSS-Protection:0');
$name = $p_title = '';
$groups = new OTS_Groups_List();
$php = false;
$enable_tinymce = true;
$access = 0;
if (!empty($action)) {
if ($action == 'delete' || $action == 'edit' || $action == 'hide')
$id = $_REQUEST['id'];
if (isset($_REQUEST['name']))
$name = $_REQUEST['name'];
if (isset($_REQUEST['title']))
$p_title = $_REQUEST['title'];
$php = isset($_REQUEST['php']) && $_REQUEST['php'] == 1;
$enable_tinymce = isset($_REQUEST['enable_tinymce']) && $_REQUEST['enable_tinymce'] == 1;
if ($php)
$body = $_REQUEST['body'];
else if (isset($_REQUEST['body'])) {
//$body = $_REQUEST['body'];
$body = html_entity_decode(stripslashes($_REQUEST['body']));
}
if (isset($_REQUEST['access']))
$access = $_REQUEST['access'];
$errors = array();
$player_id = 1;
if ($action == 'add') {
if (Pages::add($name, $p_title, $body, $player_id, $php, $enable_tinymce, $access, $errors)) {
$name = $p_title = $body = '';
$player_id = $access = 0;
$php = false;
$enable_tinymce = true;
}
} else if ($action == 'delete') {
if (Pages::delete($id, $errors))
success('Page with id ' . $id . ' has been deleted');
} else if ($action == 'edit') {
if (isset($id) && !isset($_REQUEST['name'])) {
$_page = Pages::get($id);
$name = $_page['name'];
$p_title = $_page['title'];
$body = $_page['body'];
$php = $_page['php'] == '1';
$enable_tinymce = $_page['enable_tinymce'] == '1';
$access = $_page['access'];
} else {
Pages::update($id, $name, $p_title, $body, $player_id, $php, $enable_tinymce, $access);
$action = $name = $p_title = $body = '';
$player_id = 1;
$access = 0;
$php = false;
$enable_tinymce = true;
}
} else if ($action == 'hide') {
Pages::toggleHidden($id, $errors);
}
if (!empty($errors))
error(implode(", ", $errors));
}
$query =
$db->query('SELECT * FROM ' . $db->tableName(TABLE_PREFIX . 'pages'));
$pages = array();
foreach ($query as $_page) {
$pages[] = array(
'link' => getFullLink($_page['name'], $_page['name'], true),
'title' => substr($_page['title'], 0, 20),
'php' => $_page['php'] == '1',
'id' => $_page['id'],
'hidden' => $_page['hidden']
);
}
$twig->display('admin.pages.form.html.twig', array(
'action' => $action,
'id' => $action == 'edit' ? $id : null,
'name' => $name,
'title' => $p_title,
'php' => $php,
'enable_tinymce' => $enable_tinymce,
'body' => isset($body) ? htmlentities($body, ENT_COMPAT, 'UTF-8') : '',
'groups' => $groups->getGroups(),
'access' => $access
));
$twig->display('admin.pages.html.twig', array(
'pages' => $pages
));
class Pages
{
static public function get($id)
{
global $db;
$query = $db->select(TABLE_PREFIX . 'pages', array('id' => $id));
if ($query !== false)
return $query;
return false;
}
static public function add($name, $title, $body, $player_id, $php, $enable_tinymce, $access, &$errors)
{
global $db;
if (isset($name[0]) && isset($title[0]) && isset($body[0]) && $player_id != 0) {
$query = $db->select(TABLE_PREFIX . 'pages', array('name' => $name));
if ($query === false)
$db->insert(TABLE_PREFIX . 'pages',
array(
'name' => $name,
'title' => $title,
'body' => $body,
'player_id' => $player_id,
'php' => $php ? '1' : '0',
'enable_tinymce' => $enable_tinymce ? '1' : '0',
'access' => $access
)
);
else
$errors[] = 'Page with this link already exists.';
} else
$errors[] = 'Please fill all inputs.';
return !count($errors);
}
static public function update($id, $name, $title, $body, $player_id, $php, $enable_tinymce, $access)
{
global $db;
$db->update(TABLE_PREFIX . 'pages',
array(
'name' => $name,
'title' => $title,
'body' => $body,
'player_id' => $player_id,
'php' => $php ? '1' : '0',
'enable_tinymce' => $enable_tinymce ? '1' : '0',
'access' => $access
),
array('id' => $id));
}
static public function delete($id, &$errors)
{
global $db;
if (isset($id)) {
if ($db->select(TABLE_PREFIX . 'pages', array('id' => $id)) !== false)
$db->delete(TABLE_PREFIX . 'pages', array('id' => $id));
else
$errors[] = 'Page with id ' . $id . ' does not exists.';
} else
$errors[] = 'id not set';
return !count($errors);
}
static public function toggleHidden($id, &$errors)
{
global $db;
if (isset($id)) {
$query = $db->select(TABLE_PREFIX . 'pages', array('id' => $id));
if ($query !== false)
$db->update(TABLE_PREFIX . 'pages', array('hidden' => ($query['hidden'] == 1 ? 0 : 1)), array('id' => $id));
else
$errors[] = 'Page with id ' . $id . ' does not exists.';
} else
$errors[] = 'id not set';
return !count($errors);
}
}
?>

19
admin/pages/phpinfo.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
/**
* PHP Info
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'PHP Info';
if (!function_exists('phpinfo')) { ?>
<b>phpinfo()</b> function is disabled in your webserver config.<br/>
You can enable it by editing <b>php.ini</b> file.
<?php return;
}
?>
<iframe src="<?php echo BASE_URL; ?>admin/tools/phpinfo.php" width="1024" height="550"/>

897
admin/pages/players.php Normal file
View File

@@ -0,0 +1,897 @@
<?php
/**
* Players editor
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Player editor';
$base = BASE_URL . 'admin/?p=players';
function echo_success($message)
{
echo '<p class="success">' . $message . '</p>';
}
function echo_error($message)
{
global $error;
echo '<p class="error">' . $message . '</p>';
$error = true;
}
function verify_number($number, $name, $max_length)
{
if (!Validator::number($number))
echo_error($name . ' can contain only numbers.');
$number_length = strlen($number);
if ($number_length <= 0 || $number_length > $max_length)
echo_error($name . ' cannot be longer than ' . $max_length . ' digits.');
}
$skills = array(
POT::SKILL_FIST => array('Fist fighting', 'fist'),
POT::SKILL_CLUB => array('Club fighting', 'club'),
POT::SKILL_SWORD => array('Sword fighting', 'sword'),
POT::SKILL_AXE => array('Axe fighting', 'axe'),
POT::SKILL_DIST => array('Distance fighting', 'dist'),
POT::SKILL_SHIELD => array('Shielding', 'shield'),
POT::SKILL_FISH => array('Fishing', 'fish')
);
$hasBlessingsColumn = $db->hasColumn('players', 'blessings');
$hasBlessingColumn = $db->hasColumn('players', 'blessings1');
$hasLookAddons = $db->hasColumn('players', 'lookaddons');
?>
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>tools/css/jquery.datetimepicker.css"/ >
<script src="<?php echo BASE_URL; ?>tools/js/jquery.datetimepicker.js"></script>
<?php
$id = 0;
if (isset($_REQUEST['id']))
$id = (int)$_REQUEST['id'];
else if (isset($_REQUEST['search_name'])) {
if (strlen($_REQUEST['search_name']) < 3 && !Validator::number($_REQUEST['search_name'])) {
echo 'Player name is too short.';
} else {
if (Validator::number($_REQUEST['search_name']))
$id = $_REQUEST['search_name'];
else {
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote($_REQUEST['search_name']));
if ($query->rowCount() == 1) {
$query = $query->fetch();
$id = $query['id'];
} else {
$query = $db->query('SELECT `id`, `name` FROM `players` WHERE `name` LIKE ' . $db->quote('%' . $_REQUEST['search_name'] . '%'));
if ($query->rowCount() > 0 && $query->rowCount() <= 10) {
echo 'Do you mean?<ul>';
foreach ($query as $row)
echo '<li><a href="' . $base . '&id=' . $row['id'] . '">' . $row['name'] . '</a></li>';
echo '</ul>';
} else if ($query->rowCount() > 10)
echo 'Specified name resulted with too many players.';
}
}
}
}
$groups = new OTS_Groups_List();
if ($id > 0) {
$player = new OTS_Player();
$player->load($id);
if (isset($player) && $player->isLoaded() && isset($_POST['save'])) {// we want to save
$error = false;
if ($player->isOnline())
echo_error('This player is actually online. You can\'t edit online players.');
$name = $_POST['name'];
$_error = '';
if (!Validator::characterName($name))
echo_error(Validator::getLastError());
//if(!Validator::newCharacterName($name)
// echo_error(Validator::getLastError());
$player_db = new OTS_Player();
$player_db->find($name);
if ($player_db->isLoaded() && $player->getName() != $name)
echo_error('This name is already used. Please choose another name!');
$account_id = $_POST['account_id'];
verify_number($account_id, 'Account id', 11);
$account_db = new OTS_Account();
$account_db->load($account_id);
if (!$account_db->isLoaded())
echo_error('Account with this id doesn\'t exist.');
$group = $_POST['group'];
if ($groups->getGroup($group) == false)
echo_error('Group with this id doesn\'t exist');
$level = $_POST['level'];
verify_number($level, 'Level', 11);
$experience = $_POST['experience'];
verify_number($experience, 'Experience', 20);
$vocation = $_POST['vocation'];
verify_number($vocation, 'Vocation id', 11);
if (!isset($config['vocations'][$vocation])) {
echo_error("Vocation with this id doesn't exist.");
}
// health
$health = $_POST['health'];
verify_number($health, 'Health', 11);
$health_max = $_POST['health_max'];
verify_number($health_max, 'Health max', 11);
// mana
$magic_level = $_POST['magic_level'];
verify_number($magic_level, 'Magic_level', 11);
$mana = $_POST['mana'];
verify_number($mana, 'Mana', 11);
$mana_max = $_POST['mana_max'];
verify_number($mana_max, 'Mana max', 11);
$mana_spent = $_POST['mana_spent'];
verify_number($mana_spent, 'Mana spent', 11);
// look
$look_body = $_POST['look_body'];
verify_number($look_body, 'Look body', 11);
$look_feet = $_POST['look_feet'];
verify_number($look_feet, 'Look feet', 11);
$look_head = $_POST['look_head'];
verify_number($look_head, 'Look head', 11);
$look_legs = $_POST['look_legs'];
verify_number($look_legs, 'Look legs', 11);
$look_type = $_POST['look_type'];
verify_number($look_type, 'Look type', 11);
if ($hasLookAddons) {
$look_addons = $_POST['look_addons'];
verify_number($look_addons, 'Look addons', 11);
}
// pos
$pos_x = $_POST['pos_x'];
verify_number($pos_x, 'Position x', 11);
$pos_y = $_POST['pos_y'];
verify_number($pos_y, 'Position y', 11);
$pos_z = $_POST['pos_z'];
verify_number($pos_z, 'Position z', 11);
$soul = $_POST['soul'];
verify_number($soul, 'Soul', 10);
$town = $_POST['town'];
verify_number($town, 'Town', 11);
$capacity = $_POST['capacity'];
verify_number($capacity, 'Capacity', 11);
$sex = $_POST['sex'];
verify_number($sex, 'Sex', 1);
$lastlogin = $_POST['lastlogin'];
verify_number($lastlogin, 'Last login', 20);
$lastlogout = $_POST['lastlogout'];
verify_number($lastlogout, 'Last logout', 20);
$skull = $_POST['skull'];
verify_number($skull, 'Skull', 1);
$skull_time = $_POST['skull_time'];
verify_number($skull_time, 'Skull time', 11);
if ($db->hasColumn('players', 'loss_experience')) {
$loss_experience = $_POST['loss_experience'];
verify_number($loss_experience, 'Loss experience', 11);
$loss_mana = $_POST['loss_mana'];
verify_number($loss_mana, 'Loss mana', 11);
$loss_skills = $_POST['loss_skills'];
verify_number($loss_skills, 'Loss skills', 11);
$loss_containers = $_POST['loss_containers'];
verify_number($loss_containers, 'Loss loss_containers', 11);
$loss_items = $_POST['loss_items'];
verify_number($loss_items, 'Loss items', 11);
}
if ($db->hasColumn('players', 'offlinetraining_time')) {
$offlinetraining = $_POST['offlinetraining'];
verify_number($offlinetraining, 'Offline Training time', 11);
}
if ($hasBlessingsColumn) {
$blessings = $_POST['blessings'];
verify_number($blessings, 'Blessings', 2);
}
$balance = $_POST['balance'];
verify_number($balance, 'Balance', 20);
if ($db->hasColumn('players', 'stamina')) {
$stamina = $_POST['stamina'];
verify_number($stamina, 'Stamina', 20);
}
$deleted = (isset($_POST['deleted']) && $_POST['deleted'] == 'true');
$hidden = (isset($_POST['hidden']) && $_POST['hidden'] == 'true');
$created = $_POST['created'];
verify_number($created, 'Created', 11);
$comment = isset($_POST['comment']) ? htmlspecialchars(stripslashes(substr($_POST['comment'], 0, 2000))) : NULL;
foreach ($_POST['skills'] as $skill => $value)
verify_number($value, $skills[$skill][0], 10);
foreach ($_POST['skills_tries'] as $skill => $value)
verify_number($value, $skills[$skill][0] . ' tries', 10);
if ($hasBlessingColumn) {
$bless_count = $_POST['blesscount'];
for ($i = 1; $i <= $bless_count; $i++) {
$a = 'blessing' . $i;
${'blessing' . $i} = (isset($_POST[$a]) && $_POST[$a] == 'true');
}
}
if (!$error) {
$player->setName($name);
$player->setAccount($account_db);
$player->setGroup($groups->getGroup($group));
$player->setLevel($level);
$player->setExperience($experience);
$player->setVocation($vocation);
$player->setHealth($health);
$player->setHealthMax($health_max);
$player->setMagLevel($magic_level);
$player->setMana($mana);
$player->setManaMax($mana_max);
$player->setManaSpent($mana_spent);
$player->setLookBody($look_body);
$player->setLookFeet($look_feet);
$player->setLookHead($look_head);
$player->setLookLegs($look_legs);
$player->setLookType($look_type);
if ($hasLookAddons)
$player->setLookAddons($look_addons);
if ($db->hasColumn('players', 'offlinetraining_time'))
$player->setCustomField('offlinetraining_time', $offlinetraining);
$player->setPosX($pos_x);
$player->setPosY($pos_y);
$player->setPosZ($pos_z);
$player->setSoul($soul);
$player->setTownId($town);
$player->setCap($capacity);
$player->setSex($sex);
$player->setLastLogin($lastlogin);
$player->setLastLogout($lastlogout);
//$player->setLastIP(ip2long($lastip));
$player->setSkull($skull);
$player->setSkullTime($skull_time);
if ($db->hasColumn('players', 'loss_experience')) {
$player->setLossExperience($loss_experience);
$player->setLossMana($loss_mana);
$player->setLossSkills($loss_skills);
$player->setLossContainers($loss_containers);
$player->setLossItems($loss_items);
}
if ($db->hasColumn('players', 'blessings'))
$player->setBlessings($blessings);
if ($hasBlessingColumn) {
for ($i = 1; $i <= $bless_count; $i++) {
$a = 'blessing' . $i;
$player->setCustomField('blessings' . $i, ${'blessing' . $i} ? '1' : '0');
}
}
$player->setBalance($balance);
if ($db->hasColumn('players', 'stamina'))
$player->setStamina($stamina);
if ($db->hasColumn('players', 'deletion'))
$player->setCustomField('deletion', $deleted ? '1' : '0');
else
$player->setCustomField('deleted', $deleted ? '1' : '0');
$player->setCustomField('hidden', $hidden ? '1' : '0');
$player->setCustomField('created', $created);
if (isset($comment))
$player->setCustomField('comment', $comment);
foreach ($_POST['skills'] as $skill => $value) {
$player->setSkill($skill, $value);
}
foreach ($_POST['skills_tries'] as $skill => $value) {
$player->setSkillTries($skill, $value);
}
$player->save();
echo_success('Player saved at: ' . date('G:i'));
}
}
}
$search_name = '';
if (isset($_REQUEST['search_name']))
$search_name = $_REQUEST['search_name'];
else if ($id > 0 && isset($player) && $player->isLoaded())
$search_name = $player->getName();
?>
<div class="row">
<?php
if (isset($player) && $player->isLoaded()) {
$account = $player->getAccount();
?>
<form action="<?php echo $base . ((isset($id) && $id > 0) ? '&id=' . $id : ''); ?>" method="post"
class="form-horizontal">
<div class="col-md-8">
<div class="box box-primary">
<div class="box-body">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab_1" data-toggle="tab" aria-expanded="true">Player</a>
</li>
<li class=""><a href="#tab_2" data-toggle="tab" aria-expanded="false">Stats</a></li>
<li class=""><a href="#tab_3" data-toggle="tab" aria-expanded="false">Skills</a></li>
<li class=""><a href="#tab_4" data-toggle="tab" aria-expanded="false">Pos/Look</a></li>
<li class=""><a href="#tab_5" data-toggle="tab" aria-expanded="false">Misc</a></li>
<li class="pull-right"><a
href="<?php echo ADMIN_URL; ?>?p=accounts&search_name=<?php echo $account->getId(); ?>"
class="text-muted"><i class="fa fa-gear" title="Edit Account"></i></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab_1">
<div class="row">
<div class="col-xs-6">
<label for="name" class="control-label">Name</label>
<input type="text" class="form-control" id="name" name="name"
autocomplete="off" style="cursor: auto;"
value="<?php echo $player->getName(); ?>"/>
</div>
<div class="col-xs-6">
<label for="account_id" class="control-label">Account id:</label>
<input type="text" class="form-control" id="account_id" name="account_id"
autocomplete="off" style="cursor: auto;" size="8" maxlength="11"
value="<?php echo $account->getId(); ?>"/>
</div>
</div>
<div class="row">
<div class="col-xs-6 ">
<label for="group" class="control-label">Group:</label>
<select name="group" id="group" class="form-control">
<?php foreach ($groups->getGroups() as $id => $group): ?>
<option value="<?php echo $id; ?>" <?php echo($player->getGroup()->getId() == $id ? 'selected' : ''); ?>><?php echo $group->getName(); ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="col-xs-6">
<label for="vocation" class="control-label">Vocation</label>
<select name="vocation" id="vocation" class="form-control">
<?php
foreach ($config['vocations'] as $id => $name) {
echo '<option value=' . $id . ($id == $player->getVocation() ? ' selected' : '') . '>' . $name . '</option>';
}
?>
</select>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<label for="sex" class="control-label">Sex:</label>
<select name="sex" id="sex" class="form-control">>
<?php foreach ($config['genders'] as $id => $sex): ?>
<option value="<?php echo $id; ?>" <?php echo($player->getSex() == $id ? 'selected' : ''); ?>><?php echo strtolower($sex); ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="col-xs-6">
<label for="town" class="control-label">Town:</label>
<select name="town" id="town" class="form-control">
<?php foreach ($config['towns'] as $id => $town): ?>
<option value="<?php echo $id; ?>" <?php echo($player->getTownId() == $id ? 'selected' : ''); ?>><?php echo $town; ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<label for="skull" class="control-label">Skull:</label>
<select name="skull" id="skull" class="form-control">
<?php
$skull_type = array("None", "Yellow", "Green", "White", "Red", "Black", "Orange");
foreach ($skull_type as $id => $s_name) {
echo '<option value=' . $id . ($id == $player->getSkull() ? ' selected' : '') . '>' . $s_name . '</option>';
}
?>
</select>
</div>
<div class="col-xs-6">
<label for="skull_time" class="control-label">Skull time:</label>
<input type="text" class="form-control" id="skull_time" name="skull_time"
autocomplete="off" maxlength="11"
value="<?php echo $player->getSkullTime(); ?>"/>
</div>
</div>
<div class="row">
<?php if ($hasBlessingColumn):
$blesscount = $player->countBlessings();
$bless = $player->checkBlessings($blesscount);
?>
<input type="hidden" name="blesscount" value="<?php echo $blesscount; ?>"/>
<div class="col-xs-6">
<label for="blessings" class="control-label">Blessings:</label>
<div class="checkbox">
<?php
for ($i = 1; $i <= $blesscount; $i++) {
echo '<label><input style="margin-left: -16px;" type="checkbox" name="blessing' . $i . '" id="blessing' . $i . '"
value="true" ' . (($bless[$i - 1] == 1) ? ' checked' : '') . '/>' . $i . '</label>';
}
?>
</div>
</div>
<?php endif; ?>
<?php if ($hasBlessingsColumn): ?>
<div class="col-xs-6">
<label for="blessings" class="control-label">Blessings:</label>
<input type="text" class="form-control" id="blessings" name="blessings"
autocomplete="off" maxlength="11"
value="<?php echo $player->getBlessings(); ?>"/>
</div>
<?php endif; ?>
<div class="col-xs-6">
<label for="balance" class="control-label">Bank Balance:</label>
<input type="text" class="form-control" id="balance" name="balance"
autocomplete="off" maxlength="20"
value="<?php echo $player->getBalance(); ?>"/>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<label for="deleted" class="control-label">Deleted:</label>
<input type="checkbox" name="deleted" id="deleted"
value="true" <?php echo($player->getCustomField($db->hasColumn('players', 'deletion') ? 'deletion' : 'deleted') == '1' ? ' checked' : ''); ?>/>
</div>
<div class="col-xs-6">
<label for="hidden" class="control-label">Hidden:</label>
<input type="checkbox" name="hidden" id="hidden"
value="true" <?php echo($player->isHidden() ? ' checked' : ''); ?>/>
</div>
</div>
</div>
<div class="tab-pane" id="tab_2">
<div class="row">
<div class="col-xs-6 ">
<label for="level" class="control-label">Level:</label>
<input type="text" class="form-control" id="level" name="level"
autocomplete="off"
style="cursor: auto;" value="<?php echo $player->getLevel(); ?>"/>
</div>
<div class="col-xs-6">
<label for="magic_level" class="control-label">Magic level:</label>
<input type="text" class="form-control" id="magic_level" name="magic_level"
autocomplete="off" size="8" maxlength="11" style="cursor: auto;"
value="<?php echo $player->getMagLevel(); ?>"/>
</div>
</div>
<div class="row">
<div class="col-xs-6 ">
<label for="experience" class="control-label">Experience:</label>
<input type="text" class="form-control" id="experience" name="experience"
autocomplete="off"
style="cursor: auto;"
value="<?php echo $player->getExperience(); ?>"/>
</div>
<div class="col-xs-6">
<label for="mana_spent" class="control-label">Mana spent:</label>
<input type="text" class="form-control" id="mana_spent" name="mana_spent"
autocomplete="off"
size="3" maxlength="11" style="cursor: auto;"
value="<?php echo $player->getManaSpent(); ?>"/>
</div>
</div>
<div class="row">
<div class="col-xs-6 ">
<label for="health" class="control-label">Health:</label>
<input type="text" class="form-control" id="health" name="health"
autocomplete="off"
size="5" maxlength="11" style="cursor: auto;"
value="<?php echo $player->getHealth(); ?>"/>
</div>
<div class="col-xs-6">
<label for="health_max" class="control-label">Health max:</label>
<input type="text" class="form-control" id="health_max" name="health_max"
autocomplete="off"
size="5" maxlength="11" style="cursor: auto;"
value="<?php echo $player->getHealthMax(); ?>"/>
</div>
</div>
<div class="row">
<div class="col-xs-6 ">
<label for="mana" class="control-label">Mana:</label>
<input type="text" class="form-control" id="mana" name="mana"
autocomplete="off" size="3"
maxlength="11" style="cursor: auto;"
value="<?php echo $player->getMana(); ?>"/>
</div>
<div class="col-xs-6">
<label for="mana_max" class="control-label">Mana max:</label>
<input type="text" class="form-control" id="mana_max" name="mana_max"
autocomplete="off"
size="3" maxlength="11" style="cursor: auto;"
value="<?php echo $player->getManaMax(); ?>"/>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<label for="capacity" class="control-label">Capacity:</label>
<input type="text" class="form-control" id="capacity" name="capacity"
autocomplete="off"
size="3" maxlength="11" style="cursor: auto;"
value="<?php echo $player->getCap(); ?>"/>
</div>
<div class="col-xs-6 ">
<label for="soul" class="control-label">Soul:</label>
<input type="text" class="form-control" id="soul" name="soul"
autocomplete="off" size="3"
maxlength="10" style="cursor: auto;"
value="<?php echo $player->getSoul(); ?>"/>
</div>
<?php if ($db->hasColumn('players', 'stamina')): ?>
<div class="col-xs-6">
<label for="stamina" class="control-label">Stamina:</label>
<input type="text" class="form-control" id="stamina" name="stamina"
autocomplete="off"
maxlength="20" style="cursor: auto;"
value="<?php echo $player->getStamina(); ?>"/>
</div>
<?php endif; ?>
<?php if ($db->hasColumn('players', 'offlinetraining_time')): ?>
<div class="col-xs-6">
<label for="offlinetraining" class="control-label">Offline Training
Time:</label>
<input type="text" class="form-control" id="offlinetraining"
name="offlinetraining" autocomplete="off"
maxlength="11"
value="<?php echo $player->getCustomField('offlinetraining_time'); ?>"/>
</div>
<?php endif; ?>
</div>
</div>
<div class="tab-pane" id="tab_3">
<?php
$i = 0;
foreach ($skills as $id => $info) {
if ($i == 0 || $i++ == 2) {
$i = 0;
}
echo '
<div class="row">
<div class="col-xs-6 ">
<label for="skills[' . $id . ']" class="control-label">' . $info[0] . '</label>
<input type="text" class="form-control" id="skills[' . $id . ']" name="skills[' . $id . ']" maxlength="10" autocomplete="off" style="cursor: auto;" value="' . $player->getSkill($id) . '"/>
</div>
<div class="col-xs-6">
<label for="skills_tries[' . $id . ']" class="control-label">' . $info[0] . ' tries</label>
<input type="text" class="form-control" id="skills_tries[' . $id . ']" name="skills_tries[' . $id . ']" maxlength="10" autocomplete="off" style="cursor: auto;" value="' . $player->getSkillTries($id) . '"/>
</div>
</div>';
if ($i == 0)
echo '';
}
?>
</div>
<div class="tab-pane" id="tab_4">
<?php $outfit = $config['outfit_images_url'] . '?id=' . $player->getLookType() . ($hasLookAddons ? '&addons=' . $player->getLookAddons() : '') . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet(); ?>
<div id="imgchar"
style="width:64px;height:64px;position:absolute; top:30px; right:30px"><img id="player_outfit"
style="margin-left:0;margin-top:0px;width:64px;height:64px;"
src="<?php echo $outfit; ?>"
alt="player outfit"/></div>
<?php ?>
<td>Position:</td>
<div class="row">
<div class="col-xs-4">
<label for="pos_x" class="control-label">X:</label>
<input type="text" class="form-control" id="pos_x" name="pos_x"
autocomplete="off"
maxlength="11" style="cursor: auto;"
value="<?php echo $player->getPosX(); ?>"/>
</div>
<div class="col-xs-4">
<label for="pos_y" class="control-label">Y:</label>
<input type="text" class="form-control" id="pos_y" name="pos_y"
autocomplete="off"
maxlength="11" value="<?php echo $player->getPosY(); ?>"/>
</div>
<div class="col-xs-4">
<label for="pos_z" class="control-label">Z:</label>
<input type="text" class="form-control" id="pos_z" name="pos_z"
autocomplete="off"
maxlength="11" value="<?php echo $player->getPosZ(); ?>"/>
</div>
</div>
<td>Look:</td>
<div class="row">
<div class="col-xs-3">
<label for="look_head" class="control-label">Head: <span
id="look_head_val"></span></label>
<input type="range" min="0" max="132"
value="<?php echo $player->getLookHead(); ?>"
class="slider form-control" id="look_head" name="look_head">
</div>
<div class="col-xs-3">
<label for="look_body" class="control-label">Body: <span
id="look_body_val"></span></label>
<input type="range" min="0" max="132"
value="<?php echo $player->getLookBody(); ?>"
class="slider form-control" id="look_body" name="look_body">
</div>
<div class="col-xs-3">
<label for="look_legs" class="control-label">Legs: <span
id="look_legs_val"></span></label>
<input type="range" min="0" max="132"
value="<?php echo $player->getLookLegs(); ?>"
class="slider form-control" id="look_legs" name="look_legs">
</div>
<div class="col-xs-3">
<label for="look_feet" class="control-label">Feet: <span
id="look_feet_val"></span></label>
<input type="range" min="0" max="132"
value="<?php echo $player->getLookFeet(); ?>"
class="slider form-control" id="look_feet" name="look_feet">
</div>
</div>
<div class="row">
<div class="col-xs-6">
<label for="look_type" class="control-label">Type:</label>
<input type="text" class="form-control" id="look_type" name="look_type"
autocomplete="off"
maxlength="11" style="cursor: auto;"
value="<?php echo $player->getLookType(); ?>"/>
</div>
<?php if ($hasLookAddons): ?>
<div class="col-xs-6">
<label for="look_addons" class="control-label">Addons:</label>
<input type="text" class="form-control" id="look_addons"
name="look_addons" autocomplete="off"
maxlength="11" value="<?php echo $player->getLookAddons(); ?>"/>
</div>
<?php endif; ?>
</div>
</div>
<div class="tab-pane" id="tab_5">
<div class="row">
<div class="col-xs-6">
<label for="created" class="control-label">Created:</label>
<input type="text" class="form-control" id="created" name="created"
autocomplete="off"
maxlength="10"
value="<?php echo $player->getCustomField('created'); ?>"/>
</div>
<div class="col-xs-6">
<label for="lastlogin" class="control-label">Last login:</label>
<input type="text" class="form-control" id="lastlogin" name="lastlogin"
autocomplete="off"
maxlength="20" value="<?php echo $player->getLastLogin(); ?>"/>
</div>
<div class="col-xs-6">
<label for="lastlogout" class="control-label">Last logout:</label>
<input type="text" class="form-control" id="lastlogout" name="lastlogout"
autocomplete="off"
maxlength="20" value="<?php echo $player->getLastLogout(); ?>"/>
</div>
<div class="col-xs-6">
<label for="lastip" class="control-label">Last IP:</label>
<input type="text" class="form-control" id="lastip" name="lastip"
autocomplete="off"
maxlength="10" value="<?php echo longToIp($player->getLastIP()); ?>"
readonly/>
</div>
</div>
<?php if ($db->hasColumn('players', 'loss_experience')): ?>
<div class="row">
<div class="col-xs-6">
<label for="loss_experience" class="control-label">Experience
Loss:</label>
<input type="text" class="form-control" id="loss_experience"
name="loss_experience" autocomplete="off"
maxlength="11"
value="<?php echo $player->getLossExperience(); ?>"/>
</div>
<div class="col-xs-6">
<label for="loss_mana" class="control-label">Mana Loss:</label>
<input type="text" class="form-control" id="loss_mana"
name="loss_mana" autocomplete="off"
maxlength="11" value="<?php echo $player->getLossMana(); ?>"/>
</div>
<div class="col-xs-6">
<label for="loss_skills" class="control-label">Skills Loss:</label>
<input type="text" class="form-control" id="loss_skills"
name="loss_skills" autocomplete="off"
maxlength="11" value="<?php echo $player->getLossSkills(); ?>"/>
</div>
<div class="col-xs-6">
<label for="loss_containers" class="control-label">Containers
Loss:</label>
<input type="text" class="form-control" id="loss_containers"
name="loss_containers" autocomplete="off"
maxlength="11"
value="<?php echo $player->getLossContainers(); ?>"/>
</div>
<div class="col-xs-6">
<label for="loss_items" class="control-label">Items Loss:</label>
<input type="text" class="form-control" id="loss_items"
name="loss_items" autocomplete="off"
maxlength="11" value="<?php echo $player->getLossItems(); ?>"/>
</div>
</div>
<?php endif; ?>
<div class="row">
<div class="col-xs-12">
<label for="comment" class="control-label">Comment:</label>
<textarea class="form-control" name="comment" rows="10" cols="50"
wrap="virtual"><?php echo $player->getCustomField("comment"); ?></textarea>
<small>[max.
length: 2000 chars, 50 lines (ENTERs)]
</small>
</div>
</div>
</div>
</div>
</div>
</div>
<input type="hidden" name="save" value="yes"/>
<div class="box-footer">
<a href="<?php echo ADMIN_URL; ?>?p=players"><span class="btn btn-danger">Cancel</span></a>
<div class="pull-right">
<input type="submit" class="btn btn-primary" value="Update">
</div>
</div>
</div>
</div>
</form>
<?php } ?>
<div class="col-md-4">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Search Player:</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
</div>
</div>
<div class="box-body">
<form action="<?php echo $base; ?>" method="post">
<div class="input-group input-group-sm">
<input type="text" class="form-control" name="search_name" value="<?php echo $search_name; ?>"
maxlength="32" size="32">
<span class="input-group-btn">
<button type="submit" type="button" class="btn btn-info btn-flat">Search</button>
</span>
</div>
</form>
</div>
</div>
<?php
if (isset($account) && $account->isLoaded()) {
$account_players = array();
$query = $db->query('SELECT `name`,`level`,`vocation` FROM `players` WHERE `account_id` = ' . $account->getId() . ' ORDER BY `name`')->fetchAll();
if (isset($query)) {
?>
<div class="box">
<div class="box-header">
<h3 class="box-title">Character List:</h3>
</div>
<div class="box-body no-padding">
<table class="table table-striped">
<tbody>
<tr>
<th style="width: 10px">#</th>
<th>Name</th>
<th>Level</th>
<th style="width: 40px">Edit</th>
</tr>
<?php
$i = 1;
foreach ($query as $p) {
$account_players[] = $p;
echo '<tr>
<td>' . $i . '.</td>
<td>' . $p['name'] . '</td>
<td>' . $p['level'] . '</td>
<td><a href="?p=players&search_name=' . $p['name'] . '"><span class="btn btn-success btn-sm edit btn-flat"><i class="fa fa-edit"></i></span></a></span></td>
</tr>';
$i++;
} ?>
</tbody>
</table>
</div>
</div>
<?php
};
};
?>
</div>
<script type="text/javascript">
$('#lastlogin').datetimepicker({
format: 'unixtime'
});
$('#lastlogout').datetimepicker({
format: 'unixtime'
});
$('#created').datetimepicker({
format: 'unixtime'
});
var slider_head = document.getElementById("look_head");
var output_head = document.getElementById("look_head_val");
var slider_body = document.getElementById("look_body");
var output_body = document.getElementById("look_body_val");
var slider_legs = document.getElementById("look_legs");
var output_legs = document.getElementById("look_legs_val");
var slider_feet = document.getElementById("look_feet");
var output_feet = document.getElementById("look_feet_val");
output_head.innerHTML = slider_head.value;
output_body.innerHTML = slider_body.value;
output_legs.innerHTML = slider_legs.value;
output_feet.innerHTML = slider_feet.value;
slider_head.oninput = function () {
output_head.innerHTML = this.value;
}
slider_body.oninput = function () {
output_body.innerHTML = this.value;
}
slider_legs.oninput = function () {
output_legs.innerHTML = this.value;
}
slider_feet.oninput = function () {
output_feet.innerHTML = this.value;
}
$('#look_head').change(function() {updateOutfit()});
$('#look_body').change(function() {updateOutfit()});
$('#look_legs').change(function() {updateOutfit()});
$('#look_feet').change(function() {updateOutfit()});
$('#look_type').change(function() {updateOutfit()});
<?php if($hasLookAddons): ?>
$('#look_addons').change(function() {updateOutfit()});
<?php endif; ?>
function updateOutfit()
{
var look_head = $('#look_head').val();
var look_body = $('#look_body').val();
var look_legs = $('#look_legs').val();
var look_feet = $('#look_feet').val();
var look_type = $('#look_type').val();
var look_addons = '';
<?php if($hasLookAddons): ?>
look_addons = '&addons=' + $('#look_addons').val();
<?php endif; ?>
new_outfit = '<?= $config['outfit_images_url']; ?>?id=' + look_type + look_addons + '&head=' + look_head + '&body=' + look_body + '&legs=' + look_legs + '&feet=' + look_feet;
$("#player_outfit").attr("src", new_outfit);
console.log(new_outfit);
}
</script>

114
admin/pages/plugins.php Normal file
View File

@@ -0,0 +1,114 @@
<?php
/**
* Plugins
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Plugin manager';
require_once LIBS . 'plugins.php';
$twig->display('admin.plugins.form.html.twig');
if (isset($_REQUEST['uninstall'])) {
$uninstall = $_REQUEST['uninstall'];
if (Plugins::uninstall($uninstall)) {
success('Successfully uninstalled plugin ' . $uninstall);
} else {
error('Error while uninstalling plugin ' . $uninstall . ': ' . Plugins::getError());
}
} else if (isset($_FILES["plugin"]["name"])) {
$file = $_FILES["plugin"];
$filename = $file["name"];
$tmp_name = $file["tmp_name"];
$type = $file["type"];
$name = explode(".", $filename);
$accepted_types = array('application/zip', 'application/x-zip-compressed', 'multipart/x-zip', 'application/x-compressed', 'application/octet-stream', 'application/zip-compressed');
if (isset($file['error'])) {
$error = 'Error uploading file';
switch ($file['error']) {
case UPLOAD_ERR_OK:
$error = false;
break;
case UPLOAD_ERR_INI_SIZE:
case UPLOAD_ERR_FORM_SIZE:
$error .= ' - file too large (limit of ' . ini_get('upload_max_filesize') . ' bytes). You can enlarge the limits by changing "upload_max_filesize" in php.ini';
break;
case UPLOAD_ERR_PARTIAL:
$error .= ' - file upload was not completed.';
break;
case UPLOAD_ERR_NO_FILE:
$error .= ' - zero-length file uploaded.';
break;
default:
$error .= ' - internal error #' . $file['error'];
break;
}
}
if (isset($error) && $error != false) {
error($error);
} else {
if (is_uploaded_file($file['tmp_name'])) {
$filetype = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
if ($filetype == 'zip') // check if it is zipped/compressed file
{
$tmp_filename = pathinfo($filename, PATHINFO_FILENAME);
$targetzip = BASE . 'plugins/' . $tmp_filename . '.zip';
if (move_uploaded_file($tmp_name, $targetzip)) { // move uploaded file
if (Plugins::install($targetzip)) {
foreach (Plugins::getWarnings() as $warning) {
warning($warning);
}
$info = Plugins::getPluginJson();
success((isset($info['name']) ? '<strong>' . $info['name'] . '</strong> p' : 'P') . 'lugin has been successfully installed.');
} else {
$error = Plugins::getError();
error(!empty($error) ? $error : 'Unexpected error happened while installing plugin. Please try again later.');
}
unlink($targetzip); // delete the Zipped file
} else
error('There was a problem with the upload. Please try again.');
} else {
error('The file you are trying to upload is not a .zip file. Please try again.');
}
} else {
error('Error uploading file - unknown error.');
}
}
}
$plugins = array();
foreach (get_plugins() as $plugin) {
$string = file_get_contents(BASE . 'plugins/' . $plugin . '.json');
$string = Plugins::removeComments($string);
$plugin_info = json_decode($string, true);
if ($plugin_info == false) {
warning('Cannot load plugin info ' . $plugin . '.json');
} else {
$plugins[] = array(
'name' => isset($plugin_info['name']) ? $plugin_info['name'] : '',
'description' => isset($plugin_info['description']) ? $plugin_info['description'] : '',
'version' => isset($plugin_info['version']) ? $plugin_info['version'] : '',
'author' => isset($plugin_info['author']) ? $plugin_info['author'] : '',
'contact' => isset($plugin_info['contact']) ? $plugin_info['contact'] : '',
'file' => $plugin,
'uninstall' => isset($plugin_info['uninstall'])
);
}
}
$twig->display('admin.plugins.html.twig', array(
'plugins' => $plugins
));

61
admin/pages/reports.php Normal file
View File

@@ -0,0 +1,61 @@
<?php
/**
* Reports
*
* @package MyAAC
* @author Lee
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Report Viewer';
$files = array();
$server_path_reports = $config['data_path'] . 'reports/';
if (file_exists($server_path_reports)) {
foreach (scandir($server_path_reports, SCANDIR_SORT_ASCENDING) as $f) {
if ($f[0] === '.') {
continue;
}
if (is_dir($server_path_reports . $f)) {
foreach (scandir($server_path_reports . $f, SCANDIR_SORT_ASCENDING) as $f2) {
if ($f2[0] === '.') {
continue;
}
$files[] = array($f . '/' . $f2, $server_path_reports);
}
continue;
}
$files[] = array($f, $server_path_reports);
}
}
foreach ($files as &$f) {
$f['mtime'] = filemtime($f[1] . $f[0]);
$f['name'] = $f[0];
}
unset($f);
$twig->display('admin.reports.html.twig', array('files' => $files));
$file = isset($_GET['file']) ? $_GET['file'] : NULL;
if (!empty($file)) {
if (!preg_match('/[^A-z0-9\' _\/\-\.]/', $file)) {
if (file_exists($server_path_reports . $file)) {
$content = nl2br(file_get_contents($server_path_reports . $file));
$twig->display('admin.logs.view.html.twig', array('file' => $file, 'content' => $content));
} else {
echo 'Specified file does not exist.';
}
} else {
echo 'Invalid file name specified.';
}
}

View File

@@ -4,9 +4,8 @@
* *
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2019 MyAAC
* @version 0.3.0 * @link https://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 = 'Statistics'; $title = 'Statistics';
@@ -29,7 +28,7 @@ $total_houses = $query['how_much'];
$points = $db->query('SELECT `premium_points`, `' . (USE_ACCOUNT_NAME ? 'name' : 'id') . '` as `name` FROM `accounts` ORDER BY `premium_points` DESC LIMIT 10;'); $points = $db->query('SELECT `premium_points`, `' . (USE_ACCOUNT_NAME ? 'name' : 'id') . '` as `name` FROM `accounts` ORDER BY `premium_points` DESC LIMIT 10;');
echo $twig->render('admin.statistics.html', array( $twig->display('admin.statistics.html.twig', array(
'total_accounts' => $total_accounts, 'total_accounts' => $total_accounts,
'total_players' => $total_players, 'total_players' => $total_players,
'total_guilds' => $total_guilds, 'total_guilds' => $total_guilds,

27
admin/pages/tools.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
/**
* Tools
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Tools';
$tool = $_GET['tool'];
if (!isset($tool)) {
echo 'Tool not set.';
return;
}
if (preg_match("/[^A-z0-9_\-]/", $tool)) {
echo 'Invalid tool.';
return;
}
$file = BASE . 'admin/pages/tools/' . $tool . '.php';
if (!@file_exists($file))
require $file;
?>

50
admin/pages/version.php Normal file
View File

@@ -0,0 +1,50 @@
<?php
/**
* Version check
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Version check';
// fetch version
//$file = @fopen('https://my-aac.org/VERSION', 'r') or die('Error while fetching version.');
//$myaac_version = fgets($file);
$myaac_version = @file_get_contents('https://my-aac.org/VERSION');
if (!$myaac_version) {
warning('Error while fetching version info from https://my-aac.org<br/>
Please try again later.');
return;
}
// compare them
$version_compare = version_compare($myaac_version, MYAAC_VERSION);
if ($version_compare == 0) {
success('MyAAC latest version is ' . $myaac_version . '. You\'re using the latest version.
<br/>View CHANGELOG ' . generateLink(ADMIN_URL . '?p=changelog', 'here'));
} else if ($version_compare < 0) {
success('Woah, seems you\'re using newer version as latest released one! MyAAC latest released version is ' . $myaac_version . ', and you\'re using version ' . MYAAC_VERSION . '.
<br/>View CHANGELOG ' . generateLink(ADMIN_URL . '?p=changelog', 'here'));
} else {
warning('You\'re using outdated version.<br/>
Your version: <b>' . MYAAC_VERSION . '</b><br/>
Latest version: <b>' . $myaac_version . '</b><br/>
Download available at: <a href="https://my-aac.org" target="_blank">www.my-aac.org</a>');
}
/*
function version_revert($version)
{
$major = floor($version / 10000);
$version -= $major * 10000;
$minor = floor($version / 100);
$version -= $minor * 100;
$release = $version;
return $major . '.' . $minor . '.' . $release;
}*/
?>

36
admin/pages/visitors.php Normal file
View File

@@ -0,0 +1,36 @@
<?php
/**
* Visitors viewer
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Visitors';
if (!$config['visitors_counter']): ?>
Visitors counter is disabled.<br/>
You can enable it by editing this configurable in <b>config.local.php</b> file:<br/>
<p style="margin-left: 3em;"><b>$config['visitors_counter'] = true;</b></p>
<?php
return;
endif;
require SYSTEM . 'libs/visitors.php';
$visitors = new Visitors($config['visitors_counter_ttl']);
function compare($a, $b)
{
return $a['lastvisit'] > $b['lastvisit'] ? -1 : 1;
}
$tmp = $visitors->getVisitors();
usort($tmp, 'compare');
$twig->display('admin.visitors.html.twig', array(
'config_visitors_counter_ttl' => $config['visitors_counter_ttl'],
'visitors' => $tmp
));
?>

View File

@@ -1,147 +1,44 @@
*{ .slidecontainer {
margin:0; width: 100%;
padding:0;
}
body {
font-family: Helvetica;
color: #313334;
background: /*#f9f9f9 #EEEEEE*/#F7F6F1;
} }
img {border: none;} .slider {
-webkit-appearance: none;
width: 100%;
a:link {color: #000; text-decoration: none;} outline: none;
a:visited {color: #000; text-decoration: none;} opacity: 0.7;
a:focus {color: #000; text-decoration: none;} -webkit-transition: .2s;
a:active {color: #000; text-decoration: underline;} transition: opacity .2s;
a:hover {color: #000; text-decoration: underline;}
a.current {font-weight: bold;}
h5.blue {color: #6b7b95;}
h5.red {color: #c17878;}
h5.green {color: #78ba91;}
h5.purple {color: #a87aad;}
h1, h2, h3, h4, h5, h6 {color: #313334; font-weight: bold;}
.separator {color:#BCE}
.margin-left{
margin-left:5px;
} }
.button { background:#eee url(images/button.gif) repeat-x 0 0; border:solid 1px #b1a874; color:#7f7f7f; font-size:11px; padding:2px 6px 2px 6px; cursor:pointer; line-height:14px !important; } .slider:hover {
.button:hover { color:#333; border-color:#857b42; } opacity: 1;
.field, .button { -moz-border-radius:4px; -webkit-border-radius:4px; }
.small-field, .button, .pagging a { -moz-border-radius:3px; -webkit-border-radius:3px; }
.table th {
background-color: #4CAF50;
color: white;
text-align: left;
} }
.table, .table td, .table th{ .slider::-webkit-slider-thumb {
border: 1px solid #ddd; -webkit-appearance: none;
appearance: none;
width: 15px;
height: 25px;
background: #3c8dbc;
cursor: pointer;
} }
.table th a:link {color: white; text-decoration: none;} .slider::-moz-range-thumb {
.table th a:link {color: white; text-decoration: none;} width: 25px;
.table th a:visited {color: white; text-decoration: none;} height: 25px;
.table th a:focus {color: white; text-decoration: none;} background: #3c8dbc;
.table th a:active {color: white; text-decoration: underline;} cursor: pointer;
.table th a:hover {color: white; text-decoration: underline;}
.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:hover { color:#333;}
#container{
width:960px;
margin-left:auto;
margin-right:auto;
} }
#header {
/*width: 960px;*/ td.details-control {
padding-left: auto;
padding-right: auto;
border-bottom: 1px dotted black;
margin-top: 40px;
}
#header h1 {
margin: 0;
padding-top: 20px;
text-align: center; text-align: center;
color: forestgreen;
cursor: pointer;
} }
#sidebar{
background: #FFF; tr.shown td.details-control {
width: 170px;
float: left;
margin: 10px 0 10px 0;
padding: 10px;
border: 1px solid #CCC;
}
#content {
width: 740px;
float: right;
margin: 20px 0 10px 0;
padding: 10px;
}
#footer {
margin-top: 20px;
border-top: 1px dotted black;
text-align: center; text-align: center;
clear: both; color: red;
}
/*********************
Sidebar
*********************/
#sidebar ul{
list-style:none;
line-height:22px;
}
#sidebar ul li a,#sidebar ul li a:visited{
padding-left:19px;
text-decoration:none;
margin:0 3px;
display:block;
}
#sidebar ul li a:hover{
text-decoration:underline;
}
#sidebar ul li ul{
margin-left:10px;
}
#sidebar h3{
padding:2px;
font-size:14px;
}
/*********************
Status & version boxes
*********************/
#status {
position: absolute; top: 10px; left: 10px;
margin: 0px;
float: right;
font-size: 12px;
}
#status .success {
margin: 0px:
}
#version {
position: absolute; top: 10px; right: 10px;
float: right;
text-align: right;
font-size: 12px;
}
/*********************
Infobox
*********************/
#infobox{
border:1px solid #e9e8e3;
}
#infobox h3{
background:#f7f6f1;
border-bottom:1px solid #e9e8e3;
color:#654322;
} }

View File

@@ -1,95 +1,229 @@
<?php defined('MYAAC') or die('Direct access not allowed!'); ?> <?php defined('MYAAC') or die('Direct access not allowed!'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html>
<head> <head>
<?php echo template_header(true); ?> <?php echo template_header(true);
<title><?php echo $title . $config['title_separator'] . $config['lua']['serverName']; ?> - Powered by MyAAC</title> $title_full = (isset($title) ? $title . $config['title_separator'] : '') . $config['lua']['serverName'];
?>
<title><?php echo $title_full ?></title>
<link rel="shortcut icon" href="<?php echo BASE_URL; ?>images/favicon.ico" type="image/x-icon" />
<link rel="icon" href="<?php echo BASE_URL; ?>images/favicon.ico" type="image/x-icon" />
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="<?php echo BASE_URL; ?>tools/css/bootstrap.min.css">
<link rel="stylesheet" href="<?php echo BASE_URL; ?>tools/css/AdminLTE.min.css">
<link rel="stylesheet" href="<?php echo BASE_URL; ?>tools/css/skins/skin-blue.min.css">
<link rel="stylesheet" href="<?php echo BASE_URL; ?>tools/css/font-awesome.min.css">
<link rel="stylesheet" href="<?php echo BASE_URL; ?>tools/css/ionicons.min.css">
<link rel="stylesheet" href="<?php echo BASE_URL; ?>tools/css/jquery.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="<?php echo $template_path; ?>style.css"/> <link rel="stylesheet" type="text/css" href="<?php echo $template_path; ?>style.css"/>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head> </head>
<body> <body class="hold-transition skin-blue sidebar-mini">
<?php if($page != 'tools'): ?> <div class="wrapper">
<div id="container">
<div id="header">
<?php if($logged && admin()): ?>
<div id="status">
<?php if($status['online']): ?>
<p class="success" style="width: 120px; text-align: center;">Status: Online<br/>
<?php echo $status['uptimeReadable'] . ', ' . $status['players'] . '/' . $status['playersMax']; ?><br/>
<?php echo $config['lua']['ip'] . ' : ' . $config['lua']['loginPort']; ?>
</p>
<?php else: ?>
<p class="error" style="width: 120px; text-align: center;">Status: Offline</p>
<?php endif; ?>
</div>
<div id="version">Version: <?php echo MYAAC_VERSION; ?> (<a id="update" href="?p=version">Check for updates</a>)<br/>
Logged in as: <b><?php echo (USE_ACCOUNT_NAME ? $account_logged->getName() : $account_logged->getId()); ?></b><br/>
<a href="<?php echo BASE_URL; ?>" target="_blank">Preview</a> <span class="separator">|</span> <a href="?action=logout">Log out<img src="<?php echo BASE_URL; ?>images/icons/logout.png" alt="" title="Log out" /></a>
</div>
<?php endif; ?>
<h1><?php echo $config['lua']['serverName'] . ' - ' . $title; ?> - Admin Panel</h1>
</div>
<div id="wrapper">
<?php <?php
if ($logged && admin()) { if ($logged && admin()) {
?> ?>
<div id="sidebar"> <header class="main-header">
<ul> <a href="." class="logo">
<span class="logo-mini"><b>M</b>A</span>
<span class="logo-lg"><b>My</b>AAC</span>
</a>
<nav class="navbar navbar-static-top" role="navigation">
<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
<span class="sr-only">Toggle navigation</span>
</a>
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<li>
<a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
</li>
</ul>
</div>
</nav>
</header>
<aside class="main-sidebar">
<section class="sidebar">
<ul class="sidebar-menu" data-widget="tree">
<li class="header">MyAAC</li>
<?php <?php
$icons_a = array(
'dashboard','newspaper-o', 'envelope',
'book', 'list',
'plug', 'user',
'edit', 'gavel',
'wrench', 'edit', 'book', 'book',
);
$menus = array( $menus = array(
'Dashboard' => 'dashboard', 'Dashboard' => 'dashboard',
'News' => 'news',
'Mailer' => 'mailer', 'Mailer' => 'mailer',
'Pages' => 'pages', 'Pages' => 'pages',
'Menus' => 'menus',
'Plugins' => 'plugins', 'Plugins' => 'plugins',
'Statistics' => 'statistics',
'Visitors' => 'visitors', 'Visitors' => 'visitors',
'Editor' => array(
'Accounts' => 'accounts',
'Players' => 'players', 'Players' => 'players',
'Tools' => array(
'phpinfo' => 'phpinfo'
), ),
'Items' => 'items',
'Tools' => array(
'Notepad' => 'notepad', 'Notepad' => 'notepad',
'Logs' => 'logs' 'phpinfo' => 'phpinfo',
),
'Logs' => array(
'Logs' => 'logs',
'Reports' => 'reports',
),
); );
$i = 0; $i = 0;
foreach ($menus as $_name => $_page) { foreach ($menus as $_name => $_page) {
//echo '<a ' . ($page == $_page ? ' class="current"' : '') . 'href="?p=' . $_page . '">' . $_name . '</a>';
echo '<li><h3>';
$has_child = is_array($_page); $has_child = is_array($_page);
if (!$has_child) { if (!$has_child) {
echo '<a href="?p=' . $_page . '">'; echo '<li ';
if($page == $_page) echo '<u>'; if ($page == $_page) echo ' class="active"';
echo $_name; echo ">";
if($page == $_page) echo '</u>'; echo '<a href="?p=' . $_page . '"><i class="fa fa-' . (isset($icons_a[$i]) ? $icons_a[$i] : 'link') . '"></i> <span>' . $_name . '</span></a></li>';
echo '</a>';
} }
else
echo $_name;
echo '</h3>';
if ($has_child) { if ($has_child) {
echo '<ul>'; $used_menu = "";
foreach($_page as $__name => $__page) $nav_construct = '';
echo '<li><a href="?p=' . $__page . '">'; foreach ($_page as $__name => $__page) {
if($page == $__page) echo '<u>'; $nav_construct = $nav_construct . '<li';
echo $__name;
if($page == $__page) echo '</u>'; if ($page == $__page) {
echo '</a></li>'; $nav_construct = $nav_construct . ' class="active"';
echo '</ul>'; $used_menu = true;
}
$nav_construct = $nav_construct . '><a href="?p=' . $__page . '"><i class="fa fa-circle-o"></i> ' . $__name . '</a></li>';
}
echo '<li class="treeview' . (($used_menu) ? ' menu-open' : '') . '">
<a href="#"><i class="fa fa-' . (isset($icons_a[$i]) ? $icons_a[$i] : 'link') . '"></i> <span>' . $_name . '</span>
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span></a>
<ul class="treeview-menu" style="' . (($used_menu) ? ' display: block' : ' display: none') . '">';
echo $nav_construct;
echo '</ul>
</li>';
}
$i++;
}
$query = $db->query('SELECT `name`, `page`, `flags` FROM `' . TABLE_PREFIX . 'admin_menu` ORDER BY `ordering`');
$menu_db = $query->fetchAll();
foreach ($menu_db as $item) {
if ($item['flags'] == 0 || hasFlag($item['flags'])) {
echo '<li ';
if ($page == $item['page']) echo ' class="active"';
echo ">";
echo '<a href="?p=' . $item['page'] . '"><i class="fa fa-link"></i> <span>' . $item['name'] . '</span></a></li>';
} }
echo '</li>';
} }
?> ?>
</ul> </ul>
</section>
</aside>
<div class="content-wrapper">
<section class="content-header">
<h1><?php echo(isset($title) ? $title : ''); ?>
<small> - Admin Panel</small>
<div class="pull-right">
<span class="label label-<?php echo(($status['online']) ? 'success' : 'danger'); ?>"><?php echo $config['lua']['serverName'] ?></span>
</div> </div>
<?php </h1>
</section>
<section class="content">
<?php echo $content; ?>
</section>
</div>
<footer class="main-footer">
<div class="pull-right hidden-xs">
<div id="status">
<?php if ($status['online']): ?>
<p class="success" style="width: 120px; text-align: center;">Server Online</p>
<?php else: ?>
<p class="error" style="width: 120px; text-align: center;">Server Offline</p>
<?php endif; ?>
</div>
</div>
<?php echo base64_decode('UG93ZXJlZCBieSA8YSBocmVmPSJodHRwOi8vbXktYWFjLm9yZyIgdGFyZ2V0PSJfYmxhbmsiPk15QUFDLjwvYT4='); ?>
</footer>
<aside class="control-sidebar control-sidebar-dark">
<ul class="nav nav-tabs nav-justified control-sidebar-tabs">
<li class="active"><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
<li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="control-sidebar-home-tab">
<h3 class="control-sidebar-heading">Account</h3>
<ul class="control-sidebar-menu">
<li>
<a href="?action=logout">
<i class="menu-icon fa fa-sign-out bg-red"></i>
<div class="menu-info">
<h4 class="control-sidebar-subheading">Log out</h4>
<p>This will log you out
of <?php echo(USE_ACCOUNT_NAME ? $account_logged->getName() : $account_logged->getId()); ?></p>
</div>
</a>
</li>
</ul>
<h3 class="control-sidebar-heading">Site</h3>
<ul class="control-sidebar-menu">
<li>
<a href="<?php echo BASE_URL; ?>" target="_blank">
<i class="menu-icon fa fa-eye bg-blue"></i>
<div class="menu-info">
<h4 class="control-sidebar-subheading">Preview</h4>
<p>This will open a new tab</p>
</div>
</a>
</li>
</ul>
</div>
<div class="tab-pane" id="control-sidebar-settings-tab">
<form method="post">
<h3 class="control-sidebar-heading">Version</h3>
<div class="form-group">
<label class="control-sidebar-subheading">
<?php echo MYAAC_VERSION; ?> (<a href="?p=version">Check for updates</a>)<br/>
</label>
<label class="control-sidebar-subheading">
<p><a href="https://github.com/slawkens/myaac" target="_blank">Github</a></p>
</div>
</form>
</div>
</div>
</aside>
<div class="control-sidebar-bg"></div>
</div>
<?php }
if (!$logged && !admin()) {
echo $content;
} }
?> ?>
<div id="content"><?php echo $content; ?></div>
</div> <script src="<?php echo BASE_URL; ?>tools/js/bootstrap.min.js"></script>
<div id="footer"> <script src="<?php echo BASE_URL; ?>tools/js/jquery-ui.min.js"></script>
<?php echo base64_decode('UG93ZXJlZCBieSA8YSBocmVmPSJodHRwOi8vbXktYWFjLm9yZyIgdGFyZ2V0PSJfYmxhbmsiPk15QUFDLjwvYT4='); ?> <script src="<?php echo BASE_URL; ?>tools/js/jquery.dataTables.min.js"></script>
</div> <script src="<?php echo BASE_URL; ?>tools/js/adminlte.min.js"></script>
</div>
<?php endif; ?>
</body> </body>
</html> </html>

View File

@@ -1,8 +1,8 @@
<?php <?php
require('../../common.php'); require '../../common.php';
require(SYSTEM . 'functions.php'); require SYSTEM . 'functions.php';
require(SYSTEM . 'init.php'); require SYSTEM . 'init.php';
require(SYSTEM . 'login.php'); require SYSTEM . 'login.php';
if(!admin()) if(!admin())
die('Access denied.'); die('Access denied.');

View File

@@ -1,9 +1,9 @@
<?php <?php
require('../../common.php'); require '../../common.php';
require(SYSTEM . 'init.php'); require SYSTEM . 'init.php';
require(SYSTEM . 'functions.php'); require SYSTEM . 'functions.php';
require(SYSTEM . 'status.php'); require SYSTEM . 'status.php';
require(SYSTEM . 'login.php'); require SYSTEM . 'login.php';
if(!admin()) if(!admin())
die('Access denied.'); die('Access denied.');

View File

@@ -20,18 +20,18 @@
* *
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2019 MyAAC
* @version 0.3.0 * @link https://my-aac.org
* @link http://my-aac.org
*/ */
session_start(); if (version_compare(phpversion(), '5.6', '<')) die('PHP version 5.6 or higher is required.');
define('MYAAC', true); define('MYAAC', true);
define('MYAAC_VERSION', '0.3.0'); define('MYAAC_VERSION', '0.8.7');
define('DATABASE_VERSION', 7); define('DATABASE_VERSION', 33);
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', stripos(PHP_OS, 'WIN') === 0 ? 'WINDOWS' : (strtoupper(PHP_OS) === 'DARWIN' ? 'MAC' : 'LINUX'));
define('IS_CLI', in_array(php_sapi_name(), ['cli', 'phpdb']));
// account flags // account flags
define('FLAG_ADMIN', 1); define('FLAG_ADMIN', 1);
@@ -43,26 +43,38 @@ define('FLAG_CONTENT_FORUM', 32);
define('FLAG_CONTENT_COMMANDS', 64); 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);
define('FLAG_CONTENT_SCREENSHOTS', 512); define('FLAG_CONTENT_GALLERY', 512);
define('FLAG_CONTENT_MOVIES', 1024); define('FLAG_CONTENT_VIDEOS', 1024);
define('FLAG_CONTENT_FAQ', 2048);
define('FLAG_CONTENT_MENUS', 4096);
define('FLAG_CONTENT_PLAYERS', 8192);
// news // news
define('NEWS', 1); define('NEWS', 1);
define('TICKET', 2); define('TICKER', 2);
define('ARTICLE', 3); define('ARTICLE', 3);
// directories // directories
define('BASE', dirname(__FILE__) . '/'); define('BASE', __DIR__ . '/');
define('ADMIN', BASE . 'admin/'); define('ADMIN', BASE . 'admin/');
define('SYSTEM', BASE . 'system/'); define('SYSTEM', BASE . 'system/');
define('CACHE', SYSTEM . 'cache/'); define('CACHE', SYSTEM . 'cache/');
define('LOCALE', SYSTEM . 'locale/'); define('LOCALE', SYSTEM . 'locale/');
define('LIBS', SYSTEM . 'libs/'); define('LIBS', SYSTEM . 'libs/');
define('LOGS', SYSTEM . 'logs/'); define('LOGS', SYSTEM . 'logs/');
define('PAGES', SYSTEM . 'pages/');
define('PLUGINS', BASE . 'plugins/'); define('PLUGINS', BASE . 'plugins/');
define('TEMPLATES', BASE . 'templates/'); define('TEMPLATES', BASE . 'templates/');
define('TOOLS', BASE . 'tools/'); define('TOOLS', BASE . 'tools/');
// menu categories
define('MENU_CATEGORY_NEWS', 1);
define('MENU_CATEGORY_ACCOUNT', 2);
define('MENU_CATEGORY_COMMUNITY', 3);
define('MENU_CATEGORY_FORUM', 4);
define('MENU_CATEGORY_LIBRARY', 5);
define('MENU_CATEGORY_SHOP', 6);
// otserv versions // otserv versions
define('OTSERV', 1); define('OTSERV', 1);
define('OTSERV_06', 2); define('OTSERV_06', 2);
@@ -73,23 +85,36 @@ define('TFS_03', 4);
define('TFS_FIRST', TFS_02); define('TFS_FIRST', TFS_02);
define('TFS_LAST', TFS_03); define('TFS_LAST', TFS_03);
session_save_path(SYSTEM . 'php_sessions');
session_start();
// basedir // basedir
$basedir = ''; $basedir = '';
$tmp = explode('/', $_SERVER['SCRIPT_NAME']); $tmp = explode('/', $_SERVER['SCRIPT_NAME']);
$size = sizeof($tmp) - 1; $size = count($tmp) - 1;
for($i = 1; $i < $size; $i++) for($i = 1; $i < $size; $i++)
$basedir .= '/' . $tmp[$i]; $basedir .= '/' . $tmp[$i];
$basedir = str_replace('/admin', '', $basedir); $basedir = str_replace(array('/admin', '/install'), '', $basedir);
$basedir = str_replace('/install', '', $basedir);
define('BASE_DIR', $basedir); define('BASE_DIR', $basedir);
if(isset($_SERVER['HTTPS'][0]) && $_SERVER['HTTPS'] == 'on') if(!IS_CLI) {
define('SERVER_URL', 'https://' . $_SERVER['HTTP_HOST']); if (isset($_SERVER['HTTP_HOST'][0])) {
else $baseHost = $_SERVER['HTTP_HOST'];
define('SERVER_URL', 'http://' . $_SERVER['HTTP_HOST']); } else {
if (isset($_SERVER['SERVER_NAME'][0])) {
$baseHost = $_SERVER['SERVER_NAME'];
} else {
$baseHost = $_SERVER['SERVER_ADDR'];
}
}
define('SERVER_URL', 'http' . (isset($_SERVER['HTTPS'][0]) && strtolower($_SERVER['HTTPS']) === 'on' ? 's' : '') . '://' . $baseHost);
define('BASE_URL', SERVER_URL . BASE_DIR . '/'); define('BASE_URL', SERVER_URL . BASE_DIR . '/');
define('ADMIN_URL', SERVER_URL . BASE_DIR . '/admin/'); define('ADMIN_URL', SERVER_URL . BASE_DIR . '/admin/');
//define('CURRENT_URL', BASE_URL . $_SERVER['REQUEST_URI']); //define('CURRENT_URL', BASE_URL . $_SERVER['REQUEST_URI']);
?>
require SYSTEM . 'exception.php';
}
require SYSTEM . 'autoload.php';

View File

@@ -1,3 +0,0 @@
<?php
// place for your configuration directives, so you can later easily update myaac
?>

View File

@@ -12,15 +12,25 @@
* *
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2019 MyAAC
* @version 0.3.0 * @link https://my-aac.org
* @link http://my-aac.org
*/ */
$config = array( $config = array(
// directories & files // directories & files
'server_path' => '', // path to the server directory (same directory where config file is located) 'server_path' => '', // path to the server directory (same directory where config file is located)
/**
* Environment Setting
*
* if you use this script on your live server - set to 'prod' (production)
* if you want to test and debug the script locally, or develop plugins, set to 'dev' (development)
* WARNING: on 'dev' cache is disabled, so site will be significantly slower !!!
* WARNING2: on 'dev' all PHP errors/warnings are displayed
* Recommended: 'prod' cause of speed (page load time is better)
*/
'env' => 'prod', // 'prod' for production and 'dev' for development
'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?
@@ -30,11 +40,13 @@ $config = array(
// 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
'friendly_urls' => false, // mod_rewrite is required for this, it makes links looks more elegant to eye, and also are SEO friendly (example: http://my-aac.org/guilds/Testing instead of http://my-aac.org/?subtopic=guilds&name=Testing). Remember to rename .htaccess.dist to .htaccess 'session_prefix' => 'myaac_', // must be unique for every site on your server
'friendly_urls' => false, // mod_rewrite is required for this, it makes links looks more elegant to eye, and also are SEO friendly (example: https://my-aac.org/guilds/Testing instead of https://my-aac.org/?subtopic=guilds&name=Testing). Remember to rename .htaccess.dist to .htaccess
'gzip_output' => false, // gzip page content before sending it to the browser, uses less bandwidth but more cpu cycles 'gzip_output' => false, // gzip page content before sending it to the browser, uses less bandwidth but more cpu cycles
// gesior backward support (templates & pages) // gesior backward support (templates & pages)
// allows using gesior templates and pages with myaac // allows using gesior templates and pages with myaac
// might bring some performance when disabled
'backward_support' => true, 'backward_support' => true,
// head options (html) // head options (html)
@@ -45,8 +57,6 @@ $config = array(
// footer // footer
'footer' => ''/*'<br/>Your Server &copy; 2016. All rights reserved.'*/, 'footer' => ''/*'<br/>Your Server &copy; 2016. All rights reserved.'*/,
'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)
'language_allow_change' => false, 'language_allow_change' => false,
@@ -55,7 +65,7 @@ $config = array(
'views_counter' => true, 'views_counter' => true,
// cache system. by default file cache is used // cache system. by default file cache is used
'cache_engine' => 'auto', // apc, eaccelerator, xcache, file, auto, or blank to disable. 'cache_engine' => 'auto', // apc, apcu, eaccelerator, xcache, file, auto, or blank to disable.
'cache_prefix' => 'myaac_', // have to be unique if running more MyAAC instances on the same server (except file system cache) 'cache_prefix' => 'myaac_', // have to be unique if running more MyAAC instances on the same server (except file system cache)
// database details (leave blank for auto detect from config.lua) // database details (leave blank for auto detect from config.lua)
@@ -64,20 +74,25 @@ $config = array(
'database_user' => '', 'database_user' => '',
'database_password' => '', 'database_password' => '',
'database_name' => '', 'database_name' => '',
'database_log' => false, // should database queries be logged and and saved into system/logs/database.log?
'database_socket' => '', // set if you want to connect to database through socket (example: /var/run/mysqld/mysqld.sock)
'database_persistent' => false, // use database permanent connection (like server), may speed up your site
// multiworld system // multiworld system (only TFS 0.3)
'multiworld' => false, // use multiworld system? 'multiworld' => false, // use multiworld system?
'worlds' => array( // list of worlds 'worlds' => array( // list of worlds
//'1' => 'Your World Name', //'1' => 'Your World Name',
//'2' => 'Your Second World Name' //'2' => 'Your Second World Name'
), ),
// items // images
'outfit_images_url' => 'http://outfit-images.ots.me/outfit.php', // set to animoutfit.php for animated outfit 'outfit_images_url' => 'https://outfit-images.ots.me/outfit.php', // set to animoutfit.php for animated outfit
'item_images_url' => 'http://item-images.ots.me/960/', // set to images/items if you host your own items in images folder 'item_images_url' => 'https://item-images.ots.me/1092/', // set to images/items if you host your own items in images folder
// account // account
'account_management' => true, // disable if you're using other method to manage users (fe. tfs account manager) 'account_management' => true, // disable if you're using other method to manage users (fe. tfs account manager)
'account_create_auto_login' => false, // auto login after creating account?
'account_create_character_create' => true, // allow directly to create character on create account page?
'account_mail_verify' => false, // force users to confirm their email addresses when registering account 'account_mail_verify' => false, // force users to confirm their email addresses when registering account
'account_mail_unique' => true, // email addresses cannot be duplicated? (one account = one email) 'account_mail_unique' => true, // email addresses cannot be duplicated? (one account = one email)
'account_premium_days' => 0, // default premium days on new account 'account_premium_days' => 0, // default premium days on new account
@@ -97,19 +112,21 @@ $config = array(
'mail_address' => 'no-reply@your-server.org', // server e-mail address (from:) 'mail_address' => 'no-reply@your-server.org', // server e-mail address (from:)
'mail_admin' => 'your-address@your-server.org', // admin email address, where mails from contact form will be sent 'mail_admin' => 'your-address@your-server.org', // admin email address, where mails from contact form will be sent
'mail_signature' => array( // signature that will be included at the end of every message sent using _mail function 'mail_signature' => array( // signature that will be included at the end of every message sent using _mail function
'plain' => ''/*'--\nMy Server,\nhttp://www.myserver.com'*/, 'plain' => ""/*"--\nMy Server,\nhttp://www.myserver.com"*/,
'html' => ''/*'<br/>My Server,\n<a href="http://www.myserver.com">myserver.com</a>'*/ 'html' => ''/*'<br/>My Server,\n<a href="http://www.myserver.com">myserver.com</a>'*/
), ),
'smtp_enabled' => false, // send by smtp or mail function (set false if use mail function) 'smtp_enabled' => false, // send by smtp or mail function (set false if use mail function, set to true if you use GMail or Microsoft Outlook)
'smtp_host' => '', // mail host 'smtp_host' => '', // mail host. smtp.gmail.com for GMail / smtp-mail.outlook.com for Microsoft Outlook
'smtp_port' => 25, // 25 (default) / 465 (ssl, e.g. gmail) 'smtp_port' => 25, // 25 (default) / 465 (ssl, GMail) / 587 (tls, Microsoft Outlook)
'smtp_auth' => true, // need authorization? 'smtp_auth' => true, // need authorization?
'smtp_user' => 'admin@example.org', 'smtp_user' => 'admin@example.org', // here your email username
'smtp_pass' => '', 'smtp_pass' => '',
'smtp_secure' => '', // What kind of encryption to use on the SMTP connection. Options: '', 'ssl' (GMail) or 'tls' (Microsoft Outlook)
'smtp_debug' => false, // set true to debug (you will see more info in error.log)
// reCAPTCHA (prevent spam bots) // reCAPTCHA (prevent spam bots)
'recaptcha_enabled' => false, // enable recaptcha verification code 'recaptcha_enabled' => false, // enable recaptcha verification code
'recaptcha_site_key' => '', // get your own public and private keys at https://www.google.com/recaptcha 'recaptcha_site_key' => '', // get your own site and secret keys at https://www.google.com/recaptcha
'recaptcha_secret_key' => '', 'recaptcha_secret_key' => '',
'recaptcha_theme' => 'light', // light, dark 'recaptcha_theme' => 'light', // light, dark
@@ -134,11 +151,22 @@ $config = array(
4 => 'Knight Sample' 4 => 'Knight Sample'
), ),
'use_character_sample_skills' => false,
// it must show limited number of players after using search in character page
'characters_search_limit' => 15,
// town list used when creating character // town list used when creating character
// won't be displayed if there is only one item (rookgaard for example) // won't be displayed if there is only one item (rookgaard for example)
'character_towns' => array(1), 'character_towns' => array(1),
// characters length
// This is the minimum and the maximum length that a player can create a character. It is highly recommend the maximum length to be 21.
'character_name_min_length' => 4,
'character_name_max_length' => 21,
// list of towns // list of towns
// if you use TFS 1.3 with support for 'towns' table in database, then you can ignore this - it will be configured automatically (generated from your .OTBM map)
'towns' => array( 'towns' => array(
0 => 'No town', 0 => 'No town',
1 => 'Sample town' 1 => 'Sample town'
@@ -153,12 +181,6 @@ $config = array(
'guild_description_lines_limit' => 6, // limit of lines, if description has more lines it will be showed as long text, without 'enters' 'guild_description_lines_limit' => 6, // limit of lines, if description has more lines it will be showed as long text, without 'enters'
'guild_motd_chars_limit' => 150, // limit of MOTD (message of the day) that is shown later in the game on the guild channel 'guild_motd_chars_limit' => 150, // limit of MOTD (message of the day) that is shown later in the game on the guild channel
'quests' => array(), // quests list (displayed in character view), name => storage
'signature_enabled' => true,
'signature_type' => 'tibian', // signature engine to use: tibian, mango, gesior
'signature_cache_time' => 5, // how long to store cached file (in minutes)
// online page // online page
'online_record' => true, // display players record? 'online_record' => true, // display players record?
'online_vocations' => false, // display vocation statistics? 'online_vocations' => false, // display vocation statistics?
@@ -172,6 +194,7 @@ $config = array(
'team_display_status' => true, 'team_display_status' => true,
'team_display_lastlogin' => true, 'team_display_lastlogin' => true,
'team_display_world' => false, 'team_display_world' => false,
'team_display_outfit' => true,
// bans page // bans page
'bans_limit' => 50, 'bans_limit' => 50,
@@ -181,9 +204,12 @@ $config = array(
'highscores_vocation_box' => true, // show 'Choose a vocation' box on the highscores (allowing peoples to sort highscores by vocation)? 'highscores_vocation_box' => true, // show 'Choose a vocation' box on the highscores (allowing peoples to sort highscores by vocation)?
'highscores_vocation' => true, // show player vocation under his nickname? 'highscores_vocation' => true, // show player vocation under his nickname?
'highscores_frags' => false, // show 'Frags' tab (best fraggers on the server)? Only 0.3 'highscores_frags' => false, // show 'Frags' tab (best fraggers on the server)? Only 0.3
'highscores_balance' => false, // show 'Balance' tab (richest players on the server)
'highscores_outfit' => true, // show player outfit? 'highscores_outfit' => true, // show player outfit?
'highscores_country_box' => false, // doesnt work yet! (not implemented) 'highscores_country_box' => false, // doesnt work yet! (not implemented)
'highscores_groups_hidden' => 4, // this group id and higher won't be shown on the highscores 'highscores_groups_hidden' => 3, // this group id and higher won't be shown on the highscores
'highscores_ids_hidden' => array(0), // this ids of players will be hidden on the highscores (should be ids of samples)
'highscores_length' => 100, // how many records per page on highscores
// characters page // characters page
'characters' => array( // what things to display on character view page (true/false in each option) 'characters' => array( // what things to display on character view page (true/false in each option)
@@ -197,24 +223,38 @@ $config = array(
'quests' => true, 'quests' => true,
'skills' => true, 'skills' => true,
'equipment' => true, 'equipment' => true,
'frags' => false 'frags' => false,
'deleted' => false, // should deleted characters from same account be still listed on the list of characters? When enabled it will show that character is "[DELETED]"
), ),
'quests' => array(
//'Some Quest' => 123,
//'Some Quest Two' => 456,
), // quests list (displayed in character view), name => storage
'signature_enabled' => true,
'signature_type' => 'tibian', // signature engine to use: tibian, mango, gesior
'signature_cache_time' => 5, // how long to store cached file (in minutes), default 5 minutes
'signature_browser_cache' => 60, // how long to cache by browser (in minutes), default 1 hour
// news page // news page
'news_limit' => 5, // limit of news on latest news page 'news_limit' => 5, // limit of news on the latest news page
'news_ticker_limit' => 5, // limit of news in tickers (mini news) (0 to disable) 'news_ticker_limit' => 5, // limit of news in tickers (mini news) (0 to disable)
'news_date_format' => 'j.n.Y', // check php manual date() function for more info about this 'news_date_format' => 'j.n.Y', // check php manual date() function for more info about this
'news_author' => true, 'news_author' => true, // show author of the news
// gifts/shop system // gifts/shop system
'gifts_system' => false, 'gifts_system' => false,
// support/system
'bug_report' => true, // this configurable has no effect, its always enabled
// forum // forum
'forum' => 'site', // link to the server forum, set to "site" if you want to use build in forum system, otherwise leave empty if you aren't going to use any forum 'forum' => 'site', // link to the server forum, set to "site" if you want to use build in forum system, otherwise leave empty if you aren't going to use any forum
'forum_level_required' => 0, // level required to post, 0 to disable 'forum_level_required' => 0, // level required to post, 0 to disable
'forum_post_interval' => 30, // in seconds 'forum_post_interval' => 30, // in seconds
'forum_posts_per_page' => 20, 'forum_posts_per_page' => 20,
'forum_threads_per_page' => 20, 'forum_threads_per_page' => 20,
// uncomment to force use table for forum
//'forum_table_prefix' => 'z_', // what forum mysql table to use, z_ (for gesior old forum) or myaac_ (for myaac)
// last kills // last kills
'last_kills_limit' => 50, // max. number of deaths shown on the last kills page 'last_kills_limit' => 50, // max. number of deaths shown on the last kills page
@@ -222,19 +262,32 @@ $config = array(
// status, took automatically from config file if empty // status, took automatically from config file if empty
'status_ip' => '', 'status_ip' => '',
'status_port' => '', 'status_port' => '',
'status_timeout' => 2, // how long to wait for the initial response from the server (default: 2 seconds)
// how often to connect to server and update status (default: every minute)
// if your status timeout in config.lua is bigger, that it will be used instead
// when server is offline, it will be checked every time web refreshes, ignoring this variable
'status_interval' => 60,
// admin panel
'admin_panel_modules' => 'lastlogin,points,coins',
// other // other
'anonymous_usage_statistics' => true,
'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. * experiencetable_rows, 5 = 500 (will show up to 500 level) 'experiencetable_columns' => 3, // 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 'experiencetable_rows' => 200, // till how many levels in one column
'date_timezone' => 'Europe/Berlin', // more info at http://php.net/manual/en/timezones.php
'footer_show_load_time' => true, // display load time of the page in the footer
'npc' => array(),
// character name blocked
'character_name_blocked' => array(
'prefix' => array(),
'names' => array(),
'words' => array(),
),
'monsters' => array(),
'npc' => array()
); );
// download link to client.
$config['client_download'] = 'http://tibia-clients.com/clients/download/'. $config['client'] .'/exe/windows';
$config['client_download_linux'] = 'http://tibia-clients.com/clients/download/'. $config['client'] .'/tar/linux';
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 797 B

BIN
images/error.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 122 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

BIN
images/global/general/blank.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
images/global/general/box-top.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
images/global/general/chain.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 845 B

BIN
images/global/general/favicon.ico Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
images/global/general/hide.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

BIN
images/global/general/minus.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

BIN
images/global/general/nok.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 B

BIN
images/global/general/ok.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 B

BIN
images/global/general/plus.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

BIN
images/global/general/show.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 681 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 B

BIN
images/items/empty.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
images/loading_spinner.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

BIN
images/monsters/asura.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

BIN
images/monsters/boar.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Some files were not shown because too many files have changed in this diff Show More