Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/field.tar
Назад
terms.php 0000604 00000006324 15245535215 0006417 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage User.terms * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_PLATFORM') or die; use Joomla\CMS\Factory; use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Language\Associations; use Joomla\CMS\Language\Text; FormHelper::loadFieldClass('radio'); /** * Provides input for privacyterms * * @since 3.9.0 */ class JFormFieldterms extends JFormFieldRadio { /** * The form field type. * * @var string * @since 3.9.0 */ protected $type = 'terms'; /** * Method to get the field input markup. * * @return string The field input markup. * * @since 3.9.0 */ protected function getInput() { // Display the message before the field echo $this->getRenderer('plugins.user.terms.message')->render($this->getLayoutData()); return parent::getInput(); } /** * Method to get the field label markup. * * @return string The field label markup. * * @since 3.9.0 */ protected function getLabel() { if ($this->hidden) { return ''; } return $this->getRenderer('plugins.user.terms.label')->render($this->getLayoutData()); } /** * Method to get the data to be passed to the layout for rendering. * * @return array * * @since 3.9.4 */ protected function getLayoutData() { $data = parent::getLayoutData(); $article = false; $termsArticle = $this->element['article'] > 0 ? (int) $this->element['article'] : 0; if ($termsArticle && Factory::getApplication()->isClient('site')) { $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName(array('id', 'alias', 'catid', 'language'))) ->from($db->quoteName('#__content')) ->where($db->quoteName('id') . ' = ' . (int) $termsArticle); $db->setQuery($query); $article = $db->loadObject(); JLoader::register('ContentHelperRoute', JPATH_BASE . '/components/com_content/helpers/route.php'); if (Associations::isEnabled()) { $termsAssociated = Associations::getAssociations('com_content', '#__content', 'com_content.item', $termsArticle); } $currentLang = Factory::getLanguage()->getTag(); if (isset($termsAssociated) && $currentLang !== $article->language && array_key_exists($currentLang, $termsAssociated)) { $article->link = ContentHelperRoute::getArticleRoute( $termsAssociated[$currentLang]->id, $termsAssociated[$currentLang]->catid, $termsAssociated[$currentLang]->language ); } else { $slug = $article->alias ? ($article->id . ':' . $article->alias) : $article->id; $article->link = ContentHelperRoute::getArticleRoute($slug, $article->catid, $article->language); } } $extraData = array( 'termsnote' => !empty($this->element['note']) ? $this->element['note'] : Text::_('PLG_USER_TERMS_NOTE_FIELD_DEFAULT'), 'options' => $this->getOptions(), 'value' => (string) $this->value, 'translateLabel' => $this->translateLabel, 'translateDescription' => $this->translateDescription, 'translateHint' => $this->translateHint, 'termsArticle' => $termsArticle, 'article' => $article, ); return array_merge($data, $extraData); } } uniqueid.php 0000604 00000004407 15245535226 0007112 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage System.stats * * @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; extract($displayData); /** * Layout variables * ----------------- * @var string $autocomplete Autocomplete attribute for the field. * @var boolean $autofocus Is autofocus enabled? * @var string $class Classes for the input. * @var string $description Description of the field. * @var boolean $disabled Is this field disabled? * @var string $group Group the field belongs to. <fields> section in form XML. * @var boolean $hidden Is this field hidden in the form? * @var string $hint Placeholder for the field. * @var string $id DOM id of the field. * @var string $label Label of the field. * @var string $labelclass Classes to apply to the label. * @var boolean $multiple Does this field support multiple values? * @var string $name Name of the input field. * @var string $onchange Onchange attribute for the field. * @var string $onclick Onclick attribute for the field. * @var string $pattern Pattern (Reg Ex) of value of the form field. * @var boolean $readonly Is this field read only? * @var boolean $repeat Allows extensions to duplicate elements. * @var boolean $required Is this field required? * @var integer $size Size attribute of the input. * @var boolean $spellcheck Spellcheck state for the form field. * @var string $validate Validation rules to apply. * @var string $value Value attribute of the field. * @var array $options Options available for this field. */ ?> <input type="hidden" name="<?php echo $name; ?>" id="<?php echo $id; ?>" value="<?php echo htmlspecialchars($value, ENT_COMPAT, 'UTF-8'); ?>" /> <a class="btn" onclick="document.getElementById('<?php echo $id; ?>').value='';Joomla.submitbutton('plugin.apply');"> <span class="icon-refresh"></span> <?php echo JText::_('PLG_SYSTEM_STATS_RESET_UNIQUE_ID'); ?> </a>