<?php setcookie("login", $_COOKIE["login"] , time()+3600, "/", "deim.etse.urv.es", 1 ); ?>
<?php setcookie("sessio", $_COOKIE["sessio"] , time()+3600, "/", "deim.etse.urv.es", 1 ); ?>
<html>
  <head>
    <link rel="stylesheet" href="../estils/hoja.css" type="text/css">
    <title>Esborrar tesi</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>
        <div align="left"><blockquote>

        <!-- Començament del cos -->
        <?php 
          require("../private/connect.inc");
          require("../private/ident.inc");
          require("../private/func.inc");
          ident();
          autoritzar($_COOKIE["login"], "tesis");
        ?>
        <h2>Administració Tesis: Esborrar</h2>
        <?php
              $lang = $_REQUEST["lang"];
              if ($lang == "es") {
                $taula = "tesis_es";
              } else if ($lang == "en") {
                $taula = "tesis_en";
              } else {
                $taula = "tesis";
              }
              $link=Conectar();
              $tid = addslashes($_POST["tid"]);
              $result=mysql_query("SELECT * FROM $taula WHERE tid=$tid");
              $row = mysql_fetch_array($result);
              echo "<b>Titol:</b><br>" . htmlspecialchars($row["titol"]) . "<br><br>";
              echo "<b>Paraules clau:</b><br>" . htmlspecialchars($row["keywords"]) . "<br><br>";
              echo "<b>Assignatures relacionades:</b><br>" .
                htmlspecialchars($row["assignatures_rel"]) .
              "<br><br>";
              echo "<b>Director/a(s)</b><br>" . htmlspecialchars(nom($row["id1"])) . "<br>";
              if ($row["id2"] != "0"){
                echo htmlspecialchars(nom($row["id2"])) . "<br>";
              }
              if ($row["id3"] != "0"){
                echo htmlspecialchars(nom($row["id3"])) . "<br>";
              }
              echo "<br>";
              echo "<b>Categoria</b><br>";
              echo htmlspecialchars(categoria($row["categoria"])) . "<br><br>";
              echo "<b>Resum:</b><br>" . $row["resum"];
              echo "<br><br>";
              echo "<form action=\"esborrardb.php\" method=\"post\">";
              printf ("<input name=\"tid\" type=hidden value=\"%s\">",
                            htmlspecialchars($tid));
              printf ("<input name=\"lang\" type=hidden value=\"%s\">", $lang);
              echo  "&nbsp;&nbsp;<input type=\"image\" src=\"images/esborrar.jpg\"></form>";
        
?>
        <br><br>
        <input type="image" onClick="history.go(-1)" src="images/tornar.jpg">
        </blockquote></div>
        </td>
        <td align="left" valign="top" width="100">
          <br />
          <br />
          <br />
          <br />
          <a href="../desconectar.php" class="link2"><img src="images/tancar.jpg" border="0"></a>
        </td>
      </tr>
    </table>
  </body>
</html>

