Thanx man!
take a look at the script working π
http://www.xgn.com.br/ls.php
Now.. the code
<?php
<?php
function ls ($curpath,$subdir) {
$dir = dir($curpath . "/" . $subdir);
echo("<b>$curpath</b>");
echo "<blockquote>";
while ($file = $dir->read()) {
if($file != "." && $file != "..") {
if (is_dir($curpath.$file)) {
ls($curpath.$file."/");
} else {
echo("$file<br>");
$file_array[] = $file;
}
}
}
$dir->close();
echo "</blockquote>";
return $file_array;
}
$startpath = "/home/xgncom/public_html/";
$subdir = "photo/pictures/cs-s/";
$rows = array();
$rows = ls($startpath,$subdir);
$rows_count = count($rows);
$count = 0;
$ext = substr($array, -3);
for ($i = 0; $i <= $rows_count; $i++) {
if($count > 4) {
echo '<br />';
$count = 1;
}
else $count++;
$ext = substr($rows[$i], -3);
if ($ext == "jpg" or $ext == "gif") {
echo '<a href="' . $subdir . $rows[$i] . '"<img border="0" src="' . $subdir . '_thm/thm_' . $rows[$i] . '"></a>';
}
}
?>
I still have to fix some things like just showing images files etc.
Man.. this thing looks stupid but it will save a lot of time π
I ll make a kind of gallery script with this thing...
Then i just have to upload all the files with the thumbs (batching it with fireworks is a piece of cake) then run it
π