Files
xciptv/login.html

308 lines
8.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Login - XC IPTV Panel</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.login-container {
background: white;
color: #333;
border-radius: 20px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
padding: 50px 40px;
width: 100%;
max-width: 400px;
animation: slideIn 0.5s ease-out;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(-30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.logo {
text-align: center;
margin-bottom: 40px;
}
.logo-icon {
font-size: 64px;
margin-bottom: 10px;
}
.logo h1 {
font-size: 24px;
color: #2c3e50;
margin-bottom: 5px;
}
.logo p {
color: #7f8c8d;
font-size: 14px;
}
.form-group {
margin-bottom: 25px;
}
.form-group label {
display: block;
margin-bottom: 10px;
color: #2c3e50;
font-weight: 600;
font-size: 14px;
}
.form-group input {
width: 100%;
padding: 15px;
border: 2px solid #e0e0e0;
border-radius: 10px;
font-size: 14px;
transition: all 0.3s;
color: #333;
background-color: #fff;
color-scheme: light;
}
.form-group input:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}
.btn-login {
width: 100%;
padding: 15px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
border-radius: 10px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
text-transform: uppercase;
letter-spacing: 1px;
}
.btn-login:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}
.btn-login:active {
transform: translateY(0);
}
.btn-login:disabled {
background: #95a5a6;
cursor: not-allowed;
transform: none;
}
.alert {
padding: 12px 15px;
border-radius: 8px;
margin-bottom: 20px;
font-size: 14px;
display: none;
}
.alert-error {
background: #fee;
color: #c33;
border: 1px solid #fcc;
}
.alert-success {
background: #efe;
color: #3c3;
border: 1px solid #cfc;
}
.remember-me {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 20px;
}
.remember-me input[type="checkbox"] {
width: 18px;
height: 18px;
cursor: pointer;
}
.remember-me label {
font-size: 14px;
color: #7f8c8d;
cursor: pointer;
}
.footer {
text-align: center;
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid #e0e0e0;
}
.footer p {
color: #95a5a6;
font-size: 12px;
}
.loading {
display: inline-block;
width: 20px;
height: 20px;
border: 3px solid rgba(255, 255, 255, .3);
border-radius: 50%;
border-top-color: white;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<div class="login-container">
<div class="logo">
<div class="logo-icon">🔐</div>
<h1>Admin Panel</h1>
<p>XC IPTV Management System</p>
</div>
<div id="alertBox" class="alert"></div>
<form id="loginForm">
<div class="form-group">
<label for="username">👤 Kullanıcı Adı</label>
<input type="text" id="username" name="username" placeholder="Kullanıcı adınızı girin" required
autocomplete="username">
</div>
<div class="form-group">
<label for="password">🔒 Şifre</label>
<input type="password" id="password" name="password" placeholder="Şifrenizi girin" required
autocomplete="current-password">
</div>
<div class="remember-me">
<input type="checkbox" id="remember" name="remember">
<label for="remember">Beni hatırla</label>
</div>
<button type="submit" class="btn-login" id="loginBtn">
Giriş Yap
</button>
</form>
<div class="footer">
<p>© 2024 XC IPTV Panel. Tüm hakları saklıdır.</p>
<p style="margin-top: 10px; font-size: 11px;">
<strong>Varsayılan Giriş:</strong><br>
Username: admin | Password: admin123
</p>
</div>
</div>
<script>
const loginForm = document.getElementById('loginForm');
const loginBtn = document.getElementById('loginBtn');
const alertBox = document.getElementById('alertBox');
// Show alert
function showAlert(message, type = 'error') {
alertBox.textContent = message;
alertBox.className = `alert alert-${type}`;
alertBox.style.display = 'block';
setTimeout(() => {
alertBox.style.display = 'none';
}, 5000);
}
// Login form submit
loginForm.addEventListener('submit', async (e) => {
e.preventDefault();
const username = document.getElementById('username').value;
const password = document.getElementById('password').value;
// Disable button
loginBtn.disabled = true;
loginBtn.innerHTML = '<span class="loading"></span> Giriş yapılıyor...';
try {
const response = await fetch('api_secured.php', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: `action=login&username=${encodeURIComponent(username)}&password=${encodeURIComponent(password)}`
});
const data = await response.json();
if (data.status === 'success') {
showAlert('✅ Giriş başarılı! Yönlendiriliyorsunuz...', 'success');
setTimeout(() => {
window.location.href = data.redirect || 'panel.php';
}, 1000);
} else {
showAlert('❌ ' + (data.message || 'Giriş başarısız!'), 'error');
loginBtn.disabled = false;
loginBtn.textContent = 'Giriş Yap';
}
} catch (error) {
showAlert('❌ Bağlantı hatası! Lütfen tekrar deneyin.', 'error');
loginBtn.disabled = false;
loginBtn.textContent = 'Giriş Yap';
}
});
// Auto-focus username
document.getElementById('username').focus();
// Enter key support
document.getElementById('password').addEventListener('keypress', (e) => {
if (e.key === 'Enter') {
loginForm.dispatchEvent(new Event('submit'));
}
});
</script>
</body>
</html>