<?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>Modificar link</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>
        <h2>Administració Links: Modificar</h2>
        <!-- Començament del cos -->
        <?php require("../private/connect.inc");
              require("../private/ident.inc");
              ident();
      	      autoritzar($_COOKIE["login"], "novetats");
              $link=Conectar();
              $result=mysql_query("SELECT * FROM links ORDER BY pos DESC", $link);
              $num=0;
              while($row = mysql_fetch_array($result)){
                echo "<br><b>Slot " . $row["pos"] . "</b><br>";
                echo("<form action=\"modificardb.php\" method=\"post\"><input
                       type=\"hidden\" name=\"pos\" value=\"" . $row["pos"] . "\">");
                echo "<b>Info:</b><br>";
                echo "<input name=\"info\" size=\"20\" maxlength=\"20\" type=\"text\" value=\"" . $row["info"] .
                "\"><br><br>";
                echo "<b>link:</b><br>";
                echo "<input name=\"link\" size=\"65\" maxlength=\"200\" type=\"text\" value=\"" . $row["link"] .
                "\"><br><br>";
                
                echo("&nbsp;&nbsp;<input type=\"image\" border=0 src=\"images/modificar.jpg\"></form>");
              }
              mysql_free_result($result);
        ?>
        <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>

