File manager - Edit - /home/webapp69.cm.in.th/u69319090040/Shop/admin_login.php
Back
<?php // NEXUS Commerce - Admin Only Portal Login Page if (session_status() === PHP_SESSION_NONE) { session_start(); } if (isset($_SESSION['user_id']) && $_SESSION['role'] === 'admin') { header("Location: admin.php"); exit; } ?> <!DOCTYPE html> <html lang="th"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Admin System Authentication | SHOWPIPI Control Portal</title> <link rel="stylesheet" href="assets/css/style.css"> <script src="https://unpkg.com/@phosphor-icons/web"></script> <style> body { background-color: #06090E; color: #F8FAFC; display: flex; flex-direction: column; min-height: 100vh; } .admin-auth-container { flex-grow: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; background: radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.15) 0%, transparent 60%); } .admin-card { background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(24px); border: 1px solid rgba(6, 182, 212, 0.4); border-radius: 24px; width: 100%; max-width: 440px; padding: 2.5rem; box-shadow: 0 0 40px rgba(6, 182, 212, 0.2); } </style> </head> <body> <!-- Header Banner --> <header style="padding:1.25rem 2.5rem; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid rgba(255,255,255,0.1);"> <a href="index.php" class="brand-logo"> <div class="brand-icon" style="background:var(--teal-accent);"><i class="ph ph-shield-check"></i></div> <span class="brand-badge">SHOWPIPI</span><span style="color:var(--teal-accent);">.ADMIN</span> </a> <!-- Red Cross Back Button --> <button onclick="if(document.referrer && document.referrer.includes(location.host)) { history.back(); } else { location.href='index.php'; }" style="background:rgba(244, 63, 94, 0.25); border:2px solid #F43F5E; color:#F43F5E; width:42px; height:42px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; font-size:1.4rem; transition:all 0.2s ease; box-shadow:0 0 15px rgba(244,63,94,0.5);" title="ปิด / ย้อนกลับ" onmouseover="this.style.background='#F43F5E'; this.style.color='#FFF'; this.style.transform='scale(1.1) rotate(90deg)';" onmouseout="this.style.background='rgba(244, 63, 94, 0.25)'; this.style.color='#F43F5E'; this.style.transform='none';"> <i class="ph ph-x"></i> </button> </header> <!-- Login Form --> <main class="admin-auth-container"> <div class="admin-card"> <div style="text-align:center; margin-bottom:1.5rem;"> <div style="width:56px; height:56px; border-radius:16px; background:rgba(6,182,212,0.15); border:1px solid var(--teal-accent); color:var(--teal-accent); display:inline-flex; align-items:center; justify-content:center; font-size:1.8rem; margin-bottom:0.75rem;"> <i class="ph ph-lock-key"></i> </div> <h2 style="font-size:1.5rem; font-weight:800;">เข้าสู่ระบบผู้ดูแลระบบ (Admin Only)</h2> <p style="font-size:0.8rem; color:var(--text-muted); margin-top:0.25rem;">ระบบความปลอดภัยขั้นสูงสำหรับผู้ดูแลระบบแพลตฟอร์ม</p> </div> <form id="adminLoginForm"> <div style="margin-bottom:1.25rem;"> <label style="font-size:0.85rem; color:var(--text-muted); display:block; margin-bottom:0.4rem;">Admin ID / ชื่อผู้ใช้ผู้ดูแลระบบ</label> <input type="text" id="adminUsername" placeholder="เช่น admin_nexus หรือ 0800000000" required style="width:100%; background:rgba(0,0,0,0.6); border:1px solid var(--border-glass); padding:0.85rem 1rem; border-radius:12px; color:#FFF; outline:none;"> </div> <div style="margin-bottom:1.5rem;"> <label style="font-size:0.85rem; color:var(--text-muted); display:block; margin-bottom:0.4rem;">Admin Master Key / รหัสผ่าน</label> <input type="password" id="adminPassword" placeholder="กรอกรหัสผ่าน Super Admin" required style="width:100%; background:rgba(0,0,0,0.6); border:1px solid var(--border-glass); padding:0.85rem 1rem; border-radius:12px; color:#FFF; outline:none;"> </div> <button type="submit" class="btn-primary" style="width:100%; padding:0.85rem; background:var(--gradient-cyber); font-size:0.95rem; font-weight:700; border-radius:12px;" id="adminSubmitBtn"> ยืนยันตัวตน Super Admin </button> <!-- Credentials Helper Badge Removed for Security --> </div> </main> <script> function fillAdminDemo() { document.getElementById('adminUsername').value = 'admin_nexus'; document.getElementById('adminPassword').value = 'adminpass'; document.getElementById('adminLoginForm').dispatchEvent(new Event('submit')); } document.getElementById('adminLoginForm').addEventListener('submit', async (e) => { e.preventDefault(); const username = document.getElementById('adminUsername').value; const password = document.getElementById('adminPassword').value; const btn = document.getElementById('adminSubmitBtn'); btn.disabled = true; btn.textContent = 'กำลังยืนยันสิทธิ์ Super Admin...'; try { const res = await fetch('api/login.php', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ action: 'login', username, password, portal: 'admin' }) }); const data = await res.json(); if (data.status === 'success') { alert('ยืนยันตัวตนสำเร็จ! กำลังนำคุณไปยัง Admin Command Center'); window.location.href = 'admin.php'; } else { alert(data.message || 'การยืนยันตัวตนล้มเหลว'); btn.disabled = false; btn.textContent = 'ยืนยันตัวตน Super Admin'; } } catch (err) { alert('เกิดข้อผิดพลาดในการเชื่อมต่อ'); btn.disabled = false; btn.textContent = 'ยืนยันตัวตน Super Admin'; } }); </script> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.31 |
proxy
|
phpinfo
|
Settings