Exemplo n.º 1
0
 function ReadImages($imagePath, $folderPath, &$folders, &$images)
 {
     jimport('joomla.filesystem.folder');
     $imgFiles = JFolder::files($imagePath);
     if (!empty($imgFiles)) {
         foreach ($imgFiles as $file) {
             $ff_ = $folderPath . DS . $file;
             $ff = $folderPath . DS . $file;
             $i_f = $imagePath . '/' . $file;
             if (is_dir($i_f) && $file != 'CVS' && $file != '.svn') {
                 $folders[] = JHTML::_('select.option', $ff_);
                 mailingsHTML::ReadImages($i_f, $ff_, $folders, $images);
             } else {
                 if (eregi("bmp|gif|jpg|png", $file) && is_file($i_f)) {
                     // leading / we don't need
                     $imageFile = substr($ff, 1);
                     $images[$folderPath][] = JHTML::_('select.option', $imageFile, $file);
                 }
             }
         }
     }
     //endif
 }