Размер файла: 917B
<?php
if ($_POST['pokas'] != 'post_add')
{
?>
<span class="ramka">
<form name="" action="" method="post">
<textarea style="width: 100%;" name="mess12" rows=3 cols=20></textarea><br>
<input name="pokas" type="hidden" value="post_add">
<input class="knopka" type="submit" value=" Сохранить ">
</form>
</span>
<?php }
else
{
//сoхранение
if (trim($_POST['mess12']) != '')
{
$mess1 = substr($_POST['mess12'],0,500);
include($cms.'flud/anti_x.php');
$txt = $mess1;
$fp = fopen ($cms.'chat/base.txt', "a+");
fwrite ($fp, date("d/m/Y").'|'.$_SESSION['user_login'].'|'.stripslashes($txt)."\r\n");
fclose ($fp);
$_SESSION['chat_ok'] = 1;
echo '
<META HTTP-EQUIV="Refresh" CONTENT="0;">
';
}
else
{
echo '
<span class="error">
Полле ввода пустое.</span>
<META HTTP-EQUIV="Refresh" CONTENT="1;">
';
}
}
?>