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

        <!-- Començament del cos -->
        <?php 
          require("../private/connect.inc");
          require("../private/func.inc");
        ?>
        <h2><?php echo $text[TesiCercar]; ?></h2>
        <form action="cercardb.php" method="post">
          <b><?php echo $text[PerTitol]; ?>:</b><br>
          <input name="titol" size="75" maxlength="100" type="text">
          <input type="hidden" name="type" value="titol">
          <input type="image" src="images/<?php echo $lang . "/"; ?>cercar.jpg" border=\"0\"><br>
        </form>
        <form action="cercardb.php" method="post">
          <b><?php echo $text[PerClau]; ?>:</b><br>
          <input name="keywords" size="75" maxlength="100" type="text">
          <input type="hidden" name="type" value="keywords">
          <input type="image" src="images/<?php echo $lang . "/"; ?>cercar.jpg" border=\"0\"><br>
        </form>
        <form action="cercardb.php" method="post">
          <b><?php echo $text[PerAssigRel]; ?>:<b><br>
          <input name="assignatures_rel" size="75" maxlength="100" type="text">
          <input type="hidden" name="type" value="assignatures_rel">
          <input type="image" src="images/<?php echo $lang . "/"; ?>cercar.jpg" border=\"0\"><br>
        </form>
        <form action="cercardb.php" method="post">
          <b><?php echo $text[PerDirector]; ?>:</b><br>
          <select name="id">
          <?php
            $link=Conectar();
            $result=mysql_query("SELECT nom FROM personal ORDER BY nom");
            // Si nomes pot modificar les seves tesis, al afegir una tesis ell ha de ser 1
            // dels directors
              while($row = mysql_fetch_array($result)){
                echo "<option>" . $row["nom"] . "</option>";
              }
            mysql_free_result($result);
          ?>
          </select>
          <input type="hidden" name="type" value="id">
          <input type="image" src="images/<?php echo $lang . "/"; ?>cercar.jpg" border=\"0\"><br>
        </form>
        <form action="cercardb.php" method="post">
          <b><?php echo $text[PerCategoria]; ?>:</b><br>
          <select name="categoria">
          <?php
            $result=mysql_query("SELECT titol FROM categories");
            while($row = mysql_fetch_array($result)){
              echo "<option>" . $row["titol"] . "</option>";
            }
            mysql_free_result($result);
          ?>
          </select>
          <input type="hidden" name="type" value="categoria">
          <input type="image" src="images/<?php echo $lang . "/"; ?>cercar.jpg" border=\"0\" ><br>
        </form>
        <br><br>
        <input type="image" onClick="history.go(-1)" src="images/<?php echo $lang . "/"; ?>tornar.jpg">
        </blockquote></div>
        </td>
      </tr>
    </table>
  </body>
</html>

