<?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"
		 );

?>
<link rel="stylesheet" type="text/css" href="sty.css"/>
<HEAD>
	<style type="text/css">   
		a:link   
		{   
		text-decoration:none;   
		}   
	</style>
	<style type="text/css">th.rotate {
		/* Something you can count on */
		height: 155px;
		font-size: 8pt;
		white-space: nowrap;
		}
		th.rotatex {
		/* Something you can count on */
		height: 30px;
		font-size: 8pt;
		white-space: nowrap;
		align:left;
		}
		th.rotatexx {
		/* Something you can count on */
		height: 3px;
		font-size: 9pt;
		white-space: nowrap;
		align:left;
		}
		th.rotate > div {
		transform: 
		/* Magic Numbers */
		translate(10px, 70px)
		/* 45 is really 360 - 45 */		
		rotate(270deg);
		width: 3px;
		}
		th.rotate > div > span {
		padding: 2px 1px;

	}</style>

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="sty.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>

</head>
	<body>
		<div class="xxxdatagrid"> <table width=100%" border="1" >
            <thead>
            	
				<a href='javascript:window.print(); void 0;'>
					&nbsp;<img src="../img/planillalogo.png">
					<tr>
						<th rowspan=2>Nº</th>
						<th><font size=3>Primer Trimestre - Primario <br><font size=5>Grado: <?php echo $comodin ?> </th></font>
                        <th rowspan=2 class="rotate"><div><span>Oralidad</span></div></th>
					    <th rowspan=2 class="rotate"><div><span>Lectura</span></div></th>	
					    <th rowspan=2 class="rotate"><div><span>Escritura</span></div></th>	
					    <th rowspan=2 class="rotate"><div><span>Matemática</span></div></th>	
					    <th rowspan=2 class="rotate"><div><span>C. Sociales y Tec.</span></div></th>	
					    <th rowspan=2 class="rotate"><div><span>C. Naturales y Tec.</span></div></th>	
					    <th rowspan=2 class="rotate"><div><span>Edu. Tecnológica</span></div></th>	
					    <th rowspan=2 class="rotate"><div><span>Educación Física</span></div></th>	
					    <th rowspan=2 class="rotate"><div><span>Artes Visuales</span></div></th>	
					    <th rowspan=2 class="rotate"><div><span>Música</span></div></th>	
					    <th rowspan=2 class="rotate"><div><span>Ciudadania y Part.</span></div></th>	
					    <th rowspan=2 class="rotate"><div><span>Informática</span></div></th>	
					    <th rowspan=2 class="rotate"><div><span>Inglés</span></div></th>	
					    <th rowspan=2 class="rotate"><div><span>Faltas Justificadas</span></div></th>		
						<th rowspan=2 class="rotate"><div><span>Faltas Injustificadas</span></div></th>		
						<th rowspan=2 class="rotatex"><div><span>Domunento<br>Nacional<br> de<br> Identidad</span></div></th>
						<th rowspan=2 class="rotatex"><div><span>Observaciones</span></div></th>
					
					
					
                    
                        
					</tr>
					<tr>
						
						
						<th rowspan=1 class="texxt" align="Left"><div><span>Alumnos</span></div></th>
						
						
					</tr>
                
            </thead>
            <tbody>
            		 	<?php
				while($row = mysql_fetch_array($query))
				{
					$id = $row['id_usuario'];
					$contador++;
					?>
			        			<tr>
							        <td align="center"><?php echo $contador ?></div></td>              
                            <td><div class="texxt" align="left"  id="nombre-<?php echo $id ?>"><?php echo $row['nombre']?></div></td>
							<td><div class="texxt" align="center" id="poralidad-<?php echo $id ?>"><?php echo $row['poralidad']?></div></td>
							<td><div class="texxt" align="center" id="plectura-<?php echo $id ?>"><?php echo $row['plectura']?></div></td>
							<td><div class="texxt" align="center" id="pescritura-<?php echo $id ?>"><?php echo $row['pescritura']?></div></td>
							<td><div class="texxt" align="center" id="pmatematica-<?php echo $id ?>"><?php echo $row['pmatematica']?></div></td>
							<td><div class="texxt" align="center" id="psociales-<?php echo $id ?>"><?php echo $row['psociales']?></div></td>
							<td><div class="texxt" align="center" id="pnaturales-<?php echo $id ?>"><?php echo $row['pnaturales']?></div></td>
							<td><div class="texxt" align="center" id="pedutec-<?php echo $id ?>"><?php echo $row['pedutec']?></div></td>
							<td><div class="texxt" align="center" id="pfisica-<?php echo $id ?>"><?php echo $row['pfisica']?></div></td>
							<td><div class="texxt" align="center" id="pplastica-<?php echo $id ?>"><?php echo $row['pplastica']?></div></td>
							<td><div class="texxt" align="center" id="pmusica-<?php echo $id ?>"><?php echo $row['pmusica']?></div></td>
							<td><div class="texxt" align="center" id="pconvivencia-<?php echo $id ?>"><?php echo $row['pconvivencia']?></div></td>
							<td><div class="texxt" align="center" id="pinformatica-<?php echo $id ?>"><?php echo $row['pinformatica']?></div></td>
							<td><div class="texxt" align="center" id="pingles-<?php echo $id ?>"><?php echo $row['pingles']?></div></td>
							<td><div class="text" align="center" id="pjusti-<?php echo $id ?>"><?php echo $row['pjusti']?></div></td>
							<td><div class="text" align="center" id="pinjusti-<?php echo $id ?>"><?php echo $row['pinjusti']?></div></td>
							<td><div class="texxt"align="center" id="" ><?php echo number_format($row['dni'], 0 , '' , '.' )?></div></td>
							 <td></td>
                       
                    </tr>
					<?php
				}
				 ?>
            </tbody>
        </table>
		<img src="../img/bajoplanilla.png">
         </div>
  
	
</body>

</html>
