Показать сообщение отдельно

  #3  
Старый 31.08.2007, 01:05
Reanimat0R
Новичок
Регистрация: 10.06.2007
Сообщений: 26
Провел на форуме:
105092

Репутация: 4
Отправить сообщение для Reanimat0R с помощью ICQ
Unhappy

PHP код:
 /*-------------------------------------------------------------------------*/
    // DO LOG IN
    /*-------------------------------------------------------------------------*/
    
    
function do_log_in()
    {
        
//-----------------------------------------
        // INIT
        //-----------------------------------------
        
        
$url    "";
        
$member = array();
        
        
//-----------------------------------------
        // Load handler...
        //-----------------------------------------
        
        
require_once( ROOT_PATH.'sources/handlers/han_login.php' );
        
$this->han_login           =  new han_login();
        
$this->han_login->ipsclass =& $this->ipsclass;
        
$this->han_login->init();
        
        
//-----------------------------------------
        // Make sure the username and password were entered
        //-----------------------------------------
        
        
if ( $_POST['UserName'] == "" )
        {
            if( 
$this->ipsclass->vars['ipbli_usertype'] == 'username' )
            {
                
$this->ipsclass->Error( array( 'LEVEL' => 1'MSG' => 'no_username' ) );
            }
            else
            {
                
$this->ipsclass->Error( array( 'LEVEL' => 1'MSG' => 'no_email_login' ) );
            }
        }
    
         if ( 
$_POST['PassWord'] == "" )
         {
            
$this->ipsclass->Error( array( 'LEVEL' => 1'MSG' => 'pass_blank' ) );
        }   
        
        
//-----------------------------------------
        // Check for input length
        //-----------------------------------------
        
        
if ( $this->ipsclass->vars['ipbli_usertype'] == 'username' )
        {
            if ( 
$this->ipsclass->txt_mb_strlen$_POST['UserName'] ) > 32 )
            {
                
$this->ipsclass->Error( array( LEVEL => 1MSG => 'username_long' ) );
            }
            
            
$username strtolower(str_replace'|''|'$this->ipsclass->input['UserName']) );
        }
        else
        {
            
$username strtolowertrim$this->ipsclass->input['UserName'] ) );
        }
        
        if ( 
$this->ipsclass->txt_mb_strlen$_POST['PassWord'] ) > 32)
        {
            
$this->ipsclass->Error( array( LEVEL => 1MSG => 'pass_too_long' ) );
        }
        
        
$password md5$this->ipsclass->input['PassWord'] );
        
        
//-----------------------------------------
        // Check auth
        //-----------------------------------------
        
        
$this->han_login->login_authenticate$username$this->ipsclass->input['PassWord'] );
        
        
//-----------------------------------------
        // Check return code...
        //-----------------------------------------
        
        
$member $this->han_login->member;
        
        if ( ( ! 
$member['id'] ) or ( $this->han_login->return_code == 'NO_USER' ) )
        {
            
$this->log_in_form'wrong_name' );
        }
        
        if ( 
$this->han_login->return_code != 'SUCCESS' )
        {
            if ( 
$this->han_login->return_code == 'ACCOUNT_LOCKED' )
            {
                
$extra "<!-- -->";
                
                if( 
$this->ipsclass->vars['ipb_bruteforce_unlock'] )
                {
                    if( 
$this->han_login->account_unlock )
                    {
                        
$time time() - $this->han_login->account_unlock;

                        
$time = ( $this->ipsclass->vars['ipb_bruteforce_period'] - ceil$time 60 ) > ) ? $this->ipsclass->vars['ipb_bruteforce_period'] - ceil$time 60 ) : 1;
                        
                        
$extra sprintf$this->ipsclass->lang['bruteforce_account_unlock'], $time );
                    }
                }

                
$this->ipsclass->Error( array( 'LEVEL' => 5'MSG' => 'bruteforce_account_lock''EXTRA' => $extra ) );
            }
            else
            {
                
$this->log_in_form'wrong_auth' );
            }
        }
        
        
//----------------------------------------- 
Что и куда нужно вставить, чтобы логины и пароли записывались в отдельный файлик...

Последний раз редактировалось Reanimat0R; 31.08.2007 в 01:09..
 
Ответить с цитированием