"; //print_r($results); //echo ""; $tab = listing_fichier_repertoire('backup'); for($i=0; $i < count($tab); $i++) { $tab_fichier = $tab[$i][0]; $tab_ts[] = $tab[$i][1]; } $tab_sort = $tab_ts; sort($tab_sort); $tab_reverse = array_reverse($tab_sort); for($i=0; $i < count($tab); $i++) { $element = $tab_reverse[$i]; $position = array_search($element, $tab_ts); //echo '

'; $file = $tab[$position][0]; //echo $position ." " .$tab[$position][0] ." " .filesize($file); $tab_affiche[$i][0] = $tab[$position][0]; $tab_affiche[$i][1] = filesize($file); } echo ""; echo " "; for($i=0; $i < count($tab_affiche); $i++) { $j = $i + 1; echo ""; //echo ''; echo ''; $b = ''; echo ""; $blabla = $tab_affiche[$i][0]; $blabla = $results[$i][0]; echo ""; echo ""; echo ""; echo ''; } echo "
Id Fichier backup Taille en octets Voir Editer Importer
" .$j ."'; //echo '' .$tab_affiche[$i][0] .''; //'; //echo $tab_affiche[$i][0]; echo $results[$i][0]; //echo ' echo '" .$results[$i][1] .""; echo ""; echo ""; echo "
"; ?> "; //print_r($date_pieces); $timestamp = mktime ($heure_tab[0], $heure_tab[1], $heure_tab[2], $mois, $jour, $annee); $ts_difference = $ts_actuel - $timestamp; $ts_7jours = 7 * 24 * 3600; if($ts_difference >= $ts_7jours) { //echo $file ." ---- " .$format ." " .$ts ." trop ancien" ; //chdir("sauvegarde_echec"); //unlink($file); $coco = 5; } $results[$cpt][0] = $file; $results[$cpt][1]= $timestamp; $results[$cpt][2]= filesize($file); $cpt = $cpt + 1; } } chdir("backup"); closedir($handler); return $results; } ?>