Ver Mensaje Individual
  #16 (permalink)  
Antiguo 19/07/2012, 13:53
harpy
 
Fecha de Ingreso: febrero-2004
Ubicación: Buenos Aires
Mensajes: 20
Antigüedad: 20 años, 2 meses
Puntos: 0
Respuesta: Ordenar informe en PHP

Claro que si, buen provecho:

<?
function fechabien($fecha)
{
return substr($fecha, 8, 2)."/".substr($fecha, 5, 2)."/".substr($fecha, 0, 4)." ".substr($fecha, 11, 8);
}

function titulos($regis)
{
echo "<br><br><hr size='4'>";
echo "Institución: <b>".$regis[2];
if ( trim( $regis[3]) != "") echo " - ".$regis[3];
echo "</b><br>";
echo "Fecha inscripción: ".fechabien( $regis[0])."<br>";
echo "Dirección IP: ".$regis[1]."<br>";
echo "Correo electrónico: <a href='enviarmail.php?xpara=$regis[4]' target='_blank'>$regis[4]</a><br>";
echo "Tel.: ".$regis[5]." - Fax: ".$regis[6]."<br>";
echo "<hr align='left' width='80%' size='1'>";
echo "<u>Inscriptos:</u><br>";
}


?>

<HTML>
<META NAME="Author" CONTENT="EstiloDW">
<HEAD>
<TITLE>Listado de inscripciones al XVIII Congreso RAS - Ordenado por fecha -
<? echo date("j/m/Y (H:i)"); ?></TITLE>
<STYLE>
BODY {
font-family: Arial;
font-size: 12pt;
color: 0000A0;
margin-top: 10 px;
background-color: #FFFFFF;
}
.Estilo4 {
font-size: 14px;
font-weight: bold;
}
.Estilo6 {
font-size: 14pt;
font-weight: bold;
}
.Estilo10 {font-size: 14}
.Estilo12 {font-size: 12px}
</STYLE>
</HEAD>
<!----------------------------------------------------->
<BODY TEXT=0000A0 >

<!--------------TABLA Encabezado --------------->
<table border="0" cellspacing="5" cellpadding="0">
<tr>
<td width="183" height="103"><img src="logo-mnes.jpg" alt="" width="170" height="91"></td>
<td width="319"><table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td valign="top" class="Estilo7"><p class="Estilo7"><span class="Estilo27"><strong class="Titulo_10">XVIII CONGRESO RAS</strong><br>
<em><strong>Tu protecci&oacute;n. Siempre </strong></em> <br>
<strong>Posadas Misiones Argentina </strong><br>
<strong class="Titulo_10"> 30 y 31 agosto 2012</strong></span><br>
<a href="mailto:[email protected]. ar; [email protected]" target="_blank">[email protected] om.ar</a><br>
<a href="http://www.rascomra.com.ar/" target="_blank">www.rascomra.com.ar</a><br>
</p></td>
</tr>
</table></td>
</tr>
</table>
<HR>

<?
echo "<center>";
echo "<h2>Listado de inscripciones al " .date("j/m/Y (H:i)"). "</h2>";
echo "<h4>Ordenado por fecha de inscripción</h4>";
echo "</center>";

$archivo = file("datos2.txt");
$registro = split( ";", $archivo[0]);
print_r($registro);
$control = $registro[0];
titulos($registro);
for ($i=0; $i<count($archivo); $i++)
{
$registro = split( ";", $archivo[$i]);
if ($registro[0] != $control)
{
$control = $registro[0];
titulos($registro);
}
echo "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp";
echo $registro[7].") ".$registro[8].", ".$registro[9]." (".$registro[10].")<br>";
}

echo "<hr>";

$registro = array(
$archivo[3], $archivo[10], $archivo[11]
);


?>

<hr>
</BODY>
</HTML>