<?
$mess0 = @mysql_query( @"select  *  from  `forum_message`  where `id`='".$m."';" );
$mess = @mysql_fetch_array($mess0);
if (mysql_affected_rows() == 0){
echo $fs1;
echo '<b>Такого сообщения не существует!</b>';
echo $fs2;
foot();
exit;
}
$id = $mess ['topic'];

$q2 = @mysql_query("SELECT * from `forum_message` WHERE `id` = '".$m."'");
$k = mysql_num_rows( $q2 );
//if ($row['level']<4&&($row['id']==$k['login']))
if ($row['level']<5)
{   echo $fs1;
echo "<div>Доступ закрыт!</div><br/>";
echo $fs2;

}
else
{
if (mysql_query( "delete from forum_message where id='".$m."';"))
{
echo $fs1;

mysql_query ("Update users set posts='".($row["posts"]-1)."', postsf='".($row["postsf"]-1)."', dayp='".($row["dayp"]-1)."' where id ='".$myid."'");

echo "Сообщение удалено!<br />";
 header("Location: ".F."tema/$id/$page");
echo $fs2;
}


}
?>