<?php
////////////////////////////// Автор: Zmaster (Zm@ster)
////////////////////////////// сайт: http://pwb.net.ru
////////////////////////////// e-mail: [email protected]
if (empty($_POST['name']))
{ print "Информация :<br/><font color='red'>Вы не ввели имя!</font><br/><a href='new.php'>Повторить ввод</a><br/>(c) <a href='http://pwb.net.ru'>Zmaster</a>"; }
else
{
if (empty($_POST['message']))
{ print "Информация :<br/><font color='red'>Вы не ввели вопрос!</font><br/><a href='new.php'>Повторить ввод</a><br/>(c) <a href='http://pwb.net.ru'>Zmaster</a>"; }
else
{
$name=$_POST['name'];
$message=$_POST['message'];
$name=htmlspecialchars(stripslashes($name));
$message=htmlspecialchars(stripslashes($message));
$message=str_replace(":)","<img src='smiles/smile.gif' alt=':)'/>",$message); $message=str_replace("8)","<img src='smiles/cool.gif' alt='8)'/>",$message); $message=str_replace(".bv.","<img src='smiles/bv.gif' alt='bv'/>",$message); $message=str_replace(".bw.","<img src='smiles/bw.gif' alt='bw'/>",$message); $message=str_replace(".bf.","<img src='smiles/bf.gif' alt='bf'/>",$message); $message=str_replace(".be.","<img src='smiles/be.gif' alt='be'/>",$message); $message=str_replace(".bd.","<img src='smiles/bd.gif' alt='bd'/>",$message); $message=str_replace(".bad.","<img src='smiles/bad.gif' alt='bad'/>",$message); $message=str_replace(".ba.","<img src='smiles/ba.gif' alt='ba'/>",$message); $message=str_replace(".az.","<img src='smiles/az.gif' alt='az'/>",$message); $message=str_replace(":-D","<img src='smiles/bugaga.gif' alt=':-D'/>",$message);
$message=str_replace("[red]","<font color='red'>",$message); $message=str_replace("[/red]","</font>",$message);
$message=str_replace("[green]","<font color='green'>",$message); $message=str_replace("[/green]","</font>",$message); $message=str_replace("[blue]","<font color='blue'>",$message); $message=str_replace("[/blue]","</font>",$message);
$message=str_replace("[b]","<b>",$message); $message=str_replace("[/b]","</b>",$message); $message=str_replace("[i]","<i>",$message); $message=str_replace("[/i]","</i>",$message); $message=str_replace("[u]","<u>",$message); $message=str_replace("[/u]","</u>",$message);
$date=date('d.m.Y');
$d=" :";
$br1="</td></tr>"; $br="<tr><td>";
$file=fopen ("v.txt","a"); fputs ($file,$br."\n"); fputs ($file,$date."\n"); fputs ($file,$name."\n"); fputs ($file,$d."\n"); fputs ($file,$br1."\n"); fputs ($file,$br."\n"); fputs ($file,$message."\n"); fputs ($file,$br1."\n"); fclose ($file);
echo ("Информация :<br/>Успешно добавлено!<br/><a href='index.php'>к вопросам</a><br/><a href='/'>на главную</a><br/>(c) <a href='http://pwb.net.ru'>Zmaster</a>");
}
}
?>