<link rel="stylesheet" type="text/css" href="../imprimir/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: 140px;
		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: 30px;
		font-size: 9pt;
		white-space: nowrap;
		align:left;
		}
		th.rotate > div {
		transform: 
		/* Magic Numbers */
		translate(25px, 51px)
		/* 45 is really 360 - 45 */		
		rotate(270deg);
		width: 3px;
		}
		th.rotate > div > span {
		padding: 2px 1px;

	}</style>
	<meta name="contenido" content="text/html;" http-equiv="content-type" charset="utf-8">

		<?php
	$comodin = $_POST['imprimir'];
	
	include("../conexion.php");
	$query = mysql_query("SELECT * FROM alumnos where grado = '$comodin' order by nombre asc", $cn);
	$contador = 0;
			
			
	?>
	


		<div id="muestra">
			<div class="xxxxxxxdatagrid">
				<table id="table">
<body>
					<tbody>
						<?php
					while($row = mysql_fetch_array($query))
					{
						$id = $row['id_usuario'];
						$contador++;
						?>
							
								
							
						<table width="100%" border="1"  >
						
							<tr>
								<th align="Left" colspan="20" scope="col">
									<a href='javascript:window.print(); void 0;'>
									&nbsp;<img src="../img/logoita.png" width="210" height="40">
										<font size=2>Nome dello studente: <?php echo $row['nombre']?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;					
											Classe: Primaria&nbsp;-&nbsp;<?php echo $row['grado']?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
											Documento di Valutazione - Anno: 2016</font></tr>
									    <tr>
									    
										<th class="rotatex" rowspan="3"><div><span>Materie</span></div></th>
										</tr>
										<tr>
										<th class="rotatex" colspan="3"><div><span>TRIMESTRE</span></div></th>
										<th class="rotatex" rowspan="19"><div><span>&nbsp;&nbsp;&nbsp;</span></div></th>
											<th class="rotatex" colspan="4"><div><span>Rilevazione dei progressi - Primo trimestre</span></div></th>
																												
										</tr>
									   	<th class="rotatex"><div><span>1º</span></div></th>
										<th class="rotatex"><div><span>2º</span></div></th>
										<th class="rotatex"><div><span>3º</span></div></th>
										<th class="rotatex" rowspan="4" align="left"><div><span><textarea align="left" rows="10" name="S2" cols="100%" style="border: none; resize:none;"><?php echo($row['primo'])?></textarea></span></div><br>
										<img src="../img/firmas.png"></th>
										
											
										</tr>
										
									
										<tr>
										     <th height="1" align="left" class="rotatexx" cols="1">&nbsp; &nbsp;ITALIANO ORALE</th>
										     <td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["pitaora"];
												$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
											$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
											<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["sitaora"];
												$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
											$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
											<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["titaora"];
												$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
											$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										</tr>
                                        <tr>	
											<th height="1" align="left" class="rotatexx" cols="1">&nbsp; &nbsp;ITALIANO SCRITTO</th>
											<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["pitascritto"];
												$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
											$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
											<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["sitascritto"];
												$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
											$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
											<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["titascritto"];
												$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
											$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										</tr>
									    <tr>	
										<th height="1" align="left" class="rotatexx" cols="1">&nbsp; &nbsp;STORIA</th>
											<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["pstoria"];
												$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
											$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
									    	<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["sstoria"];
											$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
										    $resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										    <td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["tstoria"];
											$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
										    $resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
											
										</tr>	
									   	
										<tr>	
								<th height="1" align="left" class="rotatexx" cols="1">&nbsp; &nbsp;GEOGRAFIA</th>
								<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["pgeografia"];
									$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
								$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
								<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["sgeografia"];
									$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
								$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
								<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["tgeografia"];
									$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
								$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
								<th class="rotatex" colspan="3"><div><span>Rilevazione dei progressi - Secondo trimestre</span></div></th>
								
								
										</tr>	
									<tr>	
										<th height="1" align="left" class="rotatexx" cols="1">&nbsp; &nbsp;SCIENZE</th>
											<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["pscienze"];
												$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
											$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
									    	<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["sscienze"];
											$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
										    $resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										    <td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["tscienze"];
											$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
										    $resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										<th class="rotatex" rowspan="5" align="left"><div><span><textarea align="left" rows="10" name="S2" cols="100%" style="border: none; resize:none;"><?php echo($row['secondo'])?></textarea></span></div><br>
											<img src="../img/firmas.png"></th></th>
											
									</tr>	
									<tr>	
										<th height="1" align="left" class="rotatexx" cols="1">&nbsp; &nbsp;MATEMATICA</th>
											<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["pmatematica"];
												$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
											$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["smatematica"];
											$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
										$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td> 
										<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["tmatematica"];
											$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
										$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
									</tr>	
									<tr>	
										<th height="1" align="left" class="rotatexx" cols="1">&nbsp; &nbsp;INGLESE</th>
											<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["pingles"];
												$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
											$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["singles"];
											$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
										$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["tingles"];
											$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
										$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										
									</tr>	
									<tr>	
										<th height="1" align="left" class="rotatexx" cols="1">&nbsp; &nbsp;L. S. SPAGNOLO ORALE</th>
											<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["poralidad"];
												$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
											$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["soralidad"];
											$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
										$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["toralidad"];
											$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
										$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										
									</tr>	
								<tr>	
									<th height="1" align="left" class="rotatexx" cols="1">&nbsp; &nbsp;L. S. SPAGNOLO SCRITTO</th>
											<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["pescritura"];
												$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
											$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
									<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["sescritura"];
										$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
									$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
									<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["tescritura"];
										$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
									$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
									
									</tr>	
									<tr>	
										<th height="1" align="left" class="rotatexx" cols="1">&nbsp; &nbsp;L. S. SPAGNOLO LETTURA</th>
											<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["plectura"];
												$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
											$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["slectura"];
											$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
										$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
					        			<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["tlectura"];
							 	 	$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
							        	$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										<th class="rotatex" colspan="3"><div><span>Rilevazione dei progressi - Terzo trimestre</span></div></th>
										
									</tr>
							<tr>	
									<th height="1" align="left" class="rotatexx" cols="1">&nbsp; &nbsp;CORPO, MOVIMENTO, SPORT</th>
											<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["pfisica"];
												$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
											$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
									<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["sfisica"];
										$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
									$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
									<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["tfisica"];
										$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
									$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
								<th class="rotatex" rowspan="5" align="left"><div><span><textarea align="left" rows="10" name="S2" cols="100%" style="border: none; resize:none; "><?php echo($row['terzo'])?></textarea></span></div><br>
								<img src="../img/firmas.png"></th></th>
							</tr>
							<tr>	
								<th height="1" align="left" class="rotatexx" cols="1">&nbsp; &nbsp;ARTE E IMMAGINE</th>
								<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["pplastica"];
									$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
								$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
								<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["splastica"];
									$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
								$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
								<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["tplastica"];
							 	 	$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
								$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>							
									<tr>	
										<th height="1" align="left" class="rotatexx" cols="1">&nbsp; &nbsp;MUSICA</th>
											<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["pmusica"];
												$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
											$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["smusica"];
											$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
										$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["tmusica"];
											$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
										$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
									</tr>	
									<tr>	
										<th height="1" align="left" class="rotatexx" cols="1">&nbsp; &nbsp;INFORMATICA</th>
											<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["pinformatica"];
												$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
											$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["sinformatica"];
											$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
										$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["tinformatica"];
											$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
										$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
									</tr>	
									<tr>	
										<th height="1" align="left" class="rotatexx" cols="1">&nbsp; &nbsp;COMPORTAMENTO</th>
		             				 	  	<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["pcorpo"];
												$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
											$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["scorpo"];
											$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
										$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										<td height="1" align="center" class=estilotextarea  cols="1"><?php $str = $row["tcorpo"];
											$a = array('E','MB','B','S','NS'); $b = array('O','D','B','S','NS');																																										
										$resultado = str_replace($a,$b,$str); echo "" . $resultado;?></td>
										</tr>
							
									    <tr>
										<th textarea align="left" colspan="4" rowspan="4"><img src="../img/itaabajo.png"></textarea>
										<th textarea align="left" colspan="4" rowspan="4"><img src="../img/f4.png"></textarea>
										</tr>
								        </table>

										<div class="saltopagina"/>
									</a>
								
							</div>
						</div>
					</div>
					<?php
		}
		?>
				</tbody>
			</table>
		</HEAD>
	</body>
</html>
