Вход Регистрация
Файл: id3508/add.php
Строк: 11
<?

$dat 
= date("d.m.Y");

if (
$name == "") {print "<h1>Введите имя!</h1>"; exit;}
if (
$message == "") {print "<h1>Введите текст!</h1>"; exit;}



$text = "$name|$email|$dat|$message|";
$text = stripslashes($text);
$text = htmlspecialchars($text);
$text = str_replace("rn", "<br>", $text);




$text = str_replace(":)", "<img src='./img/smile.gif' border=0>", $text);
$text = str_replace(":-)", "<img src='./img/smile.gif' border=0>", $text);
$text = str_replace(";)", "<img src='./img/smile1.gif' border=0>", $text);
$text = str_replace(";-)", "<img src='./img/smile1.gif' border=0>", $text);
$text = str_replace("!", "<img src='./img/01.gif' border=0>", $text);
$text1 = $text;
$text = substr($text,0,550);

if (
substr($text1,550,355) != "") { $text = "$text [текст обрезан, т.к. превышает 550 символов]"; 
print 
"<center><br><br> <b>Ваше сообщение было урезано, т.к. его длинна превышала 550 символов!</b>";
}




$fp=fopen("guest.data","a");
fputs($fp,"rn $text");
fclose($fp);





print 
"<h2>Сообщение добавлено!</h2>";

?>
Онлайн: 1
Реклама