path); $updir = explode('/', trim($curdir, '/')); unset($updir[sizeof($updir)-1]); $updir = implode('/', $updir); while (false !== ($entry = $d->read())) { if($entry == '..' && $d->path != DIR_FS_CATALOG_IMAGES) { $dirs[$entry] = '' . zen_image(DIR_WS_ICONS . 'previous_level.gif', ICON_PREVIOUS_LEVEL) . ' ' . $entry . ''; } if($entry == '..' || $entry == '.') continue; if (filetype($d->path . $entry) == "dir") { $dirs[$entry] = '' . zen_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . ' ' . $entry . ''; } else { $ext = explode('.', $entry); if(!in_array(end($ext), $filter)) continue; $files[$entry] = '' . zen_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW). ' ' . $entry . ''; } } $d->close(); @ksort($dirs); @ksort($files); ?> > Zen Cart!
0 ) { foreach($dirs as $k => $val) { echo $val . '
' . "\n"; } } ?>
0 ) { foreach($files as $k => $val) { echo $val . '
' . "\n"; } } ?>