<?php
include 'logue.php'; 
include 'entete2.php';
include 'entete.php';

echo"
<STYLE TYPE=text/css>
.Style1 {color: #0000FF}
.Style2 {color: #FF0000}
input {
border:1px solid #7E7E7E;
background-color:#000000;
font-family:'trebuchet ms',sans-serif;
color:white;
}
textarea {
border:1px solid #7E7E7E;
background-color:#000000;
font-family:'trebuchet ms',sans-serif;
color:white;
}
select, option {
background-color:#000000;
color:white;
}
A.menulink2 {
width: 150px;
text-decoration: none;
font-family:Verdana;
font-size:11px;
color: #FF3300;
BORDER: none;
border: solid 1px #000000;
}

A.menulink2:hover {
border: solid 1px #000000;
background-color:#000000;
}
</STYLE>";
echo"<div align=\"center\"><br><br><form action=\"news_envoi.php\" method=\"post\" name=\"form1\" target=\"_parent\">
  <table width=\"659\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
    <tr>
      <td width=\"107\">Sujet : </td>
      <td width=\"546\">
        <div align=\"left\">
          <input name=\"sujet\" type=\"text\" size=\"75\">
        </div></td>
    </tr>
    <tr>
      <td height=\"80\">Message : </td>
      <td rowspan=\"2\">
        <div align=\"left\">
          <textarea name=\"msg\" cols=\"75\" rows=\"7\"></textarea>
        </div></td>
    </tr>
    <tr>
      <td height=\"114\">&nbsp;</td>
    </tr>
    <tr>
      <td height=\"39\" colspan=\"2\"><div align=\"center\">
        <input type=\"submit\" name=\"Submit\" value=\"Envoyer\">
      </div></td>
    </tr>
  </table>
</form>";
echo"<br><br><table width=\"659\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
  <tr>
    <td width=\"251\"><div align=\"center\">Date : </div></td>
    <td width=\"375\"><div align=\"center\">Sujet : </div></td>
    <td width=\"25\">Del</td>
  </tr>";
$req = "SELECT * FROM matgraph_news ORDER by id DESC";
$res = mysql_query($req) or die('Erreur SQL! <br>'.$req.'<br>'.mysql_error());
$num = mysql_num_rows($res);
if ( $num > 0 ) {
  While ( $row = mysql_fetch_array($res) ) {
$lire = "lire" ;
  $liree = $id.$row[id];  
echo"<tr>
    <td><div align=\"center\">$row[date]</div></td>
    <td><div align=\"center\">$row[sujet]</div></td>
	<form name=\"suprimer\" method=\"post\" action=\"news_del.php\" target=\"_parent\"><input type=\"hidden\" name=\"id\" value=\"$row[id]\">
    <td><input type=\"image\" src=\"../imgs/del.gif\" width=\"25\"></td>
	</form>";
	
	}}
  echo"</tr>
</table>";
  
  
?>