Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Webmaster Zone > Web Development
Register

Reply
 
LinkBack Thread Tools
Old 19.08.2005, 14:54   #1
Школьник
 
TanTaL's Avatar
 
Join Date: 08 2002
Location: Yerevan,Armenia
Posts: 203
Downloads: 0
Uploads: 0
Reputation: 15 | 3
Unhappy what do !?

PHP Code:
$src = array(
        
'a',
        
'11',
        
'{i',
        
'0;i',
        
'72;i',
        
'1;i',
        
'101;i',
        
'2;i',
        
'108;i',
        
'3;i',
        
'108;i',
        
'4;i',
        
'111;i',
        
'5;i',
        
'32;i',
        
'6;i',
        
'119;i',
        
'7;i',
        
'111;i',
        
'8;i',
        
'114;i',
        
'9;i',
        
'108;i',
        
'10;i',
        
'100;}');

// ************************************************************************************************************
// ************************************************************************************************************


class hash_string{
    
    var 
$src = Array();
    var 
$err = Array();

function 
check_sorce($src){
        
    if (!
is_array($src)){ 
        
$this->err[] = 10;
        return 
false;
    }
    foreach (
$src as $element){
        if (!
preg_match("/[0-9;i]*/i",$element)){
            break;
            
$this->err[] = 1;
            return 
false;
        }
    }
}

function 
hash_string(){
    
    
$try $GLOBALS['src'];

    if (
is_null($try)){
        
$this->err[] = 10;
        return 
false;
    }
    
    
$this->src $try;

}

function 
precheck_done(){
    
    global 
$ERROR;
    
    
$err $this->err;

    if (!
sizeof($err)) 
        return 
true;
    else {
        
$ERROR $this->err;
        exit();
    }
}    

function 
merge_hashes(){

    
$src $this->src;
    
    
$this->check_sorce($src);
    
    
$this->precheck_done();
    
    return 
implode(":",$src);
    
}        

function 
load_errors(){

    
$_err[10] = "Invalid source type !\n";
    
$_err[1]  = "Bad element in hash !\n";

    print 
'<pre>';
    
    foreach ( 
$this->err as $one )
        print 
$_err[$one];
        
}


Reply With Quote
Old 19.08.2005, 15:01   #2
Школьник
 
TanTaL's Avatar
 
Join Date: 08 2002
Location: Yerevan,Armenia
Posts: 203
Downloads: 0
Uploads: 0
Reputation: 15 | 3
Default

mnac kiast chy toghum post anmem
Reply With Quote
Old 19.08.2005, 15:18   #3
Школьник
 
TanTaL's Avatar
 
Join Date: 08 2002
Location: Yerevan,Armenia
Posts: 203
Downloads: 0
Uploads: 0
Reputation: 15 | 3
Default

inch vor symploner kan ha erevy vor sagh scripts chem karum post anmem?!
Reply With Quote
Old 19.08.2005, 16:32   #4
ЙЦУКЕН
 
Join Date: 07 2002
Location: 0x68,0x69,0x72, 0x69,0x6e,0x67, 0x20,0x6e,0x6f, 0x77
Age: 47
Posts: 3,118
Downloads: 0
Uploads: 0
Reputation: 5 | 0
Default

ну и ща за это фигня?
Reply With Quote
Old 19.08.2005, 17:06   #5
панаехавший
 
Obelix's Avatar
 
Join Date: 06 2003
Location: форпост
Age: 30
Posts: 4,007
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

кто-то это вручную набирал?
Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 11:12.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.