
<?php 
include("conexion.php");

//Seleccionamos los registros de la tabla
	$comodin = $_POST['imprimir'];
	$query = mysql_query("SELECT * FROM alumnos WHERE grado = '$comodin'", $cn);
	$contador = 0;
	$grado = array(
	"1A"=>"1A",
	"1B"=>"1B",
	"1C"=>"1C",
	"2A"=>"2A",
	"2B"=>"2B",
	"2C"=>"2C",
	"3A"=>"3A",
	"3B"=>"3B",
	"3C"=>"3C",
	"4A"=>"4A",
	"4B"=>"4B",
	"4C"=>"4C",
	"5A"=>"5A",
	"5B"=>"5B",
	"5C"=>"5C",
	"6A"=>"6A",
	"6B"=>"6B",
	"6C"=>"6C"
	);
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

  </head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style.css"/>

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.jeditable.js"></script>
<script type="text/javascript" src="js.js"></script>


<body>
	
	<fieldset id="content">
    	<legend>Comentarios Completo</legend>
    	<div class="datagrid"><table id="table">
            <thead>
            	<tr class="head">
            		<th>N°</th>
                    <th>Grado</th>
                    <th>Alumno/a</th>
                    <th>Informática</th>
                    <th>Música</th>
                    <th>Plástica</th>
					<th>Educación Física</th>
                    <th>Inglés</th>
					<th>Castellano</th>
					
                </tr>
                
            </thead>
            <tbody>
            	<?php
				while($row = mysql_fetch_array($query))
				{
					$id = $row['id_usuario'];
					$contador++;
					?>
					
					<tr>
							          <td><?php echo $contador ?></div></td>            
                        <td><div class="texxt" id="grado-<?php echo $id ?>"><?php echo $grado[$row['grado']]?></div></td>
                        <td><div class="texxt" id="nombre-<?php echo $id ?>"><?php echo $row['nombre']?></div></td>
                        <td><div class="textarea" id="informatica-<?php echo $id ?>"><?php echo $row['informatica']?></div></td>
                        <td><div class="textarea" id="musica-<?php echo $id ?>"><?php echo $row['musica']?></div></td>
                        <td><div class="textarea" id="plastica-<?php echo $id ?>"><?php echo $row['plastica']?></div></td>
						<td><div class="textarea" id="fisica-<?php echo $id ?>"><?php echo $row['fisica']?></div></td>
                        <td><div class="textarea"  id="ingles-<?php echo $id ?>"><?php echo $row['ingles']?></div></td>
						<td><div class="textarea"  id="castellano-<?php echo $id ?>"><?php echo $row['castellano']?></div></td>
                    </tr>
					<?php
				}
				 ?>
            </tbody>
        </table>
    </fieldset>
	 </div>
</body>
</head>
</html>