safety-audit/index.html

46 lines
2.2 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="ru">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>ПАБ — Тест входа</title>
<style>
body{font:16px/1.5 sans-serif;display:flex;align-items:center;justify-content:center;min-height:100vh;background:#0F1218}
.card{background:#fff;padding:40px;border-radius:12px;width:360px;box-shadow:0 8px 40px rgba(0,0,0,0.3)}
h1{font-size:20px;text-align:center;margin-bottom:24px}
input{width:100%;padding:10px;margin-bottom:12px;border:2px solid #ddd;border-radius:6px;font-size:14px;box-sizing:border-box}
button{width:100%;padding:12px;background:#00B4D8;color:#fff;border:none;border-radius:6px;font-size:15px;font-weight:700;cursor:pointer}
button:hover{background:#48CAE4}
.err{color:#E63946;font-size:13px;text-align:center;display:none;margin-top:8px}
</style>
</head>
<body>
<div class="card">
<h1>🛡️ Вход в ПАБ</h1>
<input type="text" id="user" placeholder="Логин">
<input type="password" id="pass" placeholder="Пароль">
<button id="btn">Войти</button>
<div id="err" class="err">Неверный логин или пароль</div>
</div>
<script>
document.getElementById('btn').onclick = function(){
var u = document.getElementById('user').value.trim().toLowerCase();
var p = document.getElementById('pass').value.trim();
if(u==='admin' && p==='admin'){
sessionStorage.setItem('pab_user', JSON.stringify({login:'admin',name:'Администратор',role:'Руководитель',email:'admin@telecom.kz',branch:'АО «Казахтелеком»',dept:'ЦА',region:'Центральный',oblast:'—',city:'г. Астана'}));
window.location.href = 'app.html';
} else {
var users = {}; try { users = JSON.parse(localStorage.getItem('pab_users') || '{}'); } catch(e) {}
if (users[u] && users[u].pass === p) {
sessionStorage.setItem('pab_user', JSON.stringify({login:u,name:users[u].name,role:users[u].role,email:users[u].email||'',branch:users[u].branch||'',dept:users[u].dept||'',region:users[u].region||'',oblast:users[u].oblast||'',city:users[u].city||''}));
window.location.href = 'app.html';
} else {
document.getElementById('err').style.display = 'block';
}
}
};
</script>
</body>
</html>