Размер файла: 1.44Kb
<?php
Defined('INDEX_S_S') or die ('Доступ запрещен!!!');
if ($_POST['pokas'] != 1)
{ ?>
<span class="ramka">
<form name="" action="" method="post">
<?php
if ($_SESSION['user_login'] != '')
echo ('<div align="right">'.$_SESSION['user_login'].':</div>');
else
echo 'IP: '.$_SESSION['login'];
?>
<textarea style="width: 100%;" name="gb_mess1" rows=2 cols=20></textarea><br><br>
<input name="pokas" type="hidden" value="1">
<input class="knopka" type="submit" value=" Сохранить ">
</form>
</span>
<br>
<?php }
else
{
//сoхранение
if (trim($_POST['gb_mess1']) != '')
{
$mess1 = substr($_POST['gb_mess1'],0,500);
include($cms.'flud/anti_x.php');
$text = $mess1;
if ($_SESSION['user_login'] != '')
$name_quest = ('[b]'.$_SESSION['user_login'].' сказал:[/b]');
else
$name_quest = ('[b]Гость с IP: '.$_SESSION['login'].'[/b]');
$mess1 = $name_quest;
include($cms.'flud/anti_x.php');
$name_quest = $mess1;
$fp = fopen ($cms.'gb/gb_base.txt', "a+");
fwrite ($fp, date("d/m/Y").'|'.$name_quest.'|'.stripslashes($text)."\r\n");
fclose ($fp);
$activ = 'Активность в гостевой.';
include('moduls/act/act_add.php');
echo '
<META HTTP-EQUIV="Refresh" CONTENT="0;">
';
}
else
{
echo '
<div class="error">
Полле ввода пустое.</div>
<META HTTP-EQUIV="Refresh" CONTENT="2;">
';
}
}
?>
<hr>