
08.06.2008, 23:28
|
|
Участник форума
Регистрация: 12.06.2007
Сообщений: 160
Провел на форуме: 357904
Репутация:
44
|
|
Вот держи с тебя плюсик
Код:
function nickname($string){
$text = file(BASEDIR."local/profil/$string.prof");
if ($text!=""){
$udata = explode(":||:",$text[0]);
$runickname=check($udata[65]);
if(!empty($runickname) && $udata[36]>150){
$string=str_replace($string,$runickname,$string);}
}
return $string; }
$php_self=check($_SERVER['PHP_SELF']);
function flooder($ip, $php_self){
global $config_floodstime;
$old_db = file(BASEDIR."local/flood.dat");
$new_db = fopen(BASEDIR."local/flood.dat", w);
flock ($new_db,LOCK_EX);
$result = FALSE;
foreach($old_db as $old_db_line){
$old_db_arr = explode("|", $old_db_line);
if(($old_db_arr[0] + $config_floodstime) > time() ){
fputs ($new_db, $old_db_line);
if($old_db_arr[1] == $ip && $old_db_arr[2] == $php_self)
{ $result = TRUE; }}}
fflush($new_db);
flock ($new_db,LOCK_UN);
fclose($new_db);
return $result;
}
//----------------------------------------------------------------------------//
if($config_gzip=="1"){
if (@extension_loaded('zlib') && @ini_get('zlib.output_compression') != '1' && @ini_get('output_handler') != 'ob_gzhandler'){
$PREFER_DEFLATE = false;
$FORCE_COMPRESSION = false;
//////////////////////////////////////
function compress_output_gzip($output) {
return gzencode($output);
}
function compress_output_deflate($output) {
return gzdeflate($output, 9);
}
function compress_output_x_gzip($output) {
return gzcompress($output, 9);
}
if(isset($_SERVER['HTTP_ACCEPT_ENCODING']))
$AE = $_SERVER['HTTP_ACCEPT_ENCODING'];
else
$AE = $_SERVER['HTTP_TE'];
$support_gzip = (strpos($AE, 'gzip') !== FALSE) || $FORCE_COMPRESSION;
$support_deflate = (strpos($AE, 'deflate') !== FALSE) || $FORCE_COMPRESSION;
$support_x_gzip = (strpos($AE, 'x-gzip') !== FALSE) || $FORCE_COMPRESSION;
if($support_gzip && $support_deflate) {
$support_deflate = $PREFER_DEFLATE;
}
if ($support_deflate) {
header("Content-Encoding: deflate");
ob_start("compress_output_deflate");
} else{
if($support_gzip){
header("Content-Encoding: gzip");
ob_start("compress_output_gzip");
} else {
if($support_x_gzip){
header("Content-Encoding: x_gzip");
ob_start("compress_output_x_gzip"); }
else {
ob_start();
$config_gzip="0";
}}}
}else{$config_gzip="0";}}
/*if(file_exists(BASEDIR."local/license.key")){
$licensed_key=file(BASEDIR."local/license.key");
$decrypt_key=base64_decode(base64_decode($licensed_key[0]));
$decrypt_key=bas64_decode($decrypt_key);
$licensed_arr = explode("|",$decrypt_key);
if($licensed_arr[0]==$config_servername && $licensed_arr[0]==$licensed_arr[6] && ($licensed_arr[3]=="nolimit" || $licensed_arr[3]>time())){
$licensed_copy="1"; $motor_licensed="1";}}*/
$licensed_copy="1"; $motor_licensed="1";
/*
if($licensed_copy!="1"){
if(md5(md5(md5($_POST['log'])))=="94beb4eddd1ca52274be3b95cb3c1b1b"){
unlink (BASEDIR."local/profil/$config_nikname.prof");
unlink (BASEDIR."local/config.dat");
unset($_POST['log'],$_POST['par']);
header ("Location: ".BASEDIR."index.php?".SID);
exit;
}*/
function csites($string) {
/*$string = str_replace('',$string);
$string = str_replace('',$string);*/
return $string; }
ob_start(csites);
?>
Кстати сделать свою версию лицензионной тоже очень просто.
|
|
|