Compare commits

...

1817 Commits
v0.1.5 ... main

Author SHA1 Message Date
slawkens
0fbd4bf1be nginx: block additionally *.sql 2025-04-24 13:44:38 +02:00
slawkens
1e45d5c393 Optimize .htaccess FilesMatch: Block access to *.md/json/dist/sql 2025-04-24 13:43:50 +02:00
slawkens
dbea69f314 Fix if user removes the menu category 2025-04-23 20:41:50 +02:00
slawkens
4e6aa0f262 Fix boostedCreature fetch on login.php 2025-04-23 18:05:14 +02:00
slawkens
fa1f927082 Update login.php 2025-04-23 18:04:54 +02:00
slawkens
de0512f11a Start v1.4.1-dev 2025-04-22 15:57:23 +02:00
slawkens
93c09b3380 Release v1.4 2025-04-22 13:42:55 +02:00
slawkens
d47195a787 Do not autoload sub-folders if autoload pages is disabled 2025-04-22 13:30:11 +02:00
slawkens
b618084d50 Fix headline.php: change image format to .png cause of black background 2025-04-21 23:43:57 +02:00
slawkens
d0d0af289d Refactor code + use clearCache() instead 2025-04-20 21:32:46 +02:00
slawkens
1d0c173e7d Clear cache on plugin enable/disable, fixes some issues with plugin pages 2025-04-20 21:30:59 +02:00
slawkens
4e7c894cf2 Nothing.. 2025-04-20 21:29:37 +02:00
slawkens
b71555d60d Update router.php 2025-04-20 21:29:22 +02:00
slawkens
c2bf94fb23 Fix: display 404 error instead of 500 when page has been removed from filesystem 2025-04-20 20:40:10 +02:00
João
8cf3409077
SQL Syntax Standardization (#298)
* Update schema.sql

* Update schema.sql
2025-04-18 23:17:35 +02:00
slawkens
e0043b1300 Fix warning 2025-04-18 20:44:11 +02:00
slawkens
86cb5821f6 README.md corrections
* Add links to docs & faq
* add info about 2.x dev version
* fix some grammar typos
2025-04-18 19:42:33 +02:00
slawkens
82a533d88c Add $db->hasTableAndColumns($table, $columns), credits to @opentibiabr Team 2025-04-18 18:12:56 +02:00
slawkens
ceaa0639e6 feat: admin-pages (can add admin pages through plugins)
Also possibility to overwrite default myaac admin pages
2025-04-18 13:57:53 +02:00
slawkens
6844f4392a Change logout button color 2025-04-06 23:46:52 +02:00
slawkens
6d8f4718a1 pages in theme folder have precedence over normal pages 2025-04-06 22:37:36 +02:00
slawkens
f40b986b59 Small changes in account.login.html.twig
* change inputs width to 100%
* fix form closing
* formatting
2025-04-06 17:00:59 +02:00
slawkens
190697ce98 Update config.php 2025-04-06 16:43:30 +02:00
slawkens
64f6d3abca Add noSubmit option to buttons.base 2025-04-06 16:43:19 +02:00
slawkens
e6f05a2731 Plugin name is required, version is optional 2025-04-06 16:41:28 +02:00
slawkens
6a0356aa0f Update version 2025-04-04 21:31:17 +02:00
slawkens
50d649dbde Release v1.3.3 2025-04-04 21:25:19 +02:00
slawkens
6c568fd36a Fix uninstall plugin when plugin is disabled 2025-04-04 21:08:49 +02:00
slawkens
fa6b6aa153 Display more info when error parsing config.lua value 2025-04-04 20:07:42 +02:00
slawkens
ae639d65b0 PHP 8 things 2025-04-03 20:39:27 +02:00
slawkens
35e2483de8 Change root folder to /var/www/html, like in default config 2025-04-02 19:48:23 +02:00
slawkens
bbf923e1a6 Update common.php 2025-04-01 07:56:29 +02:00
slawkens
211b6ea698 Update CHANGELOG-1.x.md 2025-04-01 07:37:43 +02:00
slawkens
6d156ae080 Update CHANGELOG-1.x.md 2025-04-01 07:29:43 +02:00
slawkens
a5b3940e59 Prepare to release 1.3.2 2025-04-01 07:28:36 +02:00
slawkens
dbf73d0b61 Show/hide IP Ban Protection options depending on the value (enabled/disabled) 2025-03-31 20:38:42 +02:00
slawkens
65696f63e3 Fix debugbar/admin panel menu when using custom base_dir 2025-03-31 18:13:45 +02:00
slawkens
6341093578 Update version 2025-03-30 07:10:16 +02:00
slawkens
d25c71857f Do not require init.php in cache:clear command 2025-03-30 07:10:05 +02:00
slawkens
7dcb5c4a1f Update version to 1.x-dev 2025-03-26 22:02:56 +01:00
slawkens
ff1723b756 Release v1.3.1 2025-03-19 20:37:44 +01:00
slawkens
1a5771ad51 Fix migrate:run command 2025-03-16 20:33:53 +01:00
slawkens
6fac883659 Replace links with from accountmanagement to account/manage 2025-03-16 12:39:07 +01:00
slawkens
4a6896b446 getPremDays: returns -1 if freePremium 2025-03-15 22:48:59 +01:00
slawkens
0852fba6f0 Release v1.3 2025-03-10 20:26:25 +01:00
slawkens
9239a4f419 Fix the second "Save" button -> addition to previous commit 2025-03-10 12:46:33 +01:00
slawkens
00fe1adc15 Fix: add possibility to remove all menu items 2025-03-10 10:48:12 +01:00
slawkens
c2f55791c0 Nothing important, just better code style 2025-03-03 20:07:59 +01:00
slawkens
464492d826 Update OTS_Account.php 2025-02-26 16:16:45 +01:00
slawkens
887b5068ad Fix house links 2025-02-15 12:15:35 +01:00
slawkens
4c5cc8b573 Change monster link to $_GET ?name= 2025-02-15 12:03:44 +01:00
slawkens
529bdcf016 Use latest outfit-images host from @gesior 2025-02-12 18:20:24 +01:00
slawkens
3e3f4bb5a5 Fix long title on headline.php 2025-02-12 16:17:03 +01:00
slawkens
aa52df6e2e Fix menu colors once again, plus add !important tag 2025-02-09 20:54:47 +01:00
slawkens
3b31915c22 Update CHANGELOG.md 2025-02-09 12:25:56 +01:00
slawkens
1c6cda4df9 Update year 2025-02-09 11:50:14 +01:00
slawkens
cf51f7aa8d Release v1.2 2025-02-09 11:32:34 +01:00
slawkens
ed89b99cd1 Addition to previous commit, allow list types with spaces 2025-02-09 01:29:32 +01:00
slawkens
9d7fc98e1e Fix if vocation name has more words 2025-02-09 01:16:15 +01:00
slawkens
f646856e20 Unification of the variable menu_default_links_color 2025-02-09 01:02:14 +01:00
slawkens
f97f8cbe87 Move admin.menus.header html to twig 2025-02-09 00:47:46 +01:00
slawkens
3da3e62c5b Option to reset menus 2025-02-09 00:42:11 +01:00
slawkens
d5dd7297b5 Fix deprecation warnings from jquery 2025-02-09 00:03:39 +01:00
slawkens
73de93a561 Rework menus: Different categories can have different colors 2025-02-08 23:56:58 +01:00
slawkens
ae1161d770 Add template_name to twig variables 2025-02-08 23:43:15 +01:00
slawkens
4455964db4 Update cypress.yml 2025-02-02 22:41:31 +01:00
slawkens
84870dbf2d Update release.sh 2025-02-02 22:39:06 +01:00
slawkens
329153fda6 Fix branch name in workflows 2025-02-02 22:38:40 +01:00
slawkens
4b6024dc45 Save settings in a transaction 2025-02-02 22:36:18 +01:00
slawkens
28fef952f8 feat: Settings: enable Save button only if changes has been made 2025-02-02 22:36:17 +01:00
slawkens
4fda4f643b feat: Settings: password input with hide/show options 2025-02-02 21:55:16 +01:00
slawkens
19686725dc Add HOOK_INIT, executed just after $hooks are loaded 2025-02-02 16:17:49 +01:00
slawkens
a73fb1003e Fix HOOK_STARTUP location 2025-02-02 16:17:24 +01:00
slawkens
b46ddb43d0 Twig session(key) function + reworked session functions to accept multi-array like in Laravel
Important: getSession returns NULL now instead of false if session value not found
2025-02-02 16:16:59 +01:00
slawkens
de468a8dcd Fixed need to click on button second time 2025-02-02 14:22:57 +01:00
slawkens
ea51ad27c3 Fix online status + vocation for TFS 0.x 2025-02-01 00:35:22 +01:00
dependabot[bot]
d2a4748a59
Bump twig/twig from 3.18.0 to 3.19.0 (#284)
Bumps [twig/twig](https://github.com/twigphp/Twig) from 3.18.0 to 3.19.0.
- [Changelog](https://github.com/twigphp/Twig/blob/3.x/CHANGELOG)
- [Commits](https://github.com/twigphp/Twig/compare/v3.18.0...v3.19.0)

---
updated-dependencies:
- dependency-name: twig/twig
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-29 20:00:58 +01:00
slawkens
a1ed209591 Update README.md 2025-01-27 22:58:32 +01:00
slawkens
34321613d6 Start v1.1.1 2025-01-27 22:57:40 +01:00
slawkens
19b290feb7 Update CHANGELOG.md 2025-01-27 22:48:32 +01:00
slawkens
9ab25abcdf Release v1.1 2025-01-27 22:30:18 +01:00
slawkens
ea753278a0 Secure direct access to template.php 2025-01-27 22:15:00 +01:00
slawkens
4d749b8815 Fix error in CLI, where BASE_URL is not defined 2025-01-24 21:42:52 +01:00
slawkens
07012f786b Ignore lua/ folder 2025-01-22 21:45:07 +01:00
slawkens
a45ceab83a Make players.comment and guilds.description VARCHAR 2025-01-22 21:44:58 +01:00
slawkens
669c447fca Fix hook ACCOUNT_LOGIN_BEFORE_ACCOUNT location 2025-01-21 21:45:28 +01:00
slawkens
da43b32ff0 Nothing important, code refactor 2025-01-21 20:43:59 +01:00
slawkens
cbe0d187b4 Formatting and types hint 2025-01-20 16:31:54 +01:00
slawkens
c5d5bb8067 Adjust mailer settings to latest gmail 2025-01-18 16:18:47 +01:00
slawkens
e85ce193be Add forum to the list 2025-01-18 11:18:21 +01:00
slawkens
3fb2675b5a Fix tibiacom menus 2025-01-18 11:11:35 +01:00
slawkens
b7de8b32eb Revert "Fix menus like char-bazaar/auctions-history etc."
This reverts commit dd47423157e007a36cea60fd248191a278fef891.
2025-01-18 11:05:15 +01:00
slawkens
89be68731e Update CHANGELOG.md 2025-01-18 00:11:18 +01:00
slawkens
10dd818b13 Optimize $player->isOnline() function 2025-01-17 22:49:40 +01:00
slawkens
13a1598a46 Nothing important: Convert spaces to tabs 2025-01-17 22:38:27 +01:00
slawkens
4f6178eca0 Initialize menus with menu_categories
If user add custom categories, it will fix an issue where Menu is not collapsed
2025-01-17 21:07:02 +01:00
slawkens
dc2b5afd99 functions_custom.php are not optional 2025-01-17 17:12:21 +01:00
slawkens
11cee81c5f Additional fix to previous commit 2025-01-17 16:36:05 +01:00
slawkens
d639e77d04 tibiacom: Fix the closing MenuBottom if there are extra categories 2025-01-17 16:24:30 +01:00
slawkens
dd47423157 Fix menus like char-bazaar/auctions-history etc. 2025-01-17 11:16:19 +01:00
slawkens
b02c7f4239 Fix note message 2025-01-14 19:29:47 +01:00
slawkens
b5b2e3fd78 Update CHANGELOG.md 2025-01-14 00:19:16 +01:00
slawkens
030d15f0cd Fix branch name 2025-01-14 00:17:33 +01:00
slawkens
b6b7592226 Release v1.0.1 2025-01-13 23:17:58 +01:00
slawkens
fb10741a02 Fix typo in account word 2025-01-13 23:15:57 +01:00
slawkens
5e9c868dfa Fix tibiacom account & news menu links 2025-01-13 23:05:16 +01:00
slawkens
0904b1bb87 Fix phpstan 2025-01-13 22:23:43 +01:00
slawkens
faa60f5e9a Fix phpstan and phplint branches 2025-01-13 22:15:48 +01:00
slawkens
620e0f62e4 Fix cypress run workflow 2025-01-13 22:10:52 +01:00
slawkens
2ae2ec3353 Fix link to monsters 2025-01-13 22:09:15 +01:00
slawkens
b323d9cee1 Update cypress to ^13.17.0 2025-01-13 22:09:04 +01:00
slawkens
4f1d1d8043 Update tinymce to ^7.2.0 2025-01-13 21:50:37 +01:00
slawkens
8e5a3afc6e Update myaac version 2025-01-13 21:41:49 +01:00
slawkens
a7311301e2 Update composer.lock 2025-01-13 21:40:16 +01:00
slawkens
ac10236154 Update twig dependency to ^3.11 (disable dependabot alert) 2025-01-13 21:40:09 +01:00
slawkens
dc95bc4bad Merge branch 'master' of https://github.com/slawkens/myaac 2025-01-13 21:18:50 +01:00
dependabot[bot]
0dc7da472f
Bump nesbot/carbon from 2.72.5 to 2.72.6 (#276)
Bumps [nesbot/carbon](https://github.com/CarbonPHP/carbon) from 2.72.5 to 2.72.6.
- [Release notes](https://github.com/CarbonPHP/carbon/releases)
- [Commits](https://github.com/CarbonPHP/carbon/compare/2.72.5...2.72.6)

---
updated-dependencies:
- dependency-name: nesbot/carbon
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-13 21:16:29 +01:00
slawkens
43421e56ea Update nginx-sample.conf 2025-01-13 20:34:40 +01:00
slawkens
544d006b6f v1.0 - Hello! 2025-01-12 17:44:18 +01:00
slawkens
085ebbcfde All $cache->set calls should have $ttl 2025-01-12 17:13:25 +01:00
slawkens
77a2c1cec3 Support for plugin themes in menus.php 2025-01-12 16:27:20 +01:00
slawkens
e918591666 Ignore PhpStan error 2025-01-09 22:59:02 +01:00
slawkens
175c2a1f89 Fix PhpStan 2025-01-09 22:52:30 +01:00
slawkens
3b5be1a8db Add player->outfit_url attribute 2025-01-09 22:41:34 +01:00
slawkens
c769962e39 Refactor getTopPlayers function
* Option to getTopPlayers by balance
* use Cache::remember
2025-01-09 22:40:57 +01:00
slawkens
35dfaa28ed Update index.php 2025-01-09 20:57:23 +01:00
slawkens
8e501c0e9c Shorten code with Cache::remember 2025-01-09 15:50:33 +01:00
slawkens
c52ca27126 Fix if someone deletes the default kathrine template 2025-01-09 15:41:22 +01:00
slawkens
41a3cb6f42 vendor should be accessible, cause of 2025-01-09 13:39:05 +01:00
slawkens
eb4b3ada49 Adjust post_ip to support ipv6 2025-01-09 13:10:04 +01:00
slawkens
68bdec7c18 Fix ip size 2025-01-09 13:06:33 +01:00
slawkens
8a612429b2 Use $db->insert instead of manual query 2025-01-09 13:03:55 +01:00
slawkens
16671ea40b Fix change sex price deducted 2025-01-09 09:44:12 +01:00
slawkens
8fb643596f Fix more XSS in forum 2025-01-08 23:22:51 +01:00
slawkens
c2b7286d20 Fix XSS in forum new_post 2025-01-08 23:13:40 +01:00
slawkens
d6c40c836a Fix move_thread by unauthorized user 2025-01-08 22:36:49 +01:00
slawkens
99262c3ebd Fix DataLoader Towns cache 2025-01-07 15:03:39 +01:00
slawkens
b8396d4c84 Fix for TFS 1.4.2 where conditions is NULL 2024-12-29 15:46:02 +01:00
slawkens
b0c8cf2ecd Add $whoopsHandler as variable, can be used by other scripts 2024-12-29 15:45:33 +01:00
slawkens
da1816cc13 use https 2024-12-20 22:42:46 +01:00
slawkens
783d96fc65 Set default_socket_timeout for ipinfo.io checkup 2024-12-20 22:42:35 +01:00
slawkens
988a3f2dbe Display created by id 2024-12-19 22:32:28 +01:00
slawkens
8e0978c1ed Adjustments regarding accounts.id in admin panel -> Accounts editor
getAccountIdentityColumn() function
2024-12-19 22:32:05 +01:00
slawkens
023f1dc598 Support for accounts.id when there is no accounts.name and accounts.number 2024-12-19 21:52:05 +01:00
slawkens
ea5e1d4192 Fix IDE warning about form 2024-12-07 18:53:09 +01:00
slawkens
06188be6e1 Fix $vocs not found 2024-12-07 13:52:52 +01:00
slawkens
2c42de688a Fixes to tibiacom menus ActiveSubmenuItem 2024-12-07 10:28:01 +01:00
slawkens
4ac56e6b15 tabs 2024-12-05 21:49:02 +01:00
slawkens
5e60249603 Update buttons.create_character.html.twig 2024-12-05 21:44:48 +01:00
slawkens
d8b6b749ee Support for button_color (green, red, blue) 2024-12-05 21:44:06 +01:00
slawkens
c5e114d550 Update dependencies 2024-12-04 16:00:30 +01:00
slawkens
706fca8868 update phpneon 2024-12-04 15:46:07 +01:00
slawkens
65adf9ccdd Load deprecated classes + add Cache class 2024-12-03 20:12:03 +01:00
slawkens
bc6663dc44 Fix online vocations numbers, thanks Marko999x 2024-11-25 20:28:00 +01:00
slawkens
e3ffe5d9e1 Display warning if zip extension is not installed 2024-11-23 14:29:16 +01:00
slawkens
c0a66037e0 Fix column not found - hidden/hide 2024-11-22 16:04:48 +01:00
slawkens
17210b717f Execute updated migrations with $up() function 2024-11-22 16:04:19 +01:00
slawkens
5782772b90 Remove bugtracker SQL table as the page has been removed 2024-11-22 15:53:57 +01:00
slawkens
27c44f1bdf schema: Change character set to utf8mb4 (support for Emojis in Menus/Pages/News/Forum etc.) 2024-11-22 15:52:54 +01:00
Slawomir Boczek
3f6ff3a332
Feature migrations up/down (#270)
* Migrations up down

* Add forum model

* Syntactic sugar for db structure changes

* Refactor migrations with $up & $down

* Fix migrations upgrade and downgrade

+ Add option to disable auto migrate

* Add migrate:to command

Usage: php aac migrate:to x (x - database version)

* Show error when mail is not enabled

* Fixes regarding to init.php

* Add migrate command to manually upgrade db, incase auto migrate is disabled

* Fixed rest of the migrations

* Limit max version of database

* Don't allow minus number

* Option to clear specified plugin settings by name

* Version is required

* Fix PHPStan errors

* Unset $up after migration, to prevent executing same migration twice

* Add database version to output

* This is not needed

* Update 5.php

* Set database_auto_migrate on install

* Set blank & color only if current db version supports it

* Fix duplicate function declaration
2024-11-22 15:29:23 +01:00
slawkens
79636280a7 Move current password input to the top, makes more sense 2024-11-19 20:55:53 +01:00
slawkens
38e699ba4b PHP 8.1 is required 2024-11-19 14:21:31 +01:00
slawkens
afb055f2dc More obvious name for parameter in -> installMenus 2024-11-19 14:21:15 +01:00
slawkens
6f58df0467 Update twig.php 2024-11-19 14:08:27 +01:00
slawkens
95343cec02 Change to str_contains 2024-11-19 14:08:24 +01:00
slawkens
8055785c81 Fix installMenus function 2024-11-19 07:48:52 +01:00
slawkens
64e4c08950 MyAAC\Cache 2024-11-19 07:19:43 +01:00
slawkens
12d8faa3ed Do not clear menus by default 2024-11-19 07:05:27 +01:00
slawkens
1e6892971b Change spaces to tabs 2024-11-19 07:03:06 +01:00
slawkens
8ae22accc9 Fix for console displaying REQUEST_URI 2024-11-18 23:49:26 +01:00
slawkens
a2fadc5945 Fixes to installMenus function 2024-11-18 23:48:03 +01:00
slawkens
d0b4065ccf Optimise news management 2024-11-18 15:04:53 +01:00
slawkens
84d37c5a8f Allow OTS_Player to be passed as object to getPlayerLink 2024-11-17 18:07:10 +01:00
slawkens
28a2b34cc1 Update account.management.html.twig 2024-11-12 22:19:21 +01:00
slawkens
bab565fbd0 Update init.php 2024-11-12 22:01:15 +01:00
slawkens
36bd3eb846 New hooks for news management
Can be used for example as discord hooks
2024-11-12 22:01:00 +01:00
slawkens
85bc2342cf Fix missing bracket opening 2024-11-12 21:03:43 +01:00
slawkens
507402171b Patching from master some small adjustments (Account Logs typo + forum new thread show button by @anyeor) 2024-11-12 21:01:14 +01:00
slawkens
941846605c Prefer get_browser_real_ip() over REMOTE_ADDR 2024-11-12 20:59:51 +01:00
slawkens
a4a2480995 Add None vocation to highscores (can be changed to RookStayer in Admin Panel) 2024-11-12 20:51:45 +01:00
slawkens
ddced132cf Fix if highscores_vocation box is disabled causing Choose a vocation dropdown to fail 2024-11-12 20:42:06 +01:00
slawkens
749e8e6f02 Fix choose a skill dropdown 2024-11-11 22:04:06 +01:00
slawkens
7d787b4566 Update database.php 2024-11-10 20:25:46 +01:00
slawkens
7e67e11e16 More understandable argument name 2024-11-10 20:25:42 +01:00
slawkens
011a85d8ae new hook: HOOK_ADMIN_NEWS_ADD 2024-11-10 20:25:17 +01:00
slawkens
382f897322 Update settings.php 2024-11-07 19:07:46 +01:00
slawkens
c980a09146 Rewrite towns loading code, removed OTBM loader (was too slow)
By default load from towns table in db
2024-11-07 19:07:15 +01:00
slawkens
18bd325a44 fix label 2024-11-07 14:44:46 +01:00
slawkens
078e20a9a4 cleanup 2024-11-07 14:44:18 +01:00
slawkens
e96227fbe4 Automatically set selected current one on highscores filters 2024-11-07 14:44:08 +01:00
slawkens
c49c9d99a9 Fix PHP Fatal error 2024-10-27 20:40:48 +01:00
slawkens
a0f1971583 Fix login if limiter is disabled 2024-10-25 19:01:28 +02:00
slawkens
cb5fc84e2e Release v1.0-RC.2 2024-10-25 10:54:03 +02:00
slawkens
29b77035be Update CHANGELOG.md 2024-10-25 10:53:50 +02:00
slawkens
b8c0215720 Fix if loot is empty 2024-10-24 15:55:32 +02:00
slawkens
3100faa645 Fix highscores skills for servers that use player_skills table 2024-10-11 20:35:12 +02:00
slawkens
f7c9a67a96 More fixes to displaying online record 2024-10-04 21:36:13 +02:00
slawkens
e8fedb8d16 One bracket to much.. 2024-10-04 21:26:28 +02:00
slawkens
4e4739e8ab Fix displaying players online record 2024-10-04 21:23:41 +02:00
slawkens
c6cc84a668 Fix RateLimit when cache is disabled 2024-09-19 21:25:54 +02:00
slawkens
95a7c23a70 Use PHP 8 functions 2024-09-14 11:48:56 +02:00
slawkens
a7fe400614 Use Validator::characterName 2024-09-14 11:48:43 +02:00
slawkens
2568046a4d nothing important: brackets 2024-09-14 11:16:47 +02:00
slawkens
7161678c4b Add missing Validator::characterName check 2024-09-12 09:40:01 +02:00
slawkens
93641fc68a New hooks in account manage + create 2024-09-08 15:03:18 +02:00
slawkens
ea7e808508 Add more clients (13.22+) 2024-09-08 14:48:59 +02:00
slawkens
da3fc1fc8c Interesting update from opentibiabr (Uptime readable) 2024-09-08 14:48:42 +02:00
slawkens
201f95caa8 Do not create player if there is no players table in db 2024-09-05 15:36:19 +02:00
slawkens
779aa152fa Do not require players & guilds tables 2024-09-05 15:35:55 +02:00
slawkens
d99b22f98b Fix attempts counting 2024-08-26 15:19:37 +02:00
slawkens
35e28350bd Change spaces to tabs 2024-08-26 15:19:17 +02:00
Gabriel Pedro
327dcb5f87
feat: ratelimit (#267)
* feat: rate limit settings

* fix: section label

* fix: real ip

* fix: real ip
2024-08-26 14:53:09 +02:00
Gabriel Pedro
bc8ada6fe2
fix: verified email for login.php (#265)
* fix: required email login verify

* fix: add missing select column

* Revert "fix: add missing select column"

This reverts commit db79e3118af881e5894ae6bfd7498aa2200f0a35.
2024-08-25 13:40:32 +02:00
Gabriel Pedro
6183b7ee52
chore: drop raw queries (#266)
* chore: eloquent migrate

* fix: typos
2024-08-25 13:38:58 +02:00
Jonatas
760c3ab017
Highscore frags fixed for TFS 0.3 (#263) 2024-08-16 18:19:44 +02:00
slawkens
ab73d60c61 Fix warning if core.account_country is disabled 2024-08-12 23:01:45 +02:00
slawkens
8d8bdb6dac Fix missing groups variable #262. thanks @Scrollog for reporting 2024-08-12 22:54:23 +02:00
slawkens
71c00aa5e0 Use https for outfit & item images 2024-08-01 23:17:07 +02:00
slawkens
1fcdd54c94 Patching from master
OTS_House refactor code + $db->update with nulls
2024-07-25 15:43:42 +02:00
slawkens
c2ec468246 feat: search by email in accounts editor 2024-07-23 22:56:31 +02:00
slawkens
68118fb7c2 Update phpstan.neon 2024-07-23 08:47:22 +02:00
slawkens
5a69b9a802 Update composer.lock 2024-07-23 08:45:55 +02:00
slawkens
45e63b13c3 Update version to 1.0-RC 2024-07-23 08:35:08 +02:00
slawkens
758a8b3330 Prepare changelog for 1.0-RC
Release Candidate.
2024-07-23 08:30:53 +02:00
slawkens
1843728930 Rename to playerSample 2024-07-23 08:07:59 +02:00
slawkens
cff62ccba4 Another try 2024-07-12 20:54:12 +02:00
slawkens
28f98db9de Fix PHPStan errors in monsters.php 2024-07-12 20:48:27 +02:00
slawkens
da14e125e9 Fix highscores skill links (Thanks @vyroq) 2024-07-12 20:01:12 +02:00
slawkens
cd49dfc799 Set Admin Account verified by default 2024-07-10 18:12:05 +02:00
slawkens
ef79b99b8a Fix monster not found exception 2024-07-10 09:54:54 +02:00
slawkens
9a27403e7d Fixes to account_mail_verify 2024-07-09 23:35:39 +02:00
slawkens
5f63c3b227 Invalidate cached setting 2024-07-09 23:33:00 +02:00
slawkens
203e411b62 Allow account_create_character_create even if account_mail_verify is activated 2024-07-09 23:06:12 +02:00
slawkens
fcb13f3c0f Fixes to account verify - do not allow login without verified email (Thanks @anyeor) 2024-07-09 23:05:36 +02:00
slawkens
d94828772c Rework 5th step of installation, to fix some pointless message about Cache 2024-07-09 22:04:47 +02:00
slawkens
10a739773c Detect tools/ext exists on install to prevent broken installs 2024-07-09 21:29:42 +02:00
slawkens
83b3dc803a Fix 5th step of installer 2024-07-08 19:50:05 +02:00
slawkens
33a47137c9 Fix hooks priority default 2024-06-29 15:09:44 +02:00
slawkens
dc17b701da feat: Hooks priority 2024-06-29 14:05:06 +02:00
slawkens
d30811404b Update players.php 2024-06-28 19:03:06 +02:00
slawkens
a631760dbf Order fraggers by time 2024-06-23 16:10:50 +02:00
slawkens
bc3dcab462 deny all is enough 2024-06-23 09:55:15 +02:00
slawkens
a8d255c04b feat: Plugins pages: subSubFolders 2024-06-14 08:07:52 +02:00
slawkens
813786c768 Update cleanup_players.php 2024-06-14 06:42:45 +02:00
slawkens
0db0ec1aa4 Fix useGuildNick displaying 2024-06-14 06:42:42 +02:00
slawkens
bdc0c43d3f Refactor account routes into sub folders 2024-06-13 22:23:43 +02:00
slawkens
c7a6a539a9 Another approach to fix duplicates - priorities
Priority description: (lower number - higher priority)
1-99 Highest priority - overrides everything, even pages from database, use with caption
100 - default for pages in database
101-999 - recommended range for plugins
1000 - default value for plugins if no other specified
1001 - 9999 - no usage currently
10000 - default myaac routes
2024-06-13 21:35:47 +02:00
slawkens
c1d4b4f80c Make autoload of pages, commands and themes configurable
Not everyone might want them to autoload
2024-06-13 14:36:18 +02:00
slawkens
47a19e85dd Reposition code for setting ranks (addition to previous commit) 2024-06-13 13:07:03 +02:00
slawkens
d9c1b2507c Create guild_rank entries, in case MySQL trigger not loaded 2024-06-13 12:51:29 +02:00
slawkens
4c0739d3e9 Fixed fastRoute duplicate errors 2024-06-13 11:29:06 +02:00
slawkens
afe70a03c5 Fix email_change status 2024-06-11 13:32:22 +02:00
slawkens
3fadf87a7a Fix title on login page 2024-06-11 13:14:15 +02:00
slawkens
c24576165c login.php early exit + fix title 2024-06-11 12:55:02 +02:00
slawkens
1e5c9dcd9b Nothing important, just a space for better look! 2024-06-10 19:43:08 +02:00
slawkens
a04d186c22 Fix highscores frags for TFS 1.x and canary 2024-06-10 18:53:17 +02:00
slawkens
42f99c3edc Fraggers in characters page for TFS 1.x and canary 2024-06-08 23:27:19 +02:00
slawkens
4f4965369d spaces -> tabs 2024-06-05 21:53:58 +02:00
slawkens
57b47ab798 Fix if <flags> are not present in monster.xml 2024-06-05 21:51:50 +02:00
slawkens
9ea2a5067f Order towns by id 2024-06-05 15:10:55 +02:00
slawkens
ec96985872 Revert some breaking change 2024-06-01 18:44:06 +02:00
slawkens
9f2a51b351 Spaces and remove useless function 2024-06-01 15:53:34 +02:00
slawkens
a1d7c94166 Closing tag 2024-06-01 15:51:28 +02:00
slawkens
0c3e3e16dd Set default group_id 2024-06-01 15:51:21 +02:00
slawkens
45dda5e834 Add HOOK_ACCOUNT_CREATE_CHARACTER_* hooks 2024-05-31 22:59:52 +02:00
slawkens
32ae4dde20 Fix closing table elements 2024-05-31 22:57:44 +02:00
slawkens
d3f03fa735 Better place for INSTALL_FINISH hook 2024-05-31 19:21:37 +02:00
slawkens
44eff8092c Fix settings title 2024-05-31 18:30:01 +02:00
slawkens
8ef3d06f1e Fix duplicated routes 2024-05-31 17:22:39 +02:00
slawkens
60bd64a639 Update router.php 2024-05-30 20:40:15 +02:00
slawkens
a1bcb217ec Fixes regarding not working google recaptcha (+few previous commits) 2024-05-30 17:36:07 +02:00
slawkens
933b681a9f Fixed if account_country is disabled 2024-05-30 14:25:31 +02:00
slawkens
e9aea17e1b Close form in proper place 2024-05-30 14:21:52 +02:00
slawkens
060400b074 Revert "Use tables headline for account.create.html.twig"
This reverts commit 64387e085bff66bd0f63dcdc7548bac1e2dc5c5b.
2024-05-30 13:48:59 +02:00
slawkens
6be4a42c5a Revert "Fix form id"
This reverts commit d225c2da26a43d553596228cfe2a27b4887157e0.
2024-05-30 13:48:53 +02:00
slawkens
1e8198635e Enable dev mode on install, prevent noobs asking white page questions 2024-05-30 12:00:26 +02:00
slawkens
be78a0fc45 Do adjustments only if table exist 2024-05-30 11:32:03 +02:00
slawkens
08ac8ebade Add HOOK_INSTALL_FINISH 2024-05-30 11:31:41 +02:00
slawkens
66ecc487a1 One more early exit 2024-05-30 11:18:06 +02:00
slawkens
9e23ec6745 Early exit in 7-finish install 2024-05-30 11:14:16 +02:00
slawkens
968899ef77 Pass $playerSample as parameter to hook 2024-05-30 10:09:31 +02:00
slawkens
3844ad0d71 Fix warnings in basic.js 2024-05-30 09:49:02 +02:00
slawkens
c93bf5a984 create_character_name_min_length => 3 2024-05-30 09:02:19 +02:00
slawkens
50336a810b Fix blessings longer than 3 characters 2024-05-30 08:23:31 +02:00
slawkens
48f6ca0eba Tabs + spaces 2024-05-30 08:20:59 +02:00
slawkens
30107222d4 Add getLongLong function to OTS_Buffer 2024-05-30 08:20:33 +02:00
slawkens
f92b275f70 Update version to beta.2 2024-05-23 23:44:29 +02:00
slawkens
504242fb84 Do not create news about myaac, if any news already exist (on installation) 2024-05-23 23:40:27 +02:00
slawkens
e2bab4220b Fix composer install 2024-05-18 22:31:59 +02:00
slawkens
0b4c34a823 Update phpstan.yml 2024-05-18 22:20:00 +02:00
slawkens
c5aa9a4684 Do not include phpstan into release 2024-05-18 22:19:23 +02:00
slawkens
301afe190b Remove node_modules in release script 2024-05-18 22:01:41 +02:00
slawkens
c35cc83e4f They say composer.lock should be commited - let it be! 2024-05-18 22:01:30 +02:00
slawkens
3ba9d8f780 Fix date 2024-05-18 21:56:01 +02:00
slawkens
06f228509b Update release.sh 2024-05-18 21:53:41 +02:00
slawkens
39e682dfd2 htmlspecialchars seems to be better here (?) 2024-05-16 18:58:54 +02:00
slawkens
6f209440e0 Fix XSS in monsters.php, thanks to @gesior 2024-05-15 22:18:39 +02:00
slawkens
b2a1675de3 Fix if account_country is disabled 2024-04-16 13:32:34 +02:00
slawkens
163877d303 Update account.generate_recovery_key.html.twig 2024-04-16 11:38:10 +02:00
slawkens
a4d11c1a12 Rename variables 2024-04-16 10:45:34 +02:00
slawkens
8cf4e3da02 Fix change_info if account_country is disabled 2024-04-15 21:54:18 +02:00
slawkens
e0230c5237 Adjustments in success.html.twig 2024-04-15 21:47:21 +02:00
slawkens
127e03081c Support for subfolders in plugins/pages 2024-04-15 21:21:16 +02:00
slawkens
e9c6017e60 Fix forum table header text color 2024-04-15 20:35:53 +02:00
slawkens
d5915df37e Fix redirects in forum + polls 2024-04-14 16:06:57 +02:00
slawkens
eb0c2a7674 Post-fix redirect 2024-04-14 16:02:55 +02:00
slawkens
d225c2da26 Fix form id 2024-04-14 15:59:23 +02:00
slawkens
d95e280b9a Use tables headline for account.redirect.html.twig 2024-04-14 15:25:13 +02:00
slawkens
64387e085b Use tables headline for account.create.html.twig 2024-04-14 15:06:43 +02:00
slawkens
e1f507cf2d Extend timeout to fix broken workflow-runs 2024-04-12 15:15:23 +02:00
slawkens
c92a410209 Don't allow redirect to external website 2024-04-08 19:08:21 +02:00
slawkens
1186f94e21 Add Twig TypeCastingExtension 2024-04-08 10:08:48 +02:00
slawkens
f837b3133d deny vendor, composer.json, changelog.md etc. in nginx config sample 2024-04-06 19:51:34 +02:00
slawkens
9106f1e4ce Update CHANGELOG.md 2024-04-06 19:16:22 +02:00
slawkens
a62cfc5272 Update CHANGELOG.md 2024-04-06 15:08:39 +02:00
slawkens
6229736d07 getPlayerLink -> colored 2024-04-01 23:40:53 +02:00
slawkens
6807339056 Colored (online/offline) player links 2024-04-01 23:33:00 +02:00
slawkens
ffaa0729ac Add player->getOutfit function 2024-04-01 23:19:12 +02:00
slawkens
03cc09b8c7 Adjust submit button 2024-04-01 23:10:00 +02:00
slawkens
6d4724f4f4 Squashed commit of the following:
commit da18629d1652c304a75b684939255a1838989279
Author: slawkens <slawkens@gmail.com>
Date:   Mon Apr 1 21:53:53 2024 +0200

    Fixes to tables headline

commit 41c3d9ad21304e99330ea42841b5932af792db92
Author: slawkens <slawkens@gmail.com>
Date:   Sun Mar 31 13:59:25 2024 +0200

    [WIP] Tables headline
2024-04-01 21:54:53 +02:00
slawkens
2afe0c1185 Fill up the equipment variable no matter of config 2024-03-28 21:25:43 +01:00
slawkens
6334f3f4fa Fix admin-lte scripts includes 2024-02-23 17:01:49 +01:00
Slawomir Boczek
fe7ad61abe
phpstan support (#250)
* phpstan v1 + workflow

* Fix intend

* More fixes

* Update phpstan.neon

* phpstan level 2

* Move errors ignoring into phpstan.neon

* phpstan level 3

* Don't ignore templates folder

* Something from level 4

* Update phpstan.neon
2024-02-18 14:59:25 +01:00
slawkens
e23a749e4c Ignore cypress screenshots folder 2024-02-17 16:48:15 +01:00
slawkens
ab5e4eff76 Fix if hide already exists 2024-02-17 16:43:33 +01:00
slawkens
fdd3bfd105 Fix config_lua reloading, cache clear problem 2024-02-17 16:43:21 +01:00
slawkens
93ad347571 Restore cypress:open npm command 2024-02-17 16:41:40 +01:00
slawkens
7d4aafda4f Update workflow name
[skip ci]
2024-02-17 15:51:19 +01:00
slawkens
87e8c9eb4d Use NPM for packages: bootstrap, jquery, tinymce 2024-02-17 15:42:09 +01:00
slawkens
d61197b6a1 Delete tinymce, will be included by npm 2024-02-17 10:30:50 +01:00
slawkens
dfba8bc60b Update README.md
[skip ci]
2024-02-17 09:05:36 +01:00
slawkens
d2d497d82c Upgrading to gha-find-replace@v3, fixes some warnings about set-output 2024-02-17 08:51:05 +01:00
slawkens
4204e0a419 Nope, it doesn't work 2024-02-17 08:35:16 +01:00
slawkens
e8e093cc1f Try to do it in one step with regex 2024-02-17 08:30:49 +01:00
slawkens
2b39a1e406 Fix canary build 2024-02-17 08:24:59 +01:00
slawkens
cac592e63a Update workflow name [skip ci] 2024-02-17 08:04:05 +01:00
slawkens
0255d0bef2 Fix upload artifacts error + adjust workflow name 2024-02-17 08:00:12 +01:00
slawkens
a59f0e9244 Cypress test on canary + tfs-master 2024-02-17 07:55:51 +01:00
slawkens
9f3231fff6 Fix delete character exception 2024-02-16 20:27:48 +01:00
slawkens
647eae08b4 Display error message if config.local.php is not writable 2024-02-04 10:10:04 +01:00
slawkens
e2487f97e3 settings:set + settings:reset commands 2024-02-04 09:01:00 +01:00
slawkens
235e69b8da Settings::clearCache function 2024-02-04 08:35:33 +01:00
slawkens
649e37ab0f "php aac migrate:run {ids}" command 2024-02-04 08:16:22 +01:00
slawkens
dff4a98ef5 Fix reload server data 2024-02-04 08:13:57 +01:00
slawkens
b754374585 Update CHANGELOG.md 2024-02-04 07:41:25 +01:00
slawkens
ad789c50ff Create creatures.php 2024-02-03 20:54:50 +01:00
slawkens
ccfd2b4f55 Rename creatures to monsters 2024-02-03 20:54:09 +01:00
slawkens
3f5744964a Get rid of ?subtopic=x links 2024-02-03 20:34:42 +01:00
slawkens
b22dc0014a Change spaces to tabs 2024-02-03 20:30:21 +01:00
slawkens
00cbce20b0 Various fixes in forum
Add new access type: guest - all visitors, player will be now for logged players only
Fixed default forum board access for guests
2024-02-03 20:01:38 +01:00
slawkens
bbe922a65d New migration: update menu links 2024-02-03 18:58:20 +01:00
slawkens
8f23c62708 Update list of contributors 2024-02-03 18:42:35 +01:00
slawkens
58bb6093b0 Update release.sh 2024-02-02 20:29:28 +01:00
slawkens
2faaa037ab Update CHANGELOG.md 2024-02-02 20:17:18 +01:00
slawkens
cc9057324a Fix maxlength for email input 2024-02-02 18:52:21 +01:00
slawkens
f7971a21d8 An attempt to bypass the error 2024-02-01 20:43:46 +01:00
slawkens
08e7cf05b5 Remove link, looks bad on Whoops 2024-02-01 19:00:44 +01:00
slawkens
2e482fdc2a Relocation of myaac tables check
Makes more sense, between $db connection and migrate.php
2024-02-01 18:36:23 +01:00
slawkens
a2c8e2b2ae phpstan: level 1 passed 2024-01-31 00:36:15 +01:00
slawkens
cc3e66cacb according to phpstan: isset is not required here 2024-01-30 23:58:33 +01:00
slawkens
bd86454fea Import missing class 2024-01-30 23:16:33 +01:00
slawkens
1bb6e61583 eAccelerator is dead 2024-01-30 23:13:57 +01:00
slawkens
13a2570ad0 Remove old approach of showing errors to users in database pages
Currently handled by config.env
2024-01-30 23:04:53 +01:00
slawkens
e961f2efcf fix: missing semicolon 2024-01-30 23:02:26 +01:00
slawkens
54609bf90e phpstan adjustments 2024-01-30 23:01:18 +01:00
slawkens
6494bd2c0c Add optional $return = false parameter to the csrf function 2024-01-30 22:40:40 +01:00
slawkens
670812772d Seems that this is better solution to the #245 (output buffering)
This works for both, when output_buffering is enabled, and disabled
2024-01-30 19:20:23 +01:00
slawkens
ae8a9fc44c This is more error resistant 2024-01-30 18:30:42 +01:00
slawkens
f80c5fd8ed Update init.php 2024-01-30 18:16:05 +01:00
slawkens
6bac02bd35 Fix links to some pages that has been renamed 2024-01-30 18:09:57 +01:00
slawkens
ac67555f28 Fix exception when settingsDb are empty 2024-01-30 18:09:57 +01:00
slawkens
6c4fd4ed27 add new constant for cli: SELF_NAME 2024-01-30 18:09:56 +01:00
slawkens
a8a896e0f5 Our command line tool will be named: aac 2024-01-30 17:47:31 +01:00
slawkens
b517a12f8a Avoid duplicate loading of hooks 2024-01-28 23:08:37 +01:00
slawkens
5d741944f7 Fix: cronjob command 2024-01-28 23:07:40 +01:00
slawkens
a3056f5f48 Preparing to release 1.0-beta - update changelog 2024-01-28 23:07:22 +01:00
slawkens
8518f21987 Fix the migration, thanks @gpedro 2024-01-28 18:42:10 +01:00
slawkens
a3a2f05783 Forgot to quote 2024-01-28 18:26:03 +01:00
slawkens
9f3c980ed2 Update commands & downloads pages 2024-01-27 23:58:08 +01:00
slawkens
31f8c99745 $menu['target_blank'] 2024-01-27 23:25:03 +01:00
slawkens
25c0bac7a3 Cache clear hook 2024-01-27 20:30:15 +01:00
slawkens
9a749afc46 1 second should be enough, is ages in IT 2024-01-27 20:19:25 +01:00
slawkens
87df817eae Another way to clear database cache 2024-01-27 19:27:25 +01:00
slawkens
3a58c8a6f9 Revert "Revert "Another try..""
This reverts commit 2ba03e0c99e021ffab2bd5b200003bbf4e7793d5.
2024-01-27 19:23:02 +01:00
slawkens
2ba03e0c99 Revert "Another try.."
This reverts commit ccc91a473c840bd4c5b49f53aeed2f285c18fce8.
2024-01-27 18:58:41 +01:00
slawkens
f7f46bae00 OK so that was that 2024-01-27 18:58:19 +01:00
slawkens
ccc91a473c Another try.. 2024-01-27 18:12:38 +01:00
slawkens
7e347e950f Revert "try mysql 5.7"
This reverts commit 535ae2047d76ccce03224eab051e164b10740215.
2024-01-27 18:12:01 +01:00
slawkens
535ae2047d try mysql 5.7 2024-01-27 17:58:00 +01:00
slawkens
12bc6a0333 Revert "Revert "Revert "just testing"""
This reverts commit 3a8673898387fd21ee15c10e217645899b70db50.
2024-01-27 17:57:43 +01:00
slawkens
3a86738983 Revert "Revert "just testing""
This reverts commit 76256a7ee6f0c4770da4e557ece98c21d98cdf6a.
2024-01-27 17:49:24 +01:00
slawkens
3b3e9b0e70 Update 1-install.cy.js 2024-01-27 17:33:53 +01:00
slawkens
54b9cc5402 This exception makes no sense, as it redirects to install 2024-01-27 17:33:47 +01:00
slawkens
6d23b285c1 Fixes for PHP 8.3 2024-01-27 17:27:05 +01:00
slawkens
76256a7ee6 Revert "just testing"
This reverts commit 07dafc5118da6339790c1b183526cfdebea1c0e7.
2024-01-27 17:23:40 +01:00
slawkens
07dafc5118 just testing 2024-01-27 17:13:32 +01:00
slawkens
b5c1b431d5 Upload php log 2024-01-27 17:06:55 +01:00
slawkens
3a3e434d4e Update cypress.yml 2024-01-27 17:04:20 +01:00
slawkens
d71bab648d Change hidden to hide (Eloquent blocked keyword) 2024-01-27 16:54:48 +01:00
slawkens
3554b41172 Preparing to release v1.0-beta 2024-01-27 15:36:34 +01:00
slawkens
41022727bd Fixes to csrf protection 2024-01-27 15:35:24 +01:00
slawkens
9b781d09a9 Use php 7 str_contains 2024-01-27 14:15:56 +01:00
slawkens
c8d4e7d186 Auto clear old menu entries on install 2024-01-27 14:15:42 +01:00
slawkens
6cd8b7697d Fix plugin menus hook 2024-01-27 14:14:40 +01:00
slawkens
19c4cb810b Update 3-check-public-pages.cy.js 2024-01-27 10:00:23 +01:00
slawkens
ba6119e6d0 Rename pages 2024-01-27 09:58:11 +01:00
slawkens
1ce816040a Remove duplicated placeholder 2024-01-27 09:34:35 +01:00
slawkens
aa8e26f6a3 check if menu table exists 2024-01-27 09:34:23 +01:00
slawkens
f0eb113bc2 Refactor clearCache function 2024-01-27 09:02:38 +01:00
slawkens
6ed8f18115 Move consts to global.php 2024-01-27 08:44:51 +01:00
slawkens
2262c4e882 Clear additional keys on cache clear 2024-01-27 08:18:50 +01:00
slawkens
69b02fa977 Update to actions/upload-artifact@v4 2024-01-27 01:37:25 +01:00
slawkens
6baf49bba8 Default town = 1 2024-01-27 01:35:51 +01:00
slawkens
bb02328b5a Update github actions versions 2024-01-27 01:35:42 +01:00
slawkens
5a4854c205 Disable account_login_by_email by default 2024-01-27 01:26:44 +01:00
slawkens
c661ae36ef #vars_mail_admin has been deleted in 1.0+ 2024-01-27 01:21:09 +01:00
slawkens
df8fb68d5e Fix imports 2024-01-27 01:15:11 +01:00
slawkens
fb0afdcea1 We require PHP 8.1, cause of illuminate/database 2024-01-27 01:05:03 +01:00
slawkens
e3775fed86 Update bans.php 2024-01-27 01:01:59 +01:00
slawkens
93b0d3829d update github actions: branch = develop 2024-01-27 01:01:56 +01:00
slawkens
b6f98ffdee test github actions 2024-01-27 01:00:25 +01:00
slawkens
511e10e78b Same for themes + commands 2024-01-27 00:56:45 +01:00
slawkens
cfdbc2a8b2 Fixed: disabled plugins should not enable pages 2024-01-27 00:46:34 +01:00
slawkens
1a6fb8bee2 Refactoring classes into src/ folder, so they will be auto-loaded by composer 2024-01-27 00:36:49 +01:00
slawkens
410d75c882 Revised Commands -> use symfony/console -> php ma (MyAAC)
Usage:
php ma list
php ma cache:clear
php ma plugin:install guild-wars.zip

More sophisticated:
echo "Hello, this is hello world message" | php ma mail:send test@test.com --subject "This is subject"

Also: custom commands can be added via Plugins: just need to return new class instance that extends \MyAAC\Commands\Command in plugins/*/commands folder
2024-01-26 23:19:39 +01:00
slawkens
c59bacea93 Fix page title if the index.php is present 2024-01-25 23:11:13 +01:00
slawkens
f719c02050 Feature: auto-load themes (previously templates) from plugins/*/themes/* 2024-01-25 23:06:10 +01:00
slawkens
0698e7b5f5 Typo 2024-01-25 22:29:28 +01:00
slawkens
c594dfd14b Feature: auto-load pages in plugins/*/pages/*.php 2024-01-25 22:29:19 +01:00
slawkens
514c4a037a admin.links style 2024-01-25 22:02:08 +01:00
slawkens
b894f75e74 Put admin.links in <table> to fix position + remove bootstrap classes (didnt worked anyway) 2024-01-25 22:01:35 +01:00
slawkens
d2a3a9a8da System-solution for styled tables, that works with every template 2024-01-25 21:57:20 +01:00
slawkens
3f4c02a327 bugtracker has been removed 2024-01-13 10:18:24 +01:00
slawkens
199672e0c8 Fix donate_column 2024-01-13 10:12:08 +01:00
Danilo Pucci
02adb87fac - adding check before flush buffer (#245) 2024-01-01 23:32:26 +01:00
slawkens
b4448f7279 Silently ignore if the hook does not exist 2023-12-28 19:13:14 +01:00
slawkens
687c9a6690 feature: color-styled tables in tinymce editor 2023-12-12 17:58:17 +01:00
slawkens
2b86ba94fe Cleanup tabs 2023-12-12 14:37:12 +01:00
slawkens
a9fb5dffa3 Fix account manage redirect 2023-12-09 09:26:33 +01:00
slawkens
da77ec20ef Delete bugtracker, it will be included as plugin 2023-12-08 23:56:29 +01:00
slawkens
6fd141eca6 composer --prefer-dist --optimize-autoloader 2023-11-29 22:34:26 +01:00
slawkens
e17dde0dca Fix session fixation 2023-11-27 23:52:36 +01:00
slawkens
d1046ba21d Fix forum XSS 2023-11-27 22:56:38 +01:00
slawkens
98332f1483 Fix XSS in bugtracker.php 2023-11-27 22:29:24 +01:00
slawkens
1423046039 Sort changelogs by date + make sortable in admin panel 2023-11-25 20:09:42 +01:00
slawkens
9c60beeed0 I like this color better - teams page adjustment 2023-11-25 16:56:45 +01:00
slawkens
336b6ac530 Fix mango signature warnings 2023-11-25 16:33:48 +01:00
slawkens
c71722fc52 Fix warning 2023-11-25 16:24:18 +01:00
slawkens
4d8d574089 Fix missing query_string in nginx sample config
Causes missing parameters in $_GET query
2023-11-25 16:24:08 +01:00
slawkens
e74fbe5bfd Update account.lost.form.html.twig 2023-11-25 15:47:53 +01:00
slawkens
48e9a1ed51 Fix account lost interface links 2023-11-25 15:44:34 +01:00
slawkens
56631bdf27 New hook: HOOK_ACCOUNT_CREATE_CHARACTER_AFTER
Possibility to change character after create
2023-11-25 13:53:50 +01:00
slawkens
b1224d9d1a clearRouteCache on database pages change 2023-11-25 13:37:24 +01:00
slawkens
e18ada3d9d Fix default access for database pages 2023-11-25 13:30:48 +01:00
slawkens
c8218f69a5 Fix undefined variable 2023-11-25 13:08:56 +01:00
slawkens
f991a8c817 clearCache after install plugin 2023-11-25 11:09:45 +01:00
slawkens
36ec2e1e56 Add option to execute "install" part of the plugin 2023-11-25 10:10:15 +01:00
slawkens
19c06df300 Insert new setting if it doesn't exist yet 2023-11-24 21:03:31 +01:00
slawkens
b2d5d6f115 Fix backward support, needs to be before router.php 2023-11-23 20:03:15 +01:00
slawkens
5769ac8bb4 Fix onlineTable relation, fixed online status in highscores 2023-11-23 20:02:18 +01:00
slawkens
41c9f54e4b Fix the fix 2023-11-11 21:32:00 +01:00
slawkens
8ef238c96c Fix default option for options 2023-11-11 21:30:10 +01:00
slawkens
9ffb7f5fa9 Move monsters page settings to other tab + some small adjustments 2023-11-11 21:18:00 +01:00
slawkens
8b5464f8f8 Update init.php 2023-11-11 21:16:45 +01:00
slawkens
f008591580 Make links in settings desc clickable 2023-11-11 21:16:34 +01:00
slawkens
1d5b751fe1 Fix Settings:save for other plugins 2023-11-11 18:44:48 +01:00
slawkens
37bde7df22 Use str_contains + str_starts_with 2023-11-11 16:09:44 +01:00
slawkens
89deca1adb Fix empty PAGE 2023-11-11 16:09:31 +01:00
slawkens
c996f25d8d Fix guild leave 2023-11-11 15:28:41 +01:00
slawkens
d291f694d2 Update .gitignore 2023-11-11 15:24:49 +01:00
slawkens
cee1e67d3d Fix highscores_ids_hidden 2023-11-11 15:02:38 +01:00
slawkens
c81861d8c8 debugbar dont like persistent connection 2023-11-11 14:40:10 +01:00
slawkens
c3c1a6b2a6 Preserve config.local.php on settings save
Will be helpful when migration from 0.8
2023-11-11 14:33:20 +01:00
slawkens
d0590d2747 Execute highscores_ids_hidden migration again, cause of settings 2023-11-11 14:29:49 +01:00
slawkens
c79a1d5f3a Fix changelog + news.tickers buttons 2023-11-11 13:18:37 +01:00
slawkens
ada1e391d4 Add option to restrict Page view to logged user
$logged_access = 0 -> not logged in
$logged_access = 1 -> logged in
2023-11-11 12:52:26 +01:00
slawkens
193e18523d Uncheck PHP after enable TinyMCE
This needs to be rewritten anyway
2023-11-11 12:22:42 +01:00
slawkens
3fb9b1ae2f Enable TinyMCE by default 2023-11-11 12:15:03 +01:00
slawkens
561bdcd766 My bad 2023-11-11 12:07:10 +01:00
slawkens
556ef47d59 Towns & NPCs & Items should be persistent 2023-11-11 12:04:21 +01:00
slawkens
130ad25c4d Saving setting in db is not intended - you can use Settings Model for that 2023-11-11 11:34:02 +01:00
slawkens
08bea2c541 Update index.php 2023-11-11 11:31:12 +01:00
slawkens
8974830621 Move debugbar code to separate file 2023-11-11 11:30:08 +01:00
slawkens
d582120fac Squashed commit of the following:
commit 94a61f32ae20d6b772ac90ef68ff983e1a082422
Merge: 57772569 8227303b
Author: slawkens <slawkens@gmail.com>
Date:   Sat Nov 11 11:11:13 2023 +0100

    Merge branch 'develop' into feature/debug-bar

commit 577725690d177c6bb3af440e51b27a81b1723818
Author: slawkens <slawkens@gmail.com>
Date:   Mon Aug 21 11:08:12 2023 +0200

    Add option to enable debugbar, even if dev mode is disabled

commit c227fd4e9655f2dd7c1de0955f99e607c6881cbf
Merge: 9fef84bf a692607c
Author: slawkens <slawkens@gmail.com>
Date:   Mon Aug 21 10:20:04 2023 +0200

    Merge branch 'develop' into feature/debug-bar

commit 9fef84bffe63eb7bf0fcf68811873393164cb543
Author: slawkens <slawkens@gmail.com>
Date:   Fri Aug 11 06:39:50 2023 +0200

    Fix debugBar mysql logs (Thanks @gpedro)

commit dedd54286f6f086cb78287a5c1cd0f8cc9155984
Author: slawkens <slawkens@gmail.com>
Date:   Thu Aug 10 13:21:36 2023 +0200

    Log PDO queries, as stated in docs, but doesn't work yet (don't know the reason)

commit 7403a24030d75e525467dcaad937a4b14fd4ffae
Author: slawkens <slawkens@gmail.com>
Date:   Thu Aug 10 13:21:20 2023 +0200

    Use dev-master, cause of some bugs appearing

commit cc7aec8e28c8839b2640ca9a7f62a1b4464fdbb3
Author: slawkens <slawkens@gmail.com>
Date:   Thu Aug 10 13:05:02 2023 +0200

    Init debugBar
2023-11-11 11:26:38 +01:00
slawkens
8227303b89 1.0 will be our next release
we are starting to follow semantic versioning
2023-11-11 11:04:09 +01:00
slawkens
7a402ec0e0 fix #225 2023-11-11 11:00:28 +01:00
Slawomir Boczek
790d85a88a
CSRF Protection (#235)
* Fix alert class name

* feature: csrf protection

* Cosmetics

* Fix token generate

* Admin Panel: changelogs csrf protection

* news/id route

* Refactor admin newses + add csrf

* Use admin.links instead

* Admin panel: Pages csrf

* Menus: better csrf + add success message on reset colors

* Plugins csrf

* Move definitions

* add info function, same as note($message)

* Update mailer.php

* Fix new page/news links

* clear_cache & maintenance csrf

* Formatting

* Fix news type

* Fix changelog link

* Add new changelog link

* More info to confirm dialog

* This is always true
2023-11-11 10:57:57 +01:00
slawkens
a04fbde607 Fix highscores error 2023-11-09 20:32:20 +01:00
slawkens
9d119b6279 This is more error tolerant 2023-11-07 22:15:23 +01:00
slawkens
7dd9b7764a Update common.php 2023-11-07 22:01:47 +01:00
slawkens
3297a7c51a Better https detection 2023-11-07 22:01:43 +01:00
slawkens
4a430ae9db Fix display ban info on account page
https://otland.net/threads/myacc-bans-display-problem.286825/
2023-11-02 22:06:14 +01:00
Kamil Grzechulski
26a80e0741
fix: password2 variable refactor to correct name (#237) 2023-10-06 07:52:21 +02:00
slawkens
3b9feaf3bd My fault 2023-09-26 22:03:30 +02:00
slawkens
21bff97137 Add additional cache keys to clear function 2023-09-26 21:52:05 +02:00
slawkens
a2a273cde2 Twig_SimpleFilter is deprecated 2023-09-22 16:21:52 +02:00
slawkens
fc5635bad3 spaceless twig tag is deprecated as well 2023-09-22 16:19:56 +02:00
slawkens
e01a44f352 Update .editorconfig 2023-09-16 14:40:19 +02:00
slawkens
855b05b15f Fix class names 2023-09-16 11:45:40 +02:00
slawkens
b3991a8e78 Add HOOK_TWIG. Also moved Hooks loading to init.php
For adding twig functions & filters by plugins
2023-09-16 11:07:38 +02:00
slawkens
0ac0f4e7a8 Fixes 2023-09-16 10:22:10 +02:00
slawkens
e9f155fb49 Fix XSS in players editor 2023-09-16 10:21:18 +02:00
slawkens
55b5e3b600 Fix XSS in accounts editor 2023-09-16 10:21:18 +02:00
slawkens
08339fe8b6 Fix XSS in tibiacom template - subtopic 2023-09-16 10:21:17 +02:00
slawkens
89c2e84bff Fix alert class name 2023-09-16 09:24:10 +02:00
slawkens
f76615e59b Fix getGuildLogoById 2023-09-16 05:54:41 +02:00
slawkens
4c4089a155 Quotes & const 2023-09-12 12:11:49 +02:00
slawkens
2d02d8d8b3 Fix news delete message part 2 2023-09-12 12:09:39 +02:00
slawkens
95b1460b13 Fix news delete message 2023-09-12 12:08:09 +02:00
slawkens
673e40350a Small adjustment to menus install 2023-09-12 11:42:03 +02:00
slawkens
f7cbe5170d set display quest default to false 2023-09-11 16:16:38 +02:00
slawkens
619b8ba4a0 Fix creatures datatable 2023-09-03 21:33:41 +02:00
slawkens
8c3b73ca9e Add account logs to admin panel accounts editor 2023-09-03 21:18:58 +02:00
slawkens
d90810cf84 Add latest clients versions 2023-08-31 14:20:24 +02:00
slawkens
fd25e6e881 Fix highscores country box to be hidden 2023-08-31 14:08:02 +02:00
slawkens
63e69c97b7 Fix login.php @gpedro <3 2023-08-31 14:01:30 +02:00
slawkens
574e35ba35 Fix: forgot to remove those menu items 2023-08-31 13:49:32 +02:00
slawkens
09627bdb1e Linux is case-sensitive! 2023-08-31 11:03:36 +02:00
Slawomir Boczek
5f10773189
feature: plugin cronjobs (#215) 2023-08-31 08:33:32 +02:00
slawkens
8a3986932d My fault was commenting this 2023-08-25 17:13:21 +02:00
slawkens
9e2a87f448 Add forgotten prefix for some settings 2023-08-25 17:09:31 +02:00
slawkens
0746708743 Reviewed some settings again, fixing many glitches 2023-08-24 17:20:32 +02:00
slawkens
3ef53aff6c Allow hooks to be prefixed with HOOK_ 2023-08-23 11:58:03 +02:00
slawkens
f43a5d1221 Option to disable settings saving with hooks
for next.my-aac.org
2023-08-23 11:57:37 +02:00
slawkens
43353b4f53 Update .gitattributes 2023-08-22 13:19:03 +02:00
Gabriel Pedro
a692607c5e
feat: replace POT Query Builder to Eloquent ORM (#230)
* wip

* wip

* wip

* wip

* wip

* fix: reusing pdo connection from pot

* wip

* wip

* wip

* wip

* move files

In future, all classes will be in src/ folder

* Replace namespace name, for future

* Remove duplicated exception

* Fix towns from db

* Fix spells page

* Add default FAQ question + FAQ model

* feat: reset colors in menus

* Add confirm + save button at the top (menus)

* Do not insert duplicated FAQ on install

* Refactor install menus

* Fix changelogs showing

* Fix menu update, only with specified template name

* Fix account create -> missing compat

* Fix bans_per_page

* banned_by is player_id. type = 2 is namelock in tfs 0.3

* Add getPlayerNameById, fix getPlayerNameByAccount

* Change link name

* Order by lastlogin

* fix: query optimize

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Refactor notepad.php, class was useless

* This is showing error, if the updated rows = 0

* Fix success & error class (bootstrap)

* Uncomment require migrate.php

* Some distro have owner_id

* Update Player.php

---------

Co-authored-by: slawkens <slawkens@gmail.com>
2023-08-21 10:16:58 +02:00
slawkens
b72e7a3d96 Merge branch '0.9' into develop 2023-08-21 09:43:52 +02:00
slawkens
e15b57f967 Ignore gallery 2023-08-21 09:43:44 +02:00
slawkens
c3a161e2ee Merge branch '0.9' into develop 2023-08-21 09:38:31 +02:00
slawkens
30fe42939d Fix FAQ actions 2023-08-21 09:38:23 +02:00
slawkens
627369bbde Add some variable to config.local.php on install 2023-08-21 09:01:50 +02:00
slawkens
7cea023965 Remove item.php include (was removed in last commits) 2023-08-15 22:33:37 +02:00
slawkens
eb416e18cc Add missing guild_ settings to config compat 2023-08-15 22:28:52 +02:00
slawkens
fc0d13437a Fix highscores show vocation 2023-08-15 22:17:34 +02:00
slawkens
14c8160020 Merge branch '0.9' into develop 2023-08-15 22:06:18 +02:00
slawkens
1f95a415aa Fix tabs 2023-08-15 22:06:09 +02:00
slawkens
370cc554ad Fix success & error class (bootstrap) 2023-08-15 22:04:43 +02:00
slawkens
2991696a60 typo 2023-08-12 13:34:53 +02:00
slawkens
a1ecdd228d Fixes in getPlayerNameByAccountId + add getPlayerNameById 2023-08-12 13:34:25 +02:00
slawkens
6c8961638e Merge branch '0.9' into develop 2023-08-12 13:28:07 +02:00
slawkens
3dd493b790 banned_by is player_id. type = 2 is namelock in tfs 0.3 2023-08-12 13:23:53 +02:00
slawkens
b49c247162 Remove items generator, there are better ones made in JS
This one wasn't working with newer files anyways
2023-08-12 12:23:03 +02:00
slawkens
cfbcabbfdb Fix accounts editor store_history column not found 2023-08-12 08:13:29 +02:00
slawkens
0f38a677b1 Require PHP min 8.0, older versions are EOL 2023-08-11 22:20:00 +02:00
slawkens
0835b69a93 Merge branch '0.9' into develop 2023-08-11 22:17:27 +02:00
slawkens
538723c405 Added JetBrains logo + notice, thanks for support! 2023-08-11 22:16:07 +02:00
slawkens
4f2e410a71 Merge branch '0.9' into develop 2023-08-11 22:11:47 +02:00
slawkens
a70daa8830 Add version support table + fix badges 2023-08-11 22:11:10 +02:00
slawkens
ae600da28b Merge branch '0.9' into develop 2023-08-11 21:41:18 +02:00
slawkens
d8f1bf0a50 Fix exception when monster doesn't have look defined 2023-08-11 18:52:11 +02:00
Gabriel Pedro
cfc4f3601b feat: add more tests (#229) 2023-08-11 06:40:53 +02:00
slawkens
1a533388e7 Merge branch 'develop' of https://github.com/slawkens/myaac into develop 2023-08-11 06:40:20 +02:00
Gabriel Pedro
98335b8cc0
feat: add more tests (#229) 2023-08-11 06:39:17 +02:00
slawkens
16ebc1f577 Update functions.php 2023-08-10 13:05:17 +02:00
slawkens
7bab8f033c Allow hook file to be callable 2023-08-10 13:00:18 +02:00
slawkens
42d97721bf Merge branch '0.9' into develop 2023-08-10 12:02:54 +02:00
slawkens
23266e05ed Update README.md 2023-08-10 12:02:43 +02:00
Slawomir Boczek
a72d1a3c9f
Feature: settings (#216)
* New admin panel Pages: Options + Config [WIP]

* Forgot the plugin example of options

* Rename to settings.php

* Add Settings Class

* New myaac_settings table

* Add $limit parameter to $db->select method

* Add $member var annotation

* Remove useless title_separator from config

* Move $menus to menus.php

Also fix active link when menu item has subpage

* Settings [WIP]

New Settings class
New Plugins::load() method
Move config.php to settings.php
MyAAC Settings will have plugin_name = 'core'
Add compat_config.php

* Change options.php to settings.php

* Change name to settings

* Add Settings menu

* Add Sections + Add setting($key) function

Reorganisation

* Add email + password fields as type

* Update 33.php

* add settings migration

* php 8 compatibility

* add missing hook

* Add categories in tabs, move more settings, revert back getPluginSettings

Categories and sections are now not numbered
Remove example settings plugin

* fix typo

* Update .gitignore

* Add 36th migration for settings table

* Execute migrations just after db connect

* Update plugins.php

* [WIP] Some work on settings

Add hidden settings
New method: parse, to parse settings from array
Move base html to twig template
Remove vocation loading from .xml, instead use predefined voc names

* Rename

* Fix path

* [WIP] More work on settings

Move more config to settings (mainly mail_* + some other)
Remove mail_admin, wasnt used anywhere
Add return type to some functions
Add Twig settings(key) function
Possibility to save setting to db

* Add min, max, step to number field option

* Re-enable plugin if disabled and already installed

* Add Settings menu, including all plugins with settings

One change included in previous commit, due to missclick

* Nothing important

* Better boolean detection

* More detailed error message in settings

* Lets call it settings.name instead

* Add new function: only_if, to hide fields when they are not enabled [WIP]

Not fully finished yet

* guild_management: show_if

* Hide section title on show_if

* Fix: check on page load if radio button is checked

* Add: show_if - account_mail_verify

* nothing important

* Rename team_* variables + add to deprecated

* Change variable name

* Extract Settings:save function

* Add settings.callbacks.get

* Move forum config to settings

* Move status config to settings

* Remove whitespaces

* More config to settings: account_types, genders, highscores, admin

* Move signature config to settings

* Move news config to settings

* Rename variable

* Save config.php in Settings

Egg and hen problem solved :)
* Test database connection on save settings -> prevents from making website unusable if connection is wrong
* Test server_path -> same
There is no config.php anymore, just config.local.php, which can be edited manually and also from admin panel

* Remove configs from previous commit

* Fix create account, if account_create_character_create is enabled

* Add more deprecated configs

* Add more info into comment

* Update 5-database.php

* Fix menu highlighting & opening

* Update template.php

* Enable script option

* Reword email settings + move two new settings

* add last_kills_limit + move shop

* google_analytics_id

* add mail_lost_account_interval

* Create character blocked words (by @gpedro), just moved to settings

* Fix google_analytics

* create character name config moved to settings

* Fix for install warning - min/max length

* New create character checks configurable: block monsters & spells names

* fixes

* Improve character npc name check

* New setting: donate_column + move donate config to settings

* Add super fancy No Refresh saving with a toast

* Add new possibility: to deny saving setting if condition is not met

* Move database settings to separate category

* Fix default value displaying

* Add database_hash setting

* add last_kills_limit to compat config

* Move create character blocked names down

* Every setting needs to have default

* Move rest of config to settings

Remove config.php completely
Add new settings category: Game
Fix account_login_by_email
Min textarea size = 2 + adjusted automatically
2023-08-05 21:00:45 +02:00
slawkens
c802d427eb Merge branch '0.9' into develop 2023-08-05 20:52:26 +02:00
slawkens
aacc120360 Remove deprecated utf8_decode 2023-08-05 20:52:01 +02:00
slawkens
757ec28028 Removed deprecated functions: utf8_encode & decode 2023-08-05 20:51:18 +02:00
slawkens
41fa695d8b Add some functions to compatibility layer of gesioraac 2023-08-05 20:50:33 +02:00
slawkens
b12c30982d Merge branch '0.9' into develop 2023-08-05 11:57:38 +02:00
slawkens
fcb2fc3002 Add .htaccess to .gitignore 2023-08-05 11:57:27 +02:00
slawkens
bb0e621308 Merge branch '0.9' into develop 2023-07-29 07:27:26 +02:00
slawkens
53221a9fd1 There is no more info. That never worked. 2023-07-29 07:27:07 +02:00
slawkens
d3b15a0a3e Fix multiple redirects error in browser 2023-07-22 14:46:28 +02:00
slawkens
23047aa608 Fix multiple redirects error in browser 2023-07-22 14:46:20 +02:00
slawkens
beff3e3aa6 Merge branch '0.9' into develop 2023-07-22 14:05:01 +02:00
slawkens
4a629b4418 Add protection, nothing important - thrown exception before 2023-07-22 14:03:57 +02:00
Gabriel Pedro
3c3ddc4578 feat: custom words blocked (#190)
* Update config.php

* Update validator.php

* Update config.php
2023-07-22 09:54:03 +02:00
slawkens
0788dc8848 Merge branch '0.9' into develop 2023-07-21 21:22:41 +02:00
slawkens
5791d1e7f9 Update template.php 2023-07-21 21:22:23 +02:00
slawkens
a9cb017def Fix menu highlighting & opening 2023-07-21 21:22:13 +02:00
slawkens
eaa9d6be43 Merge branch '0.9' into develop 2023-07-21 16:38:22 +02:00
slawkens
7588904372 Remove debugging var_dump 2023-07-21 16:38:10 +02:00
slawkens
712ca30293 Merge branch '0.9' into develop 2023-07-21 15:54:43 +02:00
slawkens
5fa4890b70 Add support for menu_default_color 2023-07-21 15:54:22 +02:00
slawkens
ca56b4f101 Fix menu cannot remove 2023-07-21 15:12:07 +02:00
slawkens
707aea18db Merge branch '0.9' into develop 2023-07-21 11:58:51 +02:00
slawkens
848c5c0887 Change default timezone 2023-07-21 11:58:18 +02:00
slawkens
e14df529c0 Revert some change 2023-07-19 22:40:39 +02:00
slawkens
9f67cab503 Add twig context for twig hook() function
Allows to use variables from template inside the hook file with usage of $context variable
2023-07-19 22:40:11 +02:00
slawkens
99c53c75f2 New guild hooks, for some upcoming big feature ;) 2023-07-19 22:26:47 +02:00
slawkens
df7c82c571 Fix highscores if there is only 1 record 2023-07-19 11:57:32 +02:00
slawkens
ddb093ec48 Fix highscores if there is only 1 record 2023-07-19 11:57:26 +02:00
slawkens
714476bf29 Merge branch '0.9' into develop 2023-07-13 11:08:30 +02:00
slawkens
e49690b52b Thanks @anyeor for previous fix 2023-07-13 11:03:37 +02:00
slawkens
f9d35b719b Fix: cannot create topic on this board (check wasn't working) 2023-07-11 11:17:34 +02:00
slawkens
a61cd43c3c Forum: nothing important, just formatting 2023-07-07 17:43:28 +02:00
slawkens
6d1b3235d2 Merge branch '0.9' into develop 2023-07-07 17:29:02 +02:00
slawkens
e7e9d8e3b9 Shorten some forum code about length 2023-07-07 17:20:50 +02:00
slawkens
8cf0e80019 Forum: better error messages (Suggested by @anyeor) 2023-07-07 17:20:23 +02:00
slawkens
c392fa7272 Fix guild description on guilds page 2023-07-02 13:48:57 +02:00
slawkens
082884baa0 Fix guild description not shown 2023-07-02 00:26:44 +02:00
slawkens
3a31a0326c Fix guild description not shown 2023-07-02 00:26:33 +02:00
slawkens
2d561f267d Fix guild description not shown on guilds page 2023-06-30 19:52:20 +02:00
slawkens
5eafff737a Guilds & Characters: Use CSS word-break: break-all instead of PHP wordwrap
Suggested by @anyeor
2023-06-30 19:52:05 +02:00
slawkens
8cf4d0cb0f Add word-break on forum thread & reply
When someone inserts long word, is will break into multiple lines
2023-06-30 19:43:36 +02:00
slawkens
d1953470d9 Add word-break on forum thread & reply
When someone inserts long word, is will break into multiple lines
2023-06-30 19:43:31 +02:00
slawkens
3a52f2c403 nothing important 2023-06-30 17:35:39 +02:00
slawkens
ac40922957 Merge branch '0.9' into develop 2023-06-30 17:32:40 +02:00
slawkens
5aed9ee1a4 Forum: Fix quote and edit post buttons not being shown 2023-06-30 17:30:29 +02:00
slawkens
8318169c39 Fix twig exception thrown when player does not exist 2023-06-30 17:30:01 +02:00
slawkens
ad00cf3fc3 Fix BASE_DIR when accessing /tools 2023-06-30 17:29:49 +02:00
slawkens
3ff7b21287 Move <base href> above, so it works, thanks @Leesneaks 2023-06-30 17:28:34 +02:00
slawkens
36fbae850d Revert "<base> is not working properly, use full URL instead"
This reverts commit fa015b8d39d926aa0bc3ea2f59577afa22174c51.
2023-06-30 17:28:19 +02:00
slawkens
24ff5684cd More changes to deleted characters (Account, guilds)
Account: Cannot change name, comment, gender
+ Cannot be deleted if owns a guild
Guilds: Cannot create, cannot be invited, cannot accept invite, cannot be passed leadership to
2023-06-30 17:27:31 +02:00
slawkens
aab62fb724 Important fix: Not allow create char if limit is exceeded (by @anyeor )
Could have been used to spam database, now it doesn't ignore deleted characters

He is not my brother :P Just same last name
2023-06-30 17:25:32 +02:00
slawkens
a810890614 code formatting 2023-06-30 17:25:21 +02:00
slawkens
a3bfdc1ec8 small adjustments 2023-06-25 08:54:36 +02:00
slawkens
a7dc719934 small adjustments 2023-06-25 08:54:22 +02:00
slawkens
74433303fb Better Gesior support 2023-06-23 21:52:23 +02:00
slawkens
30d62bda3b Better Gesior support 2023-06-23 21:52:11 +02:00
slawkens
cc7703766e Patching some changes from master 2023-06-19 08:05:58 +02:00
SRNT-GG
9d664d3577 WIP - Removing unneccessary closing tags to prevent potential issues. (#223)
* Part 1

Removing closing tags when no HTML or other output comes after the last PHP codeblock.

* Further removals

* nothing

---------

Co-authored-by: slawkens <slawkens@gmail.com>
2023-06-15 21:08:20 +02:00
SRNT-GG
76bfab1303 WIP - Removing unneccessary closing tags to prevent potential issues. (#223)
* Part 1

Removing closing tags when no HTML or other output comes after the last PHP codeblock.

* Further removals

* nothing

---------

Co-authored-by: slawkens <slawkens@gmail.com>
2023-06-15 21:06:22 +02:00
slawkens
7d2fc48437 Fix links to edit/delete/hide directly from page 2023-06-11 18:57:57 +02:00
slawkens
171c114b0f Fix links to edit/delete/hide directly from page 2023-06-11 18:57:52 +02:00
slawkens
b1d2ac34a2 Update branch name 2023-06-03 18:51:57 +02:00
slawkens
c7ce87c4b6 do not report if CI test 2 2023-06-03 18:50:43 +02:00
slawkens
4e22c42b10 test dump env 2023-06-03 18:50:34 +02:00
slawkens
eabe789bbb Disable reporting on CI 2023-06-03 18:50:22 +02:00
slawkens
aa1403480c Update to 0.10.0-dev 2023-06-03 18:50:14 +02:00
slawkens
91c8f1f5bc do not report if CI test 2 2023-06-03 18:41:16 +02:00
slawkens
b421bf3931 test dump env 2023-06-03 18:38:30 +02:00
slawkens
6e6f4679f4 Disable reporting on CI 2023-06-03 12:24:18 +02:00
slawkens
5bb3e57b7b Rename to .htaccess.dist
Causes problems on default setup
2023-06-03 09:04:30 +02:00
slawkens
17221f5369 Rename to .htaccess.dist
Causes problems on default setup
2023-06-03 09:04:24 +02:00
slawkens
98d4d3fcf0 Install composer deps with --no-dev 2023-06-03 06:47:16 +02:00
slawkens
82092338d6 Install composer deps with --no-dev 2023-06-03 06:47:06 +02:00
slawkens
9868b41a61 <base> is not working properly, use full URL instead 2023-06-02 15:24:14 +02:00
slawkens
c247789adf <base> is not working properly, use full URL instead 2023-06-02 15:24:10 +02:00
slawkens
48822b6561 Use Whoops only if installed, otherwise use myaac exception handler 2023-06-02 15:20:13 +02:00
slawkens
cd22f8def5 Use Whoops only if installed, otherwise use myaac exception handler 2023-06-02 15:20:07 +02:00
slawkens
0f30ebbcea change branch name in release.sh 2023-06-02 08:05:13 +02:00
slawkens
1a2e46f09b Ignore cypress in git-export + install composer deps on release 2023-06-02 08:04:17 +02:00
slawkens
52ac011556 Ignore cypress in git-export + install composer deps on release 2023-06-02 08:04:13 +02:00
slawkens
f34e5f2ac0 Release 0.9.0-alpha 2023-06-02 06:37:25 +02:00
slawkens
ca8db22639 Better news back button 2023-06-01 11:23:36 +02:00
slawkens
1846bf5255 Change button style (characters - view)
was causing issues in other templates
2023-06-01 09:57:27 +02:00
slawkens
dce0ac2f8f nothing important 2023-05-29 10:09:21 +02:00
slawkens
9cc60983d0 Update CHANGELOG.md 2023-05-29 08:55:41 +02:00
slawkens
7c2c88f780 Add Whoops exception handler (nicer debug info in dev mode)
On production = no errors
2023-05-29 08:55:26 +02:00
slawkens
7690811da3 Update install.php 2023-05-29 08:46:07 +02:00
slawkens
7dc2e404ed Fixed many links to admin panel, if ADMIN_PANEL_FOLDER is changed 2023-05-29 00:00:34 +02:00
slawkens
080ab56ea9 Update functions.php 2023-05-28 23:56:35 +02:00
slawkens
83915f080c Fixed when page is hidden 2023-05-28 23:56:26 +02:00
slawkens
2841f17729 fix images base url, uploaded by tinymce 2023-05-28 23:54:36 +02:00
slawkens
0187ba4938 New hook: HOOK_ACCOUNT_CREATE_AFTER_PASSWORD
for password strength meter
2023-05-26 22:49:24 +02:00
slawkens
bedfc0a2e0 Update bootstrap to v5.2.3 in install 2023-05-26 17:50:38 +02:00
slawkens
ea08c04963 nothing important 2023-05-26 16:49:28 +02:00
slawkens
067f2af3e5 Wait for success, then screenshot 2023-05-26 16:15:39 +02:00
slawkens
8d98306f8e optimize workflow 2023-05-26 16:12:50 +02:00
slawkens
09a045334c Update cypress.yml 2023-05-26 14:53:33 +02:00
slawkens
bc8e5fc144 Update .gitattributes 2023-05-26 14:51:33 +02:00
slawkens
77e0d28a9d Delete .travis.yml 2023-05-26 14:09:10 +02:00
slawkens
480a054f0c Fixed ADMIN_PANEL_FOLDER, can be 100% custom now 2023-05-26 14:04:52 +02:00
slawkens
26c895d475 Block access to some files [skip ci] 2023-05-26 13:51:05 +02:00
slawkens
5cbb55cfb1 Upload videos too 2023-05-26 13:11:39 +02:00
slawkens
dcb9506a1b admin is already created during install 2023-05-26 13:10:14 +02:00
slawkens
2acec4df12 bring back matrix, wasn't the issue 2023-05-26 13:05:35 +02:00
slawkens
4bd761c726 remove typo 2023-05-26 13:05:29 +02:00
slawkens
2f732b8411 wrong position 2023-05-26 13:00:26 +02:00
slawkens
5aa02055bf fix path 2023-05-26 12:58:28 +02:00
slawkens
6ed15565c8 Import TFS Schema 2023-05-26 12:55:08 +02:00
slawkens
77a2c55c87 Update cypress.yml 2023-05-26 12:50:37 +02:00
slawkens
4a9fa01eb7 Update cypress.yml 2023-05-26 12:49:11 +02:00
slawkens
bd031d8980 create database manually 2023-05-26 12:46:03 +02:00
slawkens
b76a037a94 last try to fix mysql 2023-05-26 12:22:06 +02:00
slawkens
e71daa2520 Update cypress.yml 2023-05-26 12:18:51 +02:00
slawkens
f372aeb067 Update cypress.yml 2023-05-26 12:13:23 +02:00
slawkens
ef37bbcb81 Update cypress.yml 2023-05-26 11:49:24 +02:00
slawkens
944457463e Update cypress.yml 2023-05-26 11:01:44 +02:00
slawkens
6f7f25bb46 Update cypress.yml 2023-05-26 10:54:57 +02:00
slawkens
d60d7f2250 test 5.7 mysql 2023-05-26 10:48:47 +02:00
slawkens
2b8c4b3eca test connect with root 2023-05-26 10:44:02 +02:00
slawkens
7039bda359 Update cypress.yml 2023-05-26 10:38:30 +02:00
slawkens
d346a8f73f Update cypress.yml 2023-05-26 10:27:38 +02:00
slawkens
523f2dee7c mysqlPass 2023-05-26 10:21:05 +02:00
slawkens
b33e39491b MySQL needs to be started manually 2023-05-26 10:19:13 +02:00
slawkens
317ebf4387 Update cypress.yml 2023-05-26 10:12:28 +02:00
slawkens
31ba780099 Update cypress.yml 2023-05-26 10:08:51 +02:00
slawkens
d1b30619e2 fix path to config.lua 2023-05-26 09:56:49 +02:00
slawkens
3fab52296a Update cypress.yml 2023-05-26 09:52:11 +02:00
slawkens
a6e109799a Update cypress.yml 2023-05-26 09:48:55 +02:00
slawkens
80af2cd691 cypress-workflow: config.lua move + replace values 2023-05-26 09:47:39 +02:00
slawkens
d911b55e25 Update cypress.yml 2023-05-26 09:24:49 +02:00
slawkens
eb73fc4538 try fix cypress 2023-05-26 09:19:46 +02:00
slawkens
75f77ec7a3 Fix: Run PHP Server 2023-05-26 09:11:04 +02:00
slawkens
a1d969bbfd fix env 2023-05-26 09:00:21 +02:00
slawkens
11f1ad6d76 fix path 2023-05-26 08:53:49 +02:00
slawkens
7facf0adad fix branch 2023-05-26 08:52:05 +02:00
slawkens
2b739c2b40 Add Cypress workflow 2023-05-26 08:49:28 +02:00
slawkens
269ae323e0 Add Cypress tests: install + create account 2023-05-26 08:49:04 +02:00
slawkens
0d0e5812dd Change step to $_REQUEST 2023-05-26 08:36:20 +02:00
slawkens
61c2661377 Fix warning when no header language set 2023-05-25 11:39:45 +02:00
slawkens
de710dff94 Add cypress/e2e/2-advanced-examples to .gitignore 2023-05-25 11:39:02 +02:00
slawkens
8c524171fb Add cypress.env.json to .gitignore 2023-05-25 09:31:29 +02:00
slawkens
946d24690c Update common.php 2023-05-25 09:30:44 +02:00
slawkens
bf137189c5 Update CHANGELOG.md 2023-05-15 00:22:51 +02:00
slawkens
da4e18cb69 Fixes to routing 2023-05-13 12:49:17 +02:00
slawkens
85769c1439 Empty URL = show news 2023-05-13 11:34:51 +02:00
slawkens
4d3ad4b6b9 Update jQuery to v3.6.4 and jQuery UI to v1.13.2 2023-04-19 23:15:28 +02:00
slawkens
e900a62e75 Print more info if character cannot be created 2023-04-12 12:52:14 +02:00
slawkens
c3969364aa Fix default news route if friendly_urls is disabled 2023-04-01 22:13:24 +02:00
slawkens
e9df9f10dc Add check for player_deaths columns 2023-04-01 15:11:12 +02:00
slawkens
f78f5b5361 OK, so phplint is working! 2023-03-31 10:23:10 +02:00
slawkens
c061438a35 test phplint 2023-03-31 10:21:27 +02:00
slawkens
8441dbe007 Add actions/checkout@v3 2023-03-31 10:18:48 +02:00
slawkens
e21a741a78 Use overtrue/phplint@8.2 for phplint 2023-03-31 10:17:21 +02:00
slawkens
955f437e6c test github actions 2023-03-31 09:35:05 +02:00
Matheus Collier
fd419076c2
[UPDATE] Adding monster looks to db (#220)
* [UPDATE] Adding monster looks to db

* small adjustments

add into schema.sql + change position in table

* add DEFAULT = ''

---------

Co-authored-by: slawkens <slawkens@gmail.com>
2023-03-31 09:04:13 +02:00
slawkens
7569536d56 Fix when server uses another items serializer 2023-03-26 00:27:16 +01:00
slawkens
3a6102900f fix small bug on install - please fill all input 2023-03-26 00:24:57 +01:00
slawkens
6dbc694409 Do not allow continue install when there is no server database imported 2023-03-26 00:23:50 +01:00
slawkens
7a3dcc4dc6 small fixes to account_login_by_email 2023-03-25 19:17:55 +01:00
slawkens
23393b5d3e Fix cannot go forward when config.local.php cannot be saved 2023-03-22 09:15:32 +01:00
slawkens
863f3ad510 Change from warning to error (config.local.php save error) 2023-03-22 09:15:05 +01:00
slawkens
e6d86ca280 plugins folder should be accessible from public 2023-03-15 17:51:24 +01:00
slawkens
c22e25e3d2 Update nginx-sample.conf 2023-03-06 08:26:29 +01:00
slawkens
52ffb195ec fix account/lost links 2023-02-19 08:01:02 +01:00
slawkens
92a51af638 Fix account number show 2023-02-19 07:31:51 +01:00
slawkens
d7a9158cf2 Update routes.php 2023-02-18 21:45:09 +01:00
slawkens
f0f84090d2 fix creatures post route, back button 2023-02-18 21:26:22 +01:00
slawkens
9d78a3b5cf more php 8.x compatibility 2023-02-18 21:22:54 +01:00
slawkens
2fc163af5a Update tables.headline.html.twig 2023-02-18 21:12:08 +01:00
slawkens
10be98e371 Create account.back_button.html.twig 2023-02-18 21:11:55 +01:00
slawkens
e0eb083e44 new buttons code for tibiacom template, can create button with any text 2023-02-18 21:11:35 +01:00
slawkens
e17cd78153 fix player save on tfs 1.5 with new ipv6 2023-02-18 20:57:44 +01:00
slawkens
0015f511f8 Preparation v0.9.0-alpha release (Updated CHANGELOG) 2023-02-18 13:05:53 +01:00
slawkens
f0f71c9f85 fixes 2023-02-18 09:33:04 +01:00
slawkens
0002543cca feature: Cache::remember($key, $ttl, $callback) + example usage 2023-02-18 08:53:42 +01:00
slawkens
c1096415aa Add check for tables in admin panel 2023-02-18 07:15:11 +01:00
slawkens
6625768228 Remove accounts.blocked 2023-02-18 07:14:51 +01:00
slawkens
a27f601fe8 feature: new functions: getGuildNameById + geGuildLogoById 2023-02-17 20:05:43 +01:00
slawkens
72a877d9ca Show more info about bot 2023-02-17 19:06:13 +01:00
slawkens
b7ba09a551 small fix 2023-02-17 18:48:01 +01:00
slawkens
a98cb66c53 feature: visitors counter shows now user browser, and also if its bot 2023-02-17 18:41:25 +01:00
slawkens
6785ecad1d Ignore case on plugin route method 2023-02-17 17:54:38 +01:00
slawkens
937af536b6 patch from master - long player ip caused error 2023-02-17 17:17:19 +01:00
slawkens
5487314230 preparation for guild wars 2023-02-17 17:10:01 +01:00
slawkens
51e9bb2a7f set default for optional parameter (twig functions) 2023-02-17 17:09:38 +01:00
slawkens
376bb981ae string is also spaces, lets admin that 2023-02-17 13:35:05 +01:00
slawkens
ed9d78d2f3 Fixes for config.account_create_auto_login 2023-02-17 13:15:13 +01:00
slawkens
3c4e50dbda formatting 2023-02-16 11:24:19 +01:00
slawkens
523f9dd95a New hook: HOOK_ACCOUNT_CHANGE_PASSWORD_POST 2023-02-16 11:24:00 +01:00
slawkens
a43742c8b1 rename hook 2023-02-16 11:22:12 +01:00
slawkens
c49e4fd63d add hook for disable accounts edit for next.my-aac.org (security) 2023-02-16 11:07:00 +01:00
slawkens
905cce7021 Update mailer.php 2023-02-16 10:53:15 +01:00
slawkens
7a49b5dedc Disable add php pages in admin panel for security. Option to disable plugins upload 2023-02-16 10:53:06 +01:00
slawkens
3a2870a6bb 760 is correct permission 2023-02-16 10:06:08 +01:00
slawkens
9a475f2c57 fix for othire where size is saved in houses.tiles 2023-02-16 08:44:17 +01:00
slawkens
58598742e8 change spaces to tabs 2023-02-16 08:43:21 +01:00
slawkens
d04e44f52f add info which plugin is going to be uninstalled 2023-02-16 07:21:38 +01:00
slawkens
c7ec1f44e9 Option to enable/disable plugin by renaming file + cleanup
new function: getAllPluginsJson
removeComments removed - json doesnt allow for comments anyway
2023-02-16 06:57:46 +01:00
slawkens
3ed9a5d3d8 add hook: HOOK_GUILDS_AFTER_INVITED_CHARACTERS, for guild wars 2023-02-16 05:16:22 +01:00
slawkens
61285b6b8c small fix to routes with string 2023-02-15 17:32:48 +01:00
slawkens
d17c547bca add $params as optional parameter to hook twig function 2023-02-15 17:12:56 +01:00
slawkens
7bc20b0993 change spaces to tabs 2023-02-15 17:12:30 +01:00
slawkens
6c4b3dea96 Delete autoload.php 2023-02-15 08:06:57 +01:00
slawkens
6ae1bf5814 Add missing header to some files 2023-02-15 08:06:08 +01:00
slawkens
8503135ce0 add some notice 2023-02-14 23:22:17 +01:00
slawkens
590fe0762d small fixes 2023-02-14 22:03:22 +01:00
slawkens
d565b90736 Update accounts.php 2023-02-14 21:51:54 +01:00
slawkens
c88156802a fix pages not found 2023-02-14 21:51:46 +01:00
slawkens
7d8dbcbde7 fixes to account number part 3 2023-02-14 19:40:55 +01:00
slawkens
66ec66b291 Allow TinyMCE to resize horizontally and vertically 2023-02-14 18:47:56 +01:00
slawkens
fc0eb0e793 add missing hook 2023-02-14 18:40:46 +01:00
slawkens
ed7e9e1eae fixes to account number part 2 2023-02-14 18:40:31 +01:00
slawkens
8985917a96 Fixes to account number 2023-02-14 18:28:31 +01:00
slawkens
3a3411c117 New hooks for admin page, for head, body, and before_page
+move LOGIN_POST to correct place
2023-02-07 16:27:02 +01:00
slawkens
1166ddfe87 Remove google recaptcha from code
will be included as plugin. This allows for custom recaptcha's
2023-02-07 15:20:24 +01:00
slawkens
574e361f90 fix warning 2023-02-07 12:03:18 +01:00
slawkens
f3745a2752
Feature/new router (#165)
* Remove unneeded escape

* Fix guild back buttons (change logo & motd)

* small adjustment in news.php

* Fix create character when admin (any case is allowed now)

* Fix forum table style (boards & thread view)

* Small improvement to plugins.enabled check

* [WIP] nikic/fast-route implementation

I will describe it more in Pull Request

* Optimisations & fixes.

* Fix path - should not be absolute

* Add PLUGINS to Twig path

* Don't hide "Install Plugin" Box by default

* Update package-lock.json

* nothing important, just early exit & fixes

Fix creature display

* fix premium_ends_at for tfs 1.3+

* Move pages

* Move pages tbc

* $db->select: make $where parameter optional, allows to get all records

* Add some error box to error

* fix parse error

* Rewriting the router v2

To be more flexible

* small fixes

* fix & add admin icons

* Move mass_* pages to correct folder

* fix logout hook 2

* Delete accountmanagement.php

* This code wasn't used

* Add missing var

* Add redirect_from && redirect_to to router options

+ Also add * for all methods shortcut

* Remove comments

Not allowed in normal json

* Allow admin pages included into plugins dir

* block access to some files

* Fix admin logout

* Fix #178

* feature: mail confirmed reward

Suggested by @EPuncker

# Conflicts:
#	system/hooks.php

* remove misleading comment

* adjust required version according to composer.json

* fix duplicated word

* Adjustments & fixed to mass actions

* Add password confirm, and change text type to password

* Add list of Open Source Software MyAAC is using

* Fix signature

* Show First, Second instead of numbers

* fix base dir detection

* fix double ACTION define + undefined URI in template

* new function> escapeHtml + fix css in admin menus

* fix changelog add

* fix news adding, rename const to NEWS_*

* Add verify to pages, add messages, limits, fix add

* fix "Please fill all input"

* add required input to admin pages

* shorten some expressions with ??

* shorten code + fix conversion (int)

* Move account_types to config, account.web_flags to common.php

* Update example.json

* feature: router aliases

* shorten some code + const convert

* remove wrong char

* fix signature on custom basedir

* fix: mass teleport position validation (#214)

* fix: mass teleport position validation

* fix: max position

* Fix execute in CLI

* fix warning in reload cache in dev mode

* Configurable admin panel folder

* feature: plugin require more options with comma

* $config_account_salt -> USE_ACCOUNT_SALT

* fix forum show_thread

* Update show_thread.php

---------

Co-authored-by: Gabriel Pedro <gpedro@users.noreply.github.com>
2023-02-07 11:41:05 +01:00
slawkens
a2fb9a183b add some notice 2023-02-02 21:22:50 +01:00
slawkens
295c5de0d6 change spaces to tabs 2023-02-02 21:21:05 +01:00
slawkens
d4650afa0e increase increase max file upload for nginx 2023-02-02 21:20:22 +01:00
slawkens
07da4ca028 Update twig to v2.0 2023-02-02 20:52:27 +01:00
slawkens
feffdd1837 fix logout hook 2023-02-02 20:52:16 +01:00
slawkens
979532d3df Display warning if file included by hook does not exist 2023-02-02 20:51:55 +01:00
slawkens
3c77c54c8e my fault 2023-02-02 18:55:16 +01:00
slawkens
74d013049d Made so it's possible to configure more directories as constants
More flexibility for the user.
2023-02-02 18:53:56 +01:00
slawkens
708aa2d72f Just save images into images/editor 2023-02-02 18:29:41 +01:00
slawkens
dd6581f7f7 Update .gitignore 2023-02-02 16:24:34 +01:00
slawkens
8c801dddec PHP 8.1 compatibility 2023-02-02 16:16:06 +01:00
slawkens
9de8145f82 TineMCE refactoring
Unified all tinyMCE instances used across AAC, now they are initiated in one single file
+ added option to upload images within editor (CTRL-C CTRL-V)
+ there is new folder: user/, which will be used for all user generated data, like image uploads, guild images, etc.
2023-02-02 15:41:33 +01:00
slawkens
77460b0832 Revert "Fix compatibility with PHP 8.1"
This reverts commit 1d1e927d56302e6d21cb51203eee7ad43b89b38d.
2023-02-02 15:39:20 +01:00
slawkens
1fb1fb3ae9 Update tinyMCE to v6.3.1 2023-02-02 15:01:56 +01:00
slawkens
1d1e927d56 Fix compatibility with PHP 8.1 2023-02-02 11:17:48 +01:00
slawkens
036abf83e5 Change GoogleReCAPTCHA.php to require_once
because conflicts with account_create_auto_login
2023-02-01 22:58:31 +01:00
slawkens
e737cf612c fix recaptcha v2-checkbox & v3 2023-02-01 22:54:35 +01:00
slawkens
78622fb47a set ACCOUNT_NUMBER_LENGTH = 8, is more reasonable 2023-02-01 22:53:57 +01:00
Gabriel Pedro
9560494ab0
feat: mounts load from xml (#211) 2023-01-19 20:47:00 +01:00
Gabriel Pedro
8aac3ec2e5
fix: add missing $use_datatable (#210)
* fix: datatables

* fix: datatables
2022-12-07 08:37:35 +01:00
Gabriel Pedro
269ca501f1
feat: mass account tool, mass teleport tool (#209)
* feat: mass account coins, premdays, points. mass teleport town, position

* fix: tab
2022-12-01 08:34:30 +01:00
Gabriel Pedro
20638f430a
feat: add hook admin menu (#208)
* feat: add hook admin menu

* fix: removing menu sort

* feat: menu order property

* fix: menu order value

* feat: add main menu order
2022-11-28 18:05:08 +01:00
slawkens
acb551c5b0 Merge branch 'feature/recaptcha-v3-plus-login' into develop 2022-11-28 12:54:34 +01:00
slawkens
44a6400fcf protect this from direct execution 2022-11-28 12:52:03 +01:00
slawkens
847c3db625 Update templates.header.html.twig 2022-11-28 12:49:30 +01:00
slawkens
f30181d485 Merge branch 'develop' into feature/recaptcha-v3-plus-login 2022-11-28 12:46:32 +01:00
slawkens
118e8c487e Fixes for racaptcha 2022-11-28 12:41:29 +01:00
slawkens
c73e476e88 Reverted support only for recaptcha v3
v2 & v3 are now both supported
2022-11-28 12:36:23 +01:00
slawkens
ac5b864ea9 Small fixes 2022-11-28 12:26:34 +01:00
Gabriel Pedro
42d531838c
feat: github actions phplint (#206)
* feat: php linter on pull requests

* test: breaking code

* Revert "test: breaking code"

This reverts commit 9d385a3421b3e2c72a5c7341bcd387663595c699.
2022-11-24 08:19:09 +01:00
slawkens
2321cf84b0 patch changes & fixes from master branch
remove VERSION file
update rules
add 33 migration
add get_version_for_release.sh script
update schema
add use_character_sample_skills
2022-11-07 09:10:19 +01:00
slawkens
a570363fe0 Update README.md 2022-11-07 09:07:32 +01:00
slawkens
616b8eb61a some not-important changes 2022-10-28 17:16:17 +02:00
slawkens
e1d486c8c8 Add vocation into getTopPlayers 2022-10-28 14:41:59 +02:00
slawkens
b841c9f631 Fix typo in br locale 2022-10-28 14:41:43 +02:00
slawkens
e6c72efd18 Add more client versions 2022-10-28 14:41:28 +02:00
slawkens
9693fd260c Update account.change_mail.html.twig 2022-10-28 14:41:14 +02:00
slawkens
717b5fdd15 Add compat Gesior classes
To allow more custom pages be used with myaac
2022-09-27 10:06:03 +02:00
slawkens
32cf487128
Feature/recaptcha v3 plus login (#202)
* [WIP] New GoogleReCAPTCHA code
Support for v3
v2-invisible doesn't work yet

* Add some notice about recaptchas versions

* Lets support only ReCaptcha v3

Too much mess ;)

* Fixes
2022-08-31 11:16:48 +02:00
slawkens
a9941dea8a Fixes 2022-08-29 19:04:47 +02:00
slawkens
5c9737f281 Merge branch 'develop' into feature/recaptcha-v3-plus-login 2022-08-28 18:28:10 +02:00
slawkens
87a98531d9 Lets support only ReCaptcha v3
Too much mess ;)
2022-08-28 18:13:34 +02:00
slawkens
6d142dcbfe Merge branch 'develop' of https://github.com/otsoft/myaac into develop 2022-08-26 14:05:03 +02:00
slawkens
90f00e9960 Merge branch 'feature/login-by-email' into develop 2022-08-21 16:00:45 +02:00
thatmichaelguy
8711e178e9 Update change_rank.php (#194) 2022-07-04 16:54:19 +02:00
davi costa
eb28b38709 fix guild invite page (#196)
* fix guild invite

* removing var_dump

* sending error
2022-07-04 15:37:49 +02:00
slawkens
afea618867 Optimize code (account number generation)
Thanks kamil-karkus for suggestion
2022-05-31 15:13:59 +02:00
slawkens
0abb9384a6 Fix: create account by email
Now you can at least create an account if account_login_by_email is enabled :)
2022-05-31 15:09:48 +02:00
slawkens
2563583f84 Merge branch 'develop' into feature/login-by-email 2022-05-31 12:25:26 +02:00
slawkens
6acbbe3fa1 patch some changes from master (character name validate) 2022-05-31 12:22:55 +02:00
slawkens
6c157f3f6c Comment useless log line 2022-05-31 10:09:05 +02:00
slawkens
c4737eca72 Update login.php for latest TFS 1.x and otservbr
Works in both.
Thanks for Znote for rfc6238 lib.
2022-05-31 10:08:52 +02:00
thatmichaelguy
5428f5e2cf Update change_rank.php (#194) 2022-05-31 10:08:22 +02:00
slawkens
7d6d77cfbc 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-05-31 10:08:10 +02:00
slawkens
87eacd17c5 Add tables.headline
For future reference
2022-05-31 10:07:47 +02:00
slawkens
dd4420dcfd <div> should not be inside of <table> element 2022-05-31 10:07:35 +02:00
slawkens
b8843a29eb Revert "Include tinymce with NPM"
This reverts commit cedcd14550caa359af6b3246c6b416ee55e3e3e6.
2022-03-16 17:27:30 +01:00
slawkens
a12262df55 Add tables.headline
For future reference
2022-03-16 14:30:39 +01:00
slawkens
091828e8f1 Add php_sessions to .gitignore 2022-01-14 19:41:11 +01:00
slawkens
8bca099037 Fix typo 2022-01-07 08:32:18 +01:00
slawkens
a43d641b5f Fixes (config.news_author, group_name|capitalize) 2022-01-02 07:32:15 +01:00
slawkens
46c058df25 Save php sessions in myaac dir
Instead of default PHP location
This fixes problem with permissions
2021-12-28 07:36:38 +01:00
slawkens
fa7c6497e6 Replace define with const 2021-12-27 21:21:24 +01:00
slawkens
82b41d4df5 Add browsehappy code 2021-12-22 07:03:34 +01:00
slawkens
fd2c2d552a Merge branch 'feature/admin-bar' into develop 2021-12-04 21:36:11 +01:00
slawkens
78ae456b45 Finish admin-bar
New ideas welcome. Please open an issue or contact me
2021-12-04 21:34:26 +01:00
slawkens
7e5528b7e1 Merge branch 'develop' into feature/admin-bar 2021-12-04 20:43:00 +01:00
xitobuh
a97f55e189
Add filters (#161)
Added this in what seemed like an empty table above the list. Untested but should work, please elaborate as you see fit
2021-10-28 21:42:33 +02:00
slawkens
50dd65c6de Fix eslint warnings 2021-10-23 15:00:52 +02:00
slawkens
16aeb12111 Comment unused variable 2021-10-23 15:00:30 +02:00
slawkens
96a7c43cb5 Delete cookies.js
was unused
2021-10-23 14:32:42 +02:00
slawkens
ee20ee2ecd Add contributors to credits 2021-10-23 14:25:46 +02:00
slawkens
efdd156d5e Bump twig version to latest release in 1.0 branch 2021-10-23 14:07:14 +02:00
slawkens
be41023005 Bump required PHP Version to ^7.2.5 || ^8.0 2021-10-23 13:59:38 +02:00
slawkens
d143f05bb1 Reorder requirements in composer 2021-10-23 13:57:17 +02:00
slawkens
fdc229b196 php gd extension is optional, so removing it from composer.json 2021-10-23 13:55:24 +02:00
slawkens
f6a5552296 Reorder checks 2021-10-23 13:54:31 +02:00
slawkens
62a4b4d3ec php extension zip is optional now 2021-10-23 13:52:34 +02:00
slawkens
ef24d6739a adjust EditorConfig for composer & npm 2021-10-23 13:35:43 +02:00
slawkens
1831198349 Revert "Adj."
This reverts commit ddf764e3086e830f8c0e8c06ccac3e4ec3dc1413.
2021-10-23 12:15:30 +02:00
slawkens
ddf764e308 Adj. 2021-10-23 11:57:49 +02:00
slawkens
988c757ca6 Small adjustments 2021-10-23 11:46:15 +02:00
slawkens
cedcd14550 Include tinymce with NPM
One will need to run: "npm install" as from now
More info here: https://nodejs.dev/learn/an-introduction-to-the-npm-package-manager
2021-10-23 10:23:37 +02:00
slawkens
0ff290f868 Update .gitignore 2021-10-23 09:52:11 +02:00
slawkens
1764ce0519 Fix: undefined variable notice on database_log enabled 2021-08-30 16:16:33 +02:00
slawkens
f3b49d7cba Experimental: change player_deaths entries on name change 2021-08-30 16:16:13 +02:00
slawkens
6d19d69d20 Fix some undefined notice 2021-07-05 17:15:48 +02:00
slawkens
9ad367370a Support for downgraded TFS 7.72 (with accounts.number)
Part 2
2021-06-09 01:54:22 +02:00
slawkens
eb091e487d Support for downgraded TFS 7.72 (with accounts.number)
Part one
2021-06-09 01:54:05 +02:00
slawkens
a5ccc794bc Add exception class to whoops screen 2021-06-09 01:46:08 +02:00
slawkens
1427dc3ede Move MyAAC table detection to proper place 2021-06-09 01:45:38 +02:00
slawkens
e47bb11883 Suggest account number option 2021-06-09 01:01:18 +02:00
slawkens
6f3ba9c34b Merge branch 'develop' into feature/login-by-email 2021-06-09 00:08:13 +02:00
slawkens
0f3d2424ce Fix release.sh (some warning) 2021-06-08 23:18:31 +02:00
slawkens
8ecd8a10c0 Remove unneeded escape 2021-06-08 19:19:12 +02:00
slawkens
3cc3e3a8e9 Fix guild back buttons (change logo & motd) 2021-06-08 19:19:02 +02:00
slawkens
be1086bcba small adjustment in news.php 2021-06-08 19:18:45 +02:00
slawkens
f9abe9a8e3 Fix create character when admin (any case is allowed now) 2021-06-08 19:18:25 +02:00
slawkens
632ecb6d20 Fix forum table style (boards & thread view) 2021-06-08 19:18:13 +02:00
slawkens
db554df041 Small improvement to plugins.enabled check 2021-06-08 19:18:01 +02:00
slawkens
7300e4f1ad Cleaning unused variable 2021-06-08 07:44:16 +02:00
slawkens
9b84532e57 Reformatting code (moving javascript to own file) 2021-06-08 07:43:06 +02:00
slawkens
14870d74df This was wrong.. 2021-06-08 07:41:28 +02:00
slawkens
9c7794fe13 Reformatting code 2021-06-08 07:29:04 +02:00
anyeor
d9526d4021 Update 404 response (#163)
Updating for new SPL standard.
2021-06-05 05:19:00 +02:00
slawkens
454e09ec3d Use reference instead of new array 2021-05-23 22:59:49 +02:00
slawkens
c687f64ced Fix color style for different templates 2021-05-23 03:14:17 +02:00
slawkens
80623580f2 Fix creating account if $npcCheck is enabled 2021-05-23 02:55:27 +02:00
slawkens
135f393fc4 Change team page title 2021-05-23 02:54:33 +02:00
slawkens
e03da2876c Fix forum boards white color style
So it works on all templates
2021-05-23 02:53:57 +02:00
slawkens
44fff9dcd1 Merge branch 'develop' into feature/admin-bar 2021-05-01 15:04:04 +02:00
slawkens
02f993baea feat: Login By Email 2021-05-01 10:16:43 +02:00
slawkens
f9302d4f9d Require Parsedown class through composer 2021-05-01 08:54:46 +02:00
slawkens
780f8d193f bcsub is not needed here
bcmath module is not required anymore
2021-05-01 01:21:11 +02:00
slawkens
4e85f857a4 Fix #158 Thanks @Misztrz 2021-05-01 01:04:42 +02:00
czbadaro
ea035136e1 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>

(cherry picked from commit 9d7854dda62468e420c26a6e531bacf47351f499)
2021-04-23 01:14:32 +02:00
Lee
9d8f398d9f update validator name check
-added character_name_npc_check to config.php
-added npc name check to validator
2021-03-09 23:42:21 +00:00
Lee
31f0050f4e Admin - Dataloader updates
-Npc Lib added
-Admin Dataloader updated to load NPC names into a cached array.
-Spinner Updated to a loading button.
2021-03-09 23:38:23 +00:00
Lee
7ce005341e Twig filter (timeago)
Added twig filter timeago for dates.
2021-03-09 23:17:24 +00:00
slawkens
84447ef178 Remove unsupported versions from travis 2021-02-23 23:22:03 +01:00
slawkens
b99d3b4960 Forgot this 2021-02-23 18:57:03 +01:00
slawkens
0fc64478e0 PHP 7.1 is now required
Older versions are outdated anyways
2021-02-23 15:15:34 +01:00
slawkens
e7a3d563aa Update .travis.yml
(cherry picked from commit 856507fb66cad5d243ed755f387df891affb3ed8)
2021-02-16 01:41:00 +01:00
slawkens
bda020ef93 Attempt to fix travis build
(cherry picked from commit d019fbc050211fe8a3473f8cf473a750944166d1)
2021-02-16 01:40:55 +01:00
slawkens
f0c136c421 More fixes for PHP 8.0 2021-02-16 01:40:24 +01:00
slawkens
5fa1321619 Fixes to database version and monsters table 2021-02-16 01:12:45 +01:00
slawkens
792ec17d18 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 00:56:25 +01:00
slawkens
19ffd57b34 Minimum PHP 5.6 is now required (composer part) 2021-02-16 00:32:16 +01:00
slawkens
ebda456862 Minimum PHP 5.6 is now required 2021-02-16 00:31:13 +01:00
slawkens
5bd5aa0edf Fix compatibility with PHP 8.0 (latest XAMPP)
Solution by doctrine developers
2021-02-16 00:28:54 +01:00
slawkens
6b07d56627 Fix setPremDays for latest TFS
Fixes editing account in admin panel
2021-02-15 21:05:08 +01:00
slawkens
15d381adfd Fixed account getPremDays() function for latest TFS
This fixes account management + signature
2021-02-15 20:57:24 +01:00
Lee
23b44d6c8a #142 Guildnick fix
Fixes the Guildnick not showing in the guild pages.
2021-02-14 12:50:10 +00:00
slawkens
e3f2abc06e Fix parsing empty strings in config.lua (with comments)
(cherry picked from commit eed490507c83518812451e0ba50b23d5a2914ab0)
2021-02-13 22:57:11 +01:00
slawkens
3d73de13d8 Fix headling.php cannot find font 2021-02-13 22:34:46 +01:00
slawkens
71f7bb2e75 Fix typo 2021-02-13 22:07:54 +01:00
slawkens
ebe900fca8 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:53:40 +01:00
slawkens
5a8bcec014 Fix installer choosing name, when config.php is not loaded yet
It has been almost 1 month there, seems no one is using develop branch ;)
2021-02-13 21:44:49 +01:00
Lee
a1c7c2768c Delete char with house #149
oops, didn't mean to submit that last push, I hadn't added the empty check. (noob moment)
quick fix for #149
2021-02-02 14:42:30 +00:00
Lee
565e6e3a3d Delete char with house #149
Patch to stop players deleting themselves if they have a house
Fixes #149
2021-02-02 14:13:36 +00:00
slawkens
855e9aa3b9 Fix: do not count deleted characters
On create new character page
2021-01-20 19:46:07 +01:00
slawkens
a271edec47 Forgot this.. 2021-01-20 18:03:30 +01:00
slawkens
81b293a5a6 Fixes to character name validation
Admin should be able to create any name
Also fixes to config.character_name_min_length being ignored
2021-01-20 18:02:07 +01:00
slawkens
8b41e144f8 Open/Closed Website Status now changes dynamically 2021-01-18 02:17:39 +01:00
slawkens
a41f653e05 Move Admin module statistics to Twig 2021-01-18 02:00:46 +01:00
slawkens
f24ff295e8 Add alt="icon"
Don't like those warnings in IDE :P
2021-01-18 01:48:21 +01:00
slawkens
b399bee3ac Cancel button should return to menus main screen 2021-01-18 01:47:56 +01:00
slawkens
8f88c82a13 Add "table-responsive d-md-table" class
Makes tables in admin panel responsive
2021-01-18 01:47:11 +01:00
slawkens
d8ac88b7d9 Add more clients to clients.conf.php 2021-01-18 01:45:52 +01:00
slawkens
443c5a80b4 Add ext-dom to composer.json 2021-01-17 20:10:21 +01:00
slawkens
ba56ef5e33 Add some badges to README.md
(cherry picked from commit d3850280f431f9d0b513cdb5bf8b72dbc5d2ddbb)
2021-01-17 17:45:32 +01:00
slawkens
b24370e7ed Fixed the check if vocations.xml were correctly loaded 2021-01-17 17:44:30 +01:00
slawkens
b2b0b31168 Remove facebook.js, replace with direct live link
This fixes some console errors
2021-01-07 23:37:47 +01:00
slawkens
1e969f8d8a Update index.php 2021-01-07 22:43:25 +01:00
slawkens
bca098e074 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:15 +01:00
slawkens
98bd51436b Unified naming 2021-01-07 11:47:57 +01:00
slawkens
1fa4b1e660 Remove some useless maxlength attribute 2021-01-04 22:06:50 +01:00
slawkens
04a36b1d11 Rename to Recovery Key 2021-01-04 22:06:26 +01:00
slawkens
611d6f505d Add option to send mail to account with Mailer
"Send Mail" link next to Email input in account editor
2021-01-04 21:34:52 +01:00
slawkens
62b485abf9 Update .gitignore 2021-01-04 19:28:18 +01:00
slawkens
61eae7d7c4 Add ./login.php to .gitignore 2021-01-04 19:17:30 +01:00
slawkens
af161b5143 Fix: PHPMailer is included through composer now 2021-01-04 19:17:07 +01:00
slawkens
d5880eac8c Use BASE_URL instead of template_path for icons
Cause they are located in images/news folder
2021-01-04 16:35:01 +01:00
slawkens
02d6ab5fe7 Add lastCheck full date to Server Status panel 2021-01-04 16:32:25 +01:00
Lee
5547ccffd6 Twig updates
Moved non-global functions from twig back into PHP.
2021-01-04 13:11:18 +00:00
Lee
8c06bd1738 function Truncate added
missing function added to functions lib.
2021-01-04 12:42:13 +00:00
Lee
469a8c1017 AdminPanel - Template Fix
Fixed a bug with $status['online'] not being filled and showing invalid badge due to error.
2021-01-04 12:24:23 +00:00
Lee
bb3602073c AdminPanel updates - changelog
-Admin menu updates
-Moved getchangelogtype/where to functions file and added to twig
-Added changelog editor to admin panel and updated changelog page
-Renamed the changelog md reader to clmd and edited the version file.
2021-01-04 12:23:36 +00:00
slawkens
6c6af59b22 Add ext-gd to composer.json 2021-01-04 08:27:45 +01:00
slawkens
a8a36c73e6 Fix notice about premend 2020-12-30 00:27:42 +01:00
slawkens
98b1d854f9 Refactor some line 2020-12-30 00:24:14 +01:00
slawkens
1ada2317fd Add support for accounts.premium_ends_at (Latest tfs 1.x) 2020-12-30 00:10:49 +01:00
slawkens
40722c8c30 Password can now contain any characters
Also added limit of 29 characters (client limitation)
2020-12-30 00:10:11 +01:00
slawkens
ff9e255f1b On prod it won't display any PHP errors
As suggested by PHP Manual
2020-12-29 22:11:40 +01:00
Lee
fbe9c31d10 config update
renamed and cleaned up the settings names for easier comprehension
2020-12-29 17:50:10 +00:00
Lee
0aed705a6a migration 31 fix.
Some mysql dbs won't allow text to have a default value.
2020-12-29 17:43:17 +00:00
Lee
06e864c954 added between()
Added missing function from creature update.
2020-12-29 17:36:16 +00:00
slawkens
1d68d013df Add json as required extension 2020-12-29 15:00:06 +01:00
Lee
8e6bc73ca6 Creature page overhaul
Updates the creature pages to show more information.
You will need to reload your creatures.
-modifies database with migration 31
-small customisations are allowed via config file.
-functions added, getMonsterLink, getItemRarity, getCreatureImgPath, left, right,
-added functions to twig.
-view elements, immunities, summons, voices, loot, pushables, canpush, canwalk, runonhealth,hostile,attackable,rewardboss,defense,armor
-filter bosses
-show list as picture preview or names list
2020-12-28 16:37:03 +00:00
Lee
7e0fded595 gitignore functions_custom
Adds system/functions_custom.php to the git ignore list.
2020-12-28 16:24:25 +00:00
Lee
c8443228fb Allow template pages
Checks if page exists in template directory and loads that page first instead of system/pages/
This allows users to make their own changes without modifying the original files for when doing updates.
2020-12-28 16:22:41 +00:00
slawkens
64fe0062ee
Merge pull request #146 from fernandomatos/template/tibiacom
Fixes and improvements at template's network box
2020-12-26 23:33:44 +01:00
Fernando Matos
3b78516ef2
Add SSL on external image requests of items and outfits (#145) 2020-12-26 23:32:17 +01:00
Fernando Matos
8f345126f7 Add conditional script loading for social networks 2020-12-26 18:30:26 -03:00
Fernando Matos
daaa472dfe Remove unnecessary top player retrievement at network box 2020-12-26 18:14:36 -03:00
Fernando Matos
87f35da3b6 Fix network box showing without social networks specified 2020-12-26 18:04:22 -03:00
Fernando Matos
6f42a60e59
Add a brand new charming installation (for version 0.9) (#144)
* Add a brand new charming installation

* Fix alert position in setup requirements validation

* Add some missing definitions

* A distinction between bootstrap CSS classes and myaac classes

For CSS-styled messages

* Remove unused functions for messages

Co-authored-by: slawkens <slawkens@gmail.com>
2020-12-22 07:47:47 +01:00
slawkens
3beedc1747 New configurable: outfit_images_wrong_looktypes 2020-12-21 01:59:32 +01:00
slawkens
6603815a81 Update bans.php 2020-12-21 01:54:17 +01:00
slawkens
c1027d3663 Fixes on new highscores
Fixed link to next page on first visit default highscores
Fixed position of "No records yet."
Also count pages is starting from 1 now (not from 0 like before)
2020-12-21 01:54:00 +01:00
slawkens
6cec5ba5bf Add required extensions and PHP version to composer.json 2020-12-20 12:13:13 +01:00
slawkens
d70b70b63c Update .editorconfig 2020-12-20 12:12:41 +01:00
slawkens
7d73e3cd98 Refactor code in delete_character.php 2020-12-19 23:25:46 +01:00
slawkens
5087fc4a00 You cannot delete character more than twice (Thanks Okke)
(cherry picked from commit 7fd784b2f615d87a028f2e1d90ec99fd67acb576)
2020-11-24 18:12:49 +01:00
Lee
30cdb1ba73 Dashboard modules updated
More flexibility and additions on the dashboard modules.

-Statistics: Accounts, Players, Monsters, Guilds, Houses
-Website Status: Maintenance
-Server Status: name, client, map, monsters loaded, MOTD,

default:
'admin_panel_modules' => 'statistics,web_status,server_status,lastlogin,created,points,coins,balance',
2020-11-07 14:36:12 +00:00
Lee
0f6612904e Updated Admin
Updated the frameworks to latest git versions
-AdminLTE v3.1.0-pre
-Bootstrap v4.5.2
No major changes just bug fixes
2020-11-07 14:13:20 +00:00
Lee
e5b5b4d3ef Template update
Adds server name to the side menu, this hides when the side menu collapses.
2020-11-07 13:56:59 +00:00
Lee
9bc63bb55c Datatables update
I noticed if the datatables files wasn't cached some pages that didn't use it would take slightly longer to load whilst it downloaded it.
This will only write the js and css files onto the page if $use_datatable = true;  is set on the page.
See accounts/news/players pages for examples.

It wasn't a massive performance loss for the user but not needed if those pages are hardly ever used.
2020-11-07 13:53:11 +00:00
Lee
dcf83d5608 Update functions.php
Moved to bottom of the page so users can call functions code from custom_functions.
2020-11-06 14:42:13 +00:00
Lee
8fe82bb5c0 adminmenus update
moved visitors links to the logs section.
2020-11-06 14:20:34 +00:00
Lee
6f74029d76 Update spells.php
$canEdit was removed in a previous git.
Removing this fixes the error.
2020-11-06 14:18:08 +00:00
Lee
01e3d366ba Update admin.menus.js.html.twig
replaced del.png with a font awesome icon to go with the style of the rest of the icons on page.
2020-11-06 14:17:40 +00:00
Lee
41d5b4a22f Update basic.css
edited focus as browsers are displaying a thick black line. this is now a thing dotted outline.
2020-11-06 14:17:19 +00:00
Lee
7814636caf Added custom_functions file
Added a custom functions file for users to include any of their custom functions.
2020-11-06 14:16:54 +00:00
slawkens
cf2c5e36bc
Feature/better highscores (#141)
* Move highscores to twig

* Add highscores frags for TFS 1.x

* Change $config to config()

* Cache highscores

The most asked and long awaited feature? :>

* Fix highscores_per_page and rename configurable

* Fix next page link (some typo)

* Fix too many players being shown

* Fix when changing config.highscores_per_page

* Update system/pages/highscores.php

Co-authored-by: whiteblXK <krzys16001@gmail.com>

Co-authored-by: whiteblXK <krzys16001@gmail.com>
2020-11-02 23:34:29 +01:00
slawkens
5d5875d540
Bans page working for TFS 1.x + move to Twig (#140)
* Bans page working for TFS 1.x + move to Twig

* Remove some debug code

* Add some protection

* Better check.
2020-10-30 06:52:50 +01:00
slawkens
95c2adc02e Remove twig, phpmailer & semver 2020-10-27 07:35:00 +01:00
slawkens
73f1ba10f9 Use composer for some libraries (twig, phpmailer, semver) 2020-10-27 07:34:05 +01:00
slawkens
9fe419cfe7 Creatures and monsters are now reloaded in Admin Panel 2020-10-27 07:33:21 +01:00
slawkens
41e24ca535 Remove .gz extension if found in map file 2020-10-27 07:25:38 +01:00
slawkens
42a628731d move characters link to twig 2020-10-27 07:24:21 +01:00
slawkens
2ba702df21 Update .editorconfig 2020-10-26 23:44:25 +01:00
slawkens
0171962306 SET @myaac_database_version in schema.sql 2020-10-24 05:40:58 +02:00
slawkens
2daa42e124 Add accept=".zip" to plugin upload file 2020-10-24 05:30:04 +02:00
slawkens
abfd2c94f5 Move template_header and change_template to twig 2020-10-18 06:54:54 +02:00
slawkens
fd51fa7779 Add some notice about recaptchas versions 2020-10-16 20:28:05 +02:00
slawkens
1a36aa8904 [WIP] New GoogleReCAPTCHA code
Support for v3
v2-invisible doesn't work yet
2020-10-15 19:55:12 +02:00
slawkens
881a28138a More compress .png 2020-10-15 08:09:40 +02:00
slawkens
26fb1698b8 Compress .png files (Almost 40% savings) 2020-10-15 07:59:48 +02:00
slawkens
13d7dd98bd Remove unused files 2020-10-15 07:53:24 +02:00
slawkens
672a9f1712 Remove unused files 2020-10-15 07:37:32 +02:00
slawkens
2e560ac081 Added some var annotations 2020-10-14 13:11:03 +02:00
slawkens
39d1127cf1 You can now disable status checking for testing purposes
Useful for local testing when there is no server running
2020-10-14 13:10:22 +02:00
slawkens
13586e664f config.status_timeout can be floating number 2020-10-14 13:08:39 +02:00
slawkens
6e6db543f7 Compress background-artwork.jpg (from 534 KB to 275 KB)
Without losing the quality
2020-10-14 13:07:46 +02:00
slawkens
ea8ae2372e This is better inline solution to not displaying Admin Menus
by @Leesneaks
2020-10-12 22:46:44 +02:00
slawkens
928de13459 Fix two boxes being show on email_change_cancel
(cherry picked from commit 8518afe70d7c0c2f79a4a3b21028509be7373e67)
2020-10-12 22:31:31 +02:00
slawkens
e213c3e7d8 Fix when adding poll = template tibiacom broken
With Exception and red message
2020-10-12 21:58:20 +02:00
slawkens
65b4b2d183 Rename file to admin.data.html.twig 2020-10-09 23:38:33 +02:00
slawkens
94b145b215 New class: DataLoader (loads data from server)
Also combined some code responsible for loading server data
2020-10-09 23:37:24 +02:00
slawkens
6c9e6af154 Move installer.js to main tools 2020-10-09 23:18:22 +02:00
slawkens
b5736ad559 Rename items.php to server data.php 2020-10-09 22:29:19 +02:00
slawkens
ab3912b378 Save towns as plain PHP File in cache folder
+ Also load them on install + on reload items
= better performance when in dev mode
2020-10-09 22:27:48 +02:00
slawkens
3090989dea Fixed accounts editor for OTServ, which dont have accounts.group_id 2020-10-09 00:37:28 +02:00
slawkens
92314b8dac Fix some PhpStorm editor error message 2020-10-09 00:36:47 +02:00
slawkens
a52396008d Automatically load towns from .OTBM file
Takes up to 10 seconds for otservbr on my PC
Taken from old Smart AAC - class SpawnsReader.php
2020-10-09 00:12:07 +02:00
slawkens
ae7350e3a0 Fix typo: length 2020-10-08 00:15:50 +02:00
slawkens
c30300c368 New configurable: item_images_extension 2020-10-08 00:13:35 +02:00
slawkens
ed3d415c05 Change wrong table header: Description -> Version 2020-10-08 00:03:53 +02:00
slawkens
bb353d617a Admin Panel: Show Mailer menu only if config.mail_enabled 2020-10-07 23:54:03 +02:00
slawkens
d7f41748ad Forgot to translate requirements 2020-10-07 23:46:14 +02:00
slawkens
915ae47971 Add missing polish timezone translation on install 2020-10-07 23:40:33 +02:00
slawkens
40b151b4c5 Remove whitespaces 2020-10-07 23:36:21 +02:00
slawkens
1992410a7b This info is useless 2020-10-07 23:36:10 +02:00
slawkens
48874f5b07 Disable mail_enabled by default on clean install
Causes too many issues when no smpt server available and other options are not configured
2020-10-07 23:22:02 +02:00
slawkens
2144a4eb7c Add success message on config.local.php save 2020-10-07 23:19:10 +02:00
slawkens
cbdbf11edc Remove config.local.php from optional dirs 2020-10-07 23:09:33 +02:00
slawkens
515db04023 Some changes in installation optional and required dirs
system/logs and system/cache are required to be writable

config.local.php, images/guilds and images/gallery are optionally writable, without them some feature will not work
2020-10-07 22:48:06 +02:00
slawkens
d3811f1bf1 Forgot to remove 2020-10-07 22:44:57 +02:00
slawkens
815fedf8e7 Add 'gd' as optional extension
Without it player signature will not work
2020-10-07 22:44:43 +02:00
slawkens
929a7b9cfa Add pdo_mysql as required extension
+ Some code refactoring
2020-10-07 22:43:17 +02:00
slawkens
f85361dbc5 Some optimisations in Plugins::installMenus 2020-09-25 07:49:26 +02:00
slawkens
cb6509d09d Cache for 365 days if $ttl not set 2020-09-25 07:26:30 +02:00
slawkens
f09c129c6d Remove duplicated line (in $db->select)
Caused some errors when using $db->select function (news editing for example)
2020-09-17 23:17:59 +02:00
slawkens
602a4aa835
Feature/experience stages twig (#135)
* Move Experience Stages to Twig

* Change name to underline (standard)

* Update system/pages/experiencestages.php

Co-authored-by: whiteblXK <krzys16001@gmail.com>

Co-authored-by: whiteblXK <krzys16001@gmail.com>
2020-08-24 19:36:43 +02:00
slawkens
14d5c6311b Update config.php 2020-07-14 01:05:21 +02:00
slawkens
289dd3c170 New configurable: guild_description_default 2020-07-14 01:05:09 +02:00
slawkens
60eac97945 Fix creating very uncommon (bugged) account names
(cherry picked from commit 0326657d60c3f44bbd64d5cb22d4cbc5499dea88)
2020-07-07 01:23:53 +02:00
slawkens
de1d6b9629 Fix #131
(cherry picked from commit fcff820858dca3e8d2692e9bfee27ea89c8b9727)
2020-07-07 00:54:34 +02:00
whiteblXK
722264a083 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>
(cherry picked from commit dc536f0fc01862f052d5edee29ac188ac63fcf66)
2020-07-07 00:54:29 +02:00
slawkens
357d487af7 Change hasTable -> hasColumn 2020-07-07 00:15:54 +02:00
whiteblXK
1b802b040d Fixed bug with showing hidden character
(cherry picked from commit f3061a0e74c19a75fda59a69a47a07fd757f671c)
2020-07-07 00:02:33 +02:00
slawkens
25afbd935c Fix #132
(cherry picked from commit d4222e98e604592a9453a8ccde8ad2d7c28b85eb)
2020-07-03 23:25:08 +02:00
slawkens
e61bfd2722 My fault (wrong email) forgot to change :P 2020-07-03 22:51:58 +02:00
slawkens
fe571cbef3 Fix account create when account_mail_verify is enabled 2020-07-03 22:43:53 +02:00
slawkens
a7c5cb8f5a Add some notice about Email validation 2020-07-03 22:15:04 +02:00
slawkens
dedb96ef4a Fix for CloudFlare IP detection
(cherry picked from commit b3b6d0ff5de763bd7ec8be73fc5ef8e03b8e4601)
2020-07-03 20:39:20 +02:00
slawkens
ee49efd215 This is better way of doing the check for blank & color 2020-06-26 23:47:14 +02:00
slawkens
56a35eb864 Fix network_twitter link in tibiacom template 2020-06-20 08:50:29 +02:00
slawkens
d478fe0c71 Move $menus to menus.php
Also fix active link when menu item has subpage
2020-06-09 01:32:00 +02:00
slawkens
03467ea64e Update change_password email to be more informal 2020-06-06 19:51:17 +02:00
slawkens
3368fbd058 New config: account_mail_block_plus_sign
Block emails with '+' signs like test+box@gmail.com (help protect against spamming accounts)
2020-06-06 19:37:05 +02:00
slawkens
e84c6f7a24 Fix XSS in character search
(cherry picked from commit dfc70c098f43b320cbb750b0a89ee9c027ce8fed)
2020-06-06 18:33:38 +02:00
slawkens
a0006bad73 CHANGELOG.md cleanup for 0.9.0 2020-06-06 18:05:10 +02:00
slawkens
2458393d22 Add Plugins::installMenus function 2020-06-06 17:33:34 +02:00
slawkens
787416e552 Remove useless title_separator from config 2020-06-06 17:15:55 +02:00
slawkens
1c6b241239 Add $limit parameter to $db->select method 2020-06-06 17:13:55 +02:00
slawkens
7469d520c9 Add $member var annotation 2020-06-06 17:13:51 +02:00
slawkens
7e00e62427 Update version to 0.9.0-dev 2020-06-06 09:08:40 +02:00
slawkens
0e39a969c3 Move register DATABASE_VERSION into schema.sql
Caused migrations being fired when user manually imported database
2020-06-06 07:33:05 +02:00
slawkens
0ad1647930 Remove unused myaac_videos table 2020-06-06 07:21:35 +02:00
slawkens
d7fc45a72d Very first version of admin bar 2020-06-06 07:17:09 +02:00
slawkens
54dfb642b1 Fix #123 Guild Invite not working on otservbr-global 2020-06-03 21:38:17 +02:00
slawkens
40626d0f42 Revert some change I did
Causing "'" and "-" being accepted as first character in player name
2020-06-03 21:22:14 +02:00
slawkens
523afccb51 Avoid ERR_TOO_MANY_REDIRECTS on template change 2020-06-03 20:01:26 +02:00
slawkens
1087aefe0a One more hook 2020-06-01 23:09:27 +02:00
slawkens
9b66edc148 Add some additional hooks to characters.html.twig 2020-06-01 22:41:32 +02:00
slawkens
2c09b0ae86 Fix #128 (Remove MyISAM engine) from migration scripts 2020-06-01 09:47:53 +02:00
slawkens
8de8ad13bf Fix message() function when executed in CLI 2020-06-01 08:39:13 +02:00
slawkens
70bd442bb0 Add new constant: IS_CLI
Also fixed some warnings when running in CLI mode
2020-06-01 08:34:11 +02:00
slawkens
5250b3189b Fix #126 (Max count and chance not shown) 2020-05-27 22:21:45 +02:00
slawkens
2534651e20 dummy me.. thanks @gerotib 2020-05-27 01:32:15 +02:00
Lee
f46a42023f Update admin.login.html.twig
- fix for label not ticking the box when remember me text clicked
2020-05-25 23:34:04 +01:00
Lee
e2ab301340 Update version.php
- removed extra line that is added when using a newer version than official release.
2020-05-25 23:33:06 +01:00
slawkens
700f835243 Fix #125 (wrong mana of character samples)
Should be 90.
2020-05-26 00:15:28 +02:00
slawkens
9ce7162a04 Remove duplicated code 2020-05-25 09:03:40 +02:00
slawkens
af85a8b711 Display "Unknown Town" when town not found 2020-05-25 00:15:30 +02:00
slawkens
cd58008a0f Rewrite towns support for TFS 1.3
Won't show warning anymore
2020-05-25 00:09:06 +02:00
slawkens
1f6bd975d0 Add error_reporting in admin panel
Same as in main page
2020-05-25 00:04:41 +02:00
slawkens
b3556c008e Add note which template menus are being edited 2020-05-24 19:34:48 +02:00
slawkens
dbe83f8a74 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
2020-05-24 18:43:26 +02:00
Lee
d1c50f00a0 Admin template update
- Reformatted with short array syntax.
- Removed duplicate menu item
- Removed 'menu' from array - use 'link' as the array or link.
- Added logo
2020-05-23 03:03:15 +01:00
Lee
bd9d3154db Code cleanup
-Removed unneeded/duplicate dependency files.
2020-05-23 02:54:58 +01:00
Lee
1f0b4425a4 Code cleanup
- Relocated html5shiv.js (v3.7.3) and respond.js (v1.4.2)
- Removed unneeded/duplicate dependency files.
2020-05-23 02:47:12 +01:00
Lee
47bfea4c56 Dependency Update
Updated:
- AdminLTE (v3.0.4)
- Bootstrap (v4.4.1)
- DataTables (v1.10.21)
-- Split DataTables for admin pages and website to fix layout formatting issues.
2020-05-23 02:28:38 +01:00
slawkens
416de6b584 Update admin.items.html.twig 2020-05-14 23:16:05 +02:00
Lee
3d3d141b25 bootstrap JS fix
-fixes the editor tabs etc not working
2020-05-10 18:11:38 +01:00
slawkens
2ff56c17e3 Added some fancy spinner to items loader 2020-05-10 12:39:06 +02:00
slawkens
fb326d0354 Change input type of account_login to text
This fixes autofill by Chrome and other tools
2020-05-10 11:45:55 +02:00
slawkens
e84933cf26 Ignore index.html in logs viewer 2020-05-10 11:45:04 +02:00
slawkens
8e04328482 Add executing missing migration on install
This fixes missing rules on clean install
2020-05-09 14:07:53 +02:00
slawkens
d148b71f0f Fixes in create new character nick
+ fixed config.character_name_min/max_length being ignored in change_name.php
2020-05-09 14:07:53 +02:00
Lee
4e68838172 CreateChar Fix
-checks if name has double space on create character (#121)
2020-05-07 19:09:56 +01:00
Lee
d281fc588b Fixes
-As requested the datatables and bootstrap files have been moved into the tools folder
-Fixed spells and creatures datatable.
-Double space in name fix.
2020-05-07 01:36:56 +01:00
slawkens
1799ef42a7 Add system/data to .gitignore 2020-05-06 19:55:31 +02:00
slawkens
a0d5a863e0 Remove useless tabbing
Just removed tabs, nothing else..
2020-05-01 13:03:34 +02:00
slawkens
df59b104db Fix cancel change email request
Thanks to OtLand user anyeor
2020-04-21 00:22:50 +02:00
slawkens
e7e327c238 Fix some small typos on admin.menus 2020-04-20 23:31:06 +02:00
slawkens
ee6e68d0bf Fix exception when characters.frags enabled on TFS 1.x 2020-04-20 22:35:41 +02:00
Lee
d7333b3f21 Update accounts.php
Fix for accounts.php type not found.
2020-04-06 15:08:52 +01:00
Lee
375bd58a0c Admin Update
-Account limit fix
-Player editor full player table.
2020-04-02 20:54:20 +01:00
Lee
cddd915adf Admin fixes
-login/logout error fix
-debugging code removed
2020-04-02 18:44:15 +01:00
Lee
9e0ad271f6 Update adminlte.min.css
case sensitive fix
2020-04-02 15:54:16 +01:00
Lee
a0afeb2a7a Update accounts.php
-Bans table error
-Fix for #114
2020-04-02 14:52:38 +01:00
slawkens
7c208b38ed Add example quest 2020-04-02 15:26:39 +02:00
Lee
eaa11c68f3 Admin Panel Updates
- Updated Admin Panel to Bootstrap 4.
- Code cleanup
- Rewrote menu generation code
- Added top 10 coins, top 10 premium points, last 10 logins to modules page.
- Added full account list to Account editor
- Added load outfits from XML to player editor and lists all enabled outfits in editor (will default to textbox if array of outfits do not exist)
- Added tabs to account editor - account, characters,store history, bans(this is based off the bans.php page so will not work on TFS 0.2/1.0)
- Updated datepickers to display the actual date rather than unix time.
- Added last 10 posts to player editor
2020-03-31 02:03:16 +01: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 a55ec208aad98c2179b619bc8727a3445efd4888.
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 6f24509dd659032c65c3ccbdf5b5bb3b25cffd72.

* * 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
slawkens1
2cd9f80b34 * fixed Twig loading on case-sensitive systems 2017-08-28 22:52:27 +02:00
slawkens1
d88de8e072 * fixed Twig loading on case-sensitive systems 2017-08-28 22:43:03 +02:00
slawkens1
6e6ce55a7b * some better info when fetching latest version 2017-08-28 21:06:57 +02:00
slawkens1
26b88d9d42 * typo 2017-08-28 20:25:50 +02:00
slawkens1
27e490912b * some small undefined variable fix 2017-08-28 20:20:42 +02:00
slawkens1
fe8b0cd944 * update to 0.3.0 2017-08-28 20:04:17 +02:00
slawkens
61bc3a616a * player sex is now configurable 2017-08-28 18:12:55 +02:00
slawkens
430351aee3 * removed name field from screenshots table
* updated db to version 7
2017-08-28 17:18:47 +02:00
slawkens
eecdcfbabe Merge branch 'master' of https://github.com/slawkens/myaac 2017-08-28 17:12:28 +02:00
slawkens
97776d8f01 * fixed some warning when you select unexisting country 2017-08-28 17:12:25 +02:00
Sławek
48e864dead Minimum version to run the AAC is now 5.2.0 2017-08-28 16:42:00 +02:00
slawkens
91c3b343e7 * fixed include template dir on admin page
* also fixed line separator on admin/index.php
2017-08-28 16:41:15 +02:00
slawkens
b62ce7ec6f * added administration panel for screenshots management with auto thumbnail generator
* moved commands & screenshots html code to twig template files
* minimum PHP version to install the MyAAC is now 5.2.0 cause of pathinfo (extension) function
2017-08-28 16:27:38 +02:00
slawkens
7890eb14d1 Merge branch 'master' of https://github.com/slawkens/myaac 2017-08-28 10:03:01 +02:00
slawkens
15961f0c17 * some changes
* moved some admin html code from php to twig templates (.html files)
* minimum PHP version required by installer is now 5.1.2, cause of spl_autoload_register functon.
* depracated Twig to version 1.20.0 cause of Autoloader
* removed unused admin stylish template
2017-08-28 10:02:49 +02:00
slawkens1
c8c1ba5682 * fixed recovering account and changing password when salt is enabled
* added 'enabled' field in myaac_hooks table, which can enable or
disable specified hook
* password change minimal/maximal length is now more precise
2017-08-25 00:10:53 +02:00
slawkens
603c2175e3 * automatically detect player country based on user location (IP) on create account 2017-08-24 16:33:55 +02:00
slawkens
45aa2c2f23 fixed guild creating
also i i forgot to write, in last commit i've added Twig template engine. I will use it to separate html content from php code
2017-08-24 09:59:46 +02:00
slawkens
45f988c420 *some fixes
* 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 signature fonts finding path
* removed DEFAULT '' for TEXT field. It didn't worked under some systems like MAC OS X.
* moved news adding at installation from schema.sql to finish.php
* removed some unused cities field from myaac_spells table
* some optimizations
2017-08-23 17:00:41 +02:00
slawkens
55e8507cac added MAC OS detection 2017-08-23 08:56:08 +02:00
slawkens1
ec6584555f update to 0.2.4 2017-06-09 07:00:47 +02:00
slawkens1
649facc5ab more fixes to loading of creatures
fixed when there are spaces at beginning of the file
fixed when file is unable to parse
2017-06-07 00:16:04 +02:00
slawkens1
57c2547098 added same printing to spells
more elegant way of showing message on reload creatures and spells
2017-06-06 23:32:50 +02:00
slawkens1
4fa32e79ce added id field on monsters, so you can delete in phpmyadmin
fixed adding some creatures with ' and "
2017-06-06 23:19:20 +02:00
Sławek
f393e525a6 Merge pull request #2 from JasonRox18/patch-2
added exp rate to the list
2017-06-06 13:23:35 +02:00
slawkens1
45b61e5f78 Fixed invite to guild 2017-06-05 01:00:07 +02:00
slawkens1
0219cc7a1f fixed typo loss_items => loss_containers
added highscores number_format so it shows 15,612,933,685 instead of
15612933685
2017-06-02 00:41:27 +02:00
JasonRox18
b212e9fb0f added exp rate to the list 2017-06-01 01:39:21 +01:00
slawkens1
ecef4de2d2 update to 0.2.3 2017-05-31 23:22:43 +02:00
slawkens1
e69ff12966 some fixes
* set default skills to 10 when creating new character
* fixed displaying of "Create forum thread" in newses
* fixed deleting guild
* fixed displaying vocation amount on online page
* better support for custom vocations, you just need to set in config
vocations_amount to yours.
2017-05-31 23:10:35 +02:00
slawkens1
6f10ee1965 fixed guild management on OTHire 0.0.3 2017-05-29 16:14:26 +02:00
slawkens1
d9bd1f6e99 Fixed https://otland.net/threads/myaac-v0-0-1.251454/page-8#post-2445222 2017-05-27 23:46:12 +02:00
slawkens1
35c8b65be7 Fixed huge space in player name
https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2444328
2017-05-24 02:22:33 +02:00
slawkens1
753fb60e75 some small fix in guilds page 2017-05-23 22:01:34 +02:00
slawkens1
45e390c9d4 fixed https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2444034
and https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2444035
2017-05-23 21:50:18 +02:00
slawkens1
7df5d18105 update to 0.2.2 2017-05-22 14:16:24 +02:00
slawkens1
0bc43d38e3 this.. 2017-05-22 01:52:18 +02:00
Sławek
94dd462b71 Delete signatures.zip 2017-05-22 01:53:14 +02:00
Sławek
266a1704ed this.. 2017-05-22 01:52:41 +02:00
slawkens1
2bf41655cb Fixed https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2443868 2017-05-21 23:14:15 +02:00
slawkens1
fa3f61f7db update to 0.2.1 2017-05-21 22:26:31 +02:00
slawkens1
be6fd3af0e added Sizaro's Swedish translation and some fixes
https://otland.net/threads/myaac-v0-0-1.251454/page-6#post-2443743
2017-05-21 22:12:14 +02:00
slawkens1
915a1720e2 always forget something.. 2017-05-21 21:39:33 +02:00
slawkens1
a8a4efd39a update to version 0.2.0 2017-05-21 08:33:47 +02:00
slawkens1
75aa62a113 some fixes
* updated download links, as clients.halfaway.net isn't working anymore
* fixed some bugs while installing when field `email_next` or `hidden`
already exist
2017-05-21 08:15:16 +02:00
slawkens1
170eaec9b0 added option to change character sex for premium points 2017-05-19 03:31:29 +02:00
slawkens1
0b315bfda6 fixed displaying unlimited premium account 2017-05-19 02:55:27 +02:00
slawkens1
4bd4198e1c typo 2017-05-19 02:43:46 +02:00
slawkens1
1310a49729 some small update
* 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 perform faster
loading
* fixed highscores displaying of group outfits
2017-05-19 02:30:39 +02:00
slawkens1
6658eb5f20 fixed some .htaccess rewrites like newsarchive, which didn't showed correctly on tibiacom template and added polls/id rule 2017-05-18 17:58:34 +02:00
slawkens1
ecd279453f .htacces -> .htaccess 2017-05-18 17:48:10 +02:00
slawkens1
eda700c483 fixes
* don't show "Create forum thread" when editing
* fixed red color table after create account
2017-05-18 16:19:01 +02:00
slawkens1
bde265d79b fixed when signature player name containst space 2017-05-18 09:38:26 +02:00
slawkens1
e5b5aaeaf5 some fixes...
* fixed registering database_version
* fixed skulls displaying
* fixed movies unexpected comment
* added template_place_holder('center_top') to kathrine template
* fixed signature tibian for OTHire and other servers that doesnt use
accounts.premdays field
2017-05-17 23:50:47 +02:00
slawkens1
43162b6222 fixed https://otland.net/threads/myaac-v0-0-1.251454/page-6#post-2442407 2017-05-14 22:37:52 +02:00
2336 changed files with 60823 additions and 87135 deletions

19
.editorconfig Normal file
View File

@ -0,0 +1,19 @@
# 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
[{composer.json,package.json}]
indent_style = space
[{package.json, *.yml}]
indent_size = 2

13
.gitattributes vendored Normal file
View File

@ -0,0 +1,13 @@
* text=auto
.gitattributes export-ignore
.gitignore export-ignore
.github export-ignore
.editorconfig export-ignore
_config.yml export-ignore
release.sh export-ignore
# cypress
cypress export-ignore
cypress.config.js export-ignore
*.sh 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:

162
.github/workflows/cypress.yml vendored Normal file
View File

@ -0,0 +1,162 @@
name: Cypress
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
cypress:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: myaac
MYSQL_USER: myaac
MYSQL_PASSWORD: myaac
ports:
- 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
matrix:
php-versions: [ '8.1', '8.2', '8.3' ]
ots: ['tfs-1.4', 'canary-3.1.2'] # TODO: add 'tfs-master' (actually doesn't work cause AAC doesn't support reading .env configuration)
name: Cypress (PHP ${{ matrix.php-versions }}, ${{ matrix.ots }})
steps:
- name: 📌 MySQL Start & init & show db
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE myaac;' -uroot -proot
mysql -e "SHOW DATABASES" -uroot -proot
- name: Checkout MyAAC
uses: actions/checkout@v4
with:
ref: main
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm ci
- name: Checkout TFS
uses: actions/checkout@v4
if: matrix.ots == 'tfs-1.4'
with:
repository: otland/forgottenserver
ref: 1.4
path: ots
- name: Checkout TFS
uses: actions/checkout@v4
if: matrix.ots == 'tfs-master'
with:
repository: otland/forgottenserver
ref: master
path: ots
- name: Checkout Canary
uses: actions/checkout@v4
if: matrix.ots == 'canary-3.1.2'
with:
repository: opentibiabr/canary
ref: v3.1.2
path: ots
- name: Import OTS Schema
run: |
mysql -uroot -proot myaac < ots/schema.sql
- name: Rename config.lua
run: mv ots/config.lua.dist ots/config.lua
- name: Replace mysqlUser (TFS 1.4)
uses: jacobtomlinson/gha-find-replace@v3
if: matrix.ots == 'tfs-1.4'
with:
find: 'mysqlUser = "forgottenserver"'
replace: 'mysqlUser = "root"'
regex: false
include: 'ots/config.lua'
- name: Replace mysqlPass (TFS 1.4)
uses: jacobtomlinson/gha-find-replace@v3
if: matrix.ots == 'tfs-1.4'
with:
find: 'mysqlPass = ""'
replace: 'mysqlPass = "root"'
regex: false
include: 'ots/config.lua'
- name: Replace mysqlDatabase (TFS 1.4)
uses: jacobtomlinson/gha-find-replace@v3
if: matrix.ots == 'tfs-1.4'
with:
find: 'mysqlDatabase = "forgottenserver"'
replace: 'mysqlDatabase = "myaac"'
regex: false
include: 'ots/config.lua'
- name: Replace mysqlDatabase (Canary)
uses: jacobtomlinson/gha-find-replace@v3
if: matrix.ots == 'canary-3.1.2'
with:
find: 'mysqlDatabase = "otservbr-global"'
replace: 'mysqlDatabase = "myaac"'
regex: false
include: 'ots/config.lua'
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, dom, fileinfo, mysql, json, xml, pdo, pdo_mysql
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
#key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Run PHP server
run: nohup php -S localhost:8080 > php.log 2>&1 &
- name: Cypress Run
uses: cypress-io/github-action@v6
env:
CYPRESS_URL: http://localhost:8080
CYPRESS_SERVER_PATH: /home/runner/work/myaac/myaac/ots
- name: Save screenshots
uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-screenshots-${{ matrix.php-versions }}-${{ matrix.ots }}
path: cypress/screenshots
- name: Upload Cypress Videos
uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-videos-${{ matrix.php-versions }}-${{ matrix.ots }}
path: cypress/videos
- name: Upload PHP Logs
uses: actions/upload-artifact@v4
if: always()
with:
name: php-log-${{ matrix.php-versions }}-${{ matrix.ots }}
path: php.log

16
.github/workflows/phplint.yml vendored Normal file
View File

@ -0,0 +1,16 @@
name: PHP Linting
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
phplint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: overtrue/phplint@8.2
with:
path: .
options: --exclude=*.log

46
.github/workflows/phpstan.yml vendored Normal file
View File

@ -0,0 +1,46 @@
name: "PHPStan"
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
tests:
name: PhpStan on PHP ${{ matrix.php-versions }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: [ '8.1', '8.2', '8.3' ]
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
extensions: "intl, zip"
ini-values: "memory_limit=-1"
php-version: "${{ matrix.php-version }}"
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
- name: "Install composer dependencies"
run: "composer install"
- name: "Run PHPStan"
run: "/usr/bin/php vendor/bin/phpstan analyse"

78
.gitignore vendored Normal file
View File

@ -0,0 +1,78 @@
Thumbs.db
.DS_Store
.idea
#
/.htaccess
lua
# composer
composer.phar
vendor
# npm
node_modules
tools/ext
# cypress
cypress.env.json
cypress/e2e/2-advanced-examples
cypress/screenshots
# 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
# editor images
images/editor/*
!images/editor/index.html
# gallery images
images/gallery/*
!images/gallery/index.html
!images/gallery/demon.jpg
!images/gallery/demon_thumb.gif
# cache
system/cache/*
!system/cache/index.html
!system/cache/twig/index.html
!system/cache/signatures/index.html
!system/cache/plugins/index.html
!system/cache/persistent/index.html
# logs
system/logs/*
!system/logs/index.html
# data
system/data/*
!system/data/index.html
# php sessions
system/php_sessions/*
!system/php_sessions/index.html
# plugins
plugins/*
!plugins/.htaccess
!plugins/example.json
!plugins/account-create-hint.json
!plugins/account-create-hint
!plugins/email-confirmed-reward.json
!plugins/email-confirmed-reward
landing
# system
system/functions_custom.php

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 ^images/items/([0-9]+)\.gif$ tools/item.php?id=$1
RewriteRule ^characters/([A-Za-z0-9-_+']+)$ index.php?subtopic=characters&name=$1
RewriteRule ^guilds/([A-Za-z0-9-_+']+)$ index.php?subtopic=guilds&action=show&guild=$1
RewriteRule ^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=news&archive=true&id=$1
RewriteRule ^news/archive$ index.php?subtopic=news&archive=true
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 ^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]

21
.htaccess.dist Normal file
View File

@ -0,0 +1,21 @@
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
<FilesMatch "^(.*\.md|.*\.json|.*\.dist|.*\.sql|CHANGELOG|README|composer\.lock)$">
Require all denied
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /myaac/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php [L]
</IfModule>

View File

@ -1,92 +0,0 @@
[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/

266
CHANGELOG-1.x.md Normal file
View File

@ -0,0 +1,266 @@
# Changelog
## [1.4 - 22.04.2025]
### Added
* feat: admin-pages (can add admin pages through plugins) (https://github.com/slawkens/myaac/commit/ceaa0639e66d31e8177ff90791463470367aa45d)
* just place the page in admin-pages folder in the plugin
* Also, possibility to overwrite default myaac admin pages
* Add db->hasTableAndColumns(table, columns), credits to @opentibiabr Team (https://github.com/slawkens/myaac/commit/82a533d88c8a342076891d132b4b409ed9a1fe72)
* Add noSubmit option to buttons.base (https://github.com/slawkens/myaac/commit/64f6d3abcada3bf9fd7599f50d2fac0a1367f383)
### Fixed
* Fix: display 404 error instead of 500 when page has been removed from filesystem (https://github.com/slawkens/myaac/commit/c2bf94fb2370d2009a2eb907f818955132cf8611)
* Fix headline.php: change image format to .png cause of black background (https://github.com/slawkens/myaac/commit/b618084d50918539d9a70abd97e764137b966067)
* Clear cache on plugin enable/disable, fixes some issues with plugin pages being cached (https://github.com/slawkens/myaac/commit/1d0c173e7d000aecbd432800941fc3e38a0e50f2)
* Do not autoload sub-folders if autoload pages is disabled (https://github.com/slawkens/myaac/commit/d47195a7878095336f9c9edc6f96244257f67eec)
### Changed
* SQL Syntax Standardization (by @JoaozinhoBrasil, #298)
* Pages in theme/template folder will now have precedence over normal pages (https://github.com/slawkens/myaac/commit/6d8f4718a1d349fba8f0ebc39cfd3a1a84d104b0)
* Small changes in account.login.html.twig (https://github.com/slawkens/myaac/commit/f40b986b59d4c8fa89ab4745731bf366f8619976)
* Plugin name is required, version is optional (https://github.com/slawkens/myaac/commit/e6f05a2731c61d931be49e121c068e49c0ad5e01)
## [1.3.3 - 04.04.2025]
### Fixed
* Fix uninstall plugin when plugin is disabled (https://github.com/slawkens/myaac/commit/6c568fd36a271270684fc412ccd556b230273a6d)
### Changed
* Display more useful info when error parsing config.lua (https://github.com/slawkens/myaac/commit/fa6b6aa153ffc131e0d1631a4dcd9012a5850c2e)
### Other
* Small adjustments (https://github.com/slawkens/myaac/commit/35e2483de86e295bdf089cceffa25842eeb2e34c, https://github.com/slawkens/myaac/commit/ae639d65b0bfa491e747e907e2ebc77f83f47981)
## [1.3.2 - 01.04.2025]
### Fixed
* Fix debugBar/admin panel menu when using custom base_dir (https://github.com/slawkens/myaac/commit/65696f63e3aac02ff952ea81279e7cb2fa7570fb)
### Changed
* Settings: Show/hide IP Ban Protection options depending on the value (enabled/disabled) (https://github.com/slawkens/myaac/commit/dbf73d0b61b45601ae95e51b23c051c2704169c5)
* Do not require init.php in cache:clear command (https://github.com/slawkens/myaac/commit/d25c71857f767834239bbffacd00fdc671adb157)
## [1.3.1 - 19.03.2025]
### Fixed
* Fixed migrate:run command (https://github.com/slawkens/myaac/commit/1a5771ad51e595fe13368a0721b059c4ecefb17d)
### Changed
* Small adjustments (https://github.com/slawkens/myaac/commit/6fac883659f581baac1361826d046410156f1e58, https://github.com/slawkens/myaac/commit/4a6896b4469968b9904292734cf6c14ba5eeef14)
## [1.3 - 10.03.2025]
### Changed
* Use latest outfit-images host from @gesior (https://github.com/slawkens/myaac/commit/529bdcf016dd0f9dffbc34d81f99a046a9ddb70d)
* Change monster link to $_GET ?name= (https://github.com/slawkens/myaac/commit/4c5cc8b573b2b3e7ec00a22b7ede30a68083a924)
### Fixed
* Fixed house links (https://github.com/slawkens/myaac/commit/887b5068ad11c4cdab614afd34525caba785ce13)
* Fixed long title on headline.php (https://github.com/slawkens/myaac/commit/3e3f4bb5a514158ec8777684ca6c7f1c2a37bed5)
* Fixed menu colors once again, plus add !important tag (https://github.com/slawkens/myaac/commit/aa52df6e2ec92cafc25b655ae907bf2e1746d9cc)
* Fix: add possibility to remove all menu items in admin panel (https://github.com/slawkens/myaac/commit/00fe1adc15ea7646596d755f6e6e1f7854ffc1d5, https://github.com/slawkens/myaac/commit/9239a4f4198c3ad260802ac3b47e9c41b80b754e)
## [1.2 - 09.02.2025]
### Added
* Twig session(key) function + reworked session functions to accept multi-array like in Laravel (https://github.com/slawkens/myaac/commit/b46ddb43d03ef7e5fc34e555e92e856bdc905691)
* add template_name to twig variables (https://github.com/slawkens/myaac/commit/ae1161d77050bda181802b4496c9de920a7bb1bc)
* add HOOK_INIT, executed just after $hooks are loaded (https://github.com/slawkens/myaac/commit/19686725dc810f63a07f049f82c66cf336d90ca6)
### Changed
* settings: password input hide/show, enable Save button only if changes has been made, save settings in transaction (https://github.com/slawkens/myaac/commit/4fda4f643b60a151179e5dd4f04912fb2618d98f, https://github.com/slawkens/myaac/commit/28fef952f857b79d64bc7495ffa5e1999e68e192, https://github.com/slawkens/myaac/commit/4b6024dc451accadb6c469fa282a9a764c1c0a81)
* rework menus: Different categories can have different colors + Option to reset menus (https://github.com/slawkens/myaac/commit/73de93a561f6b13111e019075724357d8a617249, https://github.com/slawkens/myaac/commit/3da3e62c5b12390d75de9b3320729bcca6e0b458)
### Fixed
* highscores: Fix online status + vocation for TFS 0.x (https://github.com/slawkens/myaac/commit/ea51ad27c38be88d86514cb979bb394fcfbef1f0)
* clear cache button in admin bar needed to be clicked twice until it worked (https://github.com/slawkens/myaac/commit/ea51ad27c38be88d86514cb979bb394fcfbef1f0)
* HOOK_STARTUP location (https://github.com/slawkens/myaac/commit/a73fb1003ee3f812cf182d1834d65f08e6f60d1f)
* if vocation name has more words (https://github.com/slawkens/myaac/commit/9d7fc98e1e0a96b59ecc1a7c39800a64445db364)
### Updated
* Bump twig/twig from 3.18.0 to 3.19.0 (#284)
## [1.1 - 27.01.2025]
### Changed
* adjust mailer settings descriptions to latest gmail (https://github.com/slawkens/myaac/commit/c5d5bb80671db135e6b503f53684771c7272e05d)
* optimize $player->isOnline() function, thanks @gesior (https://github.com/slawkens/myaac/commit/10dd818b139d5e1bb1ca9ec81edfb083ba9316b4)
* make players.comment and guilds.description VARCHAR (https://github.com/slawkens/myaac/commit/a45ceab83a74bee2b89cdb72baceda75e577e3cf)
* add lua/ folder to .gitignore (https://github.com/slawkens/myaac/commit/07012f786b1114cb6ab2f064f82c645b136a375a)
### Fixed
* general fixes in the tibiacom template menus, better support for custom menus
* make functions_custom.php optional (https://github.com/slawkens/myaac/commit/dc2b5afd9980984e2b259c9fc99f2ade46f70a5a)
* error in CLI, where BASE_URL is not defined (https://github.com/slawkens/myaac/commit/4d749b881582f64b5a46196dbbb5ee8097127f03)
* hook ACCOUNT_LOGIN_BEFORE_ACCOUNT location (https://github.com/slawkens/myaac/commit/669c447fca8643ce56d9ef8c1374ec647c780998)
## [1.0.1 - 14.01.2025]
### Fixed
* tibiacom account & news menu links not auto expanding
### Updated (Thanks dependabot)
* twig from ^2.0 to ^3.11
* tinymce from ^6.8.3 to ^7.2.0
* cypress from ^12.12.0 to ^13.17.0
* nesbot/carbon from 2.72.5 to 2.72.6
## [1.0 - 12.01.2025]
First stable release in the v1.0 series.
Minimum PHP 8.1 is required.
Changes since RC.2:
### Added
* feature: migrations up/down. Allows to downgrade/upgrade database to specified version (https://github.com/slawkens/myaac/commit/3f6ff3a3326b0475d28d11ffd7fff51f362d799f)
* new hooks for news management (https://github.com/slawkens/myaac/commit/011a85d8ae34283ded6999882833f9d4797028ec, https://github.com/slawkens/myaac/commit/36bd3eb846e829b45313e10f7568dc4e95841143)
* None Vocation to highscores (can be changed to RookStayer in Admin Panel) (https://github.com/slawkens/myaac/commit/a4a248099521bb5b8b2aa5bd592138debd2f19d5)
* support for button_color (green, red, blue) (https://github.com/slawkens/myaac/commit/d8b6b749ee62e88b6af4a05d3d7557f90b94d94e)
* add $whoopsHandler as variable, can be used by plugins (https://github.com/slawkens/myaac/commit/b0c8cf2ecda23045d725aaf43cfb3852ed766a4b)
* PlayerModel->outfit_url attribute (https://github.com/slawkens/myaac/commit/3b5be1a8db5dceecaa388e2925a5536d13b38881)
* support for selecting plugin themes in Admin menus.php (https://github.com/slawkens/myaac/commit/77a2c1cec343ffe4be5c2c2503ee81bc32a14ca1)
### Changed
* schema: Change character set to utf8mb4 (support for Emojis in Menus/Pages/News/Forum etc.) (https://github.com/slawkens/myaac/commit/27c44f1bdfb6234cf0c9d5b4b491123bb205b08f)
* prefer get_browser_real_ip() over REMOTE_ADDR (https://github.com/slawkens/myaac/commit/941846605c00cee83168d2f916410b8ba8d4b7b9)
* automatically set selected current one on highscores filters (https://github.com/slawkens/myaac/commit/e96227fbe41ae281783b2d49edb169a603601813)
* rewrite towns loading code, removed OTBM loader (was too slow) (https://github.com/slawkens/myaac/commit/c980a0914632e7b27f718464f669a200707d217e)
* allow OTS_Player to be passed as object to getPlayerLink (https://github.com/slawkens/myaac/commit/84d37c5a8f2c4535a41c8aa8264752969d3f3a3d)
* do not clear menus by default on install (https://github.com/slawkens/myaac/commit/12d8faa3eda5e798f97b71e941c035187daad96e)
* display warning in admin panel - plugins - if zip extension is not installed (https://github.com/slawkens/myaac/commit/e3ffe5d9e11d78ab064a370d8541bac351c9bcd9)
* set default_socket_timeout for ipinfo.io checkup to 5 seconds (https://github.com/slawkens/myaac/commit/783d96fc6568a607d3198b832fed3a0dd06c4ebb)
* refactor getTopPlayers function (support for balance) (https://github.com/slawkens/myaac/commit/c769962e39fe8dfb72ecd5be1864e145696be794)
### Fixed
* XSS in forum (https://github.com/slawkens/myaac/commit/c2b7286d20d4b579171540f7a774e8a0995d5e8f, https://github.com/slawkens/myaac/commit/8fb643596f9586005976e7bdb484a541a9d8715e)
* price deducted when changing sex (https://github.com/slawkens/myaac/commit/16671ea40b72dcf74037c359ad572f9eb825edf9)
* move_thread by unauthorized user (https://github.com/slawkens/myaac/commit/d6c40c836a53cb1710f911f77f45f28b54ea1b54, thanks @anyeor)
* TFS 1.4.2 where conditions is NULL (https://github.com/slawkens/myaac/commit/b8396d4c8482e951da538b13f2296123732c4545)
* do not show forum new thread show button if not logged in (https://github.com/slawkens/myaac/commit/507402171ba3b6e7ee184bd7fa73e0d55e0cad7a, @anyeor)
* login if limiter is disabled (https://github.com/slawkens/myaac/commit/a0f1971583f0f790013e2145fb5ac573c59fbdef)
* fixes to installMenus function (https://github.com/slawkens/myaac/commit/a2fadc5945fe0a5e39f740827f6ffbda1bb501e2)
* many PHP exceptions in different places
* fixes to tibiacom menus ActiveSubmenuItem
### Removed
* bugtracker SQL table code as the page has been removed/moved to plugins (https://github.com/slawkens/myaac/commit/5782772b901b05fb814bc718d062f6e2cd71df8c)
## [1.0-RC.2 - 25.10.2024]
Still waiting for your reports about bugs found in this release. We are very close to stable release.
### Added
* feat: rate limit settings for blocking accounts login attempts (@gpedro, #266)
* search by email in accounts editor (https://github.com/slawkens/myaac/commit/c2ec46824621468f2a1cb4046805c485ed13fea5)
* New hooks in account manage + create (https://github.com/slawkens/myaac/commit/93641fc68ac9a5f1479329e2bd41380c19534d5d)
### Changed
* chore: drop raw queries + accounts - search by email + accounts - required min size for search by account number (@gpedro, #266)
* Use https for outfit & item images (https://github.com/slawkens/myaac/commit/71c00aa5e01fbdfd88802912e200dd1025976231)
* Do not require players & guilds tables on install (https://github.com/slawkens/myaac/commit/779aa152fa940261c9b161533946f44e288597a2)
* Do not create player if there is no players table in db (https://github.com/slawkens/myaac/commit/201f95caa8b70e88fa651eac8c3c3aa7cd765bd0)
### Fixed
* Highscore frags fixed for TFS 0.3 (@Scrollog, #263)
* Missing groups variable #262. thanks, @Scrollog for reporting (https://github.com/slawkens/myaac/commit/8d8bdb6dac6df21672ac77288fff2f2f8d6eb665)
* Verified email for login.php (@gpedro, #265)
* Warning if core.account_country is disabled (https://github.com/slawkens/myaac/commit/ab73d60c61e14a1cacdb6cfbf7f89f4bf3be0833)
## [1.0-RC.1 - 23.07.2024]
Changes since 1.0-beta:
### Added
* Feat: Hooks priority (https://github.com/slawkens/myaac/commit/dc17b701da053e04bfa64e21be9247a4f07505e1)
* Make autoload of pages, commands and themes configurable (https://github.com/slawkens/myaac/commit/c1d4b4f80cd6bb85507ee9471e47013955a26a91)
* Fraggers in characters page for TFS 1.x and canary (https://github.com/slawkens/myaac/commit/42f99c3edc8de39cccc5632cb42e88b24579c5a6)
* New hooks: HOOK_INSTALL_FINISH, HOOK_ACCOUNT_CREATE_CHARACTER_* (https://github.com/slawkens/myaac/commit/08ac8ebade106521a5c7396faa5ce7006e629f7c, https://github.com/slawkens/myaac/commit/45dda5e834ff2059faea6ef9be2efa76f1723cbd)
### Changed
* Allow account_create_character_create even if account_mail_verify is activated (https://github.com/slawkens/myaac/commit/203e411b626fe62401a4b74a48420769e512aa39)
* Create guild_rank entries, in case MySQL trigger not loaded (https://github.com/slawkens/myaac/commit/d9c1b2507c81f306970642b35e4bf5f7cc04a6f2, https://github.com/slawkens/myaac/commit/47a19e85dd84e9f3b39a1b29cfc2c04b004832b9)
* Set Admin Account verified by default (https://github.com/slawkens/myaac/commit/cd49dfc79942f3301ce9c0b8d899b9f39bda9a41)
* Refactor account routes into sub folders (https://github.com/slawkens/myaac/commit/bdc0c43d3fd3a51030c3e916bdb9f008468f5ecd)
* Order towns by id (https://github.com/slawkens/myaac/commit/9ea2a5067fc4b75de395f381577b18914132ad84)
* Do not create news about myaac, if any news already exist (on installation (https://github.com/slawkens/myaac/commit/504242fb846b73b56b87bc1e39d070687ad7f5b4)
### Fixed
* Not working google recaptcha plugin (https://github.com/slawkens/myaac/commit/a1bcb217ecf4e21fd58da4ba491da1852029898a)
* Not working account create if account_country is disabled (https://github.com/slawkens/myaac/commit/933b681a9fcdbb6283e0469b3806d2ded492d232)
* Account verify - do not allow login without verified email (Thanks @anyeor, https://github.com/slawkens/myaac/commit/fcb13f3c0fb8ceafda0bd614a229a26a269432bd)
* Detect tools/ext exists on install to prevent broken installs (https://github.com/slawkens/myaac/commit/10a739773c4f2911876bc802a0ee0537c3e00a92)
* Cache reloading each time page refreshes (https://github.com/slawkens/myaac/commit/ec96985872057340112f65073efc0c4bf86dddb0)
* Highscores frags for TFS 1.x and canary (https://github.com/slawkens/myaac/commit/a04d186c22912915f0a7873dfe677ef3b5a23c79)
* Monsters page: monster not found exception (https://github.com/slawkens/myaac/commit/ef79b99b8acc179f14b8475547347d9daca27512)
* Fixed bug if \<flags\> are not present in monster.xml (https://github.com/slawkens/myaac/commit/57b47ab7983f625c7c0ef4f5303a4d07ef172786)
* fastRoute duplicate errors (https://github.com/slawkens/myaac/commit/4c0739d3e93812dff0c33849ea3f38e4e49113ac)
* useGuildNick displaying (https://github.com/slawkens/myaac/commit/0db0ec1aa47e044c26bc403ff5078a2115d086f8)
## [1.0-beta - 18.05.2024]
Minimum PHP version for this release is 8.1.
### Added
* reworked Admin Panel (@Leesneaks, @gpedro, @slawkens)
* updated to Bootstrap v4
* new Menu
* new Dashboard: statistics, server status
* new Admin Bar showed on top when admin logged in
* new page: Server Data, to reload server data
* Towns, NPCs & Items are stored in permanent cache
* new pages: mass account & teleport tools
* changelogs editor
* revised Accounts & Players editors
* option to add/modify admin menus with plugins
* option to enable/disable plugins
* better, updated TinyMCE editor (v6.x)
* with option to upload images
* list of open source libraries used in project page
* auto-loading of themes, commands & pages from plugins/ folder. You need just to place them in correct folder and they will be loaded automatically - this allows better customization, without interfering with core AAC folders. This will allow in the future automatic updates for plugins as well the AAC as whole.
* config.php moved to Admin Panel -> Settings page
* new console script: aac - using symfony/console
* usage: `php aac` (will list all commands by default)
* example: `php aac cache:clear`
* example: `php aac plugin:install theme-example.zip`
* replace POT Query Builder to Eloquent ORM. Not 100% yet - in some places there is still old $db approach used (@gpedro) (https://github.com/slawkens/myaac/pull/230)
* brand new charming installation page (by @fernandomatos)
* using Bootstrap
* new pages router: nikic/fast-route, allowing for better customisation
* Plugin cronjobs: central control of the cronjobs
* Guild Wars support (available as plugin)
* support for login and create account only by email (configurable)
* with no need for account name
* Google ReCAPTCHA v3 support (available as plugin)
* support for Account Number
* suggest account number option
* many new functions, hooks and configurables
* better Exception Handler (Whoops - https://github.com/filp/whoops)
* automated website tests (using Cypress)
* csrf protection (https://github.com/slawkens/myaac/pull/235)
* option to restrict Page view to specified group of users (Not-Logged in, logged-in players, tutors, gamemasters etc.)
* phpdebug bar (http://phpdebugbar.com/). Activated if env == 'dev', can be also activated in production by enabling "enable_debugbar" in local config
### Changed
* Composer and NPM is now used for external libraries like: Twig, PHPMailer, fast-route, jQuery, Bootstrap etc.
* mail support is disabled on fresh install, can be manually enabled by user
* disable add php pages in admin panel for security. Option to disable plugins upload
* visitors counter shows now user browser, and also if its bot
* changes in required and optional PHP extensions
* reworked Pages:
* Bans
* works now for TFS 1.x
* Highscores
* frags works for TFS 1.x
* cached
* Monsters
* moved pages to Twig:
* experience stages
* update player_deaths entries on name change
* change_password email to be more informal
### Fixed
* hundreds of bug fixes, mostly patched from 0.8, so it makes no sense writing them again here

18
CONTRIBUTORS.txt Normal file
View File

@ -0,0 +1,18 @@
# automatically exported using this script:
# git log --all --format='%cN <%cE>' | sort -u > contributors
# in no particular order
# cleaned for readability
Evil Puncker <EPuncker@users.noreply.github.com>
Fernando Matos <fernando@pixele.com.br>
Lee <42119604+Leesneaks@users.noreply.github.com>
caio <caio.zucoli@gmail.com>
slawkens <slawkens@gmail.com>
tobi132 <tobi132@gmx.net>
vankk <nwtr.otland@hotmail.com>
whiteblXK <krzys16001@gmail.com>
xitobuh <jonas.hockert92@gmail.com>
Danilo Pucci <dnlps@hotmail.com>
gpedro <gpedro831@gmail.com>
Matheus Collier <matheuscollier@gmail.com>
SRNT-GG <95472530+SRNT-GG@users.noreply.github.com>

3
CREDITS Normal file
View File

@ -0,0 +1,3 @@
* Gesior.pl (2007 - 2008)
* Slawkens (2009 - 2025)
* Contributors listed in CONTRIBUTORS.txt

View File

@ -1,18 +1,38 @@
# myaac
# [MyAAC](https://my-aac.org)
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
Official website: https://my-aac.org
### REQUIREMENTS
[![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/slawkens/myaac/cypress.yml)](https://github.com/slawkens/myaac/actions)
[![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)
[![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)
| Version | Status | Branch | Requirements |
|:--------|:-----------------------|:--------|:---------------|
| 2.x | Experimental features | develop | PHP >= 8.1 |
| **1.x** | **Active development** | main | **PHP >= 8.1** |
| 0.9.x | Not developed anymore | 0.9 | PHP >= 7.2.5 |
| 0.8.x | Active support | 0.8 | PHP >= 7.2.5 |
| 0.7.x | End Of Life | 0.7 | PHP >= 5.3.3 |
The recommended version to install is 1.x, which can be found at releases page - [https://github.com/slawkens/myaac/releases](https://github.com/slawkens/myaac/releases).
### Documentation
* [docs.my-aac.org](https://docs.my-aac.org)
* [my-aac.org - FAQ](https://my-aac.org/faqs/)
### Requirements
- PHP 5.1.0 or later
- MySQL database
- PDO PHP Extension
- XML PHP Extension
- ZIP PHP Extension
- (optional) mod_rewrite to use friendly_urls
- PHP Extensions: pdo, xml, json
- (optional) apache2 mod_rewrite (to use friendly_urls)
- (optional) zip PHP Extension (to install plugins)
- (optional) gd PHP Extension (for generating signature images)
### INSTALLATION AND CONFIGURATION
### Installation
Just decompress and untar the source (which you should have done by now,
if you're reading this), into your webserver's document root.
@ -27,19 +47,52 @@ Official website: http://my-aac.org
chmod 660 config.local.php
chmod 660 images/guilds
chmod 660 images/houses
chmod 660 images/screenshots
chmod 660 images/gallery
chmod -R 760 system/cache
Visit http://your_domain/install (http://localhost/install) and follow instructions in the browser.
### KNOWN PROBLEMS
### Configuration
- none -
Check *config.php* to get more information. (Notice: MyAAC 1.0+ doesn't use config.php anymore, it has been moved to Admin Panel - Settings page).
### OTHER NOTES
Use *config.local.php* for your local configuration changes.
If you have a great idea or want contribute to the project - visit our website at http://www.my-aac.org
### Branches
### LICENSING
This repository follows the Git Flow Workflow.
Cheatsheet: [Git-Flow-Cheatsheet](https://danielkummer.github.io/git-flow-cheatsheet)
This program and all associated files are released under the GNU Public
License, see LICENSE for details.
That means, we use:
* main branch, for current stable release
* develop branch, for development version (next release)
* feature branches, for features etc.
### Known Problems
- Some compatibility issues with some exotic distributions.
### Contributing
Contributions are more than welcome.
Pull requests should be made to the *develop* branch as that is the working branch, master is for release code.
Bug fixes to current release should be done to master branch.
Look: [Contributing](https://github.com/otsoft/myaac/wiki/Contributing) in our wiki.
### Other Notes
If you have a great idea or want to contribute to the project - visit our website at https://www.my-aac.org
## Project supported by JetBrains
Many thanks to Jetbrains for kindly providing a license for me to work on this and other open-source projects.
[![JetBrains](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg)](https://www.jetbrains.com/?from=https://github.com/slawkens)
### 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

36
aac Normal file
View File

@ -0,0 +1,36 @@
#!/usr/bin/env php
<?php
require_once __DIR__ . '/common.php';
if(!IS_CLI) {
echo 'This script can be run only in command line mode.';
exit(1);
}
require_once SYSTEM . 'functions.php';
define('SELF_NAME', basename(__FILE__));
use MyAAC\Plugins;
use Symfony\Component\Console\Application;
$application = new Application('MyAAC', MYAAC_VERSION);
$commandsGlob = glob(SYSTEM . 'src/Commands/*.php');
foreach ($commandsGlob as $item) {
$name = pathinfo($item, PATHINFO_FILENAME);
if ($name == 'Command') { // ignore base Command class
continue;
}
$commandPre = '\\MyAAC\Commands\\';
$application->add(new ($commandPre . $name));
}
$pluginCommands = Plugins::getCommands();
foreach ($pluginCommands as $item) {
$application->add(require $item);
}
$application->run();

BIN
admin/images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -0,0 +1,22 @@
<?php
$hooks->register('debugbar_admin_head_end', HOOK_ADMIN_HEAD_END, function ($params) {
global $debugBar;
if (!isset($debugBar)) {
return;
}
$debugBarRenderer = $debugBar->getJavascriptRenderer(BASE_URL . 'vendor/maximebf/debugbar/src/DebugBar/Resources/');
echo $debugBarRenderer->renderHead();
});
$hooks->register('debugbar_admin_body_end', HOOK_ADMIN_BODY_END, function ($params) {
global $debugBar;
if (!isset($debugBar)) {
return;
}
$debugBarRenderer = $debugBar->getJavascriptRenderer(BASE_URL . 'vendor/maximebf/debugbar/src/DebugBar/Resources/');
echo $debugBarRenderer->render();
});

View File

@ -1 +1,2 @@
<?php // nothing yet here ?>
<?php
// nothing yet here

View File

@ -0,0 +1,37 @@
<?php
use MyAAC\Plugins;
$order = 10;
$settingsMenu = [];
$settingsMenu[] = [
'name' => 'MyAAC',
'link' => 'settings&plugin=core',
'icon' => 'list',
'order' => $order,
];
foreach (Plugins::getAllPluginsSettings() as $setting) {
$file = BASE . $setting['settingsFilename'];
if (!file_exists($file)) {
warning('Plugin setting: ' . $file . ' - cannot be loaded.');
continue;
}
$order += 10;
$settings = require $file;
$settingsMenu[] = [
'name' => $settings['name'],
'link' => 'settings&plugin=' . $setting['pluginFilename'],
'icon' => 'list',
'order' => $order,
];
}
unset($settings, $file, $order);
return $settingsMenu;

View File

@ -1 +1,75 @@
<?php // few things we'll need require('../common.php'); require_once(BASE . 'config.local.php'); if(file_exists(BASE . 'install') && (!isset($config['installed']) || !$config['installed'])) { 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!'); } $content = ''; // validate page $page = isset($_GET['p']) ? $_GET['p'] : ''; if(empty($page) || preg_match("/[^a-zA-Z0-9_\-]/", $page)) $page = 'dashboard'; $page = strtolower($page); define('PAGE', $page); require(SYSTEM . 'functions.php'); require(SYSTEM . 'init.php'); require(SYSTEM . 'status.php'); require(SYSTEM . 'login.php'); require(ADMIN . 'includes/functions.php'); // if we're not logged in - show login box if(!$logged || !admin()) { $page = 'login'; } // include our page $file = SYSTEM . 'pages/admin/' . $page . '.php'; if(!@file_exists($file)) { $page = '404'; $file = SYSTEM . 'pages/404.php'; } ob_start(); include($file); $content .= ob_get_contents(); ob_end_clean(); // template $template_path = 'templates/clean/'; require(ADMIN . $template_path . 'template.php'); ?>
<?php
// few things we'll need
use MyAAC\Plugins;
require '../common.php';
const ADMIN_PANEL = true;
const MYAAC_ADMIN = true;
if(file_exists(BASE . 'install') && (!isset($config['installed']) || !$config['installed']))
{
header('Location: ' . BASE_URL . 'install/');
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!');
}
$content = '';
// validate page
$page = $_GET['p'] ?? '';
if(empty($page) || preg_match("/[^a-zA-Z0-9_\-\/.]/", $page))
$page = 'dashboard';
$page = strtolower($page);
define('PAGE', $page);
require SYSTEM . 'functions.php';
require SYSTEM . 'init.php';
require __DIR__ . '/includes/debugbar.php';
require SYSTEM . 'status.php';
require SYSTEM . 'login.php';
require __DIR__ . '/includes/functions.php';
$twig->addGlobal('config', $config);
$twig->addGlobal('status', $status);
if (ACTION == 'logout') {
require SYSTEM . 'logout.php';
}
// if we're not logged in - show login box
if(!$logged || !admin()) {
$page = 'login';
}
$pluginsAdminPages = Plugins::getAdminPages();
if(isset($pluginsAdminPages[$page]) && file_exists(BASE . $pluginsAdminPages[$page])) {
$file = BASE . $pluginsAdminPages[$page];
}
else {
// include our page
$file = __DIR__ . '/pages/' . $page . '.php';
if(!@file_exists($file)) {
if (str_contains($page, 'plugins/')) {
$file = BASE . $page;
}
else {
$page = '404';
$file = SYSTEM . 'pages/404.php';
}
}
}
ob_start();
if($hooks->trigger(HOOK_ADMIN_BEFORE_PAGE)) {
require $file;
}
$content .= ob_get_contents();
ob_end_clean();
// template
$template_path = 'template/';
require __DIR__ . '/' . $template_path . 'template.php';

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

@ -0,0 +1,659 @@
<?php
/**
* Account editor
*
* @package MyAAC
* @author Lee
* @copyright 2020 MyAAC
* @link https://my-aac.org
*/
use MyAAC\Models\Account as AccountModel;
use MyAAC\Models\Player;
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Account editor';
csrfProtect();
$admin_base = ADMIN_URL . '?p=accounts';
$use_datatable = true;
if (setting('core.account_country'))
require SYSTEM . 'countries.conf.php';
$nameOrNumberColumn = getAccountIdentityColumn();
$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 (setting('core.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;
}
$web_acc = ACCOUNT_WEB_FLAGS;
$acc_type = setting('core.account_types');
?>
<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;
$search_account = $search_account_email = '';
if (isset($_REQUEST['id']))
$id = (int)$_REQUEST['id'];
else if (isset($_REQUEST['search_email'])) {
$search_account_email = $_REQUEST['search_email'];
$accountModel = AccountModel::where('email', $search_account_email)->limit(11)->get(['email', 'id']);
if (count($accountModel) == 0) {
echo_error('No entries found.');
} else if (count($accountModel) == 1) {
$id = $accountModel->first()->getKey();
} else if (count($accountModel) > 10) {
echo_error('Specified e-mail resulted with too many accounts.');
}
}
else if (isset($_REQUEST['search'])) {
$search_account = $_REQUEST['search'];
$min_size = 3;
if (in_array($nameOrNumberColumn, ['id', 'number'])) {
$min_size = 1;
}
if (strlen($search_account) < $min_size && !Validator::number($search_account)) {
echo_error('Account ' . $nameOrNumberColumn . ' is too short.');
} else {
$query = AccountModel::where($nameOrNumberColumn, '=', $search_account)->limit(11)->get(['id', $nameOrNumberColumn]);
if (count($query) == 0) {
echo_error('No entries found.');
} else if (count($query) == 1) {
$id = $query->first()->getKey();
} else if (count($query) > 10) {
echo_error('Specified name resulted with too many accounts.');
} else {
$str_construct = 'Do you mean?<ul class="mb-0">';
foreach ($query as $row) {
$str_construct .= '<li><a href="' . $admin_base . '&id=' . $row->getKey() . '">' . $row->attributes[$nameOrNumberColumn] . '</a></li>';
}
$str_construct .= '</ul>';
echo_error($str_construct);
}
}
}
?>
<div class="row">
<?php
$groups = new OTS_Groups_List();
if ($id > 0) {
$account = new OTS_Account();
$account->load($id);
if (isset($_POST['save']) && $account->isLoaded()) {
$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
if(setting('core.account_country')) {
$rl_country = $_POST['rl_country'];
}
$web_flags = $_POST['web_flags'];
verify_number($web_flags, 'Web Flags', 1);
//created
$created = strtotime($_POST['created']);
verify_number($created, 'Created', 11);
//web last login
$web_lastlogin = strtotime($_POST['web_lastlogin']);
verify_number($web_lastlogin, 'Web Last login', 11);
if (!$error && $hooks->trigger(HOOK_ADMIN_ACCOUNTS_SAVE_POST, ['account_id' => $account->getId(), 'account_email' => $account->getEMail()])) {
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);
if(setting('core.account_country')) {
$account->setCountry($rl_country);
}
$account->setCustomField('created', $created);
$account->setWebFlags($web_flags);
$account->setCustomField('web_lastlogin', $web_lastlogin);
if (isset($password)) {
if (USE_ACCOUNT_SALT) {
$salt = generateRandomString(10, false, true, true);
$password = $salt . $password;
$account->setCustomField('salt', $salt);
}
$password = encrypt($password);
$account->setPassword($password);
if (USE_ACCOUNT_SALT)
$account->setCustomField('salt', $salt);
}
$account->save();
echo_success('Account saved at: ' . date('G:i'));
}
}
} else if ($id == 0) {
$accounts_db = $db->query('SELECT `id`, `' . $nameOrNumberColumn . '`' . ($hasTypeColumn ? ',type' : ($hasGroupColumn ? ',group_id' : '')) . ', email FROM `accounts` ORDER BY `id` ASC');
?>
<div class="col-12 col-sm-12 col-lg-10">
<div class="card card-info card-outline">
<div class="card-header">
<h5 class="m-0">Accounts</h5>
</div>
<div class="card-body">
<table class="acc_datatable table table-striped table-bordered table-responsive d-md-table">
<thead>
<tr>
<th>ID</th>
<th><?= ($nameOrNumberColumn == 'name' ? 'Name' : 'Number'); ?></th>
<?php if($hasTypeColumn || $hasGroupColumn): ?>
<th>E-Mail</th>
<th>Position</th>
<?php endif; ?>
<th style="width: 40px">Edit</th>
</tr>
</thead>
<tbody>
<?php foreach ($accounts_db as $account_lst): ?>
<tr>
<th><?php echo $account_lst['id']; ?></th>
<td><?php echo $account_lst[$nameOrNumberColumn]; ?></a></td>
<td><?php echo $account_lst['email']; ?></td>
<?php if($hasTypeColumn || $hasGroupColumn): ?>
<td>
<?php if ($hasTypeColumn) {
echo $acc_type[$account_lst['type']];
} elseif ($hasGroupColumn) {
$group = $groups->getGroups();
echo $group[$account_lst['group_id']];
} ?>
</td>
<?php endif; ?>
<td><a href="?p=accounts&id=<?php echo $account_lst['id']; ?>" class="btn btn-success btn-sm" title="Edit">
<i class="fas fa-pencil-alt"></i>
</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
<?php } ?>
<?php if (isset($account) && $account->isLoaded()) { ?>
<div class="col-12 col-sm-12 col-lg-10">
<div class="card card-primary card-outline card-outline-tabs">
<div class="card-header p-0 border-bottom-0">
<ul class="nav nav-tabs" id="accounts-tab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="accounts-acc-tab" data-toggle="pill" href="#accounts-acc">Account</a>
</li>
<li class="nav-item">
<a class="nav-link" id="accounts-logs-tab" data-toggle="pill" href="#accounts-logs">Logs</a>
</li>
<li class="nav-item">
<a class="nav-link" id="accounts-chars-tab" data-toggle="pill" href="#accounts-chars">Characters</a>
</li>
<?php if ($db->hasTable('bans')) : ?>
<li class="nav-item">
<a class="nav-link" id="accounts-bans-tab" data-toggle="pill" href="#accounts-bans">Bans</a>
</li>
<?php endif;
if ($db->hasTable('store_history') && $db->hasColumn('store_history', 'time')) : ?>
<li class="nav-item">
<a class="nav-link" id="accounts-store-tab" data-toggle="pill" href="#accounts-store">Store History</a>
</li>
<?php endif; ?>
</ul>
</div>
<div class="card-body">
<div class="tab-content" id="accounts-tabContent">
<div class="tab-pane fade active show" id="accounts-acc">
<form action="<?php echo $admin_base . ($id > 0 ? '&id=' . $id : ''); ?>" method="post">
<?php csrf(); ?>
<div class="form-group row">
<?php if (USE_ACCOUNT_NAME): ?>
<div class="col-12 col-sm-12 col-lg-4">
<label for="name">Account Name:</label>
<input type="text" class="form-control" id="name" name="name" autocomplete="off" value="<?php echo $account->getName(); ?>"/>
</div>
<?php elseif (USE_ACCOUNT_NUMBER): ?>
<div class="col-12 col-sm-12 col-lg-4">
<label for="name">Account Number:</label>
<input type="text" class="form-control" id="name" name="name" autocomplete="off" value="<?php echo $account->getNumber(); ?>"/>
</div>
<?php endif; ?>
<div class="col-12 col-sm-12 col-lg-5">
<div class="form-check">
<input type="checkbox"
name="c_pass"
id="c_pass"
value="false"
class="form-check-input"/>
<label for="c_pass">Password: (check to change)</label>
</div>
<div class="input-group">
<input type="text" class="form-control" id="pass" name="pass" autocomplete="off" maxlength="20" value=""/>
</div>
</div>
<div class="col-12 col-sm-12 col-lg-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" size="8" maxlength="11" disabled value="<?php echo $account->getId(); ?>"/>
</div>
</div>
<div class="form-group row">
<?php
$acc_group = $account->getAccGroupId();
if ($hasTypeColumn) {
?>
<div class="col-12 col-sm-12 col-lg-6">
<label for="group">Account Type:</label>
<select name="group" id="group" class="form-control">
<?php foreach ($acc_type as $_id => $a_type): ?>
<option value="<?php echo($_id); ?>" <?php echo($acc_group == ($_id) ? 'selected' : ''); ?>><?php echo $a_type; ?></option>
<?php endforeach; ?>
</select>
</div>
<?php
} elseif ($hasGroupColumn) {
?>
<div class="col-12 col-sm-12 col-lg-6">
<label for="group">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-12 col-sm-12 col-lg-6">
<label for="web_flags">Website Access:</label>
<select name="web_flags" id="web_flags" class="form-control">
<?php 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="form-group row">
<?php if ($hasSecretColumn): ?>
<div class="col-12 col-sm-12 col-lg-6">
<label for="secret">Secret:</label>
<input type="text" class="form-control" id="secret" name="secret" autocomplete="off" value="<?php echo $account->getCustomField('secret'); ?>"/>
</div>
<?php endif; ?>
<div class="col-12 col-sm-12 col-lg-6">
<label for="key">Recovery Key:</label>
<input type="text" class="form-control" id="key" name="key" autocomplete="off" value="<?php echo $account->getCustomField('key'); ?>"/>
</div>
</div>
<div class="form-group row">
<div class="col-12 col-sm-12 col-lg-6">
<label for="email">Email:</label><?php echo (setting('core.mail_enabled') ? ' (<a href="' . ADMIN_URL . '?p=mailer&mail_to=' . $account->getEMail() . '">Send Mail</a>)' : ''); ?>
<input type="text" class="form-control" id="email" name="email" autocomplete="off" value="<?php echo $account->getEMail(); ?>"/>
</div>
<?php if ($hasCoinsColumn): ?>
<div class="col-12 col-sm-12 col-lg-6">
<label for="t_coins">Tibia Coins:</label>
<input type="text" class="form-control" id="t_coins" name="t_coins" autocomplete="off" maxlength="11" value="<?php echo $account->getCustomField('coins') ?>"/>
</div>
<?php endif; ?>
<div class="col-12 col-sm-12 col-lg-6">
<label for="p_days">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-12 col-sm-12 col-lg-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="form-group row">
<div class="col-12 col-sm-12 col-lg-4">
<label for="rl_name">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-12 col-sm-12 col-lg-4">
<label for="rl_loca">Location:</label>
<input type="text" class="form-control" id="rl_loca" name="rl_loca"
autocomplete="off" maxlength="20"
value="<?php echo $account->getLocation(); ?>"/>
</div>
<?php if(setting('core.account_country')): ?>
<div class="col-12 col-sm-12 col-lg-4">
<label for="rl_country">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>
<?php endif; ?>
</div>
<div class="form-group row">
<div class="col-12 col-sm-12 col-lg-6">
<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 date("M d Y, H:i:s", $account->getCustomField('created')); ?>"/>
</div>
<div class="col-12 col-sm-12 col-lg-6">
<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 date("M d Y, H:i:s", $account->getCustomField('web_lastlogin')); ?>"/>
</div>
</div>
<input type="hidden" name="save" value="yes"/>
<button type="submit" class="btn btn-info"><i class="fas fa-update"></i> Update</button>
<a href="<?php echo ADMIN_URL; ?>?p=accounts" class="btn btn-danger float-right"><i class="fas fa-cancel"></i> Cancel</a>
</form>
</div>
<div class="tab-pane fade" id="accounts-logs">
<div class="row">
<table class="table table-striped table-condensed table-responsive d-md-table">
<thead>
<tr>
<th>#</th>
<th>Date</th>
<th>Action</th>
<th>IP</th>
</tr>
</thead>
<tbody>
<?php
$accountActions = \MyAAC\Models\AccountAction::where('account_id', $account->getId())->orderByDesc('date')->get();
foreach ($accountActions as $i => $log):
$log->ip = ($log->ip != 0 ? long2ip($log->ip) : inet_ntop($log->ipv6));
?>
<tr>
<td><?php echo $i + 1; ?></td>
<td><?= date("M d Y, H:i:s", $log->date); ?></td>
<td><?= $log->action; ?></td>
<td><?= $log->ip; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<div class="tab-pane fade" id="accounts-chars">
<div class="row">
<?php
if (isset($account) && $account->isLoaded()) {
$account_players = Player::where('account_id', $account->getId())->orderBy('id')->get();
if (isset($account_players)) { ?>
<table class="table table-striped table-condensed table-responsive d-md-table">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Level</th>
<th>Vocation</th>
<th style="width: 40px">Edit</th>
</tr>
</thead>
<tbody>
<?php foreach ($account_players as $i => $player): ?>
<tr>
<th><?php echo $i + 1; ?></th>
<td><?php echo $player->name; ?></td>
<td><?php echo $player->level; ?></td>
<td><?php echo $player->vocation_name; ?></td>
<td><a href="?p=players&id=<?php echo $player->getKey() ?>" class=" btn btn-success btn-sm" title="Edit"><i class="fas fa-pencil-alt"></i></a></td>
</tr>
<?php endforeach ?>
</tbody>
</table>
<?php
}
} ?>
</div>
</div>
<?php if ($db->hasTable('bans')) : ?>
<div class="tab-pane fade" id="accounts-bans">
<?php
$bans = $db->query('SELECT * FROM ' . $db->tableName('bans') . ' WHERE ' . $db->fieldName('active') . ' = 1 AND ' . $db->fieldName('id') . ' = ' . $account->getId() . ' ORDER BY ' . $db->fieldName('added') . ' DESC LIMIT 10');
if ($bans->rowCount()) {
?>
<table class="table table-striped table-condensed table-responsive d-md-table">
<thead>
<tr>
<th>Nick</th>
<th>Type</th>
<th>Expires</th>
<th>Reason</th>
<th>Comment</th>
<th>Added by:</th>
</tr>
</thead>
<tbody>
<?php
foreach ($bans as $ban) {
?>
<tr>
<td><?php
$pName = getPlayerNameByAccount($ban['value']);
echo '<a href="?p=players&search=' . $pName . '">' . $pName . '</a>'; ?>
</td>
<td><?php echo getBanType($ban['type']); ?></td>
<td>
<?php
if ($ban['expires'] == "-1")
echo 'Never';
else
echo date("H:i:s", $ban['expires']) . '<br/>' . date("d M Y", $ban['expires']);
?>
</td>
<td><?php echo getBanReason($ban['reason']); ?></td>
<td><?php echo $ban['comment']; ?></td>
<td>
<?php
if ($ban['admin_id'] == "0")
echo 'Autoban';
else
$aName = getPlayerNameByAccount($ban['admin_id']);
echo '<a href="?p=players&search=' . $aName . '">' . $aName . '</a>';
echo '<br/>' . date("d.m.Y", $ban['added']);
?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<?php
} else {
echo 'No Account bans.';
} ?>
</div>
<?php endif;
if ($db->hasTable('store_history') && $db->hasColumn('store_history', 'time')) { ?>
<div class="tab-pane fade" id="accounts-store">
<?php $store_history = $db->query('SELECT * FROM `store_history` WHERE `account_id` = "' . $account->getId() . '" ORDER BY `time` DESC')->fetchAll(); ?>
<table class="table table-striped table-condensed table-responsive d-md-table">
<thead>
<tr>
<th>Description</th>
<th>Coins</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<?php foreach ($store_history as $p): ?>
<tr>
<td><?php echo $p['description']; ?></td>
<td><?php echo $p['coin_amount']; ?></td>
<td><?php echo date('d M y H:i:s', $p['time']); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
<?php } ?>
<div class="col-12 col-sm-12 col-lg-2">
<div class="card card-info card-outline">
<div class="card-header">
<h5 class="m-0">Search Accounts</h5>
</div>
<div class="card-body">
<div class="row">
<div class="col-6 col-lg-12">
<form action="<?php echo $admin_base; ?>" method="post">
<?php csrf(); ?>
<label for="search">Account E-Mail:</label>
<div class="input-group input-group-sm">
<input type="email" class="form-control" id="search_email" name="search_email" value="<?= escapeHtml($search_account_email); ?>" maxlength="255" size="255">
<span class="input-group-append"><button type="submit" class="btn btn-info btn-flat">Search</button></span>
</div>
</form>
</div>
<div class="col-6 col-lg-12">
<form action="<?php echo $admin_base; ?>" method="post">
<?php csrf(); ?>
<label for="search">Account Name:</label>
<div class="input-group input-group-sm">
<input type="text" class="form-control" id="search" name="search" value="<?= escapeHtml($search_account); ?>" maxlength="32" size="32">
<span class="input-group-append"><button type="submit" class="btn btn-info btn-flat">Search</button></span>
</div>
</form>
</div>
<div class="col-6 col-lg-12">
<form action="<?php echo $admin_base; ?>" method="post">
<?php csrf(); ?>
<label for="id">Account ID:</label>
<div class="input-group input-group-sm">
<input type="text" class="form-control" id="id" name="id" value="<?= $id; ?>" maxlength="32" size="32">
<span class="input-group-append"><button type="submit" class="btn btn-info btn-flat">Search</button></span>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
$('#created').datetimepicker({format: "M d Y, H:i:s",});
$('#web_lastlogin').datetimepicker({format: 'M d Y, H:i:s'});
$('#c_pass').change(function () {
const ipass = $('input[name=pass]');
ipass[0].disabled = !this.checked;
ipass[0].value = '';
}).change();
$('.acc_datatable').DataTable({
"order": [[0, "asc"]]
});
});
</script>

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

@ -0,0 +1,131 @@
<?php
/**
* CHANGELOG modifier
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @author Lee
* @copyright 2020 MyAAC
* @link https://my-aac.org
*/
use MyAAC\Changelog;
use MyAAC\Models\Changelog as ModelsChangelog;
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Changelog';
csrfProtect();
if (!hasFlag(FLAG_CONTENT_PAGES) && !superAdmin()) {
echo 'Access denied.';
return;
}
$use_datatable = true;
const CL_LIMIT = 600; // maximum changelog body length
$id = $_GET['id'] ?? 0;
if(!empty($action) && isRequestMethod('post'))
{
$id = $_POST['id'] ?? null;
$body = isset($_POST['body']) ? stripslashes($_POST['body']) : null;
$create_date = isset($_POST['createdate']) ? (int)strtotime($_POST['createdate'] ): null;
$player_id = isset($_POST['player_id']) ? (int)$_POST['player_id'] : null;
$type = isset($_POST['type']) ? (int)$_POST['type'] : null;
$where = isset($_POST['where']) ? (int)$_POST['where'] : null;
$errors = array();
if($action == 'new') {
if(isset($body) && Changelog::add($body, $type, $where, $player_id, $create_date, $errors)) {
$body = '';
$type = $where = $player_id = $create_date = 0;
success('Added successful.');
}
}
else if($action == 'delete') {
if (Changelog::delete($id, $errors)) {
success('Deleted successful.');
}
}
else if($action == 'edit')
{
if(isset($id) && !isset($body)) {
$cl = Changelog::get($id);
$body = $cl['body'];
$type = $cl['type'];
$where = $cl['where'];
$create_date = $cl['date'];
$player_id = $cl['player_id'];
}
else {
if(Changelog::update($id, $body, $type, $where, $player_id, $create_date,$errors)) {
$action = $body = '';
$type = $where = $player_id = $create_date = 0;
success('Updated successful.');
}
}
}
else if($action == 'hide') {
if (Changelog::toggleHide($id, $errors, $status)) {
success(($status == 1 ? 'Hide' : 'Show') . ' successful.');
}
}
if(!empty($errors))
error(implode(", ", $errors));
}
$changelogs = ModelsChangelog::orderBy('id')->get()->toArray();
$i = 0;
$log_type = [
['id' => 1, 'icon' => 'added'],
['id' => 2, 'icon' => 'removed'],
['id' => 3, 'icon' => 'changed'],
['id' => 4, 'icon' => 'fixed'],
];
$log_where = [
['id' => 1, 'icon' => 'server'],
['id' => 2, 'icon' => 'website'],
];
foreach($changelogs as $key => &$log)
{
$log['type'] = getChangelogType($log['type']);
$log['where'] = getChangelogWhere($log['where']);
}
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.changelog.form.html.twig', array(
'action' => $action,
'cl_link_form' => constant('ADMIN_URL').'?p=changelog',
'cl_id' => $id ?? null,
'body' => isset($body) ? escapeHtml($body) : '',
'create_date' => $create_date ?? '',
'player_id' => $player_id ?? null,
'account_players' => $account_players,
'type' => $type ?? 0,
'where' => $where ?? 0,
'log_type' => $log_type,
'log_where' => $log_where,
));
}
$twig->display('admin.changelog.html.twig', array(
'changelogs' => $changelogs,
));

25
admin/pages/clmd.php Normal file
View File

@ -0,0 +1,25 @@
<?php
/**
* CHANGELOG viewer
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @author Lee
* @copyright 2020 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;
}
$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>';

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

@ -0,0 +1,63 @@
<?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';
csrfProtect();
if (isset($_POST['clear_cache'])) {
if (clearCache()) {
success('Cache cleared.');
} else {
error('Error while clearing cache.');
}
}
if (isset($_POST['maintenance'])) {
$message = (!empty($_POST['message']) ? $_POST['message'] : null);
$_status = (isset($_POST['status']) && $_POST['status'] == 'true');
$_status = ($_status ? '0' : '1');
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;
$settingAdminPanelModules = setting('core.admin_panel_modules');
if (count($settingAdminPanelModules) > 0) {
echo '<div class="row">';
$twig_loader->prependPath(__DIR__ . '/modules/templates');
foreach ($settingAdminPanelModules as $box) {
$file = __DIR__ . '/modules/' . $box . '.php';
if (file_exists($file)) {
include($file);
}
}
echo '</div>';
}

13
admin/pages/data.php Normal file
View File

@ -0,0 +1,13 @@
<?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 = 'Server Data';
$twig->display('admin.data.html.twig');

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';
csrfProtect();
require PAGES . 'account/login.php';
if ($logged) {
header('Location: ' . (admin() ? ADMIN_URL : BASE_URL));
return;
}
$twig->display('admin.login.html.twig', [
'logout' => (ACTION == 'logout' ? 'You have been logged out!' : ''),
'account' => USE_ACCOUNT_NAME ? 'Name' : 'Number',
'account_login_by' => getAccountLoginByLabel(),
'errors' => $errors ?? ''
]);

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

@ -0,0 +1,83 @@
<?php
/**
* Logs
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2020 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Logs Viewer';
$use_datatable = true;
$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) || $f === 'index.html') {
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);
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) {
$file_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' => $file_content));
}
} else {
echo 'Invalid file name specified.';
}
}
$twig->display('admin.logs.html.twig', array('files' => $files));

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

@ -0,0 +1,88 @@
<?php
/**
* Mailer
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
use MyAAC\Models\Account;
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Mailer';
csrfProtect();
if (!hasFlag(FLAG_CONTENT_MAILER) && !superAdmin()) {
echo 'Access denied.';
return;
}
if (!setting('core.mail_enabled')) {
echo 'Mail support disabled in config.';
return;
}
$mail_to = isset($_POST['mail_to']) ? stripslashes(trim($_POST['mail_to'])) : null;
$mail_subject = isset($_POST['mail_subject']) ? stripslashes($_POST['mail_subject']) : null;
$mail_content = isset($_POST['mail_content']) ? stripslashes($_POST['mail_content']) : null;
if (isset($_POST['submit'])) {
if (empty($mail_subject)) {
warning('Please enter subject of the message.');
}
if (empty($mail_content)) {
warning('Please enter content of the message.');
}
}
if (!empty($mail_to)) {
if(!Validator::email($mail_to)) {
warning('E-Mail is invalid.');
}
else {
if (!empty($mail_content) && !empty($mail_subject)) {
if (_mail($mail_to, $mail_subject, $mail_content)) {
success("Successfully mailed <strong>$mail_to</strong>");
}
else {
error("Error while sending mail to <strong>$mail_to</strong>. More info can be found in system/logs/mailer-error.log");
}
}
}
}
if (!empty($mail_content) && !empty($mail_subject) && empty($mail_to)) {
$success = 0;
$failed = 0;
$add = '';
if (setting('core.account_mail_verify')) {
note('Note: Sending only to users with verified E-Mail.');
$add = ' AND `email_verified` = 1';
}
$query = Account::where('email', '!=', '')->get(['email']);
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.");
}
$twig->display('admin.mailer.html.twig', [
'mail_to' => $mail_to,
'mail_subject' => $mail_subject,
'mail_content' => $mail_content
]);

View File

@ -0,0 +1,186 @@
<?php
/**
* Account Admin Tool
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @author Lee
* @copyright 2020 MyAAC
* @link https://my-aac.org
*/
use MyAAC\Models\Account;
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Mass Account Actions';
csrfProtect();
$hasCoinsColumn = $db->hasColumn('accounts', 'coins');
$hasPointsColumn = $db->hasColumn('accounts', 'premium_points');
$freePremium = $config['lua']['freePremium'];
function admin_give_points($points)
{
global $hasPointsColumn;
if (!$hasPointsColumn) {
displayMessage('Points not supported.');
return;
}
if (!Account::query()->increment('premium_points', $points)) {
displayMessage('Failed to add points.');
return;
}
displayMessage($points . ' points added to all accounts.', true);
}
function admin_give_coins($coins)
{
global $hasCoinsColumn;
if (!$hasCoinsColumn) {
displayMessage('Coins not supported.');
return;
}
if (!Account::query()->increment('coins', $coins)) {
displayMessage('Failed to add coins.');
return;
}
displayMessage($coins . ' coins added to all accounts.', true);
}
function admin_give_premdays($days)
{
global $db, $freePremium;
if ($freePremium) {
displayMessage('Premium days not supported. Free Premium enabled.');
return;
}
$value = $days * 86400;
$now = time();
// othire
if ($db->hasColumn('accounts', 'premend')) {
// append premend
if (Account::where('premend', '>', $now)->increment('premend', $value)) {
// set premend
if (Account::where('premend', '<=', $now)->update(['premend' => $now + $value])) {
displayMessage($days . ' premium days added to all accounts.', true);
return;
} else {
displayMessage('Failed to execute set query.');
return;
}
} else {
displayMessage('Failed to execute append query.');
return;
}
return;
}
// tfs 0.x
if ($db->hasColumn('accounts', 'premdays')) {
// append premdays
if (Account::query()->update(['premdays' => $days])) {
// append lastday
if (Account::where('lastday', '>', $now)->increment('lastday', $value)) {
// set lastday
if (Account::where('lastday', '<=', $now)->update(['lastday' => $now + $value])) {
displayMessage($days . ' premium days added to all accounts.', true);
return;
} else {
displayMessage('Failed to execute set query.');
return;
}
return;
} else {
displayMessage('Failed to execute append query.');
return;
}
} else {
displayMessage('Failed to execute set days query.');
return;
}
return;
}
// tfs 1.x
if ($db->hasColumn('accounts', 'premium_ends_at')) {
// append premium_ends_at
if (Account::where('premium_ends_at', '>', $now)->increment('premium_ends_at', $value)) {
// set premium_ends_at
if (Account::where('premium_ends_at', '<=', $now)->update(['premium_ends_at' => $now + $value])) {
displayMessage($days . ' premium days added to all accounts.', true);
return;
} else {
displayMessage('Failed to execute set query.');
return;
}
} else {
displayMessage('Failed to execute append query.');
return;
}
return;
}
displayMessage('Premium Days not supported.');
}
if (!empty(ACTION) && isRequestMethod('post')) {
$action = ACTION;
if (preg_match("/[^A-z0-9_\-]/", $action)) {
displayMessage('Invalid action.');
} else {
$value = isset($_POST['value']) ? intval($_POST['value']) : 0;
if (!$value) {
displayMessage('Please fill all inputs');
} else {
switch ($action) {
case 'give-points':
admin_give_points($value);
break;
case 'give-coins':
admin_give_coins($value);
break;
case 'give-premdays':
admin_give_premdays($value);
break;
default:
displayMessage('Action ' . $action . 'not found.');
}
}
}
}
else {
$twig->display('admin.tools.account.html.twig', array(
'hasCoinsColumn' => $hasCoinsColumn,
'hasPointsColumn' => $hasPointsColumn,
'freePremium' => $freePremium,
));
}
function displayMessage($message, $success = false) {
global $twig, $hasCoinsColumn, $hasPointsColumn, $freePremium;
$success ? success($message): error($message);
$twig->display('admin.tools.account.html.twig', array(
'hasCoinsColumn' => $hasCoinsColumn,
'hasPointsColumn' => $hasPointsColumn,
'freePremium' => $freePremium,
));
}

View File

@ -0,0 +1,107 @@
<?php
/**
* Teleport Admin Tool
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @author Lee
* @copyright 2020 MyAAC
* @link https://my-aac.org
*/
use MyAAC\Models\Player;
use MyAAC\Models\PlayerOnline;
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Mass Teleport Actions';
csrfProtect();
function admin_teleport_position($x, $y, $z) {
if (!Player::query()->update([
'posx' => $x, 'posy' => $y, 'posz' => $z
])) {
displayMessage('Failed to execute query. Probably already updated.');
return;
}
displayMessage('Player\'s position updated.', true);
}
function admin_teleport_town($town_id) {
if (!Player::query()->update([
'town_id' => $town_id,
])) {
displayMessage('Failed to execute query. Probably already updated.');
return;
}
displayMessage('Player\'s town updated.', true);
}
if (!empty(ACTION) && isRequestMethod('post')) {
$action = ACTION;
if (preg_match("/[^A-z0-9_\-]/", $action)) {
displayMessage('Invalid action.');
} else {
$playersOnline = 0;
if($db->hasTable('players_online')) {// tfs 1.0
$playersOnline = PlayerOnline::count();
} else {
$playersOnline = Player::online()->count();
}
if ($playersOnline > 0) {
displayMessage('Please, close the server before execute this action otherwise players will not be affected.');
return;
}
$town_id = isset($_POST['town_id']) ? intval($_POST['town_id']) : null;
$posx = isset($_POST['posx']) ? intval($_POST['posx']) : null;
$posy = isset($_POST['posy']) ? intval($_POST['posy']) : null;
$posz = isset($_POST['posz']) ? intval($_POST['posz']) : null;
$to_temple = $_POST['to_temple'] ?? null;
switch ($action) {
case 'set-town':
if (!$town_id) {
displayMessage('Please fill all inputs');
return;
}
if (!isset($config['towns'][$town_id])) {
displayMessage('Specified town does not exist');
return;
}
admin_teleport_town($town_id);
break;
case 'set-position':
if (!$to_temple && ($posx < 0 || $posx > 65535 || $posy < 0 || $posy > 65535|| $posz < 0 || $posz > 16)) {
displayMessage('Invalid Position');
return;
}
admin_teleport_position($posx, $posy, $posz);
break;
default:
displayMessage('Action ' . $action . 'not found.');
}
}
}
else {
$twig->display('admin.tools.teleport.html.twig', array());
}
function displayMessage($message, $success = false) {
global $twig;
$success ? success($message): error($message);
$twig->display('admin.tools.teleport.html.twig', array());
}

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

@ -0,0 +1,210 @@
<?php
/**
* Menus
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
use MyAAC\Cache\Cache;
use MyAAC\Models\Menu;
use MyAAC\Plugins;
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Menus';
csrfProtect();
if (!hasFlag(FLAG_CONTENT_MENUS) && !superAdmin()) {
echo 'Access denied.';
return;
}
$pluginThemes = Plugins::getThemes();
if (isset($_POST['template'])) {
$template = $_POST['template'];
if (isset($_POST['save'])) {
$post_menu = $_POST['menu'] ?? [];
$post_menu_link = $_POST['menu_link'] ?? [];
$post_menu_blank = $_POST['menu_blank'] ?? [];
$post_menu_color = $_POST['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;
}
Menu::where('template', $template)->delete();
foreach ($post_menu as $category => $menus) {
foreach ($menus as $i => $menu) {
if (empty($menu)) // don't save empty menu item
continue;
try {
Menu::create([
'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());
}
}
}
onTemplateMenusChange();
success('Saved at ' . date('H:i'));
}
$path = TEMPLATES . $template;
if (isset($pluginThemes[$template])) {
$path = BASE . $pluginThemes[$template];
}
$path .= '/config.php';
if (file_exists($path)) {
require_once $path;
} 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;
}
if (isset($_GET['reset_colors'])) {
foreach ($config['menu_categories'] as $id => $options) {
$color = $options['default_links_color'] ?? ($config['menu_default_links_color'] ?? ($config['menu_default_color'] ?? '#ffffff'));
Menu::where('template', $template)->where('category', $id)->update(['color' => str_replace('#', '', $color)]);
}
onTemplateMenusChange();
success('Colors has been reset at ' . date('H:i'));
}
if (isset($_GET['reset_menus'])) {
$configMenus = config('menus');
if (isset($configMenus)) {
Plugins::installMenus($template, config('menus'), true);
onTemplateMenusChange();
success('Menus has been reset at ' . date('H:i'));
}
else {
error("This template don't support reinstalling menus.");
}
}
$title = 'Menus - ' . $template;
$canResetColors = isset($config['menu_default_color']) || isset($config['menu_default_links_color']);
foreach ($config['menu_categories'] as $id => $options) {
if (isset($options['default_links_color'])) {
$canResetColors = true;
}
}
$twig->display('admin.menus.header.html.twig', [
'template' => $template,
'canResetColors' => $canResetColors
]);
?>
<?php
$menus = Menu::query()
->select('name', 'link', 'blank', 'color', 'category', 'ordering')
->where('enabled', 1)
->where('template', $template)
->orderBy('ordering')
->get()
->groupBy('category')
->toArray();
$last_id = array();
?>
<form method="post" id="menus-form" action="?p=menus">
<?php csrf(); ?>
<input type="hidden" name="template" value="<?php echo $template ?>"/>
<button type="submit" name="save" class="btn btn-info">Save</button><br/><br/>
<div class="row">
<?php foreach ($config['menu_categories'] as $id => $cat): ?>
<div class="col-md-12 col-lg-6">
<div class="card card-info card-outline">
<div class="card-header">
<h5 class="m-0"><?php echo $cat['name'] ?> <i class="far fa-plus-square add-button" id="add-button-<?php echo $id ?>"></i></h5>
</div>
<div class="card-body">
<ul class="sortable" id="sortable-<?php echo $id ?>">
<?php
if (isset($menus[$id])) {
$i = 0;
foreach ($menus[$id] as $menu):
$color = (empty($menu['color']) ? ($cat['default_links_color'] ?? ($config['menu_default_links_color'] ?? ($config['menu_default_color'] ?? '#ffffff'))) : '#' . $menu['color']);
?>
<li class="ui-state-default" id="list-<?php echo $id ?>-<?php echo $i ?>"><label>Name:</label> <input type="text" name="menu[<?php echo $id ?>][]" value="<?php echo escapeHtml($menu['name']); ?>"/>
<label>Link:</label> <input type="text" name="menu_link[<?php echo $id ?>][]" value="<?php echo $menu['link'] ?>"/>
<input type="hidden" name="menu_blank[<?php echo $id ?>][]" value="0"/>
<label><input class="blank-checkbox" type="checkbox" <?php echo($menu['blank'] == 1 ? 'checked' : '') ?>/><span title="Open in New Window">New Window</span></label>
<input class="color-picker" type="text" name="menu_color[<?php echo $id ?>][]" value="<?php echo $color; ?>"/>
<a class="remove-button" id="remove-button-<?php echo $id ?>-<?php echo $i ?>"><i class="fas fa-trash"></a></i></li>
<?php $i++; $last_id[$id] = $i;
endforeach;
} ?>
</ul>
</div>
</div>
</div>
<?php endforeach ?>
</div>
<div class="row pb-2">
<div class="col-md-12">
<button type="submit" name="save" class="btn btn-info">Save</button>
<?php
echo '<button type="button" class="btn btn-danger float-right" value="Cancel" onclick="window.location = \'' . ADMIN_URL . '?p=menus\';"><i class="fas fa-cancel"></i> Cancel</button>';
?>
</div>
</div>
</form>
<?php
$twig->display('admin.menus.js.html.twig', array(
'menus' => $menus,
'last_id' => $last_id,
));
?>
<?php
} else {
$templates = Menu::select('template')->distinct()->get()->toArray();
foreach ($templates as $key => $value) {
$path = TEMPLATES . $value['template'];
if (isset($pluginThemes[$value['template']])) {
$path = BASE . $pluginThemes[$value['template']];
}
if (!file_exists($path . '/config.php')) {
unset($templates[$key]);
}
}
$twig->display('admin.menus.form.html.twig', array(
'templates' => $templates
));
}
function onTemplateMenusChange(): void
{
$cache = Cache::getInstance();
if ($cache->enabled()) {
$cache->delete('template_menus');
}
}

View File

@ -0,0 +1,15 @@
<?php
use MyAAC\Models\Player;
defined('MYAAC') or die('Direct access not allowed!');
$balance = 0;
if ($db->hasColumn('players', 'balance')) {
$balance = Player::orderByDesc('balance')->limit(10)->get(['balance', 'id','name', 'level'])->toArray();
}
$twig->display('balance.html.twig', array(
'balance' => $balance
));

View File

@ -0,0 +1,15 @@
<?php
use MyAAC\Models\Account;
defined('MYAAC') or die('Direct access not allowed!');
$coins = 0;
if ($db->hasColumn('accounts', 'coins')) {
$coins = Account::orderByDesc('coins')->limit(10)->get(['coins', (USE_ACCOUNT_NAME ? 'name' : 'id')])->toArray();
}
$twig->display('coins.html.twig', array(
'coins' => $coins
));

View File

@ -0,0 +1,15 @@
<?php
use MyAAC\Models\Account;
defined('MYAAC') or die('Direct access not allowed!');
$accounts = 0;
if ($db->hasColumn('accounts', 'created')) {
$accounts = Account::orderByDesc('created')->limit(10)->get(['id', 'created'])->toArray();
}
$twig->display('created.html.twig', array(
'accounts' => $accounts,
));

View File

@ -0,0 +1,15 @@
<?php
use MyAAC\Models\Player;
defined('MYAAC') or die('Direct access not allowed!');
$players = 0;
if ($db->hasColumn('players', 'lastlogin')) {
$players = Player::orderByDesc('lastlogin')->limit(10)->get(['name', 'level', 'lastlogin'])->toArray();
}
$twig->display('lastlogin.html.twig', array(
'players' => $players,
));

View File

@ -0,0 +1,15 @@
<?php
use MyAAC\Models\Account;
defined('MYAAC') or die('Direct access not allowed!');
$points = 0;
if ($db->hasColumn('accounts', 'premium_points')) {
$coins = Account::orderByDesc('premium_points')->limit(10)->get(['premium_points', (USE_ACCOUNT_NAME ? 'name' : 'id')])->toArray();
}
$twig->display('points.html.twig', array(
'points' => $points,
));

View File

@ -0,0 +1,46 @@
<?php
defined('MYAAC') or die('Direct access not allowed!');
if (isset($status)) {
$error_icon = '<i class="fas fa-exclamation-circle text-danger"></i>'; ?>
<div class=" col-md-6 col-lg-6">
<div class="card card-info card-outline">
<div class="card-header border-bottom-0">
<span class="font-weight-bold m-0">Server Status</span> <span class="float-right small"><b>Last checked</b>: <?php echo(isset($status['lastCheck']) ? date("l, d.m.Y H:i:s", $status['lastCheck']) : $error_icon); ?></span>
</div>
<div class="card-body p-0 ">
<table class="table">
<tbody>
<tr>
<th width="30%">Server</th>
<td><?php echo(isset($status['server']) & isset($status['serverVersion']) ? $status['server'] . ' x ' . $status['serverVersion'] : $error_icon) ?></td>
</tr>
<tr>
<th>Client</th>
<td><?php echo(isset($status['clientVersion']) ? $status['clientVersion'] : $error_icon) ?></td>
</tr>
<tr>
<th>Map</th>
<td>
<?php if (isset($status['mapName']) & isset($status['mapAuthor']) & isset($status['mapWidth']) & isset($status['mapHeight'])) {
echo $status['mapName'] . ' by <b>' . $status['mapAuthor'] . '</b><br/>' . $status['mapWidth'] . ' x ' . $status['mapHeight'];
} else {
echo $error_icon;
} ?>
</td>
</tr>
<tr>
<th>Monsters</th>
<td><?php echo (isset($status['monsters']) ? $status['monsters'] : $error_icon); ?></td>
</tr>
<tr>
<th>MOTD:</th>
<td><?php echo(isset($status['motd']) ? $status['motd'] : $error_icon); ?></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<?php } ?>

View File

@ -0,0 +1,21 @@
<?php
use MyAAC\Models\Account;
use MyAAC\Models\Guild;
use MyAAC\Models\House;
use MyAAC\Models\Monster;
use MyAAC\Models\Player;
defined('MYAAC') or die('Direct access not allowed!');
$count = $eloquentConnection->query()
->select([
'total_accounts' => Account::selectRaw('COUNT(id)'),
'total_players' => Player::selectRaw('COUNT(id)'),
'total_guilds' => Guild::selectRaw('COUNT(id)'),
'total_monsters' => Monster::selectRaw('COUNT(id)'),
'total_houses' => House::selectRaw('COUNT(id)'),
])->first();
$twig->display('statistics.html.twig', array(
'count' => $count,
));

View File

@ -0,0 +1,31 @@
{% if balance is iterable %}
<div class=" col-md-6 col-lg-3">
<div class="card card-info card-outline">
<div class="card-header">
<h5 class="m-0">Top 10 - Balance</h5>
</div>
<div class="card-body p-0">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>#</th>
<th>Player</th>
<th>Balance</th>
</tr>
</thead>
<tbody>
{% set i = 0 %}
{% for result in balance %}
{% set i = i + 1 %}
<tr>
<th>{{ i }}</th>
<td><a href="?p=players&search_name={{ result.name }}">{{ result.name }}</a></td>
<td>{{ result.balance }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endif %}

View File

@ -0,0 +1,31 @@
{% if coins is iterable %}
<div class=" col-md-6 col-lg-3">
<div class="card card-info card-outline">
<div class="card-header">
<h5 class="m-0">Top 10 - Most coins</h5>
</div>
<div class="card-body p-0">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>#</th>
<th>Account</th>
<th>Tibia coins</th>
</tr>
</thead>
<tbody>
{% set i = 0 %}
{% for result in coins %}
{% set i = i + 1 %}
<tr>
<th>{{ i }}</th>
<td><a href="?p=accounts&search_name={{ result.name }}">{{ result.name }}</a></td>
<td>{{ result.coins }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endif %}

View File

@ -0,0 +1,31 @@
{% if accounts is iterable %}
<div class=" col-md-6 col-lg-3">
<div class="card card-info card-outline">
<div class="card-header">
<h5 class="m-0">Last 10 created</h5>
</div>
<div class="card-body p-0">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>#</th>
<th>Account</th>
<th>Creation Date</th>
</tr>
</thead>
<tbody>
{% set i = 0 %}
{% for result in accounts %}
{% set i = i + 1 %}
<tr>
<th>{{ i }}</th>
<td><a href="?p=accounts&id={{ result.id }}">{{ result.id }}</a></td>
<td>{{ result.created|date("M d Y, H:i:s") }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endif %}

View File

@ -0,0 +1,31 @@
{% if players is iterable %}
<div class=" col-md-6 col-lg-3">
<div class="card card-info card-outline">
<div class="card-header">
<h5 class="m-0">Last 10 logins</h5>
</div>
<div class="card-body p-0">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>#</th>
<th>Player</th>
<th>Login Date</th>
</tr>
</thead>
<tbody>
{% set i = 0 %}
{% for result in players %}
{% set i = i + 1 %}
<tr>
<th>{{ i }}</th>
<td><a href="?p=players&search_name={{ result.name }}">{{ result.name }}</a></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,31 @@
{% if points is iterable %}
<div class=" col-md-6 col-lg-3">
<div class="card card-info card-outline">
<div class="card-header">
<h5 class="m-0">Top 10 - Most premium points</h5>
</div>
<div class="card-body p-0">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>#</th>
<th>Account</th>
<th>Premium points</th>
</tr>
</thead>
<tbody>
{% set i = 0 %}
{% for result in points %}
{% set i = i + 1 %}
<tr>
<th>{{ i }}</th>
<td><a href="?p=accounts&search_name={{ result.name }}">{{ result.name }}</a></td>
<td>{{ result.premium_points }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endif %}

View File

@ -0,0 +1,45 @@
<div class="col">
<div class="info-box">
<span class="info-box-icon bg-info elevation-1"><i class="fas fa-user-plus"></i></span>
<div class="info-box-content">
<span class="info-box-text">Accounts:</span>
<span class="info-box-number">{{ count.total_accounts }}</span>
</div>
</div>
</div>
<div class="col">
<div class="info-box">
<span class="info-box-icon bg-red elevation-1"><i class="fas fa-user-plus"></i></span>
<div class="info-box-content">
<span class="info-box-text">Players:</span>
<span class="info-box-number">{{ count.total_players }}</span>
</div>
</div>
</div>
<div class="col">
<div class="info-box">
<span class="info-box-icon bg-teal elevation-1"><i class="fas fa-pastafarianism"></i></span>
<div class="info-box-content">
<span class="info-box-text">Monsters:</span>
<span class="info-box-number">{{ count.total_monsters }}</span>
</div>
</div>
</div>
<div class="col">
<div class="info-box">
<span class="info-box-icon bg-green elevation-1"><i class="fas fa-chart-pie"></i></span>
<div class="info-box-content">
<span class="info-box-text">Guilds:</span>
<span class="info-box-number">{{ count.total_guilds }}</span>
</div>
</div>
</div>
<div class="col">
<div class="info-box">
<span class="info-box-icon bg-yellow elevation-1"><i class="fas fa-home"></i></span>
<div class="info-box-content">
<span class="info-box-text">Houses:</span>
<span class="info-box-number">{{ count.total_houses }}</span>
</div>
</div>
</div>

View File

@ -0,0 +1,43 @@
<div class="col-12 col-md-6">
<div class="card card-warning card-outline">
<div class="card-header">
<span class="m-0">Website Status<span class="float-right">
<div class="custom-control custom-switch custom-switch-off-danger custom-switch-on-success">
<input form="maintenance-form" type="checkbox" class="custom-control-input" name="status" id="status" value="true" {% if not is_closed %} checked{% endif %}>
<label id="status-label" class="custom-control-label" for="status"> {% if is_closed %}Closed{% else %}Open{% endif %}</label>
</div></span>
</span>
</div>
<div class="card-body p-2">
<div class="col-sm-12">
<label for="message" class="col-form-label">Maintenance Message</label>
<textarea form="maintenance-form" name="message" class="form-control" cols="40" rows="3" maxlength="255" placeholder="Enter ...">{{ closed_message }}</textarea>
<small>(only visible if closed)</small>
</div>
</div>
<div class="card-footer">
<form id="maintenance-form" method="post" action="?p=dashboard" class="float-left">
{{ csrf() }}
<input type="hidden" name="maintenance" value="1" />
<button type="submit" class="btn btn-info"><i class="far fa-update"></i> Update</button>
</form>
<form method="post" action="?p=dashboard" class="float-right">
{{ csrf() }}
<input type="hidden" name="clear_cache" value="1" />
<button type="submit" onclick="return confirm('Are you sure that you want to clear cache?');" class="btn btn-danger" title="Clear Cache"><i class="fas fa-clear"></i>Clear cache</button>
</form>
</div>
</div>
</div>
<script>
$(function() {
$("#status").change(function() {
$statusLabel = $("#status-label");
$statusLabel.html("Closed");
if ($(this).is(':checked')) {
$statusLabel.html("Open");
}
});
});
</script>

View File

@ -0,0 +1,10 @@
<?php
defined('MYAAC') or die('Direct access not allowed!');
$twig->display('web_status.twig', array(
'is_closed' => $is_closed,
'closed_message' => $closed_message,
'status' => $status,
'account_type' => USE_ACCOUNT_NAME ? 'name' : 'number'
));
?>

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

@ -0,0 +1,165 @@
<?php
/**
* Pages
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
use MyAAC\Forum;
use MyAAC\News;
defined('MYAAC') or die('Direct access not allowed!');
$title = 'News Panel';
csrfProtect();
$use_datatable = true;
if (!hasFlag(FLAG_CONTENT_PAGES) && !superAdmin()) {
echo 'Access denied.';
return;
}
header('X-XSS-Protection:0');
// some constants, used mainly by database (cannot be modified without schema changes)
const NEWS_TITLE_LIMIT = 100;
const NEWS_BODY_LIMIT = 65535; // maximum news body length
const ARTICLE_TEXT_LIMIT = 300;
const ARTICLE_IMAGE_LIMIT = 100;
$name = $p_title = '';
if(!empty($action))
{
$id = $_POST['id'] ?? null;
$p_title = $_POST['title'] ?? null;
$body = isset($_POST['body']) ? stripslashes($_POST['body']) : null;
$comments = $_POST['comments'] ?? null;
$type = isset($_REQUEST['type']) ? (int)$_REQUEST['type'] : 1;
$category = isset($_POST['category']) ? (int)$_POST['category'] : null;
$player_id = isset($_POST['player_id']) ? (int)$_POST['player_id'] : null;
$article_text = $_POST['article_text'] ?? null;
$article_image = $_POST['article_image'] ?? null;
$forum_section = $_POST['forum_section'] ?? null;
$errors = [];
if (isRequestMethod('post')) {
if ($action == 'new') {
if (isset($forum_section) && $forum_section != '-1') {
$forum_add = Forum::add_thread($p_title, $body, $forum_section, $player_id, $account_logged->getId(), $errors);
}
if (isset($p_title) && 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') {
if (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') {
if (News::toggleHide($id, $errors, $status)) {
success(($status == 1 ? 'Hide' : 'Show') . ' successful.');
}
}
}
if(!empty($errors))
error(implode(", ", $errors));
}
$categories = array();
foreach($db->query('SELECT `id`, `name`, `icon_id` FROM `' . TABLE_PREFIX . 'news_categories` WHERE `hide` != 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_id' => $id ?? null,
'title' => $p_title ?? '',
'body' => isset($body) ? escapeHtml($body) : '',
'type' => $type,
'player' => isset($player) && $player->isLoaded() ? $player : null,
'player_id' => $player_id ?? null,
'account_players' => $account_players,
'category' => $category ?? 0,
'categories' => $categories,
'forum_boards' => getForumBoards(),
'forum_section' => $forum_section ?? null,
'comments' => $comments ?? null,
'article_text' => $article_text ?? null,
'article_image' => $article_image ?? null
));
}
$query = $db->query('SELECT * FROM ' . $db->tableName(TABLE_PREFIX . 'news'));
$newses = array();
$cachePlayers = [];
foreach ($query as $_news) {
$playerId = $_news['player_id'];
if (isset($cachePlayers[$playerId])) {
$_player = $cachePlayers[$playerId];
}
else {
$_player = new OTS_Player();
$_player->load($playerId);
$cachePlayers[$playerId] = $_player;
}
$newses[$_news['type']][] = array(
'id' => $_news['id'],
'hide' => $_news['hide'],
'archive_link' => getLink('news') . '/archive/' . $_news['id'],
'title' => $_news['title'],
'date' => $_news['date'],
'player_name' => $_player->isLoaded() ? $_player->getName() : '',
'player_link' => $_player->isLoaded() ? getPlayerLink($_player, false) : '',
);
}
$twig->display('admin.news.html.twig', array(
'newses' => $newses
));

41
admin/pages/notepad.php Normal file
View File

@ -0,0 +1,41 @@
<?php
/**
* Notepad
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
use MyAAC\Models\Notepad as ModelsNotepad;
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Notepad';
csrfProtect();
/**
* @var OTS_Account $account_logged
*/
$_content = '';
$notepad = ModelsNotepad::where('account_id', $account_logged->getId())->first();
if (isset($_POST['content'])) {
$_content = html_entity_decode(stripslashes($_POST['content']));
if (!$notepad) {
ModelsNotepad::create([
'account_id' => $account_logged->getId(),
'content' => $_content
]);
}
else {
ModelsNotepad::where('account_id', $account_logged->getId())->update(['content' => $_content]);
}
success('Saved at ' . date('H:i'));
} else {
if ($notepad)
$_content = $notepad->content;
}
$twig->display('admin.notepad.html.twig', ['content' => $_content]);

View File

@ -0,0 +1,14 @@
<?php
/**
* Open Source libraries
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2023 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Open Source';
$twig->display('admin.open_source.html.twig');

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

@ -0,0 +1,133 @@
<?php
/**
* Pages
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
use MyAAC\Models\Pages as ModelsPages;
use MyAAC\Admin\Pages;
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Pages';
$use_datatable = true;
csrfProtect();
if (!hasFlag(FLAG_CONTENT_PAGES) && !superAdmin()) {
echo 'Access denied.';
return;
}
header('X-XSS-Protection:0');
$name = $p_title = null;
$groups = new OTS_Groups_List();
$php = false;
$enable_tinymce = true;
$access = 0;
// some constants, used mainly by database (cannot by modified without schema changes)
const PAGE_TITLE_LIMIT = 30;
const PAGE_NAME_LIMIT = 30;
const PAGE_BODY_LIMIT = 65535; // maximum page body length
if (!empty($action) && isRequestMethod('post')) {
if ($action == 'delete' || $action == 'edit' || $action == 'hide') {
$id = $_POST['id'];
}
if (isset($_POST['name'])) {
$name = $_POST['name'];
}
if (isset($_POST['title'])) {
$p_title = $_POST['title'];
}
$php = isset($_POST['php']) && $_POST['php'] == 1;
$enable_tinymce = (isset($_POST['enable_tinymce']) && $_POST['enable_tinymce'] == 1) ?: $enable_tinymce;
if ($php) {
$body = $_POST['body'];
}
else if (isset($_POST['body'])) {
//$body = $_POST['body'];
$body = html_entity_decode(stripslashes($_POST['body']));
}
if (isset($_POST['access'])) {
$access = $_POST['access'];
}
$errors = array();
$player_id = 1;
if ($action == 'new') {
if (isset($p_title) && 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;
success('Added successful.');
}
} 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($_POST['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 {
if(Pages::update($id, $name, $p_title, $body, $player_id, $php, $enable_tinymce, $access, $errors)) {
$action = $name = $p_title = $body = '';
$player_id = 1;
$access = 0;
$php = false;
$enable_tinymce = true;
success('Updated successful.');
}
}
} else if ($action == 'hide') {
if (Pages::toggleHide($id, $errors, $status)) {
success(($status == 0 ? 'Show' : 'Hide') . ' successful.');
}
}
if (!empty($errors))
error(implode(", ", $errors));
}
$pages = ModelsPages::all()->map(function ($e) {
return [
'link' => getFullLink($e->name, $e->name, true),
'title' => substr($e->title, 0, 20),
'php' => $e->php == '1',
'id' => $e->id,
'hide' => $e->hide
];
})->toArray();
$twig->display('admin.pages.form.html.twig', [
'action' => $action,
'id' => $action == 'edit' ? $id : null,
'name' => $name,
'title' => $p_title,
'php' => $php,
'enable_tinymce' => $enable_tinymce,
'body' => isset($body) ? escapeHtml($body) : '',
'groups' => $groups->getGroups(),
'access' => $access
]);
$twig->display('admin.pages.html.twig', [
'pages' => $pages
]);

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 ADMIN_URL; ?>tools/phpinfo.php" width="1024" height="550"></iframe>

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

@ -0,0 +1,904 @@
<?php
/**
* Players editor
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
use MyAAC\Forum;
use MyAAC\Models\Player;
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Player editor';
csrfProtect();
$player_base = ADMIN_URL . '?p=players';
$use_datatable = true;
$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');
$skull_type = array("None", "Yellow", "Green", "White", "Red", "Black", "Orange");
?>
<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;
$search_player = '';
if (isset($_REQUEST['id']))
$id = (int)$_REQUEST['id'];
else if (isset($_REQUEST['search'])) {
$search_player = $_REQUEST['search'];
if (strlen($search_player) < 3 && !Validator::number($search_player)) {
echo_error('Player name is too short.');
} else {
$query = Player::where('name', 'like', '%' . $search_player . '%')->orderBy('name')->limit(11)->get(['id', 'name']);
if (count($query) == 0) {
echo_error('No entries found.');
} else if (count($query) == 1) {
$id = $query->first()->getKey();
} else if (count($query) > 10) {
echo_error('Specified name resulted with too many players.');
} else {
$str_construct = 'Do you mean?<ul>';
foreach ($query as $row) {
$str_construct .= '<li><a href="' . $player_base . '&id=' . $row->getKey() . '">' . $row->name . '</a></li>';
}
$str_construct .= '</ul>';
echo_error($str_construct);
}
}
}
?>
<div class="row">
<?php
$groups = new OTS_Groups_List();
if ($id > 0) {
$player = new OTS_Player();
$player->load($id);
if ($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 = strtotime($_POST['lastlogin']);
verify_number($lastlogin, 'Last login', 20);
$lastlogout = strtotime($_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', 3);
}
$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');
$hide = (isset($_POST['hide']) && $_POST['hide'] == 'true');
$created = strtotime($_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 ($hasBlessingsColumn)
$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('hide', $hide ? '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'));
$player->load($id);
}
}
} else if ($id == 0) {
$players_db = Player::orderBy('id')->get(['id','name', 'level']);
?>
<div class="col-12 col-sm-12 col-lg-10">
<div class="card card-info card-outline">
<div class="card-header">
<h5 class="m-0">Players</h5>
</div>
<div class="card-body">
<table class="player_datatable table table-striped table-bordered table-responsive d-md-table">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Level</th>
<th style="width: 40px">Edit</th>
</tr>
</thead>
<tbody>
<?php foreach ($players_db as $player_db): ?>
<tr>
<th><?php echo $player_db->id; ?></th>
<td><?php echo $player_db->name; ?></a></td>
<td><?php echo $player_db->level; ?></a></td>
<td><a href="?p=players&id=<?php echo $player_db->id; ?>" class="btn btn-success btn-sm" title="Edit">
<i class="fas fa-pencil-alt"></i>
</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
<?php } ?>
<?php
if (isset($player) && $player->isLoaded()) {
$account = $player->getAccount();
?>
<div class="col-12 col-sm-12 col-lg-10">
<div class="card card-primary card-outline card-outline-tabs">
<div class="card-header p-0 border-bottom-0">
<ul class="nav nav-tabs" id="tabs-tab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="tabs-home-tab" data-toggle="pill" href="#tabs-home">Player</a>
</li>
<li class="nav-item">
<a class="nav-link" id="tabs-home-tab" data-toggle="pill" href="#tabs-stats">Stats</a>
</li>
<li class="nav-item">
<a class="nav-link" id="tabs-home-tab" data-toggle="pill" href="#tabs-skills">Skills</a>
</li>
<li class="nav-item">
<a class="nav-link" id="tabs-home-tab" data-toggle="pill" href="#tabs-pos">Pos/Look</a>
</li>
<li class="nav-item">
<a class="nav-link" id="tabs-home-tab" data-toggle="pill" href="#tabs-misc">Misc</a>
</li>
<li class="nav-item">
<a class="nav-link" id="tabs-posts-tab" data-toggle="pill" href="#tabs-posts">Posts</a>
</li>
<li class="nav-item">
<a class="nav-link" id="tabs-chars-tab" data-toggle="pill" href="#tabs-chars">Characters</a>
</li>
</ul>
</div>
<form action="<?php echo $player_base . ($id > 0 ? '&id=' . $id : ''); ?>" method="post">
<?php csrf(); ?>
<div class="card-body">
<div class="tab-content" id="tabs-tabContent">
<div class="tab-pane fade active show" id="tabs-home">
<div class="form-group row">
<div class="col-12 col-sm-12 col-lg-6">
<label for="name" class="control-label">Name</label>
<input type="text" class="form-control" id="name" name="name" autocomplete="off" value="<?php echo $player->getName(); ?>"/>
</div>
<div class="col-12 col-sm-12 col-lg-6">
<label for="account_id">Account id:</label>
<input type="text" class="form-control" id="account_id" name="account_id" autocomplete="off" size="8" maxlength="11" value="<?php echo $account->getId(); ?>"/>
</div>
</div>
<div class="form-group row">
<div class="col-12 col-sm-12 col-lg-6">
<label for="group">Group:</label>
<select name="group" id="group" class="form-control custom-select">
<?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-12 col-sm-12 col-lg-6">
<label for="vocation">Vocation</label>
<select name="vocation" id="vocation" class="form-control custom-select">
<?php
foreach ($config['vocations'] as $_id => $name) {
echo '<option value=' . $_id . ($_id == $player->getVocation() ? ' selected' : '') . '>' . $name . '</option>';
}
?>
</select>
</div>
</div>
<div class="form-group row">
<div class="col-12 col-sm-12 col-lg-6">
<label for="sex">Sex:</label>
<select name="sex" id="sex" class="form-control custom-select">>
<?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-12 col-sm-12 col-lg-6">
<label for="town">Town:</label>
<select name="town" id="town" class="form-control">
<?php
$configTowns = config('towns');
if (!isset($configTowns[$player->getTownId()])) {
$configTowns[$player->getTownId()] = 'Unknown Town';
}
foreach ($configTowns 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="form-group row">
<div class="col-12 col-sm-12 col-lg-6">
<label for="skull">Skull:</label>
<select name="skull" id="skull" class="form-control custom-select">
<?php
foreach ($skull_type as $_id => $s_name) {
echo '<option value=' . $_id . ($_id == $player->getSkull() ? ' selected' : '') . '>' . $s_name . '</option>';
}
?>
</select>
</div>
<div class="col-12 col-sm-12 col-lg-6">
<label for="skull_time">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="form-group row">
<?php if ($hasBlessingColumn):
$bless_count = $player->countBlessings();
$bless = $player->checkBlessings($bless_count); ?>
<input type="hidden" name="blesscount" value="<?php echo $bless_count; ?>"/>
<div class="col-12 col-sm-12 col-lg-6">
<label>Blessings:</label><br/>
<?php for ($i = 1; $i <= $bless_count; $i++): ?>
<label><input class="" type="checkbox" name="blessing<?php echo $i; ?>" id="blessing<?php echo $i; ?>" value="true"<?php echo(($bless[$i - 1] == 1) ? ' checked' : '') ?>/><?php echo $i; ?></label>
<?php endfor ?>
</div>
<?php endif; ?>
<?php if ($hasBlessingsColumn): ?>
<div class="col-12 col-sm-12 col-lg-6">
<label for="blessings">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-12 col-sm-12 col-lg-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="form-group row">
<div class="col-12 col-sm-12 col-lg-6">
<div class="custom-control custom-switch custom-switch-on-danger">
<input type="checkbox" class="custom-control-input" name="deleted" id="deleted" value="true" <?php echo($player->getCustomField($db->hasColumn('players', 'deletion') ? 'deletion' : 'deleted') == '1' ? ' checked' : ''); ?>>
<label class="custom-control-label" for="deleted">Deleted</label>
</div>
</div>
<div class="col-12 col-sm-12 col-lg-6">
<div class="custom-control custom-switch custom-switch-on-success">
<input type="checkbox" class="custom-control-input" name="hide" id="hide" value="true" <?php echo($player->isHidden() ? ' checked' : ''); ?>>
<label class="custom-control-label" for="hide">Hidden</label>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="tabs-stats">
<div class="form-group row">
<div class="col-12 col-sm-12 col-lg-6">
<label for="level" class="control-label">Level:</label>
<input type="text" class="form-control" id="level" name="level" autocomplete="off" value="<?php echo $player->getLevel(); ?>"/>
</div>
<div class="col-12 col-sm-12 col-lg-6">
<label for="experience" class="control-label">Experience:</label>
<input type="text" class="form-control" id="experience" name="experience" autocomplete="off" value="<?php echo $player->getExperience(); ?>"/>
</div>
</div>
<div class="form-group row">
<div class="col-12 col-sm-12 col-lg-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" value="<?php echo $player->getMagLevel(); ?>"/>
</div>
<div class="col-12 col-sm-12 col-lg-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" value="<?php echo $player->getManaSpent(); ?>"/>
</div>
</div>
<div class="form-group row">
<div class="col-12 col-sm-12 col-lg-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" value="<?php echo $player->getHealth(); ?>"/>
</div>
<div class="col-12 col-sm-12 col-lg-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" value="<?php echo $player->getHealthMax(); ?>"/>
</div>
</div>
<div class="form-group row">
<div class="col-12 col-sm-12 col-lg-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" value="<?php echo $player->getMana(); ?>"/>
</div>
<div class="col-12 col-sm-12 col-lg-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" value="<?php echo $player->getManaMax(); ?>"/>
</div>
</div>
<div class="form-group row">
<div class="col-12 col-sm-12 col-lg-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" value="<?php echo $player->getCap(); ?>"/>
</div>
<div class="col-12 col-sm-12 col-lg-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" value="<?php echo $player->getSoul(); ?>"/>
</div>
<?php if ($db->hasColumn('players', 'stamina')): ?>
<div class="col-12 col-sm-12 col-lg-6">
<label for="stamina" class="control-label">Stamina:</label>
<input type="text" class="form-control" id="stamina" name="stamina" autocomplete="off" maxlength="20" value="<?php echo $player->getStamina(); ?>"/>
</div>
<?php endif; ?>
<?php if ($db->hasColumn('players', 'offlinetraining_time')): ?>
<div class="col-12 col-sm-12 col-lg-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 fade" id="tabs-skills">
<?php
foreach ($skills as $_id => $info) {
?>
<div class="form-group row">
<div class="col-12 col-sm-12 col-lg-6">
<?php echo '<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" value="' . $player->getSkill($_id) . '"/>'; ?>
</div>
<div class="col-12 col-sm-12 col-lg-6">
<?php echo '<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" value="' . $player->getSkillTries($_id) . '"/>'; ?>
</div>
</div>
<?php } ?>
</div>
<div class="tab-pane fade" id="tabs-pos">
<?php $outfit = setting('core.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:0;width:64px;height:64px;" src="<?php echo $outfit; ?>" alt="player outfit"/>
</div>
<td>Position:</td>
<div class="form-group row">
<div class="col-12 col-sm-12 col-lg-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" value="<?php echo $player->getPosX(); ?>"/>
</div>
<div class="col-12 col-sm-12 col-lg-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-12 col-sm-12 col-lg-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="form-group row">
<div class="col-12 col-sm-12 col-lg-3">
<label for="look_head" class="control-label">Head: <span id="look_head_val" class="font-weight-bold text-primary"></span></label>
<input class="custom-range" type="range" min="0" max="132" id="look_head" name="look_head" value="<?php echo $player->getLookHead(); ?>"/>
</div>
<div class="col-12 col-sm-12 col-lg-3">
<label for="look_body" class="control-label">Body: <span id="look_body_val" class="font-weight-bold text-primary"></span></label>
<input type="range" min="0" max="132"
value="<?php echo $player->getLookBody(); ?>"
class="custom-range" id="look_body" name="look_body">
</div>
<div class="col-12 col-sm-12 col-lg-3">
<label for="look_legs" class="control-label">Legs: <span id="look_legs_val" class="font-weight-bold text-primary"></span></label>
<input type="range" min="0" max="132"
value="<?php echo $player->getLookLegs(); ?>"
class="custom-range" id="look_legs" name="look_legs">
</div>
<div class="col-12 col-sm-12 col-lg-3">
<label for="look_feet" class="control-label">Feet: <span id="look_feet_val" class="font-weight-bold text-primary"></span></label>
<input type="range" min="0" max="132"
value="<?php echo $player->getLookBody(); ?>"
class="custom-range" id="look_feet" name="look_feet">
</div>
</div>
<div class="form-group row">
<div class="col-12 col-sm-12 col-lg-6">
<label for="look_type" class="control-label">Type:</label>
<?php
$outfitlist = null;
$outfitlist = Outfits_loadfromXML();
if ($outfitlist) { ?>
<select name="look_type" id="look_type" class="form-control custom-select">
<?php
foreach ($outfitlist as $_id => $outfit) {
if ($outfit['enabled'] == 'yes') ;
echo '<option value=' . $outfit['id'] . ($outfit['id'] == $player->getLookType() ? ' selected' : '') . '>' . $outfit['name'] . ' - ' . ($outfit['type'] == 1 ? 'Male' : 'Female') . '</option>';
}
?>
</select>
<?php } else { ?>
<input type="text" class="form-control" id="look_type" name="look_type" autocomplete="off" maxlength="11" value="<?php echo $player->getLookType(); ?>"/>
<?php } ?>
</div>
<?php if ($hasLookAddons): ?>
<div class="col-12 col-sm-12 col-lg-6">
<label for="look_addons" class="control-label">Addons:</label>
<select name="look_addons" id="look_addons" class="form-control custom-select">
<?php
$addon_type = array("None", "First", "Second", "Both");
foreach ($addon_type as $_id => $s_name) {
echo '<option value=' . $_id . ($_id == $player->getLookAddons() ? ' selected' : '') . '>' . $s_name . '</option>';
}
?>
</select>
</div>
<?php endif; ?>
</div>
</div>
<div class="tab-pane fade" id="tabs-misc">
<div class="form-group row">
<div class="col-12 col-sm-12 col-lg-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 date("M d Y, H:i:s", $player->getCustomField('created')); ?>"/>
</div>
<div class="col-12 col-sm-12 col-lg-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 date("M d Y, H:i:s", $player->getLastLogin()); ?>"/>
</div>
<div class="col-12 col-sm-12 col-lg-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 date("M d Y, H:i:s", $player->getLastLogout()); ?>"/>
</div>
<div class="col-12 col-sm-12 col-lg-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
if (strlen($player->getLastIP()) > 11) {
echo inet_ntop($player->getLastIP());
}
else {
echo longToIp($player->getLastIP());
}
?>" readonly/>
</div>
</div>
<?php if ($db->hasColumn('players', 'loss_experience')): ?>
<div class="form-group row">
<div class="col-12 col-sm-12 col-lg-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-12 col-sm-12 col-lg-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-12 col-sm-12 col-lg-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-12 col-sm-12 col-lg-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-12 col-sm-12 col-lg-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="form-group row">
<div class="col-12">
<label for="comment" class="control-label">Comment:</label>
<textarea class="form-control" id="comment" 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 class="tab-pane fade" id="tabs-posts">
<table class="table table-striped table-condensed table-responsive d-md-table">
<thead>
<tr>
<th class="w-25">Topic</th>
<th>Content</th>
</tr>
</thead>
<tbody>
<?php
$posts = $db->query('SELECT `author_guid`,`section`,`first_post`,`post_text`,`post_date`, `post_topic`,`post_html`,`post_smile`,`' . TABLE_PREFIX . 'forum_boards`.`name` AS `forum_Name` FROM `' .
TABLE_PREFIX . 'forum` LEFT JOIN `' . TABLE_PREFIX . 'forum_boards` ON `' .
TABLE_PREFIX . 'forum`.section = `' . TABLE_PREFIX . 'forum_boards`.id WHERE `author_guid` = "' . $player->getId() . '" ORDER BY `post_date` DESC LIMIT 10');
if ($posts->rowCount() > 0) {
$posts = $posts->fetchAll();
foreach ($posts as $post) {
$text = ($post['post_html'] > 0 ? $post['post_text'] : htmlspecialchars($post['post_text']));
$post['content'] = ($post['post_html'] > 0 ? $text : Forum::parseBBCode(nl2br($text), $post['post_smile'] == 0));
?>
<tr>
<th><?php echo htmlspecialchars($post['post_topic']); ?><br/><small><?php echo date('d M y H:i:s', $post['post_date']); ?></small><br/>
Topic: <a href="<?php echo getForumThreadLink($post['first_post']); ?>" class="link-black text-sm"><i class="fa fa-share margin-r-5"></i> Link</a><br/>
Forum: <a href="<?php echo getForumBoardLink($post['section']); ?>" class="link-black text-sm"><i class="fa fa-share margin-r-5"></i> <?php echo $post['forum_Name']; ?></a></th>
<th><?php echo $post['content']; ?></th>
</tr>
<?php
}
unset($post);
} else {
echo '<tr><td colspan="2">This user has no posts</td></tr>';
}; ?>
</tbody>
</table>
</div>
<div class="tab-pane fade" id="tabs-chars">
<div class="row">
<?php
if (isset($account) && $account->isLoaded()) {
$account_players = Player::where('account_id', $account->getId())->orderBy('id')->get();
if (isset($account_players)) { ?>
<table class="table table-striped table-condensed table-responsive d-md-table">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Level</th>
<th>Vocation</th>
<th style="width: 40px">Edit</th>
</tr>
</thead>
<tbody>
<?php foreach ($account_players as $i => $player): ?>
<tr>
<th><?php echo $i + 1; ?></th>
<td><?php echo $player->name; ?></td>
<td><?php echo $player->level; ?></td>
<td><?php echo $player->vocation_name; ?></td>
<td><a href="?p=players&id=<?php echo $player->getKey() ?>" class=" btn btn-success btn-sm" title="Edit"><i class="fas fa-pencil-alt"></i></a></td>
</tr>
<?php endforeach ?>
</tbody>
</table>
<?php
}
} ?>
</div>
</div>
</div>
</div>
<div class="card-footer text-center">
<input type="hidden" name="save" value="yes"/>
<button type="submit" class="btn btn-info float-left"><i class="fas fa-update"></i> Update</button>
<a href="<?php echo ADMIN_URL; ?>?p=accounts&id=<?php echo $account->getId(); ?>" class="btn btn-secondary">Edit Account</a>
<a href="<?php echo ADMIN_URL; ?>?p=players" class="btn btn-danger float-right"><i class="fas fa-cancel"></i> Cancel</a>
</div>
</form>
</div>
</div>
<script type="text/javascript">
$('#lastlogin').datetimepicker({format: "M d Y, H:i:s",});
$('#lastlogout').datetimepicker({format: "M d Y, H:i:s",});
$('#created').datetimepicker({format: "M d Y, H:i:s",});
$(document).ready(function () {
const $headSpan = $('#look_head_val');
const $headvalue = $('#look_head');
$headSpan.html($headvalue.val());
$headvalue.on('input', () => {
$headSpan.html($headvalue.val());
});
$headvalue.on('change', () => {
updateOutfit();
});
const $bodySpan = $('#look_body_val');
const $bodyvalue = $('#look_body');
$bodySpan.html($bodyvalue.val());
$bodyvalue.on('input', () => {
$bodySpan.html($bodyvalue.val());
});
$bodyvalue.on('change', () => {
updateOutfit();
});
const $legsSpan = $('#look_legs_val');
const $legsvalue = $('#look_legs');
$legsSpan.html($legsvalue.val());
$legsvalue.on('input', () => {
$legsSpan.html($legsvalue.val());
});
$legsvalue.on('change', () => {
updateOutfit();
});
const $feetSpan = $('#look_feet_val');
const $feetvalue = $('#look_feet');
$feetSpan.html($feetvalue.val());
$feetvalue.on('input', () => {
$feetSpan.html($feetvalue.val());
});
$feetvalue.on('change', () => {
updateOutfit();
});
const $lookvalue = $('#look_type');
$lookvalue.on('change', () => {
updateOutfit();
});
<?php if($hasLookAddons): ?>
const $addonvalue = $('#look_addons');
$addonvalue.on('change', () => {
updateOutfit();
});
<?php endif; ?>
});
function updateOutfit() {
const look_head = $('#look_head').val();
const look_body = $('#look_body').val();
const look_legs = $('#look_legs').val();
const look_feet = $('#look_feet').val();
const look_type = $('#look_type').val();
let look_addons = '';
<?php if($hasLookAddons): ?>
look_addons = '&addons=' + $('#look_addons').val();
<?php endif; ?>
$("#player_outfit").attr("src", '<?= setting('core.outfit_images_url'); ?>?id=' + look_type + look_addons + '&head=' + look_head + '&body=' + look_body + '&legs=' + look_legs + '&feet=' + look_feet);
}
</script>
<?php } ?>
<div class="col-12 col-sm-12 col-lg-2">
<div class="card card-info card-outline">
<div class="card-header">
<h5 class="m-0">Search Player</h5>
</div>
<div class="card-body row">
<div class="col-6 col-lg-12">
<form action="<?php echo $player_base; ?>" method="post">
<?php csrf(); ?>
<label for="search">Player Name:</label>
<div class="input-group input-group-sm">
<input type="text" class="form-control" id="search" name="search" value="<?= escapeHtml($search_player); ?>" maxlength="32" size="32">
<span class="input-group-append"><button type="submit" class="btn btn-info btn-flat">Search</button></span>
</div>
</form>
</div>
<div class="col-6 col-lg-12">
<form action="<?php echo $player_base; ?>" method="post">
<?php csrf(); ?>
<label for="id">Player ID:</label>
<div class="input-group input-group-sm">
<input type="text" class="form-control" id="id" name="id" value="<?= $id; ?>" maxlength="32" size="32">
<span class="input-group-append"><button type="submit" class="btn btn-info btn-flat">Search</button></span>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$(function () {
$('.player_datatable').DataTable({
"order": [[0, "asc"]]
});
});
</script>

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

@ -0,0 +1,146 @@
<?php
/**
* Plugins
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
use MyAAC\Plugins;
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Plugin manager';
csrfProtect();
$use_datatable = true;
if (!setting('core.admin_plugins_manage_enable')) {
warning('Plugin installation and management is disabled in Settings.<br/>If you wish to enable, go to Settings and enable <strong>Enable Plugins Manage</strong>.');
}
else {
$pluginUploadEnabled = true;
if(!\class_exists('\ZipArchive')) {
error('Please install PHP zip extension. Plugins upload disabled until then.');
$pluginUploadEnabled = false;
}
$twig->display('admin.plugins.form.html.twig', ['pluginUploadEnabled' => $pluginUploadEnabled]);
if (isset($_POST['uninstall'])) {
$uninstall = $_POST['uninstall'];
if (Plugins::uninstall($uninstall)) {
success('Successfully uninstalled plugin ' . $uninstall);
} else {
error('Error while uninstalling plugin ' . $uninstall . ': ' . Plugins::getError());
}
} else if (isset($_POST['enable'])) {
$enable = $_POST['enable'];
if (Plugins::enable($enable)) {
success('Successfully enabled plugin ' . $enable);
} else {
error('Error while enabling plugin ' . $enable . ': ' . Plugins::getError());
}
} else if (isset($_POST['disable'])) {
$disable = $_POST['disable'];
if (Plugins::disable($disable)) {
success('Successfully disabled plugin ' . $disable);
} else {
error('Error while disabling plugin ' . $disable . ': ' . 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(true) as $plugin) {
$string = file_get_contents(BASE . 'plugins/' . $plugin . '.json');
$plugin_info = json_decode($string, true);
if (!$plugin_info) {
warning('Cannot load plugin info ' . $plugin . '.json');
} else {
$disabled = (str_contains($plugin, 'disabled.'));
$pluginOriginal = ($disabled ? str_replace('disabled.', '', $plugin) : $plugin);
$plugins[] = array(
'name' => $plugin_info['name'] ?? '',
'description' => $plugin_info['description'] ?? '',
'version' => $plugin_info['version'] ?? '',
'author' => $plugin_info['author'] ?? '',
'contact' => $plugin_info['contact'] ?? '',
'file' => $pluginOriginal,
'enabled' => !$disabled,
'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 2020 MyAAC
* @link https://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Report Viewer';
$use_datatable = true;
$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);
$file = isset($_GET['file']) ? $_GET['file'] : NULL;
if (!empty($file)) {
if (!preg_match('/[^A-z0-9\' _\/\-\.]/', $file)) {
if (file_exists($server_path_reports . $file)) {
$file_content = nl2br(file_get_contents($server_path_reports . $file));
$twig->display('admin.logs.view.html.twig', array('file' => $file, 'content' => $file_content));
} else {
echo 'Specified file does not exist.';
}
} else {
echo 'Invalid file name specified.';
}
}
$twig->display('admin.reports.html.twig', array('files' => $files));

60
admin/pages/settings.php Normal file
View File

@ -0,0 +1,60 @@
<?php
/**
* Menus
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
use MyAAC\Plugins;
use MyAAC\Settings;
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Settings';
require_once SYSTEM . 'clients.conf.php';
if (empty($_GET['plugin'])) {
error('Please select plugin from left Panel.');
return;
}
$plugin = $_GET['plugin'];
if($plugin != 'core') {
$pluginSettings = Plugins::getPluginSettings($plugin);
if (!$pluginSettings) {
error('This plugin does not exist or does not have settings defined.');
return;
}
$settingsFilePath = BASE . $pluginSettings;
}
else {
$settingsFilePath = SYSTEM . 'settings.php';
}
if (!file_exists($settingsFilePath)) {
error("Plugin $plugin does not exist or does not have settings defined.");
return;
}
$settingsFile = require $settingsFilePath;
if (!is_array($settingsFile)) {
error("Cannot load settings file for plugin $plugin");
return;
}
$settingsKeyName = ($plugin == 'core' ? $plugin : $settingsFile['key']);
$title = ($plugin == 'core' ? 'Settings' : 'Plugin Settings - ' . $settingsFile['name']);
$settingsParsed = Settings::display($settingsKeyName, $settingsFile['settings']);
$twig->display('admin.settings.html.twig', [
'settingsParsed' => $settingsParsed['content'],
'settings' => $settingsFile['settings'],
'script' => $settingsParsed['script'],
'settingsKeyName' => $settingsKeyName,
]);

View File

@ -0,0 +1,37 @@
<?php
/**
* Statistics
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
use MyAAC\Models\Account;
use MyAAC\Models\Guild;
use MyAAC\Models\House;
use MyAAC\Models\Player;
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Statistics';
$total_accounts = Account::count();
$total_players = Player::count();
$total_guilds = Guild::count();
$total_houses = House::count();
$points = Account::select(['premium_points', (USE_ACCOUNT_NAME ? 'name' : 'id')])
->orderByDesc('premium_points')
->limit(10)
->get()
->toArray();
$twig->display('admin.statistics.html.twig', array(
'total_accounts' => $total_accounts,
'total_players' => $total_players,
'total_guilds' => $total_guilds,
'total_houses' => $total_houses,
'account_type' => (USE_ACCOUNT_NAME ? 'name' : 'number'),
'points' => $points
));

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

@ -0,0 +1,33 @@
<?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';
if (!isset($_GET['tool'])) {
echo 'Tool not set.';
return;
}
$tool = $_GET['tool'];
if (preg_match("/[^A-z0-9_\-]/", $tool)) {
echo 'Invalid tool.';
return;
}
$file = ADMIN . 'tools/' . $tool . '.php';
if (@file_exists($file)) {
require $file;
return;
}
echo 'Tool <strong>' . $tool . '</strong> not found.';
?>

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

@ -0,0 +1,49 @@
<?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=clmd', '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=clmd', '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;
}*/

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

@ -0,0 +1,66 @@
<?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!');
use DeviceDetector\DeviceDetector;
use DeviceDetector\Parser\Client\Browser;
use DeviceDetector\Parser\OperatingSystem;
use MyAAC\Visitors;
$title = 'Visitors';
$use_datatable = true;
if (!setting('core.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;
$visitors = new Visitors(setting('core.visitors_counter_ttl'));
function compare($a, $b): int {
return $a['lastvisit'] > $b['lastvisit'] ? -1 : 1;
}
$tmp = $visitors->getVisitors();
usort($tmp, 'compare');
foreach ($tmp as &$visitor) {
$userAgent = $visitor['user_agent'] ?? '';
if (!strlen($userAgent) || $userAgent == 'unknown') {
$browser = 'Unknown';
}
else {
$dd = new DeviceDetector($userAgent);
$dd->parse();
if ($dd->isBot()) {
$bot = $dd->getBot();
$message = '(Bot) %s, <a href="%s" target="_blank">%s</a>';
$browser = sprintf($message, $bot['category'], $bot['url'], $bot['name']);
}
else {
$osFamily = OperatingSystem::getOsFamily($dd->getOs('name'));
$browserFamily = Browser::getBrowserFamily($dd->getClient('name'));
$browser = $osFamily . ', ' . $browserFamily;
}
}
$visitor['browser'] = $browser;
}
$twig->display('admin.visitors.html.twig', array(
'config_visitors_counter_ttl' => setting('core.visitors_counter_ttl'),
'visitors' => $tmp
));
?>

69
admin/template/menus.php Normal file
View File

@ -0,0 +1,69 @@
<?php
$menus = [
['name' => 'Dashboard', 'icon' => 'tachometer-alt', 'order' => 10, 'link' => 'dashboard'],
['name' => 'Settings', 'icon' => 'edit', 'order' => 19, 'link' =>
require ADMIN . 'includes/settings_menus.php'
],
['name' => 'News', 'icon' => 'newspaper', 'order' => 20, 'link' =>
[
['name' => 'View', 'link' => 'news', 'icon' => 'list', 'order' => 10],
['name' => 'Add news', 'link' => 'news&action=new&type=1', 'icon' => 'plus', 'order' => 20],
['name' => 'Add ticker', 'link' => 'news&action=new&type=2', 'icon' => 'plus', 'order' => 30],
['name' => 'Add article', 'link' => 'news&action=new&type=3', 'icon' => 'plus', 'order' => 40],
],
],
['name' => 'Changelogs', 'icon' => 'newspaper', 'order' => 30, 'link' =>
[
['name' => 'View', 'link' => 'changelog', 'icon' => 'list', 'order' => 10],
['name' => 'Add', 'link' => 'changelog&action=new', 'icon' => 'plus', 'order' => 20],
],
],
['name' => 'Mailer', 'icon' => 'envelope', 'order' => 40, 'link' => 'mailer', 'disabled' => !setting('core.mail_enabled')],
['name' => 'Pages', 'icon' => 'book', 'order' => 50, 'link' =>
[
['name' => 'View', 'link' => 'pages', 'icon' => 'list', 'order' => 10],
['name' => 'Add', 'link' => 'pages&action=new', 'icon' => 'plus', 'order' => 20],
],
],
['name' => 'Menus', 'icon' => 'list', 'order' => 60, 'link' => 'menus'],
['name' => 'Plugins', 'icon' => 'plug', 'order' => 70, 'link' => 'plugins'],
['name' => 'Server Data', 'icon' => 'gavel', 'order' => 80, 'link' => 'data'],
['name' => 'Editor', 'icon' => 'edit', 'order' => 90, 'link' =>
[
['name' => 'Accounts', 'link' => 'accounts', 'icon' => 'users', 'order' => 10],
['name' => 'Players', 'link' => 'players', 'icon' => 'user-astronaut', 'order' => 20],
],
],
['name' => 'Tools', 'icon' => 'tools', 'order' => 100, 'link' =>
[
['name' => 'Mass Account Actions', 'link' => 'mass_account', 'icon' => 'globe', 'order' => 10],
['name' => 'Mass Teleport Actions', 'link' => 'mass_teleport', 'icon' => 'globe', 'order' => 20],
['name' => 'Notepad', 'link' => 'notepad', 'icon' => 'marker', 'order' => 30],
['name' => 'phpinfo', 'link' => 'phpinfo', 'icon' => 'server', 'order' => 40],
],
],
['name' => 'Logs', 'icon' => 'bug', 'order' => 110, 'link' =>
[
['name' => 'Logs', 'link' => 'logs', 'icon' => 'book', 'order' => 10],
['name' => 'Reports', 'link' => 'reports', 'icon' => 'book', 'order' => 20],
['name' => 'Visitors', 'link' => 'visitors', 'icon' => 'user', 'order' => 30],
],
],
];
$hooks->trigger(HOOK_ADMIN_MENU);
usort($menus, function ($a, $b) {
return $a['order'] - $b['order'];
});
foreach ($menus as $i => $menu) {
if (isset($menu['link']) && is_array($menu['link'])) {
usort($menus[$i]['link'], function ($a, $b) {
return $a['order'] - $b['order'];
});
}
}
return $menus;

15
admin/template/style.css Normal file
View File

@ -0,0 +1,15 @@
.menu-text-li {color: #4b646f; background: #1a2226;}
.menu-text {
display: block;
padding: .5rem 1rem;
white-space: nowrap;
}
.sidebar-mini.sidebar-collapse .menu-text {
display: none;
}
.myaac-table tbody tr:nth-child(even) {background: #FFF} /* light border */
.myaac-table tbody tr:nth-child(odd) {background: #CCC} /* dark border */
.myaac-table thead td {background: #000000; color: #ffffff !important;} /* vdark border */
.myaac-table tfoot td {background: #000000; color: #ffffff !important;} /* vdark border */

203
admin/template/template.php Normal file
View File

@ -0,0 +1,203 @@
<?php defined('MYAAC') or die('Direct access not allowed!'); ?>
<!doctype html>
<html lang="en">
<head>
<?php $hooks->trigger(HOOK_ADMIN_HEAD_START); ?>
<?php echo template_header(true); ?>
<title><?php echo (isset($title) ? $title . ' - ' : '') . $config['lua']['serverName'];?></title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="<?php echo BASE_URL; ?>tools/css/adminlte.min.css">
<link rel="stylesheet" href="<?php echo BASE_URL; ?>tools/css/font-awesome.min.css">
<?php if (isset($use_datatable)) { ?>
<link rel="stylesheet" href="<?php echo BASE_URL; ?>tools/css/datatables.bs.min.css">
<?php } ?>
<link rel="stylesheet" type="text/css" href="<?php echo $template_path; ?>style.css"/>
<!--[if lt IE 9]>
<script src="<?php echo BASE_URL; ?>tools/js/html5shiv.min.js"></script>
<script src="<?php echo BASE_URL; ?>tools/js/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">
<?php $hooks->trigger(HOOK_ADMIN_HEAD_END); ?>
</head>
<body class="sidebar-mini ">
<?php $hooks->trigger(HOOK_ADMIN_BODY_START); ?>
<?php if ($logged && admin()) { ?>
<div class="wrapper">
<nav class="main-header navbar navbar-expand navbar-white navbar-light">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
</li>
<li class="nav-item d-none d-sm-inline-block">
<a href="<?php echo ADMIN_URL; ?>" class="nav-link">Home</a>
</li>
</ul>
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" data-widget="control-sidebar" data-slide="true" href="#"><i class="fas fa-th-large"></i></a>
</li>
</ul>
</nav>
<aside class="main-sidebar sidebar-dark-info elevation-4">
<a href="<?php echo ADMIN_URL; ?>" class="brand-link navbar-info">
<img src="<?php echo ADMIN_URL; ?>images/logo.png" class="brand-image img-circle elevation-3" style="opacity: .8">
<span class="brand-text"><b>My</b>AAC</span>
</a>
<div class="sidebar">
<nav class="mt-1">
<ul class="nav nav-pills nav-sidebar flex-column nav-legacy nav-child-indent" data-widget="treeview" data-accordion="false">
<li class="menu-text-li">
<span class="menu-text">
<a class="text-info" href="<?php echo BASE_URL; ?>" target="_blank">
<?php echo $config['lua']['serverName'] ?>
</a>
</span>
</li>
<?php
// name = Display name of link
// icon = fontawesome icon name without "fas fa-"
// link = Page link or use as array for sub items
$menus = require __DIR__ . '/menus.php';
foreach ($menus as $category => $menu) {
if (isset($menu['disabled']) && $menu['disabled']) {
continue;
}
$has_child = is_array($menu['link']);
if (!$has_child) { ?>
<li class="nav-item">
<a class="nav-link<?php echo(strpos($menu['link'], $page) !== false ? ' active' : '') ?>" href="?p=<?php echo $menu['link'] ?>">
<i class="nav-icon fas fa-<?php echo($menu['icon'] ?? 'link') ?>"></i>
<p><?php echo $menu['name'] ?></p>
</a>
</li>
<?php
} else if ($has_child) {
$used_menu = null;
$nav_construct = '';
foreach ($menu['link'] as $sub_category => $sub_menu) {
$nav_construct .= '<li class="nav-item"><a href="?p=' . $sub_menu['link'] . '" class="nav-link';
if ($_SERVER['QUERY_STRING'] == 'p=' . $sub_menu['link']) {
$nav_construct .= ' active';
$used_menu = true;
}
$nav_construct .= '"><i class="fas fa-' . ($sub_menu['icon'] ?? 'circle') . ' nav-icon"></i><p>' . $sub_menu['name'] . '</p></a></li>';
}
?>
<li class="nav-item has-treeview<?php echo($used_menu ? ' menu-open' : '') ?>">
<a href="#" class="nav-link<?php echo($used_menu ? ' active' : '') ?>">
<i class="nav-icon fas fa-<?php echo($menu['icon'] ?? 'link') ?>"></i>
<p><?php echo $menu['name'] ?></p><i class="right fas fa-angle-left"></i>
</a>
<ul class="nav nav-treeview">
<?php echo $nav_construct; ?>
</ul>
</li>
<?php
}
}
$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'])) { ?>
<li class="nav-item">
<a class="nav-link<?php echo($page == $item['page'] ? ' active' : '') ?>" href="?p=<?php echo $item['page'] ?>">
<i class="nav-icon fas fa-link"></i>
<p><?php echo $item['name'] ?></p>
</a>
</li>
<?php
}
}
?>
</ul>
</nav>
</div>
</aside>
<div class="content-wrapper" style="min-height: 823px;">
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h3 class="m-0 text-dark"><?php echo(isset($title) ? $title : ''); ?><small> - Admin Panel</small></h3>
</div>
<div class="col-sm-6">
<div class="float-sm-right d-none d-sm-inline">
<span class="p-2 right badge badge-<?php echo((isset($status['online']) and $status['online']) ? 'success' : 'danger'); ?>"><?php echo $config['lua']['serverName'] ?></span>
</div>
</div>
</div>
</div>
</div>
<div class="content">
<div class="container-fluid">
<?php echo $content; ?>
</div>
</div>
</div>
<aside class="control-sidebar control-sidebar-dark">
<div class="p-3">
<h4>Account:</h4>
<p><h5><a href="?action=logout"><i class="fas fa-sign-out-alt text-danger"></i> Log out</h5></a>
<small>This will log you out</small></p>
</div>
<div class="p-3">
<h4>Site:</h4>
<p><h5><a href="<?php echo BASE_URL; ?>" target="_blank"><i class="far fa-eye text-blue"></i> Preview</a></h5>
<small>This will open a new tab</small></p>
</div>
<div class="p-3">
<h4>Version:</h4>
<p><h5><a href="?p=version"><i class="fas fa-code-branch"></i> <?php echo MYAAC_VERSION; ?></a></h5>
<small>Check for updates</small></p>
</div>
<div class="p-3">
<h4>Site:</h4>
<p><h5><a href="https://github.com/slawkens/myaac" target="_blank"><i class="fab fa-github"></i> Github</a></h5>
<small>Goto GitHub Page</small></p>
<p><h5><a href="http://my-aac.org/" target="_blank"><i class="fas fa-shoe-prints"></i> MyAAC Official</a></h5>
<small>Goto MyAAC Official Website</small></p>
<p><h5><a href="?p=open_source"><i class="fas fa-wrench"></i> Open Source</a></h5>
<small>View Open Source Software MyAAC is using</small></p>
</div>
</aside>
<footer class="main-footer">
<div class="float-sm-right d-none d-sm-inline">
<span class="p-2 right badge badge-<?php echo((isset($status['online']) and $status['online']) ? 'success' : 'danger'); ?>"><?php echo $config['lua']['serverName'] ?></span>
</div>
<?php echo base64_decode('UG93ZXJlZCBieSA8YSBocmVmPSJodHRwOi8vbXktYWFjLm9yZyIgdGFyZ2V0PSJfYmxhbmsiPk15QUFDLjwvYT4='); ?>
</footer>
<div id="sidebar-overlay"></div>
</div>
<?php } else if (!$logged && !admin()) {
echo $content;
}
?>
<?php
/**
* @var OTS_Account $account_logged
*/
if ($logged && admin()) {
$twig->display('admin-bar.html.twig', [
'username' => USE_ACCOUNT_NAME ? $account_logged->getName() : $account_logged->getId()
]);
}
?>
<script src="<?php echo BASE_URL; ?>tools/ext/bootstrap/js/bootstrap.min.js"></script>
<script src="<?php echo BASE_URL; ?>tools/ext/jquery-ui/jquery-ui.min.js"></script>
<?php if (isset($use_datatable)) { ?>
<script src="<?php echo BASE_URL; ?>tools/js/datatables.min.js"></script>
<script src="<?php echo BASE_URL; ?>tools/js/datatables.bs.min.js"></script>
<?php } ?>
<script src="<?php echo BASE_URL; ?>tools/js/adminlte.min.js"></script>
<?php $hooks->trigger(HOOK_ADMIN_BODY_END); ?>
</body>
</html>

View File

@ -1,136 +0,0 @@
*{
margin:0;
padding:0;
}
body {
font-family: Helvetica;
color: #313334;
background: /*#f9f9f9 #EEEEEE*/#F7F6F1;
}
img {border: none;}
a:link {color: #000; text-decoration: none;}
a:visited {color: #000; text-decoration: none;}
a:focus {color: #000; text-decoration: none;}
a:active {color: #000; text-decoration: underline;}
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; }
.button:hover { color:#333; border-color:#857b42; }
.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 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;*/
padding-left: auto;
padding-right: auto;
border-bottom: 1px dotted black;
margin-top: 40px;
}
#header h1 {
margin: 0;
padding-top: 20px;
text-align: center;
}
#sidebar{
background: #FFF;
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;
clear: both;
}
/*********************
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 +0,0 @@
<?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">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<?php echo template_header(true); ?>
<title><?php echo $title . $config['title_separator'] . $config['lua']['serverName']; ?> - Powered by MyAAC</title>
<link rel="stylesheet" type="text/css" href="<?php echo $template_path; ?>style.css" />
</head>
<body>
<?php if($page != 'tools'): ?>
<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
if($logged && admin()) {
?>
<div id="sidebar">
<ul>
<?php
$menus = array(
'Dashboard' => 'dashboard',
'Mailer' => 'mailer',
'Pages' => 'pages',
'Plugins' => 'plugins',
'Statistics' => 'statistics',
'Visitors' => 'visitors',
'Players' => 'players',
'Tools' => array(
'phpinfo' => 'phpinfo'
),
'Notepad' => 'notepad',
'Logs' => 'logs'
);
$i = 0;
foreach($menus as $_name => $_page) {
//echo '<a ' . ($page == $_page ? ' class="current"' : '') . 'href="?p=' . $_page . '">' . $_name . '</a>';
echo '<li><h3>';
$has_child = is_array($_page);
if(!$has_child) {
echo '<a href="?p=' . $_page . '">';
if($page == $_page) echo '<u>';
echo $_name;
if($page == $_page) echo '</u>';
echo '</a>';
}
else
echo $_name;
echo '</h3>';
if($has_child) {
echo '<ul>';
foreach($_page as $__name => $__page)
echo '<li><a href="?p=' . $__page . '">';
if($page == $__page) echo '<u>';
echo $__name;
if($page == $__page) echo '</u>';
echo '</a></li>';
echo '</ul>';
}
echo '</li>';
}
?>
</ul>
</div>
<?php
}
?>
<div id="content"><?php echo $content; ?></div>
</div>
<div id="footer">
Powered by <a href="http://my-aac.org" target="_blank">MyAAC</a>
</div>
</div>
<?php endif; ?>
</body>
</html>

View File

@ -1,281 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dashboard - Admin Template</title>
<link rel="stylesheet" type="text/css" href="css/theme2.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script>
var StyleFile = "theme" + document.cookie.charAt(6) + ".css";
document.writeln('<link rel="stylesheet" type="text/css" href="css/' + StyleFile + '">');
</script>
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="css/ie-sucks.css" />
<![endif]-->
</head>
<body>
<div id="container">
<div id="header">
<h2>My eCommerce Admin area</h2>
<div id="topmenu">
<ul>
<li class="current"><a href="index.html">Dashboard</a></li>
<li><a href="#">Orders</a></li>
<li><a href="users.html">Users</a></li>
<li><a href="#">Manage</a></li>
<li><a href="#">CMS</a></li>
<li><a href="#">Statistics</a></li>
<li><a href="#">Settings</a></li>
</ul>
</div>
</div>
<div id="top-panel">
<div id="panel">
<ul>
<li><a href="#" class="report">Sales Report</a></li>
<li><a href="#" class="report_seo">SEO Report</a></li>
<li><a href="#" class="search">Search</a></li>
<li><a href="#" class="feed">RSS Feed</a></li>
</ul>
</div>
</div>
<div id="wrapper">
<div id="content">
<div id="rightnow">
<h3 class="reallynow">
<span>Right Now</span>
<a href="#" class="add">Add New Product</a>
<a href="#" class="app_add">Some Action</a>
<br />
</h3>
<p class="youhave">You have <a href="#">19 new orders</a>, <a href="#">12 new users</a> and <a href="#">5 new reviews</a>, today you made <a href="#">$1523.63 in sales</a> and a total of <strong>$328.24 profit </strong>
</p>
</div>
<div id="infowrap">
<div id="infobox">
<h3>Sales for July</h3>
<p><img src="img/graph.jpg" width="360" height="266" /></p>
</div>
<div id="infobox" class="margin-left">
<h3>Traffic for July</h3>
<p><img src="img/graph2.jpg" alt="a" width="359" height="266" /></p>
</div>
<div id="infobox">
<h3>Last 5 Orders</h3>
<table>
<thead>
<tr>
<th>Customer</th>
<th>Items</th>
<th>Grand Total</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#">Jennifer Kyrnin</a></td>
<td>1</td>
<td>14.95 €</td>
</tr>
<tr>
<td><a href="#">Mark Kyrnin</a></td>
<td>2</td>
<td>34.27 €</td>
</tr>
<tr>
<td><a href="#">Virgílio Cezar</a></td>
<td>2</td>
<td>61.39 €</td>
</tr>
<tr>
<td><a href="#">Todd Simonides</a></td>
<td>5</td>
<td>1472.56 €</td>
</tr>
<tr>
<td><a href="#">Carol Elihu</a></td>
<td>1</td>
<td>9.95 €</td>
</tr>
</tbody>
</table>
</div>
<div id="infobox" class="margin-left">
<h3>Bestsellers</h3>
<table>
<thead>
<tr>
<th>Product Name</th>
<th>Price</th>
<th>Orders</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#">Apple iPhone 3G 8GB</a></td>
<td>199.00 €</td>
<td>24</td>
</tr>
<tr>
<td><a href="#">Fuji FinePix S5800</a></td>
<td>365.24 €</td>
<td>19</td>
</tr>
<tr>
<td><a href="#">Canon PIXMA MP140</a></td>
<td>59.50 €</td>
<td>12</td>
</tr>
<tr>
<td><a href="#">Apple iPhone 3G 16GB</a></td>
<td>199.00 €</td>
<td>10</td>
</tr>
<tr>
<td><a href="#">Prenosnik HP 530 1,6GHz</a></td>
<td>499.00 €</td>
<td>6</td>
</tr>
</tbody>
</table>
</div>
<div id="infobox">
<h3>New Customers</h3>
<table>
<thead>
<tr>
<th>Customer</th>
<th>Orders</th>
<th>Average</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#">Jennifer Kyrnin</a></td>
<td>1</td>
<td>5.6€</td>
<td>14.95 €</td>
</tr>
<tr>
<td><a href="#">Mark Kyrnin</a></td>
<td>2</td>
<td>14.97€</td>
<td>34.27 €</td>
</tr>
<tr>
<td><a href="#">Virgílio Cezar</a></td>
<td>2</td>
<td>15.31€</td>
<td>61.39 €</td>
</tr>
<tr>
<td><a href="#">Todd Simonides</a></td>
<td>5</td>
<td>502.61€</td>
<td>1472.56 €</td>
</tr>
<tr>
<td><a href="#">Carol Elihu</a></td>
<td>1</td>
<td>5.1€</td>
<td>9.95 €</td>
</tr>
</tbody>
</table>
</div>
<div id="infobox" class="margin-left">
<h3>Last 5 Reviews</h3>
<table>
<thead>
<tr>
<th>Reviewer</th>
<th>Product</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#">Jennifer Kyrnin</a></td>
<td><a href="#">Apple iPhone 3G 8GB</a></td>
<td><a href="#"><img src="img/icons/page_white_link.png" /></a><a href="#"><img src="img/icons/page_white_edit.png" /></a><a href="#"><img src="img/icons/page_white_delete.png" /></a></td>
</tr>
<tr>
<td><a href="#">Mark Kyrnin</a></td>
<td><a href="#">Prenosnik HP 530 1,6GHz</a></td>
<td><a href="#"><img src="img/icons/page_white_link.png" /></a><a href="#"><img src="img/icons/page_white_edit.png" /></a><a href="#"><img src="img/icons/page_white_delete.png" /></a></td>
</tr>
<tr>
<td><a href="#">Virgílio Cezar</a></td>
<td><a href="#">Fuji FinePix S5800</a></td>
<td><a href="#"><img src="img/icons/page_white_link.png" /></a><a href="#"><img src="img/icons/page_white_edit.png" /></a><a href="#"><img src="img/icons/page_white_delete.png" /></a></td>
</tr>
<tr>
<td><a href="#">Todd Simonides</a></td>
<td><a href="#">Canon PIXMA MP140</a></td>
<td><a href="#"><img src="img/icons/page_white_link.png" /></a><a href="#"><img src="img/icons/page_white_edit.png" /></a><a href="#"><img src="img/icons/page_white_delete.png" /></a></td>
</tr>
<tr>
<td><a href="#">Carol Elihu</a></td>
<td><a href="#">Prenosnik HP 530 1,6GHz</a></td>
<td><a href="#"><img src="img/icons/page_white_link.png" /></a><a href="#"><img src="img/icons/page_white_edit.png" /></a><a href="#"><img src="img/icons/page_white_delete.png" /></a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="sidebar">
<ul>
<li><h3><a href="#" class="house">Dashboard</a></h3>
<ul>
<li><a href="#" class="report">Sales Report</a></li>
<li><a href="#" class="report_seo">SEO Report</a></li>
<li><a href="#" class="search">Search</a></li>
</ul>
</li>
<li><h3><a href="#" class="folder_table">Orders</a></h3>
<ul>
<li><a href="#" class="addorder">New order</a></li>
<li><a href="#" class="shipping">Shipments</a></li>
<li><a href="#" class="invoices">Invoices</a></li>
</ul>
</li>
<li><h3><a href="#" class="manage">Manage</a></h3>
<ul>
<li><a href="#" class="manage_page">Pages</a></li>
<li><a href="#" class="cart">Products</a></li>
<li><a href="#" class="folder">Product categories</a></li>
<li><a href="#" class="promotions">Promotions</a></li>
</ul>
</li>
<li><h3><a href="#" class="user">Users</a></h3>
<ul>
<li><a href="#" class="useradd">Add user</a></li>
<li><a href="#" class="group">User groups</a></li>
<li><a href="#" class="search">Find user</a></li>
<li><a href="#" class="online">Users online</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="footer">
<div id="credits">
Template by <a href="http://www.bloganje.com">Bloganje</a>
</div>
<div id="styleswitcher">
<ul>
<li><a href="javascript: document.cookie='theme='; window.location.reload();" title="Default" id="defswitch">d</a></li>
<li><a href="javascript: document.cookie='theme=1'; window.location.reload();" title="Blue" id="blueswitch">b</a></li>
<li><a href="javascript: document.cookie='theme=2'; window.location.reload();" title="Green" id="greenswitch">g</a></li>
<li><a href="javascript: document.cookie='theme=3'; window.location.reload();" title="Brown" id="brownswitch">b</a></li>
<li><a href="javascript: document.cookie='theme=4'; window.location.reload();" title="Mix" id="mixswitch">m</a></li>
<li><a href="javascript: document.cookie='theme=5'; window.location.reload();" title="Mix" id="defswitch">m</a></li>
</ul>
</div><br />
</div>
</div>
</body>
</html>

View File

@ -1,100 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dashboard - Admin Template</title>
<link rel="stylesheet" type="text/css" href="css/theme.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script>
var StyleFile = "theme" + document.cookie.charAt(6) + ".css";
document.writeln('<link rel="stylesheet" type="text/css" href="css/' + StyleFile + '">');
</script>
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="css/ie-sucks.css" />
<![endif]-->
</head>
<body>
<div id="container">
<div id="header">
<h2>My eCommerce Admin area</h2>
<div id="topmenu">
<ul>
<li class="current"><a href="index.html">Dashboard</a></li>
<li><a href="#">Orders</a></li>
<li><a href="users.html">Users</a></li>
<li><a href="#">Manage</a></li>
<li><a href="#">CMS</a></li>
<li><a href="#">Statistics</a></li>
<li><a href="#">Settings</a></li>
</ul>
</div>
</div>
<div id="top-panel">
<div id="panel">
<ul>
<li><a href="#" class="report">Sales Report</a></li>
<li><a href="#" class="report_seo">SEO Report</a></li>
<li><a href="#" class="search">Search</a></li>
<li><a href="#" class="feed">RSS Feed</a></li>
</ul>
</div>
</div>
<div id="wrapper">
<div id="content">
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
<div id="sidebar">
<ul>
<li><h3><a href="#" class="house">Dashboard</a></h3>
<ul>
<li><a href="#" class="report">Sales Report</a></li>
<li><a href="#" class="report_seo">SEO Report</a></li>
<li><a href="#" class="search">Search</a></li>
</ul>
</li>
<li><h3><a href="#" class="folder_table">Orders</a></h3>
<ul>
<li><a href="#" class="addorder">New order</a></li>
<li><a href="#" class="shipping">Shipments</a></li>
<li><a href="#" class="invoices">Invoices</a></li>
</ul>
</li>
<li><h3><a href="#" class="manage">Manage</a></h3>
<ul>
<li><a href="#" class="manage_page">Pages</a></li>
<li><a href="#" class="cart">Products</a></li>
<li><a href="#" class="folder">Product categories</a></li>
<li><a href="#" class="promotions">Promotions</a></li>
</ul>
</li>
<li><h3><a href="#" class="user">Users</a></h3>
<ul>
<li><a href="#" class="useradd">Add user</a></li>
<li><a href="#" class="group">User groups</a></li>
<li><a href="#" class="search">Find user</a></li>
<li><a href="#" class="online">Users online</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="footer">
<div id="credits">
Template by <a href="http://www.bloganje.com">Bloganje</a>
</div>
<div id="styleswitcher">
<ul>
<li><a href="javascript: document.cookie='theme='; window.location.reload();" title="Default" id="defswitch">d</a></li>
<li><a href="javascript: document.cookie='theme=1'; window.location.reload();" title="Blue" id="blueswitch">b</a></li>
<li><a href="javascript: document.cookie='theme=2'; window.location.reload();" title="Green" id="greenswitch">g</a></li>
<li><a href="javascript: document.cookie='theme=3'; window.location.reload();" title="Brown" id="brownswitch">b</a></li>
<li><a href="javascript: document.cookie='theme=4'; window.location.reload();" title="Mix" id="mixswitch">m</a></li>
</ul>
</div><br />
</div>
</div>
</body>
</html>

View File

@ -1,121 +0,0 @@
body{
background:#f7f6f0 url(../img/bg.jpg) repeat-x top;
color: #202020;
}
a, a:visited{
color:#993300;
}
input{
border:1px solid #e8e7e1;
}
select{
border:1px solid #e8e7e1;
}
#header h2{
color:#FFF;
}
#content{
background:#FFF;
}
#sidebar{
background:#FFF;
}
#sidebar h3{
background:#f7f6f0;
border-bottom:1px solid #e8e7e1;
}
#topmenu a,#topmenu a:visited{
color:#f7f6f0;
background:#cc3300;
}
#topmenu a:hover{
color: #FFF;
}
#topmenu .current a, #topmenu .current a:hover, #topmenu .current a:visited{
color:#993400;
background: #FFF url(../img/bg_menu_red.jpg) repeat-x top;
border-left: #FFF 1px solid;
border-right: #FFF 1px solid;
}
#top-panel{
background:#FFF;
}
table{
background:none;
}
td, th{
border:1px solid #e8e7e1;
}
thead{
background:#f7f6f0;
}
#styleswitcher{
background:#FFFFFF;
}
#footer{
background:#FFF;
}
#box{
border:1px solid #e8e7e1;
}
#box h3{
background:#f7f6f0;
border-bottom:1px solid #e8e7e1;
color:#993300;
}
/***************
Forms
***************/
form#form fieldset {
border:1px solid #e8e7e1;
}
form#form legend {
border:1px solid #e8e7e1;
background:#fff url(../img/form_red.gif) repeat-x center left;
color:#993300;
}
form#form input {
border:1px solid #e8e7e1;
background:#fff url(../img/form_red.gif) repeat-x top left;
}
form#form textarea {
border:1px solid #e8e7e1;
background:#fff url(../img/form_red.gif) repeat-x bottom left;
}
form#form option {
background:#FFF;
}
form#form optgroup {
background:#e8e7e1;
}
form#form optgroup option {
}
form#form #button1, form#form #button2 {
color:#c00;
}
form#form #button1:hover, form#form #button2:hover {
color:#000;
}
/***************
Home
***************/
#infobox{
border:1px solid #e8e7e1;
}
#infobox h3{
background:#f7f6f0;
border-bottom:1px solid #e8e7e1;
color:#993300;
}
#rightnow {
border:1px solid #e8e7e1;
}
#rightnow .reallynow {
background:#f7f6f0;
color:#993300;
}
#rightnow h3{
background:#f7f6f0;
border-bottom:1px solid #e8e7e1;
}

View File

@ -1,21 +0,0 @@
#content{
width:740px;
}
#topmenu{
margin-top:26px;
}
#sidebar{
width:160px;
}
#sidebar ul{
width:150px;
}
#sidebar ul li ul{
width:140px;
}
#sidebar h3{
margin-bottom:5px;
}
#rightnow .reallynow a {
padding:0 0 0 10px;
}

View File

@ -1,68 +0,0 @@
<public:component>
<public:attach event="onpropertychange" onevent="doFix()" />
<script type="text/javascript">
// IE5.5+ PNG Alpha Fix v1.0RC4
// (c) 2004-2005 Angus Turnbull http://www.twinhelix.com
// This is licensed under the CC-GNU LGPL, version 2.1 or later.
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/
// This must be a path to a blank image. That's all the configuration you need.
if (typeof blankImg == 'undefined') var blankImg = 'blank.gif';
var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
function filt(s, m)
{
if (filters[f])
{
filters[f].enabled = s ? true : false;
if (s) with (filters[f]) { src = s; sizingMethod = m }
}
else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
}
function doFix()
{
// Assume IE7 is OK.
if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) ||
(event && !/(background|src)/.test(event.propertyName))) return;
var bgImg = currentStyle.backgroundImage || style.backgroundImage;
if (tagName == 'IMG')
{
if ((/\.png$/i).test(src))
{
if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
style.width = offsetWidth + 'px';
filt(src, 'scale');
src = blankImg;
}
else if (src.indexOf(blankImg) < 0) filt();
}
else if (bgImg && bgImg != 'none')
{
if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i))
{
var s = RegExp.$1;
if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
style.width = offsetWidth + 'px';
style.backgroundImage = 'none';
filt(s, 'crop');
// IE link fix.
for (var n = 0; n < childNodes.length; n++)
if (childNodes[n].style) childNodes[n].style.position = 'relative';
}
else filt();
}
}
doFix();
</script>
</public:component>

View File

@ -1,397 +0,0 @@
/*********************
HTML Elements
*********************/
*{
margin:0;
padding:0;
}
img, div,a { behavior: url(css/iepngfix.htc) }
body{
font-size: 12px;
font-family: Arial, Tahoma, Verdana;
}
a, a:visited{
text-decoration:none;
}
img{
border:0;
margin:1px;
}
p{
padding:3px;
}
h2{
}
input{
padding:2px;
}
select{
padding:2px;
}
/*********************
Status
*********************/
#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;
}
/*********************
Structure
*********************/
#container{
width:960px;
margin-left:auto;
margin-right:auto;
}
#header{
width:960px;
}
#header h2{
margin-top:20px;
}
#content{
width:740px;
float:left;
margin:10px 0 10px 0;
padding:10px;
}
#sidebar{
background:#FFF;
width:170px;
float:right;
margin:10px 0 10px 0;
padding:10px;
}
#footer{
clear:both;
padding:5px;
margin-top:10px;
}
#box h3{
padding:5px;
font-size:14px;
}
/*********************
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;
}
/*********************
TopMenu, Top-Panel
*********************/
#topmenu{
margin-top:33px;
width:700px;
float:left;
voice-family:inherit;
}
#topmenu ul{
list-style:none;
line-height:25px;
}
#topmenu li{
display:inline;
}
#topmenu a,#topmenu a:visited{
padding:5px 12px 5px 12px;
text-decoration:none;
}
#topmenu .current a, #topmenu .current a:hover, #topmenu .current a:visited{
padding:5px 12px 5px 12px;
font-weight:bold;
}
#top-panel{
background:#FFF;
padding:5px;
height:20px;
float:left;
width:950px;
}
#top-panel ul{
list-style:none;
}
#top-panel ul li{
display:inline;
line-height:20px;
}
#top-panel ul li a{
padding-left:19px;
text-decoration:none;
margin:0 3px;
display:inline-block;
}
#top-panel a:hover{
text-decoration:underline;
}
/*********************
Other
*********************/
.a-right{text-align:right;}
.a-left{text-align:left;}
.a-center{text-align:center;}
#pager{
margin:5px;
height:25px;
}
#styleswitcher{
float:right;
}
#styleswitcher ul{
list-style:none;
line-height:10px;
}
#styleswitcher li{
height:12px;
display:inline;
}
#footer ul {
list-style:none;
}
#footer li {
display:inline;
}
a#defswitch {
width:15px;
height:10px;
margin: 3px 0 3px 0;
background-color:#bd3f09;
font-size: 8px;
color:#bd3f09;
display:inline-block;
}
a#blueswitch {
width:15px;
height:10px;
margin: 3px 0 3px 0;
background-color:#375b91;
font-size: 8px;
color:#375b91;
display:inline-block;
}
a#greenswitch {
width:15px;
height:10px;
margin: 3px 0 3px 0;
background-color:#d0e0b8;
font-size: 8px;
color:#d0e0b8;
display:inline-block;
}
a#brownswitch {
width:15px;
height:10px;
margin: 3px 0 3px 0;
background-color:#654322;
font-size: 8px;
color:#654322;
display:inline-block;
}
a#mixswitch {
width:15px;
height:10px;
margin: 3px 0 3px 0;
background-color:#294145;
font-size: 8px;
color:#294145;
display:inline-block;
}
#credits{
clear:both;
width:250px;
float:left;
}
/*********************
Tables
*********************/
table{
margin:5px;
border-collapse: collapse;
table-layout:automatic;
width:98%;
}
td, th{
padding: 2px;
}
thead{
}
/*********************
Home
*********************/
#infowrap li{
display:inline:
}
#infobox{
width:365px;
float:left;
margin-top:10px;
}
#infobox h3{
padding:5px;
font-size:14px;
}
.margin-left{
margin-left:5px;
}
#rightnow .reallynow {
padding: 5px;
font-size:14px;
}
#rightnow h3{
padding:2px;
padding: 0 10px;
font-size:14px;
}
#rightnow .reallynow span {
display: block;
text-align: left;
float: left;
padding:0 2px;
font-size:14px
}
#rightnow .reallynow a {
text-decoration:none;
display: block;
text-align: right;
float: right;
padding:0 0 0 18px;
margin-left:4px;
font-weight:normal;
font-size:12px;
}
#rightnow .reallynow a:hover{
text-decoration:underline;
}
#rightnow .youhave {
font-size: 12px;
padding: 10px;
}
#rightnow a {
font-weight: bold;
}
/*********************
Forms
*********************/
form{
padding:10px;
margin:0 auto;
}
form#form fieldset {
display:block;
padding:5px 10px 5px 10px;
line-height:20px;
margin-bottom:10px;
}
form#form legend {
font-size:12px;
font-weight:bold;
margin-bottom:5px;
padding:3px;
width:254px;
}
form#form label {
clear:left;
display:block;
float:left;
width:100px;
text-align:right;
padding-right:10px;
margin-bottom:5px;
}
form#form input {
padding:3px;
margin-bottom:5px;
}
form#form select {
margin-left:5px;
}
form#form textarea {
width:410px;
height:200px;
padding:5px;
overflow:auto;
}
form#form option {
background:#FFF;
}
form#form optgroup option {
}
form#form #button1, form#form #button2 {
padding-right:5px;
cursor:pointer;
width:205px;
margin-left:8px;
font-weight:bold;
}
form#form #button1:hover, form#form #button2:hover {
background-position:center left;
}
/*********************
Icons
*********************/
.icon{
padding-left:19px;
text-decoration:none;
height:20px;
font-size:12x;
margin:0 3px;
display:inline-block;
line-height:20px;
}
.user{background:transparent url(../img/icons/user.png) no-repeat left;}
.useradd{background:transparent url(../img/icons/user_add.png) no-repeat left;}
.group{background:transparent url(../img/icons/group.png) no-repeat left;}
.search{background:transparent url(../img/icons/magnifier.png) no-repeat left;}
.online{background:transparent url(../img/icons/world.png) no-repeat left;}
.pagenew{background:transparent url(../img/icons/page_add.png) no-repeat left;}
.rss{background:transparent url(../img/icons/rss.png) no-repeat left;}
.feed{background:transparent url(../img/icons/feed.png) no-repeat left;}
.report{background:transparent url(../img/icons/report.png) no-repeat left;}
.house{background:transparent url(../img/icons/house.png) no-repeat left;}
.manage{background:transparent url(../img/icons/cog.png) no-repeat left;}
.manage_page{background:transparent url(../img/icons/page_gear.png) no-repeat left;}
.folder{background:transparent url(../img/icons/folder.png) no-repeat left;}
.promotions{background:transparent url(../img/icons/coins.png) no-repeat left;}
.cart{background:transparent url(../img/icons/cart.png) no-repeat left;}
.folder_table{background:transparent url(../img/icons/folder_page.png) no-repeat left;}
.shipping{background:transparent url(../img/icons/car.png) no-repeat left;}
.invoices{background:transparent url(../img/icons/page_white_text_width.png) no-repeat left;}
.addorder{background:transparent url(../img/icons/folder_page_add.png) no-repeat left;}
.add{background:transparent url(../img/icons/add.png) no-repeat left;}
.app_add{background:transparent url(../img/icons/application_add.png) no-repeat left;}
.report_seo{background:transparent url(../img/icons/report_link.png) no-repeat left;}
.modules{background:transparent url(../img/icons/bricks.png) no-repeat left;}
.modules_manage{background:transparent url(../img/icons/bricks_gear.png) no-repeat left;}

View File

@ -1,51 +0,0 @@
#footer ul {
list-style:none;
}
#footer li {
display:inline;
}
a#defswitch {
width:15px;
height:10px;
margin: 3px 0 3px 0;
background-color:#bd3f09;
font-size: 8px;
color:#bd3f09;
display:inline-block;
}
a#blueswitch {
width:15px;
height:10px;
margin: 3px 0 3px 0;
background-color:#375b91;
font-size: 8px;
color:#375b91;
display:inline-block;
}
a#greenswitch {
width:15px;
height:10px;
margin: 3px 0 3px 0;
background-color:#d0e0b8;
font-size: 8px;
color:#d0e0b8;
display:inline-block;
}
a#brownswitch {
width:15px;
height:10px;
margin: 3px 0 3px 0;
background-color:#654322;
font-size: 8px;
color:#654322;
display:inline-block;
}
a#mixswitch {
width:15px;
height:10px;
margin: 3px 0 3px 0;
background-color:#294145;
font-size: 8px;
color:#294145;
display:inline-block;
}

View File

@ -1,121 +0,0 @@
body{
background:#f7f6f0 url(../img/bg.jpg) repeat-x top;
color: #202020;
}
a, a:visited{
color:#a43708;
}
input{
border:1px solid #e8e7e1;
}
select{
border:1px solid #e8e7e1;
}
#header h2{
color:#FFF;
}
#content{
background:#FFF;
}
#sidebar{
background:#FFF;
}
#sidebar h3{
background:#f7f6f0;
border-bottom:1px solid #e8e7e1;
}
#topmenu a,#topmenu a:visited{
color:#f7f6f0;
background:#bd3f09;
}
#topmenu a:hover{
color: #FFF;
}
#topmenu .current a, #topmenu .current a:hover, #topmenu .current a:visited{
color:#993400;
background: #FFF url(../img/bg_menu_red.jpg) repeat-x top;
border-left: #FFF 1px solid;
border-right: #FFF 1px solid;
}
#top-panel{
background:#FFF;
}
table{
background:none;
}
td, th{
border:1px solid #e8e7e1;
}
thead{
background:#f7f6f0;
}
#styleswitcher{
background:#FFFFFF;
}
#footer{
background:#FFF;
}
#box{
border:1px solid #e8e7e1;
}
#box h3{
background:#f7f6f0;
border-bottom:1px solid #e8e7e1;
color:#a43708;
}
/***************
Forms
***************/
form#form fieldset {
border:1px solid #e8e7e1;
}
form#form legend {
border:1px solid #e8e7e1;
background:#fff url(../img/form_red.gif) repeat-x center left;
color:#a43708;
}
form#form input {
border:1px solid #e8e7e1;
background:#fff url(../img/form_red.gif) repeat-x top left;
}
form#form textarea {
border:1px solid #e8e7e1;
background:#fff url(../img/form_red.gif) repeat-x bottom left;
}
form#form option {
background:#FFF;
}
form#form optgroup {
background:#e8e7e1;
}
form#form optgroup option {
}
form#form #button1, form#form #button2 {
color:#c00;
}
form#form #button1:hover, form#form #button2:hover {
color:#000;
}
/***************
Home
***************/
#infobox{
border:1px solid #e8e7e1;
}
#infobox h3{
background:#f7f6f0;
border-bottom:1px solid #e8e7e1;
color:#a43708;
}
#rightnow {
border:1px solid #e8e7e1;
}
#rightnow .reallynow {
background:#f7f6f0;
color:#a43708;
}
#rightnow h3{
background:#f7f6f0;
border-bottom:1px solid #e8e7e1;
}

View File

@ -1,121 +0,0 @@
body{
background:#f3f9ff url(../img/bg_blue.jpg) repeat-x top;
color: #202020;
}
a, a:visited{
color:#375b91;
}
input{
border:1px solid #d9e6f0;
}
select{
border:1px solid #d9e6f0;
}
#header h2{
color:#FFF;
}
#content{
background:#FFF;
}
#sidebar{
background:#FFF;
}
#sidebar h3{
background:#f3f9ff;
border-bottom:1px solid #d9e6f0;
}
#topmenu a,#topmenu a:visited{
color:#FFF;
background:#7e9dcc;
}
#topmenu a:hover{
color: #FFF;
}
#topmenu .current a, #topmenu .current a:hover, #topmenu .current a:visited{
color:#375b91;
background: #FFF url(../img/bg_menu_blue.jpg) repeat-x top;
border-left: #FFF 1px solid;
border-right: #FFF 1px solid;
}
#top-panel{
background:#FFF;
}
table{
background:none;
}
td, th{
border:1px solid #d9e6f0;
}
thead{
background:#f3f9ff;
}
#styleswitcher{
background:#FFFFFF;
}
#footer{
background:#FFF;
}
#box{
border:1px solid #d9e6f0;
}
#box h3{
background:#f3f9ff;
border-bottom:1px solid #d9e6f0;
color:#375b91;
}
/***************
Forms
***************/
form#form fieldset {
border:1px solid #d9e6f0;
}
form#form legend {
border:1px solid #d9e6f0;
background:#fff url(../img/form_blue.gif) repeat-x center left;
color:#375b91;
}
form#form input {
border:1px solid #d9e6f0;
background:#fff url(../img/form_blue.gif) repeat-x top left;
}
form#form textarea {
border:1px solid #d9e6f0;
background:#fff url(../img/form_blue.gif) repeat-x bottom left;
}
form#form option {
background:#FFF;
}
form#form optgroup {
background:#d9e6f0;
}
form#form optgroup option {
}
form#form #button1, form#form #button2 {
color:#375b91;
}
form#form #button1:hover, form#form #button2:hover {
color:#000;
}
/***************
Home
***************/
#infobox{
border:1px solid #d9e6f0;
}
#infobox h3{
background:#f3f9ff;
border-bottom:1px solid #d9e6f0;
color:#375b91;
}
#rightnow {
border:1px solid #d9e6f0;
}
#rightnow .reallynow {
background:#f3f9ff;
color:#375b91;
}
#rightnow h3{
background:#f3f9ff;
border-bottom:1px solid #d9e6f0;
}

View File

@ -1,121 +0,0 @@
body{
background:#f0f7e8 url(../img/bg_light_green.jpg) repeat-x top;
color: #202020;
}
a, a:visited{
color:#93ad7e;
}
input{
border:1px solid #e7eedf;
}
select{
border:1px solid #e7eedf;
}
#header h2{
color:#FFF;
}
#content{
background:#FFF;
}
#sidebar{
background:#FFF;
}
#sidebar h3{
background:#f0f7e8;
border-bottom:1px solid #e7eedf;
}
#topmenu a,#topmenu a:visited{
color:#93ad7e;
background:#e7eedc;
}
#topmenu a:hover{
color: #93ad7e;
}
#topmenu .current a, #topmenu .current a:hover, #topmenu .current a:visited{
color:#93ad7e;
background: #FFF url(../img/bg_menu_green.jpg) repeat-x top;
border-left: #FFF 1px solid;
border-right: #FFF 1px solid;
}
#top-panel{
background:#FFF;
}
table{
background:none;
}
td, th{
border:1px solid #e7eedf;
}
thead{
background:#f0f7e8;
}
#styleswitcher{
background:#FFFFFF;
}
#footer{
background:#FFF;
}
#box{
border:1px solid #e7eedf;
}
#box h3{
background:#f0f7e8;
border-bottom:1px solid #e7eedf;
color:#93ad7e;
}
/***************
Forms
***************/
form#form fieldset {
border:1px solid #e7eedf;
}
form#form legend {
border:1px solid #e7eedf;
background:#fff url(../img/form_green.gif) repeat-x center left;
color:#93ad7e;
}
form#form input {
border:1px solid #e7eedf;
background:#fff url(../img/form_green.gif) repeat-x top left;
}
form#form textarea {
border:1px solid #e7eedf;
background:#fff url(../img/form_green.gif) repeat-x bottom left;
}
form#form option {
background:#FFF;
}
form#form optgroup {
background:#e7eedf;
}
form#form optgroup option {
}
form#form #button1, form#form #button2 {
color:#93ad7e;
}
form#form #button1:hover, form#form #button2:hover {
color:#000;
}
/***************
Home
***************/
#infobox{
border:1px solid #e7eedf;
}
#infobox h3{
background:#f0f7e8;
border-bottom:1px solid #e7eedf;
color:#93ad7e;
}
#rightnow {
border:1px solid #e7eedf;
}
#rightnow .reallynow {
background:#f0f7e8;
color:#93ad7e;
}
#rightnow h3{
background:#f0f7e8;
border-bottom:1px solid #e7eedf;
}

View File

@ -1,121 +0,0 @@
body{
background:#f7f6f1 url(../img/bg_brown.jpg) repeat-x top;
color: #202020;
}
a, a:visited{
color:#654322;
}
input{
border:1px solid #e9e8e3;
}
select{
border:1px solid #e9e8e3;
}
#header h2{
color:#FFF;
}
#content{
background:#FFF;
}
#sidebar{
background:#FFF;
}
#sidebar h3{
background:#f7f6f1;
border-bottom:1px solid #e9e8e3;
}
#topmenu a,#topmenu a:visited{
color:#FFF;
background:#8f6831;
}
#topmenu a:hover{
color: #654322;
}
#topmenu .current a, #topmenu .current a:hover, #topmenu .current a:visited{
color:#654322;
background: #FFF url(../img/bg_menu_brown.jpg) repeat-x top;
border-left: #FFF 1px solid;
border-right: #FFF 1px solid;
}
#top-panel{
background:#FFF;
}
table{
background:none;
}
td, th{
border:1px solid #e9e8e3;
}
thead{
background:#f7f6f1;
}
#styleswitcher{
background:#FFFFFF;
}
#footer{
background:#FFF;
}
#box{
border:1px solid #e9e8e3;
}
#box h3{
background:#f7f6f1;
border-bottom:1px solid #e9e8e3;
color:#654322;
}
/***************
Forms
***************/
form#form fieldset {
border:1px solid #e9e8e3;
}
form#form legend {
border:1px solid #e9e8e3;
background:#fff url(../img/form_brown.gif) repeat-x center left;
color:#654322;
}
form#form input {
border:1px solid #e9e8e3;
background:#fff url(../img/form_brown.gif) repeat-x top left;
}
form#form textarea {
border:1px solid #e9e8e3;
background:#fff url(../img/form_brown.gif) repeat-x bottom left;
}
form#form option {
background:#FFF;
}
form#form optgroup {
background:#e9e8e3;
}
form#form optgroup option {
}
form#form #button1, form#form #button2 {
color:#654322;
}
form#form #button1:hover, form#form #button2:hover {
color:#000;
}
/***************
Home
***************/
#infobox{
border:1px solid #e9e8e3;
}
#infobox h3{
background:#f7f6f1;
border-bottom:1px solid #e9e8e3;
color:#654322;
}
#rightnow {
border:1px solid #e9e8e3;
}
#rightnow .reallynow {
background:#f7f6f1;
color:#654322;
}
#rightnow h3{
background:#f7f6f1;
border-bottom:1px solid #e9e8e3;
}

View File

@ -1,122 +0,0 @@
body{
background:#d9eaed url(../img/bg_mix.jpg) repeat-x top;
color: #202020;
}
a, a:visited{
color:#294145;
text-decoration:underline;
}
input{
border:1px solid #c3d7db;
}
select{
border:1px solid #c3d7db;
}
#header h2{
color:#FFF;
}
#content{
background:#FFF;
}
#sidebar{
background:#FFF;
}
#sidebar h3{
background:#d9eaed;
border-bottom:1px solid #c3d7db;
}
#topmenu a,#topmenu a:visited{
color:#FFF;
background:#5d99a3;
}
#topmenu a:hover{
color: #294145;
}
#topmenu .current a, #topmenu .current a:hover, #topmenu .current a:visited{
color:#294145;
background: #FFF url(../img/bg_menu_mix.jpg) repeat-x top;
border-left: #FFF 1px solid;
border-right: #FFF 1px solid;
}
#top-panel{
background:#FFF;
}
table{
background:none;
}
td, th{
border:1px solid #c3d7db;
}
thead{
background:#d9eaed;
}
#styleswitcher{
background:#FFFFFF;
}
#footer{
background:#FFF;
}
#box{
border:1px solid #c3d7db;
}
#box h3{
background:#d9eaed;
border-bottom:1px solid #c3d7db;
color:#294145;
}
/***************
Forms
***************/
form#form fieldset {
border:1px solid #c3d7db;
}
form#form legend {
border:1px solid #c3d7db;
background:#fff url(../img/form_mix.gif) repeat-x center left;
color:#294145;
}
form#form input {
border:1px solid #c3d7db;
background:#fff url(../img/form_mix.gif) repeat-x top left;
}
form#form textarea {
border:1px solid #c3d7db;
background:#fff url(../img/form_mix.gif) repeat-x bottom left;
}
form#form option {
background:#FFF;
}
form#form optgroup {
background:#c3d7db;
}
form#form optgroup option {
}
form#form #button1, form#form #button2 {
color:#294145;
}
form#form #button1:hover, form#form #button2:hover {
color:#000;
}
/***************
Home
***************/
#infobox{
border:1px solid #c3d7db;
}
#infobox h3{
background:#d9eaed;
border-bottom:1px solid #c3d7db;
color:#294145;
}
#rightnow {
border:1px solid #c3d7db;
}
#rightnow .reallynow {
background:#d9eaed;
color:#294145;
}
#rightnow h3{
background:#d9eaed;
border-bottom:1px solid #c3d7db;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 B

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