<html>
  <head>
    <link rel="stylesheet" href="../estils/hoja.css" type="text/css">
    <title>Personal</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>
        <br><center><?php include("../language.inc"); ?></center><br>
        <div align="left"><blockquote>

        <!-- Començament del cos -->
        <?php 
              require("../private/connect.inc");
              require("../private/func-personal.inc");
              $link=Conectar();
              $id=addslashes($_GET["id"]);
              $result=mysql_query("SELECT * FROM personal WHERE id=$id", $link);
              $row = mysql_fetch_array($result);
              $consultes = $row["consultes"];
              mysql_free_result($result);
        ?>
        <h2><?php echo $text[PersonalRegistre]; ?><br>
        <img src="images/separador2.gif"></h2>
          <?php printf ("<input name=\"id\" value=\"%s\" type=\"hidden\">", $id); ?>
          <b><?php echo $text[Nom]; ?>:</b>
          <?php printf ("%s", htmlspecialchars($row["nom"])); ?>
          <br>
          <b><?php echo $text[Despatx]; ?>:</b>
          <?php printf ("%s", htmlspecialchars($row["despatx"])); ?><br>
          <b><?php echo $text[Telf]; ?>:</b>
          <?php printf ("%s", htmlspecialchars($row["telf"])); ?><br>
          <b>E-Mail:</b>
          <?php printf ("<a href=\"mailto:%s\">%s</a>", htmlspecialchars($row["email"]),
          htmlspecialchars($row["email"])); ?>
          <br>
          <b>Web:</b>
          <?php printf ("<a href=\"%s\">%s</a>", htmlspecialchars($row["web"]),
          htmlspecialchars($row["web"])); ?>
          <br>
          <b><?php echo $text[Area]; ?>:</b>
          <?php printf ("%s", htmlspecialchars(area($row["area"]))); ?>
          <?php
            $checked=false;
	    $link=Conectar();
            $result=mysql_query("SELECT * FROM becaris WHERE id=$id", $link);
            $row = mysql_fetch_array($result);
            if ($row["id"] == $id){
              printf ("(Becari)");
            }
            mysql_free_result($result);
	    $link=Conectar();
            $result=mysql_query("SELECT * FROM profes_associats WHERE id=$id");
            $row = mysql_fetch_array($result);
            if ($row["id"] == $id){
              printf ("(Professor Associat)");
            }
            mysql_free_result($result);
            mysql_close($link);
          ?>
          <br>
          <b><?php echo $text[HorariConsultes]; ?>:</b> <?php echo htmlspecialchars($consultes); ?>
          <br><br>
          <input type="image" onClick="history.go(-1)" src="images/<?php echo $lang . "/"; ?>tornar.jpg">

        </blockquote></div>
        </td>
      </tr>
    </table>
  </body>
</html>

