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

  #16  
Старый 07.07.2009, 14:53
Аватар для eLWAux
eLWAux
Members of Antichat - Level 5
Регистрация: 15.06.2008
Сообщений: 941
Провел на форуме:
5111568

Репутация: 2399


Отправить сообщение для eLWAux с помощью ICQ
По умолчанию

Komyak, для начала неплохо бы скрипт в нормальном виде записать:
PHP код:
function serial$str ""$email "" ) {
     global 
$settings;
     
$type substr$str0);
     
$len substr$strstrlen$str ) - 1strlen$str ) ) + 4;
     
$str substr$str3strlen$str ) - $len );
     
$search = array( "wq""re""yt""iu""po""sa""fd""hg""kj""lk" );
     
$replace = array( "0""1""2""3""4""5""6""7""8""9" );
     switch ( 
$type ) {
        case 
"1st" :
            
$serials explode"@%"$str ); 
            if ( isset( 
$serials[1] ) ) {
                
$host "scriptoprofessional_".rethostex( )."scripto_time";
                if (
                     
md5$host ).
                     
md5$host.$host ).
                     
md5$host.$host.$host ).
                     
md5$host.$host.$host.$host ).
                     
md5$host.$host.$host.$host.$host ).
                     
md5$host.$host.$host.$host.$host.$host ) == $serials[1] ) {
                        
$time str_replace$search$replace$serials[0] );
                         if ( 
eregi"^[0-9]{1,}\$"$time ) ) {
                             if ( 
time( ) <= $time ) {
                                
$timestamp $time time( );
                                if ( 
$timestamp 86400 <= ) {
                                    echo 
"Внимание! Действие лицензии Scripto catalog заканчивается ".date"d-m-Y"$time )."<br>";
                                }
                                return 
true;
                            }
                             return 
false;
                         } return 
false;
                     } return 
false;
             } return 
false
        case 
"1sn" :
            
$host "scriptoprofessional_".rethostex( )."scripto_notime";
            if ( 
md5$host ).
                 
md5$host.$host ).
                 
md5$host.$host.$host ).
                 
md5$host.$host.$host.$host ).
                 
md5$host.$host.$host.$host.$host ).
                 
md5$host.$host.$host.$host.$host.$host ) == $str ) {
                    return 
true;
                 }
                 return 
false;
         case 
"unt" :
            if ( isset( 
$settings['mailadmin'] ) ) {
                 
$mail $settings['mailadmin'];
            } else {
                 
$mail $email;
            }
            
$serials explode"@%"$str );
            if ( isset( 
$serials[1] ) ) {
                 
$host "scriptoprofessional_".$mail."supernick";
                 if ( 
md5$host ).
                     
md5$host.$host ).
                     
md5$host.$host.$host ).
                     
md5$host.$host.$host.$host ).
                     
md5$host.$host.$host.$host.$host ).
                     
md5$host.$host.$host.$host.$host.$host ) == $serials[1] ) {
                         
$time str_replace$search$replace$serials[0] );
                         if ( 
eregi"^[0-9]{1,}\$"$time ) ) {
                             if ( 
time( ) <= $time ) {
                                 
$timestamp $time time( );
                                 if ( 
$timestamp 86400 <= ) {
                                     echo 
"Внимание! Действие лицензии Scripto catalog заканчивается ".date"d-m-Y"$time )."<br>";
                                 }
                                 return 
true;
                             }
                             return 
false;
                         } return 
false;
                      }
                      return 
false;
             }
             return 
false;
         case 
"unn" :
             if ( isset( 
$settings['mailadmin'] ) ) {
                 
$mail $settings['mailadmin'];
             } else {
                 
$mail $email;
             }
             
$host "scriptoprofessional_".$mail."supernick_noptime";
             if ( 
md5$host ).
                  
md5$host.$host ).
                  
md5$host.$host.$host ).
                  
md5$host.$host.$host.$host ).
                  
md5$host.$host.$host.$host.$host ).
                  
md5$host.$host.$host.$host.$host.$host ) == $str ) {
                    return 
true
                }
                return 
false;
    }

если задача убрать проверку , тогда замени все это на :
PHP код:
 function serial$str ""$email "" ) { return True; } 
если задача сделать генератор.. то сейчас подумаю.. и сделаю
 
Ответить с цитированием