Просмотр файла magazin_MalkaviaN/pages/zapros.php

Размер файла: 4.38Kb
<?php
#-----------------------------------------------------#
#          ********* WAP-MOTORS *********             #
#             Made by   :  VANTUZ                     #
#               E-mail  :  [email protected]         #
#                 Site  :  http://pizdec.ru           #
#             WAP-Site  :  http://visavi.net          #
#                  ICQ  :  36-44-66                   #
#  Вы не имеете право вносить изменения в код скрипта #
#-----------------------------------------------------#	
/************************************************/
//    show reply mod. by demeros                            //
/************************************************/		
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/antidos.php";
require_once"../template/gzip.php";
require_once"../template/header.php";
include_once"../template/pclzip.php";
require_once"../template/rprivat.php";

$uz=check($uz); 


if ($provlog==$_SESSION['log'] && $provpar==md5($_SESSION['par']) && $_SESSION['log']!="" && md5($_SESSION['par'])!=""){
		
if($uz==$log){header ("Location: ../uin/index.php?isset=noprivlog&uz=$uz&".SID); exit;}

if (preg_match('|^[a-z0-9_\-]+$|i',$uz)){
$str=strlen($mess);
if($mess=="" || $str<6){header ("Location: ../uin/index.php?isset=nomess&uz=$uz&".SID); exit;}
$proverka = file("../local/profil/$uz.prof"); 
$ster=strlen($uz);



if (empty($proverka) || $ster<1){
{header ("Location: ../uin/index.php?isset=nouzer&".SID); exit;}	
} else {

$filesize= filesize("../local/privat/$uz.$config_priv");
$filesize=round($filesize/1024,2);
$pers=round($filesize*100/$config_limitsmail);
if($pers>="99"){header ("Location: ../uin/index.php?isset=fullmail&uz=$uz&".SID); exit;}


 //--------------------- Новый антифлуд -----------------------------//
if($config_floodstime > 0){
if(flooder($ip, $php_self) == TRUE ){header ("Location: ../uin/index.php?isset=antiflood&uz=$uz&".SID); exit;}
$flood_file = fopen(BASEDIR."local/flood.dat", "a+");
flock ($flood_file,LOCK_EX);
fputs ($flood_file, "$sitetime|$ip|$php_self|\r\n");
fflush($flood_file);
flock ($flood_file,LOCK_UN);
fclose($flood_file);   
}


$mess = check($mess);
$log = check($log);
$mess = utf_substr($mess,0,1000);

if($trans=="y"){$mess=transliter($mess);}
$mess = antimat($mess);
$mess = smiles($mess); 
$mess=base64_encode($mess);





if($config_privat_antireklama==1 && !empty($config_privat_checkers))
{
antireklamap($mess,$sitetime,$rep,$log,$uz);
}
$mess=defence_go($mess,$uz);
$tex=$log.'|'.$mess.'|'.$sitetime.'|'.$rep.'|1|'.$fname.'|'; 
$tex=preg_replace ("|[\r\n]+|si","",$tex);


//------------------------------ Запись в профиль ----------------------------//
$ufile = file(BASEDIR."local/profil/$uz.prof"); 
$udata = explode(":||:",$ufile[0]);

$udata[10]++;
for ($u=0; $u<$config_userprofkey; $u++){
$utext.=$udata[$u].':||:';}

if($udata[0]!="" && $udata[1]!="" && $udata[4]!="" && $utext!=""){
$fp=fopen(BASEDIR."local/profil/$uz.prof","a+");  
flock ($fp,LOCK_EX); 
ftruncate ($fp,0);                                                              
fputs($fp,$utext);
fflush ($fp);
flock ($fp,LOCK_UN);
fclose($fp);  
unset($utext);	 
}

$fp=fopen(BASEDIR."local/privat/$uz.$config_priv","a+");  
flock ($fp,LOCK_EX);                                                              
fputs($fp,"$tex\r\n");
fflush ($fp);
flock ($fp,LOCK_UN);
fclose($fp);  


$tex2=$uz.'|'.$mess.'|'.$sitetime.'|1|0|'.$fname.'|'; 
$tex2=preg_replace ("|[\r\n]+|si","",$tex2);

$fp=fopen(BASEDIR."local/dataoutput/$log.$config_priv","a+");  
flock ($fp,LOCK_EX);                                                              
fputs($fp,"$tex2\r\n");
fflush ($fp);
flock ($fp,LOCK_UN);
fclose($fp);  
chmod ($fp, 0666);
chmod (BASEDIR."local/dataoutput/$log.$config_priv", 0666);

$file=file(BASEDIR."local/dataoutput/$log.$config_priv"); 
$i = count($file);
if ($i>=20) {
$fp=fopen(BASEDIR."local/dataoutput/$log.$config_priv","w");
flock ($fp,LOCK_EX);
unset($fname);
fputs($fp, implode($file));
flock ($fp,LOCK_UN);
fclose($fp);
}


header ("Location: ../uin/index.php?isset=zapros&".SID); exit;

}} 
else {header ("Location: ../uin/index.php?isset=nouzer&".SID); exit;}}

?>