Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
class Infortis_UltraMegamenu_Block_Navigation extends Mage_Catalog_Block_Navigation { c..
Decoded Output download
<? class Infortis_UltraMegamenu_Block_Navigation extends Mage_Catalog_Block_Navigation
{
const DDTYPE_NONE = 0;
const DDTYPE_MEGA = 1;
const DDTYPE_CLASSIC= 2;
const DDTYPE_SIMPLE = 3;
protected $ddtype;
protected $p0c = FALSE;
protected $p0d;
protected $p0e = FALSE;
protected $p0f = NULL;
protected $currentCategory = NULL;
protected function _construct()
{
parent::_construct();
$this->ddtype = array(
self::DDTYPE_MEGA => "mega",
self::DDTYPE_CLASSIC => "classic",
self::DDTYPE_SIMPLE => "simple"
);
$this->p0c = FALSE;
$this->p0d = "#@#";
$this->p0e = FALSE;
$this->p0f = NULL;
if (Mage::registry('current_category')) {
$this->currentCategory = Mage::registry('current_category')->getId();
}
}
public function getCacheKeyInfo()
{
$x11 = array(
'CATALOG_NAVIGATION',
Mage::app()->getStore()->getId(),
Mage::getDesign()->getPackageName(),
Mage::getDesign()->getTheme('template'),
Mage::getSingleton('customer/session')->getCustomerGroupId(),
'template' => $this->getTemplate(),
'name' => $this->getNameInLayout(),
$this->getCurrenCategoryKey(),
Mage::helper('ultramegamenu')->getIsOnHome(),
(int)Mage::app()->getStore()->isCurrentlySecure(),
);
$x12 = $x11;
$x11 = array_values($x11);
$x11 = implode('|', $x11);
$x11 = md5($x11);
$x12['category_path'] = $this->getCurrenCategoryKey();
$x12['short_cache_id'] = $x11;return $x12;
}
protected function getItemHtml($item, $x14 = 0, $x15 = FALSE, $x16 = FALSE,$x17 = FALSE, $x18 = '', $x19 = '', $x1a = FALSE, $x1b = null)
{
if (!$item->getIsActive()) {
return '';
}
$html = '';
if (Mage::helper('catalog/category_flat')->isEnabled()) {
$categories = (array)$item->getChildrenNodes();
$category_count = count($categories);
} else {
$categories = $item->getChildren();
$category_count = $categories->count();
}
$x1f = ($categories && $category_count);
$active_categories = array();
foreach ($categories as $category) {
if ($category->getIsActive()) {
$active_categories[] = $category;
}
}
$x22 = count($active_categories);
$x23 = ($x22 > 0);
$x24 = Mage::helper('ultramegamenu');
/*$item = Mage::getModel('catalog/category')->load($item->getId());*/
$x26 = intval($item->getData('umm_dd_type'));
if ($x26 === self::DDTYPE_NONE){ if ($x1b["ddType"] === self::DDTYPE_MEGA) {} else { $x26 = self::DDTYPE_CLASSIC; }}
elseif ($x26 === self::DDTYPE_MEGA){ if ($x1b["ddType"] === self::DDTYPE_MEGA) { $x26 = self::DDTYPE_NONE; }}
elseif ($x26 === self::DDTYPE_SIMPLE){ if ($x1b["ddType"] === self::DDTYPE_MEGA) { $x26 = self::DDTYPE_NONE; } elseif ($x14 === 0) { $x26 = self::DDTYPE_CLASSIC; }}
$x27 = array( "ddType" => $x26, );
$x28 = FALSE;
$x29 = array();
$x2a = '';
$x2b = '';
$x2c = FALSE;
$x2d = "level" . $x14;
if (FALSE === $this->p0c&& ($x26 === self::DDTYPE_MEGA || $x1b["ddType"] === self::DDTYPE_MEGA) )
{ $x28 = TRUE; }
if ($x28){ $x2e = $this->x10($item, "umm_dd_blocks");if ($x2e) {$x29 = explode($this->p0d, $x2e); }}
if (FALSE === $this->p0c && $x26 === self::DDTYPE_MEGA) {
$x2f = $item->getData("umm_dd_proportions");
if ($x2f) {
$x30 = explode(";", $x2f);
$x31= $x30[0];
$x32 = $x30[1];
$x33= $x30[2];
} else {
$x31 = $x32 = $x33 = 4;
}
$x34 = "grid12-" . $x31;
$x35 = "grid12-" . $x32;
$x36= "grid12-" . $x33;
if (empty($x29[1]) && empty($x29[2])) {
$x34= '';
$x35 = "grid12-12";
$x36= '';
} elseif (empty($x29[1])) {
$x34= '';
$x35 = "grid12-" . ($x31 + $x32);
} elseif (empty($x29[2])) {
$x35 = "grid12-" . ($x32 + $x33);
$x36= '';
}elseif (!$x23) {
$x34= "grid12-" . ($x31 + $x32);
$x35 = '';
$x36= "grid12-" . $x33;
}
if (!empty($x29[0])) {
$x2c = TRUE;
$x2a .= '<div class="nav-block nav-block--top std grid-full">' . $x29[0] . '</div>';
}
if (!empty($x29[1])) {
$x2c = TRUE;
$x2a .= '<div class="nav-block nav-block--left std ' . $x34 . '">' . $x29[1] . '</div>';
}
if ($x23) {
$x2a .= '<div class="nav-block--center ' . $x35 . '">'; $x2b .= '</div>';
}
if (!empty($x29[2])) {
$x2c = TRUE;
$x2b .= '<div class="nav-block nav-block--right std ' . $x36 . '">' . $x29[2] . '</div>';
}
if (!empty($x29[3])) {
$x2c = TRUE;
$x2b .= '<div class="nav-block nav-block--bottom std grid-full">' . $x29[3] . '</div>';
}
}
$x37 = ($x23 || $x2c) ? TRUE : FALSE;
$classes = array("nav-item");
$x39 = array();
$x3a = array();
$x3b = array("nav-submenu");
$x3c = '';
$x3d = '';
$x3e = '';
$classes[] = $x2d;
$classes[] = "nav-" . $this->_getItemPosition($x14);
if ($this->isCategoryActive($item)) {
$classes[] = "active";
if ($item->getId() === $this->currentCategory) {
$classes[] = "current";
}
}
if ($x17 && $x18) {
$classes[] = $x18;
$x39[] = $x18;
}
if ($x16) {
$classes[] = "first";
}
if ($x15) {
$classes[] = "last";
}
if (FALSE === $this->p0c) {
if ($x26 === self::DDTYPE_CLASSIC) {
if ($x37){
$classes[] = "nav-item--parent"; //nav-item--parent
$x3b[] = "nav-panel--dropdown"; //nav-panel--dropdown
}
$classes[] = $this->ddtype[self::DDTYPE_CLASSIC];
$x3b[] = "nav-panel";
} elseif ($x26 === self::DDTYPE_MEGA) {
if ($x37){
$classes[] = "nav-item--parent"; //nav-item--parent
$x3a[] = "nav-panel--dropdown"; //nav-panel--dropdown
}
$classes[] = $this->ddtype[self::DDTYPE_MEGA];
$x3a[] = "nav-panel";
if ($x19){
$x3a[] = $x19;
}
$x3b[] = "nav-submenu--mega"; //nav-submenu--mega
$x3f = intval($item->getData("umm_dd_columns")); //umm_dd_columns
if ($x3f === 0) {
$x3f = 4;
}
$x3b[] = "dd-itemgrid dd-itemgrid-" . $x3f . "col"; //dd-itemgrid dd-itemgrid-
} elseif ($x26 === self::DDTYPE_SIMPLE) {
$classes[] = $this->ddtype[self::DDTYPE_SIMPLE];
$x3b[] = "nav-panel";
} elseif ($x26 === self::DDTYPE_NONE) {
$x3b[] = "nav-panel";
}
if ($x40 = $item->getData("umm_dd_width")) {
$x41 = '';
$x42 = '';
if (strpos($x40, "px") || strpos($x40, "%")) {
$x41 = ' style="width:' . $x40 . ';"';
} else {
$x42 = intval($x40);
if (0 < $x42 && $x42 <= 12) {
$x42 = "no-gutter grid12-" . $x42; //no-gutter grid12-
} else {
$x42 = '';
}
}
if ($x26 === self::DDTYPE_CLASSIC) {
$x3d = $x41;
} elseif ($x26 === self::DDTYPE_MEGA) {
$x3c = $x41;
if ($x42) {
$x3a[] = $x42;
}
}
} else {
if ($x26 === self::DDTYPE_MEGA) {
$x3a[] = "full-width";
}
}
if ($x2c) {
if (FALSE === $x23){
$classes[] = "nav-item--only-blocks"; //nav-item--only-blocks
}
} else {
if ($x23) {
$classes[] = "nav-item--only-subcategories"; //nav-item--only-subcategories
}
}
}
if ($x37){$classes[] = "parent";if (FALSE === $this->p0c) {$x3e = '<span class="caret"> </span>'; }}
$x43 = '';
if ($this->p0e && $this->p0c) { $x43 = '<span class="number">('. $this->x0f($item) .')</span>';}
$x44 = $this->x11($item, $x14);
if ($x45 = $item->getData("umm_cat_target")) {
if ($x45 === "#") {
$url = "#";
$x39[] = "no-click";
}
elseif ($x45 = trim($x45)) {
if (strpos($x45, "http") === 0){$url = $x45;}else{$url = Mage::getBaseUrl() . $x45;}
} else { $url = $this->getCategoryUrl($item); }
} else {
$url = $this->getCategoryUrl($item);
}
$html .= "<li" . ($classes ? ' class="' . implode(" ", $classes) . '"': ''). ">";
if (FALSE === $this->p0c && $x1b["ddType"] === self::DDTYPE_MEGA){
if (!empty($x29[0])) {
$html .= '<div class="nav-block nav-block--top std">' . $x29[0] . '</div>';
}
}
$html .= '<a href="' . $url . '"' . ($x39 ? ' class="' . implode(" ", $x39) . '"': '') . '>';
$html .= '<span>' . $this->escapeHtml($item->getName()) . $x43 . $x44 . '</span>' . $x3e;
$html .= '</a>';
$x47 = '';
$x48 = 0;
foreach ($active_categories as $category) {
$x47 .= $this->getItemHtml($category, ($x14 + 1), ($x48 == $x22 - 1), ($x48 == 0), FALSE, $x18,$x19,$x1a,$x27); $x48++;
}
if (!empty($x47) || $x2c) {
$html .= '<span class="opener"></span>';
if (!empty($x3a)) {
$html .= '<div class="' . implode(' ', $x3a) . '"' . $x3c . '><div class="nav-panel-inner">';
}
$html .= $x2a;
if (!empty($x47)) {
$html .= '<ul class="' . $x2d .' '. implode(' ', $x3b) . '"' . $x3d . '>';
$html .= $x47;
$html .= '</ul>';
}
$html .= $x2b;
if (!empty($x3a)) {
$html .= "</div></div>";
}
}
if (FALSE === $this->p0c && $x1b["ddType"] === self::DDTYPE_MEGA) {
if (!empty($x29[3])) {
$html .= '<div class="nav-block nav-block--bottom std">' . $x29[3] . '</div>';
}
}
$html .= "</li>";
return $html;
}
public function renderCategoriesMenuHtml($x49 = FALSE, $x14 = 0, $x18 = '', $x19 = '')
{
$items = array();
foreach ($this->getStoreCategories() as $category) {
if ($category->getIsActive()) {
$items[] = $category;
}
}
$x4b = count($items);
$x4c = ($x4b > 0);
if (!$x4c) { return '';}
$x1b = array("ddType" => self::DDTYPE_NONE);
$html = '';
$x48 = 0;
foreach ($items as $item) {
$html .= $this->getItemHtml($item,$x14,($x48 == $x4b - 1),($x48 == 0),TRUE,$x18,$x19,TRUE,$x1b );
$x48++;
}
// Start Author link insertion
$action = Mage::app()->getFrontController()->getAction()->getFullActionName();
$activeAuthor = '';
if($action == 'publish_author_index' || $action == 'publish_author_view') $activeAuthor = ' active';
$html .= '<li class="mobile-grid-half nav-item nav-item--authors level0 level-top'.$activeAuthor.'">';
$html .= '<a class="level-top" href="' . Mage::helper('publish/author')->getAuthorsUrl() . '">';
$html .= '<span>'. Mage::helper('publish')->__('Authors').'</span>';
$html .= '</a></li>';
// End Author link insertion
return $html;
}
public function renderMe($x49, $x4d = 0, $x4e = 0)
{
$x4f = '';
$x50 = '';
if ($x4d === 'parent_no_siblings'){
if ($current_category = Mage::registry('current_category')) {
$x4f= $current_category->getId();
$x50 = $current_category->getLevel();
}
}
$this->p0c = TRUE;
$this->p0e = Mage::helper('ultramegamenu')->getCfg('sidemenu/num_of_products');
$x14 = 0;
$x18 = '';
$x19 = '';
$x52 = $this->x0e($x4d);
$x53 = $this->x0c($x52, $x4e);
$items = array();
foreach ($x53 as $category){
if ($category->getIsActive()) {
if ($x4d === 'parent_no_siblings') {
if ($x50 !== '' && $category->getLevel() == $x50 && $category->getId() != $x4f) {
continue;
}
}
$items[] = $category;
}
}
$x4b = count($items);
$x4c = ($x4b > 0);
if (!$x4c) { return '';}
$x1b = array("ddType" => self::DDTYPE_NONE);
$html = '';
$x48 = 0;
foreach ($items as $item) {
$html .= $this->getItemHtml($item,$x14,($x48 == $x4b - 1),($x48 == 0),TRUE,$x18,$x19,TRUE,$x1b );
$x48++;
}
return $html;
}
protected function x0c($x52 = 0, $x4e = 0, $x54=FALSE, $x55=FALSE, $x56=TRUE)
{
$item = Mage::getModel('catalog/category');
if ($x52 === NULL || !$item->checkId($x52)){
return array();
}
if (Mage::helper('catalog/category_flat')->isEnabled()){
$x57 = Mage::getResourceModel('catalog/category_flat');
$x53 = $x57->getCategories($x52, $x4e, $x54, $x55, $x56);
} else {
$x53 = $item->getCategories($x52, $x4e, $x54, $x55, $x56);
}
return $x53;
}
protected function x0e($x4d)
{
$x52 = NULL;
if ($x4d === 'current'){
$current_category = Mage::registry('current_category');
if ($current_category) {
$x52 = $current_category->getId();
}
} elseif ($x4d === 'parent') {
$current_category = Mage::registry('current_category');
if ($current_category) {
$x52 = $current_category->getParentId();
}
} elseif ($x4d === 'parent_no_siblings'){
$current_category = Mage::registry('current_category');
if ($current_category) {
$x52 = $current_category->getParentId();
}
} elseif ($x4d === 'root' || !$x4d) {
$x52 = Mage::app()->getStore()->getRootCategoryId();
} elseif (is_numeric($x4d)) {
$x52 = intval($x4d);
}
$x58 = Mage::helper('ultramegamenu')->getCfg('sidemenu/fallback');
if ($x52 === NULL && $x58) {
$x52 = Mage::app()->getStore()->getRootCategoryId();
}
return $x52;
}
protected function x0f($item)
{
return Mage::getModel('catalog/layer') ->setCurrentCategory($item->getID()) ->getProductCollection() ->getSize();
}
public function renderBlockTitle()
{
$x24 = Mage::helper('ultramegamenu');
$current_category = Mage::registry('current_category');
if (!$current_category) {
$x58 = $x24->getCfg('sidemenu/fallback');
if ($x58) {
$x59 = $x24->getCfg('sidemenu/block_name_fallback');
if ($x59){
return $x59;
}
}
}
$x5a = $this->getBlockName();
if ($x5a === NULL) {
$x5a = $x24->getCfg('sidemenu/block_name');
}
$x5b = '';
if ($current_category){
$x5b = $current_category->getName();
}
$x5a = str_replace('[current_category]', $x5b, $x5a);
return $x5a;
}
protected function x10($item, $x5c)
{
if (!$this->p0f){
$this->p0f = Mage::helper('cms')->getBlockTemplateProcessor();
}
return $this->p0f->filter( trim($item->getData($x5c)) );
}
protected function x11($item, $x14)
{
$label_class = $item->getData('umm_cat_label');
if ($label_class){
$label = trim(Mage::helper('ultramegamenu')->getCfg('category_labels/' . $label_class));
if ($label) {
if ($x14 == 0){
return '<span class="cat-label cat-label-'. $label_class .' pin-bottom">' . $label . '</span>';
} else {
return '<span class="cat-label cat-label-'. $label_class .'">' . $label . '</span>';
}
}
}
return '';
}
} ?>
Did this file decode correctly?
Original Code
class Infortis_UltraMegamenu_Block_Navigation extends Mage_Catalog_Block_Navigation
{
const DDTYPE_NONE = 0;
const DDTYPE_MEGA = 1;
const DDTYPE_CLASSIC= 2;
const DDTYPE_SIMPLE = 3;
protected $ddtype;
protected $p0c = FALSE;
protected $p0d;
protected $p0e = FALSE;
protected $p0f = NULL;
protected $currentCategory = NULL;
protected function _construct()
{
parent::_construct();
$this->ddtype = array(
self::DDTYPE_MEGA => "mega",
self::DDTYPE_CLASSIC => "classic",
self::DDTYPE_SIMPLE => "simple"
);
$this->p0c = FALSE;
$this->p0d = "\043@#";
$this->p0e = FALSE;
$this->p0f = NULL;
if (Mage::registry('current_category')) {
$this->currentCategory = Mage::registry('current_category')->getId();
}
}
public function getCacheKeyInfo()
{
$x11 = array(
'CATALOG_NAVIGATION',
Mage::app()->getStore()->getId(),
Mage::getDesign()->getPackageName(),
Mage::getDesign()->getTheme('template'),
Mage::getSingleton('customer/session')->getCustomerGroupId(),
'template' => $this->getTemplate(),
'name' => $this->getNameInLayout(),
$this->getCurrenCategoryKey(),
Mage::helper('ultramegamenu')->getIsOnHome(),
(int)Mage::app()->getStore()->isCurrentlySecure(),
);
$x12 = $x11;
$x11 = array_values($x11);
$x11 = implode('|', $x11);
$x11 = md5($x11);
$x12['category_path'] = $this->getCurrenCategoryKey();
$x12['short_cache_id'] = $x11;return $x12;
}
protected function getItemHtml($item, $x14 = 0, $x15 = FALSE, $x16 = FALSE,$x17 = FALSE, $x18 = '', $x19 = '', $x1a = FALSE, $x1b = null)
{
if (!$item->getIsActive()) {
return '';
}
$html = '';
if (Mage::helper('catalog/category_flat')->isEnabled()) {
$categories = (array)$item->getChildrenNodes();
$category_count = count($categories);
} else {
$categories = $item->getChildren();
$category_count = $categories->count();
}
$x1f = ($categories && $category_count);
$active_categories = array();
foreach ($categories as $category) {
if ($category->getIsActive()) {
$active_categories[] = $category;
}
}
$x22 = count($active_categories);
$x23 = ($x22 > 0);
$x24 = Mage::helper('ultramegamenu');
/*$item = Mage::getModel('catalog/category')->load($item->getId());*/
$x26 = intval($item->getData('umm_dd_type'));
if ($x26 === self::DDTYPE_NONE){ if ($x1b["\x64\x64\x54\x79\160\145"] === self::DDTYPE_MEGA) {} else { $x26 = self::DDTYPE_CLASSIC; }}
elseif ($x26 === self::DDTYPE_MEGA){ if ($x1b["d\x64\x54\x79\x70\145"] === self::DDTYPE_MEGA) { $x26 = self::DDTYPE_NONE; }}
elseif ($x26 === self::DDTYPE_SIMPLE){ if ($x1b["dd\x54\171p\145"] === self::DDTYPE_MEGA) { $x26 = self::DDTYPE_NONE; } elseif ($x14 === 0) { $x26 = self::DDTYPE_CLASSIC; }}
$x27 = array( "\x64d\x54\171\160\x65" => $x26, );
$x28 = FALSE;
$x29 = array();
$x2a = '';
$x2b = '';
$x2c = FALSE;
$x2d = "l\145\x76\145l" . $x14;
if (FALSE === $this->p0c&& ($x26 === self::DDTYPE_MEGA || $x1b["d\144T\x79\x70e"] === self::DDTYPE_MEGA) )
{ $x28 = TRUE; }
if ($x28){ $x2e = $this->x10($item, "\165\x6d\155_\144\144\x5fbl\x6fck\x73");if ($x2e) {$x29 = explode($this->p0d, $x2e); }}
if (FALSE === $this->p0c && $x26 === self::DDTYPE_MEGA) {
$x2f = $item->getData("u\155\155_\144d\x5fp\x72o\160\x6f\162t\151o\156s");
if ($x2f) {
$x30 = explode("\x3b", $x2f);
$x31= $x30[0];
$x32 = $x30[1];
$x33= $x30[2];
} else {
$x31 = $x32 = $x33 = 4;
}
$x34 = "\147r\151\x641\x32-" . $x31;
$x35 = "\x67\x72i\1441\x32\x2d" . $x32;
$x36= "\x67r\151\1441\062\x2d" . $x33;
if (empty($x29[1]) && empty($x29[2])) {
$x34= '';
$x35 = "\147\162\151\x64\x31\x32\x2d\0612";
$x36= '';
} elseif (empty($x29[1])) {
$x34= '';
$x35 = "\147\162\x69\x64\x31\x32-" . ($x31 + $x32);
} elseif (empty($x29[2])) {
$x35 = "gr\151\x64\x31\x32\055" . ($x32 + $x33);
$x36= '';
}elseif (!$x23) {
$x34= "\147r\x69\x641\x32-" . ($x31 + $x32);
$x35 = '';
$x36= "\147\162i\144\x31\062\x2d" . $x33;
}
if (!empty($x29[0])) {
$x2c = TRUE;
$x2a .= '<div class="nav-block nav-block--top std grid-full">' . $x29[0] . '</div>';
}
if (!empty($x29[1])) {
$x2c = TRUE;
$x2a .= '<div class="nav-block nav-block--left std ' . $x34 . '">' . $x29[1] . '</div>';
}
if ($x23) {
$x2a .= '<div class="nav-block--center ' . $x35 . '">'; $x2b .= '</div>';
}
if (!empty($x29[2])) {
$x2c = TRUE;
$x2b .= '<div class="nav-block nav-block--right std ' . $x36 . '">' . $x29[2] . '</div>';
}
if (!empty($x29[3])) {
$x2c = TRUE;
$x2b .= '<div class="nav-block nav-block--bottom std grid-full">' . $x29[3] . '</div>';
}
}
$x37 = ($x23 || $x2c) ? TRUE : FALSE;
$classes = array("\x6e\141v\055\151t\x65\155");
$x39 = array();
$x3a = array();
$x3b = array("n\141\166-\163\165b\x6d\x65\x6e\x75");
$x3c = '';
$x3d = '';
$x3e = '';
$classes[] = $x2d;
$classes[] = "\x6e\141v-" . $this->_getItemPosition($x14);
if ($this->isCategoryActive($item)) {
$classes[] = "active";
if ($item->getId() === $this->currentCategory) {
$classes[] = "current";
}
}
if ($x17 && $x18) {
$classes[] = $x18;
$x39[] = $x18;
}
if ($x16) {
$classes[] = "\x66i\x72s\x74";
}
if ($x15) {
$classes[] = "\154\141\x73t";
}
if (FALSE === $this->p0c) {
if ($x26 === self::DDTYPE_CLASSIC) {
if ($x37){
$classes[] = "n\x61v\055\151\164\145\x6d\x2d-\160\141r\145\156t"; //nav-item--parent
$x3b[] = "\156\141\x76\055\160ane\154-\055d\162o\x70\x64\x6f\167n"; //nav-panel--dropdown
}
$classes[] = $this->ddtype[self::DDTYPE_CLASSIC];
$x3b[] = "\x6ea\x76\055\x70a\156\145l";
} elseif ($x26 === self::DDTYPE_MEGA) {
if ($x37){
$classes[] = "nav\055\151tem-\055\x70\x61r\x65\156t"; //nav-item--parent
$x3a[] = "\x6ea\x76\055\x70a\x6e\x65\154\055\x2d\144r\157pdo\167\156"; //nav-panel--dropdown
}
$classes[] = $this->ddtype[self::DDTYPE_MEGA];
$x3a[] = "\156av\055\x70\141\156\x65l";
if ($x19){
$x3a[] = $x19;
}
$x3b[] = "\x6e\141v\x2dsu\x62\x6d\145\x6eu\x2d-m\x65ga"; //nav-submenu--mega
$x3f = intval($item->getData("\165\155\155\x5f\144\144_\x63\x6fl\x75\155\x6e\163")); //umm_dd_columns
if ($x3f === 0) {
$x3f = 4;
}
$x3b[] = "dd-\151\164\x65m\147rid\x20\144\x64-\151\x74\145\x6d\147\x72i\144-" . $x3f . "c\157\154"; //dd-itemgrid dd-itemgrid-
} elseif ($x26 === self::DDTYPE_SIMPLE) {
$classes[] = $this->ddtype[self::DDTYPE_SIMPLE];
$x3b[] = "\156\141\166\055pa\x6e\145\x6c";
} elseif ($x26 === self::DDTYPE_NONE) {
$x3b[] = "na\x76-\160\141\x6e\x65\154";
}
if ($x40 = $item->getData("u\x6dm_\144\x64_\x77idth")) {
$x41 = '';
$x42 = '';
if (strpos($x40, "px") || strpos($x40, "\x25")) {
$x41 = ' style="width:' . $x40 . ';"';
} else {
$x42 = intval($x40);
if (0 < $x42 && $x42 <= 12) {
$x42 = "\156\157-\147\165\x74\x74\145\162\x20\x67r\151\x641\x32-" . $x42; //no-gutter grid12-
} else {
$x42 = '';
}
}
if ($x26 === self::DDTYPE_CLASSIC) {
$x3d = $x41;
} elseif ($x26 === self::DDTYPE_MEGA) {
$x3c = $x41;
if ($x42) {
$x3a[] = $x42;
}
}
} else {
if ($x26 === self::DDTYPE_MEGA) {
$x3a[] = "full-width";
}
}
if ($x2c) {
if (FALSE === $x23){
$classes[] = "n\141\x76\x2d\151\x74\145m-\055o\156\154\171\x2d\x62\154\x6f\x63\x6b\x73"; //nav-item--only-blocks
}
} else {
if ($x23) {
$classes[] = "n\141v\x2d\x69t\145\x6d\055\x2do\156\x6cy-\x73\165\x62c\141tego\162\x69es"; //nav-item--only-subcategories
}
}
}
if ($x37){$classes[] = "p\141r\145n\164";if (FALSE === $this->p0c) {$x3e = '<span class="caret"> </span>'; }}
$x43 = '';
if ($this->p0e && $this->p0c) { $x43 = '<span class="number">('. $this->x0f($item) .')</span>';}
$x44 = $this->x11($item, $x14);
if ($x45 = $item->getData("umm_cat_target")) {
if ($x45 === "#") {
$url = "#";
$x39[] = "no-click";
}
elseif ($x45 = trim($x45)) {
if (strpos($x45, "\150\x74t\x70") === 0){$url = $x45;}else{$url = Mage::getBaseUrl() . $x45;}
} else { $url = $this->getCategoryUrl($item); }
} else {
$url = $this->getCategoryUrl($item);
}
$html .= "<li" . ($classes ? ' class="' . implode(" ", $classes) . '"': ''). ">";
if (FALSE === $this->p0c && $x1b["d\x64\x54\171\160e"] === self::DDTYPE_MEGA){
if (!empty($x29[0])) {
$html .= '<div class="nav-block nav-block--top std">' . $x29[0] . '</div>';
}
}
$html .= '<a href="' . $url . '"' . ($x39 ? ' class="' . implode(" ", $x39) . '"': '') . '>';
$html .= '<span>' . $this->escapeHtml($item->getName()) . $x43 . $x44 . '</span>' . $x3e;
$html .= '</a>';
$x47 = '';
$x48 = 0;
foreach ($active_categories as $category) {
$x47 .= $this->getItemHtml($category, ($x14 + 1), ($x48 == $x22 - 1), ($x48 == 0), FALSE, $x18,$x19,$x1a,$x27); $x48++;
}
if (!empty($x47) || $x2c) {
$html .= '<span class="opener"></span>';
if (!empty($x3a)) {
$html .= '<div class="' . implode(' ', $x3a) . '"' . $x3c . '><div class="nav-panel-inner">';
}
$html .= $x2a;
if (!empty($x47)) {
$html .= '<ul class="' . $x2d .' '. implode(' ', $x3b) . '"' . $x3d . '>';
$html .= $x47;
$html .= '</ul>';
}
$html .= $x2b;
if (!empty($x3a)) {
$html .= "</div></div>";
}
}
if (FALSE === $this->p0c && $x1b["ddType"] === self::DDTYPE_MEGA) {
if (!empty($x29[3])) {
$html .= '<div class="nav-block nav-block--bottom std">' . $x29[3] . '</div>';
}
}
$html .= "</li>";
return $html;
}
public function renderCategoriesMenuHtml($x49 = FALSE, $x14 = 0, $x18 = '', $x19 = '')
{
$items = array();
foreach ($this->getStoreCategories() as $category) {
if ($category->getIsActive()) {
$items[] = $category;
}
}
$x4b = count($items);
$x4c = ($x4b > 0);
if (!$x4c) { return '';}
$x1b = array("ddType" => self::DDTYPE_NONE);
$html = '';
$x48 = 0;
foreach ($items as $item) {
$html .= $this->getItemHtml($item,$x14,($x48 == $x4b - 1),($x48 == 0),TRUE,$x18,$x19,TRUE,$x1b );
$x48++;
}
// Start Author link insertion
$action = Mage::app()->getFrontController()->getAction()->getFullActionName();
$activeAuthor = '';
if($action == 'publish_author_index' || $action == 'publish_author_view') $activeAuthor = ' active';
$html .= '<li class="mobile-grid-half nav-item nav-item--authors level0 level-top'.$activeAuthor.'">';
$html .= '<a class="level-top" href="' . Mage::helper('publish/author')->getAuthorsUrl() . '">';
$html .= '<span>'. Mage::helper('publish')->__('Authors').'</span>';
$html .= '</a></li>';
// End Author link insertion
return $html;
}
public function renderMe($x49, $x4d = 0, $x4e = 0)
{
$x4f = '';
$x50 = '';
if ($x4d === 'parent_no_siblings'){
if ($current_category = Mage::registry('current_category')) {
$x4f= $current_category->getId();
$x50 = $current_category->getLevel();
}
}
$this->p0c = TRUE;
$this->p0e = Mage::helper('ultramegamenu')->getCfg('sidemenu/num_of_products');
$x14 = 0;
$x18 = '';
$x19 = '';
$x52 = $this->x0e($x4d);
$x53 = $this->x0c($x52, $x4e);
$items = array();
foreach ($x53 as $category){
if ($category->getIsActive()) {
if ($x4d === 'parent_no_siblings') {
if ($x50 !== '' && $category->getLevel() == $x50 && $category->getId() != $x4f) {
continue;
}
}
$items[] = $category;
}
}
$x4b = count($items);
$x4c = ($x4b > 0);
if (!$x4c) { return '';}
$x1b = array("\x64\x64\x54\x79pe" => self::DDTYPE_NONE);
$html = '';
$x48 = 0;
foreach ($items as $item) {
$html .= $this->getItemHtml($item,$x14,($x48 == $x4b - 1),($x48 == 0),TRUE,$x18,$x19,TRUE,$x1b );
$x48++;
}
return $html;
}
protected function x0c($x52 = 0, $x4e = 0, $x54=FALSE, $x55=FALSE, $x56=TRUE)
{
$item = Mage::getModel('catalog/category');
if ($x52 === NULL || !$item->checkId($x52)){
return array();
}
if (Mage::helper('catalog/category_flat')->isEnabled()){
$x57 = Mage::getResourceModel('catalog/category_flat');
$x53 = $x57->getCategories($x52, $x4e, $x54, $x55, $x56);
} else {
$x53 = $item->getCategories($x52, $x4e, $x54, $x55, $x56);
}
return $x53;
}
protected function x0e($x4d)
{
$x52 = NULL;
if ($x4d === 'current'){
$current_category = Mage::registry('current_category');
if ($current_category) {
$x52 = $current_category->getId();
}
} elseif ($x4d === 'parent') {
$current_category = Mage::registry('current_category');
if ($current_category) {
$x52 = $current_category->getParentId();
}
} elseif ($x4d === 'parent_no_siblings'){
$current_category = Mage::registry('current_category');
if ($current_category) {
$x52 = $current_category->getParentId();
}
} elseif ($x4d === 'root' || !$x4d) {
$x52 = Mage::app()->getStore()->getRootCategoryId();
} elseif (is_numeric($x4d)) {
$x52 = intval($x4d);
}
$x58 = Mage::helper('ultramegamenu')->getCfg('sidemenu/fallback');
if ($x52 === NULL && $x58) {
$x52 = Mage::app()->getStore()->getRootCategoryId();
}
return $x52;
}
protected function x0f($item)
{
return Mage::getModel('catalog/layer') ->setCurrentCategory($item->getID()) ->getProductCollection() ->getSize();
}
public function renderBlockTitle()
{
$x24 = Mage::helper('ultramegamenu');
$current_category = Mage::registry('current_category');
if (!$current_category) {
$x58 = $x24->getCfg('sidemenu/fallback');
if ($x58) {
$x59 = $x24->getCfg('sidemenu/block_name_fallback');
if ($x59){
return $x59;
}
}
}
$x5a = $this->getBlockName();
if ($x5a === NULL) {
$x5a = $x24->getCfg('sidemenu/block_name');
}
$x5b = '';
if ($current_category){
$x5b = $current_category->getName();
}
$x5a = str_replace('[current_category]', $x5b, $x5a);
return $x5a;
}
protected function x10($item, $x5c)
{
if (!$this->p0f){
$this->p0f = Mage::helper('cms')->getBlockTemplateProcessor();
}
return $this->p0f->filter( trim($item->getData($x5c)) );
}
protected function x11($item, $x14)
{
$label_class = $item->getData('umm_cat_label');
if ($label_class){
$label = trim(Mage::helper('ultramegamenu')->getCfg('category_labels/' . $label_class));
if ($label) {
if ($x14 == 0){
return '<span class="cat-label cat-label-'. $label_class .' pin-bottom">' . $label . '</span>';
} else {
return '<span class="cat-label cat-label-'. $label_class .'">' . $label . '</span>';
}
}
}
return '';
}
}
Function Calls
| None |
Stats
| MD5 | 1e2a45f131c0ce7c8aba3477fae7a649 |
| Eval Count | 0 |
| Decode Time | 173 ms |