<?
include'arsmile.php';
$arspecsi1=array("<",">","\"","&");
$arspecsi2=array("(+1+)","(+2+)","(+3+)","(+4+)");
$arspecsi3=array("<", ">", """, "&");
$post=str_replace($arspecsi1, $arspecsi2, $post);
$post=trim(htmlspecialchars(stripslashes(str_replace($ztex1, $ztex2, $post))));
$post=" $post ";
$transtext=@file("../trans.zap");
$translittext1=explode("#", $transtext[1]);
$translittext2=explode("#", $transtext[2]);
$post=str_replace($conv1, $conv3, $post);
$substr_count = substr_count($post,"http://");
$n=1; $ofset=0; $sl=0;
while($n <= $substr_count ){
$pozicn = strpos($post, "http://",$ofset);
$pozick = strpos($post, " ",$pozicn);
$sim=$pozick-$pozicn;
if($sim==0) {$sim="";}
if($sim!=""){$sim=$sim+1;}
$zamenstr = substr($post, $pozicn, $sim);
$zamenstr=trim($zamenstr);
$zamenstr=htmlspecialchars(stripslashes($zamenstr));
$alink2[$sl]=" <$sl> ";
$alink3[$sl]="<a href=\"$zamenstr\">$zamenstr</a>";
$post=str_replace($zamenstr,$alink2[$sl],$post);
$sl++;
$ofset=$pozicn+3;
$n=$n+1;}
if($trans=="yes"){$post=str_replace($translittext2, $translittext1, $post);}
$post=str_replace($conv3, $conv2, $post);
$post=str_replace($alink2, $alink3, $post);
$post=str_replace($arspecsi2, $arspecsi3, $post);
if($login!=""){
$aranket=@file("$uzer/$login");
$aranket=explode("<br/>", $aranket[0]);
$aranket[14]++;
$zapis=implode("<br/>", $aranket);
$fp=@fopen("$uzer/$login","w");
@fputs($fp,$zapis);
@fclose($fp);
@chmod ("$uzer/$login", 0777);}
?>