<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="0" width="98%" cellpadding="0" align="center" style="border: 1 solid #0000FF" cellspacing="1">
  <tr>
    <td width="100%" valign="top">
      <table border="0" width="100%" cellspacing="0" cellpadding="0">
        <tr>
           <td width="100%" bgcolor="#FBC900"><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.phtml$idstr&com=admin&com2=addnews'; </script>";
 exit;
}
?>
<tr>
<td>
<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: 1 solid #7F9DB9"></textarea></p>
  <p align="center"><input type="submit" name="B1" value="отправить" style="font-family: Verdana, Arial; font-size: 8pt"></p>
</form>
</td>
</tr>
      </table>
    </td>
  </tr>
</table>