21 lines
633 B
PHP
21 lines
633 B
PHP
<?php
|
|
require_once("config/db.php");
|
|
require_once("check_client.php");
|
|
|
|
$ip = $show_ip ?? $_SERVER['REMOTE_ADDR'];
|
|
$stmt = $conn2->prepare("SELECT block_ip_number FROM block_ip WHERE block_ip_number = ?");
|
|
if ($stmt) {
|
|
$stmt->bind_param("s", $ip);
|
|
$stmt->execute();
|
|
$stmt->store_result();
|
|
if ($stmt->num_rows >= 1) {
|
|
$stmt->close();
|
|
echo '<div style="display:flex; justify-content:center; align-items:center; height:100vh; font-family:sans-serif; color:red; font-size:1.5rem;"><b>Your IP is Blocked !!!</b></div>';
|
|
exit();
|
|
}
|
|
$stmt->close();
|
|
}
|
|
header("Location: login.php");
|
|
exit();
|
|
?>
|