<?
$type=$_POST['reason'];
$msg_cmpl=$_POST['msg_cmpl'];
if(strlen2($msg_cmpl)<1)
{
$err[]="Введите сообщение";
}
if(strlen2($msg_cmpl)>1024)
{
$err[]="Сообщение слишком длинное";
}
$msg_cmpl=my_esc($msg_cmpl);
if(!isset($err))
{
mysql_query("INSERT INTO `forum_komm_cmpl` (`type`, `id_komm`, `msg`, `time`, `ok`, `id_user`) values ('$type', '$cmpl[id]', '$msg_cmpl', '$time', '0', '$user[id]')");
header("location: /users/forum/?id=$forum[id]");
}
err();
?>