witam nie wiem jak stworzyć skrypt banowania żeby przy logowaniu wyświetlało czy użytkownik jest zbanowany czy nie o to skrypt logowania
<html>
<head>
<title>lajcik-strona pelna luzu</title>
<style type="text/css">
body {
background: transparent url(tlo.jpg) top left repeat-x;
}
</style>
</head>
<body>
</body>
</html>
<a href="index.php"><img src="logo.jpg" alt="" /></a>
<center><a href="index.php"><img src="home.jpg" alt="" /></a></center><center><a href="gry.php"><img src="gry.jpg" alt="" /></a></center><center><a href="muzyka.php"><img src="muzyka.jpg" alt="" /></a></center>
<?php
require 'header.php';
require 'config.php';
require_once 'user.class.php';
$pass = $db->real_escape_string($_POST['pass']);
if($_POST['send'] == 1){
if(!$login or
empty($login)){ die('<p class="error">Wypełnij pole z loginem!</p>'); }
$pass = user::passSalter($pass);
$userExists = $db->query("SELECT COUNT(*) FROM `users` WHERE `login` = '$login' AND `pass` = '$pass'");
if($userExists == 0){
echo '<p class="error">Użytkownik o podanym loginie i haśle nie istnieje.</p>'; }else{
$user = user::getData($login, $pass);
$_SESSION['login'] = $login;
$_SESSION['pass'] = $pass;
$db->query("UPDATE `users` SET `logtime` = NULL WHERE `login` = '$login' AND `pass` = '$pass");
echo '<p class="success">Zostałeś zalogowany. Możesz przejść na <a href="index.php">stronę główną</a></p>'; }
}else{
?>
<form method="post" action="">
<label for="login">Login:</label>
<input type="text" name="login" maxlength="32" id="login" />
<label for="pass">Hasło:</label>
<input type="password" name="pass" maxlength="32" id="pass" /><br />
<input type="hidden" name="send" value="1" />
<input type="submit" value="Zaloguj" />
</form>
<?php
}
require 'footer.php';
?>