<html>
  <head>
    <link rel="stylesheet" href="estils/hoja.css" type="text/css">
    <title>Departament d'Enginyeria Informātica i Matemātiques</title>
  </head>

  <body leftmargin="0" topmargin="0" bgcolor="#4F0000">
    <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" bgcolor="#8f0000">
          <h2>Departament d'Enginyeria Informātica i Matemātiques</h2>
          <img src="images/separador.gif"><br>
          <br><center><?php include("language.inc"); ?></center><br>
          <div align="left">
            <blockquote>
              <!-- Para que se vea bien en netscape aņadimos este font color -->
              <font color="#FFFFFF">
              <!-- Comenįament del cos -->
              <?php 
                require("private/connect.inc");
                $link=Conectar();
                $lang = $_COOKIE["lang"];
            		if ($lang=="es") {
                  $taula ="novetats_es";
                } else if ($lang=="en") {
                  $taula ="novetats_en";
                } else {
                  $taula ="novetats";
                  $lang="cat";
                }
                $result=mysql_query("SELECT * FROM " . $taula . " ORDER BY date DESC",$link);
                $count=0;
                // Mostrem les noticies mes noves
                while(($row = mysql_fetch_array($result)) && ($count<5)) {
                  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><div
                          align=\"left\">%s</div><br><br>", $row["bodytext"]);
                  $count++;
                }
                mysql_free_result($result);
              ?>
              <br>
              <div align="right">
                <a href="novetats/historic.php?pag=0"><img src="images/<?php echo $lang . "/"; ?>noticies.jpg" alt="+" border="0"></a>
              </div><br>
	      	    <center>

              <font color="#ffffff">WebMaster</font><br>
              <a href="mailto:becadeim@etse.urv.es"><font color="#ffaa00">becadeim@etse.urv.es</font></a>
              <br><br>
              <a href="http://www.urv.es"><img src="images/logourv.gif" alt="URV" border="0"></a><br>
              <a href="http://www.etse.urv.es"><img src="images/logoetse.jpg" alt="ETSE" border=0></a><br>
              </center>

            </blockquote>
          </div>
        </td>

        <!-- Esquerra -->
        <td valign="top" width="100" bgcolor="#4f0000" class="centered">
          <a href="http://www.gnu.org/philosophy/philosophy.ca.html" target="_blank"><img src="images/linux.gif" border="0"></a>
          <div align="right"><font size="-1"><b>Powered</b></font></div>
          <table border="0" bgcolor="#4f0000"><b>
          <tr><td class="centered">
            <img src="images/<?php echo $lang . "/"; ?>links.gif" alt="Links Rāpids">
          </td></tr>
          <?php
            $link=Conectar();
            $result=mysql_query("SELECT * FROM links ORDER BY pos DESC",$link);
            while($row = mysql_fetch_array($result)){
              echo "<tr><td class=\"centered\"><a href=\"" . $row["link"] . "\" class=\"link1\" target=\"_blank\">". $row["info"] . "</a><br></td></tr>";
            }
            mysql_free_result($result);
          ?>
          </table>
                                      
        </td>
      </tr>
    </table>
  </body>
</html>

