%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.248 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/old/libraries/kunena/ |
Upload File : |
<?php /** * Kunena Component * @package Kunena.Framework * * @copyright (C) 2008 - 2014 Kunena Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * @link http://www.kunena.org **/ defined ( '_JEXEC' ) or die (); /** * Model for Kunena * * @since 2.0 */ class KunenaModel extends JModelLegacy { /** * @var JSite|JAdministrator */ public $app = null; /** * @var KunenaUser */ public $me = null; /** * @var KunenaConfig */ public $config = null; /** * @var JRegistry */ public $params = null; /** * @var JObject */ protected $state = null; /** * @var bool */ protected $embedded = false; public function __construct($config = array()) { $this->option = 'com_kunena'; parent::__construct($config); $this->app = JFactory::getApplication(); $this->me = KunenaUserHelper::getMyself(); $this->config = KunenaFactory::getConfig(); } public function initialize($params = array()) { $this->embedded = true; $this->setState('embedded', true); if ($params instanceof JRegistry) { $this->params = $params; } else { $this->params = new JRegistry($params); } } public function getItemid() { $Itemid = 0; if (!$this->embedded) { $active = JFactory::getApplication()->getMenu ()->getActive (); $Itemid = $active ? (int) $active->id : 0; } return $Itemid; } /** * Escapes a value for output in a view script. * * @param mixed $var The output to escape. * @return mixed The escaped value. */ public function escape($var) { return htmlspecialchars($var, ENT_COMPAT, 'UTF-8'); } protected function getParameters() { // If we are not in embedded mode, get variable from application if (!$this->embedded) { return $this->app->getParams('com_kunena'); } return $this->params; } protected function getUserStateFromRequest($key, $request, $default = null, $type = 'none') { // If we are not in embedded mode, get variable from application if (!$this->embedded) { return JFactory::getApplication()->getUserStateFromRequest($key, $request, $default, $type); } // Embedded models/views do not have user state -- all variables come from parameters return $this->getVar($request, $default, 'default', $type); } protected function getVar($name, $default = null, $hash = 'default', $type = 'none', $mask = 0) { // If we are not in embedded mode, get variable from request if (!$this->embedded) { return JRequest::getVar($name, $default, $hash, $type, $mask); } return self::_cleanVar($this->params->get($name, $default), $mask, strtoupper($type)); } protected function getBool($name, $default = false, $hash = 'default') { return $this->getVar($name, $default, $hash, 'bool'); } protected function getCmd($name, $default = '', $hash = 'default') { return $this->getVar($name, $default, $hash, 'cmd'); } protected function getFloat($name, $default = 0.0, $hash = 'default') { return $this->getVar($name, $default, $hash, 'float'); } protected function getInt($name, $default = 0, $hash = 'default') { return $this->getVar($name, $default, $hash, 'int'); } protected function getString($name, $default = '', $hash = 'default', $mask = 0) { return $this->getVar($name, $default, $hash, 'string', $mask); } protected function getWord($name, $default = '', $hash = 'default') { return $this->getVar($name, $default, $hash, 'word'); } protected function _cleanVar($var, $mask = 0, $type=null) { // Static input filters for specific settings static $noHtmlFilter = null; static $safeHtmlFilter = null; // If the no trim flag is not set, trim the variable if (!($mask & 1) && is_string($var)) { $var = trim($var); } // Now we handle input filtering if ($mask & 2) { // If the allow raw flag is set, do not modify the variable } elseif ($mask & 4) { // If the allow html flag is set, apply a safe html filter to the variable if (is_null($safeHtmlFilter)) { $safeHtmlFilter = JFilterInput::getInstance(null, null, 1, 1); } $var = $safeHtmlFilter->clean($var, $type); } else { // Since no allow flags were set, we will apply the most strict filter to the variable if (is_null($noHtmlFilter)) { $noHtmlFilter = JFilterInput::getInstance(); } $var = $noHtmlFilter->clean($var, $type); } return $var; } }