<?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>Cercar novetats</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");
          ident();
          autoritzar($_COOKIE["login"], "novetats");
          $link=Conectar();
        ?>
        <h2>Administració Novetats: Cercar</h2>
        <table border=0 width="190"><tr>
        <td align="center"><a href="cercar.php?lang=cat"><img src="images/catala.jpg" border=\"0\"></a></td>
        <td align="center"><a href="cercar.php?lang=en"><img src="images/english.jpg" border=\"0\"></a></td>
        <td align="center"><a href="cercar.php?lang=es"><img src="images/castellano.jpg" border=\"0\"></a></td>
        </tr></table>
        <br>
        <?php
              $lang = $_REQUEST["lang"];
              echo "Cercar a les taules de l'idioma: ";
              if ($lang == "es") {
                echo "Castellano";
              } else if ($lang == "en") {
                echo "English";
              } else {
                echo "Català";
              }
        ?>
        <br><br>
        <form action="cercardb.php" method="post">
          <b>Per titol:</b><br>
          <input name="titol" size="75" maxlength="100" type="text">
          <input type="hidden" name="type" value="titol">
          <input type="image" src="images/cercar.jpg" border=\"0\"><br>
          <input type="hidden" name="lang" value="<?php echo $lang; ?>">
        </form>
        <form action="cercardb.php" method="post">
          <b>Per contingut:</b><br>
          <input name="contingut" size="75" maxlength="100" type="text">
          <input type="hidden" name="type" value="contingut">
          <input type="image" src="images/cercar.jpg" border=\"0\"><br>
          <input type="hidden" name="lang" value="<?php echo $lang; ?>">
        </form>
        <br><br>
        <td><br><a href="../login.php"><input type="image" src="images/tornar.jpg" border="0"></a></td>
        </blockquote></div>
        </td>
      </tr>
    </table>
  </body>
</html>

