require("connect.php3");
connect_to_db();
ReadClubSettings($ClubID, $Title, $TitlePic, $SimpleMainMenu, $MainMenu, $ReadTitlePic, $SimpleReadMenu, $ReadMenu);
$NickName=$myName;
UnEscape($NickName);
function Translate($Msg){
return str_replace("'","`",$Msg);
}
if ($ParentMessageID=="")
$ParentMessageID=0;
if ($Action=="Send") {
Translate($SenderName);
Translate($SenderMail);
Translate($Subject);
Translate($Contents);
$sqlInsertMessage="INSERT INTO forum_messages (ForumID,ParentMessageID,SenderName,SenderMail,MessageDate,Subject,Contents) ";
$sqlInsertMessage.="VALUES ($ClubID,$ParentMessageID,'$SenderName','$SenderMail',Now(),'$Subject','$Contents')";
$request_id=mysql_query($sqlInsertMessage);
if ($request_id>0)
{
header("Location: MessageInserted.php3?ClubID=$ClubID"); /* Redirect browser to PHP web site */
}
else
{
echo "Ошибка добавления сообщения!
Error: ".mysql_error()."
";
exit;
}
} // if Action=Send
?>