Размер файла: 1.16Kb
<?php
Defined('INDEX_S_S') or die ('Доступ запрещен!!!');
if ($_POST['pokas'] != 'post_add')
{
include('flud/js/bb.php');
include('flud/js/smyle.php');
$ms_pol = 'mess12';
include('flud/js/smyler.php');
$ms_pol = 'mess12';
include('flud/js/bber.php');
?>
<span class="ramka">
<form name="" action="" method="post">
<textarea style="width: 100%;" name="mess12" rows=8 cols=45></textarea><br><br>
<input name="pokas" type="hidden" value="post_add">
<input class="knopka" type="submit" value=" Сохранить ">
</form>
</span>
<br>
<?php }
else
{
//сoхранение
if (trim($_POST['mess12']) != '')
{
$mess1 = substr($_POST['mess12'],0,500);
include('flud/anti_x.php');
$txt = $mess1;
$fp = fopen ('chat/base.txt', "a+");
fwrite ($fp, date("d/m/Y").'|'.$_SESSION['user_login'].'|'.stripslashes($txt)."\r\n");
fclose ($fp);
$activ = 'Активность в чате.';
include('moduls/act/act_add.php');
echo '
<span class="ramka">
Сохранено.</span>
<META HTTP-EQUIV="Refresh" CONTENT="1;">
';
}
else
{
echo '
<span class="error">
Полле ввода пустое.</span>
<META HTTP-EQUIV="Refresh" CONTENT="1;">
';
}
}
?>
<hr>