Размер файла: 918B
<?php
if ($_POST['vig_pokas'] != 'post_add')
{
?>
<form name="" action="" method="post">
<textarea style="width: 98%;" name="mess123" rows=2 cols=20></textarea>
<input name="vig_pokas" type="hidden" value="post_add">
<div align="right"><input class="knopka" type="submit" value=" Сохранить "></div>
</form>
<?php }
else
{
//сoхранение
if (trim($_POST['mess123']) != '')
{
$mess1 = substr($_POST['mess123'],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;">
';
}
}
?>