<table border="0" width="100%" cellspacing="0" cellpadding="0">

  <tr>

    <td width="100%" bgcolor="#F0F0F0"><p><b>&gt;&gt; Администрация &gt;&gt; Добавление новости</b></p></td>

  </tr>

</table>

<p>&nbsp;</p>





<table border="1" width="98%" cellpadding="0" align="center" style="border-collapse: collapse" bordercolor="#9ace8b" cellspacing="1">

  <tr>

    <td width="100%" valign="top">

      <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#F1FFED" style="border-collapse: collapse">

        <tr>

           <td width="100%" bgcolor="#9ACE8B"><p><b>Добавление новости</b></p></td>

        </tr>

<?

If ($send == "ok") {

 If ($msg == "") {

  echo "<script> alert('Введите новость!'); history.back(); </script>";

  exit;

 }



 $ff = fopen("tx/news.txt", "a");

 $msg = str_replace("^", "_", $msg);

 $msg = str_replace("\n", "<br>", stripslashes($msg));



 fwrite($ff, date("d.m.Y") . "^$msg\n");

 fclose($ff);



 echo "<script> alert('Новость добавлена!'); document.location.href='/my.php$idstr&com=admin&com2=addnews'; </script>";

 exit;

}

?>

<tr>

<td bgcolor="#F1FFED">

<form method="POST" action="">

<input type="hidden" name="send" value="ok">

  <p align="center">

  <textarea rows="10" name="msg" cols="80" style="font-family: Verdana, Arial; font-size: 8pt; border: 1px solid #9ACE8B; "></textarea></p>

  <p align="center">

  <input type="submit" name="B1" value="отправить" style="border:1px solid #9ACE8B; font-family: Verdana, Arial; font-size: 8pt; background-color:#F1FFED"></p>

</form>

</td>

</tr>

      </table>

    </td>

  </tr>

</table>