Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php defined('_JEXEC') or die; use Joomla\Registry\Registry; class Contact..
Decoded Output download
<?php
defined('_JEXEC') or die;
use Joomla\Registry\Registry;
class ContactViewFeatured extends JViewLegacy
{
protected $state;
protected $items;
protected $category;
protected $categories;
protected $pagination;
public function display($tpl = null)
{
$app = JFactory::getApplication();
$params = $app->getParams();
$state = $this->get('State');
$items = $this->get('Items');
$category = $this->get('Category');
$children = $this->get('Children');
$parent = $this->get('Parent');
$pagination = $this->get('Pagination');
if (count($errors = $this->get('Errors')))
{
JError::raiseWarning(500, implode("
", $errors));
return false;
}
for ($i = 0, $n = count($items); $i < $n; $i++)
{
$item = &$items[$i];
$item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id;
$temp = new Registry;
$temp->loadString($item->params);
$item->params = clone $params;
$item->params->merge($temp);
if ($item->params->get('show_email', 0) == 1)
{
$item->email_to = trim($item->email_to);
if (!empty($item->email_to) && JMailHelper::isEmailAddress($item->email_to))
{
$item->email_to = JHtml::_('email.cloak', $item->email_to);
}
else
{
$item->email_to = '';
}
}
}
$this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'), ENT_COMPAT, 'UTF-8');
$maxLevel = $params->get('maxLevel', -1);
$this->maxLevel = &$maxLevel;
$this->state = &$state;
$this->items = &$items;
$this->category = &$category;
$this->children = &$children;
$this->params = &$params;
$this->parent = &$parent;
$this->pagination = &$pagination;
$this->_prepareDocument();
return parent::display($tpl);
}
protected function _prepareDocument()
{
$app = JFactory::getApplication();
$menus = $app->getMenu();
$title = null;
$menu = $menus->getActive();
if ($menu)
{
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
}
else
{
$this->params->def('page_heading', JText::_('COM_CONTACT_DEFAULT_PAGE_TITLE'));
}
$title = $this->params->get('page_title', '');
if (empty($title))
{
$title = $app->get('sitename');
}
elseif ($app->get('sitename_pagetitles', 0) == 1)
{
$title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title);
}
elseif ($app->get('sitename_pagetitles', 0) == 2)
{
$title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename'));
}
$this->document->setTitle($title);
if ($this->params->get('menu-meta_description'))
{
$this->document->setDescription($this->params->get('menu-meta_description'));
}
if ($this->params->get('menu-meta_keywords'))
{
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
}
if ($this->params->get('robots'))
{
$this->document->setMetadata('robots', $this->params->get('robots'));
}
}
}
?>
Did this file decode correctly?
Original Code
<?php
defined('_JEXEC') or die;
use Joomla\Registry\Registry;
class ContactViewFeatured extends JViewLegacy
{
protected $state;
protected $items;
protected $category;
protected $categories;
protected $pagination;
public function display($tpl = null)
{
$app = JFactory::getApplication();
$params = $app->getParams();
$state = $this->get('State');
$items = $this->get('Items');
$category = $this->get('Category');
$children = $this->get('Children');
$parent = $this->get('Parent');
$pagination = $this->get('Pagination');
if (count($errors = $this->get('Errors')))
{
JError::raiseWarning(500, implode("\n", $errors));
return false;
}
for ($i = 0, $n = count($items); $i < $n; $i++)
{
$item = &$items[$i];
$item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id;
$temp = new Registry;
$temp->loadString($item->params);
$item->params = clone $params;
$item->params->merge($temp);
if ($item->params->get('show_email', 0) == 1)
{
$item->email_to = trim($item->email_to);
if (!empty($item->email_to) && JMailHelper::isEmailAddress($item->email_to))
{
$item->email_to = JHtml::_('email.cloak', $item->email_to);
}
else
{
$item->email_to = '';
}
}
}
$this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'), ENT_COMPAT, 'UTF-8');
$maxLevel = $params->get('maxLevel', -1);
$this->maxLevel = &$maxLevel;
$this->state = &$state;
$this->items = &$items;
$this->category = &$category;
$this->children = &$children;
$this->params = &$params;
$this->parent = &$parent;
$this->pagination = &$pagination;
$this->_prepareDocument();
return parent::display($tpl);
}
protected function _prepareDocument()
{
$app = JFactory::getApplication();
$menus = $app->getMenu();
$title = null;
$menu = $menus->getActive();
if ($menu)
{
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
}
else
{
$this->params->def('page_heading', JText::_('COM_CONTACT_DEFAULT_PAGE_TITLE'));
}
$title = $this->params->get('page_title', '');
if (empty($title))
{
$title = $app->get('sitename');
}
elseif ($app->get('sitename_pagetitles', 0) == 1)
{
$title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title);
}
elseif ($app->get('sitename_pagetitles', 0) == 2)
{
$title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename'));
}
$this->document->setTitle($title);
if ($this->params->get('menu-meta_description'))
{
$this->document->setDescription($this->params->get('menu-meta_description'));
}
if ($this->params->get('menu-meta_keywords'))
{
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
}
if ($this->params->get('robots'))
{
$this->document->setMetadata('robots', $this->params->get('robots'));
}
}
}
Function Calls
defined | 1 |
Stats
MD5 | 269f5155ccffc41abf0aa230f4ab6ed9 |
Eval Count | 0 |
Decode Time | 88 ms |