Файловый менеджер - Редактировать - /www/wwwroot/clodys.biz.id/static/img/logo/main.js.tar
Ðазад
www/wwwroot/clodys.biz.id/js/main.js 0000644 00000030072 15014543537 0013502 0 ustar 00 // var cursor = document.querySelector(".cursor"); // var cursorinner = document.querySelector(".cursor2"); // var a = document.querySelectorAll("a"); // document.addEventListener("mousemove", function (e) { // var x = e.clientX; // var y = e.clientY; // cursor.style.transform = `translate3d(calc(${e.clientX}px - 50%), calc(${e.clientY}px - 50%), 0)`; // }); // document.addEventListener("mousemove", function (e) { // var x = e.clientX; // var y = e.clientY; // cursorinner.style.left = x + "px"; // cursorinner.style.top = y + "px"; // }); // document.addEventListener("mousedown", function () { // cursor.classList.add("click"); // cursorinner.classList.add("cursorinnerhover"); // }); // document.addEventListener("mouseup", function () { // cursor.classList.remove("click"); // cursorinner.classList.remove("cursorinnerhover"); // }); // a.forEach((item) => { // item.addEventListener("mouseover", () => { // cursor.classList.add("hover"); // }); // item.addEventListener("mouseleave", () => { // cursor.classList.remove("hover"); // }); // }); // const menu = document.querySelector(".burger-menu"); // const menuSm = document.querySelector(".burger-menu-sm"); // const sidebar = document.querySelector(".zontal-sidebar"); // const overlay = document.querySelector(".zontal-sidebar .overlay"); // if (menu !== null) { // menu.addEventListener("click", () => { // if (window.innerWidth <= 2020) { // sidebar.classList.toggle("active"); // } else { // sidebar.classList.toggle("close"); // } // }); // } // if (menuSm !== null) { // menuSm.addEventListener("click", () => { // sidebar.classList.toggle("active"); // }); // } // const title = document.querySelectorAll(".game-card a"); // title.forEach((e) => { // e.addEventListener("mousemove", () => { // cursorinner.classList.add("link-hover"); // // console.log("Hello..."); // }); // e.addEventListener("mouseleave", () => { // cursorinner.classList.remove("link-hover"); // // console.log("Hello..."); // }); // }); // var pagination = document.querySelectorAll(".Pagination button"); // pagination.forEach((e) => { // e.addEventListener("mousemove", () => { // cursor.classList.add("pag-cur"); // cursorinner.classList.add("pag-cur"); // }); // e.addEventListener("mouseleave", () => { // cursor.classList.remove("pag-cur"); // cursorinner.classList.remove("pag-cur"); // }); // }); // const slideButtons = document.querySelectorAll(".Pagination button"); // slideButtons.forEach((button) => { // button.addEventListener("click", HandleSlide); // }); // function HandleSlide() { // var main = this.parentNode.parentNode.getAttribute("data-target"); // main = document.querySelector(main); // var angle = this.parentNode; // if (angle.classList[0].includes("left-pagination")) { // main.scrollLeft -= 300; // console.log("Left"); // } else { // main.scrollLeft += 300; // console.log("Right"); // } // } // var sideBarLists = document.querySelectorAll(".zontal-sidebar-body li"); // if (sideBarLists !== null) { // sideBarLists.forEach((e) => { // e.addEventListener("mousemove", () => { // cursor.classList.add("list-cursor-effect"); // e.classList.add("add-border"); // }); // e.addEventListener("mouseleave", () => { // cursor.classList.remove("list-cursor-effect"); // e.classList.remove("add-border"); // }); // }); // } // const toggler = document.querySelector(".theme-toggler"); // const darkIcon = document.getElementById("DarkIcon"); // const lightIcon = document.getElementById("LightIcon"); // toggler.addEventListener("change", () => { // if (toggler.checked) { // document.documentElement.setAttribute("zontal-theme", "dark"); // localStorage.setItem("zon_theme", "dark"); // darkIcon.classList.add("active-icon"); // lightIcon.classList.remove("active-icon"); // } else { // document.documentElement.setAttribute("zontal-theme", "light"); // localStorage.setItem("zon_theme", "light"); // darkIcon.classList.remove("active-icon"); // lightIcon.classList.add("active-icon"); // } // }); // const theme = localStorage.getItem("zon_theme"); // if (theme === "dark") { // toggler.checked = true; // document.documentElement.setAttribute("zontal-theme", "dark"); // darkIcon.classList.add("active-icon"); // lightIcon.classList.remove("active-icon"); // } else { // toggler.checked = false; // document.documentElement.setAttribute("zontal-theme", "light"); // darkIcon.classList.remove("active-icon"); // lightIcon.classList.add("active-icon"); // } // window // .matchMedia("(prefers-color-scheme: dark)") // .addEventListener("change", ({ matches }) => { // localStorage.clear(); // if (matches) { // toggler.checked = true; // document.documentElement.setAttribute("zontal-theme", "dark"); // darkIcon.classList.add("active-icon"); // lightIcon.classList.remove("active-icon"); // } else { // toggler.checked = false; // document.documentElement.setAttribute("zontal-theme", "light"); // darkIcon.classList.remove("active-icon"); // lightIcon.classList.add("active-icon"); // } // }); const iframe = document.getElementById("game-frame"); const fullscreenButton = document.getElementById("fullscreenButton"); // Function to request fullscreen function requestFullscreen(element) { if (element.requestFullscreen) { element.requestFullscreen(); } else if (element.mozRequestFullScreen) { // Firefox element.mozRequestFullScreen(); } else if (element.webkitRequestFullscreen) { // Chrome, Safari, and Opera element.webkitRequestFullscreen(); } else if (element.msRequestFullscreen) { // IE/Edge element.msRequestFullscreen(); } } // Function to exit fullscreen function exitFullscreen() { if (document.exitFullscreen) { document.exitFullscreen(); } else if (document.mozCancelFullScreen) { // Firefox document.mozCancelFullScreen(); } else if (document.webkitExitFullscreen) { // Chrome, Safari, and Opera document.webkitExitFullscreen(); } else if (document.msExitFullscreen) { // IE/Edge document.msExitFullscreen(); } } if (fullscreenButton !== null) { fullscreenButton.addEventListener("click", () => { if ( !document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement ) { requestFullscreen(iframe); } else { exitFullscreen(); } }); } function copyToURL() { // Select the input element const textToCopy = document.getElementById("textToCopy"); // Select the text within the input element textToCopy.select(); // Copy the selected text to the clipboard document.execCommand("copy"); // Deselect the text (optional) textToCopy.setSelectionRange(0, 1000); // Provide user feedback (e.g., show a message) alert("URL has been copied to the clipboard: " + textToCopy.value); } var LikeButton = document.getElementById("LikeButton"); function LikeGame(game_id) { const xhr = new XMLHttpRequest(); xhr.open("POST", `${window.zontal.url}xhr/like.php`); xhr.onreadystatechange = () => { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { LikeButton.classList.toggle("liked"); LikeButton.querySelector("span").innerText = xhr.responseText; } } }; const form = new FormData(); form.append("gi", game_id); form.append("ui", window.zontal.ui); xhr.send(form); } const lForm = document.getElementById("login-form"); if (lForm !== null) { lForm.addEventListener("submit", (e) => { e.preventDefault(); const username = lForm.querySelector("input[name='usernameEmail']").value; const password = lForm.querySelector("input[name='password']").value; const button = lForm.querySelector("button[type='submit']"); const xhr = new XMLHttpRequest(); button.setAttribute("disabled", "true"); xhr.open("POST", `${window.zontal.url}xhr/login.php`); xhr.onreadystatechange = () => { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { if (xhr.responseText.includes("successfully") == true) { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "#96c93d", }, }).showToast(); setTimeout(() => { window.location.href = "./"; button.removeAttribute("disabled"); }, 1500); } else { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "red", }, }).showToast(); button.removeAttribute("disabled"); } } } }; const form = new FormData(); form.append("usernameEmail", username); form.append("password", password); xhr.send(form); }); } const RForm = document.getElementById("sign-form"); // console.log(RForm); if (RForm !== null) { RForm.addEventListener("submit", (e) => { e.preventDefault(); const button = RForm.querySelector("button[type='submit']"); const xhr = new XMLHttpRequest(); button.setAttribute("disabled", "true"); xhr.open("POST", `${window.zontal.url}xhr/register.php`); xhr.onreadystatechange = () => { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { if (xhr.responseText.includes("successfully") == true) { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "#96c93d", }, }).showToast(); setTimeout(() => { window.location.href = "./"; button.removeAttribute("disabled"); }, 1500); } else { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "red", }, }).showToast(); button.removeAttribute("disabled"); } } } }; const form = new FormData(RForm); xhr.send(form); }); } const upForm = document.getElementById("update-info"); // console.log(RForm); if (upForm !== null) { upForm.addEventListener("submit", (e) => { e.preventDefault(); const button = upForm.querySelector("button[type='submit']"); const xhr = new XMLHttpRequest(); button.setAttribute("disabled", "true"); xhr.open("POST", `${window.zontal.url}xhr/update-userinfo.php`); xhr.onreadystatechange = () => { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { console.log(xhr.responseText); if (xhr.responseText.includes("successfully") == true) { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "#96c93d", }, }).showToast(); setTimeout(() => { button.removeAttribute("disabled"); }, 1500); } else { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "red", }, }).showToast(); button.removeAttribute("disabled"); } } } }; const form = new FormData(upForm); xhr.send(form); }); } www/wwwroot/clodys.biz.id/themes/asur/js/main.js 0000644 00000025606 15014545043 0015742 0 ustar 00 (function($) { 'use strict'; var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-tooltip="tooltip"]')); var tooltipList = tooltipTriggerList.map(function(tooltipTriggerEl) { return new bootstrap.Tooltip(tooltipTriggerEl, { trigger: 'hover' }); }); // language var __ = function(msgid) { return window.i18n[msgid] || msgid; }; // more & less var showChar = 300; var ellipsestext = "..."; var moretext = __("more"); var lesstext = __("less"); $('[data-more=""]').each(function() { var content = $(this).html(); if (content.length > showChar) { var c = content.substr(0, showChar); var h = content.substr(showChar, content.length - showChar); var html = c + '<span class="more-content">' + ellipsestext + '</span><span class="morecontent"><span>' + h + '</span><div class="more">' + moretext + '</div></span>'; $(this).html(html); } }); // earn xp if ($('input[name="game_id"]').length) { setTimeout(function() { var game_id = $('input[name="game_id"]').val(); $.ajax({ url: Base + '/ajax/earnxp', type: 'post', data: { 'game_id': game_id } }); }, 5000); } // cookie modal $('body').on('click', '.close-register', function(e) { localStorage.setItem('modal_cookie', 1); $registerModal.addClass('d-none'); }); // cookie var $registerModal = $(".modal-register"); var $registerCookies = localStorage.getItem('modal_cookie'); if (!$registerCookies) { $registerModal.removeClass('d-none'); } else { $registerModal.addClass('d-none'); } // Cover Select $(document).on('click', '.btn-upload', function() { var id = $(this).attr('data-id'); $('#file-' + id).click(); return false; }); $(document).on('click', '.btn-clear', function() { var id = $(this).attr('data-id'); $('.' + id).val(''); $('.ratio-preview').removeClass('d-none'); $('.' + id).css('background-image', ''); $('.btn-clear').addClass('d-none'); return false; }); $(document).on('change', '.ratio-input', function() { var id = $(this).attr('data-preview'); $('.btn-clear').removeClass('d-none'); if (this.files && this.files[0]) { var reader = new FileReader(); reader.onload = function(e) { $('.' + id).css('background-image', 'url(' + e.target.result + ')'); $('.ratio-preview').addClass('d-none'); } reader.readAsDataURL(this.files[0]); } }); // show more $(document).on('click', '.more', function() { if ($(this).hasClass("less")) { $(this).removeClass("less"); $(this).html(moretext); } else { $(this).addClass("less"); $(this).html(lesstext); } $(this).parent().prev().toggle(); $(this).prev().toggle(); return false; }); $(document).on('change', '.category-input', function() { $('form[name="filter"]').submit(); }); // rating $(".rating input:radio").attr("checked", false); $('.rating input').click(function() { $(".rating span").removeClass('checked'); $(this).parent().addClass('checked'); }); $(document).on('lazybeforeunveil lazyloaded', function(e) { $(e.target).closest('picture').addClass('lazyloaded'); }); // game iframe if ($('iframe.game-iframe').length) { let iframe = $("iframe.game-iframe"); let size = { width: Number(iframe.attr('width')), height: Number(iframe.attr('height')), } let ratio = (size.height / size.width) * 100; let win_ratio = (window.innerHeight / window.innerWidth) * 100; if (win_ratio <= 110) { if (ratio > 80) { ratio = 80; } } else if (win_ratio >= 130) { if (ratio < 100) { ratio = 100; } } $('.game-ratio').css('--bs-aspect-ratio', ratio + '%'); } // fullscreen btn $(document).on('click', '.btn-fullscreen', function() { var iframe = document.querySelector('iframe.game-iframe'); if (iframe.requestFullscreen) { iframe.requestFullscreen(); } else if (iframe.webkitRequestFullscreen) { iframe.webkitRequestFullscreen(); } else if (iframe.mozRequestFullScreen) { iframe.mozRequestFullScreen(); } else if (iframe.msRequestFullscreen) { iframe.msRequestFullscreen(); } }); // Bootstrap remote modal $(document).on('click', '[data-bs-toggle="modal"]', function() { $($(this).data("bs-target") + ' .modal-dialog').load($(this).data("remote"), function() {}); }); $('.modal').on('hide.bs.modal', function(e) { $('.modal-dialog').html(''); }); // Reaction $(document).on('click', '.reaction', function(e) { var id = $(this).attr('data-id'); if (!_Auth) { window.location.href = Base + '/login'; return false; } e.preventDefault(); var UP = 'up', DOWN = 'down', REMOVE_UP = '-up', REMOVE_DOWN = '-down', type, $el = $(e.currentTarget), $votes = $el.parent(), $upvote = $votes.find('.like'), $downvote = $votes.find('.dislike'), $upvotes = $votes.find('.like-count'), $downvotes = $votes.find('.dislike-count'), upvotes = parseInt($upvotes.data('votes')), downvotes = parseInt($downvotes.data('votes')), setUpvotes = function(val) { $upvotes.data('votes', val).text(val || '0'); }, setDownvotes = function(val) { $downvotes.data('votes', val).text(val || '0'); }; if ($el.hasClass('like')) { if ($el.hasClass('text-theme')) { $el.removeClass('text-theme'); setUpvotes(upvotes - 1); type = REMOVE_UP; } else { type = UP; if ($downvote.hasClass('text-theme')) { $downvote.removeClass('text-theme'); setDownvotes(downvotes - 1); } $el.addClass('text-theme'); setUpvotes(upvotes + 1); } } else { if ($el.hasClass('text-theme')) { $el.removeClass('text-theme'); setDownvotes(downvotes - 1); type = REMOVE_DOWN; } else { type = DOWN; if ($upvote.hasClass('text-theme')) { $upvote.removeClass('text-theme'); setUpvotes(upvotes - 1); } $el.addClass('text-theme'); setDownvotes(downvotes + 1); } } $.ajax({ url: Base + '/ajax/reaction', type: 'post', data: { 'type': type, 'id': id } }); }); $(document).on('submit', 'form[name="remove"]', function(e) { event.preventDefault(); var post_url = $(this).attr("action"); var request_method = $(this).attr("method"); var form_data = $(this).serialize(); var id = $(this).attr('data-id'); $.ajax({ url: post_url, type: request_method, data: form_data }).done(function(response) { if (response === 'OK') { $('form[data-id="' + id + '"]').remove(); } }); }); var lightMode = readCookie('mode'); if (lightMode) { $('html').attr('data-theme', ''); $('.layout-header').removeClass('navbar-dark'); $('.layout-header').addClass('navbar-light'); $('.color-toggle').addClass('toggled'); } else { $('html').attr('data-theme', 'dark'); $('.layout-header').addClass('navbar-dark'); $('.layout-header').removeClass('navbar-light'); } $(document).on('click', '.color-toggle', function(e) { $('.color-toggle').toggleClass('toggled'); if ($('.color-toggle').hasClass("toggled")) { createCookie('mode', 'light', 365); $('.layout-header').removeClass('navbar-dark'); $('.layout-header').addClass('navbar-light'); $('html').attr('data-theme', ''); } else { $('html').attr('data-theme', 'dark'); $('.layout-header').addClass('navbar-dark'); $('.layout-header').removeClass('navbar-light'); eraseCookie('mode'); } }); // share click $('body').on({ click: function() { var $this = $(this), dataType = $this.attr('data-type'), dataTitle = $this.attr('data-title'), dataMedia = $this.attr('data-media'), dataSef = $this.attr('data-sef'); switch (dataType) { case 'facebook': shareWindow('https://www.facebook.com/sharer/sharer.php?u=' + dataSef); break; case 'twitter': shareWindow('https://twitter.com/intent/tweet?text=' + encodeURIComponent(dataTitle) + ' ' + encodeURIComponent(dataSef)); break; case 'whatsapp': shareWindow('whatsapp://send?text=' + encodeURIComponent(dataTitle) + ' ' + encodeURIComponent(dataSef)); break; case 'telegram': shareWindow('https://t.me/share/url?url=' + encodeURIComponent(dataSef) + '&text=' + encodeURIComponent(dataTitle) + ' 🎮 '); break; } function shareWindow(url) { window.open(url, "_blank"); } } }, '.btn-share'); })(jQuery); function createCookie(name, value, days) { var expires; if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); expires = "; expires=" + date.toGMTString(); } else { expires = ""; } document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + expires + "; path=/"; } function readCookie(name) { var nameEQ = encodeURIComponent(name) + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) === ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) === 0) return decodeURIComponent(c.substring(nameEQ.length, c.length)); } return null; } function eraseCookie(name) { createCookie(name, "", -1); } www/wwwroot/clodys.biz.id/admin/assets/js/main.js 0000644 00000010423 15014545772 0016075 0 ustar 00 const DROP_BUTTON = document.querySelectorAll('.drop_btn'); if (DROP_BUTTON !== null) { DROP_BUTTON.forEach((e) => { e.addEventListener("click", () => { const TARGET_ELEMENT = e.getAttribute("data-target"); document.querySelector(TARGET_ELEMENT).classList.toggle('show'); }); }); } const TAB_BUTTON = document.querySelectorAll('.tab-button'); const TAB = document.querySelectorAll('.tab'); if (TAB_BUTTON !== null) { TAB_BUTTON.forEach((e) => { e.addEventListener("click", (button) => { TAB.forEach((t) => { t.classList.add('hidden'); t.classList.remove('show'); }) const TARGET_TAB = e.getAttribute("data-target"); document.querySelector(TARGET_TAB).classList.remove('hidden'); document.querySelector(TARGET_TAB).classList.toggle('block'); }) }) } if (TAB_BUTTON !== null) { TAB_BUTTON.forEach((e) => { e.addEventListener("click", ActiveButton); }) } function ActiveButton() { TAB_BUTTON.forEach((e) => { e.classList.remove("bg-blue-500"); e.classList.remove("text-gray-100"); e.classList.add("text-gray-500"); // e.classList.add("bg-transparent"); }) this.classList.add("bg-blue-500"); this.classList.replace("text-gray-500", "text-gray-100"); } const USER_PROFILE_UPLOAD_IMAGE_BUTTON = document.getElementById('pic_upload_button'); if (USER_PROFILE_UPLOAD_IMAGE_BUTTON !== null) { USER_PROFILE_UPLOAD_IMAGE_BUTTON.addEventListener("click", () => { document.getElementById('user_profile_pic').click(); }) } const FILE_TYPE = document.getElementById('File_Type'); if (FILE_TYPE !== null) { FILE_TYPE.addEventListener("change", () => { if (FILE_TYPE.value === 'File' || FILE_TYPE.value === 'URL') { if (FILE_TYPE.value !== 'null') { console.warn(FILE_TYPE.value) if (FILE_TYPE.value === 'File') { document.getElementById('FILE_IMAGE').classList.remove('hidden'); } else { document.getElementById('FILE_IMAGE').classList.add('hidden'); } if (FILE_TYPE.value === 'URL') { document.getElementById('URL_IMAGE').classList.remove('hidden'); } else { document.getElementById('URL_IMAGE').classList.add('hidden'); } } } }); // window.addEventListener("DOMContentLoaded", () => { // document.addEventListener("DOMContentLoaded", () => { window.addEventListener("load", () => { // document.addEventListener("load", () => { if (FILE_TYPE !== null) { if (FILE_TYPE.value === 'File' || FILE_TYPE.value === 'URL') { if (FILE_TYPE.value !== 'null') { console.warn(FILE_TYPE.value) if (FILE_TYPE.value === 'File') { document.getElementById('FILE_IMAGE').classList.remove('hidden'); } else { document.getElementById('FILE_IMAGE').classList.add('hidden'); } if (FILE_TYPE.value === 'URL') { document.getElementById('URL_IMAGE').classList.remove('hidden'); } else { document.getElementById('URL_IMAGE').classList.add('hidden'); } } } } // }) }) // }) // }) } const CATEGORY_INPUT = document.getElementById("category_name"); if (CATEGORY_INPUT !== null) { CATEGORY_INPUT.addEventListener("keyup", (e) => { var value = e.value; value.toLowerCase(); value.replaceAll(" ", "-"); document.getElementById("category_slug").innerText = value; }); } document.querySelectorAll("body").forEach((e) => { e.classList.add("dark:bg-[#121317]"); }); www/wwwroot/clodys.biz.id/themes/garud/js/main.js 0000644 00000030070 15014545773 0016073 0 ustar 00 // var cursor = document.querySelector(".cursor"); // var cursorinner = document.querySelector(".cursor2"); // var a = document.querySelectorAll("a"); // document.addEventListener("mousemove", function (e) { // var x = e.clientX; // var y = e.clientY; // cursor.style.transform = `translate3d(calc(${e.clientX}px - 50%), calc(${e.clientY}px - 50%), 0)`; // }); // document.addEventListener("mousemove", function (e) { // var x = e.clientX; // var y = e.clientY; // cursorinner.style.left = x + "px"; // cursorinner.style.top = y + "px"; // }); // document.addEventListener("mousedown", function () { // cursor.classList.add("click"); // cursorinner.classList.add("cursorinnerhover"); // }); // document.addEventListener("mouseup", function () { // cursor.classList.remove("click"); // cursorinner.classList.remove("cursorinnerhover"); // }); // a.forEach((item) => { // item.addEventListener("mouseover", () => { // cursor.classList.add("hover"); // }); // item.addEventListener("mouseleave", () => { // cursor.classList.remove("hover"); // }); // }); // const menu = document.querySelector(".burger-menu"); // const menuSm = document.querySelector(".burger-menu-sm"); // const sidebar = document.querySelector(".zontal-sidebar"); // const overlay = document.querySelector(".zontal-sidebar .overlay"); // if (menu !== null) { // menu.addEventListener("click", () => { // if (window.innerWidth <= 2020) { // sidebar.classList.toggle("active"); // } else { // sidebar.classList.toggle("close"); // } // }); // } // if (menuSm !== null) { // menuSm.addEventListener("click", () => { // sidebar.classList.toggle("active"); // }); // } // const title = document.querySelectorAll(".game-card a"); // title.forEach((e) => { // e.addEventListener("mousemove", () => { // cursorinner.classList.add("link-hover"); // // console.log("Hello..."); // }); // e.addEventListener("mouseleave", () => { // cursorinner.classList.remove("link-hover"); // // console.log("Hello..."); // }); // }); // var pagination = document.querySelectorAll(".Pagination button"); // pagination.forEach((e) => { // e.addEventListener("mousemove", () => { // cursor.classList.add("pag-cur"); // cursorinner.classList.add("pag-cur"); // }); // e.addEventListener("mouseleave", () => { // cursor.classList.remove("pag-cur"); // cursorinner.classList.remove("pag-cur"); // }); // }); // const slideButtons = document.querySelectorAll(".Pagination button"); // slideButtons.forEach((button) => { // button.addEventListener("click", HandleSlide); // }); // function HandleSlide() { // var main = this.parentNode.parentNode.getAttribute("data-target"); // main = document.querySelector(main); // var angle = this.parentNode; // if (angle.classList[0].includes("left-pagination")) { // main.scrollLeft -= 300; // console.log("Left"); // } else { // main.scrollLeft += 300; // console.log("Right"); // } // } // var sideBarLists = document.querySelectorAll(".zontal-sidebar-body li"); // if (sideBarLists !== null) { // sideBarLists.forEach((e) => { // e.addEventListener("mousemove", () => { // cursor.classList.add("list-cursor-effect"); // e.classList.add("add-border"); // }); // e.addEventListener("mouseleave", () => { // cursor.classList.remove("list-cursor-effect"); // e.classList.remove("add-border"); // }); // }); // } // const toggler = document.querySelector(".theme-toggler"); // const darkIcon = document.getElementById("DarkIcon"); // const lightIcon = document.getElementById("LightIcon"); // toggler.addEventListener("change", () => { // if (toggler.checked) { // document.documentElement.setAttribute("zontal-theme", "dark"); // localStorage.setItem("zon_theme", "dark"); // darkIcon.classList.add("active-icon"); // lightIcon.classList.remove("active-icon"); // } else { // document.documentElement.setAttribute("zontal-theme", "light"); // localStorage.setItem("zon_theme", "light"); // darkIcon.classList.remove("active-icon"); // lightIcon.classList.add("active-icon"); // } // }); // const theme = localStorage.getItem("zon_theme"); // if (theme === "dark") { // toggler.checked = true; // document.documentElement.setAttribute("zontal-theme", "dark"); // darkIcon.classList.add("active-icon"); // lightIcon.classList.remove("active-icon"); // } else { // toggler.checked = false; // document.documentElement.setAttribute("zontal-theme", "light"); // darkIcon.classList.remove("active-icon"); // lightIcon.classList.add("active-icon"); // } // window // .matchMedia("(prefers-color-scheme: dark)") // .addEventListener("change", ({ matches }) => { // localStorage.clear(); // if (matches) { // toggler.checked = true; // document.documentElement.setAttribute("zontal-theme", "dark"); // darkIcon.classList.add("active-icon"); // lightIcon.classList.remove("active-icon"); // } else { // toggler.checked = false; // document.documentElement.setAttribute("zontal-theme", "light"); // darkIcon.classList.remove("active-icon"); // lightIcon.classList.add("active-icon"); // } // }); const iframe = document.getElementById("zonFrame"); const fullscreenButton = document.getElementById("fullscreenButton"); // Function to request fullscreen function requestFullscreen(element) { if (element.requestFullscreen) { element.requestFullscreen(); } else if (element.mozRequestFullScreen) { // Firefox element.mozRequestFullScreen(); } else if (element.webkitRequestFullscreen) { // Chrome, Safari, and Opera element.webkitRequestFullscreen(); } else if (element.msRequestFullscreen) { // IE/Edge element.msRequestFullscreen(); } } // Function to exit fullscreen function exitFullscreen() { if (document.exitFullscreen) { document.exitFullscreen(); } else if (document.mozCancelFullScreen) { // Firefox document.mozCancelFullScreen(); } else if (document.webkitExitFullscreen) { // Chrome, Safari, and Opera document.webkitExitFullscreen(); } else if (document.msExitFullscreen) { // IE/Edge document.msExitFullscreen(); } } if (fullscreenButton !== null) { fullscreenButton.addEventListener("click", () => { if ( !document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement ) { requestFullscreen(iframe); } else { exitFullscreen(); } }); } function copyToURL() { // Select the input element const textToCopy = document.getElementById("textToCopy"); // Select the text within the input element textToCopy.select(); // Copy the selected text to the clipboard document.execCommand("copy"); // Deselect the text (optional) textToCopy.setSelectionRange(0, 1000); // Provide user feedback (e.g., show a message) alert("URL has been copied to the clipboard: " + textToCopy.value); } var LikeButton = document.getElementById("LikeButton"); function LikeGame(game_id) { const xhr = new XMLHttpRequest(); xhr.open("POST", `${window.zontal.url}xhr/like.php`); xhr.onreadystatechange = () => { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { LikeButton.classList.toggle("liked"); LikeButton.querySelector("span").innerText = xhr.responseText; } } }; const form = new FormData(); form.append("gi", game_id); form.append("ui", window.zontal.ui); xhr.send(form); } const lForm = document.getElementById("login-form"); if (lForm !== null) { lForm.addEventListener("submit", (e) => { e.preventDefault(); const username = lForm.querySelector("input[name='usernameEmail']").value; const password = lForm.querySelector("input[name='password']").value; const button = lForm.querySelector("button[type='submit']"); const xhr = new XMLHttpRequest(); button.setAttribute("disabled", "true"); xhr.open("POST", `${window.zontal.url}xhr/login.php`); xhr.onreadystatechange = () => { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { if (xhr.responseText.includes("successfully") == true) { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "#96c93d", }, }).showToast(); setTimeout(() => { window.location.href = "./"; button.removeAttribute("disabled"); }, 1500); } else { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "red", }, }).showToast(); button.removeAttribute("disabled"); } } } }; const form = new FormData(); form.append("usernameEmail", username); form.append("password", password); xhr.send(form); }); } const RForm = document.getElementById("sign-form"); // console.log(RForm); if (RForm !== null) { RForm.addEventListener("submit", (e) => { e.preventDefault(); const button = RForm.querySelector("button[type='submit']"); const xhr = new XMLHttpRequest(); button.setAttribute("disabled", "true"); xhr.open("POST", `${window.zontal.url}xhr/register.php`); xhr.onreadystatechange = () => { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { if (xhr.responseText.includes("successfully") == true) { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "#96c93d", }, }).showToast(); setTimeout(() => { window.location.href = "./"; button.removeAttribute("disabled"); }, 1500); } else { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "red", }, }).showToast(); button.removeAttribute("disabled"); } } } }; const form = new FormData(RForm); xhr.send(form); }); } const upForm = document.getElementById("update-info"); // console.log(RForm); if (upForm !== null) { upForm.addEventListener("submit", (e) => { e.preventDefault(); const button = upForm.querySelector("button[type='submit']"); const xhr = new XMLHttpRequest(); button.setAttribute("disabled", "true"); xhr.open("POST", `${window.zontal.url}xhr/update-userinfo.php`); xhr.onreadystatechange = () => { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { console.log(xhr.responseText); if (xhr.responseText.includes("successfully") == true) { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "#96c93d", }, }).showToast(); setTimeout(() => { button.removeAttribute("disabled"); }, 1500); } else { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "red", }, }).showToast(); button.removeAttribute("disabled"); } } } }; const form = new FormData(upForm); xhr.send(form); }); } www/wwwroot/clodys.biz.id/themes/zontal/js/main.js 0000644 00000027213 15014546503 0016275 0 ustar 00 var cursor = document.querySelector(".cursor"); var cursorinner = document.querySelector(".cursor2"); var a = document.querySelectorAll("a"); document.addEventListener("mousemove", function (e) { var x = e.clientX; var y = e.clientY; cursor.style.transform = `translate3d(calc(${e.clientX}px - 50%), calc(${e.clientY}px - 50%), 0)`; }); document.addEventListener("mousemove", function (e) { var x = e.clientX; var y = e.clientY; cursorinner.style.left = x + "px"; cursorinner.style.top = y + "px"; }); document.addEventListener("mousedown", function () { cursor.classList.add("click"); cursorinner.classList.add("cursorinnerhover"); }); document.addEventListener("mouseup", function () { cursor.classList.remove("click"); cursorinner.classList.remove("cursorinnerhover"); }); a.forEach((item) => { item.addEventListener("mouseover", () => { cursor.classList.add("hover"); }); item.addEventListener("mouseleave", () => { cursor.classList.remove("hover"); }); }); const menu = document.querySelector(".burger-menu"); const menuSm = document.querySelector(".burger-menu-sm"); const sidebar = document.querySelector(".zontal-sidebar"); const overlay = document.querySelector(".zontal-sidebar .overlay"); if (menu !== null) { menu.addEventListener("click", () => { if (window.innerWidth <= 2020) { sidebar.classList.toggle("active"); } else { sidebar.classList.toggle("close"); } }); } if (menuSm !== null) { menuSm.addEventListener("click", () => { sidebar.classList.toggle("active"); }); } const title = document.querySelectorAll(".game-card a"); title.forEach((e) => { e.addEventListener("mousemove", () => { cursorinner.classList.add("link-hover"); // console.log("Hello..."); }); e.addEventListener("mouseleave", () => { cursorinner.classList.remove("link-hover"); // console.log("Hello..."); }); }); var pagination = document.querySelectorAll(".Pagination button"); pagination.forEach((e) => { e.addEventListener("mousemove", () => { cursor.classList.add("pag-cur"); cursorinner.classList.add("pag-cur"); }); e.addEventListener("mouseleave", () => { cursor.classList.remove("pag-cur"); cursorinner.classList.remove("pag-cur"); }); }); const slideButtons = document.querySelectorAll(".Pagination button"); slideButtons.forEach((button) => { button.addEventListener("click", HandleSlide); }); function HandleSlide() { var main = this.parentNode.parentNode.getAttribute("data-target"); main = document.querySelector(main); var angle = this.parentNode; if (angle.classList[0].includes("left-pagination")) { main.scrollLeft -= 300; console.log("Left"); } else { main.scrollLeft += 300; console.log("Right"); } } var sideBarLists = document.querySelectorAll(".zontal-sidebar-body li"); if (sideBarLists !== null) { sideBarLists.forEach((e) => { e.addEventListener("mousemove", () => { cursor.classList.add("list-cursor-effect"); e.classList.add("add-border"); }); e.addEventListener("mouseleave", () => { cursor.classList.remove("list-cursor-effect"); e.classList.remove("add-border"); }); }); } const toggler = document.querySelector(".theme-toggler"); const darkIcon = document.getElementById("DarkIcon"); const lightIcon = document.getElementById("LightIcon"); toggler.addEventListener("change", () => { if (toggler.checked) { document.documentElement.setAttribute("zontal-theme", "dark"); localStorage.setItem("zon_theme", "dark"); darkIcon.classList.add("active-icon"); lightIcon.classList.remove("active-icon"); } else { document.documentElement.setAttribute("zontal-theme", "light"); localStorage.setItem("zon_theme", "light"); darkIcon.classList.remove("active-icon"); lightIcon.classList.add("active-icon"); } }); const theme = localStorage.getItem("zon_theme"); if (theme === "dark") { toggler.checked = true; document.documentElement.setAttribute("zontal-theme", "dark"); darkIcon.classList.add("active-icon"); lightIcon.classList.remove("active-icon"); } else { toggler.checked = false; document.documentElement.setAttribute("zontal-theme", "light"); darkIcon.classList.remove("active-icon"); lightIcon.classList.add("active-icon"); } window .matchMedia("(prefers-color-scheme: dark)") .addEventListener("change", ({ matches }) => { localStorage.clear(); if (matches) { toggler.checked = true; document.documentElement.setAttribute("zontal-theme", "dark"); darkIcon.classList.add("active-icon"); lightIcon.classList.remove("active-icon"); } else { toggler.checked = false; document.documentElement.setAttribute("zontal-theme", "light"); darkIcon.classList.remove("active-icon"); lightIcon.classList.add("active-icon"); } }); const iframe = document.getElementById("zonFrame"); const fullscreenButton = document.getElementById("fullscreenButton"); // Function to request fullscreen function requestFullscreen(element) { if (element.requestFullscreen) { element.requestFullscreen(); } else if (element.mozRequestFullScreen) { // Firefox element.mozRequestFullScreen(); } else if (element.webkitRequestFullscreen) { // Chrome, Safari, and Opera element.webkitRequestFullscreen(); } else if (element.msRequestFullscreen) { // IE/Edge element.msRequestFullscreen(); } } // Function to exit fullscreen function exitFullscreen() { if (document.exitFullscreen) { document.exitFullscreen(); } else if (document.mozCancelFullScreen) { // Firefox document.mozCancelFullScreen(); } else if (document.webkitExitFullscreen) { // Chrome, Safari, and Opera document.webkitExitFullscreen(); } else if (document.msExitFullscreen) { // IE/Edge document.msExitFullscreen(); } } if (fullscreenButton !== null) { fullscreenButton.addEventListener("click", () => { if ( !document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement ) { requestFullscreen(iframe); } else { exitFullscreen(); } }); } function copyToURL() { // Select the input element const textToCopy = document.getElementById("textToCopy"); // Select the text within the input element textToCopy.select(); // Copy the selected text to the clipboard document.execCommand("copy"); // Deselect the text (optional) textToCopy.setSelectionRange(0, 1000); // Provide user feedback (e.g., show a message) alert("URL has been copied to the clipboard: " + textToCopy.value); } var LikeButton = document.getElementById("LikeButton"); function LikeGame(game_id) { const xhr = new XMLHttpRequest(); xhr.open("POST", `${window.zontal.url}xhr/like.php`); xhr.onreadystatechange = () => { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { LikeButton.classList.toggle("liked"); LikeButton.querySelector("span").innerText = xhr.responseText; } } }; const form = new FormData(); form.append("gi", game_id); form.append("ui", window.zontal.ui); xhr.send(form); } const lForm = document.getElementById("login-form"); if (lForm !== null) { lForm.addEventListener("submit", (e) => { e.preventDefault(); const username = lForm.querySelector("input[name='usernameEmail']").value; const password = lForm.querySelector("input[name='password']").value; const button = lForm.querySelector("button[type='submit']"); const xhr = new XMLHttpRequest(); button.setAttribute("disabled", "true"); xhr.open("POST", `${window.zontal.url}xhr/login.php`); xhr.onreadystatechange = () => { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { if (xhr.responseText.includes("successfully") == true) { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "#96c93d", }, }).showToast(); setTimeout(() => { window.location.href = "./"; button.removeAttribute("disabled"); }, 1500); } else { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "red", }, }).showToast(); button.removeAttribute("disabled"); } } } }; const form = new FormData(); form.append("usernameEmail", username); form.append("password", password); xhr.send(form); }); } const RForm = document.getElementById("sign-form"); // console.log(RForm); if (RForm !== null) { RForm.addEventListener("submit", (e) => { e.preventDefault(); const button = RForm.querySelector("button[type='submit']"); const xhr = new XMLHttpRequest(); button.setAttribute("disabled", "true"); xhr.open("POST", `${window.zontal.url}xhr/register.php`); xhr.onreadystatechange = () => { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { if (xhr.responseText.includes("successfully") == true) { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "#96c93d", }, }).showToast(); setTimeout(() => { window.location.href = "./"; button.removeAttribute("disabled"); }, 1500); } else { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "red", }, }).showToast(); button.removeAttribute("disabled"); } } } }; const form = new FormData(RForm); xhr.send(form); }); } const upForm = document.getElementById("update-info"); // console.log(RForm); if (upForm !== null) { upForm.addEventListener("submit", (e) => { e.preventDefault(); const button = upForm.querySelector("button[type='submit']"); const xhr = new XMLHttpRequest(); button.setAttribute("disabled", "true"); xhr.open("POST", `${window.zontal.url}xhr/update-userinfo.php`); xhr.onreadystatechange = () => { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { console.log(xhr.responseText); if (xhr.responseText.includes("successfully") == true) { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "#96c93d", }, }).showToast(); setTimeout(() => { button.removeAttribute("disabled"); }, 1500); } else { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "red", }, }).showToast(); button.removeAttribute("disabled"); } } } }; const form = new FormData(upForm); xhr.send(form); }); } www/wwwroot/clodys.biz.id/themes/dorado/js/main.js 0000644 00000030310 15014546516 0016232 0 ustar 00 // var cursor = document.querySelector(".cursor"); // var cursorinner = document.querySelector(".cursor2"); // var a = document.querySelectorAll("a"); // document.addEventListener("mousemove", function (e) { // var x = e.clientX; // var y = e.clientY; // cursor.style.transform = `translate3d(calc(${e.clientX}px - 50%), calc(${e.clientY}px - 50%), 0)`; // }); // document.addEventListener("mousemove", function (e) { // var x = e.clientX; // var y = e.clientY; // cursorinner.style.left = x + "px"; // cursorinner.style.top = y + "px"; // }); // document.addEventListener("mousedown", function () { // cursor.classList.add("click"); // cursorinner.classList.add("cursorinnerhover"); // }); // document.addEventListener("mouseup", function () { // cursor.classList.remove("click"); // cursorinner.classList.remove("cursorinnerhover"); // }); // a.forEach((item) => { // item.addEventListener("mouseover", () => { // cursor.classList.add("hover"); // }); // item.addEventListener("mouseleave", () => { // cursor.classList.remove("hover"); // }); // }); // const menu = document.querySelector(".burger-menu"); // const menuSm = document.querySelector(".burger-menu-sm"); // const sidebar = document.querySelector(".zontal-sidebar"); // const overlay = document.querySelector(".zontal-sidebar .overlay"); // if (menu !== null) { // menu.addEventListener("click", () => { // if (window.innerWidth <= 2020) { // sidebar.classList.toggle("active"); // } else { // sidebar.classList.toggle("close"); // } // }); // } // if (menuSm !== null) { // menuSm.addEventListener("click", () => { // sidebar.classList.toggle("active"); // }); // } // const title = document.querySelectorAll(".game-card a"); // title.forEach((e) => { // e.addEventListener("mousemove", () => { // cursorinner.classList.add("link-hover"); // // console.log("Hello..."); // }); // e.addEventListener("mouseleave", () => { // cursorinner.classList.remove("link-hover"); // // console.log("Hello..."); // }); // }); // var pagination = document.querySelectorAll(".Pagination button"); // pagination.forEach((e) => { // e.addEventListener("mousemove", () => { // cursor.classList.add("pag-cur"); // cursorinner.classList.add("pag-cur"); // }); // e.addEventListener("mouseleave", () => { // cursor.classList.remove("pag-cur"); // cursorinner.classList.remove("pag-cur"); // }); // }); // const slideButtons = document.querySelectorAll(".Pagination button"); // slideButtons.forEach((button) => { // button.addEventListener("click", HandleSlide); // }); // function HandleSlide() { // var main = this.parentNode.parentNode.getAttribute("data-target"); // main = document.querySelector(main); // var angle = this.parentNode; // if (angle.classList[0].includes("left-pagination")) { // main.scrollLeft -= 300; // console.log("Left"); // } else { // main.scrollLeft += 300; // console.log("Right"); // } // } // var sideBarLists = document.querySelectorAll(".zontal-sidebar-body li"); // if (sideBarLists !== null) { // sideBarLists.forEach((e) => { // e.addEventListener("mousemove", () => { // cursor.classList.add("list-cursor-effect"); // e.classList.add("add-border"); // }); // e.addEventListener("mouseleave", () => { // cursor.classList.remove("list-cursor-effect"); // e.classList.remove("add-border"); // }); // }); // } // const toggler = document.querySelector(".theme-toggler"); // const darkIcon = document.getElementById("DarkIcon"); // const lightIcon = document.getElementById("LightIcon"); // toggler.addEventListener("change", () => { // if (toggler.checked) { // document.documentElement.setAttribute("zontal-theme", "dark"); // localStorage.setItem("zon_theme", "dark"); // darkIcon.classList.add("active-icon"); // lightIcon.classList.remove("active-icon"); // } else { // document.documentElement.setAttribute("zontal-theme", "light"); // localStorage.setItem("zon_theme", "light"); // darkIcon.classList.remove("active-icon"); // lightIcon.classList.add("active-icon"); // } // }); // const theme = localStorage.getItem("zon_theme"); // if (theme === "dark") { // toggler.checked = true; // document.documentElement.setAttribute("zontal-theme", "dark"); // darkIcon.classList.add("active-icon"); // lightIcon.classList.remove("active-icon"); // } else { // toggler.checked = false; // document.documentElement.setAttribute("zontal-theme", "light"); // darkIcon.classList.remove("active-icon"); // lightIcon.classList.add("active-icon"); // } // window // .matchMedia("(prefers-color-scheme: dark)") // .addEventListener("change", ({ matches }) => { // localStorage.clear(); // if (matches) { // toggler.checked = true; // document.documentElement.setAttribute("zontal-theme", "dark"); // darkIcon.classList.add("active-icon"); // lightIcon.classList.remove("active-icon"); // } else { // toggler.checked = false; // document.documentElement.setAttribute("zontal-theme", "light"); // darkIcon.classList.remove("active-icon"); // lightIcon.classList.add("active-icon"); // } // }); // const iframe = document.getElementById("zonFrame"); // const fullscreenButton = document.getElementById("fullscreenButton"); // // Function to request fullscreen // function requestFullscreen(element) { // if (element.requestFullscreen) { // element.requestFullscreen(); // } else if (element.mozRequestFullScreen) { // // Firefox // element.mozRequestFullScreen(); // } else if (element.webkitRequestFullscreen) { // // Chrome, Safari, and Opera // element.webkitRequestFullscreen(); // } else if (element.msRequestFullscreen) { // // IE/Edge // element.msRequestFullscreen(); // } // } // // Function to exit fullscreen // function exitFullscreen() { // if (document.exitFullscreen) { // document.exitFullscreen(); // } else if (document.mozCancelFullScreen) { // // Firefox // document.mozCancelFullScreen(); // } else if (document.webkitExitFullscreen) { // // Chrome, Safari, and Opera // document.webkitExitFullscreen(); // } else if (document.msExitFullscreen) { // // IE/Edge // document.msExitFullscreen(); // } // } // if (fullscreenButton !== null) { // fullscreenButton.addEventListener("click", () => { // if ( // !document.fullscreenElement && // !document.mozFullScreenElement && // !document.webkitFullscreenElement && // !document.msFullscreenElement // ) { // requestFullscreen(iframe); // } else { // exitFullscreen(); // } // }); // } function copyToURL() { // Select the input element const textToCopy = document.getElementById("textToCopy"); // Select the text within the input element textToCopy.select(); // Copy the selected text to the clipboard document.execCommand("copy"); // Deselect the text (optional) textToCopy.setSelectionRange(0, 1000); // Provide user feedback (e.g., show a message) alert("URL has been copied to the clipboard: " + textToCopy.value); } var LikeButton = document.getElementById("LikeButton"); function LikeGame(game_id) { const xhr = new XMLHttpRequest(); xhr.open("POST", `${window.zontal.url}xhr/like.php`); xhr.onreadystatechange = () => { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { LikeButton.classList.toggle("liked"); LikeButton.querySelector("span").innerText = xhr.responseText; } } }; const form = new FormData(); form.append("gi", game_id); form.append("ui", window.zontal.ui); xhr.send(form); } const lForm = document.getElementById("login-form"); if (lForm !== null) { lForm.addEventListener("submit", (e) => { e.preventDefault(); const username = lForm.querySelector("input[name='usernameEmail']").value; const password = lForm.querySelector("input[name='password']").value; const button = lForm.querySelector("button[type='submit']"); const xhr = new XMLHttpRequest(); button.setAttribute("disabled", "true"); xhr.open("POST", `${window.zontal.url}xhr/login.php`); xhr.onreadystatechange = () => { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { if (xhr.responseText.includes("successfully") == true) { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "#96c93d", }, }).showToast(); setTimeout(() => { window.location.href = "./admin/"; button.removeAttribute("disabled"); }, 1500); } else { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "red", }, }).showToast(); button.removeAttribute("disabled"); } } } }; const form = new FormData(); form.append("usernameEmail", username); form.append("password", password); xhr.send(form); }); } const RForm = document.getElementById("sign-form"); // console.log(RForm); if (RForm !== null) { RForm.addEventListener("submit", (e) => { e.preventDefault(); const button = RForm.querySelector("button[type='submit']"); const xhr = new XMLHttpRequest(); button.setAttribute("disabled", "true"); xhr.open("POST", `${window.zontal.url}xhr/register.php`); xhr.onreadystatechange = () => { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { if (xhr.responseText.includes("successfully") == true) { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "#96c93d", }, }).showToast(); setTimeout(() => { window.location.href = "./"; button.removeAttribute("disabled"); }, 1500); } else { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "red", }, }).showToast(); button.removeAttribute("disabled"); } } } }; const form = new FormData(RForm); xhr.send(form); }); } const upForm = document.getElementById("update-info"); // console.log(RForm); if (upForm !== null) { upForm.addEventListener("submit", (e) => { e.preventDefault(); const button = upForm.querySelector("button[type='submit']"); const xhr = new XMLHttpRequest(); button.setAttribute("disabled", "true"); xhr.open("POST", `${window.zontal.url}xhr/update-userinfo.php`); xhr.onreadystatechange = () => { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { console.log(xhr.responseText); if (xhr.responseText.includes("successfully") == true) { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "#96c93d", }, }).showToast(); setTimeout(() => { button.removeAttribute("disabled"); }, 1500); } else { Toastify({ text: xhr.responseText, className: "info", duration: 3000, style: { background: "red", }, }).showToast(); button.removeAttribute("disabled"); } } } }; const form = new FormData(upForm); xhr.send(form); }); }
| ver. 1.4 |
Github
|
.
| PHP 7.2.33 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0.01 |
proxy
|
phpinfo
|
ÐаÑтройка