Je vous montre en premier lieu mon code ..
<?php
if ($handle = opendir('video')) {
while (false !== ($tfile = readdir($handle))) {
if ($tfile != "." && $tfile != "..") {
$file = $tfile;
$tab = explode(' ',$tfile);
$datetimefile = $tab[4];
$datetimefile = explode('-',$datetimefile);
$datefile = $datetimefile[0];
list($annee, $mois, $jour) = explode(".", $datefile);
$date = $jour.'/'.$mois.'/'.$annee;
$timefile = $datetimefile[1];
list($heure, $min, $seconde) = explode(".", $timefile);
$time = $heure.'h'.$min.'min';
}
}
closedir($handle);
}
?>
A l'aide de ce code et un systeme de template (non présent dans le code) j'ai fais le listing des fichiers présent dans le repertoire video. Mais voilà j'aurais aimé classer les fichiers de par rapport à l'heure dates.Voici l'exemple d'affichage HTML
Code : Tout sélectionner
<table class="sodtable" cellspacing="1">
<tr class="sodnav1">
<th colspan="2" width="50%">Nom du fichier</th>
<th align="center" width="20%">Team</th>
<th colspan="2" align="center" width="20%">Map</th>
<th align="center" width="10%">Date</th>
</tr>
<tr>
<td class="row1" align="center"><a href="/sodium/video/--CpJ--(CT)_SδÐiنM'(T)_de_prodigy_SrcTV_2006.02.23-22.15.35.dem"><img src="images/dl.gif" border="0" alt="T�l�charger" /></a></td>
<td class="row1">--CpJ--(CT)_SδÐiنM'(T)_de_prodigy_SrcTV_2006.02.23-22.15.35.dem</td>
<td class="row1" align="center"><b>--CpJ--(CT)</b> vs <b>SδÐiنM'(T)</b></td>
<td class="row1" align="center">de_prodigy</td>
<td class="row1" align="center"><img src="/sodium/images/de_prodigy.jpg" width="90" border="0"/></td>
<td class="row1" align="center">23/02/2006<br>22h15min</td>
</tr>
<tr>
<td class="row2" align="center"><a href="/sodium/video/--CpJ--(T)_SδÐiنM'(CT)_de_prodigy_SrcTV_2006.02.23-22.32.17.dem"><img src="images/dl.gif" border="0" alt="T�l�charger" /></a></td>
<td class="row2">--CpJ--(T)_SδÐiنM'(CT)_de_prodigy_SrcTV_2006.02.23-22.32.17.dem</td>
<td class="row2" align="center"><b>--CpJ--(T)</b> vs <b>SδÐiنM'(CT)</b></td>
<td class="row2" align="center">de_prodigy</td>
<td class="row2" align="center"><img src="/sodium/images/de_prodigy.jpg" width="90" border="0"/></td>
<td class="row2" align="center">23/02/2006<br>22h32min</td>
</tr>
</table>Merci de toute votre aide.. je continu par ailleur a recherché une solution sur le site/forum et vous tien au courant de l'avancement
