diff --git a/src/acore-wp-plugin/src/Components/AdminPanel/Pages/ElunaSettings.php b/src/acore-wp-plugin/src/Components/AdminPanel/Pages/ElunaSettings.php index 6ba0396cd..1cfaa810f 100644 --- a/src/acore-wp-plugin/src/Components/AdminPanel/Pages/ElunaSettings.php +++ b/src/acore-wp-plugin/src/Components/AdminPanel/Pages/ElunaSettings.php @@ -6,6 +6,7 @@

page_alias) ?>

Configure database connection for Eluna script that need use of the CMS.

+
diff --git a/src/acore-wp-plugin/src/Components/AdminPanel/Pages/PVPRewards.php b/src/acore-wp-plugin/src/Components/AdminPanel/Pages/PVPRewards.php index 101ce4a6b..ef1beea80 100644 --- a/src/acore-wp-plugin/src/Components/AdminPanel/Pages/PVPRewards.php +++ b/src/acore-wp-plugin/src/Components/AdminPanel/Pages/PVPRewards.php @@ -14,6 +14,7 @@
Give rewards

+ diff --git a/src/acore-wp-plugin/src/Components/AdminPanel/Pages/RealmSettings.php b/src/acore-wp-plugin/src/Components/AdminPanel/Pages/RealmSettings.php index d99ff9f7e..5ac88f32a 100644 --- a/src/acore-wp-plugin/src/Components/AdminPanel/Pages/RealmSettings.php +++ b/src/acore-wp-plugin/src/Components/AdminPanel/Pages/RealmSettings.php @@ -1,254 +1,392 @@

page_alias) ?>

Configure realm name and database connection.

- -
-
-
- General Settings -
-
-
- - - - - - - - -

- First time using SOAP? Click me! + +

+ + +
+ + +
+
+
General Settings
+
+ + + + + + + + +

First time using SOAP? Click me!

+
+
+ SOAP Settings + acore_soap_host && Opts::I()->acore_soap_user): ?> + Checking… + +
+ + + + + + + + + + + + + + + + + + + + +
+
Database: Auth
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
Database: Characters
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
Database: World
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +

+ +

-
- -
- SOAP Settings -
- - - - - - - - - - - - - - - - - - - - - -
- - -
- Database: Auth -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- Database: Characters -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- Database: World -
- - - - - - - - - - - - - - - - - - - - - - - - -
+
You will need to "Save Changes" above before checking your SOAP Configuration!
+
-
+ + - -
+ + + +
+
diff --git a/src/acore-wp-plugin/src/Components/AdminPanel/Pages/Tools.php b/src/acore-wp-plugin/src/Components/AdminPanel/Pages/Tools.php index 86058a205..104c20a69 100644 --- a/src/acore-wp-plugin/src/Components/AdminPanel/Pages/Tools.php +++ b/src/acore-wp-plugin/src/Components/AdminPanel/Pages/Tools.php @@ -1,16 +1,83 @@ acore_resurrection_scroll == '1'; ?> @@ -21,20 +88,19 @@

Tools


+
-
+ + +
-
- Worldserver integration -
+
World Server Integration

- + - acore_resurrection_scroll != '1') echo 'style="display:none;"'?>> - + + @@ -67,91 +157,448 @@ -
+ +
+
+
+
Web Integration
+
+
+ + + + + + + + + + + + + + + + +
+ + +

Remove 2FA

+

+ Remove Website or In-game 2FA for any account. A warning is shown to the user until they re-enable it. +

+ + +

Website

+
+ + + +
+

+ + +
+

Backup Codes

+ Check a Website account above to view backup codes. + +
+ + +

In-Game

+
+ + + +
+

+ +
+
+
+ + +
-
- Name Unlock Settings -
+
Name Unlock Settings

Allowed banned names table (characters database): -
-
+

Inactivity Thresholds per Level: - + -
Add
+
+
+ Add +
+
+ Reset +
+
+
+ +
+ + +
+
+
User Login History
+
+

+ Look up the recorded login IP history for any account (the same list the user sees on their Security page). +

+
+ + +
+

+ + + + + + +

+ +

-
- -
+

+ +

+ + + diff --git a/src/acore-wp-plugin/src/Components/AdminPanel/SettingsController.php b/src/acore-wp-plugin/src/Components/AdminPanel/SettingsController.php index b14b73694..e069943a7 100644 --- a/src/acore-wp-plugin/src/Components/AdminPanel/SettingsController.php +++ b/src/acore-wp-plugin/src/Components/AdminPanel/SettingsController.php @@ -44,6 +44,8 @@ public function loadSettings() { // If they did, this hidden field will be set to 'Y' if ($_SERVER['REQUEST_METHOD'] == 'POST') { + check_admin_referer('acore_realm_settings_save', 'acore_realm_settings_nonce'); + foreach (Opts::I()->getConfs() as $key => $value) { if (isset($_POST[$key])) { $this->storeConf($key, $_POST[$key]); @@ -84,6 +86,8 @@ public function loadElunaSettings() { // If they did, this hidden field will be set to 'Y' if ($_SERVER['REQUEST_METHOD'] == 'POST') { + check_admin_referer('acore_eluna_settings_save', 'acore_eluna_settings_nonce'); + foreach (Opts::I()->getConfs() as $key => $value) { if (isset($_POST[$key])) { $this->storeConf($key, $_POST[$key]); @@ -131,6 +135,7 @@ public function loadPvpRewards() { //! DEV NOTE: Put the rest of stuff within try { ... } check to handle every exception properly try { if ($_SERVER['REQUEST_METHOD'] == 'POST') { + check_admin_referer('acore_pvp_rewards_save', 'acore_pvp_rewards_nonce'); global $wpdb; $tableResult = $wpdb->query("CREATE TEMPORARY TABLE temp_pvp_rewards ( `account` VARCHAR(255) COLLATE utf8_unicode_ci, @@ -385,6 +390,8 @@ public function loadTools() { //! DEV NOTE: Put the rest of stuff within try { ... } check to handle every exception properly try { if ($_SERVER['REQUEST_METHOD'] == 'POST') { + check_admin_referer('acore_tools_save', 'acore_tools_nonce'); + foreach (Opts::I()->getConfs() as $key => $value) { if (isset($_POST[$key])) { if ($key == 'acore_name_unlock_allowed_banned_names_table') { diff --git a/src/acore-wp-plugin/src/Components/CharactersMenu/CharactersController.php b/src/acore-wp-plugin/src/Components/CharactersMenu/CharactersController.php index 98dee522d..a13123fd7 100644 --- a/src/acore-wp-plugin/src/Components/CharactersMenu/CharactersController.php +++ b/src/acore-wp-plugin/src/Components/CharactersMenu/CharactersController.php @@ -14,10 +14,18 @@ public function __construct() { public function loadHome() { if ($_SERVER["REQUEST_METHOD"] == "POST") { - $this->saveCharacterOrder(); - ?> -

Character settings succesfully saved.

- resetCharacterOrder(); + ?> +

Character order reset successfully.

+ saveCharacterOrder(); + ?> +

Character settings succesfully saved.

+ getAcoreAccountId(); @@ -38,6 +46,16 @@ public function getView() { return $this->view; } + private function resetCharacterOrder() { + $accId = ACoreServices::I()->getAcoreAccountId(); + $conn = ACoreServices::I()->getCharacterEm()->getConnection(); + $stmt = $conn->prepare( + "UPDATE `characters` SET `order` = NULL WHERE `account` = ? AND `deleteDate` IS NULL" + ); + $stmt->bindValue(1, $accId); + $stmt->executeQuery(); + } + private function saveCharacterOrder() { if (!isset($_POST) || !isset($_POST["characterorder"])) { return; diff --git a/src/acore-wp-plugin/src/Components/CharactersMenu/CharactersView.php b/src/acore-wp-plugin/src/Components/CharactersMenu/CharactersView.php index 12d98ae34..3ca170abc 100644 --- a/src/acore-wp-plugin/src/Components/CharactersMenu/CharactersView.php +++ b/src/acore-wp-plugin/src/Components/CharactersMenu/CharactersView.php @@ -2,6 +2,8 @@ namespace ACore\Components\CharactersMenu; +use ACore\Utils\AcoreCharColors; + class CharactersView { private $controller; @@ -16,44 +18,47 @@ public function __construct($controller) { public function getHomeRender($characters) { ob_start(); wp_enqueue_style('bootstrap-css', '//cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css', array(), '5.1.3'); - wp_enqueue_style('acore-css', ACORE_URL_PLG . 'web/assets/css/main.css', array(), '0.1'); + wp_enqueue_style('acore-css', ACORE_URL_PLG . 'web/assets/css/main.css', array(), '0.5'); wp_enqueue_script('bootstrap-js', '//cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js', array(), '5.1.3'); wp_enqueue_script('jquery-ui-sortable'); ?>
-

Characters Settings

-

Check some details and configure of your characters.

-
-

Order

-

Change the order in which the characters appear in your in-game character selection screen.

+

Order Character Screen

+

Change the order in which the characters appear in your in-game character selection screen, by dragging them, matches in-game position.


+ -
    - +
      +
    • -
    - +
    + + +
@@ -62,12 +67,23 @@ public function getHomeRender($characters) {
- - acore_db_world_name; $itemQuery = "SELECT mi.`mail_id`, ii.`itemEntry`, ii.`count`, - it.`name` AS item_name + it.`name` AS item_name, it.`Quality` AS item_quality FROM `mail_items` mi JOIN `item_instance` ii ON mi.`item_guid` = ii.`guid` JOIN `$worldDb`.`item_template` it ON ii.`itemEntry` = it.`entry` diff --git a/src/acore-wp-plugin/src/Components/MailReturnMenu/MailReturnView.php b/src/acore-wp-plugin/src/Components/MailReturnMenu/MailReturnView.php index 5a882e5c2..74af3c7ed 100644 --- a/src/acore-wp-plugin/src/Components/MailReturnMenu/MailReturnView.php +++ b/src/acore-wp-plugin/src/Components/MailReturnMenu/MailReturnView.php @@ -2,6 +2,8 @@ namespace ACore\Components\MailReturnMenu; +use ACore\Utils\AcoreCharColors; + class MailReturnView { @@ -17,58 +19,80 @@ public function getMailReturnRender($chars) ob_start(); wp_enqueue_style('bootstrap-css', '//cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css', array(), '5.1.3'); - wp_enqueue_style('acore-css', ACORE_URL_PLG . 'web/assets/css/main.css', array(), '0.1'); + wp_enqueue_style('acore-css', ACORE_URL_PLG . 'web/assets/css/main.css', array(), '0.5'); wp_enqueue_script('bootstrap-js', '//cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js', array(), '5.1.3'); wp_enqueue_script('jquery'); - wp_enqueue_script('acore-mail-return-js', ACORE_URL_PLG . 'web/assets/mail-return/mail-return.js', array('jquery'), null, true); + wp_enqueue_script('power-js', 'https://wow.zamimg.com/widgets/power.js', array(), null, false); + wp_enqueue_script('acore-mail-return-js', ACORE_URL_PLG . 'web/assets/mail-return/mail-return.js', array('jquery'), '2.3', true); + wp_localize_script('acore-mail-return-js', 'mailReturnData', [ + 'mailsUrl' => rest_url(ACORE_SLUG . '/v1/mail-return/list'), + 'returnUrl' => rest_url(ACORE_SLUG . '/v1/mail-return'), + 'assetsUrl' => ACORE_URL_PLG . 'web/assets/', + 'nonce' => wp_create_nonce('wp_rest'), + ]); ?> -
-
-
-
-

Mail Return

-

You can return sent mails that have not yet been read by the recipient in this page. Select the character, the sent mail and hit return.

-
- - - - -