<!doctype html><html lang=en><meta charset=UTF-8><meta content="width=device-width,initial-scale=1" name=viewport><title>Login Page</title><link href=images/favicon.webp rel=icon type=image/webp><style>body{font-family:Arial,sans-serif;background-color:#f4f4f4;display:flex;justify-content:center;align-items:center;height:100vh;margin:0;overflow:hidden}.container{background-color:#fff;padding:30px;height:355px;border-radius:10px;box-shadow:0 5px 15px rgba(0,0,0,.1);width:100%;max-width:270px;text-align:center;transform:translateY(-20px)}h2{font-size:28px;color:#333;margin-bottom:20px}.input-group{margin-bottom:20px;text-align:left}label{font-size:14px;color:#555;display:block;margin-bottom:5px}input[type=password],input[type=text]{width:100%;padding:10px;border:1px solid #ddd;border-radius:6px;font-size:14px;box-sizing:border-box;transition:border-color .3s ease}input[type=password]:focus,input[type=text]:focus{border-color:#4caf50;outline:0}input[type=submit]{width:100%;padding:10px;background-color:#4caf50;color:#fff;border:none;border-radius:6px;font-size:16px;cursor:pointer;transition:background-color .3s ease}input[type=submit]:hover{background-color:#45a049}.forgot-password{font-size:14px;color:#555;text-decoration:none;margin-top:10px;display:block}.forgot-password:hover{text-decoration:underline}footer{margin-top:0;font-size:.9em;color:#aaa;text-align:center;padding:0;text-align:center;width:100%;position:fixed;bottom:0}.footer-content{display:flex;align-items:center;justify-content:center}@media (max-width:480px){.container{padding:20px;max-width:100%;height:370px;margin:0 15px}h2{font-size:24px}input[type=submit]{font-size:14px;padding:12px}}.modal{display:none;position:fixed;z-index:1;left:0;top:0;width:100%;height:100%;background-color:rgba(0,0,0,.99);padding-top:60px}.modal-content{background-color:#fff;margin:5% auto;padding:20px;border:1px solid #888;width:80%;max-width:350px;border-radius:10px;box-shadow:0 5px 15px rgba(0,0,0,.1);text-align:center}.modal-content h3{color:#3a3b3c}</style><div class=container><a href=/login.html><img alt=Logo src=/images/logo-tr.webp style=margin-bottom:-5px width=250></a><h3 style=color:#3a3b3c>Login Credentials</h3><form id=loginForm><div class=input-group><label for=username>Username:</label> <input autocomplete=off id=usernameInput name=username required></div><div class=input-group><label for=password>Password:</label> <input autocomplete=off id=passwordInput name=password required type=password></div><input type=submit value=Submit><br><br><a href=https://wa.me/966505305180 class=forgot-password target=_blank>Forgot password?</a><br><br></form></div><footer style=width:70%;padding:0;font-size:.7em><div class=footer-content style=margin-top:0><span style=margin-bottom:10px;font-size:12px>‎© 2024 Al-Fares Transportation Co.<br>All Rights Reserved<br></span></div></footer><div class=modal id=welcomeModal><div class=modal-content><h3 style=margin-bottom:-10px>Welcome,</h3><p>Logged in successfully.</p></div></div><script>document.getElementById("loginForm").addEventListener("submit",(function(e){e.preventDefault();var t=document.getElementById("usernameInput").value,n=document.getElementById("passwordInput").value;fetch("login.php",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({username:t,password:n})}).then((e=>e.json())).then((e=>{e.success?(sessionStorage.setItem("isLoggedIn","true"),sessionStorage.setItem("username",e.username),sessionStorage.setItem("fullName",e.full_name),document.getElementById("fullName").textContent=e.full_name,document.getElementById("welcomeModal").style.display="block",setTimeout((function(){document.getElementById("welcomeModal").style.display="none",document.querySelector(".container").style.display="none",document.body.style.background="\n        linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%),\n        url('https://ftco.iceiy.com/images/ruk5.webp') no-repeat center center fixed\n    ",document.body.style.backgroundSize="cover",setTimeout((function(){window.location.href="/indexapp.html"}),.01)}),2e3)):alert(e.message)})).catch((e=>{console.error("Error:",e),alert("An error occurred. Please try again.")}))})),window.onclick=function(e){e.target==document.getElementById("welcomeModal")&&(document.getElementById("welcomeModal").style.display="none")}</script></html>