Problem z szeregowaniem według nazw
Witam
mam taki skrypt do galerii zdjęć:
<?
header("Cache-Control: no-store, no-cache, must-revalidate");
require('./sp_conf.php');
include $gheader;
$header_html = str_replace('{NAME}', $gallery_name, $header_html); $header_html = str_replace('{DOWNLINK}', 'http://www.adresstrony.pl/', $header_html); $header_html = str_replace('{AUTHORLINK}', 'http://www.adresstrony.pl/', $header_html); $header_html = str_replace('{BACKLINK}', $back_link, $header_html); $header_html = str_replace('{CLOSELINK}', $close_link, $header_html); $header_html = str_replace('{COPYRIGHT}', $copyright, $header_html); $header_html = str_replace('{HOMELINK}', $home_link, $header_html);
if ( !$dp )
{
echo "Opening directory " . $directory . " <b>failed</b>. Incorrect path?"; echo "n<br />I cannot go on any longer. I'm sorry. I tried.n<br />"; }
else
{
'jpg',
'jpeg',
'gif',
'png',
'bmp',
'tiff',
'tif',
'psd'
);
require($glayout);
$i=1;
$x=1;
{
$theline = $line;
$name = strrev($fileparts[1
]); {
if ( $x == 1 )
{
}
$image_url = './sp_images.php?size=' . $max_size . '&filename=' . $filename . '&action=thumb';
$theline = str_replace('{IMAGE_URL}', $image_url, $theline); if ( $spoofing )
{
$link = './sp_images.php?filename=' . $filename . '&action=spoof';
}
else
{
$link = $images_uri . $filename;
}
$num = $x;
$theline = str_replace('{FILENAME}', $filename, $theline); $theline = str_replace('{DOWNLINK}', 'http://www.adresstrony.pl/', $theline); $theline = str_replace('{AUTHORLINK}', 'http://www.adresstrony.pl/', $theline);
if ( $x == (int)$per_row )
{
$x=1;
}
else
{
$x++;
}
$i++;
}
}
$terminate_leftover = str_replace('{DOWNLINK}', 'http://www.adresstrony.pl/', $terminate_leftover); $terminate_leftover = str_replace('{AUTHORLINK}', 'http://www.adresstrony.pl/', $terminate_leftover); $terminate_leftover = str_replace('{NUMLEFT}', (($per_row-$x)+1
), $terminate_leftover); echo $terminate_leftover; }
include $gfooter;
$footer_html = str_replace('{NAME}', $gallery_name, $footer_html); $footer_html = str_replace('{DOWNLINK}', 'http://www.adresstrony.pl/', $footer_html); $footer_html = str_replace('{AUTHORLINK}', 'http://www.adresstrony.pl/', $footer_html); $footer_html = str_replace('{BACKLINK}', $back_link, $footer_html); $footer_html = str_replace('{CLOSELINK}', $close_link, $footer_html); $footer_html = str_replace('{COPYRIGHT}', $copyright, $footer_html); $footer_html = str_replace('{HOMELINK}', $home_link, $footer_html);
?>
co zrobić zeby zdjęcia ustawiały mi się według nazw

?
001.jpg
002.jpg
itd a nie losowo,
prosze o pomoc