Spade
Mini Shell
| Directory:~$ /home/lmsyaran/public_html/joomla4/ |
| [Home] [System Details] [Kill Me] |
home/lmsyaran/public_html/j3/libraries/joomla/view/html.php000064400000007136151156473210020040
0ustar00<?php
/**
* @package Joomla.Platform
* @subpackage View
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
jimport('joomla.filesystem.path');
/**
* Joomla Platform HTML View Class
*
* @since 3.0.0
* @deprecated 4.0 Use the default MVC library
*/
abstract class JViewHtml extends JViewBase
{
/**
* The view layout.
*
* @var string
* @since 3.0.0
*/
protected $layout = 'default';
/**
* The paths queue.
*
* @var SplPriorityQueue
* @since 3.0.0
*/
protected $paths;
/**
* Method to instantiate the view.
*
* @param JModel $model The model object.
* @param SplPriorityQueue $paths The paths queue.
*
* @since 3.0.0
*/
public function __construct(JModel $model, SplPriorityQueue $paths = null)
{
parent::__construct($model);
// Setup dependencies.
$this->paths = isset($paths) ? $paths : $this->loadPaths();
}
/**
* Magic toString method that is a proxy for the render method.
*
* @return string
*
* @since 3.0.0
*/
public function __toString()
{
return $this->render();
}
/**
* Method to escape output.
*
* @param string $output The output to escape.
*
* @return string The escaped output.
*
* @note the ENT_COMPAT flag will be replaced by ENT_QUOTES in Joomla 4.0
to also escape single quotes
*
* @see JView::escape()
* @since 3.0.0
*/
public function escape($output)
{
// Escape the output.
return htmlspecialchars($output, ENT_COMPAT, 'UTF-8');
}
/**
* Method to get the view layout.
*
* @return string The layout name.
*
* @since 3.0.0
*/
public function getLayout()
{
return $this->layout;
}
/**
* Method to get the layout path.
*
* @param string $layout The layout name.
*
* @return mixed The layout file name if found, false otherwise.
*
* @since 3.0.0
*/
public function getPath($layout)
{
// Get the layout file name.
$file = JPath::clean($layout . '.php');
// Find the layout file path.
$path = JPath::find(clone $this->paths, $file);
return $path;
}
/**
* Method to get the view paths.
*
* @return SplPriorityQueue The paths queue.
*
* @since 3.0.0
*/
public function getPaths()
{
return $this->paths;
}
/**
* Method to render the view.
*
* @return string The rendered view.
*
* @since 3.0.0
* @throws RuntimeException
*/
public function render()
{
// Get the layout path.
$path = $this->getPath($this->getLayout());
// Check if the layout path was found.
if (!$path)
{
throw new RuntimeException('Layout Path Not Found');
}
// Start an output buffer.
ob_start();
// Load the layout.
include $path;
// Get the layout contents.
$output = ob_get_clean();
return $output;
}
/**
* Method to set the view layout.
*
* @param string $layout The layout name.
*
* @return JViewHtml Method supports chaining.
*
* @since 3.0.0
*/
public function setLayout($layout)
{
$this->layout = $layout;
return $this;
}
/**
* Method to set the view paths.
*
* @param SplPriorityQueue $paths The paths queue.
*
* @return JViewHtml Method supports chaining.
*
* @since 3.0.0
*/
public function setPaths(SplPriorityQueue $paths)
{
$this->paths = $paths;
return $this;
}
/**
* Method to load the paths queue.
*
* @return SplPriorityQueue The paths queue.
*
* @since 3.0.0
*/
protected function loadPaths()
{
return new SplPriorityQueue;
}
}
home/lmsyaran/public_html/libraries/fof/view/html.php000064400000010571151156551640017016
0ustar00<?php
/**
* @package FrameworkOnFramework
* @subpackage view
* @copyright Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba
Ltd. All rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
* @note This file has been modified by the Joomla! Project and no
longer reflects the original work of its author.
*/
// Protect from unauthorized access
defined('FOF_INCLUDED') or die;
/**
* FrameworkOnFramework HTML output class. Together with PHP-based view
templates
* it will render your data into an HTML representation.
*
* @package FrameworkOnFramework
* @since 2.1
*/
class FOFViewHtml extends FOFViewRaw
{
/** @var bool Should I set the page title in the front-end of the site? */
public $setFrontendPageTitle = false;
/** @var string The translation key for the default page title */
public $defaultPageTitle = null;
/**
* Class constructor
*
* @param array $config Configuration parameters
*/
public function __construct($config = array())
{
// Make sure $config is an array
if (is_object($config))
{
$config = (array)$config;
}
elseif (!is_array($config))
{
$config = array();
}
if (isset($config['setFrontendPageTitle']))
{
$this->setFrontendPageTitle =
(bool)$config['setFrontendPageTitle'];
}
if (isset($config['defaultPageTitle']))
{
$this->defaultPageTitle = $config['defaultPageTitle'];
}
parent::__construct($config);
}
/**
* Runs before rendering the view template, echoing HTML to put before the
* view template's generated HTML
*
* @return void
*/
protected function preRender()
{
$view = $this->input->getCmd('view', 'cpanel');
$task = $this->getModel()->getState('task',
'browse');
// Don't load the toolbar on CLI
if (!FOFPlatform::getInstance()->isCli())
{
$toolbar =
FOFToolbar::getAnInstance($this->input->getCmd('option',
'com_foobar'), $this->config);
$toolbar->perms = $this->perms;
$toolbar->renderToolbar($view, $task, $this->input);
}
if (FOFPlatform::getInstance()->isFrontend())
{
if ($this->setFrontendPageTitle)
{
$this->setPageTitle();
}
}
$renderer = $this->getRenderer();
$renderer->preRender($view, $task, $this->input, $this->config);
}
/**
* Runs after rendering the view template, echoing HTML to put after the
* view template's generated HTML
*
* @return void
*/
protected function postRender()
{
$view = $this->input->getCmd('view', 'cpanel');
$task = $this->getModel()->getState('task',
'browse');
$renderer = $this->getRenderer();
if ($renderer instanceof FOFRenderAbstract)
{
$renderer->postRender($view, $task, $this->input,
$this->config);
}
}
public function setPageTitle()
{
$document = JFactory::getDocument();
$app = JFactory::getApplication();
$menus = $app->getMenu();
$menu = $menus->getActive();
$title = null;
// Get the option and view name
$option = empty($this->option) ?
$this->input->getCmd('option', 'com_foobar') :
$this->option;
$view = empty($this->view) ?
$this->input->getCmd('view', $this->getName()) :
$this->view;
// Get the default page title translation key
$default = empty($this->defaultPageTitle) ? $option .
'_TITLE_' . $view : $this->defaultPageTitle;
$params = $app->getPageParameters($option);
// Set the default value for page_heading
if ($menu)
{
$params->def('page_heading',
$params->get('page_title', $menu->title));
}
else
{
$params->def('page_heading', JText::_($default));
}
// Set the document title
$title = $params->get('page_title', '');
$sitename = $app->getCfg('sitename');
if ($title == $sitename)
{
$title = JText::_($default);
}
if (empty($title))
{
$title = $sitename;
}
elseif ($app->getCfg('sitename_pagetitles', 0) == 1)
{
$title = JText::sprintf('JPAGETITLE',
$app->getCfg('sitename'), $title);
}
elseif ($app->getCfg('sitename_pagetitles', 0) == 2)
{
$title = JText::sprintf('JPAGETITLE', $title,
$app->getCfg('sitename'));
}
$document->setTitle($title);
// Set meta
if ($params->get('menu-meta_description'))
{
$document->setDescription($params->get('menu-meta_description'));
}
if ($params->get('menu-meta_keywords'))
{
$document->setMetadata('keywords',
$params->get('menu-meta_keywords'));
}
if ($params->get('robots'))
{
$document->setMetadata('robots',
$params->get('robots'));
}
return $title;
}
}
home/lmsyaran/public_html/j3/htaccess.back/joomla/view/html.php000064400000007136151161446100020552
0ustar00<?php
/**
* @package Joomla.Platform
* @subpackage View
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
jimport('joomla.filesystem.path');
/**
* Joomla Platform HTML View Class
*
* @since 3.0.0
* @deprecated 4.0 Use the default MVC library
*/
abstract class JViewHtml extends JViewBase
{
/**
* The view layout.
*
* @var string
* @since 3.0.0
*/
protected $layout = 'default';
/**
* The paths queue.
*
* @var SplPriorityQueue
* @since 3.0.0
*/
protected $paths;
/**
* Method to instantiate the view.
*
* @param JModel $model The model object.
* @param SplPriorityQueue $paths The paths queue.
*
* @since 3.0.0
*/
public function __construct(JModel $model, SplPriorityQueue $paths = null)
{
parent::__construct($model);
// Setup dependencies.
$this->paths = isset($paths) ? $paths : $this->loadPaths();
}
/**
* Magic toString method that is a proxy for the render method.
*
* @return string
*
* @since 3.0.0
*/
public function __toString()
{
return $this->render();
}
/**
* Method to escape output.
*
* @param string $output The output to escape.
*
* @return string The escaped output.
*
* @note the ENT_COMPAT flag will be replaced by ENT_QUOTES in Joomla 4.0
to also escape single quotes
*
* @see JView::escape()
* @since 3.0.0
*/
public function escape($output)
{
// Escape the output.
return htmlspecialchars($output, ENT_COMPAT, 'UTF-8');
}
/**
* Method to get the view layout.
*
* @return string The layout name.
*
* @since 3.0.0
*/
public function getLayout()
{
return $this->layout;
}
/**
* Method to get the layout path.
*
* @param string $layout The layout name.
*
* @return mixed The layout file name if found, false otherwise.
*
* @since 3.0.0
*/
public function getPath($layout)
{
// Get the layout file name.
$file = JPath::clean($layout . '.php');
// Find the layout file path.
$path = JPath::find(clone $this->paths, $file);
return $path;
}
/**
* Method to get the view paths.
*
* @return SplPriorityQueue The paths queue.
*
* @since 3.0.0
*/
public function getPaths()
{
return $this->paths;
}
/**
* Method to render the view.
*
* @return string The rendered view.
*
* @since 3.0.0
* @throws RuntimeException
*/
public function render()
{
// Get the layout path.
$path = $this->getPath($this->getLayout());
// Check if the layout path was found.
if (!$path)
{
throw new RuntimeException('Layout Path Not Found');
}
// Start an output buffer.
ob_start();
// Load the layout.
include $path;
// Get the layout contents.
$output = ob_get_clean();
return $output;
}
/**
* Method to set the view layout.
*
* @param string $layout The layout name.
*
* @return JViewHtml Method supports chaining.
*
* @since 3.0.0
*/
public function setLayout($layout)
{
$this->layout = $layout;
return $this;
}
/**
* Method to set the view paths.
*
* @param SplPriorityQueue $paths The paths queue.
*
* @return JViewHtml Method supports chaining.
*
* @since 3.0.0
*/
public function setPaths(SplPriorityQueue $paths)
{
$this->paths = $paths;
return $this;
}
/**
* Method to load the paths queue.
*
* @return SplPriorityQueue The paths queue.
*
* @since 3.0.0
*/
protected function loadPaths()
{
return new SplPriorityQueue;
}
}
home/lmsyaran/public_html/libraries/regularlabs/helpers/html.php000064400000001656151162053440021233
0ustar00<?php
/**
* @package Regular Labs Library
* @version 21.2.19653
*
* @author Peter van Westen <info@regularlabs.com>
* @link http://www.regularlabs.com
* @copyright Copyright © 2021 Regular Labs All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use RegularLabs\Library\Form as RL_Form;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
class RLHtml
{
static function selectlist(&$options, $name, $value, $id, $size = 0,
$multiple = 0, $simple = 0)
{
return RL_Form::selectList($options, $name, $value, $id, $size,
$multiple, $simple);
}
static function selectlistsimple(&$options, $name, $value, $id, $size
= 0, $multiple = 0)
{
return RL_Form::selectListSimple($options, $name, $value, $id, $size,
$multiple);
}
}
home/lmsyaran/public_html/j3/libraries/regularlabs/helpers/html.php000064400000001656151162063000021540
0ustar00<?php
/**
* @package Regular Labs Library
* @version 21.2.19653
*
* @author Peter van Westen <info@regularlabs.com>
* @link http://www.regularlabs.com
* @copyright Copyright © 2021 Regular Labs All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use RegularLabs\Library\Form as RL_Form;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
class RLHtml
{
static function selectlist(&$options, $name, $value, $id, $size = 0,
$multiple = 0, $simple = 0)
{
return RL_Form::selectList($options, $name, $value, $id, $size,
$multiple, $simple);
}
static function selectlistsimple(&$options, $name, $value, $id, $size
= 0, $multiple = 0)
{
return RL_Form::selectListSimple($options, $name, $value, $id, $size,
$multiple);
}
}
home/lmsyaran/public_html/j3/htaccess.back/fof/view/html.php000064400000010571151162735260020051
0ustar00<?php
/**
* @package FrameworkOnFramework
* @subpackage view
* @copyright Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba
Ltd. All rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
* @note This file has been modified by the Joomla! Project and no
longer reflects the original work of its author.
*/
// Protect from unauthorized access
defined('FOF_INCLUDED') or die;
/**
* FrameworkOnFramework HTML output class. Together with PHP-based view
templates
* it will render your data into an HTML representation.
*
* @package FrameworkOnFramework
* @since 2.1
*/
class FOFViewHtml extends FOFViewRaw
{
/** @var bool Should I set the page title in the front-end of the site? */
public $setFrontendPageTitle = false;
/** @var string The translation key for the default page title */
public $defaultPageTitle = null;
/**
* Class constructor
*
* @param array $config Configuration parameters
*/
public function __construct($config = array())
{
// Make sure $config is an array
if (is_object($config))
{
$config = (array)$config;
}
elseif (!is_array($config))
{
$config = array();
}
if (isset($config['setFrontendPageTitle']))
{
$this->setFrontendPageTitle =
(bool)$config['setFrontendPageTitle'];
}
if (isset($config['defaultPageTitle']))
{
$this->defaultPageTitle = $config['defaultPageTitle'];
}
parent::__construct($config);
}
/**
* Runs before rendering the view template, echoing HTML to put before the
* view template's generated HTML
*
* @return void
*/
protected function preRender()
{
$view = $this->input->getCmd('view', 'cpanel');
$task = $this->getModel()->getState('task',
'browse');
// Don't load the toolbar on CLI
if (!FOFPlatform::getInstance()->isCli())
{
$toolbar =
FOFToolbar::getAnInstance($this->input->getCmd('option',
'com_foobar'), $this->config);
$toolbar->perms = $this->perms;
$toolbar->renderToolbar($view, $task, $this->input);
}
if (FOFPlatform::getInstance()->isFrontend())
{
if ($this->setFrontendPageTitle)
{
$this->setPageTitle();
}
}
$renderer = $this->getRenderer();
$renderer->preRender($view, $task, $this->input, $this->config);
}
/**
* Runs after rendering the view template, echoing HTML to put after the
* view template's generated HTML
*
* @return void
*/
protected function postRender()
{
$view = $this->input->getCmd('view', 'cpanel');
$task = $this->getModel()->getState('task',
'browse');
$renderer = $this->getRenderer();
if ($renderer instanceof FOFRenderAbstract)
{
$renderer->postRender($view, $task, $this->input,
$this->config);
}
}
public function setPageTitle()
{
$document = JFactory::getDocument();
$app = JFactory::getApplication();
$menus = $app->getMenu();
$menu = $menus->getActive();
$title = null;
// Get the option and view name
$option = empty($this->option) ?
$this->input->getCmd('option', 'com_foobar') :
$this->option;
$view = empty($this->view) ?
$this->input->getCmd('view', $this->getName()) :
$this->view;
// Get the default page title translation key
$default = empty($this->defaultPageTitle) ? $option .
'_TITLE_' . $view : $this->defaultPageTitle;
$params = $app->getPageParameters($option);
// Set the default value for page_heading
if ($menu)
{
$params->def('page_heading',
$params->get('page_title', $menu->title));
}
else
{
$params->def('page_heading', JText::_($default));
}
// Set the document title
$title = $params->get('page_title', '');
$sitename = $app->getCfg('sitename');
if ($title == $sitename)
{
$title = JText::_($default);
}
if (empty($title))
{
$title = $sitename;
}
elseif ($app->getCfg('sitename_pagetitles', 0) == 1)
{
$title = JText::sprintf('JPAGETITLE',
$app->getCfg('sitename'), $title);
}
elseif ($app->getCfg('sitename_pagetitles', 0) == 2)
{
$title = JText::sprintf('JPAGETITLE', $title,
$app->getCfg('sitename'));
}
$document->setTitle($title);
// Set meta
if ($params->get('menu-meta_description'))
{
$document->setDescription($params->get('menu-meta_description'));
}
if ($params->get('menu-meta_keywords'))
{
$document->setMetadata('keywords',
$params->get('menu-meta_keywords'));
}
if ($params->get('robots'))
{
$document->setMetadata('robots',
$params->get('robots'));
}
return $title;
}
}