Webapp / 403.html
Hosdroid's picture
Create 403.html
55ba9d7 verified
Raw
History Blame Contribute Delete
5.29 kB
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>403 - دسترسی ممنوع | ورود مدیر</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #2c3e50 0%, #1a2632 100%);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
}
.card {
background: rgba(255,255,255,0.1);
backdrop-filter: blur(10px);
border-radius: 28px;
padding: 2rem;
width: 100%;
max-width: 400px;
box-shadow: 0 25px 45px rgba(0,0,0,0.3);
border: 1px solid rgba(255,255,255,0.2);
text-align: center;
}
h1 {
font-size: 5rem;
color: #e74c3c;
margin-bottom: 0.5rem;
text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
h2 {
color: #ecf0f1;
font-size: 1.8rem;
margin-bottom: 1rem;
}
p {
color: #bdc3c7;
margin-bottom: 1.8rem;
font-size: 0.95rem;
}
input {
width: 100%;
padding: 14px 18px;
margin: 12px 0;
border: none;
border-radius: 50px;
background: #ecf0f1;
font-size: 1rem;
text-align: center;
direction: ltr;
font-family: monospace;
font-size: 1.2rem;
letter-spacing: 2px;
outline: none;
}
button {
width: 100%;
padding: 12px;
background: #e74c3c;
border: none;
border-radius: 50px;
color: white;
font-size: 1.2rem;
font-weight: bold;
cursor: pointer;
transition: 0.2s;
margin-top: 8px;
box-shadow: 0 5px 0 #a82313;
}
button:active {
transform: translateY(2px);
box-shadow: 0 2px 0 #a82313;
}
.error {
background: rgba(231, 76, 60, 0.2);
color: #ff9e8f;
padding: 10px;
border-radius: 50px;
margin-top: 15px;
font-size: 0.85rem;
display: none;
}
.error.show {
display: block;
animation: fadeIn 0.3s;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(-5px);}
to { opacity: 1; transform: translateY(0);}
}
footer {
margin-top: 2rem;
font-size: 0.7rem;
color: #7f8c8d;
}
</style>
</head>
<body>
<div class="card">
<h1>۴۰۳</h1>
<h2>🔒 دسترسی ممنوع</h2>
<p>این بخش فقط برای مدیر سایت محفوظ است.<br>لطفاً رمز عبور را وارد کنید.</p>
<input type="password" id="passwordInput" placeholder="رمز ورود" autocomplete="off">
<button id="submitBtn">ورود به پنل مدیریت</button>
<div id="errorMsg" class="error">❌ رمز اشتباه است! دسترسی داده نشد.</div>
<footer>فقط افراد مجاز وارد شوند</footer>
</div>
<script>
const correctPassword = "reza"; // رمز دقیق و ساده
const inputField = document.getElementById('passwordInput');
const submitBtn = document.getElementById('submitBtn');
const errorDiv = document.getElementById('errorMsg');
function checkAccess() {
const entered = inputField.value.trim().toLowerCase(); // تبدیل به حروف کوچک برای اطمینان
if (entered === correctPassword) {
// رمز درست است → اجازه دسترسی به بخش مدیریت
// در اینجا می‌توانید کاربر را به صفحه مدیریت هدایت کنید.
// فرض می‌کنیم فایل admin.html در همان پوشه وجود دارد.
// اگر نمی‌خواهید صفحه جداگانه، می‌توانید همینجا محتوای مدیریت را نمایش دهید.
window.location.href = "admin.html";
// اگر فایل admin.html را ندارید، می‌توانید خط پایین را فعال کنید:
// document.body.innerHTML = "<h1>به پنل مدیریت خوش آمدید</h1><p>شما با موفقیت وارد شدید.</p>";
} else {
errorDiv.classList.add('show');
inputField.value = "";
inputField.focus();
setTimeout(() => {
errorDiv.classList.remove('show');
}, 2500);
}
}
submitBtn.addEventListener('click', checkAccess);
inputField.addEventListener('keypress', function(e) {
if (e.key === 'Enter') {
e.preventDefault();
checkAccess();
}
});
</script>
</body>
</html>