<html>
  <head>
    <link rel="stylesheet" href="../estils/hoja.css" type="text/css" />
    <title>Notícia</title>
  </head>

  <body leftmargin="0" topmargin="0" bgcolor="#8F0000">
    <table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0">
      <tr>
        <!-- Menú dret -->
        <td align="left" valign="top" width="100" bgcolor="#4F0000">
          <?php include("../menu.inc") ?>
        </td>

        <!-- Capçalera -->
        <td align="left" valign="top" width="100%" class="centered">
        <h2>Departament d'Enginyeria Informàtica i Matemàtiques</h2>
        <img src="images/separador.gif"><br>
        <div align="left"><blockquote>

        <!-- Començament del cos -->
        <?php 
              require("../private/connect.inc");
              $lang = $_COOKIE["lang"];
              if ($lang=="es") {
                $taula ="novetats_es";
              } else if ($lang=="en") {
                $taula ="novetats_en";
              } else {
                $lang="cat";
                $taula ="novetats";
              }

              $link=Conectar();
              if (!is_numeric($_GET["nid"])){
                die;
              }
              $nid=addslashes($_GET["nid"]);
              $result=mysql_query("SELECT nid,titol,date,bodytext FROM ". $taula ." where nid=$nid",
              $link);
              $row = mysql_fetch_array($result);

              printf("<b>&nbsp;%s</b><br>", $row["titol"]);
              $dd = substr($row["date"], 6, 2);
              $mm = substr($row["date"], 4, 2);
              $yy = substr($row["date"], 0, 4);
              echo("&nbsp;".$text["Data"].": " . $dd . "-" . $mm . "-" . $yy . "<br>");
              printf("<img src=\"images/separador2.gif\"><br><br><div
              align=\"left\">%s</div><br><br>", $row["bodytext"]);
              
              mysql_free_result($result);
              mysql_close($link);
        ?>
        <br><br>
        <center>
        <input type="image" src="images/<?php echo $lang; ?>/tornar.jpg" onClick="history.go(-1)">
        </center>
        </blockquote></div>
        </td>
      </tr>
    </table>
  </body>
</html>

