1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
<?php
$image = "https://pcyt85vm.pcy.fr:8443/reporting/patrol/auto/csv/images/logo1.png";
$image2 = "https://pcyt85vm.pcy.fr:8443/reporting/patrol/auto/csv/images/logo2.png";
$image3 = "https://pcyt85vm.pcy.fr:8443/reporting/patrol/auto/csv/images/logo3.png";
print '<img src="'.$image.'" alt="texte alternatif" />';
print '<img src="'.$image2.'" alt="texte alternatif" />';
print '<img src="'.$image3.'" alt="texte alternatif" />';
echo "<table border='1'>\n";
echo "<h2>Alarmes sur container T3NA</h2>" ;
echo "<table border='1'>\n";
$fichier = "patrol_auto_t3na_".$_GET['datereport'].".csv";
$fic = fopen($fichier, 'rb');
$nb_lignes=0; //Init du nombre de lignes
$nb_lignes_max=1000; //On parametre ici le nombre max de lignes a afficher
$nb_colonnes_max=100; //On parametre ici le nombre max de colonnes a afficher
for ($ligne = fgetcsv($fic, 1024, ";"); !feof($fic); $ligne = fgetcsv($fic, 1024, ";")
) {
if($nb_lignes<$nb_lignes_max){
echo "<tr>";
$j = sizeof($ligne);
if($j>$nb_colonnes_max){$j=$nb_colonnes_max;} // On limite Ã* colonnes
for ($i = 0; $i < $j; $i++) {
echo "<td>".$ligne[$i]."</td>";
}
echo "</tr>";
}
$nb_lignes++;
}
echo "</table>\n";
?> |
Partager