aboutsummaryrefslogtreecommitdiff
path: root/Neutron-trunk/cms-special/admin-v2/password
diff options
context:
space:
mode:
Diffstat (limited to 'Neutron-trunk/cms-special/admin-v2/password')
-rw-r--r--Neutron-trunk/cms-special/admin-v2/password/index.php51
1 files changed, 0 insertions, 51 deletions
diff --git a/Neutron-trunk/cms-special/admin-v2/password/index.php b/Neutron-trunk/cms-special/admin-v2/password/index.php
deleted file mode 100644
index 2ea9e60..0000000
--- a/Neutron-trunk/cms-special/admin-v2/password/index.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?>
-<?php $loadEditor = false;$pageConfig = [ "domName" => "Apparence", "headerName" => "Apparence" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?>
- <h2><?= $lang["admin-appearance"]["password"] ?></h2>
- <span id="password-error-box" class="hide"><div id="error"><span id="password-error"><?= $lang["admin-appearance"]["error"] ?></span></div></span>
- <div id="password-settings" style="text-align: center;">
- <p><?= $lang["admin-appearance"]["oldpass"] ?> <input type="password" id="old-password" placeholder="<?= $lang["admin-appearance"]["secure"] ?>"></p>
- <p><?= $lang["admin-appearance"]["newpass"] ?> <input type="password" id="new-password" placeholder="<?= $lang["admin-appearance"]["secure"] ?>"></p>
- <p><?= $lang["admin-appearance"]["passrep"] ?> <input type="password" id="repeat-password" placeholder="<?= $lang["admin-appearance"]["secure"] ?>"></p>
- <a onclick="changePassword()" class="button"><?= $lang["admin-appearance"]["change"] ?></a>
- </div>
- <div style="text-align: center;"><div id="password-loader" class="hide"><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/loader.svg" class="loader"></div></div>
-<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?>
-
-<script>
-
-function changePassword() {
- document.getElementById('password-loader').classList.remove('hide')
- document.getElementById('password-settings').classList.add('hide')
- var formData = new FormData();
- formData.append("oldpass", document.getElementById('old-password').value);
- formData.append("newpass", document.getElementById('new-password').value);
- formData.append("newpassr", document.getElementById('repeat-password').value);
- document.getElementById('password-error-box').classList.add("hide")
- $.ajax({
- type: "POST",
- dataType: 'html',
- url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/password.php",
- success: function (data) {
- if (data == "ok") {
- location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$panes/accounts.php";
- } else {
- document.getElementById('password-error').innerHTML = data
- document.getElementById('password-error-box').classList.remove("hide")
- document.getElementById('password-loader').classList.add('hide')
- document.getElementById('password-settings').classList.remove('hide')
- }
- },
- error: function (error) {
- document.getElementById('password-error').innerHTML = "<?= $lang["admin-errors"]["connerror"] ?>"
- document.getElementById('password-error-box').classList.remove("hide")
- document.getElementById('password-loader').classList.add('hide')
- document.getElementById('password-settings').classList.remove('hide')
- },
- data: formData,
- cache: false,
- contentType: false,
- processData: false
- });
-}
-
-</script> \ No newline at end of file