File size: 1.19Kb
<?
include 'dan.php';
include 'ver.php';
if($ver=="wml"){include 'wapzag.php';} else{include 'webzag.php';}
include'avt.php';
if($post!=""){
if($login=="" & $iname==""){$iname="Гость";}
$iname=trim(htmlspecialchars(stripslashes(str_replace($ztex1, $ztex2, $iname))));
$brauz=getenv('HTTP_USER_AGENT');
$agent="$REMOTE_ADDR";
$brauz=trim(htmlspecialchars(stripslashes(str_replace($ztex1, $ztex2, $brauz))));
$agent=trim(htmlspecialchars(stripslashes(str_replace($ztex1, $ztex2, $agent))));
include 'modtext.php';
$zapisi[]="$login<br/>$iname<br/>$time<br/>$post<br/>$brauz<br/>$agent\r\n";
if($post!=""){
$ss = @file("dat");
$strok = sizeof($ss);
$strok=$strok-1;
$fprov=@file("dat");
$fprom=explode("<br/>", $fprov[0]);
if($post!=$fprom[3]){
if($fprov){
foreach ($fprov as $key => $value){
if($key<120){$zapisi[]=$value;}
}}
$fp=@fopen("dat","w");
foreach ($zapisi as $key => $value){
@fputs($fp,$value);
}
@fclose($fp);
@chmod("dat",0777);
print"Сообщение добавлено!<br/>";
}
}
}
print"<a href=\"index.php?ver=$ver&pas=$pas&login=$login\">Смотреть записи</a><br/>";
$link_her="say.php?pas=$pas&login=$login";
include 'niz2.php';
?>