AAAAhome/academiac/www/modules/mod_avatar_slide_galleria/fields/jantdropboximagefolder.php000060400000003276151375037350025541 0ustar00element['class'] ? ' class="'.(string) $this->element['class'].'"' : ''; if ((string) $this->element['readonly'] == 'true' || (string) $this->element['disabled'] == 'true') { $attr .= ' disabled="disabled"'; } $attr .= $this->element['size'] ? ' size="'.(int) $this->element['size'].'"' : ''; $attr .= $this->multiple ? ' multiple="multiple"' : ''; $attr .= $this->element['onchange'] ? ' onchange="'.(string) $this->element['onchange'].'"' : ''; $options[] = JHTML::_('select.option', '', JText::_('AVATAR_SELECT_FOLDER')); $folders = JFolder::folders($base, '.', true, true); foreach ($folders as $folder) { $folder = str_replace($base, '', $folder); $value = str_replace(DIRECTORY_SEPARATOR, '/', substr($folder, 1)); $text = str_replace(DIRECTORY_SEPARATOR, '/', $folder); $options[] = JHTML::_('select.option', $value, $text); } if (is_array($options)) { sort($options); } $html = JHtml::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id); return $html; } }