<?

include '../../config.php';
include '../../func.php';
head();

if ( empty($_POST['submit']) ) {
    
    echo link2 . '<form action="add.php" method="post" name="form">
    <b>ID юзера:</b><br/>
    <input name="id" type="text" maxlength="15"/><br/>';
    echo '<input name="submit" class="submit" type="submit" value="Далее" /></form>' . div;
    
    
    
        


} else {
    
    $id = num($_POST['id']);
    $user = mysql_fetch_assoc(mysql_query("SELECT * FROM `profile` WHERE `id` = '".$id."'"));
    if ( isset($user['id']) ) {
        
        if ( $user['level'] > 3 ) {
            
            echo link1 . 'Вы не можете банить админа' . div;
            nanig();
            foot();
            exit();
            
        }
        
        if ( $user['id'] == $id_session ) {
            
            echo link1 . 'Себя собрались банить?' . div;
            nanig();
            foot();
            exit();
            
        }
        
        $_SESSION['panel_user'] = $user['id']; 
        echo rew('ban.php');
    }
    
}