
07.07.2009, 14:51
|
|
Members of Antichat
Регистрация: 03.09.2005
Сообщений: 594
С нами:
10886786
Репутация:
685
|
|
PHP код:
function serial( $str = "", $email = "" ) { global $settings;
$type = substr( $str, 0, 3 );
$len = substr( $str, strlen( $str ) - 1, strlen( $str ) ) + 4;
$str = substr( $str, 3, strlen( $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 <= 2 ) { 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 <= 2 ) { 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;
}
как-то так )
|
|
|