Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/color.tar
Назад
color.xml 0000604 00000001430 15245561406 0006406 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> color.php 0000604 00000005305 15245561406 0006402 0 ustar 00 <?php /** *------------------------------------------------------------------------------ * iC Library - Library by Jooml!C, for Joomla! *------------------------------------------------------------------------------ * @package iC Library * @subpackage color * @copyright Copyright (c)2014-2015 Cyril Rezé, Jooml!C - All rights reserved * * @license GNU General Public License version 3 or later; see LICENSE.txt * @author Cyril Rezé (Lyr!C) * @link http://www.joomlic.com * * @version 1.0.0 2014-05-10 * @since 1.0.0 *------------------------------------------------------------------------------ */ // No direct access to this file defined('_JEXEC') or die(); /** * class iCColor */ class iCColor { /** * Function to convert color : hexadecimal to RGB * * @access public static * @param color to be converted in hexadecimal ('#xxxxxx') * @return converted color in RGB ('xxx,xxx,xxx') * * @since 1.0.0 */ static public function hex_to_rgb($color) { if (!is_array($color) && preg_match("/^[#]([0-9a-fA-F]{6})$/",$color)) { $hex_R = substr($color,1,2); $hex_G = substr($color,3,2); $hex_B = substr($color,5,2); $RGB = hexdec($hex_R).",".hexdec($hex_G).",".hexdec($hex_B); return $RGB; } else { return false; } } /** * Function to convert color : RGB to hexadecimal * * @access public static * @param color to be converted in RGB ('xxx,xxx,xxx' or 'array(xxx,xxx,xxx)') * @return converted color in hexadecimal ('#xxxxxx') * * @since 1.0.0 */ static public function rgb_to_hex($color) { if (!is_array($color)) { $color_array = explode(",", $color); } if (is_array($color_array) and count($color_array) === 3) { $hex_RGB = ""; foreach ($color_array as $value) { $hex_value = dechex($value); if (strlen($hex_value) < 2) { $hex_value = "0".$hex_value; } $hex_RGB.=$hex_value; } return "#".$hex_RGB; } else { return false; } } /** * Function to get brightness of hexadecimal color * * @access public static * @param color in hexadecimal ('#xxxxxx') * @return string ('dark' or 'bright') * * @since 1.0.0 */ static public function getBrightness($color) { if (!is_array($color) && preg_match("/^[#]([0-9a-fA-F]{6})$/",$color) && strlen($color) == 7) { $get_RGB = iCColor::hex_to_rgb($color); $RGB = explode(",",$get_RGB); $RGBa = $RGB[0]; $RGBb = $RGB[1]; $RGBc = $RGB[2]; $sum = ($RGBa + $RGBb + $RGBc); if ($sum > '384') // Color is bright { $brightness = 'bright'; } else // Color is dark { $brightness = 'dark'; } return $brightness; } else { return false; } } } tmpl/color.php 0000604 00000000623 15245561406 0007354 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); index.html 0000604 00000000037 15245611240 0006535 0 ustar 00 <!DOCTYPE html><title></title> simple.php 0000604 00000006561 15245617075 0006566 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage Layout * * @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 $spellchec Spellcheck state for the form field. * @var string $validate Validation rules to apply. * @var string $value Value attribute of the field. * @var array $checkedOptions Options that will be set as checked. * @var boolean $hasValue Has this field a value assigned? * @var array $options Options available for this field. * @var array $checked Is this field checked? * @var array $position Is this field checked? * @var array $control Is this field checked? */ $class = ' class="' . trim('simplecolors chzn-done ' . $class) . '"'; $disabled = $disabled ? ' disabled' : ''; $readonly = $readonly ? ' readonly' : ''; // Include jQuery JHtml::_('jquery.framework'); JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9')); JHtml::_('script', 'jui/jquery.simplecolors.min.js', array('version' => 'auto', 'relative' => true)); JHtml::_('stylesheet', 'jui/jquery.simplecolors.css', array('version' => 'auto', 'relative' => true)); JHtml::_('script', 'system/color-field-init.min.js', array('version' => 'auto', 'relative' => true)); ?> <select data-chosen="true" name="<?php echo $name; ?>" id="<?php echo $id; ?>"<?php echo $disabled; ?><?php echo $readonly; ?><?php echo $required; ?><?php echo $class; ?><?php echo $position; ?><?php echo $onchange; ?><?php echo $autofocus; ?> style="visibility:hidden;width:22px;height:1px"> <?php foreach ($colors as $i => $c) : ?> <option<?php echo ($c == $color ? ' selected="selected"' : ''); ?>><?php echo $c; ?></option> <?php if (($i + 1) % $split == 0) : ?> <option>-</option> <?php endif; ?> <?php endforeach; ?> </select> advanced.php 0000604 00000010201 15245617075 0007024 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage Layout * * @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 $spellchec Spellcheck state for the form field. * @var string $validate Validation rules to apply. * @var string $value Value attribute of the field. * @var array $checkedOptions Options that will be set as checked. * @var boolean $hasValue Has this field a value assigned? * @var array $options Options available for this field. * @var array $checked Is this field checked? * @var array $position Is this field checked? * @var array $control Is this field checked? */ if ($validate !== 'color' && in_array($format, array('rgb', 'rgba'), true)) { $alpha = ($format === 'rgba'); $placeholder = $alpha ? 'rgba(0, 0, 0, 0.5)' : 'rgb(0, 0, 0)'; } else { $placeholder = '#rrggbb'; } $inputclass = ($keywords && ! in_array($format, array('rgb', 'rgba'), true)) ? ' keywords' : ' ' . $format; $class = ' class="' . trim('minicolors ' . $class) . ($validate === 'color' ? '' : $inputclass) . '"'; $control = $control ? ' data-control="' . $control . '"' : ''; $format = $format ? ' data-format="' . $format . '"' : ''; $keywords = $keywords ? ' data-keywords="' . $keywords . '"' : ''; $validate = $validate ? ' data-validate="' . $validate . '"' : ''; $disabled = $disabled ? ' disabled' : ''; $readonly = $readonly ? ' readonly' : ''; $hint = strlen($hint) ? ' placeholder="' . $this->escape($hint) . '"' : ' placeholder="' . $placeholder . '"'; $autocomplete = ! $autocomplete ? ' autocomplete="off"' : ''; // Force LTR input value in RTL, due to display issues with rgba/hex colors $direction = $lang->isRtl() ? ' dir="ltr" style="text-align:right"' : ''; // Including fallback code for HTML5 non supported browsers. JHtml::_('jquery.framework'); JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9')); JHtml::_('script', 'jui/jquery.minicolors.min.js', array('version' => 'auto', 'relative' => true)); JHtml::_('stylesheet', 'jui/jquery.minicolors.css', array('version' => 'auto', 'relative' => true)); JHtml::_('script', 'system/color-field-adv-init.min.js', array('version' => 'auto', 'relative' => true)); ?> <input type="text" name="<?php echo $name; ?>" id="<?php echo $id; ?>" value="<?php echo $this->escape($color); ?>"<?php echo $hint, $class, $position, $control, $readonly, $disabled, $required, $onchange, $autocomplete, $autofocus, $format, $keywords, $direction, $validate; ?>/>
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка