Loading...
Свободное общение | как это сделать?
MARAZM (18 янв 2025, в 13:35)
To do this via JavaScript, you can use a simple check. But you need to understand that this is a very basic method that does not protect the site properly. Here is an example of how to do it:


window.onload = function() {
var username = prompt("Enter username:");
var password = prompt("Enter password:");

if (username === "admin" && password === "1234") {
alert("Access granted");
} else {
alert("Incorrect username or password");
window.location.href = "about:blank"; // Closes the page if the username or password is incorrect
}
}


This is just a JS example, add PHP and you will be lucky
Еще номер карты туда забыл вписать
Лейтенант [!] (17 янв 2025, в 19:57)
Подскажите как как поставить защиту к домену ? как тут http://t2rez.alpha-cms.ru/
Чтоб при открытии сайта потребовалась логин и пароль. Буду благодарен
Если ISP Manager 6 то в WWW домены есть пункт Ограничение доступа ! выбери / или определенное положение где хотите чтобы был пароль
Лара (18 янв 2025, в 19:46)
Еще номер карты туда забыл вписать
What is the card number for? This is an example of the code, the card number will not do anything here!
Онлайн: 8
Время:
Gen. 0.0886
(c) ByMAS.RU 2010-2025