<?php
include("../fnc.php");

$strFileName="listado_alumnos.xls";
header ("Content-Disposition: attachment; filename=".$strFileName."\n\n");
header ("Content-Type: application/octet-stream");
header("Pragma: no-cache");
header("Expires: 0");

?>
<table>
<tr>
<td>CARNET</td>
<td>APELLIDOS</td>
<td>NOMBRES</td>
<td>GRADO</td>
<td>SECCION</td>
<td>CLAVE P</td>
<td>CLAVE A</td>
</tr>
<?
$q=runsql("select * from alumnos where year_estudio = 2012 order by grado_estudio, seccion, apellido, nombre") or die(mysql_error());
while($i=mysql_fetch_array($q)){
?>
<tr>
<td><?=$i[carnet];?></td>
<td><?=$i[apellido];?></td>
<td><?=$i[nombre];?></td>
<td><?=ggrado(enc($i[grado_estudio]));?></td>
<td><?=$i[seccion];?></td>
<td><?=base64_decode($i[clave_web]);?></td>
<td><?=base64_decode($i[clave]);?></td>
</tr>
<?
}
?>
</table>
