Ne var ne yoksa array() elemanı yaptım, çalıştırdım, böyle daha iyi oldu sanırım.

İlhamı ksort() yerine rsort() kullanmam gerektiğini anlayıp rsort() örneklerine bakınca aldım.


// get file list
function get_file_list($file_path) 
{
	global $path;
    $opendir = opendir($file_path);
    while ( gettype($file = readdir($opendir) ) != boolean ) 
	{
        if ( is_file("$file_path/$file") && ($file !='index.html') && ($file !='index.htm') && ($file !='.htaccess') ) 
		{
			$title = $file;
			$file = $file_path . $file;
			$files[] = array(
				'last_modified' => turkce_tarih(filemtime($file)),
				'file' 			=> $file,
				'title'			=> $title,
				'filesize' 		=> get_filesize(filesize($file)),
				'md5_file'		=> md5_file($file)
			);
			// debug
			//print_r(array_values($dizi_file));
        }
    }
    closedir ($opendir);
	if ($files)
	{
		rsort($files); #sorts by filemtime
		#done! Show the files sorted by modification date
		foreach ($files as $file)
		{
			//echo "$file[last_modified] $file[1]<br />\n";
			echo '<ul class="detals_list">';
			echo '	<li><strong>' . $file[last_modified] . '</strong></li>';
			echo '	<li class="download"> <strong><a href="' . $file[file] . '" title="' . $file[title] . '">İndir</a></strong> [' . $file[filesize] . ']</li>';
			echo '	<li><span class="gensmall" style="color:gray">' . $file[md5_file] . '</span></li>';
			echo '</ul>';
		}
	}
}