Файловый менеджер - Редактировать - /var/www/iplanru/data/www/i-plan.ru/templates/yoo_everest/layouts/widget_old.php
Назад
<?php /** * @package yoo_everest * @author YOOtheme http://www.yootheme.com * @copyright Copyright (C) YOOtheme GmbH * @license http://www.gnu.org/licenses/gpl.html GNU/GPL */ /* * Theme params */ //if work $turl = $_SERVER['REDIRECT_URL']; $jinput = JFactory::getApplication()->input; $matid=$jinput->get( 'item_id', 0, 'INT' ); $Itemid=$jinput->get( 'Itemid', 0, 'INT' ); $category_id=$jinput->get( 'category_id', 0, 'INT' ); $invisible=false; foreach (array('suffix', 'panel', 'class', 'badge', 'icon', 'display') as $var) { $$var = isset($params[$var]) ? $params[$var] : null; } // Set default panel if ($panel == '' && in_array($widget->position, array( 'top-a', 'top-b', 'bottom-a', 'bottom-b', 'main-top', 'main-bottom-before', 'main-bottom', 'main-bottom2', 'main-bottom3', 'main-bottom4', 'main-bottom-after', 'sidebar-a', 'sidebar-b' ))) { $panel = $this['config']->get("panel_default.{$widget->position}.panel", ''); } // Set panel for specific positions else if (in_array($widget->position, array('headerbar', 'toolbar-r' ,'toolbar-l', 'footer', 'offcanvas'))) { $panel = 'uk-panel'; } // Set badge $badge = ($badge && $badge['text']) ? '<div class="'.$badge['type'].'">'.$badge['text'].'</div>': ''; // Set icon $icon = ($icon && preg_match('/\.(gif|png|jpg|jpeg|svg)$/', $icon)) ? '<img src="'.$this['path']->url('site:').'/'.$icon.'" alt="'.$widget->title.'"> ' : ($icon ? '<i class="'.$icon.'"></i> ':''); /* * Widget params */ $content = $widget->content; $title = ($widget->showtitle) ? $widget->title : ''; // Set title if (in_array($widget->position, array('headerbar', 'toolbar-r' ,'toolbar-l', 'footer'))) { $title = ''; } elseif ($title && !($widget->position == 'menu')) { if ($widget->id==143) $title_link="/index.php?option=com_content&view=article&id=62";//наша команда if ($widget->id==158) $title_link="/allpartners.php";//партнеры и банки if ($widget->id==141) $title_link="/preview.php";//анонсы if ($widget->id==167) $title_link="/index.php?option=com_content&view=article&id=41&Itemid=240&lang=en&catid=14";//анонсы en if ($widget->id==159) $title_link="/allclients.php";//клиенты if ($widget->id==116) $title_link="/index.php?option=com_zoo&task=category&category_id=67&Itemid=119";//Спецпредложения if ($widget->id==187) $title_link="/all-project-experience.php";//Проектный опыт if ($widget->id==115) $title_link="/index.php?option=com_zoo&task=category&category_id=69&Itemid=119";//Публикации if ($widget->id==91) $title_link="/index.php?option=com_zoo&task=category&category_id=68&Itemid=119";//Новости if ($widget->id==123) $title_link="/index.php?option=com_zoo&task=category&category_id=1131&Itemid=117";//Торговля if ($widget->id==122) $title_link="/index.php?option=com_zoo&task=category&category_id=1132&Itemid=117";//Финансы if ($widget->id==120) $title_link="/index.php?option=com_zoo&task=category&category_id=1129&Itemid=117";//Реальный сектор if ($widget->id==121) $title_link="/index.php?option=com_zoo&task=category&category_id=1130&Itemid=117";//Сфера услуг /*if ($widget->id==193) $title_link="/index.php?option=com_poll&view=poll&Itemid=271";//Опрос*/ if ($widget->id==193) $title_link="/pool.php";//Опрос if ($widget->id==222) { $title_link="/index.php?option=com_zoo&task=category&category_id=2376&Itemid=117";//Сфера услуг if ($Itemid==108) {$title="Бизнес-планы по отраслям";} if ($Itemid==109) {$title="Исследования по отраслям";} } if ($widget->id==230) //кнопка на каталоги { if ($Itemid==109) { $title="Каталог бизнес-планов"; $title_link="/bp.php"; } elseif ($Itemid==108) { $title="Каталог исследований"; $title_link="/mi.php"; } else { $invisible=true; } } //иконки на БП каталоги if ($widget->id==133 and $_SERVER['REQUEST_URI']<>"/bp.php") $invisible=true; if ($widget->id==241 and $_SERVER['REQUEST_URI']=="/bp.php") $invisible=true; //рубрикатор скрыть на клиентах if ($widget->id==222 and $_SERVER['REQUEST_URI']=="/allclients.php") $invisible=true; //кнопки на каталоги if ($widget->id==233) $title_link="/bp.php"; if ($widget->id==234) $title_link="/mi.php"; if ($title_link) $title='<h3 class="uk-panel-title"><a class="title-link" href="'.$title_link.'">'.$icon.$title.'</a></h3>'; else $title = '<h3 class="uk-panel-title">'.$icon.$title.'</h3>'; //$title = sprintf($title_template, $title); } if (trim(strip_tags($widget->content))=="" and $widget->id==188) { $invisible=true; } // create title template if ($title_template) { } // Render menu if ($widget->menu) { // Set menu renderer if (isset($params['menu'])) { $renderer = $params['menu']; } else if (in_array($widget->position, array('menu'))) { $renderer = 'navbar'; $widget->nav_settings["modifier"] = "uk-hidden-small"; } else if (in_array($widget->position, array('toolbar-l', 'toolbar-r', 'footer'))) { $renderer = 'subnav'; $widget->nav_settings["modifier"] = "uk-subnav-line"; } else if (in_array($widget->position, array('offcanvas'))) { $renderer = 'nav'; $widget->nav_settings["modifier"] = "uk-nav-offcanvas"; } else { $renderer = 'nav'; $widget->nav_settings["accordion"] = true; } $content = $this['menu']->process($widget, array('pre', 'subnav', $renderer, 'post')); } //if work //canonical if ($Itemid==117 or $Itemid==108 or $Itemid==109) { if ($matid<>0) {$work=true;} } // render module if ($widget->id==141 and $work)//if anons { } elseif ($widget->id==188 and !$work)//if recomend { } elseif ($widget->id==167 and $work)//if anons { } elseif ($widget->id==215 and !$work)//if recomend { } elseif ($invisible)//invisible { } else { // Render widget if (in_array($widget->position, array('breadcrumbs', 'logo', 'logo-small', 'search', 'debug')) || (($widget->position == 'offcanvas') && $widget->menu)) { echo $content; } elseif ($widget->position == 'menu') { if ($widget->menu) { echo $content; } else { echo ' <ul class="uk-navbar-nav uk-hidden-small"> <li class="uk-parent" data-uk-dropdown> <a href="#">'.$title.'</a> <div class="uk-dropdown uk-dropdown-navbar">'.$content.'</div> </li> </ul>'; } } else { $classes = array($panel); // Set display if ($display) { foreach ($display as $device => $visible) { if (!$visible) { $classes[] = 'uk-hidden-'.$device; } } } if ($class) $classes[] = $class; if ($suffix) $classes[] = $suffix; echo '<div class="'.implode(' ', $classes).'">'.$badge.$title.$content.'</div>'; } }
| ver. 1.4 |
Github
|
.
| PHP 5.4.45-1~dotdeb+6.1 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка