<?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>Afegir Deiminari</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"], "deiminaris");
         ?>
        <h2>Administració Deiminaris: Afegir</h2>
        <form action="preview.php" method="post">
          <b>Títol:</b><br>
          <input name="titol" size="65" maxlength="100" type="text"><br><br>
          <b>Autor:</b><br>
          <input name="encarregat" size="65" maxlength="100" type="text"><br><br>
          <b>Institució:</b><br>
          <input name="institucio" size="65" maxlength="100" type="text"><br><br>
          <b>Departament:</b><br>
          <input name="departament" size="65" maxlength="100" type="text"><br><br>
          <table border="0">
          <tr>
            <td><b>Dia</b><br></td>
            <td>&nbsp;&nbsp;<b>Mes</b><br></td>
            <td>&nbsp;&nbsp;<b>Any</b><br></td>
            <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Hora</b><br></td>
            <td>&nbsp;&nbsp;<b>Minuts</b><br></td>
          </tr>
          <tr>
            <td><input name="dia" size="2" maxlength="2" type="text"><br><br></td>
            <td>&nbsp;&nbsp;
            <select name="mes">
              <option>Gen</option>
              <option>Feb</option>
              <option>Mar</option>
              <option>Abr</option>
              <option>Mai</option>
              <option>Jun</option>
              <option>Jul</option>
              <option>Ago</option>
              <option>Set</option>
              <option>Oct</option>
              <option>Nov</option>
              <option>Dec</option>
            </select>
            <br><br></td>
            <?php $data = getdate(); ?>
            <td>&nbsp;&nbsp;<input name="any" size="4" maxlength="4" type="text"
            value="<?php echo $data["year"]; ?>"><br><br></td>
            <td>&nbsp;&nbsp; - &nbsp;&nbsp;<input name="hora" size="2" maxlength="2"
            type="text" value="12"><br><br></td>
            <td>&nbsp;&nbsp;<input name="minuts" size="2" maxlength="2" type="text"
            value="00"><br><br></td>
          </tr>
          </table>
	  <input type="checkbox" name="nodata" value="true">Data sense determinar<br><br>
          <b>Lloc:</b><br>
          <input name="lloc" size="65" maxlength="100" type="text" value="Sala de DEIMinaris (Laboratori de recerca 134)"><br><br>
          <b>Obert a:</b><br>
          <input name="obert_a" size="65" maxlength="100" type="text" value="Professors i alumnes"><br><br>
          <table border="0" >
          <tr>
            <td><b>Idioma:</b><br></td>
            <td>&nbsp;&nbsp;<b>Cicle:</b> <i>Només primer any</i><br></td>
          </tr>
          <tr>
            <td>
            <select name="idioma">
              <option>Català</option>
              <option>Castellà</option>
              <option>Anglés</option>
              <option>Francés</option>
              <option>Alemany</option>
              <option>No especificat</option>
            </select>
            <br><br></td>
            <td>&nbsp;&nbsp;
            <?php
              $link=Conectar();
              $result=mysql_query("select max(cicle) from deiminaris where data<'9999-12-31'");
              $row = mysql_fetch_array($result);
              mysql_free_result($result);
            ?>
            <input name="cicle" size="4" maxlength="4" type="text" value="<?php echo
            substr($row["max(cicle)"], 0, 4);?>"><br><br></td>
          </tr>
          </table>
          <b>Resum:</b> <i>Insertar en format <a href="../ajuda/html.php">HTML</a></i><br>
          <textarea name="resum" cols="65" rows="15"></textarea><br><br>
          &nbsp;&nbsp;<input type="image" border=0 src="images/vistaprevia.jpg">
        </form>
        <input type="image" src="images/tornar.jpg" onClick="history.go(-1)">
        </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>

