/* // php4 ----------------------------------------------------------- $inc=0; if ($handle = opendir('fotomappen')) { while (false !== ($dirfile = readdir($handle))) { $dirs[$inc++] = $dirfile; } closedir($handle); } rsort($dirs); $firstdir = $dirs[0]; $inc=0; if ($handle = opendir('fotomappen/'.$firstdir)) { while (false !== ($file = readdir($handle))) { $pict[$inc++] = $file; } closedir($handle); } rsort($pict); $firstpic = 'fotomappen/'.$firstdir.'/'.$pict[2]; */ // ---------------------------------------------------------------- //php5 ----------------------------------------------------------- $rootdir = 'fotoviewer/'; include ('settings.php'); $basedir = 'fotomappen/'; $mappen = scandir($basedir,SORT_DESC); foreach ($mappen as $dirs){ if (strtolower(substr($dirs,0,1)) != '-' and $dirs != '.' and $dirs != '..' and $dirs != '_notes' and $dirs != 'Thumbs.db' and $dirs != '.DS_Store'){ $firstdir = $basedir.$dirs; break; } } /* if (file_exists($basedir.$dirs.'/Thumbs.db')){ chmod ($basedir.$dirs.'/Thumbs.db',0777); unlink ($basedir.$dirs.'/Thumbs.db'); } */ $pict = scandir($firstdir); $firstpic = $firstdir.'/'.$pict[2]; // ---------------------------------------------------------------- ?> if ($thumbpos == 1){ ?>