Testpanel klasörüne güncel dosyalar eklendi

This commit is contained in:
2026-04-20 22:28:31 +03:00
commit eb7e1a2b0f
107 changed files with 16317 additions and 0 deletions

125
testpanel/assets/js/dns.js Normal file
View File

@@ -0,0 +1,125 @@
"use strict";
var KTModalCustomersAdd = (function () {
var t, e, o, n, r, i;
return {
init: function () {
(i = new bootstrap.Modal(
document.querySelector("#rainbow_dns")
)),
(r = document.querySelector("#rainbow_dns_form")),
(t = r.querySelector("#rainbow_dns_submit")),
(e = r.querySelector("#rainbow_dns_cancel")),
(o = r.querySelector("#rainbow_dns_close")),
(n = FormValidation.formValidation(r, {
fields: {
title: {
validators: {
notEmpty: { message: "Title is required" },
},
},
url: {
validators: {
notEmpty: { message: "Url is required" },
},
},
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
bootstrap: new FormValidation.plugins.Bootstrap5({
rowSelector: ".fv-row",
eleInvalidClass: "",
eleValidClass: "",
}),
},
})),
t.addEventListener("click", function (e) {
e.preventDefault(),
n &&
n.validate().then(function (e) {
console.log("validated!"),
"Valid" == e
? (t.setAttribute("data-kt-indicator", "on"),
(t.disabled = !0),
setTimeout(function () {
t.removeAttribute("data-kt-indicator"),
Swal.fire({
text: "Form has been successfully submitted!",
icon: "success",
buttonsStyling: !1,
confirmButtonText: "Ok, got it!",
customClass: { confirmButton: "btn btn-primary" },
}).then(function (e) {
e.isConfirmed &&
(i.hide(),
(t.disabled = !1),
(window.location =
r.getAttribute("data-kt-redirect")));
});
}, 2e3))
: Swal.fire({
text: "Sorry, looks like there are some errors detected, please try again.",
icon: "error",
buttonsStyling: !1,
confirmButtonText: "Ok, got it!",
customClass: { confirmButton: "btn btn-primary" },
});
});
}),
e.addEventListener("click", function (t) {
t.preventDefault(),
Swal.fire({
text: "Are you sure you would like to cancel?",
icon: "warning",
showCancelButton: !0,
buttonsStyling: !1,
confirmButtonText: "Yes, cancel it!",
cancelButtonText: "No, return",
customClass: {
confirmButton: "btn btn-primary",
cancelButton: "btn btn-active-light",
},
}).then(function (t) {
t.value
? (r.reset(), i.hide())
: "cancel" === t.dismiss &&
Swal.fire({
text: "Your form has not been cancelled!.",
icon: "error",
buttonsStyling: !1,
confirmButtonText: "Ok, got it!",
customClass: { confirmButton: "btn btn-primary" },
});
});
}),
o.addEventListener("click", function (t) {
t.preventDefault(),
Swal.fire({
text: "Are you sure you would like to cancel?",
icon: "warning",
showCancelButton: !0,
buttonsStyling: !1,
confirmButtonText: "Yes, cancel it!",
cancelButtonText: "No, return",
customClass: {
confirmButton: "btn btn-primary",
cancelButton: "btn btn-active-light",
},
}).then(function (t) {
t.value
? (r.reset(), i.hide())
: "cancel" === t.dismiss &&
Swal.fire({
text: "Your form has not been cancelled!.",
icon: "error",
buttonsStyling: !1,
confirmButtonText: "Ok, got it!",
customClass: { confirmButton: "btn btn-primary" },
});
});
});
},
};
})();
KTUtil.onDOMContentLoaded(function () {
KTModalCustomersAdd.init();
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,96 @@
"use strict";
var KTSigninGeneral = (function () {
var t, e, r;
return {
init: function () {
(t = document.querySelector("#kt_sign_in_form")),
(e = document.querySelector("#kt_sign_in_submit")),
(r = FormValidation.formValidation(t, {
fields: {
username: {
validators: {
notEmpty: { message: "The username is required" },
},
},
password: {
validators: {
notEmpty: { message: "The password is required" },
},
},
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
bootstrap: new FormValidation.plugins.Bootstrap5({
rowSelector: ".fv-row",
eleInvalidClass: "",
eleValidClass: "",
}),
},
})),
e.addEventListener("click", function (i) {
i.preventDefault(),
r.validate().then(function (r) {
if ("Valid" === r) {
e.setAttribute("data-kt-indicator", "on"),
(e.disabled = !0);
fetch("authenticate.php", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({
username: t.querySelector('[name="username"]').value,
password: t.querySelector('[name="password"]').value,
}).toString(),
})
.then((response) => response.json())
.then((data) => {
e.removeAttribute("data-kt-indicator"), (e.disabled = !1);
if (data.success) {
Swal.fire({
text: data.message,
icon: "success",
buttonsStyling: !1,
confirmButtonText: "Ok, got it!",
customClass: { confirmButton: "btn btn-primary" },
}).then(() => {
window.location.href = "mac.php";
});
} else {
Swal.fire({
text: data.message,
icon: "error",
buttonsStyling: !1,
confirmButtonText: "Try again",
customClass: { confirmButton: "btn btn-primary" },
});
}
})
.catch((error) => {
e.removeAttribute("data-kt-indicator"), (e.disabled = !1);
Swal.fire({
text: "An error occurred while processing your request. Please try again.",
icon: "error",
buttonsStyling: !1,
confirmButtonText: "Ok, got it!",
customClass: { confirmButton: "btn btn-primary" },
});
console.error("Error:", error);
});
} else {
Swal.fire({
text: "Sorry, looks like there are some errors detected, please try again.",
icon: "error",
buttonsStyling: !1,
confirmButtonText: "Ok, got it!",
customClass: { confirmButton: "btn btn-primary" },
});
}
});
});
},
};
})();
KTUtil.onDOMContentLoaded(function () {
KTSigninGeneral.init();
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long