<?php
/**
 * Crucigramas - crucigramas1a.php
 * 
 * @author    Bartolomé Sintes Marco <bartolome.sintes+mclibre@gmail.com>
 * @copyright 2009 Bartolomé Sintes Marco
 * @license   http://www.gnu.org/licenses/agpl.txt AGPL 3 or later
 * @version   2009-05-27
 * @link      http://www.mclibre.org
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

$enunciadoX = array (
    1 => "Conseguir en una elección todos los puestos.", 
    2 => "Árbol.", 
    3 => "Máquina que sirve para medir el tiempo.", 
    4 => "Atrevido.", 
    5 => "Que no tienen sal.");
$enunciadoY = array (
    1 => "Ciertos números.", 
    2 => "Gordo.", 
    3 => "Raquetas de madera.", 
    4 => "Electrodo positivo.", 
    5 => "Ciertos colores.");
$anchoCelda = 30;
$altoCelda  = 30;

print "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?"."> 
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"
       \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\">
<head>
  <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />
  <title>Crucigramas (Formulario). Exámenes. PHP. Bartolomé
  Sintes Marco</title>
  <link href=\"mclibre_php_soluciones.css\" rel=\"stylesheet\" type=\"text/css\" 
  title=\"Color\" />
  <style type=\"text/css\">
    td { text-align: center; } 
    td.cuadro { border: black 1px solid; 
      height: {$altoCelda}px; width: {$anchoCelda}px; }
  </style>
</head>
<body>

<h1>Crucigramas (Formulario)</h1>

<p>Resuelve este crucigrama rellenando las casillas.</p>\n";

print "<form action=\"crucigramas_1b.php\" method=\"get\">
  <table border=\"1\" rules=\"groups\">
    <colgroup></colgroup>\n    <tbody>\n      <tr>\n        <td></td>\n";
foreach ($enunciadoY as $valor) {
    print "        <td>$valor</td>\n";
}
print "      </tr>\n    </tbody>\n    <tbody>\n";
for ($i=1; $i<=count($enunciadoX); $i++) {
    print "      <tr>\n";
    print "        <td>$enunciadoX[$i]</td>\n";
    for ($j=1; $j<=count($enunciadoY); $j++) {
        print "        <td class=\"cuadro\"><input type=\"text\" ".
            "name=\"c[$i][$j]\" size=\"2\" maxlength=\"1\" /></td>\n";
    }
    print "      </tr>\n";
}
print "    </tbody>\n  </table>
  <p class=\"der\">
    <input type=\"submit\" value=\"Corregir\" /> 
    <input type=\"reset\" value=\"Borrar\" name=\"Reset\" /></p>
</form>

<address>
  Esta página forma parte del curso \"Páginas web con PHP\" disponible en <a
  href=\"http://www.mclibre.org/\">http://www.mclibre.org</a><br />
  Autor: Bartolomé Sintes Marco<br />
  Última modificación de esta página: 27 de mayo de 2009
</address>
<p class=\"licencia\">El programa PHP que genera esta página está bajo 
<a rel=\"license\" href=\"http://www.gnu.org/licenses/agpl.txt\">licencia AGPL 3 o
posterior</a>.</p>
</body>
</html>";
?>
