Server IP : 195.201.23.43 / Your IP : 3.143.236.11 Web Server : Apache System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 User : kdecoratie ( 1041) PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/kdecoratie/public_html/components/com_users/helpers/html/ |
Upload File : |
<?php /** * @package Joomla.Site * @subpackage com_users * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Users Html Helper * * @since 1.6 */ abstract class JHtmlUsers { /** * Get the sanitized value * * @param mixed $value Value of the field * * @return mixed String/void * * @since 1.6 */ public static function value($value) { if (is_string($value)) { $value = trim($value); } if (empty($value)) { return JText::_('COM_USERS_PROFILE_VALUE_NOT_FOUND'); } elseif (!is_array($value)) { return htmlspecialchars($value, ENT_COMPAT, 'UTF-8'); } } /** * Get the space symbol * * @param mixed $value Value of the field * * @return string * * @since 1.6 */ public static function spacer($value) { return ''; } /** * Get the sanitized helpsite link * * @param mixed $value Value of the field * * @return mixed String/void * * @since 1.6 */ public static function helpsite($value) { if (empty($value)) { return static::value($value); } $text = $value; if ($xml = simplexml_load_file(JPATH_ADMINISTRATOR . '/help/helpsites.xml')) { foreach ($xml->sites->site as $site) { if ((string) $site->attributes()->url == $value) { $text = (string) $site; break; } } } $value = htmlspecialchars($value, ENT_COMPAT, 'UTF-8'); if (strpos($value, 'http') === 0) { return '<a href="' . $value . '">' . $text . '</a>'; } return '<a href="http://' . $value . '">' . $text . '</a>'; } /** * Get the sanitized template style * * @param mixed $value Value of the field * * @return mixed String/void * * @since 1.6 */ public static function templatestyle($value) { if (empty($value)) { return static::value($value); } else { $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select('title') ->from('#__template_styles') ->where('id = ' . $db->quote($value)); $db->setQuery($query); $title = $db->loadResult(); if ($title) { return htmlspecialchars($title, ENT_COMPAT, 'UTF-8'); } else { return static::value(''); } } } /** * Get the sanitized language * * @param mixed $value Value of the field * * @return mixed String/void * * @since 1.6 */ public static function admin_language($value) { if (empty($value)) { return static::value($value); } else { $file = JLanguageHelper::getLanguagePath(JPATH_ADMINISTRATOR, $value) . '/' . $value . '.xml'; $result = null; if (is_file($file)) { $result = JLanguageHelper::parseXMLLanguageFile($file); } if ($result) { return htmlspecialchars($result['name'], ENT_COMPAT, 'UTF-8'); } else { return static::value(''); } } } /** * Get the sanitized language * * @param mixed $value Value of the field * * @return mixed String/void * * @since 1.6 */ public static function language($value) { if (empty($value)) { return static::value($value); } else { $file = JLanguageHelper::getLanguagePath(JPATH_SITE, $value) . '/' . $value . '.xml'; $result = null; if (is_file($file)) { $result = JLanguageHelper::parseXMLLanguageFile($file); } if ($result) { return htmlspecialchars($result['name'], ENT_COMPAT, 'UTF-8'); } else { return static::value(''); } } } /** * Get the sanitized editor name * * @param mixed $value Value of the field * * @return mixed String/void * * @since 1.6 */ public static function editor($value) { if (empty($value)) { return static::value($value); } else { $db = JFactory::getDbo(); $lang = JFactory::getLanguage(); $query = $db->getQuery(true) ->select('name') ->from('#__extensions') ->where('element = ' . $db->quote($value)) ->where('folder = ' . $db->quote('editors')); $db->setQuery($query); $title = $db->loadResult(); if ($title) { $lang->load("plg_editors_$value.sys", JPATH_ADMINISTRATOR, null, false, true) || $lang->load("plg_editors_$value.sys", JPATH_PLUGINS . '/editors/' . $value, null, false, true); $lang->load($title . '.sys'); return JText::_($title); } else { return static::value(''); } } } }Private