<?php

# filename for download
$filename = "Planilla_Por_Mensajero" . date('Ymd') . ".xls";
header('Content-type: application/vnd.ms-excel');
header ("Content-Disposition: attachment; filename=\"$filename\"");
header("Pragma: no-cache");
header("Expires: 0");

echo "<table border=1> ";
?>

<tr>
<td colspan="6"><div align="center">..:: REPORTE PLANILLA POR MENSAJERO <? echo $_SESSION['exp_mensajero'];?> ::..</div></td>
</tr>
<tr>
<td colspan="6"><div align="center">..:: FECHAS CONSULTADAS <? echo $_SESSION['fec_ini']." ".$_SESSION['fec_fin'];?> ::..</div></td>
</tr>
<td valign=top  width="60">Planilla</td>
<td valign=top  width="60">Cargadas</td>
<td valign=top  width="60">Entregas</td>
<td valign=top  width="60">Devolucines</td>
<td valign=top  width="60">Pendientes</td>
<?php
$cnt=count($_SESSION['exp_planillas']);

for ($ytr=0;$ytr<=$cnt;$ytr++){
	echo "<tr>";
	echo "<td>".$_SESSION['exp_planillas'][$ytr]."</td>";
	echo "<td>".$_SESSION['exp_cargadas'][$ytr]."</td>";
	echo "<td>".$_SESSION['exp_entregadas'][$ytr]."</td>";
	echo "<td>".$_SESSION['exp_devoluciones'][$ytr]."</td>";
	echo "<td>".$_SESSION['exp_devoluciones'][$ytr]."</td>";
	echo "<td>";
}
echo "</table> ";
?>