PATH:
home
/
centosnipponia
/
public_html
/
nipponiacom2
/
caribe
/
libraries
/
regularlabs
/
fields
<?php /** * @package Regular Labs Library * @version 16.7.10746 * * @author Peter van Westen <info@regularlabs.com> * @link http://www.regularlabs.com * @copyright Copyright © 2016 Regular Labs All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; jimport('joomla.filesystem.folder'); jimport('joomla.filesystem.file'); JFormHelper::loadFieldClass('list'); class JFormFieldRL_FileList extends JFormFieldList { public $type = 'FileList'; private $params = null; protected function getInput() { $this->params = $this->element->attributes(); return parent::getInput(); } protected function getOptions() { $options = array(); $path = $this->get('folder'); if (!is_dir($path)) { $path = JPATH_ROOT . '/' . $path; } // Prepend some default options based on field attributes. if (!$this->get('hidenone', 0)) { $options[] = JHtml::_('select.option', '-1', JText::alt('JOPTION_DO_NOT_USE', preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname))); } if (!$this->get('hidedefault', 0)) { $options[] = JHtml::_('select.option', '', JText::alt('JOPTION_USE_DEFAULT', preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname))); } // Get a list of files in the search path with the given filter. $files = JFolder::files($path, $this->get('filter')); // Build the options list from the list of files. if (is_array($files)) { foreach ($files as $file) { // Check to see if the file is in the exclude mask. if ($this->get('exclude')) { if (preg_match(chr(1) . $this->get('exclude') . chr(1), $file)) { continue; } } // If the extension is to be stripped, do it. if ($this->get('stripext', 1)) { $file = JFile::stripExt($file); } $label = $file; if ($this->get('language_prefix')) { $label = JText::_($this->get('language_prefix') . strtoupper($label)); } $options[] = JHtml::_('select.option', $file, $label); } } // Merge any additional options in the XML definition. $options = array_merge(parent::getOptions(), $options); return $options; } private function get($val, $default = '') { if (!isset($this->params[$val]) || (string) $this->params[$val] == '') { return $default; } return (string) $this->params[$val]; } }
[+]
..
[-] agents.php
[edit]
[-] ajax.php
[edit]
[-] akeebasubs.php
[edit]
[-] assignmentselection.php
[edit]
[-] block.php
[edit]
[-] checkbox.php
[edit]
[-] color.php
[edit]
[-] colorpicker.php
[edit]
[-] components.php
[edit]
[-] content.php
[edit]
[-] customfieldkey.php
[edit]
[-] customfieldvalue.php
[edit]
[-] datetime.php
[edit]
[-] dependency.php
[edit]
[-] easyblog.php
[edit]
[-] editor.php
[edit]
[-] filelist.php
[edit]
[-] flexicontent.php
[edit]
[-] form2content.php
[edit]
[-] geo.php
[edit]
[-] grouplevel.php
[edit]
[-] header.php
[edit]
[-] header_library.php
[edit]
[-] hikashop.php
[edit]
[-] hr.php
[edit]
[-] icons.php
[edit]
[-] isinstalled.php
[edit]
[-] k2.php
[edit]
[-] key.php
[edit]
[-] languages.php
[edit]
[-] license.php
[edit]
[-] list.php
[edit]
[-] loadlanguage.php
[edit]
[-] menuitems.php
[edit]
[-] mijoshop.php
[edit]
[-] modules.php
[edit]
[-] multiselect.php
[edit]
[-] note.php
[edit]
[-] password.php
[edit]
[-] plaintext.php
[edit]
[-] radioimages.php
[edit]
[-] redshop.php
[edit]
[-] regions.txt
[edit]
[-] simplecategories.php
[edit]
[-] slide.php
[edit]
[-] tags.php
[edit]
[-] templates.php
[edit]
[-] text.php
[edit]
[-] textareaplus.php
[edit]
[-] toggler.php
[edit]
[-] users.php
[edit]
[-] version.php
[edit]
[-] virtuemart.php
[edit]
[-] zoo.php
[edit]
[-] .htaccess.disabled
[edit]